@stryke/prisma-trpc-generator 0.9.2 → 0.9.3
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/generator.cjs +10 -9
- package/dist/generator.js +10 -9
- package/dist/index.cjs +10 -9
- package/dist/index.js +10 -9
- package/package.json +1 -1
package/dist/generator.cjs
CHANGED
|
@@ -6874,15 +6874,16 @@ var ModelAction = /* @__PURE__ */ function(ModelAction2) {
|
|
|
6874
6874
|
return ModelAction2;
|
|
6875
6875
|
}(ModelAction || {});
|
|
6876
6876
|
var modelActionEnum = z.nativeEnum(ModelAction);
|
|
6877
|
+
var configBoolean = z.string().trim().transform((value) => !value || value.toLowerCase() === "false" || value.toLowerCase() === "n" || value.toLowerCase() === "no" || value === "0" ? false : value.toLowerCase() === "true" || value.toLowerCase() === "y" || value.toLowerCase() === "yes" || value === "1" ? true : value);
|
|
6877
6878
|
var configSchema = z.object({
|
|
6878
|
-
debug:
|
|
6879
|
-
withMiddleware:
|
|
6880
|
-
withShield:
|
|
6881
|
-
withZod:
|
|
6882
|
-
withNext:
|
|
6883
|
-
contextPath: z.string().default("../context"),
|
|
6884
|
-
trpcOptions:
|
|
6885
|
-
showModelNameInProcedure:
|
|
6879
|
+
debug: configBoolean.default("false"),
|
|
6880
|
+
withMiddleware: configBoolean.default("false"),
|
|
6881
|
+
withShield: configBoolean.default("true"),
|
|
6882
|
+
withZod: configBoolean.default("true"),
|
|
6883
|
+
withNext: configBoolean.default("true"),
|
|
6884
|
+
contextPath: z.string().trim().default("../context"),
|
|
6885
|
+
trpcOptions: configBoolean.default("true"),
|
|
6886
|
+
showModelNameInProcedure: configBoolean.default("true"),
|
|
6886
6887
|
generateModelActions: z.string().default(Object.values(ModelAction).join(",")).transform((arg) => {
|
|
6887
6888
|
return arg.split(",").map((action) => modelActionEnum.parse(action.trim()));
|
|
6888
6889
|
})
|
|
@@ -11530,7 +11531,7 @@ async function generate(options) {
|
|
|
11530
11531
|
console.log("[STORM]: Running the Storm Software - Prisma tRPC generator \n");
|
|
11531
11532
|
const internals = await getPrismaInternals();
|
|
11532
11533
|
console.log(`[STORM]: Validating configuration options
|
|
11533
|
-
|
|
11534
|
+
`);
|
|
11534
11535
|
const outputDir = internals.parseEnvValue(options.generator.output);
|
|
11535
11536
|
const results = await configSchema.safeParseAsync(options.generator.config);
|
|
11536
11537
|
if (!results.success) {
|
package/dist/generator.js
CHANGED
|
@@ -6879,15 +6879,16 @@ var ModelAction = /* @__PURE__ */ function(ModelAction2) {
|
|
|
6879
6879
|
return ModelAction2;
|
|
6880
6880
|
}(ModelAction || {});
|
|
6881
6881
|
var modelActionEnum = z.nativeEnum(ModelAction);
|
|
6882
|
+
var configBoolean = z.string().trim().transform((value) => !value || value.toLowerCase() === "false" || value.toLowerCase() === "n" || value.toLowerCase() === "no" || value === "0" ? false : value.toLowerCase() === "true" || value.toLowerCase() === "y" || value.toLowerCase() === "yes" || value === "1" ? true : value);
|
|
6882
6883
|
var configSchema = z.object({
|
|
6883
|
-
debug:
|
|
6884
|
-
withMiddleware:
|
|
6885
|
-
withShield:
|
|
6886
|
-
withZod:
|
|
6887
|
-
withNext:
|
|
6888
|
-
contextPath: z.string().default("../context"),
|
|
6889
|
-
trpcOptions:
|
|
6890
|
-
showModelNameInProcedure:
|
|
6884
|
+
debug: configBoolean.default("false"),
|
|
6885
|
+
withMiddleware: configBoolean.default("false"),
|
|
6886
|
+
withShield: configBoolean.default("true"),
|
|
6887
|
+
withZod: configBoolean.default("true"),
|
|
6888
|
+
withNext: configBoolean.default("true"),
|
|
6889
|
+
contextPath: z.string().trim().default("../context"),
|
|
6890
|
+
trpcOptions: configBoolean.default("true"),
|
|
6891
|
+
showModelNameInProcedure: configBoolean.default("true"),
|
|
6891
6892
|
generateModelActions: z.string().default(Object.values(ModelAction).join(",")).transform((arg) => {
|
|
6892
6893
|
return arg.split(",").map((action) => modelActionEnum.parse(action.trim()));
|
|
6893
6894
|
})
|
|
@@ -11535,7 +11536,7 @@ async function generate(options) {
|
|
|
11535
11536
|
console.log("[STORM]: Running the Storm Software - Prisma tRPC generator \n");
|
|
11536
11537
|
const internals = await getPrismaInternals();
|
|
11537
11538
|
console.log(`[STORM]: Validating configuration options
|
|
11538
|
-
|
|
11539
|
+
`);
|
|
11539
11540
|
const outputDir = internals.parseEnvValue(options.generator.output);
|
|
11540
11541
|
const results = await configSchema.safeParseAsync(options.generator.config);
|
|
11541
11542
|
if (!results.success) {
|
package/dist/index.cjs
CHANGED
|
@@ -6870,15 +6870,16 @@ var ModelAction = /* @__PURE__ */ function(ModelAction2) {
|
|
|
6870
6870
|
return ModelAction2;
|
|
6871
6871
|
}(ModelAction || {});
|
|
6872
6872
|
var modelActionEnum = z.nativeEnum(ModelAction);
|
|
6873
|
+
var configBoolean = z.string().trim().transform((value) => !value || value.toLowerCase() === "false" || value.toLowerCase() === "n" || value.toLowerCase() === "no" || value === "0" ? false : value.toLowerCase() === "true" || value.toLowerCase() === "y" || value.toLowerCase() === "yes" || value === "1" ? true : value);
|
|
6873
6874
|
var configSchema = z.object({
|
|
6874
|
-
debug:
|
|
6875
|
-
withMiddleware:
|
|
6876
|
-
withShield:
|
|
6877
|
-
withZod:
|
|
6878
|
-
withNext:
|
|
6879
|
-
contextPath: z.string().default("../context"),
|
|
6880
|
-
trpcOptions:
|
|
6881
|
-
showModelNameInProcedure:
|
|
6875
|
+
debug: configBoolean.default("false"),
|
|
6876
|
+
withMiddleware: configBoolean.default("false"),
|
|
6877
|
+
withShield: configBoolean.default("true"),
|
|
6878
|
+
withZod: configBoolean.default("true"),
|
|
6879
|
+
withNext: configBoolean.default("true"),
|
|
6880
|
+
contextPath: z.string().trim().default("../context"),
|
|
6881
|
+
trpcOptions: configBoolean.default("true"),
|
|
6882
|
+
showModelNameInProcedure: configBoolean.default("true"),
|
|
6882
6883
|
generateModelActions: z.string().default(Object.values(ModelAction).join(",")).transform((arg) => {
|
|
6883
6884
|
return arg.split(",").map((action) => modelActionEnum.parse(action.trim()));
|
|
6884
6885
|
})
|
|
@@ -11526,7 +11527,7 @@ async function generate(options) {
|
|
|
11526
11527
|
console.log("[STORM]: Running the Storm Software - Prisma tRPC generator \n");
|
|
11527
11528
|
const internals = await getPrismaInternals();
|
|
11528
11529
|
console.log(`[STORM]: Validating configuration options
|
|
11529
|
-
|
|
11530
|
+
`);
|
|
11530
11531
|
const outputDir = internals.parseEnvValue(options.generator.output);
|
|
11531
11532
|
const results = await configSchema.safeParseAsync(options.generator.config);
|
|
11532
11533
|
if (!results.success) {
|
package/dist/index.js
CHANGED
|
@@ -6875,15 +6875,16 @@ var ModelAction = /* @__PURE__ */ function(ModelAction2) {
|
|
|
6875
6875
|
return ModelAction2;
|
|
6876
6876
|
}(ModelAction || {});
|
|
6877
6877
|
var modelActionEnum = z.nativeEnum(ModelAction);
|
|
6878
|
+
var configBoolean = z.string().trim().transform((value) => !value || value.toLowerCase() === "false" || value.toLowerCase() === "n" || value.toLowerCase() === "no" || value === "0" ? false : value.toLowerCase() === "true" || value.toLowerCase() === "y" || value.toLowerCase() === "yes" || value === "1" ? true : value);
|
|
6878
6879
|
var configSchema = z.object({
|
|
6879
|
-
debug:
|
|
6880
|
-
withMiddleware:
|
|
6881
|
-
withShield:
|
|
6882
|
-
withZod:
|
|
6883
|
-
withNext:
|
|
6884
|
-
contextPath: z.string().default("../context"),
|
|
6885
|
-
trpcOptions:
|
|
6886
|
-
showModelNameInProcedure:
|
|
6880
|
+
debug: configBoolean.default("false"),
|
|
6881
|
+
withMiddleware: configBoolean.default("false"),
|
|
6882
|
+
withShield: configBoolean.default("true"),
|
|
6883
|
+
withZod: configBoolean.default("true"),
|
|
6884
|
+
withNext: configBoolean.default("true"),
|
|
6885
|
+
contextPath: z.string().trim().default("../context"),
|
|
6886
|
+
trpcOptions: configBoolean.default("true"),
|
|
6887
|
+
showModelNameInProcedure: configBoolean.default("true"),
|
|
6887
6888
|
generateModelActions: z.string().default(Object.values(ModelAction).join(",")).transform((arg) => {
|
|
6888
6889
|
return arg.split(",").map((action) => modelActionEnum.parse(action.trim()));
|
|
6889
6890
|
})
|
|
@@ -11531,7 +11532,7 @@ async function generate(options) {
|
|
|
11531
11532
|
console.log("[STORM]: Running the Storm Software - Prisma tRPC generator \n");
|
|
11532
11533
|
const internals = await getPrismaInternals();
|
|
11533
11534
|
console.log(`[STORM]: Validating configuration options
|
|
11534
|
-
|
|
11535
|
+
`);
|
|
11535
11536
|
const outputDir = internals.parseEnvValue(options.generator.output);
|
|
11536
11537
|
const results = await configSchema.safeParseAsync(options.generator.config);
|
|
11537
11538
|
if (!results.success) {
|