@prisma-next/extension-supabase 0.14.0-dev.6 → 0.14.0-dev.61

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/dist/pack.mjs CHANGED
@@ -1,417 +1,5 @@
1
- import { t as version } from "./package-DsJwxFfN.mjs";
1
+ import { n as version, t as contract_default } from "./contract-D8Ohjhmw.mjs";
2
2
  import { blindCast } from "@prisma-next/utils/casts";
3
- //#region src/contract/contract.json
4
- var contract_default = {
5
- schemaVersion: "1",
6
- targetFamily: "sql",
7
- target: "postgres",
8
- profileHash: "sha256:9c8aa3114e84ed3b7ea2bd57526d9c2e1bf7c5292be694e9d3801f566fda7ccb",
9
- roots: {
10
- "buckets": {
11
- "model": "StorageBucket",
12
- "namespace": "storage"
13
- },
14
- "identities": {
15
- "model": "AuthIdentity",
16
- "namespace": "auth"
17
- },
18
- "objects": {
19
- "model": "StorageObject",
20
- "namespace": "storage"
21
- },
22
- "users": {
23
- "model": "AuthUser",
24
- "namespace": "auth"
25
- }
26
- },
27
- domain: { "namespaces": {
28
- "auth": { "models": {
29
- "AuthIdentity": {
30
- "fields": {
31
- "created_at": {
32
- "nullable": false,
33
- "type": {
34
- "codecId": "pg/timestamptz@1",
35
- "kind": "scalar"
36
- }
37
- },
38
- "id": {
39
- "nullable": false,
40
- "type": {
41
- "codecId": "pg/uuid@1",
42
- "kind": "scalar"
43
- }
44
- },
45
- "provider": {
46
- "nullable": false,
47
- "type": {
48
- "codecId": "pg/text@1",
49
- "kind": "scalar"
50
- }
51
- },
52
- "updated_at": {
53
- "nullable": false,
54
- "type": {
55
- "codecId": "pg/timestamptz@1",
56
- "kind": "scalar"
57
- }
58
- },
59
- "user_id": {
60
- "nullable": false,
61
- "type": {
62
- "codecId": "pg/uuid@1",
63
- "kind": "scalar"
64
- }
65
- }
66
- },
67
- "relations": {},
68
- "storage": {
69
- "fields": {
70
- "created_at": { "column": "created_at" },
71
- "id": { "column": "id" },
72
- "provider": { "column": "provider" },
73
- "updated_at": { "column": "updated_at" },
74
- "user_id": { "column": "user_id" }
75
- },
76
- "namespaceId": "auth",
77
- "table": "identities"
78
- }
79
- },
80
- "AuthUser": {
81
- "fields": {
82
- "created_at": {
83
- "nullable": false,
84
- "type": {
85
- "codecId": "pg/timestamptz@1",
86
- "kind": "scalar"
87
- }
88
- },
89
- "email": {
90
- "nullable": false,
91
- "type": {
92
- "codecId": "pg/text@1",
93
- "kind": "scalar"
94
- }
95
- },
96
- "id": {
97
- "nullable": false,
98
- "type": {
99
- "codecId": "pg/uuid@1",
100
- "kind": "scalar"
101
- }
102
- },
103
- "updated_at": {
104
- "nullable": false,
105
- "type": {
106
- "codecId": "pg/timestamptz@1",
107
- "kind": "scalar"
108
- }
109
- }
110
- },
111
- "relations": {},
112
- "storage": {
113
- "fields": {
114
- "created_at": { "column": "created_at" },
115
- "email": { "column": "email" },
116
- "id": { "column": "id" },
117
- "updated_at": { "column": "updated_at" }
118
- },
119
- "namespaceId": "auth",
120
- "table": "users"
121
- }
122
- }
123
- } },
124
- "storage": { "models": {
125
- "StorageBucket": {
126
- "fields": {
127
- "created_at": {
128
- "nullable": false,
129
- "type": {
130
- "codecId": "pg/timestamptz@1",
131
- "kind": "scalar"
132
- }
133
- },
134
- "id": {
135
- "nullable": false,
136
- "type": {
137
- "codecId": "pg/text@1",
138
- "kind": "scalar"
139
- }
140
- },
141
- "name": {
142
- "nullable": false,
143
- "type": {
144
- "codecId": "pg/text@1",
145
- "kind": "scalar"
146
- }
147
- },
148
- "updated_at": {
149
- "nullable": false,
150
- "type": {
151
- "codecId": "pg/timestamptz@1",
152
- "kind": "scalar"
153
- }
154
- }
155
- },
156
- "relations": {},
157
- "storage": {
158
- "fields": {
159
- "created_at": { "column": "created_at" },
160
- "id": { "column": "id" },
161
- "name": { "column": "name" },
162
- "updated_at": { "column": "updated_at" }
163
- },
164
- "namespaceId": "storage",
165
- "table": "buckets"
166
- }
167
- },
168
- "StorageObject": {
169
- "fields": {
170
- "bucket_id": {
171
- "nullable": false,
172
- "type": {
173
- "codecId": "pg/text@1",
174
- "kind": "scalar"
175
- }
176
- },
177
- "created_at": {
178
- "nullable": false,
179
- "type": {
180
- "codecId": "pg/timestamptz@1",
181
- "kind": "scalar"
182
- }
183
- },
184
- "id": {
185
- "nullable": false,
186
- "type": {
187
- "codecId": "pg/uuid@1",
188
- "kind": "scalar"
189
- }
190
- },
191
- "name": {
192
- "nullable": false,
193
- "type": {
194
- "codecId": "pg/text@1",
195
- "kind": "scalar"
196
- }
197
- },
198
- "updated_at": {
199
- "nullable": false,
200
- "type": {
201
- "codecId": "pg/timestamptz@1",
202
- "kind": "scalar"
203
- }
204
- }
205
- },
206
- "relations": {},
207
- "storage": {
208
- "fields": {
209
- "bucket_id": { "column": "bucket_id" },
210
- "created_at": { "column": "created_at" },
211
- "id": { "column": "id" },
212
- "name": { "column": "name" },
213
- "updated_at": { "column": "updated_at" }
214
- },
215
- "namespaceId": "storage",
216
- "table": "objects"
217
- }
218
- }
219
- } }
220
- } },
221
- storage: {
222
- "namespaces": {
223
- "auth": {
224
- "entries": { "table": {
225
- "identities": {
226
- "columns": {
227
- "created_at": {
228
- "codecId": "pg/timestamptz@1",
229
- "nativeType": "timestamptz",
230
- "nullable": false,
231
- "typeRef": "Timestamptz"
232
- },
233
- "id": {
234
- "codecId": "pg/uuid@1",
235
- "nativeType": "uuid",
236
- "nullable": false,
237
- "typeRef": "Uuid"
238
- },
239
- "provider": {
240
- "codecId": "pg/text@1",
241
- "nativeType": "text",
242
- "nullable": false
243
- },
244
- "updated_at": {
245
- "codecId": "pg/timestamptz@1",
246
- "nativeType": "timestamptz",
247
- "nullable": false,
248
- "typeRef": "Timestamptz"
249
- },
250
- "user_id": {
251
- "codecId": "pg/uuid@1",
252
- "nativeType": "uuid",
253
- "nullable": false,
254
- "typeRef": "Uuid"
255
- }
256
- },
257
- "foreignKeys": [],
258
- "indexes": [],
259
- "primaryKey": { "columns": ["id"] },
260
- "uniques": []
261
- },
262
- "users": {
263
- "columns": {
264
- "created_at": {
265
- "codecId": "pg/timestamptz@1",
266
- "nativeType": "timestamptz",
267
- "nullable": false,
268
- "typeRef": "Timestamptz"
269
- },
270
- "email": {
271
- "codecId": "pg/text@1",
272
- "nativeType": "text",
273
- "nullable": false
274
- },
275
- "id": {
276
- "codecId": "pg/uuid@1",
277
- "nativeType": "uuid",
278
- "nullable": false,
279
- "typeRef": "Uuid"
280
- },
281
- "updated_at": {
282
- "codecId": "pg/timestamptz@1",
283
- "nativeType": "timestamptz",
284
- "nullable": false,
285
- "typeRef": "Timestamptz"
286
- }
287
- },
288
- "foreignKeys": [],
289
- "indexes": [],
290
- "primaryKey": { "columns": ["id"] },
291
- "uniques": []
292
- }
293
- } },
294
- "id": "auth",
295
- "kind": "postgres-schema"
296
- },
297
- "public": {
298
- "entries": { "table": {} },
299
- "id": "public",
300
- "kind": "postgres-schema"
301
- },
302
- "storage": {
303
- "entries": { "table": {
304
- "buckets": {
305
- "columns": {
306
- "created_at": {
307
- "codecId": "pg/timestamptz@1",
308
- "nativeType": "timestamptz",
309
- "nullable": false,
310
- "typeRef": "Timestamptz"
311
- },
312
- "id": {
313
- "codecId": "pg/text@1",
314
- "nativeType": "text",
315
- "nullable": false
316
- },
317
- "name": {
318
- "codecId": "pg/text@1",
319
- "nativeType": "text",
320
- "nullable": false
321
- },
322
- "updated_at": {
323
- "codecId": "pg/timestamptz@1",
324
- "nativeType": "timestamptz",
325
- "nullable": false,
326
- "typeRef": "Timestamptz"
327
- }
328
- },
329
- "foreignKeys": [],
330
- "indexes": [],
331
- "primaryKey": { "columns": ["id"] },
332
- "uniques": []
333
- },
334
- "objects": {
335
- "columns": {
336
- "bucket_id": {
337
- "codecId": "pg/text@1",
338
- "nativeType": "text",
339
- "nullable": false
340
- },
341
- "created_at": {
342
- "codecId": "pg/timestamptz@1",
343
- "nativeType": "timestamptz",
344
- "nullable": false,
345
- "typeRef": "Timestamptz"
346
- },
347
- "id": {
348
- "codecId": "pg/uuid@1",
349
- "nativeType": "uuid",
350
- "nullable": false,
351
- "typeRef": "Uuid"
352
- },
353
- "name": {
354
- "codecId": "pg/text@1",
355
- "nativeType": "text",
356
- "nullable": false
357
- },
358
- "updated_at": {
359
- "codecId": "pg/timestamptz@1",
360
- "nativeType": "timestamptz",
361
- "nullable": false,
362
- "typeRef": "Timestamptz"
363
- }
364
- },
365
- "foreignKeys": [],
366
- "indexes": [],
367
- "primaryKey": { "columns": ["id"] },
368
- "uniques": []
369
- }
370
- } },
371
- "id": "storage",
372
- "kind": "postgres-schema"
373
- }
374
- },
375
- "storageHash": "sha256:61dac13aa56bcb5b7f1c5441c2bd8fc07d88f6c870c80b4c1640fd0d180fb423",
376
- "types": {
377
- "Timestamptz": {
378
- "codecId": "pg/timestamptz@1",
379
- "kind": "codec-instance",
380
- "nativeType": "timestamptz"
381
- },
382
- "Uuid": {
383
- "codecId": "pg/uuid@1",
384
- "kind": "codec-instance",
385
- "nativeType": "uuid"
386
- }
387
- }
388
- },
389
- capabilities: {
390
- "postgres": {
391
- "distinctOn": true,
392
- "jsonAgg": true,
393
- "lateral": true,
394
- "limit": true,
395
- "orderBy": true,
396
- "returning": true
397
- },
398
- "sql": {
399
- "defaultInInsert": true,
400
- "enums": true,
401
- "lateral": true,
402
- "returning": true
403
- }
404
- },
405
- extensionPacks: {},
406
- defaultControlPolicy: "external",
407
- meta: {},
408
- _generated: {
409
- "warning": "⚠️ GENERATED FILE - DO NOT EDIT",
410
- "message": "This file is automatically generated by \"prisma-next contract emit\".",
411
- "regenerate": "To regenerate, run: prisma-next contract emit"
412
- }
413
- };
414
- //#endregion
415
3
  //#region src/pack/index.ts
416
4
  const SUPABASE_SPACE_ID = "supabase";
417
5
  function buildContractSpace(contractOverride) {
package/dist/pack.mjs.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"pack.mjs","names":["contractJson","packageJson.version"],"sources":["../src/contract/contract.json","../src/pack/index.ts"],"sourcesContent":["","import type { SqlControlExtensionDescriptor } from '@prisma-next/family-sql/control';\nimport { blindCast } from '@prisma-next/utils/casts';\nimport packageJson from '../../package.json' with { type: 'json' };\nimport type { Contract } from '../contract/contract.d';\nimport contractJson from '../contract/contract.json' with { type: 'json' };\n\nconst SUPABASE_SPACE_ID = 'supabase' as const;\n\nfunction buildContractSpace(contractOverride?: unknown) {\n const contract = blindCast<\n Contract,\n 'JSON import narrowed to emitted Contract type; assertDescriptorSelfConsistency verifies the storageHash at load time'\n >(contractOverride ?? contractJson);\n return {\n contractJson: contract,\n migrations: [] as const,\n headRef: { hash: contract.storage.storageHash, invariants: [] as const },\n };\n}\n\nconst supabaseContractSpace = buildContractSpace();\n\nconst supabasePackBase = {\n kind: 'extension' as const,\n id: SUPABASE_SPACE_ID,\n familyId: 'sql' as const,\n targetId: 'postgres' as const,\n version: packageJson.version,\n contractSpace: supabaseContractSpace,\n create: () => ({\n familyId: 'sql' as const,\n targetId: 'postgres' as const,\n }),\n} satisfies SqlControlExtensionDescriptor<'postgres'>;\n\nexport const supabasePack: SqlControlExtensionDescriptor<'postgres'> = supabasePackBase;\n\n/**\n * Returns a pack using `contractOverride` in place of the shipped\n * `contract.json` when provided, otherwise returns the default pack.\n *\n * Intended for tests that need to drive the framework with a synthetic\n * contract while still exercising the full descriptor wiring.\n */\nexport function supabasePackWith(options?: {\n contractOverride?: unknown;\n}): SqlControlExtensionDescriptor<'postgres'> {\n if (options?.contractOverride === undefined) return supabasePack;\n return {\n ...supabasePackBase,\n contractSpace: buildContractSpace(options.contractOverride),\n };\n}\n\nexport default supabasePack;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACMA,MAAM,oBAAoB;AAE1B,SAAS,mBAAmB,kBAA4B;CACtD,MAAM,WAAW,UAGf,oBAAoBA,gBAAY;CAClC,OAAO;EACL,cAAc;EACd,YAAY,CAAC;EACb,SAAS;GAAE,MAAM,SAAS,QAAQ;GAAa,YAAY,CAAC;EAAW;CACzE;AACF;AAIA,MAAM,mBAAmB;CACvB,MAAM;CACN,IAAI;CACJ,UAAU;CACV,UAAU;CACDC;CACT,eAR4B,mBAQb;CACf,eAAe;EACb,UAAU;EACV,UAAU;CACZ;AACF;AAEA,MAAa,eAA0D;;;;;;;;AASvE,SAAgB,iBAAiB,SAEa;CAC5C,IAAI,SAAS,qBAAqB,KAAA,GAAW,OAAO;CACpD,OAAO;EACL,GAAG;EACH,eAAe,mBAAmB,QAAQ,gBAAgB;CAC5D;AACF"}
1
+ {"version":3,"file":"pack.mjs","names":["contractJson","packageJson.version"],"sources":["../src/pack/index.ts"],"sourcesContent":["import type { SqlControlExtensionDescriptor } from '@prisma-next/family-sql/control';\nimport { blindCast } from '@prisma-next/utils/casts';\nimport packageJson from '../../package.json' with { type: 'json' };\nimport type { Contract } from '../contract/contract.d';\nimport contractJson from '../contract/contract.json' with { type: 'json' };\n\nconst SUPABASE_SPACE_ID = 'supabase' as const;\n\nfunction buildContractSpace(contractOverride?: unknown) {\n const contract = blindCast<\n Contract,\n 'JSON import narrowed to emitted Contract type; assertDescriptorSelfConsistency verifies the storageHash at load time'\n >(contractOverride ?? contractJson);\n return {\n contractJson: contract,\n migrations: [] as const,\n headRef: { hash: contract.storage.storageHash, invariants: [] as const },\n };\n}\n\nconst supabaseContractSpace = buildContractSpace();\n\nconst supabasePackBase = {\n kind: 'extension' as const,\n id: SUPABASE_SPACE_ID,\n familyId: 'sql' as const,\n targetId: 'postgres' as const,\n version: packageJson.version,\n contractSpace: supabaseContractSpace,\n create: () => ({\n familyId: 'sql' as const,\n targetId: 'postgres' as const,\n }),\n} satisfies SqlControlExtensionDescriptor<'postgres'>;\n\nexport const supabasePack: SqlControlExtensionDescriptor<'postgres'> = supabasePackBase;\n\n/**\n * Returns a pack using `contractOverride` in place of the shipped\n * `contract.json` when provided, otherwise returns the default pack.\n *\n * Intended for tests that need to drive the framework with a synthetic\n * contract while still exercising the full descriptor wiring.\n */\nexport function supabasePackWith(options?: {\n contractOverride?: unknown;\n}): SqlControlExtensionDescriptor<'postgres'> {\n if (options?.contractOverride === undefined) return supabasePack;\n return {\n ...supabasePackBase,\n contractSpace: buildContractSpace(options.contractOverride),\n };\n}\n\nexport default supabasePack;\n"],"mappings":";;;AAMA,MAAM,oBAAoB;AAE1B,SAAS,mBAAmB,kBAA4B;CACtD,MAAM,WAAW,UAGf,oBAAoBA,gBAAY;CAClC,OAAO;EACL,cAAc;EACd,YAAY,CAAC;EACb,SAAS;GAAE,MAAM,SAAS,QAAQ;GAAa,YAAY,CAAC;EAAW;CACzE;AACF;AAIA,MAAM,mBAAmB;CACvB,MAAM;CACN,IAAI;CACJ,UAAU;CACV,UAAU;CACDC;CACT,eAR4B,mBAQb;CACf,eAAe;EACb,UAAU;EACV,UAAU;CACZ;AACF;AAEA,MAAa,eAA0D;;;;;;;;AASvE,SAAgB,iBAAiB,SAEa;CAC5C,IAAI,SAAS,qBAAqB,KAAA,GAAW,OAAO;CACpD,OAAO;EACL,GAAG;EACH,eAAe,mBAAmB,QAAQ,gBAAgB;CAC5D;AACF"}