@demiurgejs/core 0.0.0 → 0.1.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.
- package/LICENSE +21 -0
- package/README.md +75 -2
- package/dist/adapter/index.d.ts +20 -0
- package/dist/adapter/index.d.ts.map +1 -0
- package/dist/browser/file-router.d.ts +35 -0
- package/dist/browser/file-router.d.ts.map +1 -0
- package/dist/browser/index.d.ts +3 -0
- package/dist/browser/index.d.ts.map +1 -0
- package/dist/chunks/index-BnX9Qxbm.js +44 -0
- package/dist/chunks/index-BnX9Qxbm.js.map +1 -0
- package/dist/chunks/ssr-BJejKlkZ.js +275 -0
- package/dist/chunks/ssr-BJejKlkZ.js.map +1 -0
- package/dist/chunks/static-files-DUjHw-4H.js +11 -0
- package/dist/chunks/static-files-DUjHw-4H.js.map +1 -0
- package/dist/chunks/streaming-DN1DnbRE.js +343 -0
- package/dist/chunks/streaming-DN1DnbRE.js.map +1 -0
- package/dist/chunks/testing-DR3eQAvY.js +2872 -0
- package/dist/chunks/testing-DR3eQAvY.js.map +1 -0
- package/dist/data/cache.d.ts +95 -0
- package/dist/data/cache.d.ts.map +1 -0
- package/dist/data/idempotency.d.ts +24 -0
- package/dist/data/idempotency.d.ts.map +1 -0
- package/dist/data/index.d.ts +5 -0
- package/dist/data/index.d.ts.map +1 -0
- package/dist/data/testing.d.ts +7 -0
- package/dist/data/testing.d.ts.map +1 -0
- package/dist/data/testing.js +134 -0
- package/dist/data/testing.js.map +1 -0
- package/dist/document/hydration.d.ts +13 -0
- package/dist/document/hydration.d.ts.map +1 -0
- package/dist/document/index.d.ts +13 -0
- package/dist/document/index.d.ts.map +1 -0
- package/dist/document/links.d.ts +17 -0
- package/dist/document/links.d.ts.map +1 -0
- package/dist/document/metadata.d.ts +62 -0
- package/dist/document/metadata.d.ts.map +1 -0
- package/dist/document/render.d.ts +29 -0
- package/dist/document/render.d.ts.map +1 -0
- package/dist/document/scripts.d.ts +24 -0
- package/dist/document/scripts.d.ts.map +1 -0
- package/dist/document/seo.d.ts +42 -0
- package/dist/document/seo.d.ts.map +1 -0
- package/dist/index.d.ts +23 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +1328 -0
- package/dist/index.js.map +1 -0
- package/dist/internal/testing.d.ts +3 -0
- package/dist/internal/testing.d.ts.map +1 -0
- package/dist/internal/testing.js +22 -0
- package/dist/internal/testing.js.map +1 -0
- package/dist/node/http.d.ts +28 -0
- package/dist/node/http.d.ts.map +1 -0
- package/dist/node/index.d.ts +45 -0
- package/dist/node/index.d.ts.map +1 -0
- package/dist/node/index.js +386 -0
- package/dist/node/index.js.map +1 -0
- package/dist/node/static.d.ts +9 -0
- package/dist/node/static.d.ts.map +1 -0
- package/dist/node/streaming.d.ts +5 -0
- package/dist/node/streaming.d.ts.map +1 -0
- package/dist/package-name.d.ts +2 -0
- package/dist/package-name.d.ts.map +1 -0
- package/dist/platform/analytics.d.ts +20 -0
- package/dist/platform/analytics.d.ts.map +1 -0
- package/dist/platform/fonts.d.ts +35 -0
- package/dist/platform/fonts.d.ts.map +1 -0
- package/dist/platform/images.d.ts +49 -0
- package/dist/platform/images.d.ts.map +1 -0
- package/dist/platform/index.d.ts +9 -0
- package/dist/platform/index.d.ts.map +1 -0
- package/dist/platform/observability.d.ts +60 -0
- package/dist/platform/observability.d.ts.map +1 -0
- package/dist/route/action.d.ts +33 -0
- package/dist/route/action.d.ts.map +1 -0
- package/dist/route/http-error.d.ts +24 -0
- package/dist/route/http-error.d.ts.map +1 -0
- package/dist/route/index.d.ts +10 -0
- package/dist/route/index.d.ts.map +1 -0
- package/dist/route/page.d.ts +5 -0
- package/dist/route/page.d.ts.map +1 -0
- package/dist/route/response.d.ts +100 -0
- package/dist/route/response.d.ts.map +1 -0
- package/dist/route/types.d.ts +186 -0
- package/dist/route/types.d.ts.map +1 -0
- package/dist/route/webhook.d.ts +25 -0
- package/dist/route/webhook.d.ts.map +1 -0
- package/dist/router/index.d.ts +5 -0
- package/dist/router/index.d.ts.map +1 -0
- package/dist/router/manifest.d.ts +119 -0
- package/dist/router/manifest.d.ts.map +1 -0
- package/dist/router/navigation-data.d.ts +9 -0
- package/dist/router/navigation-data.d.ts.map +1 -0
- package/dist/routing/generate.d.ts +14 -0
- package/dist/routing/generate.d.ts.map +1 -0
- package/dist/routing/index.d.ts +3 -0
- package/dist/routing/index.d.ts.map +1 -0
- package/dist/routing/types.d.ts +38 -0
- package/dist/routing/types.d.ts.map +1 -0
- package/dist/security/audit.d.ts +16 -0
- package/dist/security/audit.d.ts.map +1 -0
- package/dist/security/cors.d.ts +7 -0
- package/dist/security/cors.d.ts.map +1 -0
- package/dist/security/csrf.d.ts +15 -0
- package/dist/security/csrf.d.ts.map +1 -0
- package/dist/security/env.d.ts +69 -0
- package/dist/security/env.d.ts.map +1 -0
- package/dist/security/index.d.ts +17 -0
- package/dist/security/index.d.ts.map +1 -0
- package/dist/security/policy.d.ts +18 -0
- package/dist/security/policy.d.ts.map +1 -0
- package/dist/security/rate-limit.d.ts +6 -0
- package/dist/security/rate-limit.d.ts.map +1 -0
- package/dist/security/report.d.ts +13 -0
- package/dist/security/report.d.ts.map +1 -0
- package/dist/security/request.d.ts +11 -0
- package/dist/security/request.d.ts.map +1 -0
- package/dist/security/types.d.ts +137 -0
- package/dist/security/types.d.ts.map +1 -0
- package/dist/security/upload.d.ts +23 -0
- package/dist/security/upload.d.ts.map +1 -0
- package/dist/security/websocket.d.ts +13 -0
- package/dist/security/websocket.d.ts.map +1 -0
- package/dist/server/errors.d.ts +13 -0
- package/dist/server/errors.d.ts.map +1 -0
- package/dist/server/failure-site.d.ts +2 -0
- package/dist/server/failure-site.d.ts.map +1 -0
- package/dist/server/fallbacks.d.ts +10 -0
- package/dist/server/fallbacks.d.ts.map +1 -0
- package/dist/server/index.d.ts +14 -0
- package/dist/server/index.d.ts.map +1 -0
- package/dist/server/negotiate.d.ts +3 -0
- package/dist/server/negotiate.d.ts.map +1 -0
- package/dist/server/not-found.d.ts +11 -0
- package/dist/server/not-found.d.ts.map +1 -0
- package/dist/server/problem.d.ts +18 -0
- package/dist/server/problem.d.ts.map +1 -0
- package/dist/server/render-tree.d.ts +4 -0
- package/dist/server/render-tree.d.ts.map +1 -0
- package/dist/server/request-handler.d.ts +40 -0
- package/dist/server/request-handler.d.ts.map +1 -0
- package/dist/server/request-metadata.d.ts +7 -0
- package/dist/server/request-metadata.d.ts.map +1 -0
- package/dist/server/ssr.d.ts +17 -0
- package/dist/server/ssr.d.ts.map +1 -0
- package/dist/static/index.d.ts +28 -0
- package/dist/static/index.d.ts.map +1 -0
- package/dist/static/index.js +377 -0
- package/dist/static/index.js.map +1 -0
- package/dist/static-files.d.ts +5 -0
- package/dist/static-files.d.ts.map +1 -0
- package/dist/vite/index.d.ts +4 -0
- package/dist/vite/index.d.ts.map +1 -0
- package/dist/vite/index.js +746 -0
- package/dist/vite/index.js.map +1 -0
- package/dist/vite/plugin.d.ts +37 -0
- package/dist/vite/plugin.d.ts.map +1 -0
- package/package.json +93 -4
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export declare const PROBLEM_CONTENT_TYPE = "application/problem+json";
|
|
2
|
+
export type ProblemDetails = {
|
|
3
|
+
detail?: string;
|
|
4
|
+
instance?: string;
|
|
5
|
+
status: number;
|
|
6
|
+
title: string;
|
|
7
|
+
type?: string;
|
|
8
|
+
[extension: string]: unknown;
|
|
9
|
+
};
|
|
10
|
+
export declare function createProblemDetails({ detail, instance, status, title, type, ...extensions }: ProblemDetails): {
|
|
11
|
+
instance?: string | undefined;
|
|
12
|
+
detail?: string | undefined;
|
|
13
|
+
type: string;
|
|
14
|
+
title: string;
|
|
15
|
+
status: number;
|
|
16
|
+
};
|
|
17
|
+
export declare function createProblemResponse(problem: ProblemDetails, init?: ResponseInit): Response;
|
|
18
|
+
//# sourceMappingURL=problem.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"problem.d.ts","sourceRoot":"","sources":["../../src/server/problem.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,oBAAoB,6BAA6B,CAAC;AAE/D,MAAM,MAAM,cAAc,GAAG;IAC3B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC;CAC9B,CAAC;AAKF,wBAAgB,oBAAoB,CAAC,EACnC,MAAM,EACN,QAAQ,EACR,MAAM,EACN,KAAK,EACL,IAAoB,EACpB,GAAG,UAAU,EACd,EAAE,cAAc;;;;;;EAShB;AAED,wBAAgB,qBAAqB,CACnC,OAAO,EAAE,cAAc,EACvB,IAAI,CAAC,EAAE,YAAY,YAepB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"render-tree.d.ts","sourceRoot":"","sources":["../../src/server/render-tree.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AACtD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAElD,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,gBAAgB,aAgB3D"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { type LoadedRouteMatch, type RouteManifest } from "../router";
|
|
2
|
+
import { type CacheDuration, type CacheNamespace, type CacheStore } from "../data";
|
|
3
|
+
import { type RouteImporter } from "../route";
|
|
4
|
+
import { type SsrOptions, type SsrRenderOptions } from "./ssr";
|
|
5
|
+
import type { FailureSite } from "./failure-site";
|
|
6
|
+
import { type RateLimitStore } from "../security";
|
|
7
|
+
export type RequestErrorReporter = (error: unknown, context: {
|
|
8
|
+
pathname: string;
|
|
9
|
+
site: FailureSite;
|
|
10
|
+
}) => void;
|
|
11
|
+
export type RequestHandlerOptions = {
|
|
12
|
+
cacheStore?: RequestCacheStoreOptions;
|
|
13
|
+
onError?: RequestErrorReporter;
|
|
14
|
+
renderPage?: PageRenderer;
|
|
15
|
+
rateLimitStore?: RateLimitStore;
|
|
16
|
+
routes: Record<string, RouteImporter>;
|
|
17
|
+
ssr?: SsrOptions;
|
|
18
|
+
};
|
|
19
|
+
export type RequestCacheStoreOptions = {
|
|
20
|
+
namespace: CacheNamespace;
|
|
21
|
+
onBackgroundError?: (error: unknown) => void;
|
|
22
|
+
refreshLeaseTtl?: CacheDuration;
|
|
23
|
+
store: CacheStore;
|
|
24
|
+
waitUntil?: (promise: Promise<void>) => void;
|
|
25
|
+
};
|
|
26
|
+
type RequestRuntimeOptions = {
|
|
27
|
+
cacheStore?: RequestCacheStoreOptions;
|
|
28
|
+
dev?: boolean;
|
|
29
|
+
onError?: RequestErrorReporter;
|
|
30
|
+
renderPage?: PageRenderer;
|
|
31
|
+
rateLimitStore?: RateLimitStore;
|
|
32
|
+
ssr?: SsrOptions;
|
|
33
|
+
transformDocument?: (html: string) => string | Promise<string>;
|
|
34
|
+
};
|
|
35
|
+
export type RequestHandler = (request: Request) => Promise<Response>;
|
|
36
|
+
export type PageRenderer = (match: LoadedRouteMatch, options: SsrRenderOptions) => Response | Promise<Response>;
|
|
37
|
+
export declare function createRequestHandler(options: RequestHandlerOptions): (request: Request) => Promise<Response>;
|
|
38
|
+
export declare function handleRequestWithManifest(manifest: RouteManifest, request: Request, options?: RequestRuntimeOptions): Promise<Response>;
|
|
39
|
+
export {};
|
|
40
|
+
//# sourceMappingURL=request-handler.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"request-handler.d.ts","sourceRoot":"","sources":["../../src/server/request-handler.ts"],"names":[],"mappings":"AAAA,OAAO,EAYL,KAAK,gBAAgB,EACrB,KAAK,aAAa,EAEnB,MAAM,WAAW,CAAC;AACnB,OAAO,EAIL,KAAK,aAAa,EAClB,KAAK,cAAc,EACnB,KAAK,UAAU,EAChB,MAAM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C,EAAE,UAAU,CAAC;IACjB,iBAAiB,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;CAChE,CAAC;AAEF,MAAM,MAAM,cAAc,GAAG,CAAC,OAAO,EAAE,OAAO,KAAK,OAAO,CAAC,QAAQ,CAAC,CAAC;AAErE,MAAM,MAAM,YAAY,GAAG,CACzB,KAAK,EAAE,gBAAgB,EACvB,OAAO,EAAE,gBAAgB,KACtB,QAAQ,GAAG,OAAO,CAAC,QAAQ,CAAC,CAAC;AAclC,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,qBAAqB,IAQ7B,SAAS,OAAO,uBASrD;AAED,wBAAsB,yBAAyB,CAC7C,QAAQ,EAAE,aAAa,EACvB,OAAO,EAAE,OAAO,EAChB,OAAO,GAAE,qBAER,qBAqFF"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export type RequestConnectionMetadata = {
|
|
2
|
+
clientIp: string;
|
|
3
|
+
};
|
|
4
|
+
export declare function getRequestConnectionMetadata(request: Request): RequestConnectionMetadata | undefined;
|
|
5
|
+
export declare function setRequestConnectionMetadata(request: Request, metadata: RequestConnectionMetadata): void;
|
|
6
|
+
export declare function copyRequestConnectionMetadata(from: Request, to: Request): void;
|
|
7
|
+
//# sourceMappingURL=request-metadata.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"request-metadata.d.ts","sourceRoot":"","sources":["../../src/server/request-metadata.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,yBAAyB,GAAG;IACtC,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC;AAIF,wBAAgB,4BAA4B,CAAC,OAAO,EAAE,OAAO,yCAE5D;AAED,wBAAgB,4BAA4B,CAC1C,OAAO,EAAE,OAAO,EAChB,QAAQ,EAAE,yBAAyB,QAGpC;AAED,wBAAgB,6BAA6B,CAAC,IAAI,EAAE,OAAO,EAAE,EAAE,EAAE,OAAO,QAMvE"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { LoadedRouteMatch } from "../router";
|
|
2
|
+
export type SsrOptions = {
|
|
3
|
+
clientEntry?: string;
|
|
4
|
+
lang?: string;
|
|
5
|
+
navigation?: "document";
|
|
6
|
+
styles?: string[];
|
|
7
|
+
title?: string;
|
|
8
|
+
};
|
|
9
|
+
export type SsrRenderOptions = SsrOptions & {
|
|
10
|
+
nonce?: string;
|
|
11
|
+
onStreamError?: (error: unknown) => void;
|
|
12
|
+
signal?: AbortSignal;
|
|
13
|
+
transformDocument?: (html: string) => string | Promise<string>;
|
|
14
|
+
};
|
|
15
|
+
export declare function renderPageDocument(match: LoadedRouteMatch, options?: SsrRenderOptions): string;
|
|
16
|
+
export declare function renderPageResponse(match: LoadedRouteMatch, options?: SsrRenderOptions): Response;
|
|
17
|
+
//# sourceMappingURL=ssr.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ssr.d.ts","sourceRoot":"","sources":["../../src/server/ssr.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAGlD,MAAM,MAAM,UAAU,GAAG;IACvB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,MAAM,MAAM,gBAAgB,GAAG,UAAU,GAAG;IAC1C,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;IACzC,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB,iBAAiB,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;CAChE,CAAC;AAEF,wBAAgB,kBAAkB,CAChC,KAAK,EAAE,gBAAgB,EACvB,OAAO,GAAE,gBAAqB,UAqB/B;AAED,wBAAgB,kBAAkB,CAChC,KAAK,EAAE,gBAAgB,EACvB,OAAO,GAAE,gBAAqB,YAS/B"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { RouteImporter } from "../route";
|
|
2
|
+
import { type RequestErrorReporter, type SsrOptions } from "../server";
|
|
3
|
+
export declare const staticAdapter: import("..").Adapter;
|
|
4
|
+
export type StaticOutputEntry = {
|
|
5
|
+
file: string;
|
|
6
|
+
headers: Record<string, string>;
|
|
7
|
+
pathname: string;
|
|
8
|
+
status: 200 | 404;
|
|
9
|
+
};
|
|
10
|
+
export type StaticOutputManifest = {
|
|
11
|
+
adapter: "static";
|
|
12
|
+
entries: StaticOutputEntry[];
|
|
13
|
+
fileHeaderRules: StaticOutputFileHeaderRule[];
|
|
14
|
+
version: 1;
|
|
15
|
+
};
|
|
16
|
+
export type StaticOutputFileHeaderRule = {
|
|
17
|
+
headers: Record<string, string>;
|
|
18
|
+
pattern: string;
|
|
19
|
+
};
|
|
20
|
+
export type GenerateStaticOutputOptions = {
|
|
21
|
+
onError?: RequestErrorReporter;
|
|
22
|
+
origin?: string;
|
|
23
|
+
outDir: string;
|
|
24
|
+
routes: Record<string, RouteImporter>;
|
|
25
|
+
ssr?: SsrOptions;
|
|
26
|
+
};
|
|
27
|
+
export declare function generateStaticOutput(options: GenerateStaticOutputOptions): Promise<StaticOutputManifest>;
|
|
28
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/static/index.ts"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAAmB,aAAa,EAAe,MAAM,UAAU,CAAC;AAC5E,OAAO,EAGL,KAAK,oBAAoB,EACzB,KAAK,UAAU,EAChB,MAAM,WAAW,CAAC;AAUnB,eAAO,MAAM,aAAa,sBAKxB,CAAC;AAEH,MAAM,MAAM,iBAAiB,GAAG;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAChC,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,GAAG,GAAG,GAAG,CAAC;CACnB,CAAC;AAEF,MAAM,MAAM,oBAAoB,GAAG;IACjC,OAAO,EAAE,QAAQ,CAAC;IAClB,OAAO,EAAE,iBAAiB,EAAE,CAAC;IAC7B,eAAe,EAAE,0BAA0B,EAAE,CAAC;IAC9C,OAAO,EAAE,CAAC,CAAC;CACZ,CAAC;AAEF,MAAM,MAAM,0BAA0B,GAAG;IACvC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAChC,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,MAAM,MAAM,2BAA2B,GAAG;IACxC,OAAO,CAAC,EAAE,oBAAoB,CAAC;IAC/B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC;IACtC,GAAG,CAAC,EAAE,UAAU,CAAC;CAClB,CAAC;AAcF,wBAAsB,oBAAoB,CACxC,OAAO,EAAE,2BAA2B,GACnC,OAAO,CAAC,oBAAoB,CAAC,CAuE/B"}
|
|
@@ -0,0 +1,377 @@
|
|
|
1
|
+
import { mkdir as p, mkdtemp as k, writeFile as E, cp as P, rm as g, readFile as b } from "node:fs/promises";
|
|
2
|
+
import { resolve as w, dirname as O, join as m, relative as M, sep as H } from "node:path";
|
|
3
|
+
import { d as I } from "../chunks/index-BnX9Qxbm.js";
|
|
4
|
+
import { S as $ } from "../chunks/ssr-BJejKlkZ.js";
|
|
5
|
+
import { c as _, a as D, b as U, h as j, r as q, d as x } from "../chunks/testing-DR3eQAvY.js";
|
|
6
|
+
import "react-dom/server";
|
|
7
|
+
import "react";
|
|
8
|
+
import "react/jsx-runtime";
|
|
9
|
+
import { C as W, I as B, R as G } from "../chunks/static-files-DUjHw-4H.js";
|
|
10
|
+
const C = "demiurge-static-manifest.json", yt = I({
|
|
11
|
+
name: "static",
|
|
12
|
+
capabilities: {
|
|
13
|
+
staticOutput: !0
|
|
14
|
+
}
|
|
15
|
+
});
|
|
16
|
+
async function Et(t) {
|
|
17
|
+
const e = z(t.origin), r = w(t.outDir), n = _(t.routes), o = await Q(n), i = await D(n, {
|
|
18
|
+
includeResources: !0
|
|
19
|
+
});
|
|
20
|
+
V(
|
|
21
|
+
n,
|
|
22
|
+
i.filter((u) => o.get(u.file) === "document").length
|
|
23
|
+
);
|
|
24
|
+
const c = Z(
|
|
25
|
+
i.map((u) => ({
|
|
26
|
+
kind: o.get(u.file) ?? "resource",
|
|
27
|
+
pathname: u.pathname
|
|
28
|
+
}))
|
|
29
|
+
), a = U(), s = [], f = { ...t.ssr, navigation: "document" };
|
|
30
|
+
for (const u of c) {
|
|
31
|
+
const l = v(e, u.pathname, u.kind), y = await j(n, l, {
|
|
32
|
+
onError: t.onError,
|
|
33
|
+
rateLimitStore: a,
|
|
34
|
+
ssr: f
|
|
35
|
+
});
|
|
36
|
+
s.push(
|
|
37
|
+
u.kind === "document" ? await T(u, y, 200) : await rt(u, y)
|
|
38
|
+
);
|
|
39
|
+
}
|
|
40
|
+
const d = await q(
|
|
41
|
+
n,
|
|
42
|
+
v(e, "/404", "document"),
|
|
43
|
+
{
|
|
44
|
+
...f,
|
|
45
|
+
onError: (u, l) => t.onError?.(u, { pathname: "/404", site: l })
|
|
46
|
+
}
|
|
47
|
+
);
|
|
48
|
+
s.push(
|
|
49
|
+
await T(
|
|
50
|
+
{
|
|
51
|
+
file: "404.html",
|
|
52
|
+
pathname: "*"
|
|
53
|
+
},
|
|
54
|
+
d,
|
|
55
|
+
404
|
|
56
|
+
)
|
|
57
|
+
), s.sort((u, l) => u.file.localeCompare(l.file));
|
|
58
|
+
const S = {
|
|
59
|
+
adapter: "static",
|
|
60
|
+
entries: s.map(({ body: u, ...l }) => l),
|
|
61
|
+
fileHeaderRules: K(),
|
|
62
|
+
version: 1
|
|
63
|
+
};
|
|
64
|
+
return await at(r, s, S), S;
|
|
65
|
+
}
|
|
66
|
+
function K() {
|
|
67
|
+
return [
|
|
68
|
+
{
|
|
69
|
+
headers: { "cache-control": B },
|
|
70
|
+
pattern: W.source
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
headers: { "cache-control": G },
|
|
74
|
+
pattern: ".*"
|
|
75
|
+
}
|
|
76
|
+
];
|
|
77
|
+
}
|
|
78
|
+
function z(t) {
|
|
79
|
+
let e;
|
|
80
|
+
try {
|
|
81
|
+
e = new URL(t ?? "http://demiurge.local");
|
|
82
|
+
} catch {
|
|
83
|
+
throw new Error(
|
|
84
|
+
`Static output origin must be an absolute HTTP(S) origin: ${JSON.stringify(t)}.`
|
|
85
|
+
);
|
|
86
|
+
}
|
|
87
|
+
if (e.protocol !== "http:" && e.protocol !== "https:" || e.username || e.password || e.pathname !== "/" || e.search || e.hash)
|
|
88
|
+
throw new Error(
|
|
89
|
+
`Static output origin must be an HTTP(S) origin without credentials, a path, query, or hash: ${JSON.stringify(t)}.`
|
|
90
|
+
);
|
|
91
|
+
return e.origin;
|
|
92
|
+
}
|
|
93
|
+
function V(t, e) {
|
|
94
|
+
if (e === 0)
|
|
95
|
+
throw new Error("Static output requires at least one page route.");
|
|
96
|
+
if (!t.fallbacks.notFound.some(
|
|
97
|
+
(n) => n.fileSegments.length === 0
|
|
98
|
+
))
|
|
99
|
+
throw new Error(
|
|
100
|
+
"Static output requires a root @not-found.tsx so 404.html is app-owned."
|
|
101
|
+
);
|
|
102
|
+
}
|
|
103
|
+
async function Q(t) {
|
|
104
|
+
const e = /* @__PURE__ */ new Map();
|
|
105
|
+
for (const r of t.routes) {
|
|
106
|
+
const n = await r.load(), o = X(n);
|
|
107
|
+
if (o.length > 0)
|
|
108
|
+
throw new Error(
|
|
109
|
+
`Static route ${JSON.stringify(r.file)} exports unsupported methods ${o.join(", ")}. Deploy a runtime adapter for request-time methods.`
|
|
110
|
+
);
|
|
111
|
+
if (!n.GET)
|
|
112
|
+
throw new Error(
|
|
113
|
+
`Static route ${JSON.stringify(r.file)} does not export GET and cannot produce an output file.`
|
|
114
|
+
);
|
|
115
|
+
if (n.GET.kind === "page") {
|
|
116
|
+
e.set(r.file, "document");
|
|
117
|
+
continue;
|
|
118
|
+
}
|
|
119
|
+
Y(r.file, n.GET), e.set(r.file, "resource");
|
|
120
|
+
}
|
|
121
|
+
return e;
|
|
122
|
+
}
|
|
123
|
+
function X(t) {
|
|
124
|
+
return ["POST", "PUT", "PATCH", "DELETE", "OPTIONS", "HEAD"].filter((e) => t[e] !== void 0);
|
|
125
|
+
}
|
|
126
|
+
function Y(t, e) {
|
|
127
|
+
if ((e.kind === "text" || e.kind === "html" || e.kind === "json") && typeof e.value != "function")
|
|
128
|
+
return;
|
|
129
|
+
const r = "value" in e && typeof e.value == "function" ? `uses a request-dependent ${e.kind} value` : `uses the ${e.kind} response helper`;
|
|
130
|
+
throw new Error(
|
|
131
|
+
`Static route ${JSON.stringify(t)} ${r} and cannot produce a fixed output file. Use a fixed text, html, or json value, or deploy a runtime adapter.`
|
|
132
|
+
);
|
|
133
|
+
}
|
|
134
|
+
function Z(t) {
|
|
135
|
+
const e = /* @__PURE__ */ new Map(), r = /* @__PURE__ */ new Set();
|
|
136
|
+
return t.map(({ kind: n, pathname: o }) => {
|
|
137
|
+
if (r.has(o))
|
|
138
|
+
throw new Error(`Static output collected duplicate pathname ${JSON.stringify(o)}.`);
|
|
139
|
+
r.add(o);
|
|
140
|
+
const i = n === "document" ? J(o) : tt(o), c = i.toLocaleLowerCase("en-US"), a = [...e.entries()].find(
|
|
141
|
+
([s]) => s === c || s.startsWith(`${c}/`) || c.startsWith(`${s}/`)
|
|
142
|
+
);
|
|
143
|
+
if (a)
|
|
144
|
+
throw new Error(
|
|
145
|
+
`Static paths ${JSON.stringify(a[1])} and ${JSON.stringify(o)} map to the same portable output file or to a file and directory conflict.`
|
|
146
|
+
);
|
|
147
|
+
return e.set(c, o), { file: i, kind: n, pathname: o };
|
|
148
|
+
});
|
|
149
|
+
}
|
|
150
|
+
function J(t) {
|
|
151
|
+
if (!t.startsWith("/") || t.includes("?") || t.includes("#"))
|
|
152
|
+
throw new Error(`Static output received invalid pathname ${JSON.stringify(t)}.`);
|
|
153
|
+
return t === "/" ? "index.html" : [...t.split("/").slice(1).map((r) => {
|
|
154
|
+
let n;
|
|
155
|
+
try {
|
|
156
|
+
n = decodeURIComponent(r);
|
|
157
|
+
} catch {
|
|
158
|
+
throw new Error(`Static output pathname is not valid UTF-8: ${JSON.stringify(t)}.`);
|
|
159
|
+
}
|
|
160
|
+
return et(n, t), n;
|
|
161
|
+
}), "index.html"].join("/");
|
|
162
|
+
}
|
|
163
|
+
function tt(t) {
|
|
164
|
+
if (t === "/")
|
|
165
|
+
throw new Error("A static resource route cannot own the root pathname.");
|
|
166
|
+
return J(t).slice(0, -11);
|
|
167
|
+
}
|
|
168
|
+
function et(t, e) {
|
|
169
|
+
const r = /[<>:"|?*]/.test(t) || [...t].some((n) => n.charCodeAt(0) <= 31) || /[. ]$/.test(t) || /^(con|prn|aux|nul|com[1-9]|lpt[1-9])(?:\.|$)/i.test(t);
|
|
170
|
+
if (!t || t === "." || t === ".." || t.includes("/") || t.includes("\\") || r)
|
|
171
|
+
throw new Error(
|
|
172
|
+
`Static pathname ${JSON.stringify(e)} contains a segment that is unsafe or not portable as a file name: ${JSON.stringify(t)}.`
|
|
173
|
+
);
|
|
174
|
+
}
|
|
175
|
+
function v(t, e, r) {
|
|
176
|
+
return new Request(`${t}${e}`, {
|
|
177
|
+
headers: { accept: r === "document" ? "text/html" : "*/*" }
|
|
178
|
+
});
|
|
179
|
+
}
|
|
180
|
+
async function T(t, e, r) {
|
|
181
|
+
if (e.status !== r)
|
|
182
|
+
throw new Error(
|
|
183
|
+
`Static output for ${JSON.stringify(t.pathname)} returned status ${e.status}; expected ${r}.`
|
|
184
|
+
);
|
|
185
|
+
const n = e.headers.get("content-type");
|
|
186
|
+
if (!n?.toLowerCase().startsWith("text/html"))
|
|
187
|
+
throw new Error(
|
|
188
|
+
`Static output for ${JSON.stringify(t.pathname)} returned ${JSON.stringify(n)} instead of text/html.`
|
|
189
|
+
);
|
|
190
|
+
if (e.headers.has("set-cookie"))
|
|
191
|
+
throw new Error(
|
|
192
|
+
`Static output for ${JSON.stringify(t.pathname)} attempted to set a cookie. Build artifacts cannot contain per-user response state.`
|
|
193
|
+
);
|
|
194
|
+
const o = await nt(
|
|
195
|
+
await e.text(),
|
|
196
|
+
e.headers
|
|
197
|
+
);
|
|
198
|
+
return await it(t.pathname, o, e.headers), {
|
|
199
|
+
file: t.file,
|
|
200
|
+
headers: A(e.headers),
|
|
201
|
+
body: o,
|
|
202
|
+
pathname: t.pathname,
|
|
203
|
+
status: r
|
|
204
|
+
};
|
|
205
|
+
}
|
|
206
|
+
async function rt(t, e) {
|
|
207
|
+
if (e.status !== 200)
|
|
208
|
+
throw new Error(
|
|
209
|
+
`Static output for ${JSON.stringify(t.pathname)} returned status ${e.status}; expected 200.`
|
|
210
|
+
);
|
|
211
|
+
if (e.headers.has("set-cookie"))
|
|
212
|
+
throw new Error(
|
|
213
|
+
`Static output for ${JSON.stringify(t.pathname)} attempted to set a cookie. Build artifacts cannot contain per-user response state.`
|
|
214
|
+
);
|
|
215
|
+
return {
|
|
216
|
+
file: t.file,
|
|
217
|
+
headers: A(e.headers),
|
|
218
|
+
body: await e.text(),
|
|
219
|
+
pathname: t.pathname,
|
|
220
|
+
status: 200
|
|
221
|
+
};
|
|
222
|
+
}
|
|
223
|
+
async function nt(t, e) {
|
|
224
|
+
const r = new RegExp(
|
|
225
|
+
`(?:^|\\s)${$}(?:\\s|$)`
|
|
226
|
+
), n = F(t, "script").filter((i) => r.test(i.attributes));
|
|
227
|
+
if (n.length === 0)
|
|
228
|
+
return t;
|
|
229
|
+
const o = await Promise.all(
|
|
230
|
+
n.map((i) => x(i.content))
|
|
231
|
+
);
|
|
232
|
+
for (const i of [
|
|
233
|
+
"content-security-policy",
|
|
234
|
+
"content-security-policy-report-only"
|
|
235
|
+
]) {
|
|
236
|
+
const c = e.get(i);
|
|
237
|
+
c && e.set(i, ot(c, o));
|
|
238
|
+
}
|
|
239
|
+
return t.replace(
|
|
240
|
+
new RegExp(`\\s${$}(?=\\s|>)`, "g"),
|
|
241
|
+
""
|
|
242
|
+
);
|
|
243
|
+
}
|
|
244
|
+
function ot(t, e) {
|
|
245
|
+
const r = t.split(";").map((s) => s.trim()).filter(Boolean), n = r.findIndex(
|
|
246
|
+
(s) => s.split(/\s+/, 1)[0]?.toLowerCase() === "script-src"
|
|
247
|
+
), o = r.find(
|
|
248
|
+
(s) => s.split(/\s+/, 1)[0]?.toLowerCase() === "default-src"
|
|
249
|
+
), i = n === -1 ? o : r[n];
|
|
250
|
+
if (!i)
|
|
251
|
+
return t;
|
|
252
|
+
const c = i.split(/\s+/).slice(1).filter((s) => s !== "'none'"), a = [
|
|
253
|
+
"script-src",
|
|
254
|
+
.../* @__PURE__ */ new Set([...c, ...e])
|
|
255
|
+
].join(" ");
|
|
256
|
+
return n === -1 ? r.push(a) : r[n] = a, r.join("; ");
|
|
257
|
+
}
|
|
258
|
+
async function it(t, e, r) {
|
|
259
|
+
const n = r.get("content-security-policy");
|
|
260
|
+
if (!n)
|
|
261
|
+
return;
|
|
262
|
+
if (/'nonce-[^']+'/i.test(n) || /\snonce\s*=/i.test(e))
|
|
263
|
+
throw new Error(
|
|
264
|
+
`Static output for ${JSON.stringify(t)} uses a nonce-backed CSP. Use security.static() with stable hashes or a runtime adapter that injects a fresh nonce.`
|
|
265
|
+
);
|
|
266
|
+
const o = st(n);
|
|
267
|
+
await N(
|
|
268
|
+
t,
|
|
269
|
+
e,
|
|
270
|
+
"script",
|
|
271
|
+
h(o, "script-src")
|
|
272
|
+
), await N(
|
|
273
|
+
t,
|
|
274
|
+
e,
|
|
275
|
+
"style",
|
|
276
|
+
h(o, "style-src")
|
|
277
|
+
);
|
|
278
|
+
const i = h(o, "style-src");
|
|
279
|
+
if (i && /\sstyle\s*=/i.test(e) && !i.includes("'unsafe-inline'"))
|
|
280
|
+
throw new Error(
|
|
281
|
+
`Static output for ${JSON.stringify(t)} contains an inline style attribute that its CSP does not allow. Move the style into a stylesheet or explicitly allow inline styles.`
|
|
282
|
+
);
|
|
283
|
+
}
|
|
284
|
+
function st(t) {
|
|
285
|
+
const e = /* @__PURE__ */ new Map();
|
|
286
|
+
for (const r of t.split(";")) {
|
|
287
|
+
const [n, ...o] = r.trim().split(/\s+/);
|
|
288
|
+
n && e.set(n.toLowerCase(), o);
|
|
289
|
+
}
|
|
290
|
+
return e;
|
|
291
|
+
}
|
|
292
|
+
function h(t, e) {
|
|
293
|
+
return t.get(e) ?? t.get("default-src");
|
|
294
|
+
}
|
|
295
|
+
async function N(t, e, r, n) {
|
|
296
|
+
if (!(!n || n.includes("'unsafe-inline'")))
|
|
297
|
+
for (const o of F(e, r)) {
|
|
298
|
+
if (r === "script" && /(?:^|\s)src\s*=/i.test(o.attributes) || !o.content)
|
|
299
|
+
continue;
|
|
300
|
+
const i = await x(o.content);
|
|
301
|
+
if (!n.includes(i))
|
|
302
|
+
throw new Error(
|
|
303
|
+
`Static output for ${JSON.stringify(t)} contains an inline ${r} without the required CSP hash ${i}.`
|
|
304
|
+
);
|
|
305
|
+
}
|
|
306
|
+
}
|
|
307
|
+
function F(t, e) {
|
|
308
|
+
const r = t.toLowerCase(), n = [], o = `<${e}`, i = `</${e}`;
|
|
309
|
+
let c = 0;
|
|
310
|
+
for (; c < t.length; ) {
|
|
311
|
+
const a = r.indexOf(o, c);
|
|
312
|
+
if (a === -1)
|
|
313
|
+
break;
|
|
314
|
+
const s = r.indexOf(">", a + o.length), f = s === -1 ? -1 : r.indexOf(i, s + 1), d = f === -1 ? -1 : r.indexOf(">", f + i.length);
|
|
315
|
+
if (s === -1 || f === -1 || d === -1)
|
|
316
|
+
throw new Error(`Static output contains an unclosed <${e}> element.`);
|
|
317
|
+
n.push({
|
|
318
|
+
attributes: t.slice(a + o.length, s),
|
|
319
|
+
content: t.slice(s + 1, f)
|
|
320
|
+
}), c = d + 1;
|
|
321
|
+
}
|
|
322
|
+
return n;
|
|
323
|
+
}
|
|
324
|
+
function A(t) {
|
|
325
|
+
return Object.fromEntries(
|
|
326
|
+
[...t.entries()].sort(([e], [r]) => e.localeCompare(r))
|
|
327
|
+
);
|
|
328
|
+
}
|
|
329
|
+
async function at(t, e, r) {
|
|
330
|
+
const n = O(t);
|
|
331
|
+
await p(n, { recursive: !0 });
|
|
332
|
+
const o = await k(m(n, ".demiurge-static-"));
|
|
333
|
+
try {
|
|
334
|
+
for (const a of e) {
|
|
335
|
+
const s = R(o, a.file);
|
|
336
|
+
await p(O(s), { recursive: !0 }), await E(s, a.body);
|
|
337
|
+
}
|
|
338
|
+
await E(
|
|
339
|
+
m(o, C),
|
|
340
|
+
`${JSON.stringify(r, null, 2)}
|
|
341
|
+
`
|
|
342
|
+
);
|
|
343
|
+
const i = await ct(t);
|
|
344
|
+
await p(t, { recursive: !0 }), await P(o, t, { recursive: !0, force: !0 });
|
|
345
|
+
const c = new Set(e.map((a) => a.file));
|
|
346
|
+
for (const a of i)
|
|
347
|
+
c.has(a) || await g(R(t, a), { force: !0 });
|
|
348
|
+
} finally {
|
|
349
|
+
await g(o, { force: !0, recursive: !0 });
|
|
350
|
+
}
|
|
351
|
+
}
|
|
352
|
+
async function ct(t) {
|
|
353
|
+
try {
|
|
354
|
+
const e = await b(m(t, C), "utf8"), r = JSON.parse(e);
|
|
355
|
+
return r.adapter !== "static" || r.version !== 1 || !Array.isArray(r.entries) ? [] : r.entries.flatMap(
|
|
356
|
+
(n) => typeof n.file == "string" && L(n.file) ? [n.file] : []
|
|
357
|
+
);
|
|
358
|
+
} catch {
|
|
359
|
+
return [];
|
|
360
|
+
}
|
|
361
|
+
}
|
|
362
|
+
function R(t, e) {
|
|
363
|
+
if (!L(e))
|
|
364
|
+
throw new Error(`Static output file must stay inside the output directory: ${JSON.stringify(e)}.`);
|
|
365
|
+
const r = w(t), n = w(r, e);
|
|
366
|
+
if (M(r, n).split(H).includes(".."))
|
|
367
|
+
throw new Error(`Static output file escaped the output directory: ${JSON.stringify(e)}.`);
|
|
368
|
+
return n;
|
|
369
|
+
}
|
|
370
|
+
function L(t) {
|
|
371
|
+
return !!t && !t.startsWith("/") && !t.startsWith("\\") && !t.split(/[\\/]/).includes("..");
|
|
372
|
+
}
|
|
373
|
+
export {
|
|
374
|
+
Et as generateStaticOutput,
|
|
375
|
+
yt as staticAdapter
|
|
376
|
+
};
|
|
377
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../src/static/index.ts"],"sourcesContent":["import {\n cp,\n mkdir,\n mkdtemp,\n readFile,\n rm,\n writeFile,\n} from \"node:fs/promises\";\nimport { dirname, join, relative, resolve, sep } from \"node:path\";\nimport { defineAdapter } from \"../adapter\";\nimport { STRUCTURED_DATA_ATTRIBUTE } from \"../document/render\";\nimport {\n collectStaticRoutePaths,\n createRouteManifest,\n type RouteManifest,\n} from \"../router\";\nimport type { RouteCapability, RouteImporter, RouteModule } from \"../route\";\nimport {\n handleRequestWithManifest,\n renderNotFoundResponse,\n type RequestErrorReporter,\n type SsrOptions,\n} from \"../server\";\nimport { createMemoryRateLimitStore, cspHash } from \"../security\";\nimport {\n CONTENT_HASHED_FILE_NAME_PATTERN,\n IMMUTABLE_FILE_CACHE_CONTROL,\n REVALIDATED_FILE_CACHE_CONTROL,\n} from \"../static-files\";\n\nconst STATIC_MANIFEST_FILE = \"demiurge-static-manifest.json\";\n\nexport const staticAdapter = defineAdapter({\n name: \"static\",\n capabilities: {\n staticOutput: true,\n },\n});\n\nexport type StaticOutputEntry = {\n file: string;\n headers: Record<string, string>;\n pathname: string;\n status: 200 | 404;\n};\n\nexport type StaticOutputManifest = {\n adapter: \"static\";\n entries: StaticOutputEntry[];\n fileHeaderRules: StaticOutputFileHeaderRule[];\n version: 1;\n};\n\nexport type StaticOutputFileHeaderRule = {\n headers: Record<string, string>;\n pattern: string;\n};\n\nexport type GenerateStaticOutputOptions = {\n onError?: RequestErrorReporter;\n origin?: string;\n outDir: string;\n routes: Record<string, RouteImporter>;\n ssr?: SsrOptions;\n};\n\ntype PendingOutput = StaticOutputEntry & {\n body: string;\n};\n\ntype OutputKind = \"document\" | \"resource\";\n\ntype PlannedOutput = {\n file: string;\n kind: OutputKind;\n pathname: string;\n};\n\nexport async function generateStaticOutput(\n options: GenerateStaticOutputOptions,\n): Promise<StaticOutputManifest> {\n const origin = normalizeOrigin(options.origin);\n const outDir = resolve(options.outDir);\n const manifest = createRouteManifest(options.routes);\n const routeKinds = await validateStaticRoutes(manifest);\n const paths = await collectStaticRoutePaths(manifest, {\n includeResources: true,\n });\n\n assertStaticPageApp(\n manifest,\n paths.filter((path) => routeKinds.get(path.file) === \"document\").length,\n );\n\n const outputEntries = planOutputEntries(\n paths.map((path) => ({\n kind: routeKinds.get(path.file) ?? \"resource\",\n pathname: path.pathname,\n })),\n );\n const rateLimitStore = createMemoryRateLimitStore();\n const pending: PendingOutput[] = [];\n const ssr = { ...options.ssr, navigation: \"document\" as const };\n\n for (const entry of outputEntries) {\n const request = createStaticRequest(origin, entry.pathname, entry.kind);\n const response = await handleRequestWithManifest(manifest, request, {\n onError: options.onError,\n rateLimitStore,\n ssr,\n });\n\n pending.push(\n entry.kind === \"document\"\n ? await prepareDocumentOutput(entry, response, 200)\n : await prepareResourceOutput(entry, response),\n );\n }\n\n const notFoundResponse = await renderNotFoundResponse(\n manifest,\n createStaticRequest(origin, \"/404\", \"document\"),\n {\n ...ssr,\n onError: (error, site) =>\n options.onError?.(error, { pathname: \"/404\", site }),\n },\n );\n pending.push(\n await prepareDocumentOutput(\n {\n file: \"404.html\",\n pathname: \"*\",\n },\n notFoundResponse,\n 404,\n ),\n );\n\n pending.sort((left, right) => left.file.localeCompare(right.file));\n\n const outputManifest: StaticOutputManifest = {\n adapter: \"static\",\n entries: pending.map(({ body: _body, ...entry }) => entry),\n fileHeaderRules: createStaticFileHeaderRules(),\n version: 1,\n };\n\n await writeOutput(outDir, pending, outputManifest);\n\n return outputManifest;\n}\n\nfunction createStaticFileHeaderRules(): StaticOutputFileHeaderRule[] {\n return [\n {\n headers: { \"cache-control\": IMMUTABLE_FILE_CACHE_CONTROL },\n pattern: CONTENT_HASHED_FILE_NAME_PATTERN.source,\n },\n {\n headers: { \"cache-control\": REVALIDATED_FILE_CACHE_CONTROL },\n pattern: \".*\",\n },\n ];\n}\n\nfunction normalizeOrigin(value: string | undefined) {\n let origin: URL;\n\n try {\n origin = new URL(value ?? \"http://demiurge.local\");\n } catch {\n throw new Error(\n `Static output origin must be an absolute HTTP(S) origin: ${JSON.stringify(value)}.`,\n );\n }\n\n if (\n (origin.protocol !== \"http:\" && origin.protocol !== \"https:\") ||\n origin.username ||\n origin.password ||\n origin.pathname !== \"/\" ||\n origin.search ||\n origin.hash\n ) {\n throw new Error(\n `Static output origin must be an HTTP(S) origin without credentials, a path, query, or hash: ${JSON.stringify(value)}.`,\n );\n }\n\n return origin.origin;\n}\n\nfunction assertStaticPageApp(manifest: RouteManifest, pageCount: number) {\n if (pageCount === 0) {\n throw new Error(\"Static output requires at least one page route.\");\n }\n\n const hasRootNotFound = manifest.fallbacks.notFound.some(\n (fallback) => fallback.fileSegments.length === 0,\n );\n\n if (!hasRootNotFound) {\n throw new Error(\n \"Static output requires a root @not-found.tsx so 404.html is app-owned.\",\n );\n }\n}\n\nasync function validateStaticRoutes(manifest: RouteManifest) {\n const routeKinds = new Map<string, OutputKind>();\n\n for (const route of manifest.routes) {\n const routeModule = await route.load();\n const unsupportedMethods = staticUnsupportedMethods(routeModule);\n\n if (unsupportedMethods.length > 0) {\n throw new Error(\n `Static route ${JSON.stringify(route.file)} exports unsupported methods ${unsupportedMethods.join(\", \")}. Deploy a runtime adapter for request-time methods.`,\n );\n }\n\n if (!routeModule.GET) {\n throw new Error(\n `Static route ${JSON.stringify(route.file)} does not export GET and cannot produce an output file.`,\n );\n }\n\n if (routeModule.GET.kind === \"page\") {\n routeKinds.set(route.file, \"document\");\n continue;\n }\n\n assertStaticResource(route.file, routeModule.GET);\n routeKinds.set(route.file, \"resource\");\n }\n\n return routeKinds;\n}\n\nfunction staticUnsupportedMethods(routeModule: RouteModule) {\n return ([\"POST\", \"PUT\", \"PATCH\", \"DELETE\", \"OPTIONS\", \"HEAD\"] as const)\n .filter((method) => routeModule[method] !== undefined);\n}\n\nfunction assertStaticResource(file: string, capability: RouteCapability) {\n if (\n (capability.kind === \"text\" ||\n capability.kind === \"html\" ||\n capability.kind === \"json\") &&\n typeof capability.value !== \"function\"\n ) {\n return;\n }\n\n const reason = \"value\" in capability && typeof capability.value === \"function\"\n ? `uses a request-dependent ${capability.kind} value`\n : `uses the ${capability.kind} response helper`;\n\n throw new Error(\n `Static route ${JSON.stringify(file)} ${reason} and cannot produce a fixed output file. Use a fixed text, html, or json value, or deploy a runtime adapter.`,\n );\n}\n\nfunction planOutputEntries(\n outputs: Array<{ kind: OutputKind; pathname: string }>,\n) {\n const seenFiles = new Map<string, string>();\n const seenPathnames = new Set<string>();\n\n return outputs.map(({ kind, pathname }) => {\n if (seenPathnames.has(pathname)) {\n throw new Error(`Static output collected duplicate pathname ${JSON.stringify(pathname)}.`);\n }\n\n seenPathnames.add(pathname);\n\n const file = kind === \"document\"\n ? pathnameToDocumentFile(pathname)\n : pathnameToResourceFile(pathname);\n const portableFile = file.toLocaleLowerCase(\"en-US\");\n const conflict = [...seenFiles.entries()].find(([seenFile]) =>\n seenFile === portableFile ||\n seenFile.startsWith(`${portableFile}/`) ||\n portableFile.startsWith(`${seenFile}/`)\n );\n\n if (conflict) {\n throw new Error(\n `Static paths ${JSON.stringify(conflict[1])} and ${JSON.stringify(pathname)} map to the same portable output file or to a file and directory conflict.`,\n );\n }\n\n seenFiles.set(portableFile, pathname);\n\n return { file, kind, pathname };\n });\n}\n\nfunction pathnameToDocumentFile(pathname: string) {\n if (!pathname.startsWith(\"/\") || pathname.includes(\"?\") || pathname.includes(\"#\")) {\n throw new Error(`Static output received invalid pathname ${JSON.stringify(pathname)}.`);\n }\n\n if (pathname === \"/\") {\n return \"index.html\";\n }\n\n const segments = pathname.split(\"/\").slice(1).map((segment) => {\n let decoded: string;\n\n try {\n decoded = decodeURIComponent(segment);\n } catch {\n throw new Error(`Static output pathname is not valid UTF-8: ${JSON.stringify(pathname)}.`);\n }\n\n assertPortableSegment(decoded, pathname);\n return decoded;\n });\n\n return [...segments, \"index.html\"].join(\"/\");\n}\n\nfunction pathnameToResourceFile(pathname: string) {\n if (pathname === \"/\") {\n throw new Error(\"A static resource route cannot own the root pathname.\");\n }\n\n const documentFile = pathnameToDocumentFile(pathname);\n return documentFile.slice(0, -\"/index.html\".length);\n}\n\nfunction assertPortableSegment(segment: string, pathname: string) {\n const invalidWindowsName = /[<>:\"|?*]/.test(segment) ||\n [...segment].some((character) => character.charCodeAt(0) <= 31) ||\n /[. ]$/.test(segment) ||\n /^(con|prn|aux|nul|com[1-9]|lpt[1-9])(?:\\.|$)/i.test(segment);\n\n if (\n !segment ||\n segment === \".\" ||\n segment === \"..\" ||\n segment.includes(\"/\") ||\n segment.includes(\"\\\\\") ||\n invalidWindowsName\n ) {\n throw new Error(\n `Static pathname ${JSON.stringify(pathname)} contains a segment that is unsafe or not portable as a file name: ${JSON.stringify(segment)}.`,\n );\n }\n}\n\nfunction createStaticRequest(\n origin: string,\n pathname: string,\n kind: OutputKind,\n) {\n return new Request(`${origin}${pathname}`, {\n headers: { accept: kind === \"document\" ? \"text/html\" : \"*/*\" },\n });\n}\n\nasync function prepareDocumentOutput(\n entry: { file: string; pathname: string },\n response: Response,\n expectedStatus: 200 | 404,\n): Promise<PendingOutput> {\n if (response.status !== expectedStatus) {\n throw new Error(\n `Static output for ${JSON.stringify(entry.pathname)} returned status ${response.status}; expected ${expectedStatus}.`,\n );\n }\n\n const contentType = response.headers.get(\"content-type\");\n\n if (!contentType?.toLowerCase().startsWith(\"text/html\")) {\n throw new Error(\n `Static output for ${JSON.stringify(entry.pathname)} returned ${JSON.stringify(contentType)} instead of text/html.`,\n );\n }\n\n if (response.headers.has(\"set-cookie\")) {\n throw new Error(\n `Static output for ${JSON.stringify(entry.pathname)} attempted to set a cookie. Build artifacts cannot contain per-user response state.`,\n );\n }\n\n const html = await coverStructuredDataHashes(\n await response.text(),\n response.headers,\n );\n await validateStaticCsp(entry.pathname, html, response.headers);\n\n return {\n file: entry.file,\n headers: sortedHeaders(response.headers),\n body: html,\n pathname: entry.pathname,\n status: expectedStatus,\n };\n}\n\nasync function prepareResourceOutput(\n entry: PlannedOutput,\n response: Response,\n): Promise<PendingOutput> {\n if (response.status !== 200) {\n throw new Error(\n `Static output for ${JSON.stringify(entry.pathname)} returned status ${response.status}; expected 200.`,\n );\n }\n\n if (response.headers.has(\"set-cookie\")) {\n throw new Error(\n `Static output for ${JSON.stringify(entry.pathname)} attempted to set a cookie. Build artifacts cannot contain per-user response state.`,\n );\n }\n\n return {\n file: entry.file,\n headers: sortedHeaders(response.headers),\n body: await response.text(),\n pathname: entry.pathname,\n status: 200,\n };\n}\n\nasync function coverStructuredDataHashes(html: string, headers: Headers) {\n const markerPattern = new RegExp(\n `(?:^|\\\\s)${STRUCTURED_DATA_ATTRIBUTE}(?:\\\\s|$)`,\n );\n const elements = findRawTextElements(html, \"script\")\n .filter((element) => markerPattern.test(element.attributes));\n\n if (elements.length === 0) {\n return html;\n }\n\n const hashes = await Promise.all(\n elements.map((element) => cspHash(element.content)),\n );\n\n for (const headerName of [\n \"content-security-policy\",\n \"content-security-policy-report-only\",\n ]) {\n const csp = headers.get(headerName);\n if (csp) {\n headers.set(headerName, addScriptHashes(csp, hashes));\n }\n }\n\n return html.replace(\n new RegExp(`\\\\s${STRUCTURED_DATA_ATTRIBUTE}(?=\\\\s|>)`, \"g\"),\n \"\",\n );\n}\n\nfunction addScriptHashes(csp: string, hashes: readonly string[]) {\n const directives = csp.split(\";\")\n .map((directive) => directive.trim())\n .filter(Boolean);\n const scriptIndex = directives.findIndex((directive) =>\n directive.split(/\\s+/, 1)[0]?.toLowerCase() === \"script-src\"\n );\n const defaultDirective = directives.find((directive) =>\n directive.split(/\\s+/, 1)[0]?.toLowerCase() === \"default-src\"\n );\n const current = scriptIndex === -1 ? defaultDirective : directives[scriptIndex];\n\n if (!current) {\n return csp;\n }\n\n const sources = current.split(/\\s+/).slice(1)\n .filter((source) => source !== \"'none'\");\n const scriptDirective = [\n \"script-src\",\n ...new Set([...sources, ...hashes]),\n ].join(\" \");\n\n if (scriptIndex === -1) {\n directives.push(scriptDirective);\n } else {\n directives[scriptIndex] = scriptDirective;\n }\n\n return directives.join(\"; \");\n}\n\nasync function validateStaticCsp(\n pathname: string,\n html: string,\n headers: Headers,\n) {\n const csp = headers.get(\"content-security-policy\");\n\n if (!csp) {\n return;\n }\n\n if (/'nonce-[^']+'/i.test(csp) || /\\snonce\\s*=/i.test(html)) {\n throw new Error(\n `Static output for ${JSON.stringify(pathname)} uses a nonce-backed CSP. Use security.static() with stable hashes or a runtime adapter that injects a fresh nonce.`,\n );\n }\n\n const directives = parseCsp(csp);\n\n await validateInlineElements(\n pathname,\n html,\n \"script\",\n effectiveSources(directives, \"script-src\"),\n );\n await validateInlineElements(\n pathname,\n html,\n \"style\",\n effectiveSources(directives, \"style-src\"),\n );\n\n const styleSources = effectiveSources(directives, \"style-src\");\n\n if (\n styleSources &&\n /\\sstyle\\s*=/i.test(html) &&\n !styleSources.includes(\"'unsafe-inline'\")\n ) {\n throw new Error(\n `Static output for ${JSON.stringify(pathname)} contains an inline style attribute that its CSP does not allow. Move the style into a stylesheet or explicitly allow inline styles.`,\n );\n }\n}\n\nfunction parseCsp(value: string) {\n const directives = new Map<string, string[]>();\n\n for (const rawDirective of value.split(\";\")) {\n const [name, ...sources] = rawDirective.trim().split(/\\s+/);\n\n if (name) {\n directives.set(name.toLowerCase(), sources);\n }\n }\n\n return directives;\n}\n\nfunction effectiveSources(directives: Map<string, string[]>, name: string) {\n return directives.get(name) ?? directives.get(\"default-src\");\n}\n\nasync function validateInlineElements(\n pathname: string,\n html: string,\n tagName: \"script\" | \"style\",\n sources: string[] | undefined,\n) {\n if (!sources || sources.includes(\"'unsafe-inline'\")) {\n return;\n }\n\n for (const element of findRawTextElements(html, tagName)) {\n if (tagName === \"script\" && /(?:^|\\s)src\\s*=/i.test(element.attributes)) {\n continue;\n }\n\n if (!element.content) {\n continue;\n }\n\n const hash = await cspHash(element.content);\n\n if (!sources.includes(hash)) {\n throw new Error(\n `Static output for ${JSON.stringify(pathname)} contains an inline ${tagName} without the required CSP hash ${hash}.`,\n );\n }\n }\n}\n\nfunction findRawTextElements(html: string, tagName: \"script\" | \"style\") {\n const lowerHtml = html.toLowerCase();\n const elements: Array<{ attributes: string; content: string }> = [];\n const opening = `<${tagName}`;\n const closing = `</${tagName}`;\n let cursor = 0;\n\n while (cursor < html.length) {\n const start = lowerHtml.indexOf(opening, cursor);\n\n if (start === -1) {\n break;\n }\n\n const openEnd = lowerHtml.indexOf(\">\", start + opening.length);\n const closeStart = openEnd === -1\n ? -1\n : lowerHtml.indexOf(closing, openEnd + 1);\n const closeEnd = closeStart === -1\n ? -1\n : lowerHtml.indexOf(\">\", closeStart + closing.length);\n\n if (openEnd === -1 || closeStart === -1 || closeEnd === -1) {\n throw new Error(`Static output contains an unclosed <${tagName}> element.`);\n }\n\n elements.push({\n attributes: html.slice(start + opening.length, openEnd),\n content: html.slice(openEnd + 1, closeStart),\n });\n cursor = closeEnd + 1;\n }\n\n return elements;\n}\n\nfunction sortedHeaders(headers: Headers) {\n return Object.fromEntries(\n [...headers.entries()].sort(([left], [right]) => left.localeCompare(right)),\n );\n}\n\nasync function writeOutput(\n outDir: string,\n entries: PendingOutput[],\n manifest: StaticOutputManifest,\n) {\n const parent = dirname(outDir);\n await mkdir(parent, { recursive: true });\n const staging = await mkdtemp(join(parent, \".demiurge-static-\"));\n\n try {\n for (const entry of entries) {\n const file = resolveContained(staging, entry.file);\n await mkdir(dirname(file), { recursive: true });\n await writeFile(file, entry.body);\n }\n\n await writeFile(\n join(staging, STATIC_MANIFEST_FILE),\n `${JSON.stringify(manifest, null, 2)}\\n`,\n );\n\n const previousFiles = await readPreviousOutputFiles(outDir);\n await mkdir(outDir, { recursive: true });\n await cp(staging, outDir, { recursive: true, force: true });\n\n const currentFiles = new Set(entries.map((entry) => entry.file));\n\n for (const file of previousFiles) {\n if (!currentFiles.has(file)) {\n await rm(resolveContained(outDir, file), { force: true });\n }\n }\n } finally {\n await rm(staging, { force: true, recursive: true });\n }\n}\n\nasync function readPreviousOutputFiles(outDir: string) {\n try {\n const source = await readFile(join(outDir, STATIC_MANIFEST_FILE), \"utf8\");\n const value = JSON.parse(source) as {\n adapter?: unknown;\n entries?: Array<{ file?: unknown }>;\n version?: unknown;\n };\n\n if (\n value.adapter !== \"static\" ||\n value.version !== 1 ||\n !Array.isArray(value.entries)\n ) {\n return [];\n }\n\n return value.entries.flatMap((entry) =>\n typeof entry.file === \"string\" &&\n isSafeRelativeFile(entry.file)\n ? [entry.file]\n : []\n );\n } catch {\n return [];\n }\n}\n\nfunction resolveContained(root: string, file: string) {\n if (!isSafeRelativeFile(file)) {\n throw new Error(`Static output file must stay inside the output directory: ${JSON.stringify(file)}.`);\n }\n\n const resolvedRoot = resolve(root);\n const resolvedFile = resolve(resolvedRoot, file);\n\n if (relative(resolvedRoot, resolvedFile).split(sep).includes(\"..\")) {\n throw new Error(`Static output file escaped the output directory: ${JSON.stringify(file)}.`);\n }\n\n return resolvedFile;\n}\n\nfunction isSafeRelativeFile(file: string) {\n return Boolean(file) &&\n !file.startsWith(\"/\") &&\n !file.startsWith(\"\\\\\") &&\n !file.split(/[\\\\/]/).includes(\"..\");\n}\n"],"names":["STATIC_MANIFEST_FILE","staticAdapter","defineAdapter","generateStaticOutput","options","origin","normalizeOrigin","outDir","resolve","manifest","createRouteManifest","routeKinds","validateStaticRoutes","paths","collectStaticRoutePaths","assertStaticPageApp","path","outputEntries","planOutputEntries","rateLimitStore","createMemoryRateLimitStore","pending","ssr","entry","request","createStaticRequest","response","handleRequestWithManifest","prepareDocumentOutput","prepareResourceOutput","notFoundResponse","renderNotFoundResponse","error","site","left","right","outputManifest","_body","createStaticFileHeaderRules","writeOutput","IMMUTABLE_FILE_CACHE_CONTROL","CONTENT_HASHED_FILE_NAME_PATTERN","REVALIDATED_FILE_CACHE_CONTROL","value","pageCount","fallback","route","routeModule","unsupportedMethods","staticUnsupportedMethods","assertStaticResource","method","file","capability","reason","outputs","seenFiles","seenPathnames","kind","pathname","pathnameToDocumentFile","pathnameToResourceFile","portableFile","conflict","seenFile","segment","decoded","assertPortableSegment","invalidWindowsName","character","expectedStatus","contentType","html","coverStructuredDataHashes","validateStaticCsp","sortedHeaders","headers","markerPattern","STRUCTURED_DATA_ATTRIBUTE","elements","findRawTextElements","element","hashes","cspHash","headerName","csp","addScriptHashes","directives","directive","scriptIndex","defaultDirective","current","sources","source","scriptDirective","parseCsp","validateInlineElements","effectiveSources","styleSources","rawDirective","name","tagName","hash","lowerHtml","opening","closing","cursor","start","openEnd","closeStart","closeEnd","entries","parent","dirname","mkdir","staging","mkdtemp","join","resolveContained","writeFile","previousFiles","readPreviousOutputFiles","cp","currentFiles","rm","readFile","isSafeRelativeFile","root","resolvedRoot","resolvedFile","relative","sep"],"mappings":";;;;;;;;;AA8BA,MAAMA,IAAuB,iCAEhBC,KAAgBC,EAAc;AAAA,EACzC,MAAM;AAAA,EACN,cAAc;AAAA,IACZ,cAAc;AAAA,EAAA;AAElB,CAAC;AAyCD,eAAsBC,GACpBC,GAC+B;AAC/B,QAAMC,IAASC,EAAgBF,EAAQ,MAAM,GACvCG,IAASC,EAAQJ,EAAQ,MAAM,GAC/BK,IAAWC,EAAoBN,EAAQ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UAAUA,CAAI,CAAC,GAAG;AAGtG,QAAM4E,IAAexH,EAAQuH,CAAI,GAC3BE,IAAezH,EAAQwH,GAAc5E,CAAI;AAE/C,MAAI8E,EAASF,GAAcC,CAAY,EAAE,MAAME,CAAG,EAAE,SAAS,IAAI;AAC/D,UAAM,IAAI,MAAM,oDAAoD,KAAK,UAAU/E,CAAI,CAAC,GAAG;AAG7F,SAAO6E;AACT;AAEA,SAASH,EAAmB1E,GAAc;AACxC,SAAO,EAAQA,KACb,CAACA,EAAK,WAAW,GAAG,KACpB,CAACA,EAAK,WAAW,IAAI,KACrB,CAACA,EAAK,MAAM,OAAO,EAAE,SAAS,IAAI;AACtC;"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export declare const CONTENT_HASHED_FILE_NAME_PATTERN: RegExp;
|
|
2
|
+
export declare const IMMUTABLE_FILE_CACHE_CONTROL = "public, max-age=31536000, immutable";
|
|
3
|
+
export declare const REVALIDATED_FILE_CACHE_CONTROL = "public, max-age=0, must-revalidate";
|
|
4
|
+
export declare function isContentHashedFileName(fileName: string): boolean;
|
|
5
|
+
//# sourceMappingURL=static-files.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"static-files.d.ts","sourceRoot":"","sources":["../src/static-files.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,gCAAgC,QACR,CAAC;AAEtC,eAAO,MAAM,4BAA4B,wCACF,CAAC;AAExC,eAAO,MAAM,8BAA8B,uCACL,CAAC;AAEvC,wBAAgB,uBAAuB,CAAC,QAAQ,EAAE,MAAM,WAEvD"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { demiurge } from "./plugin";
|
|
2
|
+
export { assertRootNotFoundRoute as unstable_assertRootNotFoundRoute, declaresPageRoute as unstable_declaresPageRoute, createClientEntrySource as unstable_createClientEntrySource, createServerEntrySource as unstable_createServerEntrySource, createDocumentHtml as unstable_createDocumentHtml, createDevRouteImporters as unstable_createDevRouteImporters, handleDevRequest as unstable_handleDevRequest, stripClientPageData as unstable_stripClientPageData, } from "./plugin";
|
|
3
|
+
export type { DemiurgeVitePluginOptions } from "./plugin";
|
|
4
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/vite/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AACpC,OAAO,EACL,uBAAuB,IAAI,gCAAgC,EAC3D,iBAAiB,IAAI,0BAA0B,EAC/C,uBAAuB,IAAI,gCAAgC,EAC3D,uBAAuB,IAAI,gCAAgC,EAC3D,kBAAkB,IAAI,2BAA2B,EACjD,uBAAuB,IAAI,gCAAgC,EAC3D,gBAAgB,IAAI,yBAAyB,EAC7C,mBAAmB,IAAI,4BAA4B,GACpD,MAAM,UAAU,CAAC;AAClB,YAAY,EAAE,yBAAyB,EAAE,MAAM,UAAU,CAAC"}
|