@stryke/prisma-trpc-generator 0.11.3 → 0.11.5

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.
@@ -7931,7 +7931,7 @@ var populateModelFile = /* @__PURE__ */ __name(async (model, sourceFile, config,
7931
7931
  }, "populateModelFile");
7932
7932
  var generateBarrelFile = /* @__PURE__ */ __name((models, indexFile) => {
7933
7933
  models.forEach((model) => indexFile.addExportDeclaration({
7934
- moduleSpecifier: `./${lowerCaseFirst(model.name)}`
7934
+ moduleSpecifier: `./${lowerCaseFirst(model.name)}.schema`
7935
7935
  }));
7936
7936
  }, "generateBarrelFile");
7937
7937
 
@@ -8099,7 +8099,7 @@ function generateProcedure(sourceFile, name, typeName, modelName, opType, baseOp
8099
8099
  sourceFile.addStatements(
8100
8100
  /* ts */
8101
8101
  `${config.showModelNameInProcedure ? name : nameWithoutModel}: ${getProcedureName(config)}
8102
- ${config.withZod ? `.input(${typeName})` : ""}.${getProcedureTypeByOpName(baseOpType)}(async ({ ctx, input }) => {
8102
+ ${config.withZod ? `.input(${lowerCaseFirst(typeName)})` : ""}.${getProcedureTypeByOpName(baseOpType)}(async ({ ctx, input }) => {
8103
8103
  const ${name} = await ctx.prisma.${lowerCaseFirst(modelName)}.${opType.replace("One", "")}(${input});
8104
8104
  return ${name};
8105
8105
  }),`
package/dist/generator.js CHANGED
@@ -7936,7 +7936,7 @@ var populateModelFile = /* @__PURE__ */ __name(async (model, sourceFile, config,
7936
7936
  }, "populateModelFile");
7937
7937
  var generateBarrelFile = /* @__PURE__ */ __name((models, indexFile) => {
7938
7938
  models.forEach((model) => indexFile.addExportDeclaration({
7939
- moduleSpecifier: `./${lowerCaseFirst(model.name)}`
7939
+ moduleSpecifier: `./${lowerCaseFirst(model.name)}.schema`
7940
7940
  }));
7941
7941
  }, "generateBarrelFile");
7942
7942
 
@@ -8104,7 +8104,7 @@ function generateProcedure(sourceFile, name, typeName, modelName, opType, baseOp
8104
8104
  sourceFile.addStatements(
8105
8105
  /* ts */
8106
8106
  `${config.showModelNameInProcedure ? name : nameWithoutModel}: ${getProcedureName(config)}
8107
- ${config.withZod ? `.input(${typeName})` : ""}.${getProcedureTypeByOpName(baseOpType)}(async ({ ctx, input }) => {
8107
+ ${config.withZod ? `.input(${lowerCaseFirst(typeName)})` : ""}.${getProcedureTypeByOpName(baseOpType)}(async ({ ctx, input }) => {
8108
8108
  const ${name} = await ctx.prisma.${lowerCaseFirst(modelName)}.${opType.replace("One", "")}(${input});
8109
8109
  return ${name};
8110
8110
  }),`
package/dist/index.cjs CHANGED
@@ -7927,7 +7927,7 @@ var populateModelFile = /* @__PURE__ */ __name(async (model, sourceFile, config,
7927
7927
  }, "populateModelFile");
7928
7928
  var generateBarrelFile = /* @__PURE__ */ __name((models, indexFile) => {
7929
7929
  models.forEach((model) => indexFile.addExportDeclaration({
7930
- moduleSpecifier: `./${lowerCaseFirst(model.name)}`
7930
+ moduleSpecifier: `./${lowerCaseFirst(model.name)}.schema`
7931
7931
  }));
7932
7932
  }, "generateBarrelFile");
7933
7933
 
@@ -8095,7 +8095,7 @@ function generateProcedure(sourceFile, name, typeName, modelName, opType, baseOp
8095
8095
  sourceFile.addStatements(
8096
8096
  /* ts */
8097
8097
  `${config.showModelNameInProcedure ? name : nameWithoutModel}: ${getProcedureName(config)}
8098
- ${config.withZod ? `.input(${typeName})` : ""}.${getProcedureTypeByOpName(baseOpType)}(async ({ ctx, input }) => {
8098
+ ${config.withZod ? `.input(${lowerCaseFirst(typeName)})` : ""}.${getProcedureTypeByOpName(baseOpType)}(async ({ ctx, input }) => {
8099
8099
  const ${name} = await ctx.prisma.${lowerCaseFirst(modelName)}.${opType.replace("One", "")}(${input});
8100
8100
  return ${name};
8101
8101
  }),`
package/dist/index.js CHANGED
@@ -7932,7 +7932,7 @@ var populateModelFile = /* @__PURE__ */ __name(async (model, sourceFile, config,
7932
7932
  }, "populateModelFile");
7933
7933
  var generateBarrelFile = /* @__PURE__ */ __name((models, indexFile) => {
7934
7934
  models.forEach((model) => indexFile.addExportDeclaration({
7935
- moduleSpecifier: `./${lowerCaseFirst(model.name)}`
7935
+ moduleSpecifier: `./${lowerCaseFirst(model.name)}.schema`
7936
7936
  }));
7937
7937
  }, "generateBarrelFile");
7938
7938
 
@@ -8100,7 +8100,7 @@ function generateProcedure(sourceFile, name, typeName, modelName, opType, baseOp
8100
8100
  sourceFile.addStatements(
8101
8101
  /* ts */
8102
8102
  `${config.showModelNameInProcedure ? name : nameWithoutModel}: ${getProcedureName(config)}
8103
- ${config.withZod ? `.input(${typeName})` : ""}.${getProcedureTypeByOpName(baseOpType)}(async ({ ctx, input }) => {
8103
+ ${config.withZod ? `.input(${lowerCaseFirst(typeName)})` : ""}.${getProcedureTypeByOpName(baseOpType)}(async ({ ctx, input }) => {
8104
8104
  const ${name} = await ctx.prisma.${lowerCaseFirst(modelName)}.${opType.replace("One", "")}(${input});
8105
8105
  return ${name};
8106
8106
  }),`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stryke/prisma-trpc-generator",
3
- "version": "0.11.3",
3
+ "version": "0.11.5",
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": {