RTL/tsconfig.json

40 lines
1,001 B
JSON
Raw Normal View History

{
"compileOnSave": false,
"compilerOptions": {
2022-12-13 15:53:41 -08:00
"baseUrl": "./",
"forceConsistentCasingInFileNames": true,
2022-12-27 18:05:42 -08:00
"allowSyntheticDefaultImports": true,
2022-12-27 19:04:23 -08:00
"strict": false,
2022-12-13 15:53:41 -08:00
"noImplicitOverride": false,
"noPropertyAccessFromIndexSignature": false,
2022-12-27 18:05:42 -08:00
"strictPropertyInitialization":false,
"strictNullChecks": false,
"noImplicitAny": false,
"noImplicitReturns": true,
"noFallthroughCasesInSwitch": true,
2022-12-13 21:41:44 -08:00
"sourceMap": false,
2022-12-13 15:53:41 -08:00
"declaration": false,
2022-12-27 18:05:42 -08:00
"downlevelIteration": true,
"experimentalDecorators": true,
"moduleResolution": "bundler",
2022-11-23 19:30:45 -08:00
"target": "ES2022",
2022-12-13 15:53:41 -08:00
"module": "ES2022",
"importHelpers": true,
2022-12-13 15:53:41 -08:00
"useDefineForClassFields": false,
"lib": [
2022-12-13 15:53:41 -08:00
"ES2022",
"dom"
Drop crypto-browserify polyfills by moving 2FA TOTP to WebCrypto The frontend build pulled in crypto-browserify, stream-browserify and vm-browserify (via tsconfig paths) only because otplib's @otplib/plugin-crypto requires Node's crypto. That chain carried the last production npm audit findings - the elliptic advisory (GHSA-848j-6mx2-7j84, no fixed release) plus browserify-sign/create-ecdh (issue #1634, item 3). The two-factor-auth settings dialog is the only browser consumer of otplib. It now uses a small WebCrypto TOTP service (src/app/shared/services/totp.service.ts, RFC 6238: HMAC-SHA1, 6 digits, 30s step) instead, so otplib is no longer bundled and the three polyfills plus their tsconfig path mappings are removed. The backend still verifies login tokens with otplib, so the new service must match it exactly - verified byte-for-byte against otplib and the RFC 6238 test vectors (generateSecret/keyuri/generate/check parity). Existing authenticator enrollments keep working. token check() is now async (WebCrypto's digest is promise-based); the dialog's verify handler was updated to match, and the value was never used for control flow. Production npm audit now reports zero vulnerabilities (from 13, incl. 2 critical, at the start of this cleanup series). Verified on the docker fixture: enrolled a 2FA secret from the new service, confirmed the backend otplib accepts a token it produces at login, rejected wrong/absent tokens. Unit spec covers RFC 6238 vectors, keyuri parity and base32 round-trip; both API suites and the full frontend suite (204 specs) pass.
2026-07-19 18:22:50 -07:00
]
2019-07-27 14:20:17 -04:00
},
2021-12-29 18:08:41 -05:00
"include": [
2023-10-03 17:35:13 -07:00
"./server/**/*",
"./src/**/*"
2022-12-27 18:05:42 -08:00
],
2019-07-27 14:20:17 -04:00
"angularCompilerOptions": {
2022-12-13 15:53:41 -08:00
"enableI18nLegacyMessageIdFormat": false,
"strictInjectionParameters": true,
"strictInputAccessModifiers": true,
"strictTemplates": false
}
}