@cosmicdrift/kumiko-server-runtime 0.421.0 → 0.424.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/dist/build-prod-bundle.js +2 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/security-headers.d.ts +1 -0
- package/dist/security-headers.js +4 -0
- package/package.json +7 -7
- package/src/changes.json +6 -0
|
@@ -65,6 +65,7 @@ import { CSP_HASHES_FILE, inlineScriptHashes } from "./csp-hashes.js";
|
|
|
65
65
|
import { RENDERER_WEB_FONT_FILE_PATTERN, RENDERER_WEB_FONTS_DIST_DIR, resolveRendererWebFontsDir, } from "./renderer-web-fonts.js";
|
|
66
66
|
import { resolveInstalledSync } from "./resolve-installed-package.js";
|
|
67
67
|
import { canResolveTailwindStylesheet, resolveTailwindCli } from "./resolve-tailwind-cli.js";
|
|
68
|
+
import { ZOD_JITLESS_BANNER } from "./security-headers.js";
|
|
68
69
|
// Bun runtime check as a module-level constant: every build step (Tailwind via
|
|
69
70
|
// Bun.spawn, client bundling via Bun.build, and stylesheet resolution via
|
|
70
71
|
// Bun.resolveSync) is Bun-only. Per-function inline checks could diverge; one
|
|
@@ -618,6 +619,7 @@ async function buildClientBundles(entries, outDir) {
|
|
|
618
619
|
// reverse-engineerable source code. Development has its own sourcemaps via
|
|
619
620
|
// create-kumiko-server.ts.
|
|
620
621
|
sourcemap: "none",
|
|
622
|
+
banner: ZOD_JITLESS_BANNER,
|
|
621
623
|
naming: {
|
|
622
624
|
entry: "[name]-[hash].[ext]",
|
|
623
625
|
chunk: "[name]-[hash].[ext]",
|
package/dist/index.d.ts
CHANGED
|
@@ -23,6 +23,6 @@ export { parseRunMode, requireEnv, runProdApp } from "./run-prod-app.ts";
|
|
|
23
23
|
export type { RunWorkerAppOptions, WorkerAppHandle, WorkerWireDeps, } from "./run-worker-app.ts";
|
|
24
24
|
export { runWorkerApp } from "./run-worker-app.ts";
|
|
25
25
|
export type { CspExtension, CspOption, SecurityHeadersOption } from "./security-headers.ts";
|
|
26
|
-
export { buildDefaultCsp } from "./security-headers.ts";
|
|
26
|
+
export { buildDefaultCsp, ZOD_JITLESS_BANNER } from "./security-headers.ts";
|
|
27
27
|
export { makeSeedCreateFileRef, type SeedCreateFileRef } from "./seed-dispatcher.ts";
|
|
28
28
|
export { type StaticHtmlPage, writeStaticHtmlPages } from "./static-html-pages.ts";
|
package/dist/index.js
CHANGED
|
@@ -17,6 +17,6 @@ export { installFatalErrorHandlers, } from "./fatal-error-handlers.js";
|
|
|
17
17
|
export { runBootstrap } from "./run-bootstrap.js";
|
|
18
18
|
export { parseRunMode, requireEnv, runProdApp } from "./run-prod-app.js";
|
|
19
19
|
export { runWorkerApp } from "./run-worker-app.js";
|
|
20
|
-
export { buildDefaultCsp } from "./security-headers.js";
|
|
20
|
+
export { buildDefaultCsp, ZOD_JITLESS_BANNER } from "./security-headers.js";
|
|
21
21
|
export { makeSeedCreateFileRef } from "./seed-dispatcher.js";
|
|
22
22
|
export { writeStaticHtmlPages } from "./static-html-pages.js";
|
|
@@ -25,6 +25,7 @@ export type CspOption = false | string | {
|
|
|
25
25
|
readonly extend: CspExtension;
|
|
26
26
|
};
|
|
27
27
|
export declare const DEFAULT_CSP_DIRECTIVES: Readonly<Record<string, readonly string[]>>;
|
|
28
|
+
export declare const ZOD_JITLESS_BANNER = "(globalThis.__zod_globalConfig??={}).jitless=true;";
|
|
28
29
|
export declare function isScriptHash(value: unknown): value is string;
|
|
29
30
|
export declare function buildDefaultCsp(scriptHashes: readonly string[], extend?: CspExtension): string;
|
|
30
31
|
export declare function resolveSecurityHeaders(option: SecurityHeadersOption | undefined, scriptHashes?: readonly string[]): ReadonlyArray<readonly [string, string]>;
|
package/dist/security-headers.js
CHANGED
|
@@ -12,6 +12,10 @@ export const DEFAULT_CSP_DIRECTIVES = {
|
|
|
12
12
|
"form-action": ["'self'"],
|
|
13
13
|
"object-src": ["'none'"],
|
|
14
14
|
};
|
|
15
|
+
// zod probes `new Function` once to choose its JIT parser; under script-src 'self' the browser
|
|
16
|
+
// reports that caught probe as a CSP violation. Prepended to every client chunk so the flag is
|
|
17
|
+
// set before zod builds its first schema.
|
|
18
|
+
export const ZOD_JITLESS_BANNER = "(globalThis.__zod_globalConfig??={}).jitless=true;";
|
|
15
19
|
const SCRIPT_HASH_PATTERN = /^sha256-[A-Za-z0-9+/]{43}=$/;
|
|
16
20
|
const DIRECTIVE_NAME_PATTERN = /^[a-z][a-z0-9-]*$/;
|
|
17
21
|
// Separators that would let an extension value end its own
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cosmicdrift/kumiko-server-runtime",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.424.0",
|
|
4
4
|
"description": "Production server-boot runtime for Kumiko apps: connections, schema-drift-gate, seeds, lifecycle, graceful shutdown. Symmetric to kumiko-dev-server's runDevApp, without dev/scaffold tooling.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Marc Frost <marc@cosmicdriftgamestudio.com>",
|
|
@@ -100,11 +100,11 @@
|
|
|
100
100
|
}
|
|
101
101
|
},
|
|
102
102
|
"dependencies": {
|
|
103
|
-
"@cosmicdrift/kumiko-bundled-features": "0.
|
|
104
|
-
"@cosmicdrift/kumiko-framework": "0.
|
|
105
|
-
"@cosmicdrift/kumiko-renderer": "0.
|
|
106
|
-
"@cosmicdrift/kumiko-renderer-mail-html": "0.
|
|
107
|
-
"@cosmicdrift/kumiko-types": "0.
|
|
103
|
+
"@cosmicdrift/kumiko-bundled-features": "0.424.0",
|
|
104
|
+
"@cosmicdrift/kumiko-framework": "0.424.0",
|
|
105
|
+
"@cosmicdrift/kumiko-renderer": "0.424.0",
|
|
106
|
+
"@cosmicdrift/kumiko-renderer-mail-html": "0.424.0",
|
|
107
|
+
"@cosmicdrift/kumiko-types": "0.424.0",
|
|
108
108
|
"ioredis": "^5.11.1",
|
|
109
109
|
"temporal-polyfill": "^0.3.2",
|
|
110
110
|
"zod": "^4.6.7"
|
|
@@ -113,7 +113,7 @@
|
|
|
113
113
|
"bun-types": "^1.4.4"
|
|
114
114
|
},
|
|
115
115
|
"devDependencies": {
|
|
116
|
-
"@cosmicdrift/kumiko-testing": "0.
|
|
116
|
+
"@cosmicdrift/kumiko-testing": "0.424.0",
|
|
117
117
|
"bun-types": "^1.4.4"
|
|
118
118
|
},
|
|
119
119
|
"publishConfig": {
|
package/src/changes.json
CHANGED
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
[
|
|
2
|
+
{
|
|
3
|
+
"version": "0.423.0",
|
|
4
|
+
"type": "fix",
|
|
5
|
+
"title": "No more CSP eval warning in the browser",
|
|
6
|
+
"detail": "The web client no longer triggers the DevTools message \"Content Security Policy of your site blocks the use of 'eval' in JavaScript\". Nothing to change in the app; rebuild with this version."
|
|
7
|
+
},
|
|
2
8
|
{
|
|
3
9
|
"version": "0.421.0",
|
|
4
10
|
"type": "improvement",
|