@baeta/plugin-prisma 2.0.0-next.15 → 2.0.0-next.16

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/CHANGELOG.md CHANGED
@@ -1,127 +1,19 @@
1
1
  # @baeta/plugin-prisma
2
2
 
3
- ## 2.0.0-next.15
4
-
5
- ### Patch Changes
6
-
7
- - Drop Node v23 and v25 by [@andreisergiu98](https://github.com/andreisergiu98) in [#474](https://github.com/andreisergiu98/baeta/pull/474)
8
- - Updated dependencies [[`dc89e17`](https://github.com/andreisergiu98/baeta/commit/dc89e1728926f4bd5a5e1351635c38bf8d5938dc), [`1249b32`](https://github.com/andreisergiu98/baeta/commit/1249b32c42270151d6d6de46d54c82c1f975719b), [`3571c17`](https://github.com/andreisergiu98/baeta/commit/3571c1785a4eb1361c47b80725c990cefa27a791), [`d179c12`](https://github.com/andreisergiu98/baeta/commit/d179c12488f6ac11add26f8337e088f791d820b7), [`03c2bc9`](https://github.com/andreisergiu98/baeta/commit/03c2bc9913b6ffdc15f627f9d177347e0805defd)]:
9
- - @baeta/generator-sdk@2.0.0-next.6
10
- - @baeta/plugin-exec@2.0.0-next.15
11
- - @baeta/util-path@2.0.0-next.5
12
-
13
- ## 2.0.0-next.14
14
-
15
- ### Patch Changes
16
-
17
- - Updated dependencies:
18
- - @baeta/plugin-exec@2.0.0-next.14
19
-
20
- ## 2.0.0-next.13
21
-
22
- ### Patch Changes
23
-
24
- - Updated dependencies [[`3e7a4d7`](https://github.com/andreisergiu98/baeta/commit/3e7a4d71a59543b8a506938f788aec8b5d907776), [`3e7a4d7`](https://github.com/andreisergiu98/baeta/commit/3e7a4d71a59543b8a506938f788aec8b5d907776), [`53322ca`](https://github.com/andreisergiu98/baeta/commit/53322ca8ad0c10bce70e49692d5d15023ec3a5e8)]:
25
- - @baeta/util-path@2.0.0-next.4
26
- - @baeta/generator-sdk@2.0.0-next.5
27
- - @baeta/plugin-exec@2.0.0-next.13
28
-
29
- ## 2.0.0-next.12
30
-
31
- ### Patch Changes
32
-
33
- - Updated dependencies []:
34
- - @baeta/plugin-exec@2.0.0-next.12
35
-
36
- ## 2.0.0-next.11
37
-
38
- ### Patch Changes
39
-
40
- - Updated dependencies []:
41
- - @baeta/plugin-exec@2.0.0-next.11
42
-
43
- ## 2.0.0-next.10
44
-
45
- ### Patch Changes
46
-
47
- - Updated dependencies []:
48
- - @baeta/plugin-exec@2.0.0-next.10
49
-
50
- ## 2.0.0-next.9
51
-
52
- ### Patch Changes
53
-
54
- - Updated dependencies [[`831cfa2`](https://github.com/andreisergiu98/baeta/commit/831cfa2a11445aaf7f2d1a1d7ddf073db9bb8008), [`831cfa2`](https://github.com/andreisergiu98/baeta/commit/831cfa2a11445aaf7f2d1a1d7ddf073db9bb8008)]:
55
- - @baeta/generator-sdk@2.0.0-next.4
56
- - @baeta/util-path@2.0.0-next.3
57
- - @baeta/plugin-exec@2.0.0-next.9
58
-
59
- ## 2.0.0-next.8
60
-
61
- ### Patch Changes
62
-
63
- - Updated dependencies []:
64
- - @baeta/plugin-exec@2.0.0-next.8
65
-
66
- ## 2.0.0-next.7
67
-
68
- ### Patch Changes
69
-
70
- - Updated dependencies []:
71
- - @baeta/plugin-exec@2.0.0-next.7
72
-
73
- ## 2.0.0-next.3
74
-
75
- ### Patch Changes
76
-
77
- - Update generator-sdk package
78
-
79
- - Updated dependencies [[`6de5d15`](https://github.com/andreisergiu98/baeta/commit/6de5d15484d341a1717a1b2f3f45272912e6a886)]:
80
- - @baeta/generator-sdk@2.0.0-next.3
81
- - @baeta/plugin-exec@2.0.0-next.3
82
-
83
- ## 2.0.0-next.2
84
-
85
- ### Patch Changes
86
-
87
- - Fix broken types
88
-
89
- - Updated dependencies []:
90
- - @baeta/generator-sdk@2.0.0-next.2
91
- - @baeta/plugin-exec@2.0.0-next.2
92
- - @baeta/util-path@2.0.0-next.2
93
-
94
- ## 2.0.0-next.1
95
-
96
- ### Patch Changes
97
-
98
- - Fix release version
99
-
100
- - Updated dependencies []:
101
- - @baeta/generator-sdk@2.0.0-next.1
102
- - @baeta/plugin-exec@2.0.0-next.1
103
- - @baeta/util-path@2.0.0-next.1
104
-
105
- ## 2.0.0-next.0
3
+ ## 2.0.0-next.16
106
4
 
107
5
  ### Major Changes
108
6
 
109
- - [#214](https://github.com/andreisergiu98/baeta/pull/214) [`31d1a50`](https://github.com/andreisergiu98/baeta/commit/31d1a509f96535b43ae85d19c770eb1a5f09dc94) Thanks [@andreisergiu98](https://github.com/andreisergiu98)! - Baeta v2 – major refactor
110
- - **Side-effect-free type generation & resolver definitions.**
111
- The types generator and resolver definitions were reworked to be side-effect free, improving type safety.
112
- - **Stricter type safety.**
113
- You must now **explicitly define resolvers for every field** during development—breakages that used to surface at runtime are now caught at compile time.
114
- - **Removed `@baeta/compiler`.**
115
- Since modern runtimes can execute TypeScript natively, the separate compiler package is no longer needed. Use your runtime’s native TS support or your existing build setup.
116
- - **Subscriptions update.**
117
- `@baeta/subscriptions-pubsub` now targets **`graphql-subscriptions` v3**.
7
+ - Drop support for Node.js v23 and v25. Baeta now targets the active LTS releases — Node.js `^22.20.0`, `^24.0.0`, or `>=26.0.0`. by [@andreisergiu98](https://github.com/andreisergiu98) in [#290](https://github.com/andreisergiu98/baeta/pull/290)
8
+
9
+ - Updated for Baeta v2. by [@andreisergiu98](https://github.com/andreisergiu98) in [#290](https://github.com/andreisergiu98/baeta/pull/290)
118
10
 
119
11
  ### Patch Changes
120
12
 
121
- - Updated dependencies [[`31d1a50`](https://github.com/andreisergiu98/baeta/commit/31d1a509f96535b43ae85d19c770eb1a5f09dc94)]:
122
- - @baeta/generator-sdk@2.0.0-next.0
123
- - @baeta/plugin-exec@2.0.0-next.0
124
- - @baeta/util-path@2.0.0-next.0
13
+ - Updated dependencies [[`046dc5c`](https://github.com/andreisergiu98/baeta/commit/046dc5c29a8ec0f613b9430caa659c08d41a678c), [`046dc5c`](https://github.com/andreisergiu98/baeta/commit/046dc5c29a8ec0f613b9430caa659c08d41a678c), [`046dc5c`](https://github.com/andreisergiu98/baeta/commit/046dc5c29a8ec0f613b9430caa659c08d41a678c)]:
14
+ - @baeta/generator-sdk@2.0.0-next.7
15
+ - @baeta/plugin-exec@2.0.0-next.16
16
+ - @baeta/util-path@2.0.0-next.6
125
17
 
126
18
  ## 1.0.11
127
19
 
package/README.md CHANGED
@@ -5,9 +5,10 @@
5
5
  <div align="center">
6
6
  <h1>Baeta</h1>
7
7
  <a href="https://www.npmjs.com/package/@baeta/cli"><img src="https://img.shields.io/npm/v/@baeta/cli.svg?style=flat" /></a>
8
- <a href="https://github.com/andreisergiu98/baeta/actions/workflows/checks.yml"><img src="https://img.shields.io/github/actions/workflow/status/andreisergiu98/baeta/checks.yml" /></a>
8
+ <a href="https://github.com/andreisergiu98/baeta/actions/workflows/build.yml"><img src="https://img.shields.io/github/actions/workflow/status/andreisergiu98/baeta/build.yml" /></a>
9
9
  <a href="https://github.com/andreisergiu98/baeta/pulls"><img src="https://img.shields.io/badge/PRs-welcome-brightgreen.svg" /></a>
10
10
  <a href="https://github.com/andreisergiu98/baeta/blob/main/LICENSE"><img src="https://img.shields.io/badge/license-MIT-blue" /></a>
11
+ <img alt="nycrc config on GitHub" src="https://img.shields.io/nycrc/andreisergiu98/baeta?config=.nycrc.json&preferredThreshold=branches&color=green">
11
12
  <br />
12
13
  <br />
13
14
  <a href="https://baeta.io/docs/getting-started/installation">Getting Started</a>
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":[],"sources":["../lib/client-generator.ts","../index.ts"],"sourcesContent":["import { readFile } from 'node:fs/promises';\nimport type { Ctx, WatcherFile } from '@baeta/generator-sdk';\nimport { createExecPlugin } from '@baeta/plugin-exec';\nimport { resolve } from '@baeta/util-path';\nimport type { PrismaPluginOptions } from './options.ts';\n\nasync function compareSchemas(cwd: string, current: string, generated: string) {\n\tconst [currentSchema, generatedSchema] = await Promise.all([\n\t\treadFile(resolve(cwd, current), 'utf-8'),\n\t\treadFile(resolve(cwd, generated), 'utf-8').catch(() => null),\n\t]);\n\treturn currentSchema.replaceAll(' ', '') === generatedSchema?.replaceAll(' ', '');\n}\n\nexport function createPrismaClientPlugin(options: PrismaPluginOptions) {\n\tconst { prismaSchema, generateCommand, generatedSchemaPath } = options;\n\n\treturn createExecPlugin({\n\t\tname: 'prisma-client',\n\t\tactionName: 'Prisma client',\n\t\texec: generateCommand ?? 'prisma generate',\n\t\twatch: (generatorOptions, watcher, reload) => {\n\t\t\tconst prismaPath = resolve(generatorOptions.cwd, prismaSchema);\n\n\t\t\tconst handleChange = (file: WatcherFile) => {\n\t\t\t\tif (file.path === prismaPath) {\n\t\t\t\t\treload(file);\n\t\t\t\t}\n\t\t\t};\n\n\t\t\twatcher.on('update', handleChange);\n\t\t\twatcher.on('delete', handleChange);\n\t\t},\n\t\tskip: async (ctx: Ctx) => {\n\t\t\tconst schema = resolve(ctx.generatorOptions.cwd, prismaSchema);\n\n\t\t\tif (ctx.watching && ctx.changedFile?.path !== schema) {\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\tif (!ctx.watching && generatedSchemaPath) {\n\t\t\t\treturn await compareSchemas(ctx.generatorOptions.cwd, prismaSchema, generatedSchemaPath);\n\t\t\t}\n\n\t\t\treturn false;\n\t\t},\n\t});\n}\n","import { createPrismaClientPlugin } from './lib/client-generator.ts';\nimport type { PrismaPluginOptions } from './lib/options.ts';\n\nexport type { PrismaPluginOptions } from './lib/options.ts';\n\nexport default prismaPlugin;\n\n/**\n * A plugin that manages Prisma client generation in your Baeta project.\n * See https://baeta.io/docs/plugins/prisma\n *\n * @param options - Configuration options for the pagination plugin\n * @returns A Baeta generator plugin\n */\nexport function prismaPlugin(options: PrismaPluginOptions) {\n\tif (options.generateClient === false) {\n\t\treturn [];\n\t}\n\treturn [createPrismaClientPlugin(options)];\n}\n"],"mappings":";;;;AAMA,eAAe,eAAe,KAAa,SAAiB,WAAmB;CAC9E,MAAM,CAAC,eAAe,mBAAmB,MAAM,QAAQ,IAAI,CAC1D,SAAS,QAAQ,KAAK,OAAO,GAAG,OAAO,GACvC,SAAS,QAAQ,KAAK,SAAS,GAAG,OAAO,EAAE,YAAY,IAAI,CAC5D,CAAC;CACD,OAAO,cAAc,WAAW,KAAK,EAAE,MAAM,iBAAiB,WAAW,KAAK,EAAE;AACjF;AAEA,SAAgB,yBAAyB,SAA8B;CACtE,MAAM,EAAE,cAAc,iBAAiB,wBAAwB;CAE/D,OAAO,iBAAiB;EACvB,MAAM;EACN,YAAY;EACZ,MAAM,mBAAmB;EACzB,QAAQ,kBAAkB,SAAS,WAAW;GAC7C,MAAM,aAAa,QAAQ,iBAAiB,KAAK,YAAY;GAE7D,MAAM,gBAAgB,SAAsB;IAC3C,IAAI,KAAK,SAAS,YACjB,OAAO,IAAI;GAEb;GAEA,QAAQ,GAAG,UAAU,YAAY;GACjC,QAAQ,GAAG,UAAU,YAAY;EAClC;EACA,MAAM,OAAO,QAAa;GACzB,MAAM,SAAS,QAAQ,IAAI,iBAAiB,KAAK,YAAY;GAE7D,IAAI,IAAI,YAAY,IAAI,aAAa,SAAS,QAC7C,OAAO;GAGR,IAAI,CAAC,IAAI,YAAY,qBACpB,OAAO,MAAM,eAAe,IAAI,iBAAiB,KAAK,cAAc,mBAAmB;GAGxF,OAAO;EACR;CACD,CAAC;AACF;;;AC1CA,IAAA,wBAAe;;;;;;;;AASf,SAAgB,aAAa,SAA8B;CAC1D,IAAI,QAAQ,mBAAmB,OAC9B,OAAO,CAAC;CAET,OAAO,CAAC,yBAAyB,OAAO,CAAC;AAC1C"}
1
+ {"version":3,"file":"index.js","names":[],"sources":["../lib/client-generator.ts","../index.ts"],"sourcesContent":["import { readFile } from 'node:fs/promises';\nimport type { Ctx, WatcherFile } from '@baeta/generator-sdk';\nimport { createExecPlugin } from '@baeta/plugin-exec';\nimport { resolve } from '@baeta/util-path';\nimport type { PrismaPluginOptions } from './options.ts';\n\nasync function compareSchemas(cwd: string, current: string, generated: string) {\n\tconst [currentSchema, generatedSchema] = await Promise.all([\n\t\treadFile(resolve(cwd, current), 'utf-8'),\n\t\treadFile(resolve(cwd, generated), 'utf-8').catch(() => null),\n\t]);\n\treturn currentSchema.replaceAll(' ', '') === generatedSchema?.replaceAll(' ', '');\n}\n\nexport function createPrismaClientPlugin(options: PrismaPluginOptions) {\n\tconst { prismaSchema, generateCommand, generatedSchemaPath } = options;\n\n\treturn createExecPlugin({\n\t\tname: 'prisma-client',\n\t\tactionName: 'Prisma client',\n\t\texec: generateCommand ?? 'prisma generate',\n\t\twatch: (generatorOptions, watcher, reload) => {\n\t\t\tconst prismaPath = resolve(generatorOptions.cwd, prismaSchema);\n\n\t\t\tconst handleChange = (file: WatcherFile) => {\n\t\t\t\tif (file.path === prismaPath) {\n\t\t\t\t\treload(file);\n\t\t\t\t}\n\t\t\t};\n\n\t\t\twatcher.on('update', handleChange);\n\t\t\twatcher.on('delete', handleChange);\n\t\t},\n\t\tskip: async (ctx: Ctx) => {\n\t\t\tconst schema = resolve(ctx.generatorOptions.cwd, prismaSchema);\n\n\t\t\tif (ctx.watching && ctx.changedFile?.path !== schema) {\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\tif (!ctx.watching && generatedSchemaPath) {\n\t\t\t\treturn await compareSchemas(ctx.generatorOptions.cwd, prismaSchema, generatedSchemaPath);\n\t\t\t}\n\n\t\t\treturn false;\n\t\t},\n\t});\n}\n","import { createPrismaClientPlugin } from './lib/client-generator.ts';\nimport type { PrismaPluginOptions } from './lib/options.ts';\n\nexport type { PrismaPluginOptions } from './lib/options.ts';\n\nexport default prismaPlugin;\n\n/**\n * A plugin that manages Prisma client generation in your Baeta project.\n * See https://baeta.io/docs/plugins/prisma\n *\n * @param options - Configuration options for the pagination plugin\n * @returns A Baeta generator plugin\n */\nexport function prismaPlugin(options: PrismaPluginOptions) {\n\tif (options.generateClient === false) {\n\t\treturn [];\n\t}\n\treturn [createPrismaClientPlugin(options)];\n}\n"],"mappings":";;;;AAMA,eAAe,eAAe,KAAa,SAAiB,WAAmB;CAC9E,MAAM,CAAC,eAAe,mBAAmB,MAAM,QAAQ,IAAI,CAC1D,SAAS,QAAQ,KAAK,OAAO,GAAG,OAAO,GACvC,SAAS,QAAQ,KAAK,SAAS,GAAG,OAAO,CAAC,CAAC,YAAY,IAAI,CAC5D,CAAC;CACD,OAAO,cAAc,WAAW,KAAK,EAAE,MAAM,iBAAiB,WAAW,KAAK,EAAE;AACjF;AAEA,SAAgB,yBAAyB,SAA8B;CACtE,MAAM,EAAE,cAAc,iBAAiB,wBAAwB;CAE/D,OAAO,iBAAiB;EACvB,MAAM;EACN,YAAY;EACZ,MAAM,mBAAmB;EACzB,QAAQ,kBAAkB,SAAS,WAAW;GAC7C,MAAM,aAAa,QAAQ,iBAAiB,KAAK,YAAY;GAE7D,MAAM,gBAAgB,SAAsB;IAC3C,IAAI,KAAK,SAAS,YACjB,OAAO,IAAI;GAEb;GAEA,QAAQ,GAAG,UAAU,YAAY;GACjC,QAAQ,GAAG,UAAU,YAAY;EAClC;EACA,MAAM,OAAO,QAAa;GACzB,MAAM,SAAS,QAAQ,IAAI,iBAAiB,KAAK,YAAY;GAE7D,IAAI,IAAI,YAAY,IAAI,aAAa,SAAS,QAC7C,OAAO;GAGR,IAAI,CAAC,IAAI,YAAY,qBACpB,OAAO,MAAM,eAAe,IAAI,iBAAiB,KAAK,cAAc,mBAAmB;GAGxF,OAAO;EACR;CACD,CAAC;AACF;;;AC1CA,IAAA,wBAAe;;;;;;;;AASf,SAAgB,aAAa,SAA8B;CAC1D,IAAI,QAAQ,mBAAmB,OAC9B,OAAO,CAAC;CAET,OAAO,CAAC,yBAAyB,OAAO,CAAC;AAC1C"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@baeta/plugin-prisma",
3
- "version": "2.0.0-next.15",
3
+ "version": "2.0.0-next.16",
4
4
  "description": "Prisma integration plugin for Baeta.",
5
5
  "keywords": [
6
6
  "baeta",
@@ -55,9 +55,9 @@
55
55
  "types": "tsc --noEmit"
56
56
  },
57
57
  "dependencies": {
58
- "@baeta/generator-sdk": "^2.0.0-next.6",
59
- "@baeta/plugin-exec": "^2.0.0-next.15",
60
- "@baeta/util-path": "^2.0.0-next.5"
58
+ "@baeta/generator-sdk": "^2.0.0-next.7",
59
+ "@baeta/plugin-exec": "^2.0.0-next.16",
60
+ "@baeta/util-path": "^2.0.0-next.6"
61
61
  },
62
62
  "devDependencies": {
63
63
  "@baeta/builder": "^0.0.0",