@drzl/cli 4.27.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/{chunk-O66F7W63.js → chunk-WS3MT5CH.js} +30 -2
- package/dist/chunk-WS3MT5CH.js.map +1 -0
- package/dist/cli.cjs +72 -8
- package/dist/cli.cjs.map +1 -1
- package/dist/cli.js +46 -8
- package/dist/cli.js.map +1 -1
- package/dist/config.cjs +30 -1
- package/dist/config.cjs.map +1 -1
- package/dist/config.d.cts +17 -3
- package/dist/config.d.ts +17 -3
- package/dist/config.js +3 -1
- package/dist/drzl.config.schema.json +1 -0
- package/package.json +5 -4
- package/dist/chunk-O66F7W63.js.map +0 -1
package/dist/config.cjs
CHANGED
|
@@ -61,6 +61,7 @@ __export(config_exports, {
|
|
|
61
61
|
resolveConfig: () => resolveConfig,
|
|
62
62
|
resolveTemplateDirsSync: () => resolveTemplateDirsSync,
|
|
63
63
|
tableFilterWarnings: () => tableFilterWarnings,
|
|
64
|
+
tanstackStartOutDir: () => tanstackStartOutDir,
|
|
64
65
|
trpcOutDir: () => trpcOutDir
|
|
65
66
|
});
|
|
66
67
|
module.exports = __toCommonJS(config_exports);
|
|
@@ -357,6 +358,7 @@ var GeneratorKindSchema = import_zod.z.enum([
|
|
|
357
358
|
"ai",
|
|
358
359
|
"mcp",
|
|
359
360
|
"next",
|
|
361
|
+
"tanstack-start",
|
|
360
362
|
"service",
|
|
361
363
|
"zod",
|
|
362
364
|
"valibot",
|
|
@@ -775,7 +777,16 @@ function buildConfigJsonSchema() {
|
|
|
775
777
|
properties
|
|
776
778
|
};
|
|
777
779
|
}
|
|
778
|
-
var ROUTER_KINDS = /* @__PURE__ */ new Set([
|
|
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
|
+
]);
|
|
779
790
|
var INJECTION_KINDS = /* @__PURE__ */ new Set(["orpc", "trpc"]);
|
|
780
791
|
function trpcOutDir(g, cfg) {
|
|
781
792
|
return g.path ?? cfg.outDir;
|
|
@@ -804,6 +815,9 @@ function nextOutDir(g, cfg) {
|
|
|
804
815
|
function aiOutDir(g, cfg) {
|
|
805
816
|
return g.path ?? cfg.outDir;
|
|
806
817
|
}
|
|
818
|
+
function tanstackStartOutDir(g, cfg) {
|
|
819
|
+
return g.path ?? cfg.outDir;
|
|
820
|
+
}
|
|
807
821
|
function sharedSchemaNames(opts) {
|
|
808
822
|
const resolved = (0, import_validation_core.resolveAffix)(opts);
|
|
809
823
|
return import_validation_core.NAME_MODES.map((mode) => (0, import_validation_core.schemaName)(mode, import_validation_core.AFFIX_PROBE_TABLE, resolved));
|
|
@@ -869,6 +883,19 @@ function resolveConfig(cfg) {
|
|
|
869
883
|
}
|
|
870
884
|
continue;
|
|
871
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
|
+
}
|
|
872
899
|
if (g.kind === "ai" && g.includeRelations) {
|
|
873
900
|
warnings.push(
|
|
874
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.`
|
|
@@ -1046,6 +1073,7 @@ function computeGeneratorOutputDirs(cfg, cwd = process.cwd()) {
|
|
|
1046
1073
|
if (g.kind === "mcp") dirs.add(abs(mcpOutDir(g, cfg)));
|
|
1047
1074
|
if (g.kind === "next") dirs.add(abs(nextOutDir(g, cfg)));
|
|
1048
1075
|
if (g.kind === "ai") dirs.add(abs(aiOutDir(g, cfg)));
|
|
1076
|
+
if (g.kind === "tanstack-start") dirs.add(abs(tanstackStartOutDir(g, cfg)));
|
|
1049
1077
|
if (g.kind === "service") dirs.add(abs(g.path ?? "src/services"));
|
|
1050
1078
|
if (g.kind === "zod") dirs.add(abs(g.path ?? "src/validators/zod"));
|
|
1051
1079
|
if (g.kind === "valibot") dirs.add(abs(g.path ?? "src/validators/valibot"));
|
|
@@ -1137,6 +1165,7 @@ function computeWatchTargets(cfg, cwd = process.cwd(), source) {
|
|
|
1137
1165
|
resolveConfig,
|
|
1138
1166
|
resolveTemplateDirsSync,
|
|
1139
1167
|
tableFilterWarnings,
|
|
1168
|
+
tanstackStartOutDir,
|
|
1140
1169
|
trpcOutDir
|
|
1141
1170
|
});
|
|
1142
1171
|
//# sourceMappingURL=config.cjs.map
|