Fix TypeScript parameter property crash in Node strip-only mode
oauth.server.ts used a TypeScript parameter property (`public code: string` in constructor) which is not supported by Node.js v25's strip-only TypeScript mode. This caused the journal to crash-loop on startup after seeding OAuth clients. Also enable `erasableSyntaxOnly` in tsconfig.base.json so `pnpm typecheck` catches any future use of non-erasable TypeScript syntax. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
fda376267c
commit
e69f93800b
2 changed files with 4 additions and 4 deletions
|
|
@ -264,10 +264,9 @@ export async function getAuthenticatedUser(request: Request) {
|
||||||
// --- Error type ---
|
// --- Error type ---
|
||||||
|
|
||||||
export class OAuthError extends Error {
|
export class OAuthError extends Error {
|
||||||
constructor(
|
code: string;
|
||||||
public code: string,
|
constructor(code: string, message: string) {
|
||||||
message: string,
|
|
||||||
) {
|
|
||||||
super(message);
|
super(message);
|
||||||
|
this.code = code;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -17,6 +17,7 @@
|
||||||
"noUncheckedIndexedAccess": true,
|
"noUncheckedIndexedAccess": true,
|
||||||
"noUncheckedSideEffectImports": false,
|
"noUncheckedSideEffectImports": false,
|
||||||
"noEmit": true,
|
"noEmit": true,
|
||||||
|
"erasableSyntaxOnly": true,
|
||||||
"allowImportingTsExtensions": true
|
"allowImportingTsExtensions": true
|
||||||
},
|
},
|
||||||
"exclude": ["node_modules", "build", "dist"]
|
"exclude": ["node_modules", "build", "dist"]
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue