@pattern-stack/codegen 0.8.0 → 0.8.1

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.
@@ -10315,9 +10315,21 @@ async function bootstrap(): Promise<void> {
10315
10315
  } as NonNullable<typeof nestDocument.components>['schemas'],
10316
10316
  };
10317
10317
 
10318
- SwaggerModule.setup(config.openapi.path ?? '/docs', app, nestDocument);
10318
+ // \`persistAuthorization\` keeps the "Authorize" bearer token across page
10319
+ // reloads, so the token pasted in Swagger UI keeps flowing as the
10320
+ // \`Authorization\` header \u2014 which the RequesterContext boundary (below)
10321
+ // turns into ambient tenant scope on every request.
10322
+ SwaggerModule.setup(config.openapi.path ?? '/docs', app, nestDocument, {
10323
+ swaggerOptions: { persistAuthorization: true },
10324
+ });
10319
10325
  }
10320
10326
 
10327
+ // Ambient tenant scoping (auth subsystem). Uncomment once the auth subsystem
10328
+ // is installed and an IUserContext is bound under AUTH_USER_CONTEXT \u2014 then
10329
+ // every request is scoped to its requester with no threaded userId:
10330
+ // import { installRequesterContext } from './shared/subsystems/auth/middleware/requester-context';
10331
+ // installRequesterContext(app); // no-op + warn if AUTH_USER_CONTEXT is unbound
10332
+
10321
10333
  const port = Number(process.env.PORT ?? 3000);
10322
10334
  await app.listen(port);
10323
10335
  // eslint-disable-next-line no-console