theokit 0.48.7 → 0.48.9
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/README.md +86 -0
- package/dist/{actions-virtual-module-GB5FWUPS.js → actions-virtual-module-LB4NGONI.js} +2 -3
- package/dist/{actions-virtual-module-GB5FWUPS.js.map → actions-virtual-module-LB4NGONI.js.map} +1 -1
- package/dist/{agent-47XWDGIR.js → agent-SK4TOO6M.js} +2 -2
- package/dist/{app-typed-client-5QDNHANF.js → app-typed-client-G3J5G7E5.js} +2 -3
- package/dist/{app-typed-client-5QDNHANF.js.map → app-typed-client-G3J5G7E5.js.map} +1 -1
- package/dist/{build-4CAGKYYT.js → build-FMRO4W4Q.js} +4 -4
- package/dist/{chunk-H6YBKIUN.js → chunk-BIVCP6X5.js} +575 -161
- package/dist/chunk-BIVCP6X5.js.map +1 -0
- package/dist/{chunk-UDPJP42U.js → chunk-GPX7I5ZY.js} +31 -4
- package/dist/chunk-GPX7I5ZY.js.map +1 -0
- package/dist/{chunk-3GUXSNHY.js → chunk-GRI4XHBJ.js} +86 -3
- package/dist/chunk-GRI4XHBJ.js.map +1 -0
- package/dist/{chunk-A4ZEP3FE.js → chunk-GVW5EKEU.js} +11 -2
- package/dist/chunk-GVW5EKEU.js.map +1 -0
- package/dist/{chunk-AXQF3I4L.js → chunk-Q2S2IGSM.js} +40 -123
- package/dist/chunk-Q2S2IGSM.js.map +1 -0
- package/dist/{chunk-GH32R55S.js → chunk-S433N3CT.js} +2 -2
- package/dist/{chunk-JZ25BBLP.js → chunk-SO64VQOD.js} +4 -4
- package/dist/chunk-V7MTRM6Q.js +90 -0
- package/dist/chunk-V7MTRM6Q.js.map +1 -0
- package/dist/{chunk-XSCZWSE3.js → chunk-YML4ZDFA.js} +11 -2
- package/dist/chunk-YML4ZDFA.js.map +1 -0
- package/dist/cli/index.js +19 -9
- package/dist/cli/index.js.map +1 -1
- package/dist/cookies-QWVS7OGS.js +23 -0
- package/dist/{dev-F67X4F5E.js → dev-P2MODWTG.js} +6 -7
- package/dist/{dev-F67X4F5E.js.map → dev-P2MODWTG.js.map} +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -1
- package/dist/{info-MSBQ72EM.js → info-XW7HGUPH.js} +3 -3
- package/dist/{internal-api-ICU7ITJD.js → internal-api-V5L65YSJ.js} +7 -9
- package/dist/{load-config-2LP2OEKD.js → load-config-VKD6LKWU.js} +3 -3
- package/dist/{mcp-AJHKPAU4.js → mcp-EQHTPQ2L.js} +3 -3
- package/dist/{openapi-FWNYHB6T.js → openapi-HZXR335W.js} +3 -3
- package/dist/{routes-6AMNVFMI.js → routes-OLNQX7CT.js} +3 -3
- package/dist/{schema-Z3Y7SFLE.js → schema-ZO3OSWVG.js} +2 -2
- package/dist/server/index.js +1 -1
- package/dist/server/rate-limit/index.d.ts +49 -1
- package/dist/server/rate-limit/index.js +1 -1
- package/dist/{start-IITIEJTY.js → start-KR2JJR7K.js} +149 -20
- package/dist/start-KR2JJR7K.js.map +1 -0
- package/dist/vite-plugin/index.js +1 -1
- package/dist/{vite-plugin-MXHY6MSV.js → vite-plugin-EQMDMDXV.js} +6 -7
- package/dist/vite-plugin-EQMDMDXV.js.map +1 -0
- package/package.json +11 -1
- package/dist/chunk-3GUXSNHY.js.map +0 -1
- package/dist/chunk-7CQ6DEWZ.js +0 -421
- package/dist/chunk-7CQ6DEWZ.js.map +0 -1
- package/dist/chunk-A4ZEP3FE.js.map +0 -1
- package/dist/chunk-AXQF3I4L.js.map +0 -1
- package/dist/chunk-H6YBKIUN.js.map +0 -1
- package/dist/chunk-UDPJP42U.js.map +0 -1
- package/dist/chunk-XSCZWSE3.js.map +0 -1
- package/dist/start-IITIEJTY.js.map +0 -1
- /package/dist/{agent-47XWDGIR.js.map → agent-SK4TOO6M.js.map} +0 -0
- /package/dist/{build-4CAGKYYT.js.map → build-FMRO4W4Q.js.map} +0 -0
- /package/dist/{chunk-GH32R55S.js.map → chunk-S433N3CT.js.map} +0 -0
- /package/dist/{chunk-JZ25BBLP.js.map → chunk-SO64VQOD.js.map} +0 -0
- /package/dist/{internal-api-ICU7ITJD.js.map → cookies-QWVS7OGS.js.map} +0 -0
- /package/dist/{info-MSBQ72EM.js.map → info-XW7HGUPH.js.map} +0 -0
- /package/dist/{load-config-2LP2OEKD.js.map → internal-api-V5L65YSJ.js.map} +0 -0
- /package/dist/{schema-Z3Y7SFLE.js.map → load-config-VKD6LKWU.js.map} +0 -0
- /package/dist/{mcp-AJHKPAU4.js.map → mcp-EQHTPQ2L.js.map} +0 -0
- /package/dist/{openapi-FWNYHB6T.js.map → openapi-HZXR335W.js.map} +0 -0
- /package/dist/{routes-6AMNVFMI.js.map → routes-OLNQX7CT.js.map} +0 -0
- /package/dist/{vite-plugin-MXHY6MSV.js.map → schema-ZO3OSWVG.js.map} +0 -0
|
@@ -2,27 +2,24 @@
|
|
|
2
2
|
import "tsx/esm";
|
|
3
3
|
import {
|
|
4
4
|
handleAgentApproval,
|
|
5
|
-
hoistHeadTags,
|
|
6
5
|
isAgentCardPath,
|
|
7
6
|
isApprovalPath,
|
|
8
7
|
isListApprovalsPath,
|
|
9
8
|
resolveTransformer,
|
|
10
9
|
serveAgentAuxRoute,
|
|
10
|
+
setupSsrDevMiddleware,
|
|
11
11
|
writeWebResponseToServerResponse
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-GRI4XHBJ.js";
|
|
13
13
|
import {
|
|
14
14
|
isMcpPath
|
|
15
15
|
} from "./chunk-2CVV6CNN.js";
|
|
16
|
-
import {
|
|
17
|
-
findRootDiv
|
|
18
|
-
} from "./chunk-3PWQQWT6.js";
|
|
19
16
|
import {
|
|
20
17
|
isRouteFile,
|
|
21
18
|
scanRoutes
|
|
22
19
|
} from "./chunk-IEES3CHD.js";
|
|
23
20
|
import {
|
|
24
21
|
loadConfig
|
|
25
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-S433N3CT.js";
|
|
26
23
|
import {
|
|
27
24
|
buildServicesProxyConfig
|
|
28
25
|
} from "./chunk-7VPQHEAJ.js";
|
|
@@ -34,23 +31,20 @@ import {
|
|
|
34
31
|
CSP_REPORT_PATH,
|
|
35
32
|
CsrfReadinessStore,
|
|
36
33
|
TRACE_HEADER,
|
|
37
|
-
createCorsHandler,
|
|
38
|
-
extractTraceId,
|
|
39
|
-
handleBatchRequest,
|
|
40
|
-
handleCspReport,
|
|
41
|
-
handleCsrfReadiness
|
|
42
|
-
} from "./chunk-7CQ6DEWZ.js";
|
|
43
|
-
import {
|
|
44
34
|
applySecurityHeaders,
|
|
35
|
+
createCorsHandler,
|
|
45
36
|
createPluginRunnerFromConfig,
|
|
46
37
|
createRateLimiter,
|
|
47
38
|
createViteLoader,
|
|
48
39
|
executeAction,
|
|
49
40
|
executeRoute,
|
|
41
|
+
extractTraceId,
|
|
50
42
|
findSuggestion,
|
|
51
|
-
|
|
43
|
+
handleBatchRequest,
|
|
44
|
+
handleCspReport,
|
|
45
|
+
handleCsrfReadiness,
|
|
52
46
|
mountAgent
|
|
53
|
-
} from "./chunk-
|
|
47
|
+
} from "./chunk-BIVCP6X5.js";
|
|
54
48
|
import {
|
|
55
49
|
getApprovalRegistry,
|
|
56
50
|
resolveProvider
|
|
@@ -74,7 +68,7 @@ import {
|
|
|
74
68
|
|
|
75
69
|
// src/vite-plugin/index.ts
|
|
76
70
|
import { existsSync as existsSync7 } from "fs";
|
|
77
|
-
import { resolve as
|
|
71
|
+
import { resolve as resolve6, dirname as dirname4 } from "path";
|
|
78
72
|
import { fileURLToPath } from "url";
|
|
79
73
|
|
|
80
74
|
// src/vite-plugin/config-hook.ts
|
|
@@ -293,7 +287,7 @@ async function resolvePluginConfig(projectRoot) {
|
|
|
293
287
|
}
|
|
294
288
|
|
|
295
289
|
// src/vite-plugin/configure-server-hook.ts
|
|
296
|
-
import { resolve as
|
|
290
|
+
import { resolve as resolve3, basename } from "path";
|
|
297
291
|
|
|
298
292
|
// src/devtools/server-side/route-manifest.ts
|
|
299
293
|
function buildPath(parents, segment) {
|
|
@@ -621,10 +615,10 @@ async function handleBatchIfMatch(req, res, ctx) {
|
|
|
621
615
|
async function handleBatchInline(req, res, batching, requestId) {
|
|
622
616
|
try {
|
|
623
617
|
const chunks = [];
|
|
624
|
-
await new Promise((
|
|
618
|
+
await new Promise((resolve7, reject) => {
|
|
625
619
|
req.on("data", (c) => chunks.push(c));
|
|
626
620
|
req.on("end", () => {
|
|
627
|
-
|
|
621
|
+
resolve7();
|
|
628
622
|
});
|
|
629
623
|
req.on("error", reject);
|
|
630
624
|
});
|
|
@@ -811,83 +805,6 @@ function createApiMiddleware(vite, serverDir, rateLimitConfigOrOptions) {
|
|
|
811
805
|
};
|
|
812
806
|
}
|
|
813
807
|
|
|
814
|
-
// src/vite-plugin/ssr-dev-middleware.ts
|
|
815
|
-
import { readFileSync as readFileSync2 } from "fs";
|
|
816
|
-
import { resolve as resolve3 } from "path";
|
|
817
|
-
function applyNonceToInlineScripts(html, nonce) {
|
|
818
|
-
return html.replace(
|
|
819
|
-
/<script(?![^>]*\ssrc=)(?![^>]*\snonce=)([^>]*)>/gi,
|
|
820
|
-
`<script nonce="${nonce}"$1>`
|
|
821
|
-
);
|
|
822
|
-
}
|
|
823
|
-
function isSsrRenderResult(value) {
|
|
824
|
-
if (typeof value !== "object" || value === null) return false;
|
|
825
|
-
if (!("html" in value)) return false;
|
|
826
|
-
return typeof value.html === "string";
|
|
827
|
-
}
|
|
828
|
-
function setupSsrDevMiddleware(server, opts) {
|
|
829
|
-
server.middlewares.use((req, res, next) => {
|
|
830
|
-
void (async () => {
|
|
831
|
-
const url = req.url ?? "/";
|
|
832
|
-
if (url.startsWith("/api/") || url.startsWith("/@") || url.startsWith("/node_modules/") || url.includes(".")) {
|
|
833
|
-
next();
|
|
834
|
-
return;
|
|
835
|
-
}
|
|
836
|
-
try {
|
|
837
|
-
const indexPath = resolve3(opts.projectRoot, "index.html");
|
|
838
|
-
let template = readFileSync2(indexPath, "utf-8");
|
|
839
|
-
const nonce = generateNonce();
|
|
840
|
-
template = await server.transformIndexHtml(url, template);
|
|
841
|
-
template = applyNonceToInlineScripts(template, nonce);
|
|
842
|
-
applySecurityHeaders(
|
|
843
|
-
res,
|
|
844
|
-
opts.securityHeaders ?? {},
|
|
845
|
-
{ production: process.env.NODE_ENV === "production" },
|
|
846
|
-
{ nonce }
|
|
847
|
-
);
|
|
848
|
-
const mod = await server.ssrLoadModule(opts.virtualEntryServerId);
|
|
849
|
-
const result = await mod.render(url, { nonce });
|
|
850
|
-
if (result && typeof result === "object" && "redirect" in result) {
|
|
851
|
-
res.writeHead(302, {
|
|
852
|
-
Location: result.redirect.headers.get("location") ?? "/"
|
|
853
|
-
});
|
|
854
|
-
res.end();
|
|
855
|
-
return;
|
|
856
|
-
}
|
|
857
|
-
let ssrHtml;
|
|
858
|
-
let hydrationScript = "";
|
|
859
|
-
if (typeof result === "string") {
|
|
860
|
-
ssrHtml = result;
|
|
861
|
-
} else if (isSsrRenderResult(result)) {
|
|
862
|
-
ssrHtml = result.html;
|
|
863
|
-
const dataJson = JSON.stringify(result.hydrationData).replace(/</g, "\\u003c");
|
|
864
|
-
hydrationScript = `<script nonce="${nonce}">window.__staticRouterHydrationData=${dataJson}</script>`;
|
|
865
|
-
} else {
|
|
866
|
-
ssrHtml = "";
|
|
867
|
-
}
|
|
868
|
-
const hoisted = hoistHeadTags(template, ssrHtml);
|
|
869
|
-
template = hoisted.template;
|
|
870
|
-
ssrHtml = hoisted.html;
|
|
871
|
-
const rootDiv = findRootDiv(template);
|
|
872
|
-
if (!rootDiv) {
|
|
873
|
-
res.writeHead(200, { "Content-Type": "text/html" });
|
|
874
|
-
res.end(template);
|
|
875
|
-
return;
|
|
876
|
-
}
|
|
877
|
-
const splitIdx = rootDiv.insertAt;
|
|
878
|
-
const html = template.slice(0, splitIdx) + ssrHtml + hydrationScript + template.slice(splitIdx);
|
|
879
|
-
res.writeHead(200, { "Content-Type": "text/html" });
|
|
880
|
-
res.end(html);
|
|
881
|
-
} catch (err) {
|
|
882
|
-
server.ssrFixStacktrace(err);
|
|
883
|
-
console.error("[SSR Dev Error]", err);
|
|
884
|
-
next();
|
|
885
|
-
return;
|
|
886
|
-
}
|
|
887
|
-
})();
|
|
888
|
-
});
|
|
889
|
-
}
|
|
890
|
-
|
|
891
808
|
// src/vite-plugin/ws-upgrade.ts
|
|
892
809
|
function setupWsUpgrade(server, serverDir) {
|
|
893
810
|
const wsRoutes = scanWebSocketRoutes(serverDir);
|
|
@@ -972,7 +889,7 @@ async function runConfigureServer(server, ctx) {
|
|
|
972
889
|
csrfReadinessStore
|
|
973
890
|
})
|
|
974
891
|
);
|
|
975
|
-
const configPath =
|
|
892
|
+
const configPath = resolve3(ctx.projectRoot, "theo.config.ts");
|
|
976
893
|
server.watcher.on("change", (file) => {
|
|
977
894
|
if (file === configPath) {
|
|
978
895
|
console.warn(
|
|
@@ -1002,7 +919,7 @@ async function runConfigureServer(server, ctx) {
|
|
|
1002
919
|
const openApiCfg = ctx.resolvedOpenApi;
|
|
1003
920
|
const { reEmitOpenApi } = await import("./dev-emit-GWD6IXV7.js");
|
|
1004
921
|
const openApiServerDir = ctx.serverDir;
|
|
1005
|
-
const openApiDistDir =
|
|
922
|
+
const openApiDistDir = resolve3(ctx.projectRoot, ctx.resolvedDistDir);
|
|
1006
923
|
const isRouteFileForOpenApi = (file) => file.startsWith(openApiServerDir) && /\.(ts|tsx|js|mjs)$/.test(file);
|
|
1007
924
|
void reEmitOpenApi(openApiServerDir, openApiDistDir, openApiCfg);
|
|
1008
925
|
server.watcher.on("change", (file) => {
|
|
@@ -1050,16 +967,16 @@ async function integrateStudio(importStudio = () => import(
|
|
|
1050
967
|
}
|
|
1051
968
|
|
|
1052
969
|
// src/vite-plugin/integrate-ui.ts
|
|
1053
|
-
import { existsSync as existsSync4, readFileSync as
|
|
970
|
+
import { existsSync as existsSync4, readFileSync as readFileSync3 } from "fs";
|
|
1054
971
|
import { dirname as dirname3, join as join3 } from "path";
|
|
1055
972
|
import { pathToFileURL } from "url";
|
|
1056
973
|
|
|
1057
974
|
// src/vite-plugin/auto-detect.ts
|
|
1058
|
-
import { existsSync as existsSync3, readFileSync as
|
|
975
|
+
import { existsSync as existsSync3, readFileSync as readFileSync2 } from "fs";
|
|
1059
976
|
import { dirname as dirname2, join as join2 } from "path";
|
|
1060
977
|
function isDeclared(name, projectRoot) {
|
|
1061
978
|
try {
|
|
1062
|
-
const raw =
|
|
979
|
+
const raw = readFileSync2(join2(projectRoot, "package.json"), "utf-8");
|
|
1063
980
|
const pkg = JSON.parse(raw);
|
|
1064
981
|
return Boolean(
|
|
1065
982
|
pkg.dependencies?.[name] ?? pkg.devDependencies?.[name] ?? pkg.peerDependencies?.[name]
|
|
@@ -1074,7 +991,7 @@ function resolvePackageJson(name, cwd) {
|
|
|
1074
991
|
const pkgJsonPath = join2(dir, "node_modules", ...name.split("/"), "package.json");
|
|
1075
992
|
if (existsSync3(pkgJsonPath)) {
|
|
1076
993
|
try {
|
|
1077
|
-
const raw =
|
|
994
|
+
const raw = readFileSync2(pkgJsonPath, "utf-8");
|
|
1078
995
|
const pkg = JSON.parse(raw);
|
|
1079
996
|
if (pkg.name === name) {
|
|
1080
997
|
return { path: pkgJsonPath, version: pkg.version };
|
|
@@ -1109,7 +1026,7 @@ function findOwningPackageJson(entry, expectedName) {
|
|
|
1109
1026
|
const candidate = join2(dir, "package.json");
|
|
1110
1027
|
if (existsSync3(candidate)) {
|
|
1111
1028
|
try {
|
|
1112
|
-
const raw =
|
|
1029
|
+
const raw = readFileSync2(candidate, "utf-8");
|
|
1113
1030
|
const pkg = JSON.parse(raw);
|
|
1114
1031
|
if (pkg.name === expectedName) {
|
|
1115
1032
|
return { path: candidate, version: pkg.version };
|
|
@@ -1141,7 +1058,7 @@ function detectPackage(name, cwd) {
|
|
|
1141
1058
|
const nmPkgJson = join2(nmPath, "package.json");
|
|
1142
1059
|
if (existsSync3(nmPkgJson)) {
|
|
1143
1060
|
try {
|
|
1144
|
-
const raw =
|
|
1061
|
+
const raw = readFileSync2(nmPkgJson, "utf-8");
|
|
1145
1062
|
const pkg = JSON.parse(raw);
|
|
1146
1063
|
if (pkg.name === name) {
|
|
1147
1064
|
return { installed: true, version: pkg.version, resolvedPath: nmPkgJson };
|
|
@@ -1173,7 +1090,7 @@ function resolveConsumerImport(name, cwd) {
|
|
|
1173
1090
|
const pkgJsonPath = join3(pkgDir, "package.json");
|
|
1174
1091
|
if (existsSync4(pkgJsonPath)) {
|
|
1175
1092
|
try {
|
|
1176
|
-
const raw =
|
|
1093
|
+
const raw = readFileSync3(pkgJsonPath, "utf-8");
|
|
1177
1094
|
const pkg = JSON.parse(raw);
|
|
1178
1095
|
let entry;
|
|
1179
1096
|
const dotExport = pkg.exports?.["."];
|
|
@@ -1309,17 +1226,17 @@ async function integrateUseTheoUI(cwd, opts) {
|
|
|
1309
1226
|
|
|
1310
1227
|
// src/vite-plugin/resolve-theo-root.ts
|
|
1311
1228
|
import { existsSync as existsSync5 } from "fs";
|
|
1312
|
-
import { resolve as
|
|
1229
|
+
import { resolve as resolve4 } from "path";
|
|
1313
1230
|
function resolveTheoRootDir(currentDir) {
|
|
1314
|
-
if (existsSync5(
|
|
1231
|
+
if (existsSync5(resolve4(currentDir, "client"))) {
|
|
1315
1232
|
return currentDir;
|
|
1316
1233
|
}
|
|
1317
|
-
return
|
|
1234
|
+
return resolve4(currentDir, "..");
|
|
1318
1235
|
}
|
|
1319
1236
|
|
|
1320
1237
|
// src/vite-plugin/transform-html-hook.ts
|
|
1321
1238
|
import { existsSync as existsSync6 } from "fs";
|
|
1322
|
-
import { resolve as
|
|
1239
|
+
import { resolve as resolve5 } from "path";
|
|
1323
1240
|
|
|
1324
1241
|
// src/vite-plugin/inject-devtools.ts
|
|
1325
1242
|
var DEVTOOLS_VIRTUAL_ID = "/@theo/devtools/entry.js";
|
|
@@ -1419,7 +1336,7 @@ function runTransformIndexHtml(html, ctx) {
|
|
|
1419
1336
|
next = devtools.html;
|
|
1420
1337
|
const styles = injectStylesheets(next, {
|
|
1421
1338
|
isDev: ctx.isDevMode.value,
|
|
1422
|
-
hasPackage: (name) => existsSync6(
|
|
1339
|
+
hasPackage: (name) => existsSync6(resolve5(ctx.projectRoot, "node_modules", ...name.split("/")))
|
|
1423
1340
|
});
|
|
1424
1341
|
next = styles.html;
|
|
1425
1342
|
return next;
|
|
@@ -1979,7 +1896,7 @@ function findConsumerConfig(projectRoot, basename2) {
|
|
|
1979
1896
|
let dir = projectRoot;
|
|
1980
1897
|
for (let level = 0; level < 3; level++) {
|
|
1981
1898
|
for (const ext of extensions) {
|
|
1982
|
-
const candidate =
|
|
1899
|
+
const candidate = resolve6(dir, `${basename2}${ext}`);
|
|
1983
1900
|
if (existsSync7(candidate)) return candidate;
|
|
1984
1901
|
}
|
|
1985
1902
|
const parent = dirname4(dir);
|
|
@@ -1991,7 +1908,7 @@ function findConsumerConfig(projectRoot, basename2) {
|
|
|
1991
1908
|
async function theoPluginAsync(rootOrOptions) {
|
|
1992
1909
|
const options = typeof rootOrOptions === "string" ? { root: rootOrOptions } : rootOrOptions ?? {};
|
|
1993
1910
|
const projectRoot = options.root ?? process.cwd();
|
|
1994
|
-
const serverDirAbs =
|
|
1911
|
+
const serverDirAbs = resolve6(projectRoot, options.serverDir ?? "server");
|
|
1995
1912
|
const agentsDirName = options.agentsDir ?? "agents";
|
|
1996
1913
|
const consumerTailwindConfig = findConsumerConfig(projectRoot, "tailwind.config");
|
|
1997
1914
|
const consumerPostcssConfig = findConsumerConfig(projectRoot, "postcss.config");
|
|
@@ -2010,23 +1927,23 @@ async function theoPluginAsync(rootOrOptions) {
|
|
|
2010
1927
|
})
|
|
2011
1928
|
);
|
|
2012
1929
|
}
|
|
2013
|
-
const { appTypedClientPlugin } = await import("./app-typed-client-
|
|
1930
|
+
const { appTypedClientPlugin } = await import("./app-typed-client-G3J5G7E5.js");
|
|
2014
1931
|
const appClientPlugin = appTypedClientPlugin({
|
|
2015
1932
|
cwd: projectRoot,
|
|
2016
1933
|
serverDir: serverDirAbs,
|
|
2017
|
-
distDir:
|
|
1934
|
+
distDir: resolve6(projectRoot, ".theokit")
|
|
2018
1935
|
});
|
|
2019
|
-
const { actionsVirtualModule } = await import("./actions-virtual-module-
|
|
1936
|
+
const { actionsVirtualModule } = await import("./actions-virtual-module-LB4NGONI.js");
|
|
2020
1937
|
const actionsPlugin = actionsVirtualModule({
|
|
2021
1938
|
serverDir: serverDirAbs,
|
|
2022
|
-
distDir:
|
|
1939
|
+
distDir: resolve6(projectRoot, ".theokit")
|
|
2023
1940
|
});
|
|
2024
1941
|
const { agentsTypedClientPlugin } = await import("./agents-typed-client-D4OA2TXB.js");
|
|
2025
|
-
const { generateManifest } = await import("./internal-api-
|
|
1942
|
+
const { generateManifest } = await import("./internal-api-V5L65YSJ.js");
|
|
2026
1943
|
const agentsClientPlugin = agentsTypedClientPlugin({
|
|
2027
1944
|
projectRoot,
|
|
2028
1945
|
agentsDir: agentsDirName,
|
|
2029
|
-
distDir:
|
|
1946
|
+
distDir: resolve6(projectRoot, ".theokit"),
|
|
2030
1947
|
// Agents live at <projectRoot>/<agentsDir>; generateManifest scans them via the server dir's
|
|
2031
1948
|
// parent (projectRoot for the canonical layout) + the agents dir name (#95 follow-up).
|
|
2032
1949
|
scanManifest: () => generateManifest(serverDirAbs, projectRoot, agentsDirName)
|
|
@@ -2054,10 +1971,10 @@ async function theoPluginAsync(rootOrOptions) {
|
|
|
2054
1971
|
}
|
|
2055
1972
|
function buildOptimizeDepsInclude(projectRoot, viteOptimizeDeps) {
|
|
2056
1973
|
const include = [];
|
|
2057
|
-
if (existsSync7(
|
|
1974
|
+
if (existsSync7(resolve6(projectRoot, "node_modules", "@theokit", "ui"))) {
|
|
2058
1975
|
include.push("@theokit/ui");
|
|
2059
1976
|
}
|
|
2060
|
-
if (existsSync7(
|
|
1977
|
+
if (existsSync7(resolve6(projectRoot, "node_modules", "lucide-react"))) {
|
|
2061
1978
|
include.push("lucide-react");
|
|
2062
1979
|
}
|
|
2063
1980
|
include.push("devalue");
|
|
@@ -2083,8 +2000,8 @@ var VIRTUAL_MODULE_IDS = {
|
|
|
2083
2000
|
function theoPlugin(rootOrOptions) {
|
|
2084
2001
|
const options = typeof rootOrOptions === "string" ? { root: rootOrOptions } : rootOrOptions ?? {};
|
|
2085
2002
|
const projectRoot = options.root ?? process.cwd();
|
|
2086
|
-
const appDir =
|
|
2087
|
-
const serverDir =
|
|
2003
|
+
const appDir = resolve6(projectRoot, options.appDir ?? "app");
|
|
2004
|
+
const serverDir = resolve6(projectRoot, options.serverDir ?? "server");
|
|
2088
2005
|
const agentsDir = options.agentsDir ?? "agents";
|
|
2089
2006
|
const ssrEnabled = options.ssr ?? false;
|
|
2090
2007
|
const currentDir = dirname4(fileURLToPath(import.meta.url));
|
|
@@ -2204,4 +2121,4 @@ export {
|
|
|
2204
2121
|
theoPluginAsync,
|
|
2205
2122
|
theoPlugin
|
|
2206
2123
|
};
|
|
2207
|
-
//# sourceMappingURL=chunk-
|
|
2124
|
+
//# sourceMappingURL=chunk-Q2S2IGSM.js.map
|