@prisma-next/sql-runtime 0.3.0-dev.33 → 0.3.0-dev.36

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 (163) hide show
  1. package/README.md +115 -24
  2. package/dist/exports-C8hi0N-a.mjs +622 -0
  3. package/dist/exports-C8hi0N-a.mjs.map +1 -0
  4. package/dist/index-SlQIrV_t.d.mts +131 -0
  5. package/dist/index-SlQIrV_t.d.mts.map +1 -0
  6. package/dist/index.d.mts +2 -0
  7. package/dist/index.mjs +3 -0
  8. package/dist/test/utils.d.mts +82 -0
  9. package/dist/test/utils.d.mts.map +1 -0
  10. package/dist/test/utils.mjs +212 -0
  11. package/dist/test/utils.mjs.map +1 -0
  12. package/package.json +26 -20
  13. package/src/codecs/decoding.ts +84 -3
  14. package/src/codecs/encoding.ts +15 -2
  15. package/src/codecs/json-schema-validation.ts +61 -0
  16. package/src/exports/index.ts +9 -4
  17. package/src/lower-sql-plan.ts +8 -8
  18. package/src/sql-context.ts +286 -245
  19. package/src/sql-family-adapter.ts +9 -5
  20. package/src/sql-marker.ts +2 -2
  21. package/src/sql-runtime.ts +89 -23
  22. package/test/async-iterable-result.test.ts +42 -34
  23. package/test/context.types.test-d.ts +12 -14
  24. package/test/execution-stack.test.ts +166 -0
  25. package/test/json-schema-validation.test.ts +653 -0
  26. package/test/parameterized-types.test.ts +182 -196
  27. package/test/sql-context.test.ts +292 -117
  28. package/test/sql-family-adapter.test.ts +7 -6
  29. package/test/sql-runtime.test.ts +117 -31
  30. package/test/utils.ts +76 -50
  31. package/dist/accelerate-EEKAFGN3-P6A6XJWJ.js +0 -137863
  32. package/dist/accelerate-EEKAFGN3-P6A6XJWJ.js.map +0 -1
  33. package/dist/amcheck-24VY6X5V.js +0 -13
  34. package/dist/amcheck-24VY6X5V.js.map +0 -1
  35. package/dist/bloom-VS74NLHT.js +0 -13
  36. package/dist/bloom-VS74NLHT.js.map +0 -1
  37. package/dist/btree_gin-WBC4EAAI.js +0 -13
  38. package/dist/btree_gin-WBC4EAAI.js.map +0 -1
  39. package/dist/btree_gist-UNC6QD3M.js +0 -13
  40. package/dist/btree_gist-UNC6QD3M.js.map +0 -1
  41. package/dist/chunk-3KTOEDFX.js +0 -49
  42. package/dist/chunk-3KTOEDFX.js.map +0 -1
  43. package/dist/chunk-47DZBRQC.js +0 -1280
  44. package/dist/chunk-47DZBRQC.js.map +0 -1
  45. package/dist/chunk-52N6AFZM.js +0 -133
  46. package/dist/chunk-52N6AFZM.js.map +0 -1
  47. package/dist/chunk-7D4SUZUM.js +0 -38
  48. package/dist/chunk-7D4SUZUM.js.map +0 -1
  49. package/dist/chunk-APA6GHYY.js +0 -537
  50. package/dist/chunk-APA6GHYY.js.map +0 -1
  51. package/dist/chunk-ECWIHLAT.js +0 -37
  52. package/dist/chunk-ECWIHLAT.js.map +0 -1
  53. package/dist/chunk-EI626SDC.js +0 -105
  54. package/dist/chunk-EI626SDC.js.map +0 -1
  55. package/dist/chunk-UKKOYUGL.js +0 -578
  56. package/dist/chunk-UKKOYUGL.js.map +0 -1
  57. package/dist/chunk-XPLNMXQV.js +0 -1537
  58. package/dist/chunk-XPLNMXQV.js.map +0 -1
  59. package/dist/citext-T7MXGUY7.js +0 -13
  60. package/dist/citext-T7MXGUY7.js.map +0 -1
  61. package/dist/client-5FENX6AW.js +0 -299
  62. package/dist/client-5FENX6AW.js.map +0 -1
  63. package/dist/cube-TFDQBZCI.js +0 -13
  64. package/dist/cube-TFDQBZCI.js.map +0 -1
  65. package/dist/dict_int-AEUOPGWP.js +0 -13
  66. package/dist/dict_int-AEUOPGWP.js.map +0 -1
  67. package/dist/dict_xsyn-DAAYX3FL.js +0 -13
  68. package/dist/dict_xsyn-DAAYX3FL.js.map +0 -1
  69. package/dist/dist-AQ3LWXOX.js +0 -570
  70. package/dist/dist-AQ3LWXOX.js.map +0 -1
  71. package/dist/dist-LBVX6BJW.js +0 -189
  72. package/dist/dist-LBVX6BJW.js.map +0 -1
  73. package/dist/dist-WLKUVDN2.js +0 -5127
  74. package/dist/dist-WLKUVDN2.js.map +0 -1
  75. package/dist/earthdistance-KIGTF4LE.js +0 -13
  76. package/dist/earthdistance-KIGTF4LE.js.map +0 -1
  77. package/dist/file_fdw-5N55UP6I.js +0 -13
  78. package/dist/file_fdw-5N55UP6I.js.map +0 -1
  79. package/dist/fuzzystrmatch-KN3YWBFP.js +0 -13
  80. package/dist/fuzzystrmatch-KN3YWBFP.js.map +0 -1
  81. package/dist/hstore-YX726NKN.js +0 -13
  82. package/dist/hstore-YX726NKN.js.map +0 -1
  83. package/dist/http-exception-FZY2H4OF.js +0 -8
  84. package/dist/http-exception-FZY2H4OF.js.map +0 -1
  85. package/dist/index.js +0 -30
  86. package/dist/index.js.map +0 -1
  87. package/dist/intarray-NKVXNO2D.js +0 -13
  88. package/dist/intarray-NKVXNO2D.js.map +0 -1
  89. package/dist/isn-FTEMJGEV.js +0 -13
  90. package/dist/isn-FTEMJGEV.js.map +0 -1
  91. package/dist/lo-DB7L4NGI.js +0 -13
  92. package/dist/lo-DB7L4NGI.js.map +0 -1
  93. package/dist/logger-WQ7SHNDD.js +0 -68
  94. package/dist/logger-WQ7SHNDD.js.map +0 -1
  95. package/dist/ltree-Z32TZT6W.js +0 -13
  96. package/dist/ltree-Z32TZT6W.js.map +0 -1
  97. package/dist/nodefs-NM46ACH7.js +0 -31
  98. package/dist/nodefs-NM46ACH7.js.map +0 -1
  99. package/dist/opfs-ahp-NJO33LVZ.js +0 -332
  100. package/dist/opfs-ahp-NJO33LVZ.js.map +0 -1
  101. package/dist/pageinspect-YP3IZR4X.js +0 -13
  102. package/dist/pageinspect-YP3IZR4X.js.map +0 -1
  103. package/dist/pg_buffercache-7TD5J2FB.js +0 -13
  104. package/dist/pg_buffercache-7TD5J2FB.js.map +0 -1
  105. package/dist/pg_dump-SG4KYBUB.js +0 -2492
  106. package/dist/pg_dump-SG4KYBUB.js.map +0 -1
  107. package/dist/pg_freespacemap-DZDNCPZK.js +0 -13
  108. package/dist/pg_freespacemap-DZDNCPZK.js.map +0 -1
  109. package/dist/pg_surgery-J2MUEWEP.js +0 -13
  110. package/dist/pg_surgery-J2MUEWEP.js.map +0 -1
  111. package/dist/pg_trgm-7VNQOYS6.js +0 -13
  112. package/dist/pg_trgm-7VNQOYS6.js.map +0 -1
  113. package/dist/pg_visibility-TTSIPHFL.js +0 -13
  114. package/dist/pg_visibility-TTSIPHFL.js.map +0 -1
  115. package/dist/pg_walinspect-KPFHSHRJ.js +0 -13
  116. package/dist/pg_walinspect-KPFHSHRJ.js.map +0 -1
  117. package/dist/proxy-signals-GUDAMDHV.js +0 -39
  118. package/dist/proxy-signals-GUDAMDHV.js.map +0 -1
  119. package/dist/seg-IYVDLE4O.js +0 -13
  120. package/dist/seg-IYVDLE4O.js.map +0 -1
  121. package/dist/src/codecs/decoding.d.ts +0 -4
  122. package/dist/src/codecs/decoding.d.ts.map +0 -1
  123. package/dist/src/codecs/encoding.d.ts +0 -5
  124. package/dist/src/codecs/encoding.d.ts.map +0 -1
  125. package/dist/src/codecs/validation.d.ts +0 -6
  126. package/dist/src/codecs/validation.d.ts.map +0 -1
  127. package/dist/src/exports/index.d.ts +0 -11
  128. package/dist/src/exports/index.d.ts.map +0 -1
  129. package/dist/src/index.d.ts +0 -2
  130. package/dist/src/index.d.ts.map +0 -1
  131. package/dist/src/lower-sql-plan.d.ts +0 -15
  132. package/dist/src/lower-sql-plan.d.ts.map +0 -1
  133. package/dist/src/sql-context.d.ts +0 -130
  134. package/dist/src/sql-context.d.ts.map +0 -1
  135. package/dist/src/sql-family-adapter.d.ts +0 -10
  136. package/dist/src/sql-family-adapter.d.ts.map +0 -1
  137. package/dist/src/sql-marker.d.ts +0 -22
  138. package/dist/src/sql-marker.d.ts.map +0 -1
  139. package/dist/src/sql-runtime.d.ts +0 -25
  140. package/dist/src/sql-runtime.d.ts.map +0 -1
  141. package/dist/tablefunc-EF4RCS7S.js +0 -13
  142. package/dist/tablefunc-EF4RCS7S.js.map +0 -1
  143. package/dist/tcn-3VT5BQYW.js +0 -13
  144. package/dist/tcn-3VT5BQYW.js.map +0 -1
  145. package/dist/test/utils.d.ts +0 -60
  146. package/dist/test/utils.d.ts.map +0 -1
  147. package/dist/test/utils.js +0 -24635
  148. package/dist/test/utils.js.map +0 -1
  149. package/dist/tiny-CW6F4GX6.js +0 -10
  150. package/dist/tiny-CW6F4GX6.js.map +0 -1
  151. package/dist/tsm_system_rows-ES7KNUQH.js +0 -13
  152. package/dist/tsm_system_rows-ES7KNUQH.js.map +0 -1
  153. package/dist/tsm_system_time-76WEIMBG.js +0 -13
  154. package/dist/tsm_system_time-76WEIMBG.js.map +0 -1
  155. package/dist/unaccent-7RYF3R64.js +0 -13
  156. package/dist/unaccent-7RYF3R64.js.map +0 -1
  157. package/dist/utility-Q5A254LJ-J4HTKZPT.js +0 -347
  158. package/dist/utility-Q5A254LJ-J4HTKZPT.js.map +0 -1
  159. package/dist/uuid_ossp-4ETE4FPE.js +0 -13
  160. package/dist/uuid_ossp-4ETE4FPE.js.map +0 -1
  161. package/dist/vector-74GPNV7V.js +0 -13
  162. package/dist/vector-74GPNV7V.js.map +0 -1
  163. package/src/index.ts +0 -1
@@ -1,13 +0,0 @@
1
- import {
2
- u
3
- } from "./chunk-3KTOEDFX.js";
4
- import "./chunk-7D4SUZUM.js";
5
-
6
- // ../../../node_modules/.pnpm/@electric-sql+pglite@0.3.14/node_modules/@electric-sql/pglite/dist/contrib/pg_freespacemap.js
7
- u();
8
- var t = async (s, n) => ({ bundlePath: new URL("../pg_freespacemap.tar.gz", import.meta.url) });
9
- var r = { name: "pg_freespacemap", setup: t };
10
- export {
11
- r as pg_freespacemap
12
- };
13
- //# sourceMappingURL=pg_freespacemap-DZDNCPZK.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../../node_modules/.pnpm/@electric-sql+pglite@0.3.14/node_modules/@electric-sql/pglite/src/contrib/pg_freespacemap.ts"],"sourcesContent":["import type {\n Extension,\n ExtensionSetupResult,\n PGliteInterface,\n} from '../interface'\n\nconst setup = async (_pg: PGliteInterface, _emscriptenOpts: any) => {\n return {\n bundlePath: new URL(\n '../../release/pg_freespacemap.tar.gz',\n import.meta.url,\n ),\n } satisfies ExtensionSetupResult\n}\n\nexport const pg_freespacemap = {\n name: 'pg_freespacemap',\n setup,\n} satisfies Extension\n"],"mappings":";;;;;;AAAAA,EAAAA;AAMA,IAAMC,IAAQ,OAAOC,GAAsBC,OAClC,EACL,YAAY,IAAI,IACd,6BAAA,YACA,GAAA,EAAA;AAJN,IAIM,IAAA,EAAA,MAEJ,mBAIM,OAAA,EAAA;","names":["init_esm_shims","setup","_pg","_emscriptenOpts"]}
@@ -1,13 +0,0 @@
1
- import {
2
- u
3
- } from "./chunk-3KTOEDFX.js";
4
- import "./chunk-7D4SUZUM.js";
5
-
6
- // ../../../node_modules/.pnpm/@electric-sql+pglite@0.3.14/node_modules/@electric-sql/pglite/dist/contrib/pg_surgery.js
7
- u();
8
- var t = async (s, n) => ({ bundlePath: new URL("../pg_surgery.tar.gz", import.meta.url) });
9
- var p = { name: "pg_surgery", setup: t };
10
- export {
11
- p as pg_surgery
12
- };
13
- //# sourceMappingURL=pg_surgery-J2MUEWEP.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../../node_modules/.pnpm/@electric-sql+pglite@0.3.14/node_modules/@electric-sql/pglite/src/contrib/pg_surgery.ts"],"sourcesContent":["import type {\n Extension,\n ExtensionSetupResult,\n PGliteInterface,\n} from '../interface'\n\nconst setup = async (_pg: PGliteInterface, _emscriptenOpts: any) => {\n return {\n bundlePath: new URL('../../release/pg_surgery.tar.gz', import.meta.url),\n } satisfies ExtensionSetupResult\n}\n\nexport const pg_surgery = {\n name: 'pg_surgery',\n setup,\n} satisfies Extension\n"],"mappings":";;;;;;AAAAA,EAAAA;AAMA,IAAMC,IAAQ,OAAOC,GAAsBC,OAClC,EACL,YAAY,IAAI,IAAI,wBAAA,YAAmC,GAAA,EAAA;AAF3D,IAE2D,IAAA,EAAA,MACzD,cAIM,OAAA,EAAA;","names":["init_esm_shims","setup","_pg","_emscriptenOpts"]}
@@ -1,13 +0,0 @@
1
- import {
2
- u
3
- } from "./chunk-3KTOEDFX.js";
4
- import "./chunk-7D4SUZUM.js";
5
-
6
- // ../../../node_modules/.pnpm/@electric-sql+pglite@0.3.14/node_modules/@electric-sql/pglite/dist/contrib/pg_trgm.js
7
- u();
8
- var t = async (n, s) => ({ bundlePath: new URL("../pg_trgm.tar.gz", import.meta.url) });
9
- var p = { name: "pg_trgm", setup: t };
10
- export {
11
- p as pg_trgm
12
- };
13
- //# sourceMappingURL=pg_trgm-7VNQOYS6.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../../node_modules/.pnpm/@electric-sql+pglite@0.3.14/node_modules/@electric-sql/pglite/src/contrib/pg_trgm.ts"],"sourcesContent":["import type {\n Extension,\n ExtensionSetupResult,\n PGliteInterface,\n} from '../interface'\n\nconst setup = async (_pg: PGliteInterface, _emscriptenOpts: any) => {\n return {\n bundlePath: new URL('../../release/pg_trgm.tar.gz', import.meta.url),\n } satisfies ExtensionSetupResult\n}\n\nexport const pg_trgm = {\n name: 'pg_trgm',\n setup,\n} satisfies Extension\n"],"mappings":";;;;;;AAAAA,EAAAA;AAMA,IAAMC,IAAQ,OAAOC,GAAsBC,OAClC,EACL,YAAY,IAAI,IAAI,qBAAA,YAAgC,GAAA,EAAA;AAFxD,IAEwD,IAAA,EAAA,MACtD,WAIA,OAAM,EAAA;","names":["init_esm_shims","setup","_pg","_emscriptenOpts"]}
@@ -1,13 +0,0 @@
1
- import {
2
- u
3
- } from "./chunk-3KTOEDFX.js";
4
- import "./chunk-7D4SUZUM.js";
5
-
6
- // ../../../node_modules/.pnpm/@electric-sql+pglite@0.3.14/node_modules/@electric-sql/pglite/dist/contrib/pg_visibility.js
7
- u();
8
- var t = async (i, s) => ({ bundlePath: new URL("../pg_visibility.tar.gz", import.meta.url) });
9
- var r = { name: "pg_visibility", setup: t };
10
- export {
11
- r as pg_visibility
12
- };
13
- //# sourceMappingURL=pg_visibility-TTSIPHFL.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../../node_modules/.pnpm/@electric-sql+pglite@0.3.14/node_modules/@electric-sql/pglite/src/contrib/pg_visibility.ts"],"sourcesContent":["import type {\n Extension,\n ExtensionSetupResult,\n PGliteInterface,\n} from '../interface'\n\nconst setup = async (_pg: PGliteInterface, _emscriptenOpts: any) => {\n return {\n bundlePath: new URL('../../release/pg_visibility.tar.gz', import.meta.url),\n } satisfies ExtensionSetupResult\n}\n\nexport const pg_visibility = {\n name: 'pg_visibility',\n setup,\n} satisfies Extension\n"],"mappings":";;;;;;AAAAA,EAAAA;AAMA,IAAMC,IAAQ,OAAOC,GAAsBC,OAClC,EACL,YAAY,IAAI,IAAI,2BAAA,YAAsC,GAAA,EAAA;AAF9D,IAE8D,IAAA,EAAA,MAC5D,iBAIM,OAAA,EAAA;","names":["init_esm_shims","setup","_pg","_emscriptenOpts"]}
@@ -1,13 +0,0 @@
1
- import {
2
- u
3
- } from "./chunk-3KTOEDFX.js";
4
- import "./chunk-7D4SUZUM.js";
5
-
6
- // ../../../node_modules/.pnpm/@electric-sql+pglite@0.3.14/node_modules/@electric-sql/pglite/dist/contrib/pg_walinspect.js
7
- u();
8
- var t = async (n, s) => ({ bundlePath: new URL("../pg_walinspect.tar.gz", import.meta.url) });
9
- var a = { name: "pg_walinspect", setup: t };
10
- export {
11
- a as pg_walinspect
12
- };
13
- //# sourceMappingURL=pg_walinspect-KPFHSHRJ.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../../node_modules/.pnpm/@electric-sql+pglite@0.3.14/node_modules/@electric-sql/pglite/src/contrib/pg_walinspect.ts"],"sourcesContent":["import type {\n Extension,\n ExtensionSetupResult,\n PGliteInterface,\n} from '../interface'\n\nconst setup = async (_pg: PGliteInterface, _emscriptenOpts: any) => {\n return {\n bundlePath: new URL('../../release/pg_walinspect.tar.gz', import.meta.url),\n } satisfies ExtensionSetupResult\n}\n\nexport const pg_walinspect = {\n name: 'pg_walinspect',\n setup,\n} satisfies Extension\n"],"mappings":";;;;;;AAAAA,EAAAA;AAMA,IAAMC,IAAQ,OAAOC,GAAsBC,OAClC,EACL,YAAY,IAAI,IAAI,2BAAA,YAAsC,GAAA,EAAA;AAF9D,IAE8D,IAAA,EAAA,MAC5D,iBAIM,OAAA,EAAA;","names":["init_esm_shims","setup","_pg","_emscriptenOpts"]}
@@ -1,39 +0,0 @@
1
- import "./chunk-7D4SUZUM.js";
2
-
3
- // ../../../node_modules/.pnpm/foreground-child@3.3.1/node_modules/foreground-child/dist/esm/all-signals.js
4
- import constants from "constants";
5
- var allSignals = (
6
- // this is the full list of signals that Node will let us do anything with
7
- Object.keys(constants).filter((k) => k.startsWith("SIG") && // https://github.com/tapjs/signal-exit/issues/21
8
- k !== "SIGPROF" && // no sense trying to listen for SIGKILL, it's impossible
9
- k !== "SIGKILL")
10
- );
11
-
12
- // ../../../node_modules/.pnpm/foreground-child@3.3.1/node_modules/foreground-child/dist/esm/proxy-signals.js
13
- var proxySignals = (child) => {
14
- const listeners = /* @__PURE__ */ new Map();
15
- for (const sig of allSignals) {
16
- const listener = () => {
17
- try {
18
- child.kill(sig);
19
- } catch (_) {
20
- }
21
- };
22
- try {
23
- process.on(sig, listener);
24
- listeners.set(sig, listener);
25
- } catch (_) {
26
- }
27
- }
28
- const unproxy = () => {
29
- for (const [sig, listener] of listeners) {
30
- process.removeListener(sig, listener);
31
- }
32
- };
33
- child.on("exit", unproxy);
34
- return unproxy;
35
- };
36
- export {
37
- proxySignals
38
- };
39
- //# sourceMappingURL=proxy-signals-GUDAMDHV.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../../node_modules/.pnpm/foreground-child@3.3.1/node_modules/foreground-child/src/all-signals.ts","../../../../node_modules/.pnpm/foreground-child@3.3.1/node_modules/foreground-child/src/proxy-signals.ts"],"sourcesContent":["import constants from 'node:constants'\nexport const allSignals =\n // this is the full list of signals that Node will let us do anything with\n Object.keys(constants).filter(\n k =>\n k.startsWith('SIG') &&\n // https://github.com/tapjs/signal-exit/issues/21\n k !== 'SIGPROF' &&\n // no sense trying to listen for SIGKILL, it's impossible\n k !== 'SIGKILL',\n ) as NodeJS.Signals[]\n\n// These are some obscure signals that are reported by kill -l\n// on macOS, Linux, or Windows, but which don't have any mapping\n// in Node.js. No sense trying if they're just going to throw\n// every time on every platform.\n//\n// 'SIGEMT',\n// 'SIGLOST',\n// 'SIGPOLL',\n// 'SIGRTMAX',\n// 'SIGRTMAX-1',\n// 'SIGRTMAX-10',\n// 'SIGRTMAX-11',\n// 'SIGRTMAX-12',\n// 'SIGRTMAX-13',\n// 'SIGRTMAX-14',\n// 'SIGRTMAX-15',\n// 'SIGRTMAX-2',\n// 'SIGRTMAX-3',\n// 'SIGRTMAX-4',\n// 'SIGRTMAX-5',\n// 'SIGRTMAX-6',\n// 'SIGRTMAX-7',\n// 'SIGRTMAX-8',\n// 'SIGRTMAX-9',\n// 'SIGRTMIN',\n// 'SIGRTMIN+1',\n// 'SIGRTMIN+10',\n// 'SIGRTMIN+11',\n// 'SIGRTMIN+12',\n// 'SIGRTMIN+13',\n// 'SIGRTMIN+14',\n// 'SIGRTMIN+15',\n// 'SIGRTMIN+16',\n// 'SIGRTMIN+2',\n// 'SIGRTMIN+3',\n// 'SIGRTMIN+4',\n// 'SIGRTMIN+5',\n// 'SIGRTMIN+6',\n// 'SIGRTMIN+7',\n// 'SIGRTMIN+8',\n// 'SIGRTMIN+9',\n// 'SIGSTKFLT',\n// 'SIGUNUSED',\n","import { type ChildProcess } from 'child_process'\nimport { allSignals } from './all-signals.js'\n\n/**\n * Starts forwarding signals to `child` through `parent`.\n */\nexport const proxySignals = (child: ChildProcess) => {\n const listeners = new Map()\n\n for (const sig of allSignals) {\n const listener = () => {\n // some signals can only be received, not sent\n try {\n child.kill(sig)\n /* c8 ignore start */\n } catch (_) {}\n /* c8 ignore stop */\n }\n try {\n // if it's a signal this system doesn't recognize, skip it\n process.on(sig, listener)\n listeners.set(sig, listener)\n /* c8 ignore start */\n } catch (_) {}\n /* c8 ignore stop */\n }\n\n const unproxy = () => {\n for (const [sig, listener] of listeners) {\n process.removeListener(sig, listener)\n }\n }\n child.on('exit', unproxy)\n return unproxy\n}\n"],"mappings":";;;AAAA,OAAO,eAAe;AACf,IAAM;;EAEX,OAAO,KAAK,SAAS,EAAE,OACrB,OACE,EAAE,WAAW,KAAK;EAElB,MAAM;EAEN,MAAM,SAAS;;;;ACHd,IAAM,eAAe,CAAC,UAAuB;AAClD,QAAM,YAAY,oBAAI,IAAG;AAEzB,aAAW,OAAO,YAAY;AAC5B,UAAM,WAAW,MAAK;AAEpB,UAAI;AACF,cAAM,KAAK,GAAG;MAEhB,SAAS,GAAG;MAAC;IAEf;AACA,QAAI;AAEF,cAAQ,GAAG,KAAK,QAAQ;AACxB,gBAAU,IAAI,KAAK,QAAQ;IAE7B,SAAS,GAAG;IAAC;EAEf;AAEA,QAAM,UAAU,MAAK;AACnB,eAAW,CAAC,KAAK,QAAQ,KAAK,WAAW;AACvC,cAAQ,eAAe,KAAK,QAAQ;IACtC;EACF;AACA,QAAM,GAAG,QAAQ,OAAO;AACxB,SAAO;AACT;","names":[]}
@@ -1,13 +0,0 @@
1
- import {
2
- u
3
- } from "./chunk-3KTOEDFX.js";
4
- import "./chunk-7D4SUZUM.js";
5
-
6
- // ../../../node_modules/.pnpm/@electric-sql+pglite@0.3.14/node_modules/@electric-sql/pglite/dist/contrib/seg.js
7
- u();
8
- var t = async (s, n) => ({ bundlePath: new URL("../seg.tar.gz", import.meta.url) });
9
- var a = { name: "seg", setup: t };
10
- export {
11
- a as seg
12
- };
13
- //# sourceMappingURL=seg-IYVDLE4O.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../../node_modules/.pnpm/@electric-sql+pglite@0.3.14/node_modules/@electric-sql/pglite/src/contrib/seg.ts"],"sourcesContent":["import type {\n Extension,\n ExtensionSetupResult,\n PGliteInterface,\n} from '../interface'\n\nconst setup = async (_pg: PGliteInterface, _emscriptenOpts: any) => {\n return {\n bundlePath: new URL('../../release/seg.tar.gz', import.meta.url),\n } satisfies ExtensionSetupResult\n}\n\nexport const seg = {\n name: 'seg',\n setup,\n} satisfies Extension\n"],"mappings":";;;;;;AAAAA,EAAAA;AAMA,IAAMC,IAAQ,OAAOC,GAAsBC,OAClC,EACL,YAAY,IAAI,IAAI,iBAAA,YAA4B,GAAA,EAAA;AAFpD,IAEoD,IAAA,EAAA,MAClD,OAIA,OAAM,EAAA;","names":["init_esm_shims","setup","_pg","_emscriptenOpts"]}
@@ -1,4 +0,0 @@
1
- import type { ExecutionPlan } from '@prisma-next/contract/types';
2
- import type { CodecRegistry } from '@prisma-next/sql-relational-core/ast';
3
- export declare function decodeRow(row: Record<string, unknown>, plan: ExecutionPlan, registry: CodecRegistry): Record<string, unknown>;
4
- //# sourceMappingURL=decoding.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"decoding.d.ts","sourceRoot":"","sources":["../../../src/codecs/decoding.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AACjE,OAAO,KAAK,EAAS,aAAa,EAAE,MAAM,sCAAsC,CAAC;AA4BjF,wBAAgB,SAAS,CACvB,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC5B,IAAI,EAAE,aAAa,EACnB,QAAQ,EAAE,aAAa,GACtB,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CA0GzB"}
@@ -1,5 +0,0 @@
1
- import type { ExecutionPlan, ParamDescriptor } from '@prisma-next/contract/types';
2
- import type { CodecRegistry } from '@prisma-next/sql-relational-core/ast';
3
- export declare function encodeParam(value: unknown, paramDescriptor: ParamDescriptor, plan: ExecutionPlan, registry: CodecRegistry): unknown;
4
- export declare function encodeParams(plan: ExecutionPlan, registry: CodecRegistry): readonly unknown[];
5
- //# sourceMappingURL=encoding.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"encoding.d.ts","sourceRoot":"","sources":["../../../src/codecs/encoding.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAClF,OAAO,KAAK,EAAS,aAAa,EAAE,MAAM,sCAAsC,CAAC;AA2BjF,wBAAgB,WAAW,CACzB,KAAK,EAAE,OAAO,EACd,eAAe,EAAE,eAAe,EAChC,IAAI,EAAE,aAAa,EACnB,QAAQ,EAAE,aAAa,GACtB,OAAO,CAqBT;AAED,wBAAgB,YAAY,CAAC,IAAI,EAAE,aAAa,EAAE,QAAQ,EAAE,aAAa,GAAG,SAAS,OAAO,EAAE,CAmB7F"}
@@ -1,6 +0,0 @@
1
- import type { SqlContract, SqlStorage } from '@prisma-next/sql-contract/types';
2
- import type { CodecRegistry } from '@prisma-next/sql-relational-core/ast';
3
- export declare function extractCodecIds(contract: SqlContract<SqlStorage>): Set<string>;
4
- export declare function validateContractCodecMappings(registry: CodecRegistry, contract: SqlContract<SqlStorage>): void;
5
- export declare function validateCodecRegistryCompleteness(registry: CodecRegistry, contract: SqlContract<SqlStorage>): void;
6
- //# sourceMappingURL=validation.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"validation.d.ts","sourceRoot":"","sources":["../../../src/codecs/validation.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAC/E,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,sCAAsC,CAAC;AAE1E,wBAAgB,eAAe,CAAC,QAAQ,EAAE,WAAW,CAAC,UAAU,CAAC,GAAG,GAAG,CAAC,MAAM,CAAC,CAW9E;AAgBD,wBAAgB,6BAA6B,CAC3C,QAAQ,EAAE,aAAa,EACvB,QAAQ,EAAE,WAAW,CAAC,UAAU,CAAC,GAChC,IAAI,CAyBN;AAED,wBAAgB,iCAAiC,CAC/C,QAAQ,EAAE,aAAa,EACvB,QAAQ,EAAE,WAAW,CAAC,UAAU,CAAC,GAChC,IAAI,CAEN"}
@@ -1,11 +0,0 @@
1
- export type { AfterExecuteResult, BudgetsOptions, LintsOptions, Log, Plugin, PluginContext, } from '@prisma-next/runtime-executor';
2
- export { budgets, lints } from '@prisma-next/runtime-executor';
3
- export { extractCodecIds, validateCodecRegistryCompleteness, validateContractCodecMappings, } from '../codecs/validation';
4
- export { lowerSqlPlan } from '../lower-sql-plan';
5
- export type { CreateRuntimeContextOptions, RuntimeContext, RuntimeParameterizedCodecDescriptor, SqlRuntimeAdapterInstance, SqlRuntimeExtensionDescriptor, SqlRuntimeExtensionInstance, TypeHelperRegistry, } from '../sql-context';
6
- export { createRuntimeContext } from '../sql-context';
7
- export type { SqlStatement } from '../sql-marker';
8
- export { ensureSchemaStatement, ensureTableStatement, readContractMarker, writeContractMarker, } from '../sql-marker';
9
- export type { Runtime, RuntimeOptions, RuntimeTelemetryEvent, RuntimeVerifyOptions, TelemetryOutcome, } from '../sql-runtime';
10
- export { createRuntime } from '../sql-runtime';
11
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/exports/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,kBAAkB,EAClB,cAAc,EACd,YAAY,EACZ,GAAG,EACH,MAAM,EACN,aAAa,GACd,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,+BAA+B,CAAC;AAC/D,OAAO,EACL,eAAe,EACf,iCAAiC,EACjC,6BAA6B,GAC9B,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,YAAY,EACV,2BAA2B,EAC3B,cAAc,EACd,mCAAmC,EACnC,yBAAyB,EACzB,6BAA6B,EAC7B,2BAA2B,EAC3B,kBAAkB,GACnB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AACtD,YAAY,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAClD,OAAO,EACL,qBAAqB,EACrB,oBAAoB,EACpB,kBAAkB,EAClB,mBAAmB,GACpB,MAAM,eAAe,CAAC;AACvB,YAAY,EACV,OAAO,EACP,cAAc,EACd,qBAAqB,EACrB,oBAAoB,EACpB,gBAAgB,GACjB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC"}
@@ -1,2 +0,0 @@
1
- export * from './exports';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC"}
@@ -1,15 +0,0 @@
1
- import type { ExecutionPlan } from '@prisma-next/contract/types';
2
- import type { SqlQueryPlan } from '@prisma-next/sql-relational-core/plan';
3
- import type { RuntimeContext } from './sql-context';
4
- /**
5
- * Lowers a SQL query plan to an executable Plan by calling the adapter's lower method.
6
- *
7
- * This function is responsible for converting a lane-produced SqlQueryPlan (which contains
8
- * AST and params but no SQL) into a fully executable Plan (which includes SQL string).
9
- *
10
- * @param context - Runtime context containing the adapter
11
- * @param queryPlan - SQL query plan from a lane (contains AST, params, meta, but no SQL)
12
- * @returns Fully executable Plan with SQL string
13
- */
14
- export declare function lowerSqlPlan<Row>(context: RuntimeContext, queryPlan: SqlQueryPlan<Row>): ExecutionPlan<Row>;
15
- //# sourceMappingURL=lower-sql-plan.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"lower-sql-plan.d.ts","sourceRoot":"","sources":["../../src/lower-sql-plan.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AACjE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uCAAuC,CAAC;AAC1E,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAEpD;;;;;;;;;GASG;AACH,wBAAgB,YAAY,CAAC,GAAG,EAC9B,OAAO,EAAE,cAAc,EACvB,SAAS,EAAE,YAAY,CAAC,GAAG,CAAC,GAC3B,aAAa,CAAC,GAAG,CAAC,CAcpB"}
@@ -1,130 +0,0 @@
1
- import type { RuntimeAdapterDescriptor, RuntimeAdapterInstance, RuntimeExtensionDescriptor, RuntimeExtensionInstance, RuntimeTargetDescriptor } from '@prisma-next/core-execution-plane/types';
2
- import type { SqlContract, SqlStorage } from '@prisma-next/sql-contract/types';
3
- import type { SqlOperationSignature } from '@prisma-next/sql-operations';
4
- import type { Adapter, CodecRegistry, LoweredStatement, QueryAst } from '@prisma-next/sql-relational-core/ast';
5
- import type { QueryLaneContext, TypeHelperRegistry } from '@prisma-next/sql-relational-core/query-lane-context';
6
- import type { Type } from 'arktype';
7
- /**
8
- * Runtime parameterized codec descriptor.
9
- * Provides validation schema and optional init hook for codecs that support type parameters.
10
- * Used at runtime to validate typeParams and create type helpers.
11
- */
12
- export interface RuntimeParameterizedCodecDescriptor<TParams = Record<string, unknown>, THelper = unknown> {
13
- /** The codec ID this descriptor applies to (e.g., 'pg/vector@1') */
14
- readonly codecId: string;
15
- /**
16
- * Arktype schema for validating typeParams.
17
- * The schema is used to validate both storage.types entries and inline column typeParams.
18
- */
19
- readonly paramsSchema: Type<TParams>;
20
- /**
21
- * Optional init hook called during runtime context creation.
22
- * Receives validated params and returns a helper object to be stored in context.types.
23
- * If not provided, the validated params are stored directly.
24
- */
25
- readonly init?: (params: TParams) => THelper;
26
- }
27
- /**
28
- * SQL runtime extension instance.
29
- * Extends the framework RuntimeExtensionInstance with SQL-specific hooks
30
- * for contributing codecs and operations to the runtime context.
31
- *
32
- * @template TTargetId - The target ID (e.g., 'postgres', 'mysql')
33
- */
34
- export interface SqlRuntimeExtensionInstance<TTargetId extends string> extends RuntimeExtensionInstance<'sql', TTargetId> {
35
- /** Returns codecs to register in the runtime context. */
36
- codecs?(): CodecRegistry;
37
- /** Returns operations to register in the runtime context. */
38
- operations?(): ReadonlyArray<SqlOperationSignature>;
39
- /**
40
- * Returns parameterized codec descriptors for type validation and helper creation.
41
- * Uses unknown for type parameters to allow any concrete descriptor types.
42
- */
43
- parameterizedCodecs?(): ReadonlyArray<RuntimeParameterizedCodecDescriptor<any, any>>;
44
- }
45
- /**
46
- * SQL runtime extension descriptor.
47
- * Extends the framework RuntimeExtensionDescriptor with SQL-specific instance type.
48
- *
49
- * @template TTargetId - The target ID (e.g., 'postgres', 'mysql')
50
- */
51
- export interface SqlRuntimeExtensionDescriptor<TTargetId extends string> extends RuntimeExtensionDescriptor<'sql', TTargetId, SqlRuntimeExtensionInstance<TTargetId>> {
52
- create(): SqlRuntimeExtensionInstance<TTargetId>;
53
- }
54
- /**
55
- * SQL runtime adapter instance interface.
56
- * Combines RuntimeAdapterInstance identity with SQL Adapter behavior.
57
- * The instance IS an Adapter (via intersection), not HAS an adapter property.
58
- *
59
- * @template TTargetId - The target ID (e.g., 'postgres', 'mysql')
60
- */
61
- export type SqlRuntimeAdapterInstance<TTargetId extends string = string> = RuntimeAdapterInstance<'sql', TTargetId> & Adapter<QueryAst, SqlContract<SqlStorage>, LoweredStatement>;
62
- export type { TypeHelperRegistry };
63
- export interface RuntimeContext<TContract extends SqlContract<SqlStorage> = SqlContract<SqlStorage>> extends QueryLaneContext<TContract> {
64
- readonly adapter: Adapter<QueryAst, TContract, LoweredStatement> | Adapter<QueryAst, SqlContract<SqlStorage>, LoweredStatement>;
65
- /**
66
- * Initialized type helpers from storage.types.
67
- * Each entry corresponds to a named type instance in the contract's storage.types.
68
- * The value is the result of calling the codec's init hook (if provided)
69
- * or the validated typeParams (if no init hook).
70
- */
71
- readonly types?: TypeHelperRegistry;
72
- }
73
- /**
74
- * Descriptor-first options for creating a SQL runtime context.
75
- * Takes the same framework composition as control-plane: target, adapter, extensionPacks.
76
- *
77
- * @template TContract - The SQL contract type
78
- * @template TTargetId - The target ID (e.g., 'postgres', 'mysql')
79
- */
80
- export interface CreateRuntimeContextOptions<TContract extends SqlContract<SqlStorage> = SqlContract<SqlStorage>, TTargetId extends string = string> {
81
- readonly contract: TContract;
82
- readonly target: RuntimeTargetDescriptor<'sql', TTargetId>;
83
- readonly adapter: RuntimeAdapterDescriptor<'sql', TTargetId, SqlRuntimeAdapterInstance<TTargetId>>;
84
- readonly extensionPacks?: ReadonlyArray<SqlRuntimeExtensionDescriptor<TTargetId>>;
85
- }
86
- /**
87
- * Structured error thrown by the SQL runtime.
88
- *
89
- * Aligns with the repository's error envelope convention:
90
- * - `code`: Stable error code for programmatic handling (e.g., `RUNTIME.TYPE_PARAMS_INVALID`)
91
- * - `category`: Error source category (`RUNTIME`)
92
- * - `severity`: Error severity level (`error`)
93
- * - `details`: Optional structured details for debugging
94
- *
95
- * @example
96
- * ```typescript
97
- * try {
98
- * createRuntimeContext({ ... });
99
- * } catch (e) {
100
- * if ((e as RuntimeError).code === 'RUNTIME.TYPE_PARAMS_INVALID') {
101
- * console.error('Invalid type parameters:', (e as RuntimeError).details);
102
- * }
103
- * }
104
- * ```
105
- */
106
- export interface RuntimeError extends Error {
107
- /** Stable error code for programmatic handling (e.g., `RUNTIME.TYPE_PARAMS_INVALID`) */
108
- readonly code: string;
109
- /** Error source category */
110
- readonly category: 'RUNTIME';
111
- /** Error severity level */
112
- readonly severity: 'error';
113
- /** Optional structured details for debugging */
114
- readonly details?: Record<string, unknown>;
115
- }
116
- /**
117
- * Creates a SQL runtime context from descriptor-first composition.
118
- *
119
- * The context includes:
120
- * - The validated contract
121
- * - The adapter instance (created from descriptor)
122
- * - Codec registry (populated from adapter + extension instances)
123
- * - Operation registry (populated from extension instances)
124
- * - Types registry (initialized helpers from storage.types)
125
- *
126
- * @param options - Descriptor-first composition options
127
- * @returns RuntimeContext with registries wired from all components
128
- */
129
- export declare function createRuntimeContext<TContract extends SqlContract<SqlStorage> = SqlContract<SqlStorage>, TTargetId extends string = string>(options: CreateRuntimeContextOptions<TContract, TTargetId>): RuntimeContext<TContract>;
130
- //# sourceMappingURL=sql-context.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"sql-context.d.ts","sourceRoot":"","sources":["../../src/sql-context.ts"],"names":[],"mappings":"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"}
@@ -1,10 +0,0 @@
1
- import type { ExecutionPlan } from '@prisma-next/contract/types';
2
- import type { MarkerReader, RuntimeFamilyAdapter } from '@prisma-next/runtime-executor';
3
- import type { SqlContract, SqlStorage } from '@prisma-next/sql-contract/types';
4
- export declare class SqlFamilyAdapter<TContract extends SqlContract<SqlStorage>> implements RuntimeFamilyAdapter<TContract> {
5
- readonly contract: TContract;
6
- readonly markerReader: MarkerReader;
7
- constructor(contract: TContract);
8
- validatePlan(plan: ExecutionPlan, contract: TContract): void;
9
- }
10
- //# sourceMappingURL=sql-family-adapter.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"sql-family-adapter.d.ts","sourceRoot":"","sources":["../../src/sql-family-adapter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AACjE,OAAO,KAAK,EACV,YAAY,EAEZ,oBAAoB,EACrB,MAAM,+BAA+B,CAAC;AAEvC,OAAO,KAAK,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAS/E,qBAAa,gBAAgB,CAAC,SAAS,SAAS,WAAW,CAAC,UAAU,CAAC,CACrE,YAAW,oBAAoB,CAAC,SAAS,CAAC;IAE1C,QAAQ,CAAC,QAAQ,EAAE,SAAS,CAAC;IAC7B,QAAQ,CAAC,YAAY,EAAE,YAAY,CAAC;gBAExB,QAAQ,EAAE,SAAS;IAK/B,YAAY,CAAC,IAAI,EAAE,aAAa,EAAE,QAAQ,EAAE,SAAS,GAAG,IAAI;CAe7D"}
@@ -1,22 +0,0 @@
1
- import type { MarkerStatement } from '@prisma-next/runtime-executor';
2
- export interface SqlStatement {
3
- readonly sql: string;
4
- readonly params: readonly unknown[];
5
- }
6
- export interface WriteMarkerInput {
7
- readonly coreHash: string;
8
- readonly profileHash: string;
9
- readonly contractJson?: unknown;
10
- readonly canonicalVersion?: number;
11
- readonly appTag?: string;
12
- readonly meta?: Record<string, unknown>;
13
- }
14
- export declare const ensureSchemaStatement: SqlStatement;
15
- export declare const ensureTableStatement: SqlStatement;
16
- export declare function readContractMarker(): MarkerStatement;
17
- export interface WriteContractMarkerStatements {
18
- readonly insert: SqlStatement;
19
- readonly update: SqlStatement;
20
- }
21
- export declare function writeContractMarker(input: WriteMarkerInput): WriteContractMarkerStatements;
22
- //# sourceMappingURL=sql-marker.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"sql-marker.d.ts","sourceRoot":"","sources":["../../src/sql-marker.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAErE,MAAM,WAAW,YAAY;IAC3B,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,MAAM,EAAE,SAAS,OAAO,EAAE,CAAC;CACrC;AAED,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,YAAY,CAAC,EAAE,OAAO,CAAC;IAChC,QAAQ,CAAC,gBAAgB,CAAC,EAAE,MAAM,CAAC;IACnC,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACzC;AAED,eAAO,MAAM,qBAAqB,EAAE,YAGnC,CAAC;AAEF,eAAO,MAAM,oBAAoB,EAAE,YAYlC,CAAC;AAEF,wBAAgB,kBAAkB,IAAI,eAAe,CAcpD;AAED,MAAM,WAAW,6BAA6B;IAC5C,QAAQ,CAAC,MAAM,EAAE,YAAY,CAAC;IAC9B,QAAQ,CAAC,MAAM,EAAE,YAAY,CAAC;CAC/B;AAED,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,gBAAgB,GAAG,6BAA6B,CAgD1F"}
@@ -1,25 +0,0 @@
1
- import type { ExecutionPlan } from '@prisma-next/contract/types';
2
- import type { OperationRegistry } from '@prisma-next/operations';
3
- import type { Log, Plugin, RuntimeTelemetryEvent, RuntimeVerifyOptions, TelemetryOutcome } from '@prisma-next/runtime-executor';
4
- import { AsyncIterableResult } from '@prisma-next/runtime-executor';
5
- import type { SqlContract, SqlStorage } from '@prisma-next/sql-contract/types';
6
- import type { Adapter, LoweredStatement, SelectAst, SqlDriver } from '@prisma-next/sql-relational-core/ast';
7
- import type { SqlQueryPlan } from '@prisma-next/sql-relational-core/plan';
8
- import type { RuntimeContext } from './sql-context';
9
- export interface RuntimeOptions<TContract extends SqlContract<SqlStorage> = SqlContract<SqlStorage>> {
10
- readonly driver: SqlDriver;
11
- readonly verify: RuntimeVerifyOptions;
12
- readonly context: RuntimeContext<TContract>;
13
- readonly plugins?: readonly Plugin<TContract, Adapter<SelectAst, SqlContract<SqlStorage>, LoweredStatement>, SqlDriver>[];
14
- readonly mode?: 'strict' | 'permissive';
15
- readonly log?: Log;
16
- }
17
- export interface Runtime {
18
- execute<Row = Record<string, unknown>>(plan: ExecutionPlan<Row> | SqlQueryPlan<Row>): AsyncIterableResult<Row>;
19
- telemetry(): RuntimeTelemetryEvent | null;
20
- close(): Promise<void>;
21
- operations(): OperationRegistry;
22
- }
23
- export type { RuntimeTelemetryEvent, RuntimeVerifyOptions, TelemetryOutcome };
24
- export declare function createRuntime<TContract extends SqlContract<SqlStorage>>(options: RuntimeOptions<TContract>): Runtime;
25
- //# sourceMappingURL=sql-runtime.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"sql-runtime.d.ts","sourceRoot":"","sources":["../../src/sql-runtime.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AACjE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AACjE,OAAO,KAAK,EACV,GAAG,EACH,MAAM,EAGN,qBAAqB,EACrB,oBAAoB,EACpB,gBAAgB,EACjB,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAAE,mBAAmB,EAAqB,MAAM,+BAA+B,CAAC;AACvF,OAAO,KAAK,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAC/E,OAAO,KAAK,EACV,OAAO,EAEP,gBAAgB,EAChB,SAAS,EACT,SAAS,EACV,MAAM,sCAAsC,CAAC;AAC9C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uCAAuC,CAAC;AAK1E,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAGpD,MAAM,WAAW,cAAc,CAC7B,SAAS,SAAS,WAAW,CAAC,UAAU,CAAC,GAAG,WAAW,CAAC,UAAU,CAAC;IAEnE,QAAQ,CAAC,MAAM,EAAE,SAAS,CAAC;IAC3B,QAAQ,CAAC,MAAM,EAAE,oBAAoB,CAAC;IACtC,QAAQ,CAAC,OAAO,EAAE,cAAc,CAAC,SAAS,CAAC,CAAC;IAC5C,QAAQ,CAAC,OAAO,CAAC,EAAE,SAAS,MAAM,CAChC,SAAS,EACT,OAAO,CAAC,SAAS,EAAE,WAAW,CAAC,UAAU,CAAC,EAAE,gBAAgB,CAAC,EAC7D,SAAS,CACV,EAAE,CAAC;IACJ,QAAQ,CAAC,IAAI,CAAC,EAAE,QAAQ,GAAG,YAAY,CAAC;IACxC,QAAQ,CAAC,GAAG,CAAC,EAAE,GAAG,CAAC;CACpB;AAED,MAAM,WAAW,OAAO;IACtB,OAAO,CAAC,GAAG,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EACnC,IAAI,EAAE,aAAa,CAAC,GAAG,CAAC,GAAG,YAAY,CAAC,GAAG,CAAC,GAC3C,mBAAmB,CAAC,GAAG,CAAC,CAAC;IAC5B,SAAS,IAAI,qBAAqB,GAAG,IAAI,CAAC;IAC1C,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IACvB,UAAU,IAAI,iBAAiB,CAAC;CACjC;AAED,YAAY,EAAE,qBAAqB,EAAE,oBAAoB,EAAE,gBAAgB,EAAE,CAAC;AA6G9E,wBAAgB,aAAa,CAAC,SAAS,SAAS,WAAW,CAAC,UAAU,CAAC,EACrE,OAAO,EAAE,cAAc,CAAC,SAAS,CAAC,GACjC,OAAO,CAET"}
@@ -1,13 +0,0 @@
1
- import {
2
- u
3
- } from "./chunk-3KTOEDFX.js";
4
- import "./chunk-7D4SUZUM.js";
5
-
6
- // ../../../node_modules/.pnpm/@electric-sql+pglite@0.3.14/node_modules/@electric-sql/pglite/dist/contrib/tablefunc.js
7
- u();
8
- var t = async (n, s) => ({ bundlePath: new URL("../tablefunc.tar.gz", import.meta.url) });
9
- var r = { name: "tablefunc", setup: t };
10
- export {
11
- r as tablefunc
12
- };
13
- //# sourceMappingURL=tablefunc-EF4RCS7S.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../../node_modules/.pnpm/@electric-sql+pglite@0.3.14/node_modules/@electric-sql/pglite/src/contrib/tablefunc.ts"],"sourcesContent":["import type {\n Extension,\n ExtensionSetupResult,\n PGliteInterface,\n} from '../interface'\n\nconst setup = async (_pg: PGliteInterface, _emscriptenOpts: any) => {\n return {\n bundlePath: new URL('../../release/tablefunc.tar.gz', import.meta.url),\n } satisfies ExtensionSetupResult\n}\n\nexport const tablefunc = {\n name: 'tablefunc',\n setup,\n} satisfies Extension\n"],"mappings":";;;;;;AAAAA,EAAAA;AAMA,IAAMC,IAAQ,OAAOC,GAAsBC,OAClC,EACL,YAAY,IAAI,IAAI,uBAAA,YAAkC,GAAA,EAAA;AAF1D,IAE0D,IAAA,EAAA,MACxD,aAIM,OAAA,EAAA;","names":["init_esm_shims","setup","_pg","_emscriptenOpts"]}
@@ -1,13 +0,0 @@
1
- import {
2
- u
3
- } from "./chunk-3KTOEDFX.js";
4
- import "./chunk-7D4SUZUM.js";
5
-
6
- // ../../../node_modules/.pnpm/@electric-sql+pglite@0.3.14/node_modules/@electric-sql/pglite/dist/contrib/tcn.js
7
- u();
8
- var t = async (n, s) => ({ bundlePath: new URL("../tcn.tar.gz", import.meta.url) });
9
- var a = { name: "tcn", setup: t };
10
- export {
11
- a as tcn
12
- };
13
- //# sourceMappingURL=tcn-3VT5BQYW.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../../node_modules/.pnpm/@electric-sql+pglite@0.3.14/node_modules/@electric-sql/pglite/src/contrib/tcn.ts"],"sourcesContent":["import type {\n Extension,\n ExtensionSetupResult,\n PGliteInterface,\n} from '../interface'\n\nconst setup = async (_pg: PGliteInterface, _emscriptenOpts: any) => {\n return {\n bundlePath: new URL('../../release/tcn.tar.gz', import.meta.url),\n } satisfies ExtensionSetupResult\n}\n\nexport const tcn = {\n name: 'tcn',\n setup,\n} satisfies Extension\n"],"mappings":";;;;;;AAAAA,EAAAA;AAMA,IAAMC,IAAQ,OAAOC,GAAsBC,OAClC,EACL,YAAY,IAAI,IAAI,iBAAA,YAA4B,GAAA,EAAA;AAFpD,IAEoD,IAAA,EAAA,MAClD,OAIA,OAAM,EAAA;","names":["init_esm_shims","setup","_pg","_emscriptenOpts"]}
@@ -1,60 +0,0 @@
1
- import type { ExecutionPlan, ResultType } from '@prisma-next/contract/types';
2
- import type { SqlContract, SqlStorage } from '@prisma-next/sql-contract/types';
3
- import type { Adapter, LoweredStatement, SelectAst } from '@prisma-next/sql-relational-core/ast';
4
- import type { SqlQueryPlan } from '@prisma-next/sql-relational-core/plan';
5
- import type { Client } from 'pg';
6
- import type { SqlStatement } from '../src/exports';
7
- import { type createRuntime } from '../src/exports';
8
- import type { RuntimeContext, SqlRuntimeExtensionDescriptor } from '../src/sql-context';
9
- /**
10
- * Executes a plan and collects all results into an array.
11
- * This helper DRYs up the common pattern of executing plans in tests.
12
- * The return type is inferred from the plan's type parameter.
13
- */
14
- export declare function executePlanAndCollect<P extends ExecutionPlan<ResultType<P>> | SqlQueryPlan<ResultType<P>>>(runtime: ReturnType<typeof createRuntime>, plan: P): Promise<ResultType<P>[]>;
15
- /**
16
- * Drains a plan execution, consuming all results without collecting them.
17
- * Useful for testing side effects without memory overhead.
18
- */
19
- export declare function drainPlanExecution(runtime: ReturnType<typeof createRuntime>, plan: ExecutionPlan | SqlQueryPlan<unknown>): Promise<void>;
20
- /**
21
- * Executes a SQL statement on a database client.
22
- */
23
- export declare function executeStatement(client: Client, statement: SqlStatement): Promise<void>;
24
- /**
25
- * Sets up database schema and data, then writes the contract marker.
26
- * This helper DRYs up the common pattern of database setup in tests.
27
- */
28
- export declare function setupTestDatabase(client: Client, contract: SqlContract<SqlStorage>, setupFn: (client: Client) => Promise<void>): Promise<void>;
29
- /**
30
- * Writes a contract marker to the database.
31
- * This helper DRYs up the common pattern of writing contract markers in tests.
32
- */
33
- export declare function writeTestContractMarker(client: Client, contract: SqlContract<SqlStorage>): Promise<void>;
34
- /**
35
- * Creates a runtime context with standard test configuration.
36
- * This helper DRYs up the common pattern of context creation in tests.
37
- *
38
- * Accepts a raw adapter and optional extension descriptors, wrapping the
39
- * adapter in a descriptor internally for descriptor-first context creation.
40
- */
41
- export declare function createTestContext<TContract extends SqlContract<SqlStorage>>(contract: TContract, adapter: Adapter<SelectAst, SqlContract<SqlStorage>, LoweredStatement>, options?: {
42
- extensionPacks?: ReadonlyArray<SqlRuntimeExtensionDescriptor<'postgres'>>;
43
- }): RuntimeContext<TContract>;
44
- /**
45
- * Creates a stub adapter for testing.
46
- * This helper DRYs up the common pattern of adapter creation in tests.
47
- *
48
- * The stub adapter includes simple codecs for common test types (pg/int4@1, pg/text@1, pg/timestamptz@1)
49
- * to enable type inference in tests without requiring the postgres adapter package.
50
- */
51
- export declare function createStubAdapter(): Adapter<SelectAst, SqlContract<SqlStorage>, LoweredStatement>;
52
- /**
53
- * Creates a valid test contract without using validateContract.
54
- * Ensures all required fields are present (mappings, capabilities, extensionPacks, meta, sources)
55
- * and returns the contract with proper typing.
56
- * This helper allows tests to create contracts without depending on sql-query.
57
- */
58
- export declare function createTestContract<T extends SqlContract<SqlStorage>>(contract: Partial<T> & Omit<T, 'mappings' | 'capabilities' | 'extensionPacks' | 'meta' | 'sources'>): T;
59
- export { collectAsync, createDevDatabase, type DevDatabase, teardownTestDatabase, withClient, } from '@prisma-next/test-utils';
60
- //# sourceMappingURL=utils.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../test/utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAC;AAC7E,OAAO,KAAK,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAC/E,OAAO,KAAK,EAAE,OAAO,EAAE,gBAAgB,EAAE,SAAS,EAAE,MAAM,sCAAsC,CAAC;AAEjG,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uCAAuC,CAAC;AAE1E,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,IAAI,CAAC;AACjC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AACnD,OAAO,EACL,KAAK,aAAa,EAKnB,MAAM,gBAAgB,CAAC;AACxB,OAAO,KAAK,EACV,cAAc,EAEd,6BAA6B,EAC9B,MAAM,oBAAoB,CAAC;AAE5B;;;;GAIG;AACH,wBAAsB,qBAAqB,CACzC,CAAC,SAAS,aAAa,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,GAAG,YAAY,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,EACpE,OAAO,EAAE,UAAU,CAAC,OAAO,aAAa,CAAC,EAAE,IAAI,EAAE,CAAC,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,CAAC,CAG9E;AAED;;;GAGG;AACH,wBAAsB,kBAAkB,CACtC,OAAO,EAAE,UAAU,CAAC,OAAO,aAAa,CAAC,EACzC,IAAI,EAAE,aAAa,GAAG,YAAY,CAAC,OAAO,CAAC,GAC1C,OAAO,CAAC,IAAI,CAAC,CAEf;AAED;;GAEG;AACH,wBAAsB,gBAAgB,CAAC,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC,CAO7F;AAED;;;GAGG;AACH,wBAAsB,iBAAiB,CACrC,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,WAAW,CAAC,UAAU,CAAC,EACjC,OAAO,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,GACzC,OAAO,CAAC,IAAI,CAAC,CAef;AAED;;;GAGG;AACH,wBAAsB,uBAAuB,CAC3C,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,WAAW,CAAC,UAAU,CAAC,GAChC,OAAO,CAAC,IAAI,CAAC,CAQf;AA4DD;;;;;;GAMG;AACH,wBAAgB,iBAAiB,CAAC,SAAS,SAAS,WAAW,CAAC,UAAU,CAAC,EACzE,QAAQ,EAAE,SAAS,EACnB,OAAO,EAAE,OAAO,CAAC,SAAS,EAAE,WAAW,CAAC,UAAU,CAAC,EAAE,gBAAgB,CAAC,EACtE,OAAO,CAAC,EAAE;IACR,cAAc,CAAC,EAAE,aAAa,CAAC,6BAA6B,CAAC,UAAU,CAAC,CAAC,CAAC;CAC3E,GACA,cAAc,CAAC,SAAS,CAAC,CAO3B;AAED;;;;;;GAMG;AACH,wBAAgB,iBAAiB,IAAI,OAAO,CAAC,SAAS,EAAE,WAAW,CAAC,UAAU,CAAC,EAAE,gBAAgB,CAAC,CAmDjG;AAED;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,CAAC,SAAS,WAAW,CAAC,UAAU,CAAC,EAClE,QAAQ,EAAE,OAAO,CAAC,CAAC,CAAC,GAClB,IAAI,CAAC,CAAC,EAAE,UAAU,GAAG,cAAc,GAAG,gBAAgB,GAAG,MAAM,GAAG,SAAS,CAAC,GAC7E,CAAC,CASH;AAGD,OAAO,EACL,YAAY,EACZ,iBAAiB,EACjB,KAAK,WAAW,EAChB,oBAAoB,EACpB,UAAU,GACX,MAAM,yBAAyB,CAAC"}