@drzl/cli 4.27.0 → 4.29.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
@@ -52,6 +52,7 @@ __export(config_exports, {
52
52
  fastifyOutDir: () => fastifyOutDir,
53
53
  filterTables: () => filterTables,
54
54
  graphqlOutDir: () => graphqlOutDir,
55
+ h3OutDir: () => h3OutDir,
55
56
  honoOutDir: () => honoOutDir,
56
57
  importFreshConfigModule: () => importFreshConfigModule,
57
58
  loadConfig: () => loadConfig,
@@ -61,6 +62,7 @@ __export(config_exports, {
61
62
  resolveConfig: () => resolveConfig,
62
63
  resolveTemplateDirsSync: () => resolveTemplateDirsSync,
63
64
  tableFilterWarnings: () => tableFilterWarnings,
65
+ tanstackStartOutDir: () => tanstackStartOutDir,
64
66
  trpcOutDir: () => trpcOutDir
65
67
  });
66
68
  module.exports = __toCommonJS(config_exports);
@@ -355,8 +357,10 @@ var GeneratorKindSchema = import_zod.z.enum([
355
357
  "nestjs",
356
358
  "graphql",
357
359
  "ai",
360
+ "h3",
358
361
  "mcp",
359
362
  "next",
363
+ "tanstack-start",
360
364
  "service",
361
365
  "zod",
362
366
  "valibot",
@@ -386,6 +390,15 @@ var GeneratorSchema = import_zod.z.object({
386
390
  * refuses that combination rather than emitting a server that dies on startup.
387
391
  */
388
392
  sdk: import_zod.z.enum(["v1", "v2"]).optional(),
393
+ /**
394
+ * Which h3 major the emitted route handlers are written against. `h3` only.
395
+ *
396
+ * `v1` is the default and is what released Nitro depends on: nitropack 2.13.4 names
397
+ * `h3: ^1.15.11`, while h3's own `latest` tag is a 2.x release candidate. v1 has no Standard
398
+ * Schema overload on its validation helpers, so the emitted modules carry an adapter; v2 takes a
399
+ * schema directly and carries none.
400
+ */
401
+ h3: import_zod.z.enum(["v1", "v2"]).optional(),
389
402
  /** The name and version the emitted MCP server reports at initialize. `mcp` only. */
390
403
  serverName: import_zod.z.string().optional(),
391
404
  serverVersion: import_zod.z.string().optional(),
@@ -775,7 +788,17 @@ function buildConfigJsonSchema() {
775
788
  properties
776
789
  };
777
790
  }
778
- var ROUTER_KINDS = /* @__PURE__ */ new Set(["orpc", "trpc", "hono", "express", "mcp", "next", "ai"]);
791
+ var ROUTER_KINDS = /* @__PURE__ */ new Set([
792
+ "orpc",
793
+ "trpc",
794
+ "hono",
795
+ "express",
796
+ "mcp",
797
+ "next",
798
+ "ai",
799
+ "tanstack-start",
800
+ "h3"
801
+ ]);
779
802
  var INJECTION_KINDS = /* @__PURE__ */ new Set(["orpc", "trpc"]);
780
803
  function trpcOutDir(g, cfg) {
781
804
  return g.path ?? cfg.outDir;
@@ -804,6 +827,12 @@ function nextOutDir(g, cfg) {
804
827
  function aiOutDir(g, cfg) {
805
828
  return g.path ?? cfg.outDir;
806
829
  }
830
+ function tanstackStartOutDir(g, cfg) {
831
+ return g.path ?? cfg.outDir;
832
+ }
833
+ function h3OutDir(g, cfg) {
834
+ return g.path ?? cfg.outDir;
835
+ }
807
836
  function sharedSchemaNames(opts) {
808
837
  const resolved = (0, import_validation_core.resolveAffix)(opts);
809
838
  return import_validation_core.NAME_MODES.map((mode) => (0, import_validation_core.schemaName)(mode, import_validation_core.AFFIX_PROBE_TABLE, resolved));
@@ -869,6 +898,32 @@ function resolveConfig(cfg) {
869
898
  }
870
899
  continue;
871
900
  }
901
+ if (g.kind === "h3") {
902
+ if (g.includeRelations) {
903
+ warnings.push(
904
+ `drzl config: the "h3" generator sets includeRelations, which it does not read yet. Relation lookups are a route this generator does not emit. Remove the flag.`
905
+ );
906
+ }
907
+ const library2 = g.validation?.library ?? "zod";
908
+ if (!g.validation?.importPath && !generators.some((s) => s.kind === library2)) {
909
+ warnings.push(
910
+ `drzl config: the "h3" 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.`
911
+ );
912
+ }
913
+ }
914
+ if (g.kind === "tanstack-start") {
915
+ if (g.includeRelations) {
916
+ warnings.push(
917
+ `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.`
918
+ );
919
+ }
920
+ const library2 = g.validation?.library ?? "zod";
921
+ if (!g.validation?.importPath && !generators.some((s) => s.kind === library2)) {
922
+ warnings.push(
923
+ `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.`
924
+ );
925
+ }
926
+ }
872
927
  if (g.kind === "ai" && g.includeRelations) {
873
928
  warnings.push(
874
929
  `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.`
@@ -1046,6 +1101,8 @@ function computeGeneratorOutputDirs(cfg, cwd = process.cwd()) {
1046
1101
  if (g.kind === "mcp") dirs.add(abs(mcpOutDir(g, cfg)));
1047
1102
  if (g.kind === "next") dirs.add(abs(nextOutDir(g, cfg)));
1048
1103
  if (g.kind === "ai") dirs.add(abs(aiOutDir(g, cfg)));
1104
+ if (g.kind === "tanstack-start") dirs.add(abs(tanstackStartOutDir(g, cfg)));
1105
+ if (g.kind === "h3") dirs.add(abs(h3OutDir(g, cfg)));
1049
1106
  if (g.kind === "service") dirs.add(abs(g.path ?? "src/services"));
1050
1107
  if (g.kind === "zod") dirs.add(abs(g.path ?? "src/validators/zod"));
1051
1108
  if (g.kind === "valibot") dirs.add(abs(g.path ?? "src/validators/valibot"));
@@ -1128,6 +1185,7 @@ function computeWatchTargets(cfg, cwd = process.cwd(), source) {
1128
1185
  fastifyOutDir,
1129
1186
  filterTables,
1130
1187
  graphqlOutDir,
1188
+ h3OutDir,
1131
1189
  honoOutDir,
1132
1190
  importFreshConfigModule,
1133
1191
  loadConfig,
@@ -1137,6 +1195,7 @@ function computeWatchTargets(cfg, cwd = process.cwd(), source) {
1137
1195
  resolveConfig,
1138
1196
  resolveTemplateDirsSync,
1139
1197
  tableFilterWarnings,
1198
+ tanstackStartOutDir,
1140
1199
  trpcOutDir
1141
1200
  });
1142
1201
  //# sourceMappingURL=config.cjs.map