@dotdo/pglite 0.1.1 → 0.1.3

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 (97) hide show
  1. package/dist/contrib/amcheck.d.cts +1 -1
  2. package/dist/contrib/amcheck.d.ts +1 -1
  3. package/dist/contrib/auto_explain.d.cts +1 -1
  4. package/dist/contrib/auto_explain.d.ts +1 -1
  5. package/dist/contrib/bloom.d.cts +1 -1
  6. package/dist/contrib/bloom.d.ts +1 -1
  7. package/dist/contrib/btree_gin.d.cts +1 -1
  8. package/dist/contrib/btree_gin.d.ts +1 -1
  9. package/dist/contrib/btree_gist.d.cts +1 -1
  10. package/dist/contrib/btree_gist.d.ts +1 -1
  11. package/dist/contrib/citext.d.cts +1 -1
  12. package/dist/contrib/citext.d.ts +1 -1
  13. package/dist/contrib/cube.d.cts +1 -1
  14. package/dist/contrib/cube.d.ts +1 -1
  15. package/dist/contrib/dict_int.d.cts +1 -1
  16. package/dist/contrib/dict_int.d.ts +1 -1
  17. package/dist/contrib/dict_xsyn.d.cts +1 -1
  18. package/dist/contrib/dict_xsyn.d.ts +1 -1
  19. package/dist/contrib/earthdistance.d.cts +1 -1
  20. package/dist/contrib/earthdistance.d.ts +1 -1
  21. package/dist/contrib/file_fdw.d.cts +1 -1
  22. package/dist/contrib/file_fdw.d.ts +1 -1
  23. package/dist/contrib/fuzzystrmatch.d.cts +1 -1
  24. package/dist/contrib/fuzzystrmatch.d.ts +1 -1
  25. package/dist/contrib/hstore.d.cts +1 -1
  26. package/dist/contrib/hstore.d.ts +1 -1
  27. package/dist/contrib/intarray.d.cts +1 -1
  28. package/dist/contrib/intarray.d.ts +1 -1
  29. package/dist/contrib/isn.d.cts +1 -1
  30. package/dist/contrib/isn.d.ts +1 -1
  31. package/dist/contrib/lo.d.cts +1 -1
  32. package/dist/contrib/lo.d.ts +1 -1
  33. package/dist/contrib/ltree.d.cts +1 -1
  34. package/dist/contrib/ltree.d.ts +1 -1
  35. package/dist/contrib/pageinspect.d.cts +1 -1
  36. package/dist/contrib/pageinspect.d.ts +1 -1
  37. package/dist/contrib/pg_buffercache.d.cts +1 -1
  38. package/dist/contrib/pg_buffercache.d.ts +1 -1
  39. package/dist/contrib/pg_freespacemap.d.cts +1 -1
  40. package/dist/contrib/pg_freespacemap.d.ts +1 -1
  41. package/dist/contrib/pg_surgery.d.cts +1 -1
  42. package/dist/contrib/pg_surgery.d.ts +1 -1
  43. package/dist/contrib/pg_trgm.d.cts +1 -1
  44. package/dist/contrib/pg_trgm.d.ts +1 -1
  45. package/dist/contrib/pg_visibility.d.cts +1 -1
  46. package/dist/contrib/pg_visibility.d.ts +1 -1
  47. package/dist/contrib/pg_walinspect.d.cts +1 -1
  48. package/dist/contrib/pg_walinspect.d.ts +1 -1
  49. package/dist/contrib/pgcrypto.d.cts +1 -1
  50. package/dist/contrib/pgcrypto.d.ts +1 -1
  51. package/dist/contrib/seg.d.cts +1 -1
  52. package/dist/contrib/seg.d.ts +1 -1
  53. package/dist/contrib/tablefunc.d.cts +1 -1
  54. package/dist/contrib/tablefunc.d.ts +1 -1
  55. package/dist/contrib/tcn.d.cts +1 -1
  56. package/dist/contrib/tcn.d.ts +1 -1
  57. package/dist/contrib/tsm_system_rows.d.cts +1 -1
  58. package/dist/contrib/tsm_system_rows.d.ts +1 -1
  59. package/dist/contrib/tsm_system_time.d.cts +1 -1
  60. package/dist/contrib/tsm_system_time.d.ts +1 -1
  61. package/dist/contrib/unaccent.d.cts +1 -1
  62. package/dist/contrib/unaccent.d.ts +1 -1
  63. package/dist/contrib/uuid_ossp.d.cts +1 -1
  64. package/dist/contrib/uuid_ossp.d.ts +1 -1
  65. package/dist/fs/base.d.cts +1 -1
  66. package/dist/fs/base.d.ts +1 -1
  67. package/dist/fs/nodefs.d.cts +1 -1
  68. package/dist/fs/nodefs.d.ts +1 -1
  69. package/dist/fs/opfs-ahp.d.cts +1 -1
  70. package/dist/fs/opfs-ahp.d.ts +1 -1
  71. package/dist/index.cjs +7 -7
  72. package/dist/index.cjs.map +1 -1
  73. package/dist/index.d.cts +2 -2
  74. package/dist/index.d.ts +2 -2
  75. package/dist/index.js +4 -4
  76. package/dist/index.js.map +1 -1
  77. package/dist/live/index.d.cts +1 -1
  78. package/dist/live/index.d.ts +1 -1
  79. package/dist/pg_hashids/index.d.cts +1 -1
  80. package/dist/pg_hashids/index.d.ts +1 -1
  81. package/dist/pg_ivm/index.d.cts +1 -1
  82. package/dist/pg_ivm/index.d.ts +1 -1
  83. package/dist/pg_uuidv7/index.d.cts +1 -1
  84. package/dist/pg_uuidv7/index.d.ts +1 -1
  85. package/dist/{pglite-RfkRSGmH.d.cts → pglite-CoH-eKFW.d.cts} +28 -1
  86. package/dist/{pglite-RfkRSGmH.d.ts → pglite-CoH-eKFW.d.ts} +28 -1
  87. package/dist/pglite.cjs +16 -3
  88. package/dist/pglite.data +0 -0
  89. package/dist/pglite.js +1 -1
  90. package/dist/pglite.wasm +0 -0
  91. package/dist/pgtap/index.d.cts +1 -1
  92. package/dist/pgtap/index.d.ts +1 -1
  93. package/dist/vector/index.d.cts +1 -1
  94. package/dist/vector/index.d.ts +1 -1
  95. package/dist/worker/index.d.cts +1 -1
  96. package/dist/worker/index.d.ts +1 -1
  97. package/package.json +1 -1
@@ -1,4 +1,4 @@
1
- import { R as Results, d as PGliteInterfaceBase, x as PGliteInterface } from '../pglite-RfkRSGmH.cjs';
1
+ import { R as Results, d as PGliteInterfaceBase, x as PGliteInterface } from '../pglite-CoH-eKFW.cjs';
2
2
 
3
3
  interface LiveQueryOptions<T = {
4
4
  [key: string]: any;
@@ -1,4 +1,4 @@
1
- import { R as Results, d as PGliteInterfaceBase, x as PGliteInterface } from '../pglite-RfkRSGmH.js';
1
+ import { R as Results, d as PGliteInterfaceBase, x as PGliteInterface } from '../pglite-CoH-eKFW.js';
2
2
 
3
3
  interface LiveQueryOptions<T = {
4
4
  [key: string]: any;
@@ -1,4 +1,4 @@
1
- import { d as PGliteInterfaceBase } from '../pglite-RfkRSGmH.cjs';
1
+ import { d as PGliteInterfaceBase } from '../pglite-CoH-eKFW.cjs';
2
2
 
3
3
  declare const pg_hashids: {
4
4
  name: string;
@@ -1,4 +1,4 @@
1
- import { d as PGliteInterfaceBase } from '../pglite-RfkRSGmH.js';
1
+ import { d as PGliteInterfaceBase } from '../pglite-CoH-eKFW.js';
2
2
 
3
3
  declare const pg_hashids: {
4
4
  name: string;
@@ -1,4 +1,4 @@
1
- import { d as PGliteInterfaceBase } from '../pglite-RfkRSGmH.cjs';
1
+ import { d as PGliteInterfaceBase } from '../pglite-CoH-eKFW.cjs';
2
2
 
3
3
  declare const pg_ivm: {
4
4
  name: string;
@@ -1,4 +1,4 @@
1
- import { d as PGliteInterfaceBase } from '../pglite-RfkRSGmH.js';
1
+ import { d as PGliteInterfaceBase } from '../pglite-CoH-eKFW.js';
2
2
 
3
3
  declare const pg_ivm: {
4
4
  name: string;
@@ -1,4 +1,4 @@
1
- import { d as PGliteInterfaceBase } from '../pglite-RfkRSGmH.cjs';
1
+ import { d as PGliteInterfaceBase } from '../pglite-CoH-eKFW.cjs';
2
2
 
3
3
  declare const pg_uuidv7: {
4
4
  name: string;
@@ -1,4 +1,4 @@
1
- import { d as PGliteInterfaceBase } from '../pglite-RfkRSGmH.js';
1
+ import { d as PGliteInterfaceBase } from '../pglite-CoH-eKFW.js';
2
2
 
3
3
  declare const pg_uuidv7: {
4
4
  name: string;
@@ -259,6 +259,27 @@ type FS = typeof FS & {
259
259
  };
260
260
  quit: () => void;
261
261
  };
262
+ /**
263
+ * Callback interface for Cloudflare Workers compatibility.
264
+ * These callbacks are called by EM_JS trampolines in the C code,
265
+ * avoiding runtime WASM generation that Cloudflare blocks.
266
+ */
267
+ interface PGliteCallbacks$1 {
268
+ /**
269
+ * Called when PostgreSQL writes data to the client.
270
+ * @param ptr Pointer to data in WASM memory
271
+ * @param length Number of bytes to write
272
+ * @returns Number of bytes written
273
+ */
274
+ write: (ptr: number, length: number) => number;
275
+ /**
276
+ * Called when PostgreSQL reads data from the client.
277
+ * @param ptr Pointer to buffer in WASM memory
278
+ * @param maxLength Maximum number of bytes to read
279
+ * @returns Number of bytes read
280
+ */
281
+ read: (ptr: number, maxLength: number) => number;
282
+ }
262
283
  interface PostgresMod extends Omit<EmscriptenModule, 'preInit' | 'preRun' | 'postRun'> {
263
284
  preInit: Array<{
264
285
  (mod: PostgresMod): void;
@@ -274,6 +295,12 @@ interface PostgresMod extends Omit<EmscriptenModule, 'preInit' | 'preRun' | 'pos
274
295
  WASM_PREFIX: string;
275
296
  INITIAL_MEMORY: number;
276
297
  pg_extensions: Record<string, Promise<Blob | null>>;
298
+ /**
299
+ * Callbacks for read/write operations.
300
+ * Used by EM_JS trampolines for Cloudflare Workers compatibility.
301
+ * Must be set BEFORE calling _pgl_initdb.
302
+ */
303
+ _pgliteCallbacks?: PGliteCallbacks$1;
277
304
  _pgl_initdb: () => number;
278
305
  _pgl_backend: () => void;
279
306
  _pgl_shutdown: () => void;
@@ -291,7 +318,7 @@ declare const _default: PostgresFactory<PostgresMod>;
291
318
  type postgresMod_FS = FS;
292
319
  type postgresMod_PostgresMod = PostgresMod;
293
320
  declare namespace postgresMod {
294
- export { type postgresMod_FS as FS, type postgresMod_PostgresMod as PostgresMod, _default as default };
321
+ export { type postgresMod_FS as FS, type PGliteCallbacks$1 as PGliteCallbacks, type postgresMod_PostgresMod as PostgresMod, _default as default };
295
322
  }
296
323
 
297
324
  type DumpTarCompressionOptions = 'none' | 'gzip' | 'auto';
@@ -259,6 +259,27 @@ type FS = typeof FS & {
259
259
  };
260
260
  quit: () => void;
261
261
  };
262
+ /**
263
+ * Callback interface for Cloudflare Workers compatibility.
264
+ * These callbacks are called by EM_JS trampolines in the C code,
265
+ * avoiding runtime WASM generation that Cloudflare blocks.
266
+ */
267
+ interface PGliteCallbacks$1 {
268
+ /**
269
+ * Called when PostgreSQL writes data to the client.
270
+ * @param ptr Pointer to data in WASM memory
271
+ * @param length Number of bytes to write
272
+ * @returns Number of bytes written
273
+ */
274
+ write: (ptr: number, length: number) => number;
275
+ /**
276
+ * Called when PostgreSQL reads data from the client.
277
+ * @param ptr Pointer to buffer in WASM memory
278
+ * @param maxLength Maximum number of bytes to read
279
+ * @returns Number of bytes read
280
+ */
281
+ read: (ptr: number, maxLength: number) => number;
282
+ }
262
283
  interface PostgresMod extends Omit<EmscriptenModule, 'preInit' | 'preRun' | 'postRun'> {
263
284
  preInit: Array<{
264
285
  (mod: PostgresMod): void;
@@ -274,6 +295,12 @@ interface PostgresMod extends Omit<EmscriptenModule, 'preInit' | 'preRun' | 'pos
274
295
  WASM_PREFIX: string;
275
296
  INITIAL_MEMORY: number;
276
297
  pg_extensions: Record<string, Promise<Blob | null>>;
298
+ /**
299
+ * Callbacks for read/write operations.
300
+ * Used by EM_JS trampolines for Cloudflare Workers compatibility.
301
+ * Must be set BEFORE calling _pgl_initdb.
302
+ */
303
+ _pgliteCallbacks?: PGliteCallbacks$1;
277
304
  _pgl_initdb: () => number;
278
305
  _pgl_backend: () => void;
279
306
  _pgl_shutdown: () => void;
@@ -291,7 +318,7 @@ declare const _default: PostgresFactory<PostgresMod>;
291
318
  type postgresMod_FS = FS;
292
319
  type postgresMod_PostgresMod = PostgresMod;
293
320
  declare namespace postgresMod {
294
- export { type postgresMod_FS as FS, type postgresMod_PostgresMod as PostgresMod, _default as default };
321
+ export { type postgresMod_FS as FS, type PGliteCallbacks$1 as PGliteCallbacks, type postgresMod_PostgresMod as PostgresMod, _default as default };
295
322
  }
296
323
 
297
324
  type DumpTarCompressionOptions = 'none' | 'gzip' | 'auto';