theokit 0.60.0 → 0.61.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-DNOALUTX.js → actions-virtual-module-345YHSEB.js} +5 -5
- package/dist/{actions-virtual-module-UE5H42GP.js → actions-virtual-module-XI5IGBF4.js} +2 -2
- package/dist/adapters/agent-mount.d.ts +1 -1
- package/dist/adapters/agent-mount.js +2 -2
- package/dist/{agent-VWPSEDXD.js → agent-L45EZWPV.js} +2 -2
- package/dist/{app-typed-client-MKTSLES3.js → app-typed-client-B7QIRDSP.js} +5 -5
- package/dist/{app-typed-client-4KLNKET6.js → app-typed-client-GVP4V4X3.js} +2 -2
- package/dist/{build-RG54DH3F.js → build-22OMF3NG.js} +3 -3
- package/dist/{chunk-KQ27YDLG.js → chunk-4BQIJ4HE.js} +3 -3
- package/dist/{chunk-JW5UFKQ3.js → chunk-5AGNZXHJ.js} +2 -2
- package/dist/{chunk-ETKLM6UN.js → chunk-6R6UR64X.js} +7 -7
- package/dist/{chunk-YN4W7LCX.js → chunk-ENRT6DAU.js} +6 -1
- package/dist/chunk-ENRT6DAU.js.map +1 -0
- package/dist/{chunk-DMODPX7P.js → chunk-H2X5T45M.js} +2 -2
- package/dist/{chunk-GZ5YHD5H.js → chunk-KVZQJ3ZM.js} +6 -1
- package/dist/chunk-KVZQJ3ZM.js.map +1 -0
- package/dist/{chunk-XES7ZE2K.js → chunk-L2NSHQOY.js} +2 -2
- package/dist/{chunk-KZ3PXNPT.js → chunk-MIPHNT4J.js} +3 -3
- package/dist/chunk-MIPHNT4J.js.map +1 -0
- package/dist/{chunk-WOANPZBT.js → chunk-Q3UE7WIM.js} +2 -2
- package/dist/{chunk-IZTOGKLS.js → chunk-YXEKPMDK.js} +2 -2
- package/dist/{chunk-K3DUUEQ5.js → chunk-ZXJAI4J7.js} +9 -9
- package/dist/cli/index.js +6 -6
- package/dist/{dev-5ETOFKOP.js → dev-BDODXUEA.js} +4 -4
- package/dist/{index-ADEV6pen.d.ts → index-BXGSBlxf.d.ts} +1 -1
- package/dist/index.js +5 -5
- package/dist/{internal-api-UM77XDXN.js → internal-api-QKWTQ2Q7.js} +2 -2
- package/dist/{internal-api-3YDGG5FF.js → internal-api-VRUDDBEG.js} +5 -5
- package/dist/{mcp-B42ISIJG.js → mcp-WMZSXQQG.js} +2 -2
- package/dist/{preview-XP77EPTL.js → preview-GUEKVBGL.js} +3 -3
- package/dist/{route-config-Cm_ZMA1C.d.ts → route-config-B7FaTSby.d.ts} +1 -1
- package/dist/{route-policy-BxOycCDq.d.ts → route-policy-BHXQDzBF.d.ts} +20 -1
- package/dist/server/define/index.d.ts +5 -4
- package/dist/server/define/index.js +1 -1
- package/dist/server/http/index.d.ts +3 -3
- package/dist/server/http/index.js +3 -3
- package/dist/server/index.d.ts +4 -4
- package/dist/server/index.js +3 -3
- package/dist/{server-boundary-X52AMCKI.js → server-boundary-7BRS2CWI.js} +2 -2
- package/dist/{server-boundary-JG53VI6L.js → server-boundary-OEBKNBEP.js} +5 -5
- package/dist/{start-3FYIYTM7.js → start-AKMBT3DW.js} +4 -4
- package/dist/vite-plugin/index.js +5 -5
- package/dist/{vite-plugin-BG5K3L46.js → vite-plugin-37OQ5RDR.js} +4 -4
- package/package.json +3 -3
- package/dist/chunk-GZ5YHD5H.js.map +0 -1
- package/dist/chunk-KZ3PXNPT.js.map +0 -1
- package/dist/chunk-YN4W7LCX.js.map +0 -1
- /package/dist/{actions-virtual-module-DNOALUTX.js.map → actions-virtual-module-345YHSEB.js.map} +0 -0
- /package/dist/{actions-virtual-module-UE5H42GP.js.map → actions-virtual-module-XI5IGBF4.js.map} +0 -0
- /package/dist/{agent-VWPSEDXD.js.map → agent-L45EZWPV.js.map} +0 -0
- /package/dist/{app-typed-client-MKTSLES3.js.map → app-typed-client-B7QIRDSP.js.map} +0 -0
- /package/dist/{app-typed-client-4KLNKET6.js.map → app-typed-client-GVP4V4X3.js.map} +0 -0
- /package/dist/{build-RG54DH3F.js.map → build-22OMF3NG.js.map} +0 -0
- /package/dist/{chunk-KQ27YDLG.js.map → chunk-4BQIJ4HE.js.map} +0 -0
- /package/dist/{chunk-JW5UFKQ3.js.map → chunk-5AGNZXHJ.js.map} +0 -0
- /package/dist/{chunk-ETKLM6UN.js.map → chunk-6R6UR64X.js.map} +0 -0
- /package/dist/{chunk-DMODPX7P.js.map → chunk-H2X5T45M.js.map} +0 -0
- /package/dist/{chunk-XES7ZE2K.js.map → chunk-L2NSHQOY.js.map} +0 -0
- /package/dist/{chunk-WOANPZBT.js.map → chunk-Q3UE7WIM.js.map} +0 -0
- /package/dist/{chunk-IZTOGKLS.js.map → chunk-YXEKPMDK.js.map} +0 -0
- /package/dist/{chunk-K3DUUEQ5.js.map → chunk-ZXJAI4J7.js.map} +0 -0
- /package/dist/{dev-5ETOFKOP.js.map → dev-BDODXUEA.js.map} +0 -0
- /package/dist/{internal-api-UM77XDXN.js.map → internal-api-QKWTQ2Q7.js.map} +0 -0
- /package/dist/{internal-api-3YDGG5FF.js.map → internal-api-VRUDDBEG.js.map} +0 -0
- /package/dist/{mcp-B42ISIJG.js.map → mcp-WMZSXQQG.js.map} +0 -0
- /package/dist/{preview-XP77EPTL.js.map → preview-GUEKVBGL.js.map} +0 -0
- /package/dist/{server-boundary-X52AMCKI.js.map → server-boundary-7BRS2CWI.js.map} +0 -0
- /package/dist/{server-boundary-JG53VI6L.js.map → server-boundary-OEBKNBEP.js.map} +0 -0
- /package/dist/{start-3FYIYTM7.js.map → start-AKMBT3DW.js.map} +0 -0
- /package/dist/{vite-plugin-BG5K3L46.js.map → vite-plugin-37OQ5RDR.js.map} +0 -0
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import "./chunk-
|
|
2
|
-
import "./chunk-
|
|
1
|
+
import "./chunk-Q3UE7WIM.js";
|
|
2
|
+
import "./chunk-H2X5T45M.js";
|
|
3
3
|
import "./chunk-EYRWD2AB.js";
|
|
4
4
|
import "./chunk-5GZROLDV.js";
|
|
5
|
-
import "./chunk-
|
|
5
|
+
import "./chunk-5AGNZXHJ.js";
|
|
6
6
|
import "./chunk-P6OS7652.js";
|
|
7
7
|
import "./chunk-ZDUO4IYN.js";
|
|
8
8
|
import "./chunk-D4VP2QPR.js";
|
|
9
|
-
import "./chunk-
|
|
9
|
+
import "./chunk-ENRT6DAU.js";
|
|
10
10
|
import "./chunk-47FFT43U.js";
|
|
11
11
|
import "./chunk-NTDN54XO.js";
|
|
12
12
|
import "./chunk-PVNMLZ5G.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-345YHSEB.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import "tsx/esm";
|
|
3
|
-
import "./chunk-
|
|
3
|
+
import "./chunk-KVZQJ3ZM.js";
|
|
4
4
|
import "./chunk-WFIAYPBH.js";
|
|
5
5
|
import "./chunk-L4TB6FXQ.js";
|
|
6
6
|
import "./chunk-VV2VU3LJ.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-XI5IGBF4.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as RouteSubject, R as RoutePolicy } from '../route-policy-
|
|
1
|
+
import { a as RouteSubject, R as RoutePolicy } from '../route-policy-BHXQDzBF.js';
|
|
2
2
|
import { C as CsrfMode } from '../csrf-Dgot9qSM.js';
|
|
3
3
|
export { r as resolveProvider } from '../provider-resolver-1aWi_WSz.js';
|
|
4
4
|
export { s as scanAgents } from '../agent-scan-BZa-pagG.js';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
2
|
mountAgent
|
|
3
|
-
} from "../chunk-
|
|
3
|
+
} from "../chunk-H2X5T45M.js";
|
|
4
4
|
import "../chunk-P6OS7652.js";
|
|
5
|
-
import "../chunk-
|
|
5
|
+
import "../chunk-ENRT6DAU.js";
|
|
6
6
|
import "../chunk-PVNMLZ5G.js";
|
|
7
7
|
import "../chunk-ZDCCILMP.js";
|
|
8
8
|
import "../chunk-CHTAWXC2.js";
|
|
@@ -3,7 +3,7 @@ import "tsx/esm";
|
|
|
3
3
|
import {
|
|
4
4
|
agentCommand,
|
|
5
5
|
createAgentSsrLoader
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-YXEKPMDK.js";
|
|
7
7
|
import "./chunk-WFIAYPBH.js";
|
|
8
8
|
import "./chunk-5NNFO7R7.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-L45EZWPV.js.map
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import {
|
|
2
2
|
scanControllerModules
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-Q3UE7WIM.js";
|
|
4
|
+
import "./chunk-H2X5T45M.js";
|
|
5
5
|
import "./chunk-EYRWD2AB.js";
|
|
6
6
|
import "./chunk-5GZROLDV.js";
|
|
7
|
-
import "./chunk-
|
|
7
|
+
import "./chunk-5AGNZXHJ.js";
|
|
8
8
|
import "./chunk-P6OS7652.js";
|
|
9
9
|
import "./chunk-ZDUO4IYN.js";
|
|
10
10
|
import "./chunk-D4VP2QPR.js";
|
|
11
|
-
import "./chunk-
|
|
11
|
+
import "./chunk-ENRT6DAU.js";
|
|
12
12
|
import "./chunk-47FFT43U.js";
|
|
13
13
|
import "./chunk-NTDN54XO.js";
|
|
14
14
|
import "./chunk-PVNMLZ5G.js";
|
|
@@ -427,4 +427,4 @@ export {
|
|
|
427
427
|
generateClientDts,
|
|
428
428
|
shouldReemitForFile
|
|
429
429
|
};
|
|
430
|
-
//# sourceMappingURL=app-typed-client-
|
|
430
|
+
//# sourceMappingURL=app-typed-client-B7QIRDSP.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import "tsx/esm";
|
|
3
|
-
import "./chunk-
|
|
3
|
+
import "./chunk-KVZQJ3ZM.js";
|
|
4
4
|
import "./chunk-WFIAYPBH.js";
|
|
5
5
|
import {
|
|
6
6
|
scanControllerModules
|
|
@@ -411,4 +411,4 @@ export {
|
|
|
411
411
|
generateClientDts,
|
|
412
412
|
shouldReemitForFile
|
|
413
413
|
};
|
|
414
|
-
//# sourceMappingURL=app-typed-client-
|
|
414
|
+
//# sourceMappingURL=app-typed-client-GVP4V4X3.js.map
|
|
@@ -3,7 +3,7 @@ import "tsx/esm";
|
|
|
3
3
|
import {
|
|
4
4
|
describeControllerArtifacts,
|
|
5
5
|
emitControllerArtifacts
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-MIPHNT4J.js";
|
|
7
7
|
import {
|
|
8
8
|
validateProjectStructure
|
|
9
9
|
} from "./chunk-GEQJAFSV.js";
|
|
@@ -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-37OQ5RDR.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
|
|
@@ -676,4 +676,4 @@ function relativize3(absPath, root) {
|
|
|
676
676
|
export {
|
|
677
677
|
buildCommand
|
|
678
678
|
};
|
|
679
|
-
//# sourceMappingURL=build-
|
|
679
|
+
//# sourceMappingURL=build-22OMF3NG.js.map
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
validateRouteInput
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-5AGNZXHJ.js";
|
|
4
4
|
import {
|
|
5
5
|
evaluateRoutePolicy,
|
|
6
6
|
subjectFromContext
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-ENRT6DAU.js";
|
|
8
8
|
|
|
9
9
|
// src/server/http/error-pages.ts
|
|
10
10
|
import { closeSync, fstatSync, openSync, readFileSync } from "node:fs";
|
|
@@ -270,4 +270,4 @@ export {
|
|
|
270
270
|
callProcedure,
|
|
271
271
|
createOpenApiHandler
|
|
272
272
|
};
|
|
273
|
-
//# sourceMappingURL=chunk-
|
|
273
|
+
//# sourceMappingURL=chunk-4BQIJ4HE.js.map
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
import {
|
|
13
13
|
evaluateRoutePolicy,
|
|
14
14
|
subjectFromContext
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-ENRT6DAU.js";
|
|
16
16
|
import {
|
|
17
17
|
DuplicateContextKeyError,
|
|
18
18
|
createOutbox,
|
|
@@ -1702,4 +1702,4 @@ export {
|
|
|
1702
1702
|
createCorsHandler,
|
|
1703
1703
|
createCorsWebHandler
|
|
1704
1704
|
};
|
|
1705
|
-
//# sourceMappingURL=chunk-
|
|
1705
|
+
//# sourceMappingURL=chunk-5AGNZXHJ.js.map
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
serveMatchedAuxRoute,
|
|
13
13
|
serveThroughPluginLifecycle,
|
|
14
14
|
setupSsrDevMiddleware
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-L2NSHQOY.js";
|
|
16
16
|
import {
|
|
17
17
|
resolveTheoRootDir
|
|
18
18
|
} from "./chunk-FDOOBTXJ.js";
|
|
@@ -38,7 +38,7 @@ import {
|
|
|
38
38
|
mountAgent,
|
|
39
39
|
readAgentPolicy,
|
|
40
40
|
writeWebResponseToServerResponse
|
|
41
|
-
} from "./chunk-
|
|
41
|
+
} from "./chunk-KVZQJ3ZM.js";
|
|
42
42
|
import {
|
|
43
43
|
getApprovalRegistry,
|
|
44
44
|
resolveProvider
|
|
@@ -2179,19 +2179,19 @@ async function theoPluginAsync(rootOrOptions) {
|
|
|
2179
2179
|
})
|
|
2180
2180
|
);
|
|
2181
2181
|
}
|
|
2182
|
-
const { appTypedClientPlugin } = await import("./app-typed-client-
|
|
2182
|
+
const { appTypedClientPlugin } = await import("./app-typed-client-GVP4V4X3.js");
|
|
2183
2183
|
const appClientPlugin = appTypedClientPlugin({
|
|
2184
2184
|
cwd: projectRoot,
|
|
2185
2185
|
serverDir: serverDirAbs,
|
|
2186
2186
|
distDir: resolve5(projectRoot, ".theokit")
|
|
2187
2187
|
});
|
|
2188
|
-
const { actionsVirtualModule } = await import("./actions-virtual-module-
|
|
2188
|
+
const { actionsVirtualModule } = await import("./actions-virtual-module-XI5IGBF4.js");
|
|
2189
2189
|
const actionsPlugin = actionsVirtualModule({
|
|
2190
2190
|
serverDir: serverDirAbs,
|
|
2191
2191
|
distDir: resolve5(projectRoot, ".theokit")
|
|
2192
2192
|
});
|
|
2193
2193
|
const { agentsTypedClientPlugin } = await import("./agents-typed-client-D4OA2TXB.js");
|
|
2194
|
-
const { generateManifest } = await import("./internal-api-
|
|
2194
|
+
const { generateManifest } = await import("./internal-api-QKWTQ2Q7.js");
|
|
2195
2195
|
const agentsClientPlugin = agentsTypedClientPlugin({
|
|
2196
2196
|
projectRoot,
|
|
2197
2197
|
agentsDir: agentsDirName,
|
|
@@ -2208,7 +2208,7 @@ async function theoPluginAsync(rootOrOptions) {
|
|
|
2208
2208
|
const controllerTransformPlugin = controllerSwcTransformPlugin({
|
|
2209
2209
|
serverDir: serverDirAbs
|
|
2210
2210
|
});
|
|
2211
|
-
const { serverOnlyImportBoundary } = await import("./server-boundary-
|
|
2211
|
+
const { serverOnlyImportBoundary } = await import("./server-boundary-7BRS2CWI.js");
|
|
2212
2212
|
const serverBoundaryPlugin = serverOnlyImportBoundary({
|
|
2213
2213
|
projectRoot,
|
|
2214
2214
|
serverDir: serverDirAbs
|
|
@@ -2383,4 +2383,4 @@ export {
|
|
|
2383
2383
|
theoPluginAsync,
|
|
2384
2384
|
theoPlugin
|
|
2385
2385
|
};
|
|
2386
|
-
//# sourceMappingURL=chunk-
|
|
2386
|
+
//# sourceMappingURL=chunk-6R6UR64X.js.map
|
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
// src/core/contracts/route-policy.ts
|
|
2
2
|
function subjectFromContext(context) {
|
|
3
3
|
if (context === null || typeof context !== "object") return null;
|
|
4
|
+
if (typeof context.getRequest === "function" && !("subject" in context)) {
|
|
5
|
+
throw new TypeError(
|
|
6
|
+
"subjectFromContext was given a controller ExecutionContext, which carries no subject \u2014 it would answer null for every caller and a guard built on that denies everyone. Read the subject from the request instead (e.g. your session manager over `context.getRequest()`), or use `@Public()` when the route is genuinely open."
|
|
7
|
+
);
|
|
8
|
+
}
|
|
4
9
|
const candidate = context.subject;
|
|
5
10
|
if (candidate === null || candidate === void 0 || typeof candidate !== "object") return null;
|
|
6
11
|
const id = candidate.id;
|
|
@@ -28,4 +33,4 @@ export {
|
|
|
28
33
|
evaluateRoutePolicy,
|
|
29
34
|
requireOwner
|
|
30
35
|
};
|
|
31
|
-
//# sourceMappingURL=chunk-
|
|
36
|
+
//# sourceMappingURL=chunk-ENRT6DAU.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/core/contracts/route-policy.ts"],"mappings":";AAyDO,SAAS,mBAAmB,SAAuC;AACxE,MAAI,YAAY,QAAQ,OAAO,YAAY,SAAU,QAAO;AAI5D,MACE,OAAQ,QAAqC,eAAe,cAC5D,EAAE,aAAa,UACf;AACA,UAAM,IAAI;AAAA,MACR;AAAA,IAIF;AAAA,EACF;AACA,QAAM,YAAa,QAAkC;AACrD,MAAI,cAAc,QAAQ,cAAc,UAAa,OAAO,cAAc,SAAU,QAAO;AAC3F,QAAM,KAAM,UAA+B;AAC3C,SAAO,OAAO,OAAO,YAAY,GAAG,SAAS,IAAK,YAA6B;AACjF;AAoBA,eAAsB,oBACpB,QACA,OACyB;AACzB,MAAI,WAAW,OAAW,QAAO,EAAE,SAAS,KAAK;AACjD,MAAI,WAAW,SAAU,QAAO,EAAE,SAAS,KAAK;AAEhD,QAAM,UAAU,MAAM,OAAO,KAAK;AAClC,MAAI,OAAO,YAAY,WAAW;AAChC,WAAO,UAAU,EAAE,SAAS,KAAK,IAAI,EAAE,SAAS,OAAO,QAAQ,gCAAgC;AAAA,EACjG;AACA,SAAO;AACT;AASO,SAAS,aACd,SACA,SACgB;AAChB,MAAI,YAAY,KAAM,QAAO,EAAE,SAAS,OAAO,QAAQ,oBAAoB;AAC3E,MAAI,OAAO,YAAY,YAAY,QAAQ,WAAW,GAAG;AAIvD,WAAO,EAAE,SAAS,OAAO,QAAQ,iCAAiC;AAAA,EACpE;AACA,SAAO,QAAQ,OAAO,UAClB,EAAE,SAAS,KAAK,IAChB,EAAE,SAAS,OAAO,QAAQ,qCAAqC;AACrE;","names":[]}
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
} from "./chunk-P6OS7652.js";
|
|
4
4
|
import {
|
|
5
5
|
evaluateRoutePolicy
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-ENRT6DAU.js";
|
|
7
7
|
import {
|
|
8
8
|
createObservabilityPlugin,
|
|
9
9
|
requestTrace,
|
|
@@ -805,4 +805,4 @@ export {
|
|
|
805
805
|
parseAgentRequestBody,
|
|
806
806
|
mountAgent
|
|
807
807
|
};
|
|
808
|
-
//# sourceMappingURL=chunk-
|
|
808
|
+
//# sourceMappingURL=chunk-H2X5T45M.js.map
|
|
@@ -209,6 +209,11 @@ function isAuthRequiredError(err) {
|
|
|
209
209
|
// src/core/contracts/route-policy.ts
|
|
210
210
|
function subjectFromContext(context) {
|
|
211
211
|
if (context === null || typeof context !== "object") return null;
|
|
212
|
+
if (typeof context.getRequest === "function" && !("subject" in context)) {
|
|
213
|
+
throw new TypeError(
|
|
214
|
+
"subjectFromContext was given a controller ExecutionContext, which carries no subject \u2014 it would answer null for every caller and a guard built on that denies everyone. Read the subject from the request instead (e.g. your session manager over `context.getRequest()`), or use `@Public()` when the route is genuinely open."
|
|
215
|
+
);
|
|
216
|
+
}
|
|
212
217
|
const candidate = context.subject;
|
|
213
218
|
if (candidate === null || candidate === void 0 || typeof candidate !== "object") return null;
|
|
214
219
|
const id = candidate.id;
|
|
@@ -2616,4 +2621,4 @@ export {
|
|
|
2616
2621
|
CsrfReadinessStore,
|
|
2617
2622
|
applySecurityHeaders
|
|
2618
2623
|
};
|
|
2619
|
-
//# sourceMappingURL=chunk-
|
|
2624
|
+
//# sourceMappingURL=chunk-KVZQJ3ZM.js.map
|