Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions knip.json
Original file line number Diff line number Diff line change
@@ -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/**"]
Expand Down
7 changes: 0 additions & 7 deletions src/cli/telemetry/error-reporter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*/
Expand Down
2 changes: 0 additions & 2 deletions src/core/errors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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, {
Expand All @@ -469,7 +468,6 @@ export class TypeGenerationError extends SystemError {
],
cause: cause instanceof Error ? cause : undefined,
});
this.entityName = entityName;
}
}

Expand Down
20 changes: 0 additions & 20 deletions tests/cli/testkit/Base44APIMock.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down Expand Up @@ -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(
Expand Down
26 changes: 0 additions & 26 deletions tests/cli/testkit/CLIResultMatcher.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand All @@ -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)}`,
);
}
}
}
Loading