theokit 0.72.0 → 0.73.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/{actions-virtual-module-WP47EKD7.js → actions-virtual-module-OHENNMQG.js} +4 -4
- package/dist/{actions-virtual-module-6LND2WHL.js → actions-virtual-module-QCDKQ6QD.js} +4 -4
- package/dist/adapters/agent-mount.js +2 -2
- package/dist/adapters/security-headers.d.ts +27 -11
- package/dist/adapters/security-headers.js.map +1 -1
- package/dist/{agent-KUP3XA2S.js → agent-OWJ5A7W5.js} +2 -2
- package/dist/{app-typed-client-IMRSVARP.js → app-typed-client-2PTK2SJH.js} +4 -4
- package/dist/{app-typed-client-6VIHSYJH.js → app-typed-client-ILLQYTXP.js} +4 -4
- package/dist/{aws-lambda-7AZNJGWU.js → aws-lambda-OP2L5RKZ.js} +3 -3
- package/dist/{build-4J24BAEC.js → build-CVP2XU5M.js} +5 -5
- package/dist/{bun-NKVHOFSJ.js → bun-CZXHPK2W.js} +4 -4
- package/dist/{chunk-KOG5K26V.js → chunk-2Z7TANA4.js} +2 -2
- package/dist/{chunk-IVGQMV3S.js → chunk-6U67SO5U.js} +2 -2
- package/dist/{chunk-V5SSTT3C.js → chunk-C43AHOHI.js} +1 -1
- package/dist/chunk-C43AHOHI.js.map +1 -0
- package/dist/{chunk-YWWMYEAC.js → chunk-CLSYYO5F.js} +2 -2
- package/dist/{chunk-BZ6DFSKG.js → chunk-D3M7LPHY.js} +20 -14
- package/dist/{chunk-BZ6DFSKG.js.map → chunk-D3M7LPHY.js.map} +1 -1
- package/dist/{chunk-JMN4COMK.js → chunk-D7STTNQN.js} +3 -3
- package/dist/{chunk-EZHDAVAF.js → chunk-EDBQM6RB.js} +27 -4
- package/dist/chunk-EDBQM6RB.js.map +1 -0
- package/dist/{chunk-QD5X56I3.js → chunk-FNJVSFEC.js} +1 -1
- package/dist/chunk-FNJVSFEC.js.map +1 -0
- package/dist/{chunk-LJNMSKFL.js → chunk-HDAILYVM.js} +2 -2
- package/dist/{chunk-RE2WE7CD.js → chunk-LOOOB46A.js} +2 -2
- package/dist/{chunk-7CHPOMP5.js → chunk-M3DT6EMK.js} +3 -3
- package/dist/chunk-M3DT6EMK.js.map +1 -0
- package/dist/{chunk-PEL3MJLM.js → chunk-MX63AWEK.js} +1 -1
- package/dist/{chunk-PEL3MJLM.js.map → chunk-MX63AWEK.js.map} +1 -1
- package/dist/{chunk-IB5VIXLR.js → chunk-R36YNWBU.js} +2 -2
- package/dist/{chunk-C5CAL3DX.js → chunk-SEGD3JUC.js} +1 -1
- package/dist/chunk-SEGD3JUC.js.map +1 -0
- package/dist/{chunk-4D4YVXHR.js → chunk-SYIQV4UH.js} +29 -2
- package/dist/{chunk-4D4YVXHR.js.map → chunk-SYIQV4UH.js.map} +1 -1
- package/dist/{chunk-RDG5GMDW.js → chunk-WRHT5NAJ.js} +20 -14
- package/dist/{chunk-RDG5GMDW.js.map → chunk-WRHT5NAJ.js.map} +1 -1
- package/dist/cli/index.js +6 -6
- package/dist/client/index.d.ts +18 -1
- package/dist/client/index.js +15 -1
- package/dist/client/index.js.map +1 -1
- package/dist/{cloudflare-4M4XVNUH.js → cloudflare-2SVRRVV5.js} +3 -3
- package/dist/{deno-deploy-IVACZ62D.js → deno-deploy-OK4QFJIZ.js} +4 -4
- package/dist/{dev-JZVHEYN4.js → dev-B2IZEVAD.js} +6 -6
- package/dist/{index-inRdhi59.d.ts → index-CmkWlIDO.d.ts} +3 -1
- package/dist/index.js +5 -5
- package/dist/{internal-api-BNDRCEPZ.js → internal-api-5Y3MLZH4.js} +4 -4
- package/dist/{internal-api-3IZVNNGB.js → internal-api-6XNLCNI5.js} +4 -4
- package/dist/{mcp-HCXHATU3.js → mcp-GJQIREYC.js} +2 -2
- package/dist/{netlify-3HEWV375.js → netlify-IAC53FVZ.js} +3 -3
- package/dist/{observability-bootstrap-FP6LMMJE.js → observability-bootstrap-DOWRMADT.js} +2 -2
- package/dist/{preview-FSUPVADO.js → preview-XBP622HM.js} +3 -3
- package/dist/{registry-SDBODRU6.js → registry-L6JG75LY.js} +7 -7
- package/dist/server/http/index.d.ts +1 -1
- package/dist/server/http/index.js +5 -3
- package/dist/server/index.d.ts +1 -1
- package/dist/server/index.js +5 -3
- package/dist/server/index.js.map +1 -1
- package/dist/{server-boundary-WUKORSW2.js → server-boundary-E5GFVPLB.js} +4 -4
- package/dist/{server-boundary-P52I6YMH.js → server-boundary-IFIYNGTA.js} +4 -4
- package/dist/{start-LCA67RES.js → start-JGNBTTG2.js} +7 -7
- package/dist/{vercel-5PMYEEKF.js → vercel-EHAOKPF7.js} +3 -3
- package/dist/vite-plugin/index.js +5 -5
- package/dist/{vite-plugin-WFA7NPYK.js → vite-plugin-54XIRMKT.js} +6 -6
- package/package.json +4 -4
- package/dist/chunk-7CHPOMP5.js.map +0 -1
- package/dist/chunk-C5CAL3DX.js.map +0 -1
- package/dist/chunk-EZHDAVAF.js.map +0 -1
- package/dist/chunk-QD5X56I3.js.map +0 -1
- package/dist/chunk-V5SSTT3C.js.map +0 -1
- /package/dist/{actions-virtual-module-WP47EKD7.js.map → actions-virtual-module-OHENNMQG.js.map} +0 -0
- /package/dist/{actions-virtual-module-6LND2WHL.js.map → actions-virtual-module-QCDKQ6QD.js.map} +0 -0
- /package/dist/{agent-KUP3XA2S.js.map → agent-OWJ5A7W5.js.map} +0 -0
- /package/dist/{app-typed-client-IMRSVARP.js.map → app-typed-client-2PTK2SJH.js.map} +0 -0
- /package/dist/{app-typed-client-6VIHSYJH.js.map → app-typed-client-ILLQYTXP.js.map} +0 -0
- /package/dist/{aws-lambda-7AZNJGWU.js.map → aws-lambda-OP2L5RKZ.js.map} +0 -0
- /package/dist/{build-4J24BAEC.js.map → build-CVP2XU5M.js.map} +0 -0
- /package/dist/{bun-NKVHOFSJ.js.map → bun-CZXHPK2W.js.map} +0 -0
- /package/dist/{chunk-KOG5K26V.js.map → chunk-2Z7TANA4.js.map} +0 -0
- /package/dist/{chunk-IVGQMV3S.js.map → chunk-6U67SO5U.js.map} +0 -0
- /package/dist/{chunk-YWWMYEAC.js.map → chunk-CLSYYO5F.js.map} +0 -0
- /package/dist/{chunk-JMN4COMK.js.map → chunk-D7STTNQN.js.map} +0 -0
- /package/dist/{chunk-LJNMSKFL.js.map → chunk-HDAILYVM.js.map} +0 -0
- /package/dist/{chunk-RE2WE7CD.js.map → chunk-LOOOB46A.js.map} +0 -0
- /package/dist/{chunk-IB5VIXLR.js.map → chunk-R36YNWBU.js.map} +0 -0
- /package/dist/{cloudflare-4M4XVNUH.js.map → cloudflare-2SVRRVV5.js.map} +0 -0
- /package/dist/{deno-deploy-IVACZ62D.js.map → deno-deploy-OK4QFJIZ.js.map} +0 -0
- /package/dist/{dev-JZVHEYN4.js.map → dev-B2IZEVAD.js.map} +0 -0
- /package/dist/{internal-api-BNDRCEPZ.js.map → internal-api-5Y3MLZH4.js.map} +0 -0
- /package/dist/{internal-api-3IZVNNGB.js.map → internal-api-6XNLCNI5.js.map} +0 -0
- /package/dist/{mcp-HCXHATU3.js.map → mcp-GJQIREYC.js.map} +0 -0
- /package/dist/{netlify-3HEWV375.js.map → netlify-IAC53FVZ.js.map} +0 -0
- /package/dist/{observability-bootstrap-FP6LMMJE.js.map → observability-bootstrap-DOWRMADT.js.map} +0 -0
- /package/dist/{preview-FSUPVADO.js.map → preview-XBP622HM.js.map} +0 -0
- /package/dist/{registry-SDBODRU6.js.map → registry-L6JG75LY.js.map} +0 -0
- /package/dist/{server-boundary-WUKORSW2.js.map → server-boundary-E5GFVPLB.js.map} +0 -0
- /package/dist/{server-boundary-P52I6YMH.js.map → server-boundary-IFIYNGTA.js.map} +0 -0
- /package/dist/{start-LCA67RES.js.map → start-JGNBTTG2.js.map} +0 -0
- /package/dist/{vercel-5PMYEEKF.js.map → vercel-EHAOKPF7.js.map} +0 -0
- /package/dist/{vite-plugin-WFA7NPYK.js.map → vite-plugin-54XIRMKT.js.map} +0 -0
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import "./chunk-
|
|
1
|
+
import "./chunk-D7STTNQN.js";
|
|
2
2
|
import "./chunk-WBB3MEEN.js";
|
|
3
3
|
import "./chunk-WSOAN4KN.js";
|
|
4
4
|
import "./chunk-ENSFCKP6.js";
|
|
5
|
-
import "./chunk-
|
|
6
|
-
import "./chunk-
|
|
5
|
+
import "./chunk-2Z7TANA4.js";
|
|
6
|
+
import "./chunk-SYIQV4UH.js";
|
|
7
7
|
import "./chunk-P6OS7652.js";
|
|
8
8
|
import "./chunk-ZDUO4IYN.js";
|
|
9
9
|
import "./chunk-IDWN2OSG.js";
|
|
@@ -234,4 +234,4 @@ export const actions = manifest
|
|
|
234
234
|
export {
|
|
235
235
|
actionsVirtualModule
|
|
236
236
|
};
|
|
237
|
-
//# sourceMappingURL=actions-virtual-module-
|
|
237
|
+
//# sourceMappingURL=actions-virtual-module-OHENNMQG.js.map
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import "tsx/esm";
|
|
3
|
-
import "./chunk-
|
|
3
|
+
import "./chunk-EDBQM6RB.js";
|
|
4
4
|
import "./chunk-BINRCILF.js";
|
|
5
|
-
import "./chunk-
|
|
5
|
+
import "./chunk-FNJVSFEC.js";
|
|
6
6
|
import "./chunk-WSMLSIS5.js";
|
|
7
|
-
import "./chunk-
|
|
7
|
+
import "./chunk-MX63AWEK.js";
|
|
8
8
|
import "./chunk-C27VRUVN.js";
|
|
9
9
|
import "./chunk-7UZZHCRN.js";
|
|
10
10
|
import "./chunk-RCFD5W5V.js";
|
|
@@ -218,4 +218,4 @@ export const actions = manifest
|
|
|
218
218
|
export {
|
|
219
219
|
actionsVirtualModule
|
|
220
220
|
};
|
|
221
|
-
//# sourceMappingURL=actions-virtual-module-
|
|
221
|
+
//# sourceMappingURL=actions-virtual-module-QCDKQ6QD.js.map
|
|
@@ -3,11 +3,11 @@ import {
|
|
|
3
3
|
createSubjectResolverFromFactory,
|
|
4
4
|
matchAgentAuxRoute,
|
|
5
5
|
serveMatchedAuxRoute
|
|
6
|
-
} from "../chunk-
|
|
6
|
+
} from "../chunk-6U67SO5U.js";
|
|
7
7
|
import {
|
|
8
8
|
mountAgent
|
|
9
9
|
} from "../chunk-WBB3MEEN.js";
|
|
10
|
-
import "../chunk-
|
|
10
|
+
import "../chunk-SYIQV4UH.js";
|
|
11
11
|
import "../chunk-P6OS7652.js";
|
|
12
12
|
import "../chunk-IDWN2OSG.js";
|
|
13
13
|
import "../chunk-PVNMLZ5G.js";
|
|
@@ -32,15 +32,29 @@ export { b as buildSecurityHeaders } from '../security-headers-vris2MQq.js';
|
|
|
32
32
|
* response — so a target reaches one only if it renders the HTML at request
|
|
33
33
|
* time and can put the same value on the script tags it emits.
|
|
34
34
|
*
|
|
35
|
-
*
|
|
36
|
-
*
|
|
37
|
-
*
|
|
38
|
-
*
|
|
39
|
-
*
|
|
40
|
-
*
|
|
41
|
-
*
|
|
42
|
-
*
|
|
43
|
-
*
|
|
35
|
+
* Two paths do, and this docblock named one of them until 2026-09-24:
|
|
36
|
+
*
|
|
37
|
+
* - **Cloudflare with `ssrStreaming: true`** — the worker calls
|
|
38
|
+
* `renderStreamingWeb(request, { nonce })`, and that renderer threads the
|
|
39
|
+
* value into `renderToReadableStream` and into the hydration script
|
|
40
|
+
* (`router/entry-server.ts`).
|
|
41
|
+
* - **node** — `theokit start` mints one per request
|
|
42
|
+
* (`cli/commands/start/request-handler.ts:272`) and stamps it onto the
|
|
43
|
+
* inline scripts in the head. The `node` deploy adapter serves through that
|
|
44
|
+
* same handler, which is what its own comment says
|
|
45
|
+
* (`adapters/node.ts:24`).
|
|
46
|
+
*
|
|
47
|
+
* The six Web-standards targets that DO declare a limit here — aws-lambda, bun,
|
|
48
|
+
* deno-deploy, netlify, vercel, and Cloudflare without `ssrStreaming` — serve
|
|
49
|
+
* HTML written at build time, or no HTML at all, and carry a **nonce-less
|
|
50
|
+
* CSP**: the same answer `buildSecurityHeaders` already gives a prerendered
|
|
51
|
+
* route (EC-4), for the same reason — a nonce in the header with no nonce on
|
|
52
|
+
* the tag blocks every inline script.
|
|
53
|
+
*
|
|
54
|
+
* `node` declares no `mintsNonce` at all, because it never calls
|
|
55
|
+
* {@link describeDeployedSecurityHeaders}. That is a gap in what its build
|
|
56
|
+
* PRINTS, not a wrong declaration, and closing it is its own change rather than
|
|
57
|
+
* a line in the item that corrected this paragraph.
|
|
44
58
|
*
|
|
45
59
|
* That asymmetry is real and is not smoothed over. It is stated in the emitted
|
|
46
60
|
* entry, printed by the build through
|
|
@@ -104,7 +118,9 @@ interface DeployedSecurityHeaderLimits {
|
|
|
104
118
|
securityHeaders: SecurityHeadersConfig | undefined;
|
|
105
119
|
/**
|
|
106
120
|
* Does the emitted handler render HTML at request time and mint a CSP nonce
|
|
107
|
-
* for it?
|
|
121
|
+
* for it? Among the targets that CALL this function, true only for Cloudflare
|
|
122
|
+
* with `ssrStreaming: true`. `node` also mints one and is not among them —
|
|
123
|
+
* see the note in this module's header docblock.
|
|
108
124
|
*/
|
|
109
125
|
mintsNonce: boolean;
|
|
110
126
|
/**
|
|
@@ -133,7 +149,7 @@ interface DeployedSecurityHeaderLimits {
|
|
|
133
149
|
/**
|
|
134
150
|
* What the build tells the operator, once, per target.
|
|
135
151
|
*
|
|
136
|
-
* Silent degradation is the failure mode `
|
|
152
|
+
* Silent degradation is the failure mode `docs/program/three-target-parity.md` exists
|
|
137
153
|
* to prevent. Two things degrade quietly here and both are named rather than
|
|
138
154
|
* discovered in production: a CSP that refuses inline scripts on a deploy while
|
|
139
155
|
* allowing them locally, and an HTML document that never passes through the
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/adapters/security-headers.ts"],"mappings":";;;;;;;;;
|
|
1
|
+
{"version":3,"sources":["../../src/adapters/security-headers.ts"],"mappings":";;;;;;;;;AA2GO,SAAS,4BAA4B,QAAqD;AAC/F,SAAO;AAAA,IACL,mCAAmC,mCAAmC,MAAM,CAAC;AAAA,IAC7E;AAAA,EACF;AACF;AAEO,SAAS,mCACd,SACQ;AACR,SAAO,KAAK,UAAU,WAAW,CAAC,CAAC;AACrC;AAyBO,SAAS,oBAAoB,UAAoB,SAA2C;AACjG,aAAW,CAAC,KAAK,KAAK,KAAK,OAAO,QAAQ,OAAO,GAAG;AAClD,QAAI,CAAC,SAAS,QAAQ,IAAI,GAAG,EAAG,UAAS,QAAQ,IAAI,KAAK,KAAK;AAAA,EACjE;AACA,SAAO;AACT;AAkDO,SAAS,gCAAgC,QAA8C;AAC5F,QAAM,UAAU,qBAAqB,OAAO,mBAAmB,CAAC,GAAG,EAAE,YAAY,KAAK,CAAC;AACvF,QAAM,QAAQ,OAAO,KAAK,OAAO;AACjC,MAAI,MAAM,WAAW,GAAG;AACtB,WAAO,SAAS,OAAO,MAAM;AAAA,EAC/B;AAEA,QAAM,QAAQ;AAAA,IACZ,iDAA4C,OAAO,MAAM,eAAe,MAAM,KAAK,IAAI,CAAC;AAAA,EAC1F;AACA,QAAM,WAAW,MAAM,KAAK,CAAC,SAAS,KAAK,WAAW,yBAAyB,CAAC;AAChF,MAAI,YAAY,CAAC,OAAO,YAAY;AAClC,UAAM;AAAA,MACJ;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA,EACF;AACA,MAAI,OAAO,oBAAoB,uBAAuB;AACpD,UAAM;AAAA,MACJ;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA,EACF;AACA,MAAI,OAAO,oBAAoB,sBAAsB;AACnD,UAAM;AAAA,MACJ;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA,EACF;AACA,SAAO,MAAM,KAAK,IAAI;AACxB;","names":[]}
|
|
@@ -3,7 +3,7 @@ import "tsx/esm";
|
|
|
3
3
|
import {
|
|
4
4
|
agentCommand,
|
|
5
5
|
createAgentSsrLoader
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-HDAILYVM.js";
|
|
7
7
|
import "./chunk-BINRCILF.js";
|
|
8
8
|
import "./chunk-R7G2B2WH.js";
|
|
9
9
|
import "./chunk-Z7CJHDLS.js";
|
|
@@ -12,4 +12,4 @@ export {
|
|
|
12
12
|
agentCommand,
|
|
13
13
|
createAgentSsrLoader
|
|
14
14
|
};
|
|
15
|
-
//# sourceMappingURL=agent-
|
|
15
|
+
//# sourceMappingURL=agent-OWJ5A7W5.js.map
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import "tsx/esm";
|
|
3
|
-
import "./chunk-
|
|
3
|
+
import "./chunk-EDBQM6RB.js";
|
|
4
4
|
import "./chunk-BINRCILF.js";
|
|
5
5
|
import {
|
|
6
6
|
scanControllerModules
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-FNJVSFEC.js";
|
|
8
8
|
import "./chunk-WSMLSIS5.js";
|
|
9
|
-
import "./chunk-
|
|
9
|
+
import "./chunk-MX63AWEK.js";
|
|
10
10
|
import "./chunk-C27VRUVN.js";
|
|
11
11
|
import "./chunk-7UZZHCRN.js";
|
|
12
12
|
import {
|
|
@@ -411,4 +411,4 @@ export {
|
|
|
411
411
|
generateClientDts,
|
|
412
412
|
shouldReemitForFile
|
|
413
413
|
};
|
|
414
|
-
//# sourceMappingURL=app-typed-client-
|
|
414
|
+
//# sourceMappingURL=app-typed-client-2PTK2SJH.js.map
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
scanControllerModules
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-D7STTNQN.js";
|
|
4
4
|
import "./chunk-WBB3MEEN.js";
|
|
5
5
|
import "./chunk-WSOAN4KN.js";
|
|
6
6
|
import "./chunk-ENSFCKP6.js";
|
|
7
|
-
import "./chunk-
|
|
8
|
-
import "./chunk-
|
|
7
|
+
import "./chunk-2Z7TANA4.js";
|
|
8
|
+
import "./chunk-SYIQV4UH.js";
|
|
9
9
|
import "./chunk-P6OS7652.js";
|
|
10
10
|
import "./chunk-ZDUO4IYN.js";
|
|
11
11
|
import "./chunk-IDWN2OSG.js";
|
|
@@ -427,4 +427,4 @@ export {
|
|
|
427
427
|
generateClientDts,
|
|
428
428
|
shouldReemitForFile
|
|
429
429
|
};
|
|
430
|
-
//# sourceMappingURL=app-typed-client-
|
|
430
|
+
//# sourceMappingURL=app-typed-client-ILLQYTXP.js.map
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import "tsx/esm";
|
|
3
3
|
import {
|
|
4
4
|
deployedEntryPreamble
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-R36YNWBU.js";
|
|
6
6
|
import {
|
|
7
7
|
JSON_NOT_FOUND_RESPONSE,
|
|
8
8
|
agentsDirLiteral,
|
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
rateLimitCheckFragment,
|
|
15
15
|
scannedFromLoaderCache,
|
|
16
16
|
serverDirLiteral
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-SEGD3JUC.js";
|
|
18
18
|
import {
|
|
19
19
|
nodeAdapter
|
|
20
20
|
} from "./chunk-G7U7FQVC.js";
|
|
@@ -302,4 +302,4 @@ export {
|
|
|
302
302
|
renderAwsLambdaEntry,
|
|
303
303
|
responseToLambdaResultV2
|
|
304
304
|
};
|
|
305
|
-
//# sourceMappingURL=aws-lambda-
|
|
305
|
+
//# sourceMappingURL=aws-lambda-OP2L5RKZ.js.map
|
|
@@ -3,14 +3,14 @@ import "tsx/esm";
|
|
|
3
3
|
import {
|
|
4
4
|
describeControllerArtifacts,
|
|
5
5
|
emitControllerArtifacts
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-LOOOB46A.js";
|
|
7
7
|
import {
|
|
8
8
|
validateProjectStructure
|
|
9
9
|
} from "./chunk-GEQJAFSV.js";
|
|
10
10
|
import {
|
|
11
11
|
preflightNodeAndBindings
|
|
12
12
|
} from "./chunk-KTMQUYED.js";
|
|
13
|
-
import "./chunk-
|
|
13
|
+
import "./chunk-FNJVSFEC.js";
|
|
14
14
|
import "./chunk-C27VRUVN.js";
|
|
15
15
|
import "./chunk-7UZZHCRN.js";
|
|
16
16
|
import {
|
|
@@ -554,7 +554,7 @@ async function buildCommand(options) {
|
|
|
554
554
|
`);
|
|
555
555
|
}
|
|
556
556
|
async function runAdapterBuild(target, config, cwd) {
|
|
557
|
-
const { theoPluginAsync } = await import("./vite-plugin-
|
|
557
|
+
const { theoPluginAsync } = await import("./vite-plugin-54XIRMKT.js");
|
|
558
558
|
const { default: react } = await import("@vitejs/plugin-react");
|
|
559
559
|
const ctx = {
|
|
560
560
|
// `react()` may return Plugin or Plugin[] depending on version; spread the
|
|
@@ -608,7 +608,7 @@ async function runAdapterBuild(target, config, cwd) {
|
|
|
608
608
|
};
|
|
609
609
|
}
|
|
610
610
|
};
|
|
611
|
-
const { resolveAdapter } = await import("./registry-
|
|
611
|
+
const { resolveAdapter } = await import("./registry-L6JG75LY.js");
|
|
612
612
|
const adapter = await resolveAdapter(target);
|
|
613
613
|
const { warnUnappliedConfig, assertRateLimitEnforceable } = await import("./config-support-SB5NDQZB.js");
|
|
614
614
|
assertRateLimitEnforceable(config, adapter, target);
|
|
@@ -681,4 +681,4 @@ function relativize3(absPath, root) {
|
|
|
681
681
|
export {
|
|
682
682
|
buildCommand
|
|
683
683
|
};
|
|
684
|
-
//# sourceMappingURL=build-
|
|
684
|
+
//# sourceMappingURL=build-CVP2XU5M.js.map
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
import "tsx/esm";
|
|
3
3
|
import {
|
|
4
4
|
planDeployedPlugins
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-C43AHOHI.js";
|
|
6
6
|
import {
|
|
7
7
|
deployedEntryPreamble
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-R36YNWBU.js";
|
|
9
9
|
import {
|
|
10
10
|
agentsDirLiteral,
|
|
11
11
|
deployedAgentsFragment,
|
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
describeDeployedSecurityHeaders,
|
|
16
16
|
rateLimitCheckFragment,
|
|
17
17
|
serverDirLiteral
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-SEGD3JUC.js";
|
|
19
19
|
import {
|
|
20
20
|
nodeAdapter
|
|
21
21
|
} from "./chunk-G7U7FQVC.js";
|
|
@@ -259,4 +259,4 @@ export {
|
|
|
259
259
|
bunAdapter,
|
|
260
260
|
renderBunEntry
|
|
261
261
|
};
|
|
262
|
-
//# sourceMappingURL=bun-
|
|
262
|
+
//# sourceMappingURL=bun-CZXHPK2W.js.map
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
runZodValidation,
|
|
7
7
|
sendError,
|
|
8
8
|
sendJson
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-SYIQV4UH.js";
|
|
10
10
|
import {
|
|
11
11
|
enforceCsrf
|
|
12
12
|
} from "./chunk-P6OS7652.js";
|
|
@@ -1039,4 +1039,4 @@ export {
|
|
|
1039
1039
|
createCorsHandler,
|
|
1040
1040
|
createCorsWebHandler
|
|
1041
1041
|
};
|
|
1042
|
-
//# sourceMappingURL=chunk-
|
|
1042
|
+
//# sourceMappingURL=chunk-2Z7TANA4.js.map
|
|
@@ -16,7 +16,7 @@ import {
|
|
|
16
16
|
} from "./chunk-WBB3MEEN.js";
|
|
17
17
|
import {
|
|
18
18
|
createServerContext
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-SYIQV4UH.js";
|
|
20
20
|
import {
|
|
21
21
|
validateCsrfRequest
|
|
22
22
|
} from "./chunk-P6OS7652.js";
|
|
@@ -570,4 +570,4 @@ export {
|
|
|
570
570
|
createAgentSubjectResolver,
|
|
571
571
|
createSubjectResolverFromFactory
|
|
572
572
|
};
|
|
573
|
-
//# sourceMappingURL=chunk-
|
|
573
|
+
//# sourceMappingURL=chunk-6U67SO5U.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/adapters/deployed-plugins-module.ts"],"sourcesContent":["/**\n * The plugins module a build writes beside a deployed entry (usetheokit/theokit#425).\n *\n * ## What it is for\n *\n * `config.plugins` used to reach no deployed target at all, so `onRequest`, `preHandler`,\n * `onResponse` and `onError` were dead on every Web-standards deployment while firing locally. The\n * reason was never the hook loop — `executeRoute` has always run it — but that a constructed\n * plugin closes over state, and there is no literal for a closure.\n *\n * A plugin declared as a module SPECIFIER can be carried, because the build can emit a static\n * import for it. That is the road `renderBakedRoutes` already takes for route modules (#369):\n * resolve on the build machine, emit a static specifier, let the target's bundler see through it.\n *\n * ## Why the specifier is `../../`\n *\n * Every target that can carry plugins writes its entry two levels below the project root —\n * `.theokit/cloudflare/`, `.theokit/bun/`, `.theokit/deno/` — and a declared specifier is relative\n * to that root. The same arithmetic `renderBakedRoutes` does for routes, for the same reason.\n *\n * ## Which targets can carry them at all\n *\n * Only the ones whose output is BUNDLED from the project: Cloudflare (wrangler), Bun and Deno all\n * resolve the emitted import against the app's own source tree. Vercel, Netlify and AWS Lambda\n * receive a standalone function directory and never see the app's modules, so for them a named\n * refusal — which `findUnappliedConfig` already prints — remains the honest answer, and this module\n * is not called.\n */\n\n/**\n * A plugin the build was asked to carry and cannot.\n *\n * Its own type because the alternative is the defect this whole issue is: hooks that do not fire\n * and nothing that says so. A target that CAN carry a named module but was handed a closure has\n * something actionable to say, so it says it at build time rather than at the first request\n * (`docs/program/three-target-parity.md` § 3 — refuse by name).\n */\nexport class UnbakeablePluginError extends Error {\n constructor(index: number, name: string, target: string) {\n super(\n `plugins[${index}] (\"${name}\") cannot be carried to the ${target} target: it is a constructed ` +\n `plugin, and a closure has no literal a generated entry could hold. Declare it by module ` +\n `specifier instead — plugins: ['./src/plugins/${name}.ts'] — so the build can emit a ` +\n `static import for it. Both forms work locally; only the specifier survives a deploy.`,\n )\n this.name = 'UnbakeablePluginError'\n }\n}\n\nexport interface DeployedPluginsPlan {\n /** The module source to write beside the entry. */\n readonly source: string\n /** What the entry imports it as — a sibling, because both are written to the same directory. */\n readonly moduleSpecifier: string\n /** The declared specifiers, in order, for the build to report. */\n readonly specifiers: readonly string[]\n}\n\nconst MODULE_FILENAME = 'theo.plugins.mjs'\n\n/**\n * Plan the plugins module for a target that can carry one.\n *\n * @param plugins - the raw `config.plugins` array.\n * @param target - the deploy target, named in the refusal so the message says where it applies.\n * @returns `undefined` when the app declares no plugins, so an app carrying none emits nothing.\n * @throws UnbakeablePluginError when an entry is a constructed plugin rather than a specifier.\n */\nexport function planDeployedPlugins(\n plugins: readonly unknown[] | undefined,\n target: string,\n): DeployedPluginsPlan | undefined {\n if (plugins === undefined || plugins.length === 0) return undefined\n\n const specifiers = plugins.map((entry, index) => {\n if (typeof entry === 'string') return entry\n throw new UnbakeablePluginError(index, nameOf(entry), target)\n })\n\n const vars = specifiers.map((_, i) => `__theoPlugin${String(i)}`)\n\n return {\n moduleSpecifier: `./${MODULE_FILENAME}`,\n specifiers,\n source: [\n `// Generated by Theo — the plugins the deployed entry registers (usetheokit/theokit#425).`,\n `//`,\n `// Static imports, resolved on the build machine. A constructed plugin has no literal, which`,\n `// is why the config declares these by module specifier and why this file can exist at all.`,\n ...specifiers.map((s, i) => `import ${vars[i]} from '${entrySpecifier(s)}'`),\n ``,\n `// Order is DECLARED order, because plugin order is hook order.`,\n `export default { plugins: [${vars.join(', ')}] }`,\n ``,\n ].join('\\n'),\n }\n}\n\n/**\n * How the emitted module names a declared specifier.\n *\n * A RELATIVE specifier is relative to the project root, and the module sits two levels below it, so\n * it is re-based — the arithmetic `renderBakedRoutes` does for routes. A BARE specifier is a package\n * and must be left alone: `../../my-plugin-pkg` is a path that does not exist, where\n * `my-plugin-pkg` is a dependency the target's bundler resolves from `node_modules` like any other.\n */\nfunction entrySpecifier(specifier: string): string {\n if (!specifier.startsWith('.')) return specifier\n return `../../${specifier.replace(/^\\.\\/+/, '')}`\n}\n\n/** The plugin's own name when it has one, so the refusal names the thing the author wrote. */\nfunction nameOf(entry: unknown): string {\n if (entry != null && typeof entry === 'object') {\n const named = (entry as { name?: unknown }).name\n if (typeof named === 'string' && named.length > 0) return named\n }\n return 'unnamed'\n}\n"],"mappings":";;;;AAqCO,IAAM,wBAAN,cAAoC,MAAM;AAAA,EAC/C,YAAY,OAAe,MAAc,QAAgB;AACvD;AAAA,MACE,WAAW,KAAK,OAAO,IAAI,+BAA+B,MAAM,0KAEd,IAAI;AAAA,IAExD;AACA,SAAK,OAAO;AAAA,EACd;AACF;AAWA,IAAM,kBAAkB;AAUjB,SAAS,oBACd,SACA,QACiC;AACjC,MAAI,YAAY,UAAa,QAAQ,WAAW,EAAG,QAAO;AAE1D,QAAM,aAAa,QAAQ,IAAI,CAAC,OAAO,UAAU;AAC/C,QAAI,OAAO,UAAU,SAAU,QAAO;AACtC,UAAM,IAAI,sBAAsB,OAAO,OAAO,KAAK,GAAG,MAAM;AAAA,EAC9D,CAAC;AAED,QAAM,OAAO,WAAW,IAAI,CAAC,GAAG,MAAM,eAAe,OAAO,CAAC,CAAC,EAAE;AAEhE,SAAO;AAAA,IACL,iBAAiB,KAAK,eAAe;AAAA,IACrC;AAAA,IACA,QAAQ;AAAA,MACN;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA,GAAG,WAAW,IAAI,CAAC,GAAG,MAAM,UAAU,KAAK,CAAC,CAAC,UAAU,eAAe,CAAC,CAAC,GAAG;AAAA,MAC3E;AAAA,MACA;AAAA,MACA,8BAA8B,KAAK,KAAK,IAAI,CAAC;AAAA,MAC7C;AAAA,IACF,EAAE,KAAK,IAAI;AAAA,EACb;AACF;AAUA,SAAS,eAAe,WAA2B;AACjD,MAAI,CAAC,UAAU,WAAW,GAAG,EAAG,QAAO;AACvC,SAAO,SAAS,UAAU,QAAQ,UAAU,EAAE,CAAC;AACjD;AAGA,SAAS,OAAO,OAAwB;AACtC,MAAI,SAAS,QAAQ,OAAO,UAAU,UAAU;AAC9C,UAAM,QAAS,MAA6B;AAC5C,QAAI,OAAO,UAAU,YAAY,MAAM,SAAS,EAAG,QAAO;AAAA,EAC5D;AACA,SAAO;AACT;","names":[]}
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
} from "./chunk-O2KGDLA7.js";
|
|
5
5
|
import {
|
|
6
6
|
validateRouteInput
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-SYIQV4UH.js";
|
|
8
8
|
import {
|
|
9
9
|
evaluateRoutePolicy,
|
|
10
10
|
subjectFromContext
|
|
@@ -296,4 +296,4 @@ export {
|
|
|
296
296
|
callProcedure,
|
|
297
297
|
createOpenApiHandler
|
|
298
298
|
};
|
|
299
|
-
//# sourceMappingURL=chunk-
|
|
299
|
+
//# sourceMappingURL=chunk-CLSYYO5F.js.map
|
|
@@ -7,13 +7,13 @@ import {
|
|
|
7
7
|
} from "./chunk-SSYDEKWF.js";
|
|
8
8
|
import {
|
|
9
9
|
dispatchControllerRequest
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-D7STTNQN.js";
|
|
11
11
|
import {
|
|
12
12
|
createAgentSubjectResolver,
|
|
13
13
|
isAgentCardPath,
|
|
14
14
|
matchAgentAuxRoute,
|
|
15
15
|
serveMatchedAuxRoute
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-6U67SO5U.js";
|
|
17
17
|
import {
|
|
18
18
|
admitAgentRequest,
|
|
19
19
|
agentAccessDenied,
|
|
@@ -52,13 +52,13 @@ import {
|
|
|
52
52
|
executeAction,
|
|
53
53
|
executeRoute,
|
|
54
54
|
handleBatchRequest
|
|
55
|
-
} from "./chunk-
|
|
55
|
+
} from "./chunk-2Z7TANA4.js";
|
|
56
56
|
import {
|
|
57
57
|
createWebRequestSource,
|
|
58
58
|
incomingMessageToHandlerRequest,
|
|
59
59
|
sendError,
|
|
60
60
|
writeWebResponseToServerResponse
|
|
61
|
-
} from "./chunk-
|
|
61
|
+
} from "./chunk-SYIQV4UH.js";
|
|
62
62
|
import {
|
|
63
63
|
validateCsrfRequest
|
|
64
64
|
} from "./chunk-P6OS7652.js";
|
|
@@ -2297,15 +2297,19 @@ function buildAppTreeJs(options) {
|
|
|
2297
2297
|
const theme = options.theoUi?.theme ?? "violet-forge";
|
|
2298
2298
|
if (options.theoUi) {
|
|
2299
2299
|
return [
|
|
2300
|
-
`React.createElement(
|
|
2301
|
-
` React.createElement(
|
|
2302
|
-
` React.createElement(
|
|
2300
|
+
`React.createElement(NonceProvider, { nonce: options.nonce },`,
|
|
2301
|
+
` React.createElement(TheoUIProvider, { theme: { defaultTheme: '${theme}' } },`,
|
|
2302
|
+
` React.createElement(Suspense, { fallback: null },`,
|
|
2303
|
+
` React.createElement(StaticRouterProvider, { router, context, hydrate: false })`,
|
|
2304
|
+
` )`,
|
|
2303
2305
|
` )`,
|
|
2304
2306
|
` )`
|
|
2305
2307
|
].join("\n");
|
|
2306
2308
|
}
|
|
2307
|
-
return `React.createElement(
|
|
2308
|
-
React.createElement(
|
|
2309
|
+
return `React.createElement(NonceProvider, { nonce: options.nonce },
|
|
2310
|
+
React.createElement(Suspense, { fallback: null },
|
|
2311
|
+
React.createElement(StaticRouterProvider, { router, context, hydrate: false })
|
|
2312
|
+
)
|
|
2309
2313
|
)`;
|
|
2310
2314
|
}
|
|
2311
2315
|
function hydrationDataExtractSnippet() {
|
|
@@ -2327,6 +2331,7 @@ function generateSingleShotEntry(options) {
|
|
|
2327
2331
|
`import { createStaticHandler, createStaticRouter, StaticRouterProvider, matchRoutes } from 'react-router'`,
|
|
2328
2332
|
`import { PassThrough } from 'node:stream'`,
|
|
2329
2333
|
`import { routes, __theoPreloadMap, __theoPreloadPathsFor } from '/@theo/route-manifest'`,
|
|
2334
|
+
`import { NonceProvider } from 'theokit/client'`,
|
|
2330
2335
|
theoUiImport,
|
|
2331
2336
|
`export async function render(url, options = {}) {`,
|
|
2332
2337
|
// Resolve the matched pages BEFORE rendering.
|
|
@@ -2616,6 +2621,7 @@ function generateStreamingEntry(options) {
|
|
|
2616
2621
|
`import { renderToPipeableStream, renderToReadableStream } from 'react-dom/server'`,
|
|
2617
2622
|
`import { createStaticHandler, createStaticRouter, StaticRouterProvider, matchRoutes } from 'react-router'`,
|
|
2618
2623
|
`import { routes, __theoPreloadMap, __theoPreloadPathsFor } from '/@theo/route-manifest'`,
|
|
2624
|
+
`import { NonceProvider } from 'theokit/client'`,
|
|
2619
2625
|
theoUiImport,
|
|
2620
2626
|
``,
|
|
2621
2627
|
...streamingDocumentHelpers(),
|
|
@@ -3024,19 +3030,19 @@ async function theoPluginAsync(rootOrOptions) {
|
|
|
3024
3030
|
}
|
|
3025
3031
|
const { assetsMapPlugin } = await import("./assets-map-CV2YZ3MY.js");
|
|
3026
3032
|
const assetsMap = assetsMapPlugin({ appDir: resolve9(projectRoot, options.appDir ?? "app") });
|
|
3027
|
-
const { appTypedClientPlugin } = await import("./app-typed-client-
|
|
3033
|
+
const { appTypedClientPlugin } = await import("./app-typed-client-ILLQYTXP.js");
|
|
3028
3034
|
const appClientPlugin = appTypedClientPlugin({
|
|
3029
3035
|
cwd: projectRoot,
|
|
3030
3036
|
serverDir: serverDirAbs,
|
|
3031
3037
|
distDir: resolve9(projectRoot, ".theokit")
|
|
3032
3038
|
});
|
|
3033
|
-
const { actionsVirtualModule } = await import("./actions-virtual-module-
|
|
3039
|
+
const { actionsVirtualModule } = await import("./actions-virtual-module-OHENNMQG.js");
|
|
3034
3040
|
const actionsPlugin = actionsVirtualModule({
|
|
3035
3041
|
serverDir: serverDirAbs,
|
|
3036
3042
|
distDir: resolve9(projectRoot, ".theokit")
|
|
3037
3043
|
});
|
|
3038
3044
|
const { agentsTypedClientPlugin } = await import("./agents-typed-client-PVUZU65B.js");
|
|
3039
|
-
const { generateManifest } = await import("./internal-api-
|
|
3045
|
+
const { generateManifest } = await import("./internal-api-6XNLCNI5.js");
|
|
3040
3046
|
const agentsClientPlugin = agentsTypedClientPlugin({
|
|
3041
3047
|
projectRoot,
|
|
3042
3048
|
agentsDir: agentsDirName,
|
|
@@ -3053,7 +3059,7 @@ async function theoPluginAsync(rootOrOptions) {
|
|
|
3053
3059
|
const controllerTransformPlugin = controllerSwcTransformPlugin({
|
|
3054
3060
|
serverDir: serverDirAbs
|
|
3055
3061
|
});
|
|
3056
|
-
const { serverOnlyImportBoundary } = await import("./server-boundary-
|
|
3062
|
+
const { serverOnlyImportBoundary } = await import("./server-boundary-E5GFVPLB.js");
|
|
3057
3063
|
const serverBoundaryPlugin = serverOnlyImportBoundary({
|
|
3058
3064
|
projectRoot,
|
|
3059
3065
|
serverDir: serverDirAbs
|
|
@@ -3237,4 +3243,4 @@ export {
|
|
|
3237
3243
|
theoPluginAsync,
|
|
3238
3244
|
theoPlugin
|
|
3239
3245
|
};
|
|
3240
|
-
//# sourceMappingURL=chunk-
|
|
3246
|
+
//# sourceMappingURL=chunk-D3M7LPHY.js.map
|