@powerlines/plugin-prisma 0.4.28 → 0.4.30

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.
@@ -0,0 +1,3 @@
1
+ import "node:module";
2
+
3
+ export { };
@@ -0,0 +1,15 @@
1
+ const require_runtime = require('./_virtual/_rolldown/runtime.cjs');
2
+ let _prisma_generator_helper = require("@prisma/generator-helper");
3
+
4
+ //#region src/generator.ts
5
+ (0, _prisma_generator_helper.generatorHandler)({
6
+ onManifest: () => ({
7
+ defaultOutput: "./generated",
8
+ prettyName: "Powerlines Generator"
9
+ }),
10
+ onGenerate: async () => new Promise((resolve) => {
11
+ resolve(null);
12
+ })
13
+ });
14
+
15
+ //#endregion
@@ -0,0 +1,15 @@
1
+ import { generatorHandler } from "@prisma/generator-helper";
2
+
3
+ //#region src/generator.ts
4
+ generatorHandler({
5
+ onManifest: () => ({
6
+ defaultOutput: "./generated",
7
+ prettyName: "Powerlines Generator"
8
+ }),
9
+ onGenerate: async () => new Promise((resolve) => {
10
+ resolve(null);
11
+ })
12
+ });
13
+
14
+ //#endregion
15
+ export { };
package/dist/index.cjs CHANGED
@@ -72,18 +72,15 @@ const plugin = (options = {}) => {
72
72
  },
73
73
  async prepare() {
74
74
  await this.prisma.builder.write();
75
- const args = [
76
- "generate",
77
- "--schema",
78
- this.config.prisma.schema
79
- ];
80
- if (!this.config.prisma.prismaPath) {
81
- args.unshift(this.config.root);
82
- const result = await (0, _stryke_cli_execute.executePackage)("prisma", args, (0, _stryke_path_join_paths.joinPaths)(this.workspaceConfig.workspaceRoot, this.config.root));
75
+ if (this.config.prisma.prismaPath) {
76
+ const result = await (0, _stryke_cli_execute.execute)(`${this.config.prisma.prismaPath} generate --schema ${this.config.prisma.schema}`, this.config.root);
83
77
  if (result.failed) throw new Error(`Prisma process exited with code ${result.exitCode}.`);
84
78
  } else {
85
- args.unshift(this.config.prisma.prismaPath);
86
- const result = await (0, _stryke_cli_execute.execute)(args.join(" "), this.config.root);
79
+ const result = await (0, _stryke_cli_execute.executePackage)("prisma", [
80
+ "generate",
81
+ "--schema",
82
+ this.config.prisma.schema
83
+ ], (0, _stryke_path_join_paths.joinPaths)(this.workspaceConfig.workspaceRoot, this.config.root));
87
84
  if (result.failed) throw new Error(`Prisma process exited with code ${result.exitCode}.`);
88
85
  }
89
86
  },
package/dist/index.mjs CHANGED
@@ -68,18 +68,15 @@ const plugin = (options = {}) => {
68
68
  },
69
69
  async prepare() {
70
70
  await this.prisma.builder.write();
71
- const args = [
72
- "generate",
73
- "--schema",
74
- this.config.prisma.schema
75
- ];
76
- if (!this.config.prisma.prismaPath) {
77
- args.unshift(this.config.root);
78
- const result = await executePackage("prisma", args, joinPaths(this.workspaceConfig.workspaceRoot, this.config.root));
71
+ if (this.config.prisma.prismaPath) {
72
+ const result = await execute(`${this.config.prisma.prismaPath} generate --schema ${this.config.prisma.schema}`, this.config.root);
79
73
  if (result.failed) throw new Error(`Prisma process exited with code ${result.exitCode}.`);
80
74
  } else {
81
- args.unshift(this.config.prisma.prismaPath);
82
- const result = await execute(args.join(" "), this.config.root);
75
+ const result = await executePackage("prisma", [
76
+ "generate",
77
+ "--schema",
78
+ this.config.prisma.schema
79
+ ], joinPaths(this.workspaceConfig.workspaceRoot, this.config.root));
83
80
  if (result.failed) throw new Error(`Prisma process exited with code ${result.exitCode}.`);
84
81
  }
85
82
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@powerlines/plugin-prisma",
3
- "version": "0.4.28",
3
+ "version": "0.4.30",
4
4
  "private": false,
5
5
  "description": "A Powerlines plugin to generate project code and a Prisma client from a Prisma schema (PSL).",
6
6
  "keywords": ["prisma", "powerlines", "storm-software", "powerlines-plugin"],
@@ -264,6 +264,20 @@
264
264
  "default": "./dist/api/types.gen.mjs"
265
265
  }
266
266
  },
267
+ "./generator": {
268
+ "require": {
269
+ "types": "./dist/generator.d.cts",
270
+ "default": "./dist/generator.cjs"
271
+ },
272
+ "import": {
273
+ "types": "./dist/generator.d.mts",
274
+ "default": "./dist/generator.mjs"
275
+ },
276
+ "default": {
277
+ "types": "./dist/generator.d.mts",
278
+ "default": "./dist/generator.mjs"
279
+ }
280
+ },
267
281
  "./helpers": {
268
282
  "require": {
269
283
  "types": "./dist/helpers/index.d.cts",
@@ -370,7 +384,8 @@
370
384
  "typings": "dist/index.d.mts",
371
385
  "files": ["dist/**/*"],
372
386
  "dependencies": {
373
- "@powerlines/plugin-pulumi": "^0.5.27",
387
+ "@powerlines/plugin-pulumi": "^0.5.29",
388
+ "@prisma/generator-helper": "^7.5.0",
374
389
  "@prisma/get-platform": "^6.19.2",
375
390
  "@prisma/prisma-schema-wasm": "6.19.0-26.2ba551f319ab1df4bc874a89965d8b3641056773",
376
391
  "@stryke/cli": "^0.13.29",
@@ -382,15 +397,15 @@
382
397
  "defu": "^6.1.4",
383
398
  "fp-ts": "^2.16.11",
384
399
  "jiti": "^2.6.1",
385
- "powerlines": "^0.41.11",
400
+ "powerlines": "^0.41.13",
386
401
  "prisma-util": "^2.1.1",
387
402
  "ts-pattern": "^5.9.0"
388
403
  },
389
404
  "devDependencies": {
390
- "@powerlines/plugin-plugin": "^0.12.297",
405
+ "@powerlines/plugin-plugin": "^0.12.299",
391
406
  "@pulumi/pulumi": "^3.225.1",
392
407
  "@types/node": "^25.5.0"
393
408
  },
394
409
  "publishConfig": { "access": "public" },
395
- "gitHead": "c13dc78b9ef6d6418df534f4ea7181162d06ff1d"
410
+ "gitHead": "0fcc7a33523c8b70c1b5f65684a8b6a15ab68eba"
396
411
  }