@drzl/cli 4.26.0 → 4.28.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/config.cjs CHANGED
@@ -42,6 +42,7 @@ __export(config_exports, {
42
42
  GeneratorSchema: () => GeneratorSchema,
43
43
  ImportExtensionSchema: () => ImportExtensionSchema,
44
44
  NamingSchema: () => NamingSchema,
45
+ aiOutDir: () => aiOutDir,
45
46
  buildConfigJsonSchema: () => buildConfigJsonSchema,
46
47
  computeGeneratorOutputDirs: () => computeGeneratorOutputDirs,
47
48
  computeWatchTargets: () => computeWatchTargets,
@@ -60,6 +61,7 @@ __export(config_exports, {
60
61
  resolveConfig: () => resolveConfig,
61
62
  resolveTemplateDirsSync: () => resolveTemplateDirsSync,
62
63
  tableFilterWarnings: () => tableFilterWarnings,
64
+ tanstackStartOutDir: () => tanstackStartOutDir,
63
65
  trpcOutDir: () => trpcOutDir
64
66
  });
65
67
  module.exports = __toCommonJS(config_exports);
@@ -353,8 +355,10 @@ var GeneratorKindSchema = import_zod.z.enum([
353
355
  "fastify",
354
356
  "nestjs",
355
357
  "graphql",
358
+ "ai",
356
359
  "mcp",
357
360
  "next",
361
+ "tanstack-start",
358
362
  "service",
359
363
  "zod",
360
364
  "valibot",
@@ -773,7 +777,16 @@ function buildConfigJsonSchema() {
773
777
  properties
774
778
  };
775
779
  }
776
- var ROUTER_KINDS = /* @__PURE__ */ new Set(["orpc", "trpc", "hono", "express", "mcp", "next"]);
780
+ var ROUTER_KINDS = /* @__PURE__ */ new Set([
781
+ "orpc",
782
+ "trpc",
783
+ "hono",
784
+ "express",
785
+ "mcp",
786
+ "next",
787
+ "ai",
788
+ "tanstack-start"
789
+ ]);
777
790
  var INJECTION_KINDS = /* @__PURE__ */ new Set(["orpc", "trpc"]);
778
791
  function trpcOutDir(g, cfg) {
779
792
  return g.path ?? cfg.outDir;
@@ -799,6 +812,12 @@ function mcpOutDir(g, cfg) {
799
812
  function nextOutDir(g, cfg) {
800
813
  return g.path ?? cfg.outDir;
801
814
  }
815
+ function aiOutDir(g, cfg) {
816
+ return g.path ?? cfg.outDir;
817
+ }
818
+ function tanstackStartOutDir(g, cfg) {
819
+ return g.path ?? cfg.outDir;
820
+ }
802
821
  function sharedSchemaNames(opts) {
803
822
  const resolved = (0, import_validation_core.resolveAffix)(opts);
804
823
  return import_validation_core.NAME_MODES.map((mode) => (0, import_validation_core.schemaName)(mode, import_validation_core.AFFIX_PROBE_TABLE, resolved));
@@ -864,6 +883,24 @@ function resolveConfig(cfg) {
864
883
  }
865
884
  continue;
866
885
  }
886
+ if (g.kind === "tanstack-start") {
887
+ if (g.includeRelations) {
888
+ warnings.push(
889
+ `drzl config: the "tanstack-start" generator sets includeRelations, which it does not read. Relation lookups are routes, and this generator emits server functions. Remove the flag.`
890
+ );
891
+ }
892
+ const library2 = g.validation?.library ?? "zod";
893
+ if (!g.validation?.importPath && !generators.some((s) => s.kind === library2)) {
894
+ warnings.push(
895
+ `drzl config: the "tanstack-start" generator validates with the schemas a validation generator writes, and this config has no "${library2}" generator for it to import from. Add { kind: "${library2}" }, or set validation.importPath to wherever those schemas live.`
896
+ );
897
+ }
898
+ }
899
+ if (g.kind === "ai" && g.includeRelations) {
900
+ warnings.push(
901
+ `drzl config: the "ai" generator sets includeRelations, which it does not read. Relation lookups are routes, and this generator emits AI SDK tools rather than routes. Remove the flag.`
902
+ );
903
+ }
867
904
  if (g.kind === "mcp" && g.includeRelations) {
868
905
  warnings.push(
869
906
  `drzl config: the "mcp" generator sets includeRelations, which it does not read. Relation lookups are routes, and this generator emits MCP tools rather than routes. Remove the flag.`
@@ -1035,6 +1072,8 @@ function computeGeneratorOutputDirs(cfg, cwd = process.cwd()) {
1035
1072
  if (g.kind === "graphql") dirs.add(abs(graphqlOutDir(g, cfg)));
1036
1073
  if (g.kind === "mcp") dirs.add(abs(mcpOutDir(g, cfg)));
1037
1074
  if (g.kind === "next") dirs.add(abs(nextOutDir(g, cfg)));
1075
+ if (g.kind === "ai") dirs.add(abs(aiOutDir(g, cfg)));
1076
+ if (g.kind === "tanstack-start") dirs.add(abs(tanstackStartOutDir(g, cfg)));
1038
1077
  if (g.kind === "service") dirs.add(abs(g.path ?? "src/services"));
1039
1078
  if (g.kind === "zod") dirs.add(abs(g.path ?? "src/validators/zod"));
1040
1079
  if (g.kind === "valibot") dirs.add(abs(g.path ?? "src/validators/valibot"));
@@ -1107,6 +1146,7 @@ function computeWatchTargets(cfg, cwd = process.cwd(), source) {
1107
1146
  GeneratorSchema,
1108
1147
  ImportExtensionSchema,
1109
1148
  NamingSchema,
1149
+ aiOutDir,
1110
1150
  buildConfigJsonSchema,
1111
1151
  computeGeneratorOutputDirs,
1112
1152
  computeWatchTargets,
@@ -1125,6 +1165,7 @@ function computeWatchTargets(cfg, cwd = process.cwd(), source) {
1125
1165
  resolveConfig,
1126
1166
  resolveTemplateDirsSync,
1127
1167
  tableFilterWarnings,
1168
+ tanstackStartOutDir,
1128
1169
  trpcOutDir
1129
1170
  });
1130
1171
  //# sourceMappingURL=config.cjs.map