@cosmicdrift/kumiko-server-runtime 0.386.0 → 0.387.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/LICENSE +21 -57
- package/dist/boot/boot-crypto.js +1 -2
- package/dist/boot/worker-boot-core.js +2 -2
- package/dist/build-prod-bundle.d.ts +16 -15
- package/dist/build-prod-bundle.js +106 -108
- package/dist/extra-routes-deps.d.ts +1 -1
- package/dist/index.js +4 -4
- package/dist/pii-boot-gate.js +1 -1
- package/dist/resolve-tailwind-cli.js +5 -7
- package/dist/run-prod-app-boot-context.d.ts +2 -2
- package/dist/run-prod-app-boot-context.js +21 -22
- package/dist/run-prod-app-static-files.js +43 -50
- package/dist/run-prod-app.d.ts +73 -85
- package/dist/run-prod-app.js +97 -114
- package/dist/run-worker-app.js +5 -5
- package/dist/session-boot-gate.d.ts +1 -1
- package/dist/session-boot-gate.js +1 -1
- package/dist/session-wiring.d.ts +1 -1
- package/dist/session-wiring.js +1 -1
- package/dist/try-hono-first.js +1 -1
- package/package.json +8 -8
package/LICENSE
CHANGED
|
@@ -1,57 +1,21 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
controlling, or under common control with the Licensor ("Affiliates"), or
|
|
23
|
-
contractors acting on their behalf. The Licensor remains free to use the
|
|
24
|
-
Licensed Work for any purpose, including for the operation of kumiko.rocks.
|
|
25
|
-
|
|
26
|
-
Change Date: 2030-05-05
|
|
27
|
-
Change License: Apache License, Version 2.0
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
Terms
|
|
31
|
-
|
|
32
|
-
The Licensor hereby grants you the right to copy, modify, create derivative works,
|
|
33
|
-
redistribute, and make non-production use of the Licensed Work. The Licensor may
|
|
34
|
-
make an Additional Use Grant, above, permitting limited production use.
|
|
35
|
-
|
|
36
|
-
Effective on the Change Date, or the fourth anniversary of the first publicly
|
|
37
|
-
available distribution of the Licensed Work under this License, whichever comes
|
|
38
|
-
first, this License will convert to the Change License.
|
|
39
|
-
|
|
40
|
-
This Business Source License governs use of the Licensed Work in all cases, except
|
|
41
|
-
as to any use that is explicitly granted in the Additional Use Grant above or
|
|
42
|
-
under the Change License after the Change Date.
|
|
43
|
-
|
|
44
|
-
If your use of the Licensed Work does not comply with the requirements of this
|
|
45
|
-
License, you must cease use of the Licensed Work immediately.
|
|
46
|
-
|
|
47
|
-
All copies of the Licensed Work, and all derivative works thereof, must include
|
|
48
|
-
this License.
|
|
49
|
-
|
|
50
|
-
This License does not grant you any right, title, or interest in any trademark,
|
|
51
|
-
logo, or branding of the Licensor, except as required to comply with this License.
|
|
52
|
-
|
|
53
|
-
TO THE EXTENT PERMITTED BY APPLICABLE LAW, THE LICENSED WORK IS PROVIDED ON AN
|
|
54
|
-
“AS IS” BASIS. LICENSOR DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING
|
|
55
|
-
WITHOUT LIMITATION WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE,
|
|
56
|
-
TITLE, AND NON-INFRINGEMENT. IN NO EVENT WILL LICENSOR BE LIABLE FOR ANY DAMAGES
|
|
57
|
-
ARISING OUT OF OR RELATED TO THIS LICENSE OR THE USE OF THE LICENSED WORK.
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Marc Frost
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/dist/boot/boot-crypto.js
CHANGED
|
@@ -31,8 +31,7 @@ function envMasterKeyProviderIfConfigured(envSource) {
|
|
|
31
31
|
if (!envHasMasterKek(envSource))
|
|
32
32
|
return undefined;
|
|
33
33
|
const provider = createEnvMasterKeyProvider({
|
|
34
|
-
// CURRENT_VERSION
|
|
35
|
-
// ihn wirft der raw-env-Provider, obwohl V1 gesetzt ist.
|
|
34
|
+
// CURRENT_VERSION defaults to "1" in secretsEnvSchema; without it, the raw-env provider throws even when V1 is set.
|
|
36
35
|
env: {
|
|
37
36
|
...envSource,
|
|
38
37
|
KUMIKO_SECRETS_MASTER_KEY_CURRENT_VERSION: envSource["KUMIKO_SECRETS_MASTER_KEY_CURRENT_VERSION"] ?? "1",
|
|
@@ -59,7 +59,7 @@ async function assertWorkerSchemaCurrent(db, migrationsDir, processName) {
|
|
|
59
59
|
}
|
|
60
60
|
export async function bootWorkerProcess(options, envSource, profile) {
|
|
61
61
|
const { processName } = profile;
|
|
62
|
-
// Polyfill before anything else
|
|
62
|
+
// Polyfill before anything else: without it every job fails with
|
|
63
63
|
// "Temporal is not defined" in a retry loop, with no boot-time signal.
|
|
64
64
|
const { ensureTemporalPolyfill } = await import("@cosmicdrift/kumiko-framework/time");
|
|
65
65
|
await ensureTemporalPolyfill();
|
|
@@ -155,7 +155,7 @@ export async function bootWorkerProcess(options, envSource, profile) {
|
|
|
155
155
|
const idempotency = createIdempotencyGuard(redis, { ttlSeconds: 60 });
|
|
156
156
|
const eventDedup = createEventDedup(redis, { ttlSeconds: 60 });
|
|
157
157
|
const entityCache = createEntityCache(redis, { ttlSeconds: 60 });
|
|
158
|
-
// Same crypto wiring as the API
|
|
158
|
+
// Same crypto wiring as the API, otherwise this process writes
|
|
159
159
|
// rows the API can no longer read (different cipher, missing blind index).
|
|
160
160
|
const deps = { db, redis, registry };
|
|
161
161
|
const resolvedExtraContext = typeof options.extraContext === "function"
|
|
@@ -26,28 +26,29 @@ export type ClientEntriesConfig = {
|
|
|
26
26
|
export type BuildManifest = Readonly<Record<string, string>>;
|
|
27
27
|
export type BuildResult = {
|
|
28
28
|
readonly outDir: string;
|
|
29
|
-
/** Logical → hashed-URL mapping.
|
|
29
|
+
/** Logical → hashed-URL mapping. Example:
|
|
30
30
|
* { "client.js": "/assets/client-a3f2.js",
|
|
31
31
|
* "styles.css": "/assets/styles-9b4c.css" } */
|
|
32
32
|
readonly manifest: BuildManifest;
|
|
33
|
-
/** Build
|
|
34
|
-
* undefined
|
|
33
|
+
/** Build identity (hash of the asset URLs) plus a human-readable timestamp.
|
|
34
|
+
* undefined for vanilla public-only builds (no bundle). */
|
|
35
35
|
readonly buildInfo?: BuildInfo;
|
|
36
36
|
};
|
|
37
37
|
/** Baked into index.html (`<meta name="kumiko-build">`) AND written as
|
|
38
38
|
* dist/build-info.json. The UpdateChecker polls build-info.json and compares
|
|
39
39
|
* `id` with the loaded build, showing a reload banner on drift. */
|
|
40
40
|
export type BuildInfo = {
|
|
41
|
-
/** Hash
|
|
42
|
-
*
|
|
41
|
+
/** Hash of the sorted, content-hashed asset URLs. Changes exactly when an
|
|
42
|
+
* asset changes — self-contained, with no environment variable or Dockerfile. */
|
|
43
43
|
readonly id: string;
|
|
44
|
-
/** ISO
|
|
44
|
+
/** ISO timestamp of the build, used as the human-readable display version
|
|
45
|
+
* instead of the raw hash. */
|
|
45
46
|
readonly builtAt: string;
|
|
46
47
|
};
|
|
47
48
|
export declare const DEFAULT_HTML = "<!doctype html>\n<html lang=\"en\">\n <head>\n <meta charset=\"utf-8\" />\n <meta name=\"viewport\" content=\"width=device-width,initial-scale=1,interactive-widget=resizes-content\" />\n <title>Kumiko</title>\n </head>\n <body>\n <div id=\"root\"></div>\n </body>\n</html>\n";
|
|
48
49
|
/** Folder name relative to dist/ for hashed assets (JS, CSS, file-loader
|
|
49
|
-
* outputs). Exported
|
|
50
|
-
*
|
|
50
|
+
* outputs). Exported so runProdApp uses the same convention for cache headers
|
|
51
|
+
* and cannot drift. */
|
|
51
52
|
export declare const ASSETS_DIR = "assets";
|
|
52
53
|
export declare function buildProdBundle(options?: BuildProdBundleOptions): Promise<BuildResult>;
|
|
53
54
|
export type ClientEntry = {
|
|
@@ -71,7 +72,7 @@ export type ClientEntry = {
|
|
|
71
72
|
* `kumiko-build`/`kumiko build` via `@cosmicdrift/kumiko-dev-server/build`,
|
|
72
73
|
* not just from unit tests.
|
|
73
74
|
*
|
|
74
|
-
* Precedence (
|
|
75
|
+
* Precedence (explicit declaration, no filename inference):
|
|
75
76
|
* 1. `declared.clientEntry` and `declared.clientEntries` both set → throw.
|
|
76
77
|
* 2. `declared.clientEntries` (non-empty) → one entry per declaration.
|
|
77
78
|
* 3. `declared.clientEntry` → single entry, name "client".
|
|
@@ -87,9 +88,9 @@ export declare function resolveClientEntries(cwd: string, declared: ClientEntrie
|
|
|
87
88
|
export declare function readClientEntriesConfig(cwd: string): ClientEntriesConfig;
|
|
88
89
|
type ResolvedStylesheet = {
|
|
89
90
|
readonly path: string;
|
|
90
|
-
/** True
|
|
91
|
-
* (
|
|
92
|
-
*
|
|
91
|
+
/** True only when falling back to the packaged renderer-web-styles.css
|
|
92
|
+
* (the app has clientEntry and a renderer-web dependency, but no
|
|
93
|
+
* src/styles.css). Controls the shell-class sentinel check during the build. */
|
|
93
94
|
readonly isRendererWebFallback: boolean;
|
|
94
95
|
};
|
|
95
96
|
export declare function assertRendererWebShellPresent(css: string, stylesheet: ResolvedStylesheet): void;
|
|
@@ -98,9 +99,9 @@ export declare function runTailwindOnce(entry: string, cwd: string): Promise<str
|
|
|
98
99
|
export declare function isEntryOutputFor(outName: string, baseName: string): boolean;
|
|
99
100
|
export declare function injectAssetTags(html: string, manifest: BuildManifest, entry: ClientEntry, buildInfo?: BuildInfo): string;
|
|
100
101
|
export declare function computeBuildId(manifest: BuildManifest): string;
|
|
101
|
-
/**
|
|
102
|
-
*
|
|
103
|
-
*
|
|
102
|
+
/** Formats a BuildResult as a CLI-friendly, multi-line summary with ANSI
|
|
103
|
+
* colors. Used by both `kumiko build` and the hoisted `kumiko-build` binary
|
|
104
|
+
* so their output remains consistent. */
|
|
104
105
|
export declare function formatBuildResult(result: BuildResult, durationMs: number): string;
|
|
105
106
|
/** Hashes every inline script in the HTML files of a finished build output, so the
|
|
106
107
|
* CSP only ever allows code that shipped in the artefact. */
|