@effectify/prisma 0.1.1 → 1.0.0

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.
Files changed (76) hide show
  1. package/dist/src/cli.d.ts +1 -1
  2. package/dist/src/cli.js +9 -9
  3. package/dist/src/commands/init.d.ts +1 -1
  4. package/dist/src/commands/init.js +0 -2
  5. package/dist/src/commands/prisma.d.ts +5 -0
  6. package/dist/src/commands/prisma.js +35 -0
  7. package/dist/src/generators/sql-schema-generator.d.ts +9 -0
  8. package/dist/src/generators/sql-schema-generator.js +50 -58
  9. package/dist/src/services/generator-context.d.ts +6 -0
  10. package/dist/src/services/generator-context.js +3 -0
  11. package/dist/src/services/generator-service.d.ts +14 -0
  12. package/dist/src/services/generator-service.js +121 -0
  13. package/dist/src/services/render-service.d.ts +10 -0
  14. package/dist/src/services/render-service.js +23 -0
  15. package/dist/src/templates/index-custom-error.eta +190 -0
  16. package/{prisma/generated/effect/index.ts → dist/src/templates/index-default.eta} +4 -38
  17. package/dist/src/templates/model.eta +8 -0
  18. package/dist/src/templates/prisma-raw-sql.eta +31 -0
  19. package/{prisma/generated/effect/prisma-repository.ts → dist/src/templates/prisma-repository.eta} +19 -19
  20. package/package.json +25 -18
  21. package/dist/src/commands/generate-effect.d.ts +0 -2
  22. package/dist/src/commands/generate-effect.js +0 -73
  23. package/dist/src/commands/generate-sql-schema.d.ts +0 -2
  24. package/dist/src/commands/generate-sql-schema.js +0 -72
  25. package/dist/src/effect-prisma.d.ts +0 -2
  26. package/dist/src/effect-prisma.js +0 -1771
  27. package/dist/src/generators/prisma-effect-generator.d.ts +0 -1
  28. package/dist/src/generators/prisma-effect-generator.js +0 -446
  29. package/prisma/dev.db +0 -0
  30. package/prisma/generated/client.d.ts +0 -1
  31. package/prisma/generated/client.js +0 -5
  32. package/prisma/generated/default.d.ts +0 -1
  33. package/prisma/generated/default.js +0 -5
  34. package/prisma/generated/edge.d.ts +0 -1
  35. package/prisma/generated/edge.js +0 -141
  36. package/prisma/generated/effect/schemas/enums.ts +0 -6
  37. package/prisma/generated/effect/schemas/index.ts +0 -2
  38. package/prisma/generated/effect/schemas/types.ts +0 -40
  39. package/prisma/generated/index-browser.js +0 -172
  40. package/prisma/generated/index.d.ts +0 -2360
  41. package/prisma/generated/index.js +0 -141
  42. package/prisma/generated/package.json +0 -144
  43. package/prisma/generated/query_compiler_bg.js +0 -2
  44. package/prisma/generated/query_compiler_bg.wasm +0 -0
  45. package/prisma/generated/query_compiler_bg.wasm-base64.js +0 -2
  46. package/prisma/generated/runtime/client.d.ts +0 -3180
  47. package/prisma/generated/runtime/client.js +0 -86
  48. package/prisma/generated/runtime/index-browser.d.ts +0 -87
  49. package/prisma/generated/runtime/index-browser.js +0 -6
  50. package/prisma/generated/runtime/wasm-compiler-edge.js +0 -76
  51. package/prisma/generated/schema.prisma +0 -31
  52. package/prisma/generated/wasm-edge-light-loader.mjs +0 -5
  53. package/prisma/generated/wasm-worker-loader.mjs +0 -5
  54. package/prisma/migrations/20250721164420_init/migration.sql +0 -9
  55. package/prisma/migrations/20250721191716_dumb/migration.sql +0 -49
  56. package/prisma/migrations/migration_lock.toml +0 -3
  57. package/prisma/schema.prisma +0 -31
  58. package/prisma.config.ts +0 -8
  59. package/project.json +0 -48
  60. package/scripts/cleanup-tests.ts +0 -26
  61. package/scripts/generate-test-files.ts +0 -93
  62. package/setup-tests.ts +0 -10
  63. package/src/cli.tsx +0 -23
  64. package/src/commands/generate-effect.ts +0 -109
  65. package/src/commands/generate-sql-schema.ts +0 -109
  66. package/src/commands/init.ts +0 -155
  67. package/src/effect-prisma.ts +0 -1826
  68. package/src/generators/prisma-effect-generator.ts +0 -496
  69. package/src/generators/sql-schema-generator.ts +0 -75
  70. package/test/prisma-model.test.ts +0 -340
  71. package/test/utils.ts +0 -10
  72. package/tsconfig.json +0 -20
  73. package/tsconfig.lib.json +0 -24
  74. package/tsconfig.spec.json +0 -15
  75. package/vitest.config.ts +0 -23
  76. /package/{prisma/generated/effect/prisma-schema.ts → dist/src/templates/prisma-schema.eta} +0 -0
@@ -1,172 +0,0 @@
1
-
2
- /* !!! This is code generated by Prisma. Do not edit directly. !!!
3
- /* eslint-disable */
4
- // biome-ignore-all lint: generated file
5
-
6
- Object.defineProperty(exports, "__esModule", { value: true });
7
-
8
- const {
9
- Decimal,
10
- DbNull,
11
- JsonNull,
12
- AnyNull,
13
- NullTypes,
14
- makeStrictEnum,
15
- Public,
16
- getRuntime,
17
- skip
18
- } = require('./runtime/index-browser.js')
19
-
20
-
21
- const Prisma = {}
22
-
23
- exports.Prisma = Prisma
24
- exports.$Enums = {}
25
-
26
- /**
27
- * Prisma Client JS version: 7.0.0
28
- * Query Engine version: 0c19ccc313cf9911a90d99d2ac2eb0280c76c513
29
- */
30
- Prisma.prismaVersion = {
31
- client: "7.0.0",
32
- engine: "0c19ccc313cf9911a90d99d2ac2eb0280c76c513"
33
- }
34
-
35
- Prisma.PrismaClientKnownRequestError = () => {
36
- const runtimeName = getRuntime().prettyName;
37
- throw new Error(`PrismaClientKnownRequestError is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}).
38
- In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`,
39
- )};
40
- Prisma.PrismaClientUnknownRequestError = () => {
41
- const runtimeName = getRuntime().prettyName;
42
- throw new Error(`PrismaClientUnknownRequestError is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}).
43
- In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`,
44
- )}
45
- Prisma.PrismaClientRustPanicError = () => {
46
- const runtimeName = getRuntime().prettyName;
47
- throw new Error(`PrismaClientRustPanicError is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}).
48
- In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`,
49
- )}
50
- Prisma.PrismaClientInitializationError = () => {
51
- const runtimeName = getRuntime().prettyName;
52
- throw new Error(`PrismaClientInitializationError is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}).
53
- In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`,
54
- )}
55
- Prisma.PrismaClientValidationError = () => {
56
- const runtimeName = getRuntime().prettyName;
57
- throw new Error(`PrismaClientValidationError is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}).
58
- In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`,
59
- )}
60
- Prisma.Decimal = Decimal
61
-
62
- /**
63
- * Re-export of sql-template-tag
64
- */
65
- Prisma.sql = () => {
66
- const runtimeName = getRuntime().prettyName;
67
- throw new Error(`sqltag is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}).
68
- In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`,
69
- )}
70
- Prisma.empty = () => {
71
- const runtimeName = getRuntime().prettyName;
72
- throw new Error(`empty is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}).
73
- In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`,
74
- )}
75
- Prisma.join = () => {
76
- const runtimeName = getRuntime().prettyName;
77
- throw new Error(`join is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}).
78
- In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`,
79
- )}
80
- Prisma.raw = () => {
81
- const runtimeName = getRuntime().prettyName;
82
- throw new Error(`raw is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}).
83
- In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`,
84
- )}
85
- Prisma.validator = Public.validator
86
-
87
- /**
88
- * Extensions
89
- */
90
- Prisma.getExtensionContext = () => {
91
- const runtimeName = getRuntime().prettyName;
92
- throw new Error(`Extensions.getExtensionContext is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}).
93
- In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`,
94
- )}
95
- Prisma.defineExtension = () => {
96
- const runtimeName = getRuntime().prettyName;
97
- throw new Error(`Extensions.defineExtension is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}).
98
- In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`,
99
- )}
100
-
101
- /**
102
- * Shorthand utilities for JSON filtering
103
- */
104
- Prisma.DbNull = DbNull
105
- Prisma.JsonNull = JsonNull
106
- Prisma.AnyNull = AnyNull
107
-
108
- Prisma.NullTypes = NullTypes
109
-
110
-
111
-
112
- /**
113
- * Enums
114
- */
115
-
116
- exports.Prisma.TransactionIsolationLevel = makeStrictEnum({
117
- Serializable: 'Serializable'
118
- });
119
-
120
- exports.Prisma.TodoScalarFieldEnum = {
121
- id: 'id',
122
- title: 'title',
123
- content: 'content',
124
- published: 'published',
125
- authorId: 'authorId'
126
- };
127
-
128
- exports.Prisma.SortOrder = {
129
- asc: 'asc',
130
- desc: 'desc'
131
- };
132
-
133
- exports.Prisma.NullsOrder = {
134
- first: 'first',
135
- last: 'last'
136
- };
137
-
138
-
139
- exports.Prisma.ModelName = {
140
- Todo: 'Todo'
141
- };
142
-
143
- /**
144
- * This is a stub Prisma Client that will error at runtime if called.
145
- */
146
- class PrismaClient {
147
- constructor() {
148
- return new Proxy(this, {
149
- get(target, prop) {
150
- let message
151
- const runtime = getRuntime()
152
- if (runtime.isEdge) {
153
- message = `PrismaClient is not configured to run in ${runtime.prettyName}. In order to run Prisma Client on edge runtime, either:
154
- - Use Prisma Accelerate: https://pris.ly/d/accelerate
155
- - Use Driver Adapters: https://pris.ly/d/driver-adapters
156
- `;
157
- } else {
158
- message = 'PrismaClient is unable to run in this browser environment, or has been bundled for the browser (running in `' + runtime.prettyName + '`).'
159
- }
160
-
161
- message += `
162
- If this is unexpected, please open an issue: https://pris.ly/prisma-prisma-bug-report`
163
-
164
- throw new Error(message)
165
- }
166
- })
167
- }
168
- }
169
-
170
- exports.PrismaClient = PrismaClient
171
-
172
- Object.assign(exports, Prisma)