theokit 0.19.1 → 0.19.2

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.
@@ -3,7 +3,7 @@ import "tsx/esm";
3
3
  import {
4
4
  agentCommand,
5
5
  createAgentSsrLoader
6
- } from "./chunk-5VNZ5EG3.js";
6
+ } from "./chunk-7BYQD7IE.js";
7
7
  import "./chunk-M6NMS5LR.js";
8
8
  import "./chunk-GDN3PXFH.js";
9
9
  import "./chunk-34YQOXGM.js";
@@ -12,4 +12,4 @@ export {
12
12
  agentCommand,
13
13
  createAgentSsrLoader
14
14
  };
15
- //# sourceMappingURL=agent-5UMCZYY4.js.map
15
+ //# sourceMappingURL=agent-UGVJJXRY.js.map
@@ -531,7 +531,7 @@ async function buildCommand(options) {
531
531
  `);
532
532
  }
533
533
  async function runAdapterBuild(target, config, cwd) {
534
- const { theoPluginAsync } = await import("./vite-plugin-QOCVYPFI.js");
534
+ const { theoPluginAsync } = await import("./vite-plugin-H2SMD2Q4.js");
535
535
  const { default: react } = await import("@vitejs/plugin-react");
536
536
  const ctx = {
537
537
  // `react()` may return Plugin or Plugin[] depending on version; spread the
@@ -606,4 +606,4 @@ function relativize3(absPath, root) {
606
606
  export {
607
607
  buildCommand
608
608
  };
609
- //# sourceMappingURL=build-QGHSA7FT.js.map
609
+ //# sourceMappingURL=build-KZBSHSKG.js.map
@@ -1828,7 +1828,7 @@ async function runConfigureServer(server, ctx) {
1828
1828
  } catch {
1829
1829
  }
1830
1830
  });
1831
- const serverDir = resolve6(ctx.projectRoot, "server");
1831
+ const serverDir = ctx.serverDir;
1832
1832
  server.middlewares.use(
1833
1833
  createActionMiddleware(server, serverDir, {
1834
1834
  pluginRunner: ctx.pluginRunner,
@@ -2852,6 +2852,7 @@ function findConsumerConfig(projectRoot, basename2) {
2852
2852
  async function theoPluginAsync(rootOrOptions) {
2853
2853
  const options = typeof rootOrOptions === "string" ? { root: rootOrOptions } : rootOrOptions ?? {};
2854
2854
  const projectRoot = options.root ?? process.cwd();
2855
+ const serverDirAbs = resolve9(projectRoot, options.serverDir ?? "server");
2855
2856
  const consumerTailwindConfig = findConsumerConfig(projectRoot, "tailwind.config");
2856
2857
  const consumerPostcssConfig = findConsumerConfig(projectRoot, "postcss.config");
2857
2858
  const uiPlugins = await integrateUseTheoUI(projectRoot, {
@@ -2871,12 +2872,12 @@ async function theoPluginAsync(rootOrOptions) {
2871
2872
  const { appTypedClientPlugin } = await import("./app-typed-client-OTXG3VZB.js");
2872
2873
  const appClientPlugin = appTypedClientPlugin({
2873
2874
  cwd: projectRoot,
2874
- serverDir: resolve9(projectRoot, "server"),
2875
+ serverDir: serverDirAbs,
2875
2876
  distDir: resolve9(projectRoot, ".theokit")
2876
2877
  });
2877
2878
  const { actionsVirtualModule } = await import("./actions-virtual-module-J3XSNY6L.js");
2878
2879
  const actionsPlugin = actionsVirtualModule({
2879
- serverDir: resolve9(projectRoot, "server"),
2880
+ serverDir: serverDirAbs,
2880
2881
  distDir: resolve9(projectRoot, ".theokit")
2881
2882
  });
2882
2883
  const { agentsTypedClientPlugin } = await import("./agents-typed-client-D3LXWGCF.js");
@@ -2886,11 +2887,11 @@ async function theoPluginAsync(rootOrOptions) {
2886
2887
  distDir: resolve9(projectRoot, ".theokit"),
2887
2888
  // Agents live at <projectRoot>/agents; generateManifest scans them via the server dir's
2888
2889
  // parent, which is projectRoot for the canonical layout.
2889
- scanManifest: () => generateManifest(resolve9(projectRoot, "server"), projectRoot)
2890
+ scanManifest: () => generateManifest(serverDirAbs, projectRoot)
2890
2891
  });
2891
2892
  const { serverRoutesHmrPlugin } = await import("./server-routes-hmr-PBHSKCQJ.js");
2892
2893
  const routesHmrPlugin = serverRoutesHmrPlugin({
2893
- serverDir: resolve9(projectRoot, "server")
2894
+ serverDir: serverDirAbs
2894
2895
  });
2895
2896
  return [
2896
2897
  theoPlugin(rootOrOptions),
@@ -2934,6 +2935,7 @@ function theoPlugin(rootOrOptions) {
2934
2935
  const options = typeof rootOrOptions === "string" ? { root: rootOrOptions } : rootOrOptions ?? {};
2935
2936
  const projectRoot = options.root ?? process.cwd();
2936
2937
  const appDir = resolve9(projectRoot, "app");
2938
+ const serverDir = resolve9(projectRoot, options.serverDir ?? "server");
2937
2939
  const ssrEnabled = options.ssr ?? false;
2938
2940
  const currentDir = dirname4(fileURLToPath(import.meta.url));
2939
2941
  const theoSrcDir = resolveTheoRootDir(currentDir);
@@ -3020,6 +3022,7 @@ function theoPlugin(rootOrOptions) {
3020
3022
  await runConfigureServer(server, {
3021
3023
  projectRoot,
3022
3024
  appDir,
3025
+ serverDir,
3023
3026
  resolvedDistDir,
3024
3027
  ssrEnabled,
3025
3028
  isDevMode: isDevModeRef,
@@ -3058,4 +3061,4 @@ export {
3058
3061
  theoPluginAsync,
3059
3062
  theoPlugin
3060
3063
  };
3061
- //# sourceMappingURL=chunk-X53XXQCX.js.map
3064
+ //# sourceMappingURL=chunk-2YS3CNO4.js.map