@prisma/orm-extension-supabase 8.0.0-rc.18-dev.10 → 8.0.0-rc.18-dev.11

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.
@@ -19,7 +19,6 @@ declare const AuthUser: import("@prisma/orm-family-sql/contract-ts/contract-buil
19
19
  readonly default?: import("@prisma/orm-family-sql/contract-ts/contract-builder").AuthoredColumnDefault | undefined;
20
20
  readonly executionDefaults?: import("@prisma/orm-framework/contract/types").ExecutionMutationDefaultPhases | undefined;
21
21
  readonly many: false;
22
- readonly noCheck?: readonly import("@prisma/orm-family-sql/schema-ir/naming").CheckKind[] | undefined;
23
22
  } & {
24
23
  readonly id: {
25
24
  readonly name?: string | undefined;
@@ -44,7 +43,6 @@ declare const AuthUser: import("@prisma/orm-family-sql/contract-ts/contract-buil
44
43
  readonly default?: import("@prisma/orm-family-sql/contract-ts/contract-builder").AuthoredColumnDefault | undefined;
45
44
  readonly executionDefaults?: import("@prisma/orm-framework/contract/types").ExecutionMutationDefaultPhases | undefined;
46
45
  readonly many: false;
47
- readonly noCheck?: readonly import("@prisma/orm-family-sql/schema-ir/naming").CheckKind[] | undefined;
48
46
  } & {
49
47
  readonly id?: undefined;
50
48
  } & {
@@ -67,7 +65,6 @@ declare const AuthUser: import("@prisma/orm-family-sql/contract-ts/contract-buil
67
65
  readonly default?: import("@prisma/orm-family-sql/contract-ts/contract-builder").AuthoredColumnDefault | undefined;
68
66
  readonly executionDefaults?: import("@prisma/orm-framework/contract/types").ExecutionMutationDefaultPhases | undefined;
69
67
  readonly many: false;
70
- readonly noCheck?: readonly import("@prisma/orm-family-sql/schema-ir/naming").CheckKind[] | undefined;
71
68
  } & {
72
69
  readonly id?: undefined;
73
70
  } & {
@@ -90,7 +87,6 @@ declare const AuthUser: import("@prisma/orm-family-sql/contract-ts/contract-buil
90
87
  readonly default?: import("@prisma/orm-family-sql/contract-ts/contract-builder").AuthoredColumnDefault | undefined;
91
88
  readonly executionDefaults?: import("@prisma/orm-framework/contract/types").ExecutionMutationDefaultPhases | undefined;
92
89
  readonly many: false;
93
- readonly noCheck?: readonly import("@prisma/orm-family-sql/schema-ir/naming").CheckKind[] | undefined;
94
90
  } & {
95
91
  readonly id?: undefined;
96
92
  } & {
@@ -115,7 +111,6 @@ declare const AuthIdentity: import("@prisma/orm-family-sql/contract-ts/contract-
115
111
  readonly default?: import("@prisma/orm-family-sql/contract-ts/contract-builder").AuthoredColumnDefault | undefined;
116
112
  readonly executionDefaults?: import("@prisma/orm-framework/contract/types").ExecutionMutationDefaultPhases | undefined;
117
113
  readonly many: false;
118
- readonly noCheck?: readonly import("@prisma/orm-family-sql/schema-ir/naming").CheckKind[] | undefined;
119
114
  } & {
120
115
  readonly id: {
121
116
  readonly name?: string | undefined;
@@ -140,7 +135,6 @@ declare const AuthIdentity: import("@prisma/orm-family-sql/contract-ts/contract-
140
135
  readonly default?: import("@prisma/orm-family-sql/contract-ts/contract-builder").AuthoredColumnDefault | undefined;
141
136
  readonly executionDefaults?: import("@prisma/orm-framework/contract/types").ExecutionMutationDefaultPhases | undefined;
142
137
  readonly many: false;
143
- readonly noCheck?: readonly import("@prisma/orm-family-sql/schema-ir/naming").CheckKind[] | undefined;
144
138
  } & {
145
139
  readonly id?: undefined;
146
140
  } & {
@@ -163,7 +157,6 @@ declare const AuthIdentity: import("@prisma/orm-family-sql/contract-ts/contract-
163
157
  readonly default?: import("@prisma/orm-family-sql/contract-ts/contract-builder").AuthoredColumnDefault | undefined;
164
158
  readonly executionDefaults?: import("@prisma/orm-framework/contract/types").ExecutionMutationDefaultPhases | undefined;
165
159
  readonly many: false;
166
- readonly noCheck?: readonly import("@prisma/orm-family-sql/schema-ir/naming").CheckKind[] | undefined;
167
160
  } & {
168
161
  readonly id?: undefined;
169
162
  } & {
@@ -186,7 +179,6 @@ declare const AuthIdentity: import("@prisma/orm-family-sql/contract-ts/contract-
186
179
  readonly default?: import("@prisma/orm-family-sql/contract-ts/contract-builder").AuthoredColumnDefault | undefined;
187
180
  readonly executionDefaults?: import("@prisma/orm-framework/contract/types").ExecutionMutationDefaultPhases | undefined;
188
181
  readonly many: false;
189
- readonly noCheck?: readonly import("@prisma/orm-family-sql/schema-ir/naming").CheckKind[] | undefined;
190
182
  } & {
191
183
  readonly id?: undefined;
192
184
  } & {
@@ -209,7 +201,6 @@ declare const AuthIdentity: import("@prisma/orm-family-sql/contract-ts/contract-
209
201
  readonly default?: import("@prisma/orm-family-sql/contract-ts/contract-builder").AuthoredColumnDefault | undefined;
210
202
  readonly executionDefaults?: import("@prisma/orm-framework/contract/types").ExecutionMutationDefaultPhases | undefined;
211
203
  readonly many: false;
212
- readonly noCheck?: readonly import("@prisma/orm-family-sql/schema-ir/naming").CheckKind[] | undefined;
213
204
  } & {
214
205
  readonly id?: undefined;
215
206
  } & {
@@ -234,7 +225,6 @@ declare const StorageBucket: import("@prisma/orm-family-sql/contract-ts/contract
234
225
  readonly default?: import("@prisma/orm-family-sql/contract-ts/contract-builder").AuthoredColumnDefault | undefined;
235
226
  readonly executionDefaults?: import("@prisma/orm-framework/contract/types").ExecutionMutationDefaultPhases | undefined;
236
227
  readonly many: false;
237
- readonly noCheck?: readonly import("@prisma/orm-family-sql/schema-ir/naming").CheckKind[] | undefined;
238
228
  } & {
239
229
  readonly id: {
240
230
  readonly name?: string | undefined;
@@ -259,7 +249,6 @@ declare const StorageBucket: import("@prisma/orm-family-sql/contract-ts/contract
259
249
  readonly default?: import("@prisma/orm-family-sql/contract-ts/contract-builder").AuthoredColumnDefault | undefined;
260
250
  readonly executionDefaults?: import("@prisma/orm-framework/contract/types").ExecutionMutationDefaultPhases | undefined;
261
251
  readonly many: false;
262
- readonly noCheck?: readonly import("@prisma/orm-family-sql/schema-ir/naming").CheckKind[] | undefined;
263
252
  } & {
264
253
  readonly id?: undefined;
265
254
  } & {
@@ -282,7 +271,6 @@ declare const StorageBucket: import("@prisma/orm-family-sql/contract-ts/contract
282
271
  readonly default?: import("@prisma/orm-family-sql/contract-ts/contract-builder").AuthoredColumnDefault | undefined;
283
272
  readonly executionDefaults?: import("@prisma/orm-framework/contract/types").ExecutionMutationDefaultPhases | undefined;
284
273
  readonly many: false;
285
- readonly noCheck?: readonly import("@prisma/orm-family-sql/schema-ir/naming").CheckKind[] | undefined;
286
274
  } & {
287
275
  readonly id?: undefined;
288
276
  } & {
@@ -305,7 +293,6 @@ declare const StorageBucket: import("@prisma/orm-family-sql/contract-ts/contract
305
293
  readonly default?: import("@prisma/orm-family-sql/contract-ts/contract-builder").AuthoredColumnDefault | undefined;
306
294
  readonly executionDefaults?: import("@prisma/orm-framework/contract/types").ExecutionMutationDefaultPhases | undefined;
307
295
  readonly many: false;
308
- readonly noCheck?: readonly import("@prisma/orm-family-sql/schema-ir/naming").CheckKind[] | undefined;
309
296
  } & {
310
297
  readonly id?: undefined;
311
298
  } & {
@@ -330,7 +317,6 @@ declare const StorageObject: import("@prisma/orm-family-sql/contract-ts/contract
330
317
  readonly default?: import("@prisma/orm-family-sql/contract-ts/contract-builder").AuthoredColumnDefault | undefined;
331
318
  readonly executionDefaults?: import("@prisma/orm-framework/contract/types").ExecutionMutationDefaultPhases | undefined;
332
319
  readonly many: false;
333
- readonly noCheck?: readonly import("@prisma/orm-family-sql/schema-ir/naming").CheckKind[] | undefined;
334
320
  } & {
335
321
  readonly id: {
336
322
  readonly name?: string | undefined;
@@ -355,7 +341,6 @@ declare const StorageObject: import("@prisma/orm-family-sql/contract-ts/contract
355
341
  readonly default?: import("@prisma/orm-family-sql/contract-ts/contract-builder").AuthoredColumnDefault | undefined;
356
342
  readonly executionDefaults?: import("@prisma/orm-framework/contract/types").ExecutionMutationDefaultPhases | undefined;
357
343
  readonly many: false;
358
- readonly noCheck?: readonly import("@prisma/orm-family-sql/schema-ir/naming").CheckKind[] | undefined;
359
344
  } & {
360
345
  readonly id?: undefined;
361
346
  } & {
@@ -378,7 +363,6 @@ declare const StorageObject: import("@prisma/orm-family-sql/contract-ts/contract
378
363
  readonly default?: import("@prisma/orm-family-sql/contract-ts/contract-builder").AuthoredColumnDefault | undefined;
379
364
  readonly executionDefaults?: import("@prisma/orm-framework/contract/types").ExecutionMutationDefaultPhases | undefined;
380
365
  readonly many: false;
381
- readonly noCheck?: readonly import("@prisma/orm-family-sql/schema-ir/naming").CheckKind[] | undefined;
382
366
  } & {
383
367
  readonly id?: undefined;
384
368
  } & {
@@ -401,7 +385,6 @@ declare const StorageObject: import("@prisma/orm-family-sql/contract-ts/contract
401
385
  readonly default?: import("@prisma/orm-family-sql/contract-ts/contract-builder").AuthoredColumnDefault | undefined;
402
386
  readonly executionDefaults?: import("@prisma/orm-framework/contract/types").ExecutionMutationDefaultPhases | undefined;
403
387
  readonly many: false;
404
- readonly noCheck?: readonly import("@prisma/orm-family-sql/schema-ir/naming").CheckKind[] | undefined;
405
388
  } & {
406
389
  readonly id?: undefined;
407
390
  } & {
@@ -424,7 +407,6 @@ declare const StorageObject: import("@prisma/orm-family-sql/contract-ts/contract
424
407
  readonly default?: import("@prisma/orm-family-sql/contract-ts/contract-builder").AuthoredColumnDefault | undefined;
425
408
  readonly executionDefaults?: import("@prisma/orm-framework/contract/types").ExecutionMutationDefaultPhases | undefined;
426
409
  readonly many: false;
427
- readonly noCheck?: readonly import("@prisma/orm-family-sql/schema-ir/naming").CheckKind[] | undefined;
428
410
  } & {
429
411
  readonly id?: undefined;
430
412
  } & {
@@ -1 +1 @@
1
- {"version":3,"file":"contract.d.mts","names":[],"sources":["../../../../3-extensions/supabase/dist/contract.d.mts"],"mappings":";;;cAEc,+DAA+D;EAC3E,yDAAyD;aAC9C;aACA;eACE;eACA;;aAEF;eACE;;MAET,cAAc;;aAEP;aACA;aACA;aACA,+DAA+D;aAC/D,uDAAuD;aACvD;aACA,4DAA4D;;aAE5D;eACE;;;aAGF;;EAEX,4DAA4D;aACjD;aACA;eACE;eACA;;aAEF;eACE;;MAET,cAAc;;aAEP;aACA;aACA;aACA,+DAA+D;aAC/D,uDAAuD;aACvD;aACA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2DAA2D;aAChD;aACA;eACE;eACA;;aAEF;eACE;;MAET,cAAc;;aAEP;aACA;aACA;aACA,+DAA+D;aAC/D,uDAAuD;aACvD;aACA,4DAA4D;;aAE5D;;aAEA;;EAEX,iEAAiE;aACtD;aACA;eACE;eACA;;aAEF;eACE;;MAET,cAAc;;aAEP;aACA;aACA;aACA,+DAA+D;aAC/D,uDAAuD;aACvD;aACA,4DAA4D;;aAE5D;;aAEA;;EAEX,iEAAiE;aACtD;aACA;eACE;eACA;;aAEF;eACE;;MAET,cAAc;;aAEP;aACA;aACA;aACA,+DAA+D;aAC/D,uDAAuD;aACvD;aACA,4DAA4D;;aAE5D;;aAEA;;GAEV,4CAA4C;cACjC,oEAAoE;EAChF,yDAAyD;aAC9C;aACA;eACE;eACA;;aAEF;eACE;;MAET,cAAc;;aAEP;aACA;aACA;aACA,+DAA+D;aAC/D,uDAAuD;aACvD;aACA,4DAA4D;;aAE5D;eACE;;;aAGF;;EAEX,gEAAgE;aACrD;aACA;eACE;eACA;;aAEF;eACE;;MAET,cAAc;;aAEP;aACA;aACA;aACA,+DAA+D;aAC/D,uDAAuD;aACvD;aACA,4DAA4D;;aAE5D;;aAEA;;EAEX,2DAA2D;aAChD;aACA;eACE;eACA;;aAEF;eACE;;MAET,cAAc;;aAEP;aACA;aACA;aACA,+DAA+D;aAC/D,uDAAuD;aACvD;aACA,4DAA4D;;aAE5D;;aAEA;;EAEX,iEAAiE;aACtD;aACA;eACE;eACA;;aAEF;eACE;;MAET,cAAc;;aAEP;aACA;aACA;aACA,+DAA+D;aAC/D,uDAAuD;aACvD;aACA,4DAA4D;;aAE5D;;aAEA;;EAEX,iEAAiE;aACtD;aACA;eACE;eACA;;aAEF;eACE;;MAET,cAAc;;aAEP;aACA;aACA;aACA,+DAA+D;aAC/D,uDAAuD;aACvD;aACA,4DAA4D;;aAE5D;;aAEA;;GAEV,4CAA4C"}
1
+ {"version":3,"file":"contract.d.mts","names":[],"sources":["../../../../3-extensions/supabase/dist/contract.d.mts"],"mappings":";;;cAEc,+DAA+D;EAC3E,yDAAyD;aAC9C;aACA;eACE;eACA;;aAEF;eACE;;MAET,cAAc;;aAEP;aACA;aACA;aACA,+DAA+D;aAC/D,uDAAuD;aACvD;;aAEA;eACE;;;aAGF;;EAEX,4DAA4D;aACjD;aACA;eACE;eACA;;aAEF;eACE;;MAET,cAAc;;aAEP;aACA;aACA;aACA,+DAA+D;aAC/D,uDAAuD;aACvD;;aAEA;;aAEA;;EAEX,iEAAiE;aACtD;aACA;eACE;eACA;;aAEF;eACE;;MAET,cAAc;;aAEP;aACA;aACA;aACA,+DAA+D;aAC/D,uDAAuD;aACvD;;aAEA;;aAEA;;EAEX,iEAAiE;aACtD;aACA;eACE;eACA;;aAEF;eACE;;MAET,cAAc;;aAEP;aACA;aACA;aACA,+DAA+D;aAC/D,uDAAuD;aACvD;;aAEA;;aAEA;;GAEV,4CAA4C;cACjC,mEAAmE;EAC/E,yDAAyD;aAC9C;aACA;eACE;eACA;;aAEF;eACE;;MAET,cAAc;;aAEP;aACA;aACA;aACA,+DAA+D;aAC/D,uDAAuD;aACvD;;aAEA;eACE;;;aAGF;;EAEX,8DAA8D;aACnD;aACA;eACE;eACA;;aAEF;eACE;;MAET,cAAc;;aAEP;aACA;aACA;aACA,+DAA+D;aAC/D,uDAAuD;aACvD;;aAEA;;aAEA;;EAEX,+DAA+D;aACpD;aACA;eACE;eACA;;aAEF;eACE;;MAET,cAAc;;aAEP;aACA;aACA;aACA,+DAA+D;aAC/D,uDAAuD;aACvD;;aAEA;;aAEA;;EAEX,iEAAiE;aACtD;aACA;eACE;eACA;;aAEF;eACE;;MAET,cAAc;;aAEP;aACA;aACA;aACA,+DAA+D;aAC/D,uDAAuD;aACvD;;aAEA;;aAEA;;EAEX,iEAAiE;aACtD;aACA;eACE;eACA;;aAEF;eACE;;MAET,cAAc;;aAEP;aACA;aACA;aACA,+DAA+D;aAC/D,uDAAuD;aACvD;;aAEA;;aAEA;;GAEV,4CAA4C;cACjC,oEAAoE;EAChF,yDAAyD;aAC9C;aACA;eACE;eACA;;aAEF;eACE;;MAET,cAAc;;aAEP;aACA;aACA;aACA,+DAA+D;aAC/D,uDAAuD;aACvD;;aAEA;eACE;;;aAGF;;EAEX,2DAA2D;aAChD;aACA;eACE;eACA;;aAEF;eACE;;MAET,cAAc;;aAEP;aACA;aACA;aACA,+DAA+D;aAC/D,uDAAuD;aACvD;;aAEA;;aAEA;;EAEX,iEAAiE;aACtD;aACA;eACE;eACA;;aAEF;eACE;;MAET,cAAc;;aAEP;aACA;aACA;aACA,+DAA+D;aAC/D,uDAAuD;aACvD;;aAEA;;aAEA;;EAEX,iEAAiE;aACtD;aACA;eACE;eACA;;aAEF;eACE;;MAET,cAAc;;aAEP;aACA;aACA;aACA,+DAA+D;aAC/D,uDAAuD;aACvD;;aAEA;;aAEA;;GAEV,4CAA4C;cACjC,oEAAoE;EAChF,yDAAyD;aAC9C;aACA;eACE;eACA;;aAEF;eACE;;MAET,cAAc;;aAEP;aACA;aACA;aACA,+DAA+D;aAC/D,uDAAuD;aACvD;;aAEA;eACE;;;aAGF;;EAEX,gEAAgE;aACrD;aACA;eACE;eACA;;aAEF;eACE;;MAET,cAAc;;aAEP;aACA;aACA;aACA,+DAA+D;aAC/D,uDAAuD;aACvD;;aAEA;;aAEA;;EAEX,2DAA2D;aAChD;aACA;eACE;eACA;;aAEF;eACE;;MAET,cAAc;;aAEP;aACA;aACA;aACA,+DAA+D;aAC/D,uDAAuD;aACvD;;aAEA;;aAEA;;EAEX,iEAAiE;aACtD;aACA;eACE;eACA;;aAEF;eACE;;MAET,cAAc;;aAEP;aACA;aACA;aACA,+DAA+D;aAC/D,uDAAuD;aACvD;;aAEA;;aAEA;;EAEX,iEAAiE;aACtD;aACA;eACE;eACA;;aAEF;eACE;;MAET,cAAc;;aAEP;aACA;aACA;aACA,+DAA+D;aAC/D,uDAAuD;aACvD;;aAEA;;aAEA;;GAEV,4CAA4C"}
package/dist/pack.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { n as version, t as contract_default } from "./contract-BuEuJxnF-BJC6Yc5m.mjs";
1
+ import { n as version, t as contract_default } from "./contract-BUgTQTjT-BOcT3Z_I.mjs";
2
2
  import { blindCast } from "@prisma/orm-framework/utils/casts";
3
3
  //#region ../../../3-extensions/supabase/dist/pack.mjs
4
4
  const SUPABASE_SPACE_ID = "supabase";
package/dist/pack.mjs.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"pack.mjs","names":[],"sources":["../../../../3-extensions/supabase/dist/pack.mjs"],"sourcesContent":["import { n as version, t as contract_default } from \"./contract-BuEuJxnF.mjs\";\nimport { blindCast } from \"@internal/utils/casts\";\n//#region src/pack/index.ts\nconst SUPABASE_SPACE_ID = \"supabase\";\nfunction buildContractSpace(contractOverride) {\n\tconst contract = blindCast(contractOverride ?? contract_default);\n\treturn {\n\t\tcontractJson: contract,\n\t\tmigrations: [],\n\t\theadRef: {\n\t\t\thash: contract.storage.storageHash,\n\t\t\tinvariants: []\n\t\t}\n\t};\n}\nconst supabasePackBase = {\n\tkind: \"extension\",\n\tid: SUPABASE_SPACE_ID,\n\tfamilyId: \"sql\",\n\ttargetId: \"postgres\",\n\tversion,\n\tcontractSpace: buildContractSpace(),\n\tcreate: () => ({\n\t\tfamilyId: \"sql\",\n\t\ttargetId: \"postgres\"\n\t})\n};\nconst supabasePack = supabasePackBase;\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*/\nfunction supabasePackWith(options) {\n\tif (options?.contractOverride === void 0) return supabasePack;\n\treturn {\n\t\t...supabasePackBase,\n\t\tcontractSpace: buildContractSpace(options.contractOverride)\n\t};\n}\n//#endregion\nexport { supabasePack as default, supabasePackWith };\n\n//# sourceMappingURL=pack.mjs.map"],"mappings":";;;AAGA,MAAM,oBAAoB;AAC1B,SAAS,mBAAmB,kBAAkB;CAC7C,MAAM,WAAW,UAAU,oBAAoB,gBAAgB;CAC/D,OAAO;EACN,cAAc;EACd,YAAY,CAAC;EACb,SAAS;GACR,MAAM,SAAS,QAAQ;GACvB,YAAY,CAAC;EACd;CACD;AACD;AACA,MAAM,mBAAmB;CACxB,MAAM;CACN,IAAI;CACJ,UAAU;CACV,UAAU;CACV;CACA,eAAe,mBAAmB;CAClC,eAAe;EACd,UAAU;EACV,UAAU;CACX;AACD;AACA,MAAM,eAAe;;;;;;;;AAQrB,SAAS,iBAAiB,SAAS;CAClC,IAAI,SAAS,qBAAqB,KAAK,GAAG,OAAO;CACjD,OAAO;EACN,GAAG;EACH,eAAe,mBAAmB,QAAQ,gBAAgB;CAC3D;AACD"}
1
+ {"version":3,"file":"pack.mjs","names":[],"sources":["../../../../3-extensions/supabase/dist/pack.mjs"],"sourcesContent":["import { n as version, t as contract_default } from \"./contract-BUgTQTjT.mjs\";\nimport { blindCast } from \"@internal/utils/casts\";\n//#region src/pack/index.ts\nconst SUPABASE_SPACE_ID = \"supabase\";\nfunction buildContractSpace(contractOverride) {\n\tconst contract = blindCast(contractOverride ?? contract_default);\n\treturn {\n\t\tcontractJson: contract,\n\t\tmigrations: [],\n\t\theadRef: {\n\t\t\thash: contract.storage.storageHash,\n\t\t\tinvariants: []\n\t\t}\n\t};\n}\nconst supabasePackBase = {\n\tkind: \"extension\",\n\tid: SUPABASE_SPACE_ID,\n\tfamilyId: \"sql\",\n\ttargetId: \"postgres\",\n\tversion,\n\tcontractSpace: buildContractSpace(),\n\tcreate: () => ({\n\t\tfamilyId: \"sql\",\n\t\ttargetId: \"postgres\"\n\t})\n};\nconst supabasePack = supabasePackBase;\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*/\nfunction supabasePackWith(options) {\n\tif (options?.contractOverride === void 0) return supabasePack;\n\treturn {\n\t\t...supabasePackBase,\n\t\tcontractSpace: buildContractSpace(options.contractOverride)\n\t};\n}\n//#endregion\nexport { supabasePack as default, supabasePackWith };\n\n//# sourceMappingURL=pack.mjs.map"],"mappings":";;;AAGA,MAAM,oBAAoB;AAC1B,SAAS,mBAAmB,kBAAkB;CAC7C,MAAM,WAAW,UAAU,oBAAoB,gBAAgB;CAC/D,OAAO;EACN,cAAc;EACd,YAAY,CAAC;EACb,SAAS;GACR,MAAM,SAAS,QAAQ;GACvB,YAAY,CAAC;EACd;CACD;AACD;AACA,MAAM,mBAAmB;CACxB,MAAM;CACN,IAAI;CACJ,UAAU;CACV,UAAU;CACV;CACA,eAAe,mBAAmB;CAClC,eAAe;EACd,UAAU;EACV,UAAU;CACX;AACD;AACA,MAAM,eAAe;;;;;;;;AAQrB,SAAS,iBAAiB,SAAS;CAClC,IAAI,SAAS,qBAAqB,KAAK,GAAG,OAAO;CACjD,OAAO;EACN,GAAG;EACH,eAAe,mBAAmB,QAAQ,gBAAgB;CAC3D;AACD"}
@@ -25,7 +25,7 @@ import { SqlExecutionPlan, SqlQueryPlan } from "@prisma/orm-family-sql/relationa
25
25
  declare const supabaseRuntimeDescriptor: SqlRuntimeExtensionDescriptor<'postgres'>;
26
26
  //#endregion
27
27
  //#region src/contract/contract.d.ts
28
- type StorageHash = StorageHashBase<'cb23216599e58b222c1fe7d880105d8f166c8490935cec5ed539dbe77847d679'>;
28
+ type StorageHash = StorageHashBase<'292489649ae6d6928de98a32b544bd9caf6b7d49718c10fe2720b83545a4b5a2'>;
29
29
  type ProfileHash = ProfileHashBase<'3916f444a8a17ad749191acf9e08dad97d1a327b88c2f1d45d12f240296aa8b2'>;
30
30
  type CodecTypes$1 = CodecTypes;
31
31
  type QueryOperationTypes$1 = QueryOperationTypes<CodecTypes$1>;
@@ -750,7 +750,7 @@ type ContractBase = Omit<Contract<{
750
750
  readonly value: DefaultLiteralValue<'pg/text@1', readonly []>;
751
751
  };
752
752
  readonly many: {
753
- readonly elementNullable: false;
753
+ readonly elementNullable: true;
754
754
  };
755
755
  };
756
756
  readonly attribute_mapping: {
@@ -899,7 +899,7 @@ type ContractBase = Omit<Contract<{
899
899
  readonly value: DefaultLiteralValue<'pg/text@1', readonly []>;
900
900
  };
901
901
  readonly many: {
902
- readonly elementNullable: false;
902
+ readonly elementNullable: true;
903
903
  };
904
904
  };
905
905
  readonly skip_nonce_check: {
@@ -3185,7 +3185,7 @@ type ContractBase = Omit<Contract<{
3185
3185
  readonly codecId: 'pg/text@1';
3186
3186
  readonly nullable: true;
3187
3187
  readonly many: {
3188
- readonly elementNullable: false;
3188
+ readonly elementNullable: true;
3189
3189
  };
3190
3190
  };
3191
3191
  readonly avif_autodetection: {
@@ -3742,7 +3742,7 @@ type ContractBase = Omit<Contract<{
3742
3742
  readonly codecId: 'pg/text@1';
3743
3743
  readonly nullable: true;
3744
3744
  readonly many: {
3745
- readonly elementNullable: false;
3745
+ readonly elementNullable: true;
3746
3746
  };
3747
3747
  };
3748
3748
  readonly updated_at: {
@@ -5197,7 +5197,7 @@ type ContractBase = Omit<Contract<{
5197
5197
  readonly codecId: 'pg/text@1';
5198
5198
  };
5199
5199
  readonly many: {
5200
- readonly elementNullable: false;
5200
+ readonly elementNullable: true;
5201
5201
  };
5202
5202
  };
5203
5203
  readonly attributeMapping: {
@@ -5333,7 +5333,7 @@ type ContractBase = Omit<Contract<{
5333
5333
  readonly codecId: 'pg/text@1';
5334
5334
  };
5335
5335
  readonly many: {
5336
- readonly elementNullable: false;
5336
+ readonly elementNullable: true;
5337
5337
  };
5338
5338
  };
5339
5339
  readonly skipNonceCheck: {
@@ -8250,7 +8250,7 @@ type ContractBase = Omit<Contract<{
8250
8250
  readonly codecId: 'pg/text@1';
8251
8251
  };
8252
8252
  readonly many: {
8253
- readonly elementNullable: false;
8253
+ readonly elementNullable: true;
8254
8254
  };
8255
8255
  };
8256
8256
  readonly avifAutodetection: {
@@ -8457,7 +8457,7 @@ type ContractBase = Omit<Contract<{
8457
8457
  readonly codecId: 'pg/text@1';
8458
8458
  };
8459
8459
  readonly many: {
8460
- readonly elementNullable: false;
8460
+ readonly elementNullable: true;
8461
8461
  };
8462
8462
  };
8463
8463
  readonly updatedAt: {
package/dist/runtime.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { n as version, t as contract_default } from "./contract-BuEuJxnF-BJC6Yc5m.mjs";
1
+ import { n as version, t as contract_default } from "./contract-BUgTQTjT-BOcT3Z_I.mjs";
2
2
  import { a as isSupabaseRole, n as SupabaseRole, t as SUPABASE_JWT_ROLE_CLAIM } from "./roles-9Ql17Kbb-p1cF6Jlt.mjs";
3
3
  import { blindCast } from "@prisma/orm-framework/utils/casts";
4
4
  import postgresAdapter from "@prisma/orm-target-postgres/adapter/runtime";
@@ -1 +1 @@
1
- {"version":3,"file":"runtime.mjs","names":[],"sources":["../../../../3-extensions/supabase/dist/runtime.mjs"],"sourcesContent":["import { n as version, t as contract_default } from \"./contract-BuEuJxnF.mjs\";\nimport { a as isSupabaseRole, n as SupabaseRole, t as SUPABASE_JWT_ROLE_CLAIM } from \"./roles-9Ql17Kbb.mjs\";\nimport { blindCast } from \"@internal/utils/casts\";\nimport postgresAdapter from \"@internal/adapter-postgres/runtime\";\nimport postgresDriver, { suppressIdleConnectionErrors } from \"@internal/driver-postgres/runtime\";\nimport { instantiateExecutionStack } from \"@internal/framework-components/execution\";\nimport { PostgresRuntimeImpl, buildNamespacedNativeEnums, isPgPool } from \"@internal/postgres/runtime\";\nimport { createRawLane, sql } from \"@internal/sql-builder/runtime\";\nimport { orm } from \"@internal/sql-orm-client\";\nimport { activitySource, createExecutionContext, createSqlExecutionStack, withTransaction } from \"@internal/sql-runtime\";\nimport postgresTarget, { PostgresContractSerializer } from \"@internal/target-postgres/runtime\";\nimport { ifDefined } from \"@internal/utils/defined\";\nimport { InternalError } from \"@internal/utils/internal-error\";\nimport { createRemoteJWKSet, decodeProtectedHeader, jwtVerify } from \"jose\";\nimport { Pool } from \"pg\";\nimport { structuredError } from \"@internal/utils/structured-error\";\nimport { AsyncIterableResult } from \"@internal/framework-components/runtime\";\nimport { createTransactionStart, preparedStatementExecute, preparedStatementQuery, transactionStart } from \"@internal/sql-runtime/internal/prepared-query\";\n//#region src/runtime/descriptor.ts\n/**\n* Tells the runtime that the Supabase pack's runtime component is available.\n*\n* When a contract declares the Supabase pack, the runtime checks that a\n* matching descriptor has been registered. Without this, loading a Supabase\n* contract errors with \"pack runtime component missing\". The `supabase()`\n* factory registers this descriptor automatically — app code never needs to\n* reference it directly.\n*/\nconst supabaseRuntimeDescriptor = {\n\tkind: \"extension\",\n\tid: \"supabase\",\n\tversion,\n\tfamilyId: \"sql\",\n\ttargetId: \"postgres\",\n\tcodecs: () => [],\n\tcreate() {\n\t\treturn {\n\t\t\tfamilyId: \"sql\",\n\t\t\ttargetId: \"postgres\"\n\t\t};\n\t}\n};\n//#endregion\n//#region src/runtime/supabase-errors.ts\nfunction supabaseError(code, message, options) {\n\treturn structuredError(code, message, options);\n}\n//#endregion\n//#region src/runtime/supabase-runtime.ts\nvar SupabaseRuntimeImpl = class extends PostgresRuntimeImpl {\n\t/**\n\t* Opens a raw connection and applies role + JWT claims via session-scoped set_config.\n\t* On bind failure, destroys the connection before rethrowing — no leaked connections.\n\t* Not on the `SupabaseRuntime` interface; consumed by the facade, not by app code.\n\t*/\n\tasync openRoleSession(binding) {\n\t\treturn (await this.openRoleConnection(binding)).session;\n\t}\n\tasync openRoleConnection(binding) {\n\t\tconst conn = await this.acquireRawConnection();\n\t\ttry {\n\t\t\tawait conn.execute({\n\t\t\t\tsql: \"SELECT set_config($1, $2, false)\",\n\t\t\t\tparams: [\"role\", binding.role]\n\t\t\t});\n\t\t\tawait conn.execute({\n\t\t\t\tsql: \"SELECT set_config($1, $2, false)\",\n\t\t\t\tparams: [\"request.jwt.claims\", JSON.stringify(binding.claims ?? {})]\n\t\t\t});\n\t\t} catch (err) {\n\t\t\tawait conn.destroy(err).catch(() => void 0);\n\t\t\tthrow err;\n\t\t}\n\t\tconst self = this;\n\t\tconst session = {\n\t\t\t[transactionStart]: createTransactionStart(),\n\t\t\t[activitySource]: self.connectionActivitySource(conn, () => session),\n\t\t\tquery(plan, options) {\n\t\t\t\treturn self.queryAgainstQueryable(plan, conn, {\n\t\t\t\t\t...options,\n\t\t\t\t\tscope: \"connection\"\n\t\t\t\t});\n\t\t\t},\n\t\t\texecute(plan, options) {\n\t\t\t\treturn self.executeStatisticsAgainstQueryable(plan, conn, {\n\t\t\t\t\t...options,\n\t\t\t\t\tscope: \"connection\"\n\t\t\t\t});\n\t\t\t},\n\t\t\t[preparedStatementQuery](prepared, params, options) {\n\t\t\t\treturn self.runPreparedQueryAgainstRoleQueryable(prepared, params, conn, options);\n\t\t\t},\n\t\t\t[preparedStatementExecute](prepared, params, options) {\n\t\t\t\treturn self.runPreparedExecuteAgainstRoleQueryable(prepared, params, conn, options);\n\t\t\t},\n\t\t\tasync transaction() {\n\t\t\t\treturn self.beginTransactionOn(conn, session, void 0);\n\t\t\t},\n\t\t\t/**\n\t\t\t* Resets all session-local config then releases the connection back to the pool.\n\t\t\t* If RESET ALL fails, destroys the connection instead — pool-poisoning guarantee.\n\t\t\t*/\n\t\t\tasync release() {\n\t\t\t\ttry {\n\t\t\t\t\tawait conn.execute({ sql: \"RESET ALL\" });\n\t\t\t\t\tawait conn.release();\n\t\t\t\t} catch (resetError) {\n\t\t\t\t\tawait conn.destroy(resetError).catch(() => void 0);\n\t\t\t\t}\n\t\t\t},\n\t\t\tasync destroy(reason) {\n\t\t\t\tawait conn.destroy(reason);\n\t\t\t}\n\t\t};\n\t\treturn {\n\t\t\tconn,\n\t\t\tsession\n\t\t};\n\t}\n\t/** The activity source the facade gives the role-bound ORM: activities whose statements and transaction run on role sessions bound to `binding`, and content hashes at the `'connection'` scope role sessions run at. Not on the `SupabaseRuntime` interface. */\n\troleActivitySource(binding) {\n\t\treturn {\n\t\t\tstartActivity: (activity) => this.startActivityOnRoute(this.roleRoute(binding), activity, void 0),\n\t\t\tplanContentHash: (plan) => this.planContentHashFor(plan, \"connection\", void 0)\n\t\t};\n\t}\n\troleRoute(binding) {\n\t\treturn {\n\t\t\tscope: \"connection\",\n\t\t\tparent: () => void 0,\n\t\t\truntimeWork: true,\n\t\t\tquery: (plan, options) => this.streamOnRoleSession(binding, (session) => session.query(plan, options)),\n\t\t\texecute: (plan, options) => this.executeWithRole(plan, binding, options),\n\t\t\tpreparedQuery: (statement, params, options) => this.streamOnRoleSession(binding, (session) => session[preparedStatementQuery](statement, params, options)),\n\t\t\tpreparedExecute: (statement, params, options) => this.executeOnRoleSession(binding, (session) => session[preparedStatementExecute](statement, params, options)),\n\t\t\ttransaction: (parent) => this.beginRoleTransaction(binding, parent)\n\t\t};\n\t}\n\tasync beginRoleTransaction(binding, parent) {\n\t\tconst { conn, session } = await this.openRoleConnection(binding);\n\t\treturn this.ownTransaction(session, () => this.beginTransactionOn(conn, session, parent));\n\t}\n\t/**\n\t* Opens a role session, queries the plan, then releases after the stream drains.\n\t* On mid-stream error, destroys the session instead of releasing.\n\t*/\n\tqueryWithRole(plan, binding, options) {\n\t\treturn this.streamOnRoleSession(binding, (session) => session.query(plan, options));\n\t}\n\texecuteWithRole(plan, binding, options) {\n\t\treturn this.executeOnRoleSession(binding, (session) => session.execute(plan, options));\n\t}\n\tstreamOnRoleSession(binding, rows) {\n\t\tconst self = this;\n\t\tconst generator = async function* () {\n\t\t\tconst { session } = await self.openRoleConnection(binding);\n\t\t\tlet errored = false;\n\t\t\ttry {\n\t\t\t\tfor await (const row of rows(session)) yield row;\n\t\t\t} catch (err) {\n\t\t\t\terrored = true;\n\t\t\t\tawait session.destroy(err).catch(() => void 0);\n\t\t\t\tthrow err;\n\t\t\t} finally {\n\t\t\t\tif (!errored) await session.release();\n\t\t\t}\n\t\t};\n\t\treturn new AsyncIterableResult(generator());\n\t}\n\tasync executeOnRoleSession(binding, run) {\n\t\tconst { session } = await this.openRoleConnection(binding);\n\t\ttry {\n\t\t\tconst stats = await run(session);\n\t\t\tawait session.release();\n\t\t\treturn stats;\n\t\t} catch (err) {\n\t\t\tawait session.destroy(err).catch(() => void 0);\n\t\t\tthrow err;\n\t\t}\n\t}\n\trunPreparedExecuteAgainstRoleQueryable(prepared, params, queryable, options) {\n\t\treturn this.runPreparedExecuteAgainstQueryable(blindCast(prepared), blindCast(params), queryable, {\n\t\t\t...options,\n\t\t\tscope: \"connection\"\n\t\t});\n\t}\n\trunPreparedQueryAgainstRoleQueryable(prepared, params, queryable, options) {\n\t\treturn this.runPreparedQueryAgainstQueryable(blindCast(prepared), blindCast(params), queryable, {\n\t\t\t...options,\n\t\t\tscope: \"connection\"\n\t\t});\n\t}\n};\n//#endregion\n//#region src/runtime/supabase.ts\nfunction hasContractJson(options) {\n\treturn \"contractJson\" in options;\n}\nconst contractSerializer = new PostgresContractSerializer();\nfunction resolveContract(options) {\n\tconst contractJson = hasContractJson(options) ? options.contractJson : contractSerializer.serializeContract(options.contract);\n\treturn blindCast(contractSerializer.deserializeContract(contractJson));\n}\nfunction resolveKeyMaterial(options) {\n\tconst jwtSecret = \"jwtSecret\" in options ? options.jwtSecret : void 0;\n\tconst jwksUrl = \"jwksUrl\" in options ? options.jwksUrl : void 0;\n\tif (jwtSecret !== void 0 && jwksUrl !== void 0) throw supabaseError(\"SUPABASE.CONFIG_INVALID\", \"Provide either jwtSecret or jwksUrl, not both\", { meta: { reason: \"both jwtSecret and jwksUrl provided\" } });\n\tif (jwtSecret !== void 0) return {\n\t\tkind: \"secret\",\n\t\tkey: new TextEncoder().encode(jwtSecret)\n\t};\n\tif (jwksUrl !== void 0) return {\n\t\tkind: \"jwks\",\n\t\tkeyset: createRemoteJWKSet(new URL(jwksUrl))\n\t};\n\tthrow supabaseError(\"SUPABASE.CONFIG_INVALID\", \"Either jwtSecret or jwksUrl is required\", { meta: { reason: \"neither jwtSecret nor jwksUrl provided\" } });\n}\n/**\n* Pre-verification check that the token's signing algorithm can possibly\n* match the configured key material. Without it the mismatch surfaces as a\n* jose internal (\"Key for the ES256 algorithm must be one of type\n* CryptoKey... Received an instance of Uint8Array\") that never names the\n* actual problem: current Supabase projects sign ES256 via JWKS by default,\n* while `supabase status` still prints a JWT_SECRET that only fits legacy\n* HS256 projects. Returns `undefined` when the pairing is plausible or the\n* header is unreadable (jwtVerify then produces the canonical error).\n*/\nfunction algKeyMismatchReason(jwt, kind) {\n\tlet alg;\n\ttry {\n\t\talg = decodeProtectedHeader(jwt).alg;\n\t} catch {\n\t\treturn;\n\t}\n\tif (alg === void 0) return void 0;\n\tconst asymmetric = /^(?:ES|RS|PS)\\d{3}$/.test(alg) || alg === \"EdDSA\" || alg === \"Ed25519\";\n\tif (kind === \"secret\" && asymmetric) return `token is signed with ${alg} but this client is configured with jwtSecret (HS256). Current Supabase projects sign with asymmetric keys by default — configure jwksUrl (https://<project>/auth/v1/.well-known/jwks.json) instead of jwtSecret.`;\n\tif (kind === \"jwks\" && alg.startsWith(\"HS\")) return `token is signed with ${alg} (a symmetric algorithm) but this client is configured with jwksUrl. A legacy HS256 Supabase project needs jwtSecret (the JWT_SECRET from \\`supabase status\\`) instead of jwksUrl.`;\n}\nfunction toPool(options) {\n\tif (options.pg !== void 0 && isPgPool(options.pg)) return {\n\t\tpool: options.pg,\n\t\towned: false\n\t};\n\tif (typeof options.url === \"string\") return {\n\t\tpool: suppressIdleConnectionErrors(new Pool({\n\t\t\tconnectionString: options.url,\n\t\t\tconnectionTimeoutMillis: options.poolOptions?.connectionTimeoutMillis ?? 2e4,\n\t\t\tidleTimeoutMillis: options.poolOptions?.idleTimeoutMillis ?? 3e4\n\t\t})),\n\t\towned: true\n\t};\n}\nfunction withSupabaseDescriptor(extensions) {\n\tconst packs = extensions ?? [];\n\treturn packs.some((pack) => pack.id === supabaseRuntimeDescriptor.id) ? packs : [...packs, supabaseRuntimeDescriptor];\n}\n/**\n* Deserializes the Supabase extension's own emitted contract into a runtime\n* contract: namespaces hydrate into `PostgresSchema` instances (with\n* `qualifyTable`), and `typeRef` columns (`Timestamptz`, `Uuid`) resolve\n* through the codec registry. Exposed only via `service_role`'s `.supabase`\n* secondary root — never merged into the app contract.\n*/\nfunction buildExtensionContract() {\n\treturn blindCast(contractSerializer.deserializeContract(contract_default));\n}\nasync function supabase(options) {\n\tconst keyMaterial = resolveKeyMaterial(options);\n\tconst contract = resolveContract(options);\n\tconst stack = createSqlExecutionStack({\n\t\ttarget: postgresTarget,\n\t\tadapter: postgresAdapter,\n\t\tdriver: postgresDriver,\n\t\textensions: withSupabaseDescriptor(options.extensions)\n\t});\n\tconst context = createExecutionContext({\n\t\tcontract,\n\t\tstack\n\t});\n\tconst rawCodecInferer = stack.adapter.rawCodecInferer;\n\tconst poolEntry = toPool(options);\n\tlet closed = false;\n\tconst stackInstance = instantiateExecutionStack(stack);\n\tconst driverDescriptor = stack.driver;\n\tif (!driverDescriptor) throw new InternalError(\"Driver descriptor missing from execution stack\");\n\tconst driver = driverDescriptor.create({ cursor: { disabled: true } });\n\tif (poolEntry) await driver.connect({\n\t\tkind: \"pgPool\",\n\t\tpool: poolEntry.pool\n\t});\n\tconst runtime = new SupabaseRuntimeImpl({\n\t\tcontext,\n\t\tadapter: stackInstance.adapter,\n\t\tdriver,\n\t\t...ifDefined(\"verifyMarker\", options.verifyMarker),\n\t\t...ifDefined(\"middleware\", options.middleware),\n\t\t...ifDefined(\"log\", options.log),\n\t\tcloseRefusal: \"at-once\"\n\t});\n\tasync function verifyJwt(jwt) {\n\t\tconst mismatch = algKeyMismatchReason(jwt, keyMaterial.kind);\n\t\tif (mismatch !== void 0) throw supabaseError(\"SUPABASE.JWT_INVALID\", `Invalid JWT: ${mismatch}`, { meta: { reason: mismatch } });\n\t\ttry {\n\t\t\tif (keyMaterial.kind === \"secret\") return await jwtVerify(jwt, keyMaterial.key);\n\t\t\treturn await jwtVerify(jwt, keyMaterial.keyset);\n\t\t} catch (err) {\n\t\t\tconst reason = err instanceof Error ? err.message : String(err);\n\t\t\tthrow supabaseError(\"SUPABASE.JWT_INVALID\", `Invalid JWT: ${reason}`, {\n\t\t\t\tmeta: { reason },\n\t\t\t\tcause: err\n\t\t\t});\n\t\t}\n\t}\n\tfunction buildRoleBoundDbWithContext(binding, roleContext, roleRuntime) {\n\t\tconst roleSql = sql({\n\t\t\tcontext: roleContext,\n\t\t\trawCodecInferer\n\t\t});\n\t\tconst roleRaw = createRawLane({\n\t\t\tcontext: roleContext,\n\t\t\trawCodecInferer\n\t\t});\n\t\treturn {\n\t\t\tsql: roleSql,\n\t\t\torm: orm({\n\t\t\t\truntime: {\n\t\t\t\t\tquery(plan) {\n\t\t\t\t\t\treturn roleRuntime.queryWithRole(plan, binding);\n\t\t\t\t\t},\n\t\t\t\t\texecute(plan) {\n\t\t\t\t\t\treturn roleRuntime.executeWithRole(plan, binding);\n\t\t\t\t\t},\n\t\t\t\t\tconnection: () => roleRuntime.openRoleSession(binding),\n\t\t\t\t\t[activitySource]: roleRuntime.roleActivitySource(binding)\n\t\t\t\t},\n\t\t\t\tcontext: roleContext\n\t\t\t}),\n\t\t\traw: roleRaw,\n\t\t\tquery(plan, execOptions) {\n\t\t\t\treturn roleRuntime.queryWithRole(plan, binding, execOptions);\n\t\t\t},\n\t\t\texecute(plan, execOptions) {\n\t\t\t\treturn roleRuntime.executeWithRole(plan, binding, execOptions);\n\t\t\t},\n\t\t\ttransaction(fn) {\n\t\t\t\treturn withTransaction({ connection: () => roleRuntime.openRoleSession(binding) }, fn);\n\t\t\t}\n\t\t};\n\t}\n\tfunction buildRoleBoundDb(binding) {\n\t\treturn buildRoleBoundDbWithContext(binding, context, runtime);\n\t}\n\tconst serviceRoleBinding = {\n\t\trole: SupabaseRole.members.ServiceRole,\n\t\tclaims: {}\n\t};\n\tconst extContract = buildExtensionContract();\n\tconst extContext = createExecutionContext({\n\t\tcontract: extContract,\n\t\tstack\n\t});\n\tconst extRuntime = new SupabaseRuntimeImpl({\n\t\tcontext: extContext,\n\t\tadapter: stackInstance.adapter,\n\t\tdriver,\n\t\tverifyMarker: false,\n\t\t...ifDefined(\"middleware\", options.middleware),\n\t\t...ifDefined(\"log\", options.log),\n\t\tcloseRefusal: \"at-once\"\n\t});\n\tconst extNativeEnums = blindCast(Object.freeze(buildNamespacedNativeEnums(extContract.storage, extContract.domain)));\n\tconst supabaseInternal = {\n\t\tsql: sql({\n\t\t\tcontext: extContext,\n\t\t\trawCodecInferer\n\t\t}),\n\t\torm: orm({\n\t\t\truntime: {\n\t\t\t\tquery(plan) {\n\t\t\t\t\treturn extRuntime.queryWithRole(plan, serviceRoleBinding);\n\t\t\t\t},\n\t\t\t\texecute(plan) {\n\t\t\t\t\treturn extRuntime.executeWithRole(plan, serviceRoleBinding);\n\t\t\t\t},\n\t\t\t\tconnection: () => extRuntime.openRoleSession(serviceRoleBinding),\n\t\t\t\t[activitySource]: extRuntime.roleActivitySource(serviceRoleBinding)\n\t\t\t},\n\t\t\tcontext: extContext\n\t\t}),\n\t\tnativeEnums: extNativeEnums,\n\t\tquery(plan, execOptions) {\n\t\t\treturn extRuntime.queryWithRole(plan, serviceRoleBinding, execOptions);\n\t\t},\n\t\texecute(plan, execOptions) {\n\t\t\treturn extRuntime.executeWithRole(plan, serviceRoleBinding, execOptions);\n\t\t}\n\t};\n\tasync function closeDb() {\n\t\tif (closed) return;\n\t\tclosed = true;\n\t\tawait runtime.close();\n\t\tif (poolEntry?.owned) await poolEntry.pool.end().catch(() => void 0);\n\t}\n\treturn {\n\t\tcontext,\n\t\tstack,\n\t\tasync asUser(jwt) {\n\t\t\tconst { payload } = await verifyJwt(jwt);\n\t\t\tconst rawRole = payload[SUPABASE_JWT_ROLE_CLAIM];\n\t\t\tconst roleStr = typeof rawRole === \"string\" ? rawRole : SupabaseRole.members.Authenticated;\n\t\t\treturn buildRoleBoundDb({\n\t\t\t\trole: isSupabaseRole(roleStr) ? roleStr : SupabaseRole.members.Authenticated,\n\t\t\t\tclaims: payload\n\t\t\t});\n\t\t},\n\t\tasAnon() {\n\t\t\treturn buildRoleBoundDb({\n\t\t\t\trole: SupabaseRole.members.Anon,\n\t\t\t\tclaims: {}\n\t\t\t});\n\t\t},\n\t\tasServiceRole() {\n\t\t\treturn {\n\t\t\t\t...buildRoleBoundDbWithContext(serviceRoleBinding, context, runtime),\n\t\t\t\tsupabase: supabaseInternal\n\t\t\t};\n\t\t},\n\t\tclose: closeDb,\n\t\t[Symbol.asyncDispose]: closeDb\n\t};\n}\n//#endregion\n//#region src/exports/runtime.ts\nvar runtime_default = supabaseRuntimeDescriptor;\n//#endregion\nexport { SupabaseRuntimeImpl, runtime_default as default, supabase };\n\n//# sourceMappingURL=runtime.mjs.map"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4BA,MAAM,4BAA4B;CACjC,MAAM;CACN,IAAI;CACJ;CACA,UAAU;CACV,UAAU;CACV,cAAc,CAAC;CACf,SAAS;EACR,OAAO;GACN,UAAU;GACV,UAAU;EACX;CACD;AACD;AAGA,SAAS,cAAc,MAAM,SAAS,SAAS;CAC9C,OAAO,gBAAgB,MAAM,SAAS,OAAO;AAC9C;AAGA,IAAI,sBAAsB,cAAc,oBAAoB;;;;;;CAM3D,MAAM,gBAAgB,SAAS;EAC9B,QAAQ,MAAM,KAAK,mBAAmB,OAAO,EAAA,CAAG;CACjD;CACA,MAAM,mBAAmB,SAAS;EACjC,MAAM,OAAO,MAAM,KAAK,qBAAqB;EAC7C,IAAI;GACH,MAAM,KAAK,QAAQ;IAClB,KAAK;IACL,QAAQ,CAAC,QAAQ,QAAQ,IAAI;GAC9B,CAAC;GACD,MAAM,KAAK,QAAQ;IAClB,KAAK;IACL,QAAQ,CAAC,sBAAsB,KAAK,UAAU,QAAQ,UAAU,CAAC,CAAC,CAAC;GACpE,CAAC;EACF,SAAS,KAAK;GACb,MAAM,KAAK,QAAQ,GAAG,CAAC,CAAC,YAAY,KAAK,CAAC;GAC1C,MAAM;EACP;EACA,MAAM,OAAO;EACb,MAAM,UAAU;IACd,mBAAmB,uBAAuB;IAC1C,iBAAiB,KAAK,yBAAyB,YAAY,OAAO;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gBAAgB,MAAM,oBAAoB,WAAW;EACxE;CACD;CACA,eAAe,UAAU;EACxB,IAAI,QAAQ;EACZ,SAAS;EACT,MAAM,QAAQ,MAAM;EACpB,IAAI,WAAW,OAAO,MAAM,UAAU,KAAK,IAAI,CAAC,CAAC,YAAY,KAAK,CAAC;CACpE;CACA,OAAO;EACN;EACA;EACA,MAAM,OAAO,KAAK;GACjB,MAAM,EAAE,YAAY,MAAM,UAAU,GAAG;GACvC,MAAM,UAAU,QAAQ;GACxB,MAAM,UAAU,OAAO,YAAY,WAAW,UAAU,aAAa,QAAQ;GAC7E,OAAO,iBAAiB;IACvB,MAAM,eAAe,OAAO,IAAI,UAAU,aAAa,QAAQ;IAC/D,QAAQ;GACT,CAAC;EACF;EACA,SAAS;GACR,OAAO,iBAAiB;IACvB,MAAM,aAAa,QAAQ;IAC3B,QAAQ,CAAC;GACV,CAAC;EACF;EACA,gBAAgB;GACf,OAAO;IACN,GAAG,4BAA4B,oBAAoB,SAAS,OAAO;IACnE,UAAU;GACX;EACD;EACA,OAAO;GACN,OAAO,eAAe;CACxB;AACD;AAGA,IAAI,kBAAkB"}
1
+ {"version":3,"file":"runtime.mjs","names":[],"sources":["../../../../3-extensions/supabase/dist/runtime.mjs"],"sourcesContent":["import { n as version, t as contract_default } from \"./contract-BUgTQTjT.mjs\";\nimport { a as isSupabaseRole, n as SupabaseRole, t as SUPABASE_JWT_ROLE_CLAIM } from \"./roles-9Ql17Kbb.mjs\";\nimport { blindCast } from \"@internal/utils/casts\";\nimport postgresAdapter from \"@internal/adapter-postgres/runtime\";\nimport postgresDriver, { suppressIdleConnectionErrors } from \"@internal/driver-postgres/runtime\";\nimport { instantiateExecutionStack } from \"@internal/framework-components/execution\";\nimport { PostgresRuntimeImpl, buildNamespacedNativeEnums, isPgPool } from \"@internal/postgres/runtime\";\nimport { createRawLane, sql } from \"@internal/sql-builder/runtime\";\nimport { orm } from \"@internal/sql-orm-client\";\nimport { activitySource, createExecutionContext, createSqlExecutionStack, withTransaction } from \"@internal/sql-runtime\";\nimport postgresTarget, { PostgresContractSerializer } from \"@internal/target-postgres/runtime\";\nimport { ifDefined } from \"@internal/utils/defined\";\nimport { InternalError } from \"@internal/utils/internal-error\";\nimport { createRemoteJWKSet, decodeProtectedHeader, jwtVerify } from \"jose\";\nimport { Pool } from \"pg\";\nimport { structuredError } from \"@internal/utils/structured-error\";\nimport { AsyncIterableResult } from \"@internal/framework-components/runtime\";\nimport { createTransactionStart, preparedStatementExecute, preparedStatementQuery, transactionStart } from \"@internal/sql-runtime/internal/prepared-query\";\n//#region src/runtime/descriptor.ts\n/**\n* Tells the runtime that the Supabase pack's runtime component is available.\n*\n* When a contract declares the Supabase pack, the runtime checks that a\n* matching descriptor has been registered. Without this, loading a Supabase\n* contract errors with \"pack runtime component missing\". The `supabase()`\n* factory registers this descriptor automatically — app code never needs to\n* reference it directly.\n*/\nconst supabaseRuntimeDescriptor = {\n\tkind: \"extension\",\n\tid: \"supabase\",\n\tversion,\n\tfamilyId: \"sql\",\n\ttargetId: \"postgres\",\n\tcodecs: () => [],\n\tcreate() {\n\t\treturn {\n\t\t\tfamilyId: \"sql\",\n\t\t\ttargetId: \"postgres\"\n\t\t};\n\t}\n};\n//#endregion\n//#region src/runtime/supabase-errors.ts\nfunction supabaseError(code, message, options) {\n\treturn structuredError(code, message, options);\n}\n//#endregion\n//#region src/runtime/supabase-runtime.ts\nvar SupabaseRuntimeImpl = class extends PostgresRuntimeImpl {\n\t/**\n\t* Opens a raw connection and applies role + JWT claims via session-scoped set_config.\n\t* On bind failure, destroys the connection before rethrowing — no leaked connections.\n\t* Not on the `SupabaseRuntime` interface; consumed by the facade, not by app code.\n\t*/\n\tasync openRoleSession(binding) {\n\t\treturn (await this.openRoleConnection(binding)).session;\n\t}\n\tasync openRoleConnection(binding) {\n\t\tconst conn = await this.acquireRawConnection();\n\t\ttry {\n\t\t\tawait conn.execute({\n\t\t\t\tsql: \"SELECT set_config($1, $2, false)\",\n\t\t\t\tparams: [\"role\", binding.role]\n\t\t\t});\n\t\t\tawait conn.execute({\n\t\t\t\tsql: \"SELECT set_config($1, $2, false)\",\n\t\t\t\tparams: [\"request.jwt.claims\", JSON.stringify(binding.claims ?? {})]\n\t\t\t});\n\t\t} catch (err) {\n\t\t\tawait conn.destroy(err).catch(() => void 0);\n\t\t\tthrow err;\n\t\t}\n\t\tconst self = this;\n\t\tconst session = {\n\t\t\t[transactionStart]: createTransactionStart(),\n\t\t\t[activitySource]: self.connectionActivitySource(conn, () => session),\n\t\t\tquery(plan, options) {\n\t\t\t\treturn self.queryAgainstQueryable(plan, conn, {\n\t\t\t\t\t...options,\n\t\t\t\t\tscope: \"connection\"\n\t\t\t\t});\n\t\t\t},\n\t\t\texecute(plan, options) {\n\t\t\t\treturn self.executeStatisticsAgainstQueryable(plan, conn, {\n\t\t\t\t\t...options,\n\t\t\t\t\tscope: \"connection\"\n\t\t\t\t});\n\t\t\t},\n\t\t\t[preparedStatementQuery](prepared, params, options) {\n\t\t\t\treturn self.runPreparedQueryAgainstRoleQueryable(prepared, params, conn, options);\n\t\t\t},\n\t\t\t[preparedStatementExecute](prepared, params, options) {\n\t\t\t\treturn self.runPreparedExecuteAgainstRoleQueryable(prepared, params, conn, options);\n\t\t\t},\n\t\t\tasync transaction() {\n\t\t\t\treturn self.beginTransactionOn(conn, session, void 0);\n\t\t\t},\n\t\t\t/**\n\t\t\t* Resets all session-local config then releases the connection back to the pool.\n\t\t\t* If RESET ALL fails, destroys the connection instead — pool-poisoning guarantee.\n\t\t\t*/\n\t\t\tasync release() {\n\t\t\t\ttry {\n\t\t\t\t\tawait conn.execute({ sql: \"RESET ALL\" });\n\t\t\t\t\tawait conn.release();\n\t\t\t\t} catch (resetError) {\n\t\t\t\t\tawait conn.destroy(resetError).catch(() => void 0);\n\t\t\t\t}\n\t\t\t},\n\t\t\tasync destroy(reason) {\n\t\t\t\tawait conn.destroy(reason);\n\t\t\t}\n\t\t};\n\t\treturn {\n\t\t\tconn,\n\t\t\tsession\n\t\t};\n\t}\n\t/** The activity source the facade gives the role-bound ORM: activities whose statements and transaction run on role sessions bound to `binding`, and content hashes at the `'connection'` scope role sessions run at. Not on the `SupabaseRuntime` interface. */\n\troleActivitySource(binding) {\n\t\treturn {\n\t\t\tstartActivity: (activity) => this.startActivityOnRoute(this.roleRoute(binding), activity, void 0),\n\t\t\tplanContentHash: (plan) => this.planContentHashFor(plan, \"connection\", void 0)\n\t\t};\n\t}\n\troleRoute(binding) {\n\t\treturn {\n\t\t\tscope: \"connection\",\n\t\t\tparent: () => void 0,\n\t\t\truntimeWork: true,\n\t\t\tquery: (plan, options) => this.streamOnRoleSession(binding, (session) => session.query(plan, options)),\n\t\t\texecute: (plan, options) => this.executeWithRole(plan, binding, options),\n\t\t\tpreparedQuery: (statement, params, options) => this.streamOnRoleSession(binding, (session) => session[preparedStatementQuery](statement, params, options)),\n\t\t\tpreparedExecute: (statement, params, options) => this.executeOnRoleSession(binding, (session) => session[preparedStatementExecute](statement, params, options)),\n\t\t\ttransaction: (parent) => this.beginRoleTransaction(binding, parent)\n\t\t};\n\t}\n\tasync beginRoleTransaction(binding, parent) {\n\t\tconst { conn, session } = await this.openRoleConnection(binding);\n\t\treturn this.ownTransaction(session, () => this.beginTransactionOn(conn, session, parent));\n\t}\n\t/**\n\t* Opens a role session, queries the plan, then releases after the stream drains.\n\t* On mid-stream error, destroys the session instead of releasing.\n\t*/\n\tqueryWithRole(plan, binding, options) {\n\t\treturn this.streamOnRoleSession(binding, (session) => session.query(plan, options));\n\t}\n\texecuteWithRole(plan, binding, options) {\n\t\treturn this.executeOnRoleSession(binding, (session) => session.execute(plan, options));\n\t}\n\tstreamOnRoleSession(binding, rows) {\n\t\tconst self = this;\n\t\tconst generator = async function* () {\n\t\t\tconst { session } = await self.openRoleConnection(binding);\n\t\t\tlet errored = false;\n\t\t\ttry {\n\t\t\t\tfor await (const row of rows(session)) yield row;\n\t\t\t} catch (err) {\n\t\t\t\terrored = true;\n\t\t\t\tawait session.destroy(err).catch(() => void 0);\n\t\t\t\tthrow err;\n\t\t\t} finally {\n\t\t\t\tif (!errored) await session.release();\n\t\t\t}\n\t\t};\n\t\treturn new AsyncIterableResult(generator());\n\t}\n\tasync executeOnRoleSession(binding, run) {\n\t\tconst { session } = await this.openRoleConnection(binding);\n\t\ttry {\n\t\t\tconst stats = await run(session);\n\t\t\tawait session.release();\n\t\t\treturn stats;\n\t\t} catch (err) {\n\t\t\tawait session.destroy(err).catch(() => void 0);\n\t\t\tthrow err;\n\t\t}\n\t}\n\trunPreparedExecuteAgainstRoleQueryable(prepared, params, queryable, options) {\n\t\treturn this.runPreparedExecuteAgainstQueryable(blindCast(prepared), blindCast(params), queryable, {\n\t\t\t...options,\n\t\t\tscope: \"connection\"\n\t\t});\n\t}\n\trunPreparedQueryAgainstRoleQueryable(prepared, params, queryable, options) {\n\t\treturn this.runPreparedQueryAgainstQueryable(blindCast(prepared), blindCast(params), queryable, {\n\t\t\t...options,\n\t\t\tscope: \"connection\"\n\t\t});\n\t}\n};\n//#endregion\n//#region src/runtime/supabase.ts\nfunction hasContractJson(options) {\n\treturn \"contractJson\" in options;\n}\nconst contractSerializer = new PostgresContractSerializer();\nfunction resolveContract(options) {\n\tconst contractJson = hasContractJson(options) ? options.contractJson : contractSerializer.serializeContract(options.contract);\n\treturn blindCast(contractSerializer.deserializeContract(contractJson));\n}\nfunction resolveKeyMaterial(options) {\n\tconst jwtSecret = \"jwtSecret\" in options ? options.jwtSecret : void 0;\n\tconst jwksUrl = \"jwksUrl\" in options ? options.jwksUrl : void 0;\n\tif (jwtSecret !== void 0 && jwksUrl !== void 0) throw supabaseError(\"SUPABASE.CONFIG_INVALID\", \"Provide either jwtSecret or jwksUrl, not both\", { meta: { reason: \"both jwtSecret and jwksUrl provided\" } });\n\tif (jwtSecret !== void 0) return {\n\t\tkind: \"secret\",\n\t\tkey: new TextEncoder().encode(jwtSecret)\n\t};\n\tif (jwksUrl !== void 0) return {\n\t\tkind: \"jwks\",\n\t\tkeyset: createRemoteJWKSet(new URL(jwksUrl))\n\t};\n\tthrow supabaseError(\"SUPABASE.CONFIG_INVALID\", \"Either jwtSecret or jwksUrl is required\", { meta: { reason: \"neither jwtSecret nor jwksUrl provided\" } });\n}\n/**\n* Pre-verification check that the token's signing algorithm can possibly\n* match the configured key material. Without it the mismatch surfaces as a\n* jose internal (\"Key for the ES256 algorithm must be one of type\n* CryptoKey... Received an instance of Uint8Array\") that never names the\n* actual problem: current Supabase projects sign ES256 via JWKS by default,\n* while `supabase status` still prints a JWT_SECRET that only fits legacy\n* HS256 projects. Returns `undefined` when the pairing is plausible or the\n* header is unreadable (jwtVerify then produces the canonical error).\n*/\nfunction algKeyMismatchReason(jwt, kind) {\n\tlet alg;\n\ttry {\n\t\talg = decodeProtectedHeader(jwt).alg;\n\t} catch {\n\t\treturn;\n\t}\n\tif (alg === void 0) return void 0;\n\tconst asymmetric = /^(?:ES|RS|PS)\\d{3}$/.test(alg) || alg === \"EdDSA\" || alg === \"Ed25519\";\n\tif (kind === \"secret\" && asymmetric) return `token is signed with ${alg} but this client is configured with jwtSecret (HS256). Current Supabase projects sign with asymmetric keys by default — configure jwksUrl (https://<project>/auth/v1/.well-known/jwks.json) instead of jwtSecret.`;\n\tif (kind === \"jwks\" && alg.startsWith(\"HS\")) return `token is signed with ${alg} (a symmetric algorithm) but this client is configured with jwksUrl. A legacy HS256 Supabase project needs jwtSecret (the JWT_SECRET from \\`supabase status\\`) instead of jwksUrl.`;\n}\nfunction toPool(options) {\n\tif (options.pg !== void 0 && isPgPool(options.pg)) return {\n\t\tpool: options.pg,\n\t\towned: false\n\t};\n\tif (typeof options.url === \"string\") return {\n\t\tpool: suppressIdleConnectionErrors(new Pool({\n\t\t\tconnectionString: options.url,\n\t\t\tconnectionTimeoutMillis: options.poolOptions?.connectionTimeoutMillis ?? 2e4,\n\t\t\tidleTimeoutMillis: options.poolOptions?.idleTimeoutMillis ?? 3e4\n\t\t})),\n\t\towned: true\n\t};\n}\nfunction withSupabaseDescriptor(extensions) {\n\tconst packs = extensions ?? [];\n\treturn packs.some((pack) => pack.id === supabaseRuntimeDescriptor.id) ? packs : [...packs, supabaseRuntimeDescriptor];\n}\n/**\n* Deserializes the Supabase extension's own emitted contract into a runtime\n* contract: namespaces hydrate into `PostgresSchema` instances (with\n* `qualifyTable`), and `typeRef` columns (`Timestamptz`, `Uuid`) resolve\n* through the codec registry. Exposed only via `service_role`'s `.supabase`\n* secondary root — never merged into the app contract.\n*/\nfunction buildExtensionContract() {\n\treturn blindCast(contractSerializer.deserializeContract(contract_default));\n}\nasync function supabase(options) {\n\tconst keyMaterial = resolveKeyMaterial(options);\n\tconst contract = resolveContract(options);\n\tconst stack = createSqlExecutionStack({\n\t\ttarget: postgresTarget,\n\t\tadapter: postgresAdapter,\n\t\tdriver: postgresDriver,\n\t\textensions: withSupabaseDescriptor(options.extensions)\n\t});\n\tconst context = createExecutionContext({\n\t\tcontract,\n\t\tstack\n\t});\n\tconst rawCodecInferer = stack.adapter.rawCodecInferer;\n\tconst poolEntry = toPool(options);\n\tlet closed = false;\n\tconst stackInstance = instantiateExecutionStack(stack);\n\tconst driverDescriptor = stack.driver;\n\tif (!driverDescriptor) throw new InternalError(\"Driver descriptor missing from execution stack\");\n\tconst driver = driverDescriptor.create({ cursor: { disabled: true } });\n\tif (poolEntry) await driver.connect({\n\t\tkind: \"pgPool\",\n\t\tpool: poolEntry.pool\n\t});\n\tconst runtime = new SupabaseRuntimeImpl({\n\t\tcontext,\n\t\tadapter: stackInstance.adapter,\n\t\tdriver,\n\t\t...ifDefined(\"verifyMarker\", options.verifyMarker),\n\t\t...ifDefined(\"middleware\", options.middleware),\n\t\t...ifDefined(\"log\", options.log),\n\t\tcloseRefusal: \"at-once\"\n\t});\n\tasync function verifyJwt(jwt) {\n\t\tconst mismatch = algKeyMismatchReason(jwt, keyMaterial.kind);\n\t\tif (mismatch !== void 0) throw supabaseError(\"SUPABASE.JWT_INVALID\", `Invalid JWT: ${mismatch}`, { meta: { reason: mismatch } });\n\t\ttry {\n\t\t\tif (keyMaterial.kind === \"secret\") return await jwtVerify(jwt, keyMaterial.key);\n\t\t\treturn await jwtVerify(jwt, keyMaterial.keyset);\n\t\t} catch (err) {\n\t\t\tconst reason = err instanceof Error ? err.message : String(err);\n\t\t\tthrow supabaseError(\"SUPABASE.JWT_INVALID\", `Invalid JWT: ${reason}`, {\n\t\t\t\tmeta: { reason },\n\t\t\t\tcause: err\n\t\t\t});\n\t\t}\n\t}\n\tfunction buildRoleBoundDbWithContext(binding, roleContext, roleRuntime) {\n\t\tconst roleSql = sql({\n\t\t\tcontext: roleContext,\n\t\t\trawCodecInferer\n\t\t});\n\t\tconst roleRaw = createRawLane({\n\t\t\tcontext: roleContext,\n\t\t\trawCodecInferer\n\t\t});\n\t\treturn {\n\t\t\tsql: roleSql,\n\t\t\torm: orm({\n\t\t\t\truntime: {\n\t\t\t\t\tquery(plan) {\n\t\t\t\t\t\treturn roleRuntime.queryWithRole(plan, binding);\n\t\t\t\t\t},\n\t\t\t\t\texecute(plan) {\n\t\t\t\t\t\treturn roleRuntime.executeWithRole(plan, binding);\n\t\t\t\t\t},\n\t\t\t\t\tconnection: () => roleRuntime.openRoleSession(binding),\n\t\t\t\t\t[activitySource]: roleRuntime.roleActivitySource(binding)\n\t\t\t\t},\n\t\t\t\tcontext: roleContext\n\t\t\t}),\n\t\t\traw: roleRaw,\n\t\t\tquery(plan, execOptions) {\n\t\t\t\treturn roleRuntime.queryWithRole(plan, binding, execOptions);\n\t\t\t},\n\t\t\texecute(plan, execOptions) {\n\t\t\t\treturn roleRuntime.executeWithRole(plan, binding, execOptions);\n\t\t\t},\n\t\t\ttransaction(fn) {\n\t\t\t\treturn withTransaction({ connection: () => roleRuntime.openRoleSession(binding) }, fn);\n\t\t\t}\n\t\t};\n\t}\n\tfunction buildRoleBoundDb(binding) {\n\t\treturn buildRoleBoundDbWithContext(binding, context, runtime);\n\t}\n\tconst serviceRoleBinding = {\n\t\trole: SupabaseRole.members.ServiceRole,\n\t\tclaims: {}\n\t};\n\tconst extContract = buildExtensionContract();\n\tconst extContext = createExecutionContext({\n\t\tcontract: extContract,\n\t\tstack\n\t});\n\tconst extRuntime = new SupabaseRuntimeImpl({\n\t\tcontext: extContext,\n\t\tadapter: stackInstance.adapter,\n\t\tdriver,\n\t\tverifyMarker: false,\n\t\t...ifDefined(\"middleware\", options.middleware),\n\t\t...ifDefined(\"log\", options.log),\n\t\tcloseRefusal: \"at-once\"\n\t});\n\tconst extNativeEnums = blindCast(Object.freeze(buildNamespacedNativeEnums(extContract.storage, extContract.domain)));\n\tconst supabaseInternal = {\n\t\tsql: sql({\n\t\t\tcontext: extContext,\n\t\t\trawCodecInferer\n\t\t}),\n\t\torm: orm({\n\t\t\truntime: {\n\t\t\t\tquery(plan) {\n\t\t\t\t\treturn extRuntime.queryWithRole(plan, serviceRoleBinding);\n\t\t\t\t},\n\t\t\t\texecute(plan) {\n\t\t\t\t\treturn extRuntime.executeWithRole(plan, serviceRoleBinding);\n\t\t\t\t},\n\t\t\t\tconnection: () => extRuntime.openRoleSession(serviceRoleBinding),\n\t\t\t\t[activitySource]: extRuntime.roleActivitySource(serviceRoleBinding)\n\t\t\t},\n\t\t\tcontext: extContext\n\t\t}),\n\t\tnativeEnums: extNativeEnums,\n\t\tquery(plan, execOptions) {\n\t\t\treturn extRuntime.queryWithRole(plan, serviceRoleBinding, execOptions);\n\t\t},\n\t\texecute(plan, execOptions) {\n\t\t\treturn extRuntime.executeWithRole(plan, serviceRoleBinding, execOptions);\n\t\t}\n\t};\n\tasync function closeDb() {\n\t\tif (closed) return;\n\t\tclosed = true;\n\t\tawait runtime.close();\n\t\tif (poolEntry?.owned) await poolEntry.pool.end().catch(() => void 0);\n\t}\n\treturn {\n\t\tcontext,\n\t\tstack,\n\t\tasync asUser(jwt) {\n\t\t\tconst { payload } = await verifyJwt(jwt);\n\t\t\tconst rawRole = payload[SUPABASE_JWT_ROLE_CLAIM];\n\t\t\tconst roleStr = typeof rawRole === \"string\" ? rawRole : SupabaseRole.members.Authenticated;\n\t\t\treturn buildRoleBoundDb({\n\t\t\t\trole: isSupabaseRole(roleStr) ? roleStr : SupabaseRole.members.Authenticated,\n\t\t\t\tclaims: payload\n\t\t\t});\n\t\t},\n\t\tasAnon() {\n\t\t\treturn buildRoleBoundDb({\n\t\t\t\trole: SupabaseRole.members.Anon,\n\t\t\t\tclaims: {}\n\t\t\t});\n\t\t},\n\t\tasServiceRole() {\n\t\t\treturn {\n\t\t\t\t...buildRoleBoundDbWithContext(serviceRoleBinding, context, runtime),\n\t\t\t\tsupabase: supabaseInternal\n\t\t\t};\n\t\t},\n\t\tclose: closeDb,\n\t\t[Symbol.asyncDispose]: closeDb\n\t};\n}\n//#endregion\n//#region src/exports/runtime.ts\nvar runtime_default = supabaseRuntimeDescriptor;\n//#endregion\nexport { SupabaseRuntimeImpl, runtime_default as default, supabase };\n\n//# sourceMappingURL=runtime.mjs.map"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4BA,MAAM,4BAA4B;CACjC,MAAM;CACN,IAAI;CACJ;CACA,UAAU;CACV,UAAU;CACV,cAAc,CAAC;CACf,SAAS;EACR,OAAO;GACN,UAAU;GACV,UAAU;EACX;CACD;AACD;AAGA,SAAS,cAAc,MAAM,SAAS,SAAS;CAC9C,OAAO,gBAAgB,MAAM,SAAS,OAAO;AAC9C;AAGA,IAAI,sBAAsB,cAAc,oBAAoB;;;;;;CAM3D,MAAM,gBAAgB,SAAS;EAC9B,QAAQ,MAAM,KAAK,mBAAmB,OAAO,EAAA,CAAG;CACjD;CACA,MAAM,mBAAmB,SAAS;EACjC,MAAM,OAAO,MAAM,KAAK,qBAAqB;EAC7C,IAAI;GACH,MAAM,KAAK,QAAQ;IAClB,KAAK;IACL,QAAQ,CAAC,QAAQ,QAAQ,IAAI;GAC9B,CAAC;GACD,MAAM,KAAK,QAAQ;IAClB,KAAK;IACL,QAAQ,CAAC,sBAAsB,KAAK,UAAU,Q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C3D;IACA,kBAAkB,WAAW,gBAAgB,kBAAkB;KAC9D,iBAAiB,WAAW,mBAAmB,kBAAkB;GACnE;GACA,SAAS;EACV,CAAC;EACD,aAAa;EACb,MAAM,MAAM,aAAa;GACxB,OAAO,WAAW,cAAc,MAAM,oBAAoB,WAAW;EACtE;EACA,QAAQ,MAAM,aAAa;GAC1B,OAAO,WAAW,gBAAgB,MAAM,oBAAoB,WAAW;EACxE;CACD;CACA,eAAe,UAAU;EACxB,IAAI,QAAQ;EACZ,SAAS;EACT,MAAM,QAAQ,MAAM;EACpB,IAAI,WAAW,OAAO,MAAM,UAAU,KAAK,IAAI,CAAC,CAAC,YAAY,KAAK,CAAC;CACpE;CACA,OAAO;EACN;EACA;EACA,MAAM,OAAO,KAAK;GACjB,MAAM,EAAE,YAAY,MAAM,UAAU,GAAG;GACvC,MAAM,UAAU,QAAQ;GACxB,MAAM,UAAU,OAAO,YAAY,WAAW,UAAU,aAAa,QAAQ;GAC7E,OAAO,iBAAiB;IACvB,MAAM,eAAe,OAAO,IAAI,UAAU,aAAa,QAAQ;IAC/D,QAAQ;GACT,CAAC;EACF;EACA,SAAS;GACR,OAAO,iBAAiB;IACvB,MAAM,aAAa,QAAQ;IAC3B,QAAQ,CAAC;GACV,CAAC;EACF;EACA,gBAAgB;GACf,OAAO;IACN,GAAG,4BAA4B,oBAAoB,SAAS,OAAO;IACnE,UAAU;GACX;EACD;EACA,OAAO;GACN,OAAO,eAAe;CACxB;AACD;AAGA,IAAI,kBAAkB"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@prisma/orm-extension-supabase",
3
- "version": "8.0.0-rc.18-dev.10",
3
+ "version": "8.0.0-rc.18-dev.11",
4
4
  "license": "Apache-2.0",
5
5
  "type": "module",
6
6
  "sideEffects": false,
@@ -9,10 +9,10 @@
9
9
  "dist"
10
10
  ],
11
11
  "dependencies": {
12
- "@prisma/orm-family-sql": "8.0.0-rc.18-dev.10",
13
- "@prisma/orm-framework": "8.0.0-rc.18-dev.10",
14
- "@prisma/orm-postgres": "8.0.0-rc.18-dev.10",
15
- "@prisma/orm-toolchain": "8.0.0-rc.18-dev.10",
12
+ "@prisma/orm-family-sql": "8.0.0-rc.18-dev.11",
13
+ "@prisma/orm-framework": "8.0.0-rc.18-dev.11",
14
+ "@prisma/orm-postgres": "8.0.0-rc.18-dev.11",
15
+ "@prisma/orm-toolchain": "8.0.0-rc.18-dev.11",
16
16
  "@standard-schema/spec": "^1.1.0",
17
17
  "@types/node": "26.1.2",
18
18
  "@types/pg": "8.20.4",
@@ -21,15 +21,15 @@
21
21
  "pg": "8.22.0"
22
22
  },
23
23
  "devDependencies": {
24
- "@internal/extension-supabase": "8.0.0-rc.18-dev.10",
25
- "@repo/tsconfig": "8.0.0-rc.18-dev.10",
26
- "@repo/tsdown": "8.0.0-rc.18-dev.10",
27
- "@prisma/orm-target-postgres": "8.0.0-rc.18-dev.10",
24
+ "@internal/extension-supabase": "8.0.0-rc.18-dev.11",
25
+ "@repo/tsconfig": "8.0.0-rc.18-dev.11",
26
+ "@repo/tsdown": "8.0.0-rc.18-dev.11",
27
+ "@prisma/orm-target-postgres": "8.0.0-rc.18-dev.11",
28
28
  "tsdown": "0.22.14",
29
29
  "typescript": "5.9.3"
30
30
  },
31
31
  "peerDependencies": {
32
- "@prisma/orm-target-postgres": "8.0.0-rc.18-dev.10",
32
+ "@prisma/orm-target-postgres": "8.0.0-rc.18-dev.11",
33
33
  "typescript": ">=5.9"
34
34
  },
35
35
  "peerDependenciesMeta": {