@stryke/prisma-trpc-generator 0.6.0 → 0.6.1

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.
@@ -7632,14 +7632,14 @@ var generateCreateRouterImport = /* @__PURE__ */ __name(({ sourceFile, config })
7632
7632
  imports.push(getProcedureName(config));
7633
7633
  }
7634
7634
  sourceFile.addImportDeclaration({
7635
- moduleSpecifier: "./helpers/createRouter",
7635
+ moduleSpecifier: "../trpc",
7636
7636
  namedImports: imports
7637
7637
  });
7638
7638
  }, "generateCreateRouterImport");
7639
7639
  var generateShieldImport = /* @__PURE__ */ __name(async (sourceFile, options, value) => {
7640
7640
  const internals = await getPrismaInternals();
7641
7641
  const outputDir = internals.parseEnvValue(options.generator.output);
7642
- let shieldPath = getRelativePath(outputDir, "shield/shield");
7642
+ let shieldPath = getRelativePath(outputDir, "shield");
7643
7643
  if (typeof value === "string") {
7644
7644
  shieldPath = getRelativePath(outputDir, value, true, options.schemaPath);
7645
7645
  }
@@ -11766,7 +11766,7 @@ export default {${config.withNext ? "\n transformer," : ""}
11766
11766
  routerStatements.push(
11767
11767
  /* ts */
11768
11768
  `
11769
- ${model.toLowerCase()}: ${plural}Router`
11769
+ ${lowerCaseFirst(model)}: ${plural}Router`
11770
11770
  );
11771
11771
  consoleLog(`Generated tRPC router for model ${model} with ${modelActions.length} actions`);
11772
11772
  }
package/dist/generator.js CHANGED
@@ -7637,14 +7637,14 @@ var generateCreateRouterImport = /* @__PURE__ */ __name(({ sourceFile, config })
7637
7637
  imports.push(getProcedureName(config));
7638
7638
  }
7639
7639
  sourceFile.addImportDeclaration({
7640
- moduleSpecifier: "./helpers/createRouter",
7640
+ moduleSpecifier: "../trpc",
7641
7641
  namedImports: imports
7642
7642
  });
7643
7643
  }, "generateCreateRouterImport");
7644
7644
  var generateShieldImport = /* @__PURE__ */ __name(async (sourceFile, options, value) => {
7645
7645
  const internals = await getPrismaInternals();
7646
7646
  const outputDir = internals.parseEnvValue(options.generator.output);
7647
- let shieldPath = getRelativePath(outputDir, "shield/shield");
7647
+ let shieldPath = getRelativePath(outputDir, "shield");
7648
7648
  if (typeof value === "string") {
7649
7649
  shieldPath = getRelativePath(outputDir, value, true, options.schemaPath);
7650
7650
  }
@@ -11771,7 +11771,7 @@ export default {${config.withNext ? "\n transformer," : ""}
11771
11771
  routerStatements.push(
11772
11772
  /* ts */
11773
11773
  `
11774
- ${model.toLowerCase()}: ${plural}Router`
11774
+ ${lowerCaseFirst(model)}: ${plural}Router`
11775
11775
  );
11776
11776
  consoleLog(`Generated tRPC router for model ${model} with ${modelActions.length} actions`);
11777
11777
  }
package/dist/index.cjs CHANGED
@@ -7628,14 +7628,14 @@ var generateCreateRouterImport = /* @__PURE__ */ __name(({ sourceFile, config })
7628
7628
  imports.push(getProcedureName(config));
7629
7629
  }
7630
7630
  sourceFile.addImportDeclaration({
7631
- moduleSpecifier: "./helpers/createRouter",
7631
+ moduleSpecifier: "../trpc",
7632
7632
  namedImports: imports
7633
7633
  });
7634
7634
  }, "generateCreateRouterImport");
7635
7635
  var generateShieldImport = /* @__PURE__ */ __name(async (sourceFile, options, value) => {
7636
7636
  const internals = await getPrismaInternals();
7637
7637
  const outputDir = internals.parseEnvValue(options.generator.output);
7638
- let shieldPath = getRelativePath(outputDir, "shield/shield");
7638
+ let shieldPath = getRelativePath(outputDir, "shield");
7639
7639
  if (typeof value === "string") {
7640
7640
  shieldPath = getRelativePath(outputDir, value, true, options.schemaPath);
7641
7641
  }
@@ -11762,7 +11762,7 @@ export default {${config.withNext ? "\n transformer," : ""}
11762
11762
  routerStatements.push(
11763
11763
  /* ts */
11764
11764
  `
11765
- ${model.toLowerCase()}: ${plural}Router`
11765
+ ${lowerCaseFirst(model)}: ${plural}Router`
11766
11766
  );
11767
11767
  consoleLog(`Generated tRPC router for model ${model} with ${modelActions.length} actions`);
11768
11768
  }
package/dist/index.js CHANGED
@@ -7633,14 +7633,14 @@ var generateCreateRouterImport = /* @__PURE__ */ __name(({ sourceFile, config })
7633
7633
  imports.push(getProcedureName(config));
7634
7634
  }
7635
7635
  sourceFile.addImportDeclaration({
7636
- moduleSpecifier: "./helpers/createRouter",
7636
+ moduleSpecifier: "../trpc",
7637
7637
  namedImports: imports
7638
7638
  });
7639
7639
  }, "generateCreateRouterImport");
7640
7640
  var generateShieldImport = /* @__PURE__ */ __name(async (sourceFile, options, value) => {
7641
7641
  const internals = await getPrismaInternals();
7642
7642
  const outputDir = internals.parseEnvValue(options.generator.output);
7643
- let shieldPath = getRelativePath(outputDir, "shield/shield");
7643
+ let shieldPath = getRelativePath(outputDir, "shield");
7644
7644
  if (typeof value === "string") {
7645
7645
  shieldPath = getRelativePath(outputDir, value, true, options.schemaPath);
7646
7646
  }
@@ -11767,7 +11767,7 @@ export default {${config.withNext ? "\n transformer," : ""}
11767
11767
  routerStatements.push(
11768
11768
  /* ts */
11769
11769
  `
11770
- ${model.toLowerCase()}: ${plural}Router`
11770
+ ${lowerCaseFirst(model)}: ${plural}Router`
11771
11771
  );
11772
11772
  consoleLog(`Generated tRPC router for model ${model} with ${modelActions.length} actions`);
11773
11773
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stryke/prisma-trpc-generator",
3
- "version": "0.6.0",
3
+ "version": "0.6.1",
4
4
  "type": "module",
5
5
  "description": "A fork of the prisma-trpc-generator code to work in ESM with Prisma v6.",
6
6
  "repository": {