@drzl/cli 4.28.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/{chunk-WS3MT5CH.js → chunk-WZQV2WVN.js} +31 -2
- package/dist/chunk-WZQV2WVN.js.map +1 -0
- package/dist/cli.cjs +85 -23
- package/dist/cli.cjs.map +1 -1
- package/dist/cli.js +58 -23
- package/dist/cli.js.map +1 -1
- package/dist/config.cjs +31 -1
- package/dist/config.cjs.map +1 -1
- package/dist/config.d.cts +23 -1
- package/dist/config.d.ts +23 -1
- package/dist/config.js +3 -1
- package/dist/drzl.config.schema.json +8 -0
- package/package.json +13 -12
- package/dist/chunk-WS3MT5CH.js.map +0 -1
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,
|
|
@@ -356,6 +357,7 @@ var GeneratorKindSchema = import_zod.z.enum([
|
|
|
356
357
|
"nestjs",
|
|
357
358
|
"graphql",
|
|
358
359
|
"ai",
|
|
360
|
+
"h3",
|
|
359
361
|
"mcp",
|
|
360
362
|
"next",
|
|
361
363
|
"tanstack-start",
|
|
@@ -388,6 +390,15 @@ var GeneratorSchema = import_zod.z.object({
|
|
|
388
390
|
* refuses that combination rather than emitting a server that dies on startup.
|
|
389
391
|
*/
|
|
390
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(),
|
|
391
402
|
/** The name and version the emitted MCP server reports at initialize. `mcp` only. */
|
|
392
403
|
serverName: import_zod.z.string().optional(),
|
|
393
404
|
serverVersion: import_zod.z.string().optional(),
|
|
@@ -785,7 +796,8 @@ var ROUTER_KINDS = /* @__PURE__ */ new Set([
|
|
|
785
796
|
"mcp",
|
|
786
797
|
"next",
|
|
787
798
|
"ai",
|
|
788
|
-
"tanstack-start"
|
|
799
|
+
"tanstack-start",
|
|
800
|
+
"h3"
|
|
789
801
|
]);
|
|
790
802
|
var INJECTION_KINDS = /* @__PURE__ */ new Set(["orpc", "trpc"]);
|
|
791
803
|
function trpcOutDir(g, cfg) {
|
|
@@ -818,6 +830,9 @@ function aiOutDir(g, cfg) {
|
|
|
818
830
|
function tanstackStartOutDir(g, cfg) {
|
|
819
831
|
return g.path ?? cfg.outDir;
|
|
820
832
|
}
|
|
833
|
+
function h3OutDir(g, cfg) {
|
|
834
|
+
return g.path ?? cfg.outDir;
|
|
835
|
+
}
|
|
821
836
|
function sharedSchemaNames(opts) {
|
|
822
837
|
const resolved = (0, import_validation_core.resolveAffix)(opts);
|
|
823
838
|
return import_validation_core.NAME_MODES.map((mode) => (0, import_validation_core.schemaName)(mode, import_validation_core.AFFIX_PROBE_TABLE, resolved));
|
|
@@ -883,6 +898,19 @@ function resolveConfig(cfg) {
|
|
|
883
898
|
}
|
|
884
899
|
continue;
|
|
885
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
|
+
}
|
|
886
914
|
if (g.kind === "tanstack-start") {
|
|
887
915
|
if (g.includeRelations) {
|
|
888
916
|
warnings.push(
|
|
@@ -1074,6 +1102,7 @@ function computeGeneratorOutputDirs(cfg, cwd = process.cwd()) {
|
|
|
1074
1102
|
if (g.kind === "next") dirs.add(abs(nextOutDir(g, cfg)));
|
|
1075
1103
|
if (g.kind === "ai") dirs.add(abs(aiOutDir(g, cfg)));
|
|
1076
1104
|
if (g.kind === "tanstack-start") dirs.add(abs(tanstackStartOutDir(g, cfg)));
|
|
1105
|
+
if (g.kind === "h3") dirs.add(abs(h3OutDir(g, cfg)));
|
|
1077
1106
|
if (g.kind === "service") dirs.add(abs(g.path ?? "src/services"));
|
|
1078
1107
|
if (g.kind === "zod") dirs.add(abs(g.path ?? "src/validators/zod"));
|
|
1079
1108
|
if (g.kind === "valibot") dirs.add(abs(g.path ?? "src/validators/valibot"));
|
|
@@ -1156,6 +1185,7 @@ function computeWatchTargets(cfg, cwd = process.cwd(), source) {
|
|
|
1156
1185
|
fastifyOutDir,
|
|
1157
1186
|
filterTables,
|
|
1158
1187
|
graphqlOutDir,
|
|
1188
|
+
h3OutDir,
|
|
1159
1189
|
honoOutDir,
|
|
1160
1190
|
importFreshConfigModule,
|
|
1161
1191
|
loadConfig,
|