tina4-nodejs 3.13.120 → 3.13.122
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.md +2 -2
- package/package.json +2 -1
- package/packages/cli/dist/bin.js +10744 -10661
- package/packages/cli/src/bin.ts +5 -2
- package/packages/cli/src/commands/generate.ts +117 -19
- package/packages/cli/src/commands/migrateCreate.ts +32 -37
- package/packages/core/dist/index.js +2421 -339
- package/packages/core/src/mcp.ts +62 -11
- package/packages/core/src/middleware.ts +1156 -1120
- package/packages/orm/dist/index.js +2470 -388
- package/types/cli/src/commands/generate.d.ts +16 -0
- package/types/cli/src/commands/migrateCreate.d.ts +1 -1
- package/types/core/src/middleware.d.ts +15 -0
|
@@ -115,3 +115,19 @@ export interface GeneratorSpec {
|
|
|
115
115
|
}
|
|
116
116
|
export declare const GENERATORS: Record<string, GeneratorSpec>;
|
|
117
117
|
export declare function generate(what: string, name: string, extraArgs?: string[]): Promise<void>;
|
|
118
|
+
/**
|
|
119
|
+
* Programmatic entry point for in-process consumers (MCP tools, tests, hosted
|
|
120
|
+
* agents) — does everything `generate()` does EXCEPT print.
|
|
121
|
+
*
|
|
122
|
+
* Reset the resolution → dispatch to the requested generator → populate `next[]`
|
|
123
|
+
* → return the envelope. Files still land on disk (unless `--dry-run` is passed
|
|
124
|
+
* in `extraArgs`); only the human "Created …" per-file log and the
|
|
125
|
+
* `printResolution()` output are suppressed (via `jsonMode: true`, the same
|
|
126
|
+
* suppression `--json` uses on the CLI).
|
|
127
|
+
*
|
|
128
|
+
* Used by the MCP `migration_create` tool (packages/core/src/mcp.ts) so the
|
|
129
|
+
* ADR-0063 `generate_v1_1` envelope drives every surface (CLI, MCP, tests)
|
|
130
|
+
* without a subprocess round-trip.
|
|
131
|
+
*/
|
|
132
|
+
export declare function generateProgrammatic(what: string, name: string, extraArgs?: string[]): Promise<ResolutionEnvelope>;
|
|
133
|
+
export declare function generateMigration(name: string, flags: Record<string, string | boolean>, fieldsOverride?: Array<[string, string]>, tableOverride?: string, emitTest?: boolean): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare function createMigration(
|
|
1
|
+
export declare function createMigration(args?: string[]): Promise<void>;
|
|
@@ -303,6 +303,21 @@ export declare class RequestLogger {
|
|
|
303
303
|
*/
|
|
304
304
|
export declare class SecurityHeadersMiddleware {
|
|
305
305
|
static beforeSecurity(req: Tina4Request, res: Tina4Response): [Tina4Request, Tina4Response];
|
|
306
|
+
/** Warn-once ledger for the default-CSP heads-up (per process). */
|
|
307
|
+
private static cspDefaultWarned;
|
|
308
|
+
/**
|
|
309
|
+
* Warn once per process that the default CSP is in force (TINA4_CSP unset).
|
|
310
|
+
*
|
|
311
|
+
* Secure-by-default keeps `default-src 'self'` (SECHDR-DEC-01), but that
|
|
312
|
+
* default is invisible: it blocks runtime-injected inline styles, cross-origin
|
|
313
|
+
* fonts/scripts/CDNs, `data:` URIs, and cross-origin WebSocket/XHR (a separate
|
|
314
|
+
* API or LiveKit host) — and the failure surfaces only in the browser at
|
|
315
|
+
* runtime, long after a deploy has gone green. So the framework says so once,
|
|
316
|
+
* naming the escape hatch. It NEVER fails the boot or a request — logging a
|
|
317
|
+
* heads-up must not be the reason the server or a request dies. Fires only when
|
|
318
|
+
* TINA4_CSP is ABSENT; setting it (even to empty) is an explicit opt-in.
|
|
319
|
+
*/
|
|
320
|
+
private static warnCspDefaultOnce;
|
|
306
321
|
/**
|
|
307
322
|
* True when the client request is HTTPS. Proxy-aware and byte-parity with
|
|
308
323
|
* Python (request.is_secure_scheme), PHP (Request::isSecureScheme) and Ruby
|