diff --git a/knip.json b/knip.json index e0e4fa5b..06833b98 100644 --- a/knip.json +++ b/knip.json @@ -1,5 +1,6 @@ { "$schema": "https://unpkg.com/knip@5/schema.json", + "include": ["classMembers"], "entry": ["src/cli/index.ts", "tests/**/testkit/index.ts"], "project": ["src/**/*.ts", "tests/**/*.ts"], "ignore": ["dist/**", "tests/fixtures/**"] diff --git a/src/cli/telemetry/error-reporter.ts b/src/cli/telemetry/error-reporter.ts index ae4b36bd..ade6faac 100644 --- a/src/cli/telemetry/error-reporter.ts +++ b/src/cli/telemetry/error-reporter.ts @@ -45,13 +45,6 @@ export class ErrorReporter { }); } - /** - * Get the session ID for this CLI execution. - */ - getSessionId(): string { - return this.sessionId; - } - /** * Set context for error reporting. Can be called multiple times to add/update context. */ diff --git a/src/core/errors.ts b/src/core/errors.ts index 11b449c5..f04ed44c 100644 --- a/src/core/errors.ts +++ b/src/core/errors.ts @@ -456,7 +456,6 @@ export class InternalError extends SystemError { */ export class TypeGenerationError extends SystemError { readonly code = "TYPE_GENERATION_ERROR"; - readonly entityName?: string; constructor(message: string, entityName?: string, cause?: unknown) { super(message, { @@ -469,7 +468,6 @@ export class TypeGenerationError extends SystemError { ], cause: cause instanceof Error ? cause : undefined, }); - this.entityName = entityName; } } diff --git a/tests/cli/testkit/Base44APIMock.ts b/tests/cli/testkit/Base44APIMock.ts index ff597ed4..a8987f8e 100644 --- a/tests/cli/testkit/Base44APIMock.ts +++ b/tests/cli/testkit/Base44APIMock.ts @@ -245,16 +245,6 @@ export class Base44APIMock { return this; } - /** Mock GET /api/apps/{appId}/external-auth/status - Get OAuth status */ - mockConnectorOAuthStatus(response: ConnectorOAuthStatusResponse): this { - this.handlers.push( - http.get(`${BASE_URL}/api/apps/${this.appId}/external-auth/status`, () => - HttpResponse.json(response), - ), - ); - return this; - } - /** Mock DELETE /api/apps/{appId}/external-auth/integrations/{type}/remove */ mockConnectorRemove(response: ConnectorRemoveResponse): this { this.handlers.push( @@ -369,16 +359,6 @@ export class Base44APIMock { ); } - /** Mock token endpoint to return an error (for auth failure testing) */ - mockTokenError(error: ErrorResponse): this { - return this.mockError("post", "/oauth/token", error); - } - - /** Mock userinfo endpoint to return an error */ - mockUserInfoError(error: ErrorResponse): this { - return this.mockError("get", "/oauth/userinfo", error); - } - /** Mock connectors list to return an error */ mockConnectorsListError(error: ErrorResponse): this { return this.mockError( diff --git a/tests/cli/testkit/CLIResultMatcher.ts b/tests/cli/testkit/CLIResultMatcher.ts index 5d3612f1..b3580831 100644 --- a/tests/cli/testkit/CLIResultMatcher.ts +++ b/tests/cli/testkit/CLIResultMatcher.ts @@ -24,14 +24,6 @@ export class CLIResultMatcher { } } - toHaveExitCode(code: number): void { - if (this.result.exitCode !== code) { - throw new Error( - `Expected exit code ${code} but got ${this.result.exitCode}`, - ); - } - } - toContain(text: string): void { const output = this.result.stdout + this.result.stderr; if (!output.includes(text)) { @@ -53,22 +45,4 @@ export class CLIResultMatcher { ); } } - - toContainInStdout(text: string): void { - if (!this.result.stdout.includes(text)) { - throw new Error( - `Expected stdout to contain "${text}"\n` + - `stdout: ${stripAnsi(this.result.stdout)}`, - ); - } - } - - toContainInStderr(text: string): void { - if (!this.result.stderr.includes(text)) { - throw new Error( - `Expected stderr to contain "${text}"\n` + - `stderr: ${stripAnsi(this.result.stderr)}`, - ); - } - } }