@lenne.tech/nest-server 12.12.3 → 12.14.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude/rules/better-auth.md +4 -1
- package/.claude/rules/configurable-features.md +2 -2
- package/.claude/rules/package-management.md +1 -1
- package/.claude/rules/testing.md +3 -3
- package/FRAMEWORK-API.md +2 -1
- package/dist/core/common/helpers/meta.helper.d.ts +5 -0
- package/dist/core/common/helpers/meta.helper.js +16 -1
- package/dist/core/common/helpers/meta.helper.js.map +1 -1
- package/dist/core/common/interfaces/server-options.interface.d.ts +5 -0
- package/dist/core/modules/file/core-file.controller.js +2 -1
- package/dist/core/modules/file/core-file.controller.js.map +1 -1
- package/dist/core/modules/file/core-file.resolver.js +2 -1
- package/dist/core/modules/file/core-file.resolver.js.map +1 -1
- package/dist/core/modules/file/core-file.service.d.ts +12 -0
- package/dist/core/modules/file/core-file.service.js +44 -0
- package/dist/core/modules/file/core-file.service.js.map +1 -1
- package/dist/core/modules/file/file-access.helper.d.ts +1 -0
- package/dist/core/modules/file/file-access.helper.js +2 -2
- package/dist/core/modules/file/file-access.helper.js.map +1 -1
- package/dist/core/modules/file/s3-file.helper.d.ts +14 -0
- package/dist/core/modules/file/s3-file.helper.js +34 -1
- package/dist/core/modules/file/s3-file.helper.js.map +1 -1
- package/dist/core/modules/health-check/core-health-check.service.d.ts +8 -0
- package/dist/core/modules/health-check/core-health-check.service.js +28 -4
- package/dist/core/modules/health-check/core-health-check.service.js.map +1 -1
- package/dist/core/modules/tenant/core-tenant-selection.helper.d.ts +14 -0
- package/dist/core/modules/tenant/core-tenant-selection.helper.js +71 -0
- package/dist/core/modules/tenant/core-tenant-selection.helper.js.map +1 -0
- package/dist/core/modules/tenant/core-tenant.decorators.d.ts +2 -0
- package/dist/core/modules/tenant/core-tenant.decorators.js +2 -0
- package/dist/core/modules/tenant/core-tenant.decorators.js.map +1 -1
- package/dist/core/modules/tenant/core-tenant.guard.d.ts +8 -0
- package/dist/core/modules/tenant/core-tenant.guard.js +108 -1
- package/dist/core/modules/tenant/core-tenant.guard.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/docs/REQUEST-LIFECYCLE.md +2 -1
- package/migration-guides/12.12.x-to-12.13.x.md +161 -0
- package/migration-guides/12.13.x-to-12.14.x.md +132 -0
- package/package.json +19 -19
- package/src/core/common/helpers/meta.helper.ts +62 -3
- package/src/core/common/interfaces/server-options.interface.ts +45 -1
- package/src/core/modules/file/INTEGRATION-CHECKLIST.md +6 -3
- package/src/core/modules/file/README.md +47 -9
- package/src/core/modules/file/core-file.controller.ts +9 -4
- package/src/core/modules/file/core-file.resolver.ts +2 -1
- package/src/core/modules/file/core-file.service.ts +73 -0
- package/src/core/modules/file/file-access.helper.ts +17 -4
- package/src/core/modules/file/s3-file.helper.ts +75 -2
- package/src/core/modules/health-check/core-health-check.service.ts +69 -12
- package/src/core/modules/tenant/README.md +39 -10
- package/src/core/modules/tenant/core-tenant-selection.helper.ts +135 -0
- package/src/core/modules/tenant/core-tenant.decorators.ts +26 -1
- package/src/core/modules/tenant/core-tenant.guard.ts +168 -1
- package/src/index.ts +1 -0
|
@@ -643,7 +643,10 @@ statements run in the session the framework set up (strict mode, UTC). On MongoD
|
|
|
643
643
|
`mysql2`'s client-side escaping (`sql-escaper`), and `/iam/update-user` accepts any JSON for `name` and `image`. From
|
|
644
644
|
`sql-escaper` 1.5.1 on, an object turns into `key = value` pairs only after a bare `SET ?`, which Kysely never writes
|
|
645
645
|
(it writes `col = ?`); before that, `{"name": {"roles": "[\"admin\"]"}}` assigned `roles` — a signed-in user making
|
|
646
|
-
themselves an administrator. The peer range (`>= 3.24.6
|
|
646
|
+
themselves an administrator. The peer range (`>= 3.24.6`; `>= 3.25.0` since 12.13.0, for GHSA-f763-mv98-7rv9)
|
|
647
|
+
guarantees the fixed escaper; never lower it. mysql2 3.26.0 refuses `caching_sha2_password` (MySQL 8.4's default)
|
|
648
|
+
over a connection without TLS unless `allowPublicKeyRetrieval` or `serverPublicKey` is set
|
|
649
|
+
(`PUBLIC_KEY_RETRIEVAL_NOT_ALLOWED`, measured 2026-12-04); raising the floor to it needs that decision first.
|
|
647
650
|
|
|
648
651
|
**Sign-up holds a pool connection while it hashes (accepted).** Better-Auth runs its Kysely adapter with transactions
|
|
649
652
|
on a `pg` pool, and `/sign-up/email` hashes the password inside its transaction — on the framework's application pool
|
|
@@ -335,7 +335,7 @@ This pattern is currently applied to:
|
|
|
335
335
|
| Config Endpoint | `configEndpoint` | Explicit Boolean with DERIVED default | **Unset → a project's `GET /config` answers only in `local` / `ci` / `e2e` (`isLocalEnv()`), 404 everywhere else (12.5.0+)**; `true` answers everywhere, `false` nowhere; a non-boolean value counts as not set (`NSC__CONFIG_ENDPOINT=true`). The route lives in project code (the starter's `ServerController`) and returns `configEndpointResponse()`, which throws `NotFoundException` when closed (404, as if the route did not exist; the route's `@Roles(ADMIN)` still answers 401 first) and otherwise the REDACTED configuration (`ConfigService.getRedactedConfig()`). Before 12.5.0 the starter's endpoint returned the database URI, auth secrets and mail password to every administrator, and projects created before the starter redacted kept doing so. Redaction is the one framework masker `redactSecrets()` (`common/helpers/redact-secrets.helper.ts`, moved from the Hub where it remains as `maskConfigDeep`): key patterns (`secret`/`password`/`token`/`credential` anywhere in the name, names ending in `pass` or `key`, `encryption`, `dsn`, `salt`, … — a superset of the pattern the starter used before; `pfx` / `pkcs12` since 12.10.1), every string or `Buffer` holding a PEM private key whatever its key is called (12.10.1 — a certificate login keeps certificate and key in one PEM under `certificate`, which reached `GET /config` in clear text before; a certificate alone stays readable), the password of a connection URI and secret-named URI query parameters, scheme + host + port only for an address under a key ending in `url`/`uri`/`endpoint`/`webhook` (a webhook carries its secret in the path), nested values; below a secret-named key EVERYTHING is masked except booleans; plus `FRAMEWORK_SECRET_FIELDS` and `security.secretFields`. The Hub config panel and the `ConfigService` `warn: true` debug output use the same view. Implementation: `common/helpers/config-endpoint.helper.ts` |
|
|
336
336
|
| Secret Fields Removal | `security.secretFields` | Array | `['password', 'verificationToken', ...]`. A project list is a UNION with the defaults (it can add, never remove). `CheckSecurityInterceptor` strips each field under its SQL column name too since 12.3.1 (`passwordResetToken` and `password_reset_token`): a row read through `store.native()` / `store.raw()` carries snake_case columns, and a route returning it unchanged used to hand every secret but `password` to the client. Pinned by `tests/unit/check-security-secret-columns.spec.ts` (mutation `secret-columns-not-stripped`) |
|
|
337
337
|
| Data Sources | `database` | Explicit Value — absent = today's `mongoose` config | **Absent → the `mongoose` configuration is the only data source, exactly as before; nothing SQL is loaded or installed.** A URL string (`'postgres://…'`) sets the default source (driver from the scheme, `sqlEngine` defaults to `typeorm`; `kysely` and `drizzle` are the alternatives — optional peers, each with `pg`); an object adds `ownerUrl` (default source), `sources` (name → URL or `{ url, ownerUrl, sqlEngine }`) and per-model exceptions (`models`); `false` means no database. Precedence for a model: `database.models` > the `dataSource` of a `CorePersistenceModule.forFeature()` definition > `@PersistedModel({ dataSource })` (read from the definition's `model:` class, otherwise from the decorated class named like the model; two such classes naming different sources refuse to guess) > default. When `database` sets a default and the project ALSO configures `mongoose` explicitly, that MongoDB becomes the source `mongoose` — only the project's own `mongoose` counts, because `CoreModule.forRoot()` always merges a fallback URI. **Since phase 1 (DEV-3829) PostgreSQL sources are wired**: only models registered with `CorePersistenceModule.forFeature()` are routed — **since phase 2 (DEV-3830) that includes the core's own models**: the user model (the reference `UserModule`), tenant memberships and API tokens, whose services switch to the routed store (a service that only received `@InjectModel()` follows its model's store; the Mongoose model of a model routed to SQL refuses every data access with a named error, so a direct `mainDbModel` call cannot split a model's data). **Since phase 3 (DEV-3831) Better-Auth follows the user model**: with the user model (table `users`) on a SQL source, Better-Auth runs its built-in Kysely adapter on that source's application pool — ONE `users` row per user shared with the user model (Better-Auth's own columns `name`, `email_verified`, `image` beside the framework's; its required ones are added nullable, so a row the user model writes alone stays valid), snake_case tables (`session`, `account`, `verification`, `jwks`, `two_factor`, `passkey`), ObjectId-hex ids. Its schema is applied as the OWNER at boot, under the same schema lock and grants as the framework's tables; without `ownerUrl` the application role only verifies and the boot stops while Better-Auth's migrations are pending. The framework's own reads and writes of Better-Auth's data follow it (session lookup by token, token service, JWKS, passkey challenge mappings — as Better-Auth verification values —, the e-mail-verified hook, user mapper, system setup, migration status — counted in SQL —, the MCP OAuth subject's roles); the MongoDB boot steps (indices, account-issuer backfill) are skipped there. Nothing is copied from MongoDB: a project that moves its users brings them over itself. **Since phase 4 (DEV-3832) the remaining core persistence follows too**: the AI module's eleven models and the three MCP OAuth stores (clients, codes, refresh tokens) are registered through `CorePersistenceModule.forFeature()` and run on their routed store (one code path; an upsert is update-then-insert with a retry on a duplicate, `sum()` replaces the budget aggregation, `find(…, { exclude })` the `-field` projection); the S3 and filesystem file metadata are two framework models (`CoreS3File`, `CoreFilesystemFile`, tables `s3_files` / `filesystem_files`) read and written through `fileMetadataCollection()` by the file service, the TUS hand-off and the Hub — GridFS stays MongoDB-only. A collection name with a hyphen becomes a table with an underscore. A TTL (`expires`, `index: { expireAfterSeconds }`) is a plain index on SQL; an **expiry sweep** (`scheduleExpirySweep()`, every 15 min, one replica per interval through a lease in the default SQL source's `lt_locks`, fail-open) deletes the expired rows of every routed TTL model, and — with Better-Auth on SQL — expired sessions and verification values. Nothing relies on it for correctness: every reader checks the expiry (an MCP authorization code older than ten minutes is refused on read on both databases). MongoDB keeps its TTL indexes and gets no sweep. The framework's leases (system-setup claim, cron, migrations) live in the default source: on MongoDB in the 12.0.0 documents (a rolling deploy with older replicas shares them), on SQL in `lt_locks`, namespaced, swept an hour after expiry. With `healthCheck.configs.database` every SQL source answers as `<key>:<source>`; `createMigrationStore(<owner URL>)` keeps the migration state in `lt_migrations` with an advisory run lock, on the first SQL engine installed (the CLI cannot read `database.sqlEngine`), and the Hub refuses to run migrations while that table is empty and the MongoDB collection is not (a `migrate.js` still writing MongoDB); the Hub's Persistence panel shows the routing. a SQL model's table is migrated as the OWNER (`ownerUrl`) when its store is created — without `ownerUrl` the application role only verifies and the boot stops while changes are pending; ONE owner connection per source, released once the application is bootstrapped — and the boot refuses an application role that is superuser, has `BYPASSRLS`, owns (or inherits the owner of) a framework table or may `TRUNCATE` it. Two roles in every environment (plan §3.9). Changes the framework never applies on its own (type change, new unique index, rename collision) stop the boot with the suggested statements; `migrate create <name> --sql` + `runSqlMigration()` apply them after review. **Since phase 5 (DEV-3833, 12.1.0) MongoDB is optional**: `mongoose`, `@nestjs/mongoose` and `mongodb` are optional peers, loaded through `common/persistence/mongo/mongo-packages.ts`; `CoreModule` connects MongoDB only when a source uses it (`usesMongoDb()` — `mongoose` configured explicitly, `database` naming MongoDB, or `database` absent), otherwise `@InjectConnection()` receives `null` and a model token without a connection is a stand-in that refuses data access. A configured MongoDB feature without the packages fails the boot with `MongoPackagesMissingError`. `database: false` runs a service without any database: a registered model's store refuses with the reason, Better-Auth is refused at boot. Proven by `pnpm run check:without-mongodb` (dist, packages hidden) and `check:without-mongodb:package` (the tarball installed without them, publish path). **Since phase 6 (DEV-3848) MySQL 8.4 and MariaDB 11.8 sources are wired** (`mysql://`, `mariadb://` — the scheme must name the server the URL reaches): `mysql2` is an optional peer beside the engine, all three engines run on one pool the framework creates (strict session with backslash escapes, UTC), `MysqlDataStore` writes the statements, the owner grants the application account `SELECT, INSERT, UPDATE, DELETE` on the database once and the boot refuses an application account that may alter, drop, index, trigger or grant; leases, migration state (`createMigrationStore()` / `runSqlMigration()` under `GET_LOCK`), the expiry sweep, health check and Hub work there. **Neither database has row-level security**: tenant isolation is the store's, the boot warns once per source, and native / raw access on a tenant table must filter by tenant itself. **Since 12.1.1 (DEV-3904) Better-Auth runs there too**: its Kysely adapter on the source's `mysql2` pool (the promise wrapper — Better-Auth builds `MysqlDialect` from it), its migrations as the owner under `GET_LOCK`, with the database's default collation switched to `utf8mb4_bin` while it creates a table and restored (`withFrameworkDefaultCollation()`; only on such a run and with a 5 s lock wait, because `ALTER DATABASE` locks every table) — Better-Auth names no collation, and MariaDB refuses a foreign key to `users.id` across collations; the database-level grant covers its tables. 12.1.0 refused it at boot. An indexed text field is `varchar(255)` (longer: 400); a DDL run is not transactional. Still refused with a named `DataSourceConfigError`: a second MongoDB source, and an `ownerUrl` without `url` — what `NSC__DATABASE__OWNER_URL` leaves of a `database` given as a URL string, because the environment merge replaces the string with an object (write `database: { url }`, or set `NSC__DATABASE__URL` too). An update path the model does not declare is dropped on SQL as by MongoDB's strict mode (`CrudService.update()` adds `updatedBy` to every update with a current user). URLs appear in errors and logs as scheme + host only. Implementation: `common/persistence/data-source.config.ts`, `data-source.runtime.ts`, `sql/` (db-agnostic plan §3.9) |
|
|
338
|
-
| Multi-Tenancy | `multiTenancy` | Presence Implies Enabled | **`excludeSchemas` is an OFF SWITCH for isolation, per model** — a listed schema gets no tenant filter at all; since 11.35.0 the plugin WARNS once per model when the excluded schema declares `tenantId` (i.e. was built for isolation). The framework's own docs recommended `['User', 'Session']` until then; that is withdrawn — it is only right for the global-user model. Since 11.35.0 GraphQL operations over the WEBSOCKET also run inside a `RequestContext` (`CoreModule` installs a context-aware `execute`/`subscribe` pair inside `subscriptions`, where `ApolloDriver` forwards it): the tenant comes from the handshake header validated against an active membership, else from the subscriber's memberships, and an unresolvable tenant leaves the safety net to refuse the read rather than returning everything. `headerName: 'x-tenant-id'`, `membershipModel: 'TenantMember'`, `adminBypass: true`, `excludeSchemas: []`, `roleHierarchy: { member: 1, manager: 2, owner: 3 }`, `cacheTtlMs: 30000` (0 disables, process-local). System roles (`S_EVERYONE`, `S_USER`, `S_VERIFIED`) are checked as OR alternatives before real roles; method-level system roles take precedence; membership validated for context when system role grants access + header present. Hierarchy roles use level comparison, normal roles use exact match. Use `DefaultHR` or `createHierarchyRoles()` for type-safe role constants. Bypass: `RequestContext.runWithBypassTenantGuard()`. Cache invalidation: `invalidateUser(userId)` / `invalidateAll()` are **instance** methods on the singleton `CoreTenantGuard` — inject it and call `this.tenantGuard?.invalidateUser(userId)`, never `CoreTenantGuard.invalidateUser(...)` (there is no static). With `redis` configured, both additionally BROADCAST the invalidation to every replica (`<keyPrefix>:tenant-cache:invalidate` pub/sub); without Redis they clear the local process only, so other replicas stay stale until `cacheTtlMs`. A received broadcast clears locally without re-publishing. **`isTenantActive` (11.42.0)**: optional hook `(tenantId, { connection, store }) => boolean \| Promise<boolean>`, absent = every tenant active (no change). `store(modelName)` (12.x, db-agnostic) is the data store of a model registered with `CorePersistenceModule.forFeature()`, wherever `database` routes it, and THROWS for any other model — an `undefined` would read as "active" in a hook written with `?.` and open every deactivated tenant. Asked AFTER the membership check on every path that establishes a tenant: 403 on header paths and for tenant API tokens, no enrichment on `S_EVERYONE`, dropped from the header-less tenant list, no tenant for a NEW WebSocket subscription, and since 11.42.3 an OPEN one is closed with 4403 on `invalidateTenant()` (or at its next event once `graphQl.subscriptionRevalidationMs` has passed — see the GraphQL Subscription Re-check row); an admin under `adminBypass` is exempt (someone must be able to switch it back on). Only `false` deactivates. Cached for `cacheTtlMs`; `invalidateTenant(tenantId)` clears and broadcasts (`{ scope: 'tenant' }`) — since 12.3.0 together with the tenant's cached memberships and every cached tenant list holding it, so memberships removed without `invalidateUser()` (a deleted tenant) stop counting at once rather than after `cacheTtlMs` (a tenant switched off through `isTenantActive` was already refused at once, its answer being cleared). **Removing a tenant (12.3.0)**: `CoreTenantService.purgeTenantData(tenantId, { dryRun?, exclude? })` first ends every way in — the memberships (`deleteAllMembers()`) and the tenant's API tokens, which need no member — then deletes, in batches of 1000 ids, every registered model with a `tenantId` path (MongoDB and SQL), the core references without one (the AI settings with `scope: 'tenant'`) and the AI connections — one only this tenant could use is deleted, from a shared one the tenant is removed (an empty `tenantIds` means every tenant). `excludeSchemas` and `exclude` are left out, so are users and files; the protected `purgeTenantRecords()` is where a project adds its own references. A function, so `config.env.ts` only — not reachable through `NSC__*`. **`adminBypass: false` (11.42.0)** additionally withholds two things that went around it: `CoreUserService.update()` refuses changing another account's e-mail or password (`assertCredentialChangeAllowed()`, administrator targets included — promote-then-change — system work without a current user exempt), and the AI tool registry grants no ADMIN bypass |
|
|
338
|
+
| Multi-Tenancy | `multiTenancy` | Presence Implies Enabled | **`excludeSchemas` is an OFF SWITCH for isolation, per model** — a listed schema gets no tenant filter at all; since 11.35.0 the plugin WARNS once per model when the excluded schema declares `tenantId` (i.e. was built for isolation). The framework's own docs recommended `['User', 'Session']` until then; that is withdrawn — it is only right for the global-user model. Since 11.35.0 GraphQL operations over the WEBSOCKET also run inside a `RequestContext` (`CoreModule` installs a context-aware `execute`/`subscribe` pair inside `subscriptions`, where `ApolloDriver` forwards it): the tenant comes from the handshake header validated against an active membership, else from the subscriber's memberships, and an unresolvable tenant leaves the safety net to refuse the read rather than returning everything. `headerName: 'x-tenant-id'`, `membershipModel: 'TenantMember'`, `adminBypass: true`, `excludeSchemas: []`, `roleHierarchy: { member: 1, manager: 2, owner: 3 }`, `cacheTtlMs: 30000` (0 disables, process-local). System roles (`S_EVERYONE`, `S_USER`, `S_VERIFIED`) are checked as OR alternatives before real roles; method-level system roles take precedence; membership validated for context when system role grants access + header present. Hierarchy roles use level comparison, normal roles use exact match. Use `DefaultHR` or `createHierarchyRoles()` for type-safe role constants. Bypass: `RequestContext.runWithBypassTenantGuard()`. Cache invalidation: `invalidateUser(userId)` / `invalidateAll()` are **instance** methods on the singleton `CoreTenantGuard` — inject it and call `this.tenantGuard?.invalidateUser(userId)`, never `CoreTenantGuard.invalidateUser(...)` (there is no static). With `redis` configured, both additionally BROADCAST the invalidation to every replica (`<keyPrefix>:tenant-cache:invalidate` pub/sub); without Redis they clear the local process only, so other replicas stay stale until `cacheTtlMs`. A received broadcast clears locally without re-publishing. **`isTenantActive` (11.42.0)**: optional hook `(tenantId, { connection, store }) => boolean \| Promise<boolean>`, absent = every tenant active (no change). `store(modelName)` (12.x, db-agnostic) is the data store of a model registered with `CorePersistenceModule.forFeature()`, wherever `database` routes it, and THROWS for any other model — an `undefined` would read as "active" in a hook written with `?.` and open every deactivated tenant. Asked AFTER the membership check on every path that establishes a tenant: 403 on header paths and for tenant API tokens, no enrichment on `S_EVERYONE`, dropped from the header-less tenant list, no tenant for a NEW WebSocket subscription, and since 11.42.3 an OPEN one is closed with 4403 on `invalidateTenant()` (or at its next event once `graphQl.subscriptionRevalidationMs` has passed — see the GraphQL Subscription Re-check row); an admin under `adminBypass` is exempt (someone must be able to switch it back on). Only `false` deactivates. Cached for `cacheTtlMs`; `invalidateTenant(tenantId)` clears and broadcasts (`{ scope: 'tenant' }`) — since 12.3.0 together with the tenant's cached memberships and every cached tenant list holding it, so memberships removed without `invalidateUser()` (a deleted tenant) stop counting at once rather than after `cacheTtlMs` (a tenant switched off through `isTenantActive` was already refused at once, its answer being cleared). **Removing a tenant (12.3.0)**: `CoreTenantService.purgeTenantData(tenantId, { dryRun?, exclude? })` first ends every way in — the memberships (`deleteAllMembers()`) and the tenant's API tokens, which need no member — then deletes, in batches of 1000 ids, every registered model with a `tenantId` path (MongoDB and SQL), the core references without one (the AI settings with `scope: 'tenant'`) and the AI connections — one only this tenant could use is deleted, from a shared one the tenant is removed (an empty `tenantIds` means every tenant). `excludeSchemas` and `exclude` are left out, so are users and files; the protected `purgeTenantRecords()` is where a project adds its own references. A function, so `config.env.ts` only — not reachable through `NSC__*`. **`adminBypass: false` (11.42.0)** additionally withholds two things that went around it: `CoreUserService.update()` refuses changing another account's e-mail or password (`assertCredentialChangeAllowed()`, administrator targets included — promote-then-change — system work without a current user exempt), and the AI tool registry grants no ADMIN bypass, and (12.13.0) the `file.access: 'tenant'` preset reads a tenant's files for an administrator only through an active membership. **`selectionCookie` (12.13.0)**: Boolean Shorthand, absent = off. `true` / `{}` / `{ name }`: the tenant guard writes `lt-tenant-id` (`__Host-` prefixed where cookies are `Secure`, the auth-cookie rule; HttpOnly, SameSite=Lax, Path=/, no Domain, session cookie) whenever a request's tenant header passed its check, never for API tokens. Read only on routes with `@ResolveTenantSelection()` (the file controller and resolver), after access was granted and when no tenant was set: header (foreign → 403, on a public route no tenant) → cookie (no active membership → ignored and cleared) → the only active membership; several and no selection → no tenant. Not `lt-tenant` (nuxt-extensions' app cookie, one host behind `apiProxy`). Implementation: `core-tenant-selection.helper.ts`, `CoreTenantGuard.completeTenantSelection()` |
|
|
339
339
|
| GraphQL Subscription Re-check | `graphQl.subscriptionRevalidationMs` | Numeric — `0` = STRICTEST, `false` = off, invalid → default (a fifth shape: Family C's "invalid never means unbounded", but `0` asks for MORE checking, not less) | **30000 since 11.42.3.** Before, a WebSocket was authorized once, at the handshake, and every event and operation on it ran on that snapshot until the client reconnected. Every connection a `CoreModule` `onConnect` accepts is now registered (`registerWsConnection()`) and re-checked — at once when an invalidation names it (`CoreTenantGuard.invalidateUser()` / `invalidateTenant()` / `invalidateAll()`, `CoreUserService.setRoles()` and role/verification `update()`s, the legacy password reset, and Better-Auth deleting a session through `wsSessionRevocationPlugin()`), and otherwise before the next event or operation once the last check is older than this value. The check re-runs the handshake's own authentication (session store, Better-Auth JWT signature/expiry, or for legacy tokens `CoreAuthService.verifyJwt()` — signature/expiry, verified on the WebSocket since 11.42.3 — plus the device binding) and the tenant resolution; any difference in user id, roles, verification state or tenant scope closes the socket with **4403**, which the graphql-ws client retries — the user continues with current rights or is refused at the handshake. `0` re-checks on every event and operation (one session lookup each); `false` switches only the TIME-based check off, invalidations still apply. Process-local registry: an invalidation reaches other replicas only where a Redis broadcast carries it — the tenant guard's (memberships, tenants) and, since 12.1.1, the Better-Auth user mapper's (`invalidateUserCache()`: roles and verification of IAM users); everything else is bounded by the interval. A project that replaces `onConnect` through `graphQl.driver.subscriptions` must call `registerWsConnection()` itself to keep this. An HTTP stream (SSE) of a project's own registers with `registerHttpStream()` (12.11.0): re-checked in place like a WebSocket when its Better-Auth credential can be run again, ended on every re-check otherwise. Implementation: `common/helpers/graphql-ws-connection.helper.ts` |
|
|
340
340
|
| API Tokens | `apiTokens` | Boolean Shorthand + Presence Implies Enabled — absent = off | `prefix: 'ltt'`, `scopes: []` (vocabulary; empty = no token creatable, boot warning), `manageRole`: highest hierarchy role, `maxAssertionLifetimeSeconds: 900` (invalid → default, never unbounded — Family C), `rateLimit: { max: 600, windowSeconds: 60 }` per token (**on by default**, `false` disables; Redis-shared when configured), `userTokens: true`, `tenantTokens: true` (effective only with `multiTenancy`), `encryptionKey` → `SECRETS_ENCRYPTION_KEY` → dev default (boot FAILS in production/staging). Top-level, NOT under `multiTenancy`: user tokens must work without it. **Deny by default**: every guard refuses a token on a route without `@ApiTokenScopes()`, public routes included, via ONE shared function (`enforceApiTokenRoute`) called BEFORE each guard's public-route shortcut. USER tokens act as their user with global roles REMOVED (no admin bypass); TENANT tokens act with the lowest hierarchy role in their own tenant, and a route guarded ONLY by `S_SELF` / `S_CREATOR` refuses them (a tenant token is nobody's self — skipping those roles would grant for any target). A tenant token depends on no member, so it outlives an off-boarded or deleted tenant until the project calls `deleteAllForTenant()` or `CoreTenantService.purgeTenantData()`. The boot refuses a hierarchy in which that lowest role reaches `manageRole`. A prefixed credential that fails answers 401 on every route (not anonymous); `CoreBetterAuthMiddleware` skips prefixed credentials entirely, cookie fallback included. A password reset that ends the user's sessions ends their USER tokens too (legacy reset always; IAM reset while `betterAuth.emailAndPassword.revokeSessionsOnPasswordReset` is on), wired through `core-api-token.registry.ts` so neither reset path imports the optional module. Implementation: `src/core/modules/api-token/` |
|
|
341
341
|
| Offline Sync | `sync` | Boolean Shorthand + Presence Implies Enabled — absent = off | **Absent → nothing registered**: no route, no infrastructure model, no listener on the write paths. `true` / `{}` enables `GET /sync/{model}` (pull) and `POST /sync/{model}` (push) for every model whose CrudService carries `@SyncService({ model, createInput, updateInput })` and whose model is declared with `@PersistedModel({ sync: { roles, strategy } })`. Defaults: `path: 'sync'`, `pull: { defaultLimit: 200, maxLimit: 1000 (ceiling 1000), maxBytes: 1048576 }`, `push: { maxItems: 100 }`, `retention: { mutationsDays: 30, tombstonesDays: 90 }`, `hints: { debounceMs: 250 }`, `rateLimit: { pull: { max: 120, windowSeconds: 60 }, push: { max: 60, windowSeconds: 60 } }` per user (`false` switches both or one off; Redis-shared when configured). `cursorSecret` → `SECRETS_ENCRYPTION_KEY` → development default (boot FAILS in production/staging); changing it answers every cursor `410 invalid`. `pull.windowSeconds` (MongoDB only) overrides the derived window W: replica set or sharded — the server's `transactionLifetimeLimitSeconds` (60 when unreadable) + 30, standalone — 30; it must cover the longest time a write takes from its stamp until it is visible, a smaller one loses changes for good. **Operation roles are the model's** (`sync.roles.pull/create/update/delete`): the roles a project puts on its own routes never reach `/sync`, and an operation without roles is ADMIN only (boot warning). Every pull and push runs through the model's CrudService (`process()`, `securityCheck()`, tenant policy, RLS). Without `X-Tenant-Id` a request spans the caller's memberships. Cookie pushes need `Content-Type: application/json`; while cookies are in use `Sec-Fetch-Site: cross-site` and an untrusted `Origin` answer 403. API tokens are refused unless a project controller releases a scope. Error codes `LTNS_0700`–`LTNS_0799`. **Hints (12.x, DEV-3902)**: `GET /sync/hints` (Server-Sent Events, event `change`, `?models=` narrows) and the GraphQL subscription `syncHint(models)` tell a client "pull now" — payload `{ model, at }` only, never content or ids. Sent from `CrudService.create()` / `update()` / `delete()` of a synchronized model (`CoreSyncService.notifyChange()` for a write past the CrudService), at most one per model and tenant per `hints.debounceMs`; received only by a subscriber with the model's pull roles and access to the tenant. With `redis` every replica's subscribers receive them (`<keyPrefix>:sync:hints`), without it only this replica's. A stream is registered like a WebSocket (`registerWsConnection()`). Opened with a Better-Auth credential (session cookie, bearer session token or JWT, `lt-jwt-token` cookie) it is re-checked IN PLACE since 12.11.0 — the credential and the tenant resolution run again (`createHttpStreamReauthenticator()`, `recheckHttpStreamInPlace()`), unchanged rights keep the stream open and the hint is delivered without a reconnect, changed rights close it; switched only when the credential, run once at open, answers the guards' user with the same fingerprint and tenant scope. Otherwise (legacy JWT, API token) it ENDS on every invalidation or re-check and the client reconnects with its current rights. `CoreSyncService.recheckHintStreamInPlace()` is the override point. `hints: false` switches both channels off, `hints.sse` / `hints.graphql: false` one; no hint is a correctness signal — a missed one is caught by the next pull. **Tombstone purge**: tombstones older than `retention.tombstonesDays` (90; `false` keeps them for good, an invalid value → 90) are hard-deleted every hour on one replica (lease: Redis → the default SQL source's `lt_locks` → `cron-locks`), after the retention horizon moved past them — a client whose cursor predates the horizon answers `410 horizon`. `purgeTombstones()` runs it by hand. **Data migrations** of a synchronized table go through `runSqlMigration()` with `{ syncUpdate: { table, set, where } }`, which raises `version` and numbers the rows like a store write. **Client duties** (delete local data on logout and account switch, no token in `localStorage`, no cached API responses): `src/core/modules/sync/SECURITY.md`; reference test clients (PWA on IndexedDB, Node on SQLite) in `tests/clients/`. Overrides: `CoreModule.forRoot(env, { sync: { controller, hintsController, resolver, service } })` — the hints route is a controller of its own, registered before the pull route, because a project controller re-declaring `pull()` (`@Get(':model')`) would otherwise read `hints` as a model name. The purge deletes in batches of 1000 by id (one `DELETE … WHERE deleted_at < ?` locks every row it scans on MySQL / MariaDB). Implementation: `src/core/modules/sync/` (README, INTEGRATION-CHECKLIST), protocol `docs/offline-sync-protocol.md` |
|
|
@@ -351,7 +351,7 @@ This pattern is currently applied to:
|
|
|
351
351
|
| S3 Connection Pool & Download Guard | `s3.maxSockets`, `s3.connectionTimeoutMs`, `s3.socketTimeoutMs`, `s3.downloadIdleTimeoutMs`; `file.downloadIdleTimeoutMs`, `file.downloadCaching` | Numeric — invalid → default, never off (Family C without opt-out) + Explicit Enum | **12.8.9, after a production outage**: S3 downloads delivered with a bare `stream.pipe(res)` kept their sockets when clients aborted; after 50 the SDK's pool was full, every S3 request waited forever (health check green), heap OOM hours later. Since then: `CoreS3Service` builds its client with OWN agents (`maxSockets` **200**, keep-alive), `connectionTimeout` **15 000** per attempt (the SDK starts it when the request is CREATED, so it also bounds the wait for a free socket — a short value fails healthy downloads under load; the SDK retries a timed-out attempt, 3 attempts in all, so a download that gets no socket answers **503** + `Retry-After: 5` after about 46 s — keep 3 × the value below the reverse proxy's read timeout, commonly 60 s), `socketTimeout` **120 000** (inactivity backstop for every request, uploads and copies included). The SDK's `requestTimeout` stops at the headers and its socket timeout destroys the body WITH an error (a process crash without a listener), so the real guard is `guardIdleStream()` (`common/helpers/idle-stream.helper.ts`): every stream from `getObject()` (`s3.downloadIdleTimeoutMs`, 30 000) and from `CoreFileService.getFileStream()` / `getFileStreamByName()` (`file.downloadIdleTimeoutMs`, 30 000 — GridFS cursors, file handles) is destroyed after that long WITHOUT READ PROGRESS, measured on the consumer side (`_read`) and at the source; a slow reader that keeps reading is never cut off; code that opens a stream and reads it LATE (an archive appending every file first) breaks — per call `downloadIdleTimeoutMs: false` (`FileServiceOptions`) / `getObject(key, { idleTimeoutMs: false })` opts out. `pipeFileToResponse()` destroys the source when the client goes — the response's `close`, the request's `close` (before its end and while the response is unfinished — Node closes a request whose body was read to the end by itself, a POST export stays deliverable) or the socket's `end`/`close`: measured under a k6 abort storm, about one in six aborted downloads never got a `close` on the response and reported it only through the request or the socket — and at once when it had ALREADY gone (`isResponseGone()`: response destroyed/closed OR request destroyed before its end OR socket destroyed; a client that gave up while waiting for a socket — the avalanche path); the routes pass an `abortSignal` (`downloadAbortSignal()`, exported: the same client-gone signals) down to `GetObjectCommand` and open the stream through `openDownloadStream()` (exported since 12.9.2 for a project's own routes): no store request for a gone client, `RESPONSE_GONE` instead of an ERROR when the store request failed because the client left (an aborted S3 request rejects with `AbortError`), a late stream destroyed, `TimeoutError` → 503 + `Retry-After`. An exhausted pool is logged as an ERROR once per minute with numbers (`getSocketPoolStats()` exposes them); deliberately NOT a health-check failure. `file.downloadCaching`: `'none'` (default, `private, no-store`) or `'revalidate'` (`private, no-cache` — the browser revalidates every use, `304` after the rights check without a store read); both send a WEAK `ETag` `W/"<id>"` (bytes under an id never change, but a `compression` middleware sends a gzip and an identity representation of the same file — RFC 9110 §8.8.3 forbids one strong validator for both; `If-None-Match` compares weakly) and `Content-Length`. The reference `src/main.ts` uses `compression.filter` (no gzip for JPEG/PNG/PDF/ZIP). Pinned by `tests/unit/idle-stream.spec.ts`, `tests/unit/core-file.controller.spec.ts`, `tests/unit/download-idle-opt-out.spec.ts` and `tests/s3-download-resilience.e2e-spec.ts` (real RustFS: dropped streams, abort storm with bare `pipe()`, clients giving up while waiting, 500 parallel downloads with `maxSockets: 4`, slow reader; mutations `idle-guard-*`, `s3-get-object-*`, `pipe-file-to-response-*`, `download-route-keeps-late-stream`, `file-stream-drops-idle-opt-out`). Implementation: `core-s3.service.ts`, `core-file.controller.ts`, `core-file.service.ts` |
|
|
352
352
|
| TUS S3 Staging | `tus.s3Staging` | Explicit Boolean (default ON when S3 configured) | `true` when `s3` is configured, otherwise inert. Stages in-progress uploads in `s3.stagingBucket` via `@tus/s3-store` instead of `tus.uploadDir` on local disk, so resumable uploads survive replica restarts and need no sticky sessions. Set `false` to force local disk. Missing OPTIONAL peer `@tus/s3-store` → warning + fall back to local disk (NOT a boot failure). **Give the staging bucket a lifecycle rule expiring incomplete multipart uploads** — the framework's own expiration cleanup is skipped in S3 mode (S3 is the right place for that policy), so aborted uploads otherwise accumulate parts nothing removes |
|
|
353
353
|
| TUS Configuration Source, Path & Extensions | `tus` (server config) / `TusModule.forRoot({ config })` | Enabled by Default + explicit-config-wins | **Since 11.42.9 `TusModule.forRoot()` without `config` reads the server config's `tus` key** (`ConfigService.get('tus')`, the zero-config rule `CoreBetterAuthModule.forRoot()` follows); an explicit `config` wins. Before, the key was never read: `tus: false`, `allowedTypes`, `maxSize`, `roles` in `config.env.ts` did nothing — real projects had upload restrictions they believed were enforced. **`path`** has three readings (`applyPath()`): unset → follows the controller's route; a new route (`/uploads`) → mounts the registered controller there (writes `PATH_METADATA`, config wins like the roles; the declared route is remembered per class and restored by a later `forRoot()` without `path`); a path ENDING with the controller's route (`/api/tus`, `/files/tus`) → the PUBLIC URL: the controller stays and upload URLs use it. The third reading is load-bearing: it was the only working setting under a global prefix or a prefix-stripping proxy before 11.42.9, and treating it as a route doubled the prefix (`/api/api/tus`, 404 on every upload — caught in the second pre-release review). The upload URL (`Location`) is built from the path the creation request arrived at (`uploadCollectionPath(req)`), or from `path` when that is longer and ends with it (proxy strip); `@tus/server` built it from `path` alone, which broke every resume below a global prefix, a URI version or a project route. **`relativeLocation`** (new): the framework owns `generateUrl`, which takes precedence over `@tus/server`'s option of that name, so it is honoured from `tus.relativeLocation` AND from the tus server's own options (a vendored core may pass it there). **Extensions**: `@tus/server` consults no flag, so `creation`, `creationWithUpload` and `termination` are enforced by `CoreTusService` — the store's advertised `extensions` are narrowed, and `assertExtensionEnabled()` answers 501 inside the server's `onIncomingRequest` / `onUploadCreate` options (not in the overridable hook, so an override without `super` cannot reopen it). `checksum` / `concatenation` have no effect: neither built-in store supports them. `configure(false)` now yields a DISABLED config (before it kept the defaults and started a tus server behind a module with no endpoint). Implementation: `tus.module.ts`, `core-tus.service.ts` |
|
|
354
|
-
| Health Check | `healthCheck` | Presence Implies Enabled | Absent → no endpoints. Any object registers `GET /health-check` + the `healthCheck` query; **`enabled: false` leaves them out (honoured since 11.42.9 — before, it was declared and ignored)**. Individual checks under `configs.*` each have their own `enabled`. **Readiness (12.11.0): `healthCheck.readiness`, Boolean Shorthand + Presence Implies Enabled — absent = no readiness route, the health check exactly as before.** `true` / `{}` registers `GET /health-check/ready` (public, REST only, its own controller `CoreHealthCheckReadinessController`, so without it the route does not exist: 404) with the default checks `['database', 'build']`; `readiness.checks` lists the checks of `configs` it runs (`database` — MongoDB ping and every SQL source —, `memoryHeap`, `memoryRss`, `storage`, `build`; a comma-separated string as `NSC__HEALTH_CHECK__READINESS__CHECKS` gives it; unknown names ignored with one warning; not a list or string → the defaults; `[]` → only project indicators), with key, thresholds and options from `configs.<check>` and whatever `configs.<check>.enabled` says (that flag decides for liveness). `false` / `{ enabled: false }` registers nothing. 200 while every check is up, 503 when one is down, and `shutting_down` from the first shutdown signal on when `installGracefulShutdown()` handles it (it marks the shutdown before its `shutdownDelayMs` wait — `shutdown-state.helper.ts`, mutations `readiness-ignores-shutdown`, `graceful-shutdown-skips-drain-mark`); Terminus' own state alone comes only inside `app.close()`. **Project checks**: extend `CoreHealthCheckService`, override the protected `additionalHealthIndicators(kind: 'liveness' \| 'readiness')` (default `[]`, may be async) and return Terminus indicators; register the subclass with `CoreModule.forRoot(env, { healthCheck: { service } })` (`readinessController` replaces the readiness controller). `CoreHealthCheckModule` imported as it is stays the pre-12.11.0 module; `CoreHealthCheckModule.forRoot()` adds the readiness controller and the service override (a dynamic module extends the static metadata, so the liveness controller is never registered twice). Pinned by `tests/unit/health-check-readiness.spec.ts`, `tests/unit/core-module-signatures.spec.ts`. Implementation: `core.module.ts`, `modules/health-check/` (`resolveHealthCheckReadiness()` in `core-health-check.helpers.ts`) |
|
|
354
|
+
| Health Check | `healthCheck` | Presence Implies Enabled | Absent → no endpoints. Any object registers `GET /health-check` + the `healthCheck` query; **`enabled: false` leaves them out (honoured since 11.42.9 — before, it was declared and ignored)**. Individual checks under `configs.*` each have their own `enabled`. **Database ping (12.14.0):** `configs.database.options.timeout` (ms) bounds the MongoDB ping and every SQL source; default 2000 (`DEFAULT_DATABASE_PING_TIMEOUT_MS`; before: 300 ms for MongoDB without options, otherwise 1000 ms, SQL 1000 ms). The MongoDB ping is the core's own (`CoreHealthCheckService.pingMongoDb()`): a real `ping` that waits for the driver's server selection, WITHOUT Terminus' `readyState` gate, which reported a reachable replica set as down whenever the driver briefly saw no primary (Mongoose sets `disconnected` then) — more than 95 % of all "database down" alarms on a cluster with managed replica sets. Connection: `options.connection`, else the injected `@InjectConnection()` (property, so subclasses keep it). Pinned by `tests/unit/health-check-mongo-ping.spec.ts` (mutations `health-check-mongo-ping-*`). **Readiness (12.11.0): `healthCheck.readiness`, Boolean Shorthand + Presence Implies Enabled — absent = no readiness route, the health check exactly as before.** `true` / `{}` registers `GET /health-check/ready` (public, REST only, its own controller `CoreHealthCheckReadinessController`, so without it the route does not exist: 404) with the default checks `['database', 'build']`; `readiness.checks` lists the checks of `configs` it runs (`database` — MongoDB ping and every SQL source —, `memoryHeap`, `memoryRss`, `storage`, `build`; a comma-separated string as `NSC__HEALTH_CHECK__READINESS__CHECKS` gives it; unknown names ignored with one warning; not a list or string → the defaults; `[]` → only project indicators), with key, thresholds and options from `configs.<check>` and whatever `configs.<check>.enabled` says (that flag decides for liveness). `false` / `{ enabled: false }` registers nothing. 200 while every check is up, 503 when one is down, and `shutting_down` from the first shutdown signal on when `installGracefulShutdown()` handles it (it marks the shutdown before its `shutdownDelayMs` wait — `shutdown-state.helper.ts`, mutations `readiness-ignores-shutdown`, `graceful-shutdown-skips-drain-mark`); Terminus' own state alone comes only inside `app.close()`. **Project checks**: extend `CoreHealthCheckService`, override the protected `additionalHealthIndicators(kind: 'liveness' \| 'readiness')` (default `[]`, may be async) and return Terminus indicators; register the subclass with `CoreModule.forRoot(env, { healthCheck: { service } })` (`readinessController` replaces the readiness controller). `CoreHealthCheckModule` imported as it is stays the pre-12.11.0 module; `CoreHealthCheckModule.forRoot()` adds the readiness controller and the service override (a dynamic module extends the static metadata, so the liveness controller is never registered twice). Pinned by `tests/unit/health-check-readiness.spec.ts`, `tests/unit/core-module-signatures.spec.ts`. Implementation: `core.module.ts`, `modules/health-check/` (`resolveHealthCheckReadiness()` in `core-health-check.helpers.ts`) |
|
|
355
355
|
| Cron Job Deduplication | per job: `distributed` in `CronJobConfig` | Explicit Boolean | **`true` when `redis` is configured, otherwise `false`** — a single-replica project that upgrades must not silently gain a `cron-locks` collection, a lease write per tick, and a new way for a tick to be skipped. A Redis-less multi-replica fleet opts in per job with `distributed: true` (lease in the SQL lease table of the default source, else in MongoDB). Mechanism: BullMQ job scheduler when Redis + the OPTIONAL peer `bullmq` are present AND `cronTime` is a string without `utcOffset`; otherwise local timer + lease (Redis `SET NX`, else the SQL lease table of the default source (`lt_locks`), else a TTL-indexed `cron-locks` document). Tick lease TTL 3600 s. **Leases fail open** — an unreachable lease store runs the tick everywhere rather than stopping all scheduled work fleet-wide. **`runOnInit` (default `true`) deduplicates over a FIXED per-job key with a 300 s TTL**, because replicas do not share a boot instant: replicas booting within 5 min run the startup tick once between them, and a replica restarting inside that window SKIPS its startup tick — set `distributed: false` on jobs whose `runOnInit` work is per-process (warming a process-local cache). No constructor change needed: `CoreModule` fills `core-cron-jobs.registry.ts` via `CoreCronJobsInitializer` and `CoreCronJobs` reads it lazily; explicit `{ connection, redisService }` in `CoreCronJobsOptions` wins. With neither source it warns once and every replica runs every tick. **A BullMQ schedule lost in Redis comes back (12.1.1+)**: `upsertJobScheduler` writes it once at bootstrap, and a Redis restart without persistence, a FLUSHDB or an eviction removed it with nothing re-registering it, so no replica ran the job until the next deploy. `restoreBullSchedulers()` now runs after every `ready` of the queue connection and every `bullSchedulerCheckIntervalMs` (protected, 60000; `0` switches only the timer off) and registers the schedules the queue's listing (`getJobSchedulers()`) no longer contains, with a warning — the listing, because `getJobScheduler()` does not exist before bullmq 5.23 and answers a deleted scheduler with an object up to 5.40.2, both inside the peer range. Only MISSING ones: an upsert of an existing scheduler removes its last planned job even when it is due and waits for a free worker, so a blind periodic upsert would drop that tick. A scheduler `removeStaleBullSchedulers()` removed on purpose carries a `cron-scheduler-removed:<job>` key, so a replica of the previous version still running in a rolling deploy does not bring it back (a job moved to a local timer would otherwise run twice per tick); the next BullMQ registration of that job deletes the key, and a real data loss takes it along. Only the schedule comes back (no second `runOnInit`, no second registry entry); a tick that fell due while it was missing is not run. **Changing a schedule at runtime (12.11.0): `rescheduleCronJob(name, schedule)`**, public — a cron expression or date (time zone / UTC offset kept) or `{ cronTime, timeZone }` / `{ cronTime, utcOffset }`; validated first (an invalid expression, an unknown zone or a past date rejects, the job stays as it was); calls run one after the other; rejects for a job that is not registered (unknown, disabled, before bootstrap, after shutdown). Only the schedule changes: `distributed`, `runParallel`, `throwException`, the leases and `bullJobOptions` stay. Local timer: the timer is replaced, a distributed tick leases on the NEW schedule's instant, a recurring job the Hub stopped stays stopped, `runOnInit` is not repeated. BullMQ: the scheduler is upserted with the new pattern and `bullJobOptions` — skipped when Redis already holds exactly that pattern and time zone, so N replicas calling it plan no tick twice —, the Hub's registry entry is replaced, and `restoreBullSchedulers()` restores the NEW schedule; Redis refusing the upsert rejects and keeps the old schedule. A schedule BullMQ cannot express (a date, a UTC offset) moves the job to a local timer with lease and removes its scheduler WITH the `cron-scheduler-removed:<job>` marker (marker first), so replicas still scheduling it through BullMQ do not restore it; a cron expression moves it back and deletes the marker. A BullMQ schedule changes fleet-wide, a local timer per process — call it on every replica; it is not stored, the next bootstrap schedules from the configuration (re-apply after `super.onApplicationBootstrap()`). Pinned by `tests/unit/core-cron-jobs-reschedule.spec.ts`. **Since 12.1.1 (DEV-3896)**: (1) a timer job's tick lease is keyed on the tick's SCHEDULED instant, captured from `nextDate()` when the job is armed and after each scheduled fire, and moved forward through the schedule to the last instant at or before the fire when the job did not fire for a while (stopped and started in the Hub; not for a `utcOffset` job) — cron 4 sets `lastDate()` to the moment its timer fired, so two replicas firing on either side of a second boundary computed different keys and both ran the tick. A fire that does not advance `lastDate()` is a manual run (the Hub's "Run now") with a key of its own, also on a job stopped in the Hub. (2) `runParallel: false` (or `1`) holds across replicas for a distributed job, in timer and BullMQ mode: the run holds a `<job>:running` lease (60 s, renewed every 20 s, released in `finally`; Redis — owner-checked renew and release —, else the SQL lease table, else `cron-locks`), and a replica that finds it held skips its tick; fail-open like the tick lease. A run that never ends therefore holds the job on EVERY replica while its process lives, not only on its own. A larger `runParallel` stays per process. (3) A failed TTL index on `cron-locks` is tried again on the next tick instead of being cached as done. (4) Without `redis`, startup logs ONE info line naming the jobs that run on every replica because they did not set `distributed` (silent with `log: false`, and for jobs that set `distributed: false`). (5) BullMQ scheduler jobs carry `bullJobOptions` (protected): `attempts: 1` — a failed tick is not repeated, as with the local timer —, `removeOnComplete: { count: 100 }`, `removeOnFail: { count: 500 }`; before, every completed and failed tick stayed in Redis for good. Existing schedulers get them at the next bootstrap, which upserts every scheduler — after `trimBullJobBacklog()` has removed the backlog an earlier version kept, oldest first, 1000 jobs per `clean()` call: BullMQ trims by `count` in one Lua call without a limit, and the first tick under the new options would otherwise delete the whole backlog at once (measured 2 s for 300k jobs, 4.4 s for 700k, with Redis answering nobody) |
|
|
356
356
|
| Shutdown Delay | `shutdownDelayMs` | Numeric Sentinel — Family B (`0` = off) | `0` (default, no delay, no log). Waits N ms **in the SIGTERM/SIGINT handler, before `close()` is entered**, so a load balancer can finish deregistering while the instance still serves; from the signal on `GET /health-check/ready` answers 503 `shutting_down` (12.11.0, `markShutdownDraining()`), so a load balancer polling readiness starts deregistering at once. NOT a lifecycle hook: `close()` runs `onModuleDestroy` → `beforeApplicationShutdown` → dispose → `onApplicationShutdown`, so a delay in `beforeApplicationShutdown` would wait with every module already torn down while the socket still accepts — worse than no delay. **Requires `installGracefulShutdown(app)` in main.ts, which REPLACES `server.enableShutdownHooks()`** — keeping both makes Nest close the app in parallel with the wait, so the delay silently never happens. At delay `0` the helper IS `enableShutdownHooks()`. **Keep the value well below the orchestrator grace period AND leave room for the drain that follows**: Compose `stop_grace_period` 10s, Kubernetes `terminationGracePeriodSeconds` 30s, and `installProcessDiagnostics()` force-exits after 30s — exceed any and the process is SIGKILLed mid-wait with no hook running. Warns above `10000`, capped at `60000`. Non-numeric / negative values behave like `0` |
|
|
357
357
|
| Body Parser Limits | `bodyParser.json.limit`, `bodyParser.urlencoded.limit` | Explicit Value (Express/body-parser default) — invalid → default, never unbounded | **Unset = 100 kB each, exactly as NestJS registers the parsers** (body-parser's own default — a limit nobody chose, and before 11.42.4 the only one in force: over it a request got a bare `request entity too large`, before auth and routing, GraphQL included). A number is bytes, a string a 1024-based size (`'500kb'`, `'2mb'`, units `b`/`kb`/`mb`/`gb`). The two limits are separate on purpose — raising JSON must not raise form posts. **Not raised by default because the parser runs before authentication** and `JSON.parse` blocks the event loop for the whole body: ~0.5 ms for 100 kB, ~16 ms for 1 MB, ~55 ms for 2 MB per request on a realistic document shape. Applied by `CoreBodyParserInitializer` (CoreModule provider) in `onModuleInit` by **swapping the handle of the global `jsonParser`/`urlencodedParser` layers NestJS registered, in place** — NestJS registers them inside `app.init()` before any init hook, and a parser appended later would sit behind the routes. Same position, `extended: true` for URL-encoded, `req.rawBody` kept when the app came from `NestFactory.create(…, { rawBody: true })` (read from the container's context options; under `Test.createTestingModule()` those options never reach the container, so a test app with `rawBody: true` gets no `req.rawBody` from a CONFIGURED parser). Because it runs during module init it **holds under `Test.createTestingModule()`**, which never runs `main.ts` — the reason a `useBodyParser()` in `main.ts` was not enough. A configured value also replaces a global parser registered in `main.ts`; a **path-scoped** one (`server.use('/upload', json({ limit }))`) is left alone and stays the way to give one path its own limit (the parser runs before routing; GraphQL shares one path). **Keep `server.useBodyParser('json')` in `main.ts` next to a path-scoped parser**: NestJS registers its global parser only when no layer with the same FUNCTION NAME exists (`isMiddlewareApplied()`), so a path-scoped `json()` registered before `app.init()` suppresses it and every other path gets an empty body (a sign-in fails with a validation error). Since 11.42.6 the initializer warns at boot about exactly that (`warnMissingGlobalParser()`). It deliberately does not re-insert the parser: NestJS would have placed it after everything `main.ts` registered, a position no longer knowable during module init, and a raw-body webhook or proxy registered after the path-scoped parser must keep seeing the unread stream. An invalid value (`0`, negative, `NaN`, a word) is refused with an error log and the parser keeps its limit. **Independent of configuration**, every 413 from a global parser is answered as `PayloadTooLargeException` with `#LTNS_0304: Request body too large [<n> bytes, limit <m> bytes]` (size only when a `Content-Length` was sent) and logged as a WARN naming method, path without query string, and the config key — no boot warning, because the framework cannot know which routes expect large bodies; the first oversized request is the earliest point anything can be said. Other parser errors pass through unchanged. Pinned by `tests/unit/body-parser.spec.ts` and `tests/body-parser.e2e-spec.ts` (mutations `body-parser-*`). Implementation: `common/services/core-body-parser.initializer.ts` |
|
|
@@ -181,7 +181,7 @@ by the ws maintainers on 2026-11-12 and was not yet in GitHub's global database
|
|
|
181
181
|
`pnpm audit` did not report it — read the advisories of a package's own repository when a release announces a
|
|
182
182
|
security fix. It left in 12.12.0, once `@nestjs/graphql` 14.2.2 pinned ws 8.23.0 itself (two fresh resolves with and
|
|
183
183
|
without the entry: identical package set, one `ws@8.23.0`). `check:overrides` could not report it as UNUSED: every
|
|
184
|
-
edge resolved to the override's target either way, so only the with/without resolve shows such an entry is inert. From 12.10.0 to 12.10.1 a second entry, `minimatch` 11 -> 11.0.9: `@nestjs/cli` 12.0.13 exact-pins 11.0.5, covered by three moderate advisories (dev tooling only; the target is the newest 11.x, because an older one held every other `^11` consumer back). It left in 12.11.0, once `@nestjs/cli` 12.0.15 pinned 11.0.9 itself. Since 12.10.0 the set holds `i18next` 26 -> 26.4.4 (its only entry since 12.12.0): `@compodoc/compodoc` 2.0.0 exact-pins 26.3.3, covered by two advisories (dev tooling only); GHSA-6jcc is in GitHub's global database since 2026-11-23, GHSA-5jr9 was still repository-only at 12.12.0. Since 12.12.2 the target is 26.7.2, the newest 26.x, as in nest-server-starter: the oldest-that-clears target held a generated project that hoists the starter's file and asks `^26` three minors back. An override is only necessary if removing it lets the package resolve
|
|
184
|
+
edge resolved to the override's target either way, so only the with/without resolve shows such an entry is inert. From 12.10.0 to 12.10.1 a second entry, `minimatch` 11 -> 11.0.9: `@nestjs/cli` 12.0.13 exact-pins 11.0.5, covered by three moderate advisories (dev tooling only; the target is the newest 11.x, because an older one held every other `^11` consumer back). It left in 12.11.0, once `@nestjs/cli` 12.0.15 pinned 11.0.9 itself. Since 12.10.0 the set holds `i18next` 26 -> 26.4.4 (its only entry since 12.12.0): `@compodoc/compodoc` 2.0.0 exact-pins 26.3.3, covered by two advisories (dev tooling only); GHSA-6jcc is in GitHub's global database since 2026-11-23, GHSA-5jr9 was still repository-only at 12.12.0. Since 12.12.2 the target is 26.7.2, the newest 26.x, as in nest-server-starter: the oldest-that-clears target held a generated project that hoists the starter's file and asks `^26` three minors back. Since 12.14.0 a second entry, `minimatch` 11 -> 11.0.10: GHSA-3924-r96c-gp9w (low, 11.0.6 to 11.0.9) reached GitHub's global database on 2026-12-04, and `@nestjs/cli` 12.0.15 as well as `@ts-morph/common` (production path via ts-morph) resolve 11.0.9; target 11.0.10, the newest 11.0.x, as in nest-server-starter. An override is only necessary if removing it lets the package resolve
|
|
185
185
|
back INTO its vulnerable range (verify with a with/without lockfile diff; `pnpm audit` is the arbiter).
|
|
186
186
|
"Cheap insurance against a parent re-pinning downwards" is not a reason to keep one: `pnpm audit` and
|
|
187
187
|
`check:overrides` run on every `check` and report such a regression the day it happens. Each surviving entry carries its CVE rationale as a comment. Remove an entry once its parent dependency ships a fixed version.
|
package/.claude/rules/testing.md
CHANGED
|
@@ -418,7 +418,7 @@ pnpm run check:mutations -- --id=<id> # one mutation
|
|
|
418
418
|
pnpm run check:mutations -- --list # the registry, without running anything
|
|
419
419
|
pnpm run check:mutations -- --allow-dirty # when the fix and its evidence share a working tree
|
|
420
420
|
pnpm run check:mutations -- --jobs=4 # N mutations at a time (default: 2, or 4 on >=12 cores)
|
|
421
|
-
pnpm run check:mutations -- --no-infra # only the
|
|
421
|
+
pnpm run check:mutations -- --no-infra # only the 550 that need no MongoDB
|
|
422
422
|
pnpm run check:mutations -- --since=<ref> # only mutations touching files changed since <ref>
|
|
423
423
|
pnpm run check:mutations -- --shard=2/4 # this job's quarter of the selection (CI splits the full run)
|
|
424
424
|
```
|
|
@@ -438,7 +438,7 @@ when the registry, a vitest config or a setup file changed, since those can move
|
|
|
438
438
|
commit, and in CI alongside the publish without blocking it. The price of caching is a cache that
|
|
439
439
|
has to model each spec's full dependency closure correctly, and getting that wrong produces a stale
|
|
440
440
|
PASS for a test that has since gone vacuous — exactly what the gate is there to prevent. Bad trade
|
|
441
|
-
at
|
|
441
|
+
at 809 mutations.
|
|
442
442
|
|
|
443
443
|
**Decided 2026-10-03 (repo owner): keep the full run.** Measured at 128 mutations, the CI job for
|
|
444
444
|
11.41.6 took **14 minutes**. The trigger to revisit is that wall time, not the mutation count —
|
|
@@ -511,7 +511,7 @@ exactly the environment where the answer matters.
|
|
|
511
511
|
|
|
512
512
|
Worth knowing before optimising the wrong thing: the specs behind all 259 e2e mutations add up to
|
|
513
513
|
**~40 seconds**. The step takes ~740s. The remaining ~700s is paying vitest's startup — process
|
|
514
|
-
spawn, transform, module graph, mongod connect, DB create and drop — once per mutation,
|
|
514
|
+
spawn, transform, module graph, mongod connect, DB create and drop — once per mutation, 809 times.
|
|
515
515
|
That work is largely single-threaded I/O and barely scales with cores: the full registry measures
|
|
516
516
|
**744s on a 12-core laptop and 777s on a 4-vCPU CI runner**.
|
|
517
517
|
|
package/FRAMEWORK-API.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# @lenne.tech/nest-server — Framework API Reference
|
|
2
2
|
|
|
3
|
-
> Auto-generated from source code as of 2026-12-
|
|
3
|
+
> Auto-generated from source code as of 2026-12-04 (v12.14.0)
|
|
4
4
|
> File: `FRAMEWORK-API.md` — compact, machine-readable API surface for Claude Code
|
|
5
5
|
|
|
6
6
|
## CoreModule.forRoot()
|
|
@@ -90,6 +90,7 @@ When `passkey` is enabled, `trustedOrigins` is required (compile-time enforcemen
|
|
|
90
90
|
- `additionalMembershipRoles?`: `string[]` (default: `[]`) — Membership roles that are valid but carry no hierarchy level (exact-match roles).
|
|
91
91
|
- `cacheTtlMs?`: `number` (default: `30000 (30 seconds)`) — TTL in milliseconds for the tenant guard's in-memory membership cache.
|
|
92
92
|
- `isTenantActive?`: `(tenantId: string, context: { connection: Connection; store: (modelName: stri...` (default: `undefined (every tenant is active)`) — Whether a tenant may be used at all — the hook that makes a DEACTIVATED tenant stop working.
|
|
93
|
+
- `selectionCookie?`: `boolean | IMultiTenancySelectionCookie` (default: `undefined (off)`) — A cookie the API sets to remember the tenant a browser last selected, for requests that cannot
|
|
93
94
|
|
|
94
95
|
### IErrorCode
|
|
95
96
|
|
|
@@ -1,12 +1,17 @@
|
|
|
1
1
|
export declare const DEFAULT_COMMIT_ENV = "APP_VERSION_COMMIT";
|
|
2
|
+
export declare const DEFAULT_BUILD_ENV = "APP_VERSION_BUILD";
|
|
2
3
|
export declare const UNKNOWN_COMMIT = "unknown";
|
|
3
4
|
export interface BuildInfo {
|
|
5
|
+
build?: string;
|
|
4
6
|
commit: string;
|
|
5
7
|
env?: string;
|
|
6
8
|
version?: string;
|
|
7
9
|
}
|
|
8
10
|
export declare function getCommit(envName?: string): string;
|
|
11
|
+
export declare function getBuild(envName?: string): string | undefined;
|
|
12
|
+
export declare function composeVersion(version: string, build?: null | string): string;
|
|
9
13
|
export declare function getBuildInfo(options?: {
|
|
14
|
+
buildEnvName?: string;
|
|
10
15
|
commitEnvName?: string;
|
|
11
16
|
env?: string;
|
|
12
17
|
version?: string;
|
|
@@ -1,16 +1,31 @@
|
|
|
1
1
|
import { existsSync, readFileSync } from 'fs';
|
|
2
2
|
import { join } from 'path';
|
|
3
3
|
export const DEFAULT_COMMIT_ENV = 'APP_VERSION_COMMIT';
|
|
4
|
+
export const DEFAULT_BUILD_ENV = 'APP_VERSION_BUILD';
|
|
4
5
|
export const UNKNOWN_COMMIT = 'unknown';
|
|
5
6
|
let cachedVersion;
|
|
6
7
|
export function getCommit(envName = DEFAULT_COMMIT_ENV) {
|
|
7
8
|
return process.env[envName] || UNKNOWN_COMMIT;
|
|
8
9
|
}
|
|
10
|
+
export function getBuild(envName = DEFAULT_BUILD_ENV) {
|
|
11
|
+
const build = (process.env[envName] || '').trim();
|
|
12
|
+
return /^\d+$/.test(build) ? build : undefined;
|
|
13
|
+
}
|
|
14
|
+
export function composeVersion(version, build) {
|
|
15
|
+
const buildNumber = (build ?? '').trim();
|
|
16
|
+
const match = /^(\d+)\.(\d+)/.exec(version);
|
|
17
|
+
if (!match || !/^\d+$/.test(buildNumber)) {
|
|
18
|
+
return version;
|
|
19
|
+
}
|
|
20
|
+
return `${match[1]}.${match[2]}.${buildNumber}`;
|
|
21
|
+
}
|
|
9
22
|
export function getBuildInfo(options = {}) {
|
|
23
|
+
const build = getBuild(options.buildEnvName);
|
|
10
24
|
return {
|
|
25
|
+
...(build ? { build } : {}),
|
|
11
26
|
commit: getCommit(options.commitEnvName),
|
|
12
27
|
env: options.env,
|
|
13
|
-
version: options.version || getVersion(),
|
|
28
|
+
version: composeVersion(options.version || getVersion(), build),
|
|
14
29
|
};
|
|
15
30
|
}
|
|
16
31
|
export function getVersion() {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"meta.helper.js","sourceRoot":"","sources":["../../../../src/core/common/helpers/meta.helper.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"meta.helper.js","sourceRoot":"","sources":["../../../../src/core/common/helpers/meta.helper.ts"],"names":[],"mappings":"AA2BA,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,IAAI,CAAC;AAC9C,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAG5B,MAAM,CAAC,MAAM,kBAAkB,GAAG,oBAAoB,CAAC;AAGvD,MAAM,CAAC,MAAM,iBAAiB,GAAG,mBAAmB,CAAC;AAGrD,MAAM,CAAC,MAAM,cAAc,GAAG,SAAS,CAAC;AAGxC,IAAI,aAAwC,CAAC;AAgC7C,MAAM,UAAU,SAAS,CAAC,UAAkB,kBAAkB;IAC5D,OAAO,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,IAAI,cAAc,CAAC;AAChD,CAAC;AAWD,MAAM,UAAU,QAAQ,CAAC,UAAkB,iBAAiB;IAC1D,MAAM,KAAK,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC;IAClD,OAAO,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC;AACjD,CAAC;AAYD,MAAM,UAAU,cAAc,CAAC,OAAe,EAAE,KAAqB;IACnE,MAAM,WAAW,GAAG,CAAC,KAAK,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC;IACzC,MAAM,KAAK,GAAG,eAAe,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAC5C,IAAI,CAAC,KAAK,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,WAAW,CAAC,EAAE,CAAC;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CAAC;YACH,CAAC;YACD,MAAM,MAAM,GAAG,IAAI,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC;YAC/B,IAAI,MAAM,KAAK,GAAG,EAAE,CAAC;gBACnB,MAAM;YACR,CAAC;YACD,GAAG,GAAG,MAAM,CAAC;QACf,CAAC;IACH,CAAC;IAAC,MAAM,CAAC;IAET,CAAC;IACD,OAAO,aAAa,IAAI,cAAc,CAAC;AACzC,CAAC"}
|
|
@@ -182,6 +182,11 @@ export interface IMultiTenancy {
|
|
|
182
182
|
connection: Connection;
|
|
183
183
|
store: (modelName: string) => DataStore<any>;
|
|
184
184
|
}) => boolean | Promise<boolean>;
|
|
185
|
+
selectionCookie?: boolean | IMultiTenancySelectionCookie;
|
|
186
|
+
}
|
|
187
|
+
export interface IMultiTenancySelectionCookie {
|
|
188
|
+
enabled?: boolean;
|
|
189
|
+
name?: string;
|
|
185
190
|
}
|
|
186
191
|
export interface IApiTokens {
|
|
187
192
|
enabled?: boolean;
|
|
@@ -19,7 +19,7 @@ import { buildContentDisposition } from '../../common/helpers/content-dispositio
|
|
|
19
19
|
import { StreamIdleTimeoutError } from '../../common/helpers/idle-stream.helper.js';
|
|
20
20
|
import { ConfigService } from '../../common/services/config.service.js';
|
|
21
21
|
import { ErrorCode } from '../error-code/error-codes.js';
|
|
22
|
-
import { SkipTenantCheck } from '../tenant/core-tenant.decorators.js';
|
|
22
|
+
import { ResolveTenantSelection, SkipTenantCheck } from '../tenant/core-tenant.decorators.js';
|
|
23
23
|
import { CoreFileService } from './core-file.service.js';
|
|
24
24
|
const fileStreamLogger = new Logger('CoreFileController');
|
|
25
25
|
const idleCloses = { afterResponseClose: 0, lastReportAt: 0, sample: '', total: 0, withOpenConnection: 0 };
|
|
@@ -408,6 +408,7 @@ CoreFileController = __decorate([
|
|
|
408
408
|
Controller('files'),
|
|
409
409
|
Roles(RoleEnum.ADMIN),
|
|
410
410
|
SkipTenantCheck(),
|
|
411
|
+
ResolveTenantSelection(),
|
|
411
412
|
__metadata("design:paramtypes", [CoreFileService])
|
|
412
413
|
], CoreFileController);
|
|
413
414
|
export { CoreFileController };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"core-file.controller.js","sourceRoot":"","sources":["../../../../src/core/modules/file/core-file.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,OAAO,EACL,mBAAmB,EACnB,UAAU,EACV,GAAG,EACH,aAAa,EACb,UAAU,EACV,MAAM,EACN,iBAAiB,EACjB,KAAK,EACL,GAAG,EACH,2BAA2B,GAC5B,MAAM,gBAAgB,CAAC;AAIxB,OAAO,EAAE,WAAW,EAAE,MAAM,mDAAmD,CAAC;AAChF,OAAO,EAAE,KAAK,EAAE,MAAM,4CAA4C,CAAC;AACnE,OAAO,EAAE,QAAQ,EAAE,MAAM,iCAAiC,CAAC;AAC3D,OAAO,EAAkB,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,2CAA2C,CAAC;AAChH,OAAO,EAAE,uBAAuB,EAAE,MAAM,oDAAoD,CAAC;AAC7F,OAAO,EAAE,sBAAsB,EAAE,MAAM,4CAA4C,CAAC;AACpF,OAAO,EAAE,aAAa,EAAE,MAAM,yCAAyC,CAAC;AACxE,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AACzD,OAAO,EAAE,eAAe,EAAE,MAAM,qCAAqC,CAAC;AACtE,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAGzD,MAAM,gBAAgB,GAAG,IAAI,MAAM,CAAC,oBAAoB,CAAC,CAAC;AAU1D,MAAM,UAAU,GAAG,EAAE,kBAAkB,EAAE,CAAC,EAAE,YAAY,EAAE,CAAC,EAAE,MAAM,EAAE,EAAE,EAAE,KAAK,EAAE,CAAC,EAAE,kBAAkB,EAAE,CAAC,EAAE,CAAC;AAC3G,MAAM,6BAA6B,GAAG,MAAM,CAAC;AAG7C,SAAS,mBAAmB,CAAC,KAAc;IACzC,OAAO,KAAK,YAAY,sBAAsB,I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,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;QAC9F,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,CAAC;YACpE,OAAO,KAAK,CAAC;QACf,CAAC;QACD,IAAI,CAAC,eAAe,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC;QAChC,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,CAAC;QACtB,OAAO,IAAI,CAAC;IACd,CAAC;IAcS,UAAU,CAAC,GAAa;QAChC,GAAG,CAAC,MAAM,CAAC,eAAe,EAAE,mBAAmB,CAAC,CAAC;IACnD,CAAC;CACF,CAAA;AApQO;IAFL,GAAG,CAAC,QAAQ,CAAC;IACb,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC;IAEnB,WAAA,KAAK,CAAC,IAAI,CAAC,CAAA;IACX,WAAA,GAAG,EAAE,CAAA;IACL,WAAA,WAAW,EAAE,CAAA;;;;qDAiEf;AAcK;IAFL,GAAG,CAAC,WAAW,CAAC;IAChB,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC;IAEnB,WAAA,KAAK,CAAC,UAAU,CAAC,CAAA;IACjB,WAAA,GAAG,EAAE,CAAA;IACL,WAAA,WAAW,EAAE,CAAA;;;;iDAoCf;AAtLmB,kBAAkB;IAHvC,UAAU,CAAC,OAAO,CAAC;IACnB,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC;IACrB,eAAe,EAAE;qCAK6B,eAAe;GAJxC,kBAAkB,CAiUvC"}
|
|
1
|
+
{"version":3,"file":"core-file.controller.js","sourceRoot":"","sources":["../../../../src/core/modules/file/core-file.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,OAAO,EACL,mBAA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C,UAAU,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,CAAC;YACpE,OAAO,KAAK,CAAC;QACf,CAAC;QACD,IAAI,CAAC,eAAe,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC;QAChC,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,CAAC;QACtB,OAAO,IAAI,CAAC;IACd,CAAC;IAcS,UAAU,CAAC,GAAa;QAChC,GAAG,CAAC,MAAM,CAAC,eAAe,EAAE,mBAAmB,CAAC,CAAC;IACnD,CAAC;CACF,CAAA;AApQO;IAFL,GAAG,CAAC,QAAQ,CAAC;IACb,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC;IAEnB,WAAA,KAAK,CAAC,IAAI,CAAC,CAAA;IACX,WAAA,GAAG,EAAE,CAAA;IACL,WAAA,WAAW,EAAE,CAAA;;;;qDAiEf;AAcK;IAFL,GAAG,CAAC,WAAW,CAAC;IAChB,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC;IAEnB,WAAA,KAAK,CAAC,UAAU,CAAC,CAAA;IACjB,WAAA,GAAG,EAAE,CAAA;IACL,WAAA,WAAW,EAAE,CAAA;;;;iDAoCf;AAtLmB,kBAAkB;IAJvC,UAAU,CAAC,OAAO,CAAC;IACnB,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC;IACrB,eAAe,EAAE;IACjB,sBAAsB,EAAE;qCAKsB,eAAe;GAJxC,kBAAkB,CAiUvC"}
|
|
@@ -15,7 +15,7 @@ import { CurrentUser } from '../../common/decorators/current-user.decorator.js';
|
|
|
15
15
|
import { Roles } from '../../common/decorators/roles.decorator.js';
|
|
16
16
|
import { RoleEnum } from '../../common/enums/role.enum.js';
|
|
17
17
|
import { GraphQLUpload } from '../../common/scalars/upload.scalar.js';
|
|
18
|
-
import { SkipTenantCheck } from '../tenant/core-tenant.decorators.js';
|
|
18
|
+
import { ResolveTenantSelection, SkipTenantCheck } from '../tenant/core-tenant.decorators.js';
|
|
19
19
|
import { CoreFileInfo } from './core-file-info.model.js';
|
|
20
20
|
import { CoreFileService } from './core-file.service.js';
|
|
21
21
|
let CoreFileResolver = class CoreFileResolver {
|
|
@@ -76,6 +76,7 @@ CoreFileResolver = __decorate([
|
|
|
76
76
|
Resolver(),
|
|
77
77
|
Roles(RoleEnum.ADMIN),
|
|
78
78
|
SkipTenantCheck(),
|
|
79
|
+
ResolveTenantSelection(),
|
|
79
80
|
__metadata("design:paramtypes", [CoreFileService])
|
|
80
81
|
], CoreFileResolver);
|
|
81
82
|
export { CoreFileResolver };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"core-file.resolver.js","sourceRoot":"","sources":["../../../../src/core/modules/file/core-file.resolver.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAClE,OAAO,EAAE,WAAW,EAAE,MAAM,mDAAmD,CAAC;AAChF,OAAO,EAAE,KAAK,EAAE,MAAM,4CAA4C,CAAC;AACnE,OAAO,EAAE,QAAQ,EAAE,MAAM,iCAAiC,CAAC;AAC3D,OAAO,EAAE,aAAa,EAAE,MAAM,uCAAuC,CAAC;AACtE,OAAO,EAAE,eAAe,EAAE,MAAM,qCAAqC,CAAC;
|
|
1
|
+
{"version":3,"file":"core-file.resolver.js","sourceRoot":"","sources":["../../../../src/core/modules/file/core-file.resolver.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAClE,OAAO,EAAE,WAAW,EAAE,MAAM,mDAAmD,CAAC;AAChF,OAAO,EAAE,KAAK,EAAE,MAAM,4CAA4C,CAAC;AACnE,OAAO,EAAE,QAAQ,EAAE,MAAM,iCAAiC,CAAC;AAC3D,OAAO,EAAE,aAAa,EAAE,MAAM,uCAAuC,CAAC;AACt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,EAAE,CAAA;;;;mDAGf;AAWK;IAFL,QAAQ,CAAC,GAAG,EAAE,CAAC,YAAY,CAAC;IAC5B,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC;IAEnB,WAAA,IAAI,CAAC,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,MAAM,EAAE,CAAC,CAAA;IAC9C,WAAA,WAAW,EAAE,CAAA;;;;kDAGf;AAOK;IAFL,QAAQ,CAAC,GAAG,EAAE,CAAC,YAAY,CAAC;IAC5B,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC;IAEnB,WAAA,IAAI,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,aAAa,EAAE,CAAC,CAAA;IACjD,WAAA,WAAW,EAAE,CAAA;;;;kDAGf;AAOK;IAFL,QAAQ,CAAC,GAAG,EAAE,CAAC,CAAC,YAAY,CAAC,CAAC;IAC9B,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC;IAEnB,WAAA,IAAI,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,CAAC,aAAa,CAAC,EAAE,CAAC,CAAA;IACpD,WAAA,WAAW,EAAE,CAAA;;;;mDAGf;AA5DU,gBAAgB;IAJ5B,QAAQ,EAAE;IACV,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC;IACrB,eAAe,EAAE;IACjB,sBAAsB,EAAE;qCAKqB,eAAe;GAJhD,gBAAgB,CA6D5B"}
|
|
@@ -63,6 +63,18 @@ export declare abstract class CoreFileService {
|
|
|
63
63
|
getBuffer(id: string | Types.ObjectId, serviceOptions?: FileServiceOptions): Promise<Buffer>;
|
|
64
64
|
getBufferByName(filename: string, serviceOptions?: FileServiceOptions): Promise<Buffer>;
|
|
65
65
|
deleteFile(id: string | Types.ObjectId, serviceOptions?: FileServiceOptions): Promise<CoreFileInfo>;
|
|
66
|
+
importGridFsFilesToS3(options?: {
|
|
67
|
+
filter?: Record<string, any>;
|
|
68
|
+
removeSource?: boolean;
|
|
69
|
+
}): Promise<{
|
|
70
|
+
failed: {
|
|
71
|
+
error: string;
|
|
72
|
+
id: string;
|
|
73
|
+
}[];
|
|
74
|
+
imported: number;
|
|
75
|
+
removed: number;
|
|
76
|
+
skipped: number;
|
|
77
|
+
}>;
|
|
66
78
|
deleteFileByName(filename: string, serviceOptions?: FileServiceOptions): Promise<CoreFileInfo>;
|
|
67
79
|
protected findS3FileById(id: string | Types.ObjectId): Promise<null | S3FileInfo>;
|
|
68
80
|
protected findS3FileByName(filename: string): Promise<null | S3FileInfo>;
|
|
@@ -380,6 +380,48 @@ export class CoreFileService {
|
|
|
380
380
|
await GridFSHelper.deleteFile(this.files, objectId);
|
|
381
381
|
return fileInfo;
|
|
382
382
|
}
|
|
383
|
+
async importGridFsFilesToS3(options = {}) {
|
|
384
|
+
if (!this.files) {
|
|
385
|
+
throw new Error('importGridFsFilesToS3 needs GridFS, i.e. a MongoDB connection');
|
|
386
|
+
}
|
|
387
|
+
const s3Service = this.options?.s3Service;
|
|
388
|
+
if (!s3Service?.enabled) {
|
|
389
|
+
throw new Error('importGridFsFilesToS3 needs a configured s3 (CoreS3Service is not enabled)');
|
|
390
|
+
}
|
|
391
|
+
const result = { failed: [], imported: 0, removed: 0, skipped: 0 };
|
|
392
|
+
const cursor = this.files.find(options.filter ?? {}, { sort: { _id: 1 } });
|
|
393
|
+
for await (const doc of cursor) {
|
|
394
|
+
const id = getStringIds(doc._id);
|
|
395
|
+
try {
|
|
396
|
+
const { imported } = await S3FileHelper.importFile(s3Service, this.s3Files, {
|
|
397
|
+
_id: id,
|
|
398
|
+
body: () => this.files.openDownloadStream(doc._id),
|
|
399
|
+
contentLength: doc.length,
|
|
400
|
+
contentType: doc.contentType ?? doc.metadata?.contentType,
|
|
401
|
+
filename: doc.filename,
|
|
402
|
+
metadata: doc.metadata,
|
|
403
|
+
uploadDate: doc.uploadDate,
|
|
404
|
+
});
|
|
405
|
+
if (imported) {
|
|
406
|
+
result.imported++;
|
|
407
|
+
}
|
|
408
|
+
else {
|
|
409
|
+
result.skipped++;
|
|
410
|
+
}
|
|
411
|
+
if (options.removeSource) {
|
|
412
|
+
if (!(await s3Service.statObject(id))) {
|
|
413
|
+
throw new Error('S3 metadata exists but the object is missing; GridFS copy kept');
|
|
414
|
+
}
|
|
415
|
+
await this.files.delete(doc._id);
|
|
416
|
+
result.removed++;
|
|
417
|
+
}
|
|
418
|
+
}
|
|
419
|
+
catch (error) {
|
|
420
|
+
result.failed.push({ error: error instanceof Error ? error.message : String(error), id });
|
|
421
|
+
}
|
|
422
|
+
}
|
|
423
|
+
return result;
|
|
424
|
+
}
|
|
383
425
|
async deleteFileByName(filename, serviceOptions) {
|
|
384
426
|
if (!(await this.checkRights(filename, { ...serviceOptions, checkInputType: 'filename' }))) {
|
|
385
427
|
return null;
|
|
@@ -448,7 +490,9 @@ export class CoreFileService {
|
|
|
448
490
|
? await this.getRawFileInfo(input)
|
|
449
491
|
: await this.getRawFileInfoByName(input)
|
|
450
492
|
: undefined;
|
|
493
|
+
const multiTenancy = ConfigService.configFastButReadOnly?.multiTenancy;
|
|
451
494
|
return decideFileAccess({
|
|
495
|
+
adminBypass: multiTenancy && multiTenancy.enabled !== false ? multiTenancy.adminBypass : undefined,
|
|
452
496
|
checkInputType: options?.checkInputType,
|
|
453
497
|
currentUser: options?.currentUser,
|
|
454
498
|
force: options?.force,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"core-file.service.js","sourceRoot":"","sources":["../../../../src/core/modules/file/core-file.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAM3D,OAAO,EAAE,eAAe,EAAE,MAAM,2CAA2C,CAAC;AAC5E,OAAO,EAAE,qBAAqB,EAAE,MAAM,oDAAoD,CAAC;AAC3F,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE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