orez 0.9.7 → 0.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (249) hide show
  1. package/README.md +27 -19
  2. package/dist/config.d.ts +0 -4
  3. package/dist/config.d.ts.map +1 -1
  4. package/dist/config.js +0 -1
  5. package/dist/config.js.map +1 -1
  6. package/dist/index.d.ts +0 -1
  7. package/dist/index.d.ts.map +1 -1
  8. package/dist/index.js +5 -43
  9. package/dist/index.js.map +1 -1
  10. package/package.json +7 -71
  11. package/dist/cf-deploy/bundle.d.ts +0 -21
  12. package/dist/cf-deploy/bundle.d.ts.map +0 -1
  13. package/dist/cf-deploy/bundle.js +0 -347
  14. package/dist/cf-deploy/bundle.js.map +0 -1
  15. package/dist/cf-deploy/config.d.ts +0 -52
  16. package/dist/cf-deploy/config.d.ts.map +0 -1
  17. package/dist/cf-deploy/config.js +0 -23
  18. package/dist/cf-deploy/config.js.map +0 -1
  19. package/dist/cf-deploy/index.d.ts +0 -11
  20. package/dist/cf-deploy/index.d.ts.map +0 -1
  21. package/dist/cf-deploy/index.js +0 -17
  22. package/dist/cf-deploy/index.js.map +0 -1
  23. package/dist/cf-deploy/leaves.d.ts +0 -19
  24. package/dist/cf-deploy/leaves.d.ts.map +0 -1
  25. package/dist/cf-deploy/leaves.js +0 -109
  26. package/dist/cf-deploy/leaves.js.map +0 -1
  27. package/dist/cf-deploy/migration.d.ts +0 -40
  28. package/dist/cf-deploy/migration.d.ts.map +0 -1
  29. package/dist/cf-deploy/migration.js +0 -891
  30. package/dist/cf-deploy/migration.js.map +0 -1
  31. package/dist/cf-deploy/nativeMigrations.d.ts +0 -24
  32. package/dist/cf-deploy/nativeMigrations.d.ts.map +0 -1
  33. package/dist/cf-deploy/nativeMigrations.js +0 -185
  34. package/dist/cf-deploy/nativeMigrations.js.map +0 -1
  35. package/dist/cf-deploy/prune.d.ts +0 -14
  36. package/dist/cf-deploy/prune.d.ts.map +0 -1
  37. package/dist/cf-deploy/prune.js +0 -235
  38. package/dist/cf-deploy/prune.js.map +0 -1
  39. package/dist/cf-deploy/shims.d.ts +0 -13
  40. package/dist/cf-deploy/shims.d.ts.map +0 -1
  41. package/dist/cf-deploy/shims.js +0 -737
  42. package/dist/cf-deploy/shims.js.map +0 -1
  43. package/dist/cf-deploy/smoke.d.ts +0 -15
  44. package/dist/cf-deploy/smoke.d.ts.map +0 -1
  45. package/dist/cf-deploy/smoke.js +0 -141
  46. package/dist/cf-deploy/smoke.js.map +0 -1
  47. package/dist/cf-deploy/sources.d.ts +0 -9
  48. package/dist/cf-deploy/sources.d.ts.map +0 -1
  49. package/dist/cf-deploy/sources.js +0 -276
  50. package/dist/cf-deploy/sources.js.map +0 -1
  51. package/dist/cf-deploy/wrangler.d.ts +0 -6
  52. package/dist/cf-deploy/wrangler.d.ts.map +0 -1
  53. package/dist/cf-deploy/wrangler.js +0 -168
  54. package/dist/cf-deploy/wrangler.js.map +0 -1
  55. package/dist/cf-do/application-sql.d.ts +0 -49
  56. package/dist/cf-do/application-sql.d.ts.map +0 -1
  57. package/dist/cf-do/application-sql.js +0 -124
  58. package/dist/cf-do/application-sql.js.map +0 -1
  59. package/dist/cf-do/cdc.d.ts +0 -155
  60. package/dist/cf-do/cdc.d.ts.map +0 -1
  61. package/dist/cf-do/cdc.js +0 -719
  62. package/dist/cf-do/cdc.js.map +0 -1
  63. package/dist/cf-do/cursor-pull.d.ts +0 -27
  64. package/dist/cf-do/cursor-pull.d.ts.map +0 -1
  65. package/dist/cf-do/cursor-pull.js +0 -78
  66. package/dist/cf-do/cursor-pull.js.map +0 -1
  67. package/dist/cf-do/row-undo.d.ts +0 -36
  68. package/dist/cf-do/row-undo.d.ts.map +0 -1
  69. package/dist/cf-do/row-undo.js +0 -221
  70. package/dist/cf-do/row-undo.js.map +0 -1
  71. package/dist/cf-do/tx-journal.d.ts +0 -119
  72. package/dist/cf-do/tx-journal.d.ts.map +0 -1
  73. package/dist/cf-do/tx-journal.js +0 -718
  74. package/dist/cf-do/tx-journal.js.map +0 -1
  75. package/dist/cf-do/watermark.d.ts +0 -29
  76. package/dist/cf-do/watermark.d.ts.map +0 -1
  77. package/dist/cf-do/watermark.js +0 -105
  78. package/dist/cf-do/watermark.js.map +0 -1
  79. package/dist/cf-do/worker.d.ts +0 -287
  80. package/dist/cf-do/worker.d.ts.map +0 -1
  81. package/dist/cf-do/worker.js +0 -1961
  82. package/dist/cf-do/worker.js.map +0 -1
  83. package/dist/do-sql-tracking.d.ts +0 -104
  84. package/dist/do-sql-tracking.d.ts.map +0 -1
  85. package/dist/do-sql-tracking.js +0 -255
  86. package/dist/do-sql-tracking.js.map +0 -1
  87. package/dist/pg-proxy-do-backend.d.ts +0 -211
  88. package/dist/pg-proxy-do-backend.d.ts.map +0 -1
  89. package/dist/pg-proxy-do-backend.js +0 -7884
  90. package/dist/pg-proxy-do-backend.js.map +0 -1
  91. package/dist/pg-sqlite-compiler/catalog/seed.d.ts +0 -67
  92. package/dist/pg-sqlite-compiler/catalog/seed.d.ts.map +0 -1
  93. package/dist/pg-sqlite-compiler/catalog/seed.js +0 -436
  94. package/dist/pg-sqlite-compiler/catalog/seed.js.map +0 -1
  95. package/dist/pg-sqlite-compiler/compiler.d.ts +0 -17
  96. package/dist/pg-sqlite-compiler/compiler.d.ts.map +0 -1
  97. package/dist/pg-sqlite-compiler/compiler.js +0 -86
  98. package/dist/pg-sqlite-compiler/compiler.js.map +0 -1
  99. package/dist/pg-sqlite-compiler/index.d.ts +0 -2
  100. package/dist/pg-sqlite-compiler/index.d.ts.map +0 -1
  101. package/dist/pg-sqlite-compiler/index.js +0 -13
  102. package/dist/pg-sqlite-compiler/index.js.map +0 -1
  103. package/dist/pg-sqlite-compiler/passes/array.d.ts +0 -3
  104. package/dist/pg-sqlite-compiler/passes/array.d.ts.map +0 -1
  105. package/dist/pg-sqlite-compiler/passes/array.js +0 -223
  106. package/dist/pg-sqlite-compiler/passes/array.js.map +0 -1
  107. package/dist/pg-sqlite-compiler/passes/ast-utils.d.ts +0 -48
  108. package/dist/pg-sqlite-compiler/passes/ast-utils.d.ts.map +0 -1
  109. package/dist/pg-sqlite-compiler/passes/ast-utils.js +0 -93
  110. package/dist/pg-sqlite-compiler/passes/ast-utils.js.map +0 -1
  111. package/dist/pg-sqlite-compiler/passes/catalog.d.ts +0 -34
  112. package/dist/pg-sqlite-compiler/passes/catalog.d.ts.map +0 -1
  113. package/dist/pg-sqlite-compiler/passes/catalog.js +0 -30
  114. package/dist/pg-sqlite-compiler/passes/catalog.js.map +0 -1
  115. package/dist/pg-sqlite-compiler/passes/datetime.d.ts +0 -23
  116. package/dist/pg-sqlite-compiler/passes/datetime.d.ts.map +0 -1
  117. package/dist/pg-sqlite-compiler/passes/datetime.js +0 -55
  118. package/dist/pg-sqlite-compiler/passes/datetime.js.map +0 -1
  119. package/dist/pg-sqlite-compiler/passes/dml-cte.d.ts +0 -22
  120. package/dist/pg-sqlite-compiler/passes/dml-cte.d.ts.map +0 -1
  121. package/dist/pg-sqlite-compiler/passes/dml-cte.js +0 -161
  122. package/dist/pg-sqlite-compiler/passes/dml-cte.js.map +0 -1
  123. package/dist/pg-sqlite-compiler/passes/index.d.ts +0 -24
  124. package/dist/pg-sqlite-compiler/passes/index.d.ts.map +0 -1
  125. package/dist/pg-sqlite-compiler/passes/index.js +0 -52
  126. package/dist/pg-sqlite-compiler/passes/index.js.map +0 -1
  127. package/dist/pg-sqlite-compiler/passes/json-functions.d.ts +0 -3
  128. package/dist/pg-sqlite-compiler/passes/json-functions.d.ts.map +0 -1
  129. package/dist/pg-sqlite-compiler/passes/json-functions.js +0 -57
  130. package/dist/pg-sqlite-compiler/passes/json-functions.js.map +0 -1
  131. package/dist/pg-sqlite-compiler/passes/row-json.d.ts +0 -3
  132. package/dist/pg-sqlite-compiler/passes/row-json.d.ts.map +0 -1
  133. package/dist/pg-sqlite-compiler/passes/row-json.js +0 -230
  134. package/dist/pg-sqlite-compiler/passes/row-json.js.map +0 -1
  135. package/dist/pg-sqlite-compiler/passes/schema.d.ts +0 -4
  136. package/dist/pg-sqlite-compiler/passes/schema.d.ts.map +0 -1
  137. package/dist/pg-sqlite-compiler/passes/schema.js +0 -128
  138. package/dist/pg-sqlite-compiler/passes/schema.js.map +0 -1
  139. package/dist/pg-sqlite-compiler/passes/string-functions.d.ts +0 -11
  140. package/dist/pg-sqlite-compiler/passes/string-functions.d.ts.map +0 -1
  141. package/dist/pg-sqlite-compiler/passes/string-functions.js +0 -37
  142. package/dist/pg-sqlite-compiler/passes/string-functions.js.map +0 -1
  143. package/dist/pg-sqlite-compiler/passes/types.d.ts +0 -41
  144. package/dist/pg-sqlite-compiler/passes/types.d.ts.map +0 -1
  145. package/dist/pg-sqlite-compiler/passes/types.js +0 -115
  146. package/dist/pg-sqlite-compiler/passes/types.js.map +0 -1
  147. package/dist/pg-sqlite-compiler/passes/unsupported.d.ts +0 -3
  148. package/dist/pg-sqlite-compiler/passes/unsupported.d.ts.map +0 -1
  149. package/dist/pg-sqlite-compiler/passes/unsupported.js +0 -57
  150. package/dist/pg-sqlite-compiler/passes/unsupported.js.map +0 -1
  151. package/dist/pg-sqlite-compiler/test/oracle.d.ts +0 -34
  152. package/dist/pg-sqlite-compiler/test/oracle.d.ts.map +0 -1
  153. package/dist/pg-sqlite-compiler/test/oracle.js +0 -204
  154. package/dist/pg-sqlite-compiler/test/oracle.js.map +0 -1
  155. package/dist/pg-sqlite-compiler/types.d.ts +0 -66
  156. package/dist/pg-sqlite-compiler/types.d.ts.map +0 -1
  157. package/dist/pg-sqlite-compiler/types.js +0 -2
  158. package/dist/pg-sqlite-compiler/types.js.map +0 -1
  159. package/dist/sync-browser-host/generated/sqlite3-browser.wasm +0 -0
  160. package/dist/sync-browser-host/generated/sync_wasm.js +0 -922
  161. package/dist/sync-browser-host/generated/sync_wasm_bg.wasm +0 -0
  162. package/dist/sync-browser-host/host.d.ts +0 -10
  163. package/dist/sync-browser-host/host.d.ts.map +0 -1
  164. package/dist/sync-browser-host/host.js +0 -496
  165. package/dist/sync-browser-host/host.js.map +0 -1
  166. package/dist/sync-browser-host/idb-snapshot.d.ts +0 -11
  167. package/dist/sync-browser-host/idb-snapshot.d.ts.map +0 -1
  168. package/dist/sync-browser-host/idb-snapshot.js +0 -122
  169. package/dist/sync-browser-host/idb-snapshot.js.map +0 -1
  170. package/dist/sync-browser-host/index.d.ts +0 -5
  171. package/dist/sync-browser-host/index.d.ts.map +0 -1
  172. package/dist/sync-browser-host/index.js +0 -5
  173. package/dist/sync-browser-host/index.js.map +0 -1
  174. package/dist/sync-browser-host/message-port.d.ts +0 -7
  175. package/dist/sync-browser-host/message-port.d.ts.map +0 -1
  176. package/dist/sync-browser-host/message-port.js +0 -188
  177. package/dist/sync-browser-host/message-port.js.map +0 -1
  178. package/dist/sync-browser-host/sqlite-adapter.d.ts +0 -67
  179. package/dist/sync-browser-host/sqlite-adapter.d.ts.map +0 -1
  180. package/dist/sync-browser-host/sqlite-adapter.js +0 -145
  181. package/dist/sync-browser-host/sqlite-adapter.js.map +0 -1
  182. package/dist/sync-browser-host/types.d.ts +0 -52
  183. package/dist/sync-browser-host/types.d.ts.map +0 -1
  184. package/dist/sync-browser-host/types.js +0 -2
  185. package/dist/sync-browser-host/types.js.map +0 -1
  186. package/dist/sync-cf-host.d.ts +0 -2
  187. package/dist/sync-cf-host.d.ts.map +0 -1
  188. package/dist/sync-cf-host.js +0 -2
  189. package/dist/sync-cf-host.js.map +0 -1
  190. package/dist/sync-executor.d.ts +0 -2
  191. package/dist/sync-executor.d.ts.map +0 -1
  192. package/dist/sync-executor.js +0 -2
  193. package/dist/sync-executor.js.map +0 -1
  194. package/dist/wake.d.ts +0 -22
  195. package/dist/wake.d.ts.map +0 -1
  196. package/dist/wake.js +0 -114
  197. package/dist/wake.js.map +0 -1
  198. package/dist/worker/cf-do-shim.d.ts +0 -55
  199. package/dist/worker/cf-do-shim.d.ts.map +0 -1
  200. package/dist/worker/cf-do-shim.js +0 -58
  201. package/dist/worker/cf-do-shim.js.map +0 -1
  202. package/dist/worker/cf-patches.d.ts +0 -43
  203. package/dist/worker/cf-patches.d.ts.map +0 -1
  204. package/dist/worker/cf-patches.js +0 -840
  205. package/dist/worker/cf-patches.js.map +0 -1
  206. package/dist/worker/local-sql-backend.d.ts +0 -35
  207. package/dist/worker/local-sql-backend.d.ts.map +0 -1
  208. package/dist/worker/local-sql-backend.js +0 -217
  209. package/dist/worker/local-sql-backend.js.map +0 -1
  210. package/dist/worker/zero-cache-embed-cf.d.ts +0 -92
  211. package/dist/worker/zero-cache-embed-cf.d.ts.map +0 -1
  212. package/dist/worker/zero-cache-embed-cf.js +0 -764
  213. package/dist/worker/zero-cache-embed-cf.js.map +0 -1
  214. package/dist/worker/zero-sql-write-circuit.d.ts +0 -46
  215. package/dist/worker/zero-sql-write-circuit.d.ts.map +0 -1
  216. package/dist/worker/zero-sql-write-circuit.js +0 -161
  217. package/dist/worker/zero-sql-write-circuit.js.map +0 -1
  218. package/dist/zero-http/encrypted-column-codec.d.ts +0 -46
  219. package/dist/zero-http/encrypted-column-codec.d.ts.map +0 -1
  220. package/dist/zero-http/encrypted-column-codec.js +0 -676
  221. package/dist/zero-http/encrypted-column-codec.js.map +0 -1
  222. package/dist/zero-http/encrypted-column-conformance.d.ts +0 -7
  223. package/dist/zero-http/encrypted-column-conformance.d.ts.map +0 -1
  224. package/dist/zero-http/encrypted-column-conformance.js +0 -161
  225. package/dist/zero-http/encrypted-column-conformance.js.map +0 -1
  226. package/dist/zero-http/fixture-schema.d.ts +0 -127
  227. package/dist/zero-http/fixture-schema.d.ts.map +0 -1
  228. package/dist/zero-http/fixture-schema.js +0 -56
  229. package/dist/zero-http/fixture-schema.js.map +0 -1
  230. package/dist/zero-http/mount.d.ts +0 -71
  231. package/dist/zero-http/mount.d.ts.map +0 -1
  232. package/dist/zero-http/mount.js +0 -594
  233. package/dist/zero-http/mount.js.map +0 -1
  234. package/dist/zero-http/payload-codec.d.ts +0 -91
  235. package/dist/zero-http/payload-codec.d.ts.map +0 -1
  236. package/dist/zero-http/payload-codec.js +0 -10
  237. package/dist/zero-http/payload-codec.js.map +0 -1
  238. package/dist/zero-http/server.d.ts +0 -16
  239. package/dist/zero-http/server.d.ts.map +0 -1
  240. package/dist/zero-http/server.js +0 -270
  241. package/dist/zero-http/server.js.map +0 -1
  242. package/dist/zero-http/test-harness.d.ts +0 -32
  243. package/dist/zero-http/test-harness.d.ts.map +0 -1
  244. package/dist/zero-http/test-harness.js +0 -77
  245. package/dist/zero-http/test-harness.js.map +0 -1
  246. package/dist/zero-http/transport.d.ts +0 -71
  247. package/dist/zero-http/transport.d.ts.map +0 -1
  248. package/dist/zero-http/transport.js +0 -1106
  249. package/dist/zero-http/transport.js.map +0 -1
@@ -1,168 +0,0 @@
1
- // orez/cf-deploy — Cloudflare wrangler-config normalization for the split
2
- // app/data-worker Durable Object architecture. app-neutral: the DO binding/class
3
- // names and the compat date are orez-architecture constants shared by every
4
- // consumer (contrast, chat, …), NOT prefix-derived tokens, so they live here as
5
- // fixed consts rather than on CfDeployConfig.
6
- const ZERO_CACHE_DO_BINDING = 'ZERO_CACHE_DO';
7
- const ZERO_SQL_DO_BINDING = 'ZERO_SQL_DO';
8
- const ZERO_CACHE_DO_CLASS = 'ZeroCacheDO';
9
- const ZERO_SQL_DO_CLASS = 'ZeroSqlDO';
10
- const LEGACY_ZERO_DO_CLASS = 'ZeroDO';
11
- const LEGACY_ZERO_DO_BINDING = 'ZERO_DO';
12
- const LEGACY_ZERO_CACHE_MIGRATION_TAG = 'v2-zero-cache-do';
13
- // the orez CF-DO embed (startZeroCacheEmbedCF + the SQL DO backend) needs a
14
- // recent workerd to register the durable-object actors correctly; the older
15
- // compat date `one build` writes (`2024-12-05`) drops into workerd's
16
- // actor-detection fallback and the ZERO_*_DO bindings never resolve. pin to the
17
- // date proven to bind cleanly under the installed runtime.
18
- export const CLOUDFLARE_DO_COMPAT_DATE = '2026-03-29';
19
- function asRecord(value) {
20
- return value && typeof value === 'object' && !Array.isArray(value)
21
- ? value
22
- : undefined;
23
- }
24
- function bindingName(binding) {
25
- return typeof binding.name === 'string' ? binding.name : '';
26
- }
27
- function migrationNewSqliteClasses(migration) {
28
- return Array.isArray(migration.new_sqlite_classes)
29
- ? migration.new_sqlite_classes.filter((name) => typeof name === 'string')
30
- : [];
31
- }
32
- function migrationDeletedClasses(migration) {
33
- return Array.isArray(migration.deleted_classes)
34
- ? migration.deleted_classes.filter((name) => typeof name === 'string')
35
- : [];
36
- }
37
- function uniqueMigrationTag(migrations, preferred) {
38
- const tags = new Set(migrations
39
- .map((migration) => migration.tag)
40
- .filter((tag) => typeof tag === 'string'));
41
- if (!tags.has(preferred))
42
- return preferred;
43
- let index = 2;
44
- while (tags.has(`${preferred}-${index}`))
45
- index++;
46
- return `${preferred}-${index}`;
47
- }
48
- export function normalizeCloudflareDoWranglerConfig(config) {
49
- // keep the generated worker config in one's deploy shape before adding DOs.
50
- // attach EVERY root-level esbuild split chunk with one general glob. root
51
- // chunks are hash-suffixed: chunk-*.js (shared graphs, statically imported)
52
- // plus the DYNAMIC-import chunks esbuild names after their source module
53
- // (one-app-*.js, zero-cache-embed-cf-*.js, pg-proxy-do-backend-*.js, and any
54
- // future dependency split). `*-*.js` matches all of them and skips the
55
- // dash-free index.js `main` entry. per-package name enumeration is the trap
56
- // that caused the 2026-07-15 Pennywise wedge: orez 0.5.11 split out
57
- // pg-proxy-do-backend-*, no glob attached it, and — because dynamic
58
- // specifiers are NOT validated at upload — the worker deployed clean then
59
- // 500'd every embed boot with `No such module "pg-proxy-do-backend-….js"`.
60
- // a general glob cannot regress when a dependency adds another chunk.
61
- config.rules = [
62
- {
63
- type: 'ESModule',
64
- globs: ['assets/**/*.js', 'assets/**/*.mjs', '*-*.js'],
65
- },
66
- ];
67
- // expose the per-deploy version to the worker + its DOs so ZeroCacheDO can
68
- // scope its persisted boot-failure count to the build that recorded it. a
69
- // fixed redeploy (new CF_VERSION) then gets a clean boot attempt instead of
70
- // inheriting a stale terminal count it could never clear. the control-plane
71
- // app/data configs already bind this; user-app configs did not.
72
- config.version_metadata = { binding: 'CF_VERSION' };
73
- config.compatibility_date = CLOUDFLARE_DO_COMPAT_DATE;
74
- // One sets `run_worker_first: true`, which routes EVERY request — including the
75
- // prerendered SSG shell and hashed /assets/* — through the (heavy, zero-cache-
76
- // embedding) worker. that makes even an edge-cached asset pay the worker's
77
- // cold-start, so the shell loads ~10x slower than a plain One deploy. only the
78
- // dynamic backend paths actually need the worker; the ~1.2k prerendered HTML
79
- // files + hashed assets are static and must serve straight from the Asset
80
- // Worker (edge cache). scope worker-first to the API + zero-sync paths so the
81
- // static shell loads at edge speed.
82
- const assets = asRecord(config.assets) ?? {};
83
- assets.run_worker_first = ['/api/*', '/sync', '/sync/*'];
84
- config.assets = assets;
85
- delete config.artifacts;
86
- delete config.flagship;
87
- delete config.vpc_networks;
88
- const durableObjects = asRecord(config.durable_objects) ?? {};
89
- const existingBindings = Array.isArray(durableObjects.bindings)
90
- ? durableObjects.bindings.filter((binding) => Boolean(asRecord(binding)))
91
- : [];
92
- const managedBindings = new Set([
93
- LEGACY_ZERO_DO_BINDING,
94
- ZERO_CACHE_DO_BINDING,
95
- ZERO_SQL_DO_BINDING,
96
- ]);
97
- durableObjects.bindings = [
98
- ...existingBindings.filter((binding) => !managedBindings.has(bindingName(binding))),
99
- { name: ZERO_CACHE_DO_BINDING, class_name: ZERO_CACHE_DO_CLASS },
100
- { name: ZERO_SQL_DO_BINDING, class_name: ZERO_SQL_DO_CLASS },
101
- ];
102
- config.durable_objects = durableObjects;
103
- const migrations = Array.isArray(config.migrations)
104
- ? config.migrations.filter((migration) => Boolean(asRecord(migration)))
105
- : [];
106
- const existingClasses = new Set(migrations.flatMap(migrationNewSqliteClasses));
107
- const hasLegacyZeroDo = existingClasses.has(LEGACY_ZERO_DO_CLASS);
108
- const missingClasses = [ZERO_CACHE_DO_CLASS, ZERO_SQL_DO_CLASS].filter((className) => !existingClasses.has(className));
109
- if (!hasLegacyZeroDo) {
110
- const preferredTag = migrations.length === 0 ? 'v1' : LEGACY_ZERO_CACHE_MIGRATION_TAG;
111
- config.migrations =
112
- missingClasses.length > 0
113
- ? [
114
- ...migrations,
115
- {
116
- tag: uniqueMigrationTag(migrations, preferredTag),
117
- new_sqlite_classes: missingClasses,
118
- },
119
- ]
120
- : migrations;
121
- return config;
122
- }
123
- if (missingClasses.length > 0) {
124
- config.migrations = [
125
- ...migrations,
126
- {
127
- tag: uniqueMigrationTag(migrations, LEGACY_ZERO_CACHE_MIGRATION_TAG),
128
- new_sqlite_classes: missingClasses,
129
- },
130
- ];
131
- }
132
- else {
133
- config.migrations = migrations;
134
- }
135
- return config;
136
- }
137
- /** keep the authoritative SQL DO while removing the embedded sync-cache class. */
138
- export function normalizeCloudflareRustSyncWranglerConfig(config) {
139
- normalizeCloudflareDoWranglerConfig(config);
140
- const compatibilityFlags = Array.isArray(config.compatibility_flags)
141
- ? config.compatibility_flags.filter((flag) => typeof flag === 'string')
142
- : [];
143
- config.compatibility_flags = [
144
- ...new Set([...compatibilityFlags, 'enable_request_signal']),
145
- ];
146
- const durableObjects = asRecord(config.durable_objects) ?? {};
147
- const bindings = Array.isArray(durableObjects.bindings)
148
- ? durableObjects.bindings.filter((binding) => Boolean(asRecord(binding)))
149
- : [];
150
- durableObjects.bindings = bindings.filter((binding) => bindingName(binding) !== ZERO_CACHE_DO_BINDING);
151
- config.durable_objects = durableObjects;
152
- const assets = asRecord(config.assets) ?? {};
153
- assets.run_worker_first = ['/api/*', '/zero-http', '/zero-http/*'];
154
- config.assets = assets;
155
- const migrations = Array.isArray(config.migrations)
156
- ? config.migrations.filter((migration) => Boolean(asRecord(migration)))
157
- : [];
158
- const deletedClasses = new Set(migrations.flatMap(migrationDeletedClasses));
159
- if (!deletedClasses.has(ZERO_CACHE_DO_CLASS)) {
160
- migrations.push({
161
- tag: uniqueMigrationTag(migrations, 'v3-rust-sync-host'),
162
- deleted_classes: [ZERO_CACHE_DO_CLASS],
163
- });
164
- }
165
- config.migrations = migrations;
166
- return config;
167
- }
168
- //# sourceMappingURL=wrangler.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"wrangler.js","sourceRoot":"","sources":["../../src/cf-deploy/wrangler.ts"],"names":[],"mappings":"AAAA,0EAA0E;AAC1E,iFAAiF;AACjF,4EAA4E;AAC5E,gFAAgF;AAChF,8CAA8C;AAM9C,MAAM,qBAAqB,GAAG,eAAe,CAAA;AAC7C,MAAM,mBAAmB,GAAG,aAAa,CAAA;AACzC,MAAM,mBAAmB,GAAG,aAAa,CAAA;AACzC,MAAM,iBAAiB,GAAG,WAAW,CAAA;AACrC,MAAM,oBAAoB,GAAG,QAAQ,CAAA;AACrC,MAAM,sBAAsB,GAAG,SAAS,CAAA;AACxC,MAAM,+BAA+B,GAAG,kBAAkB,CAAA;AAC1D,4EAA4E;AAC5E,4EAA4E;AAC5E,qEAAqE;AACrE,gFAAgF;AAChF,2DAA2D;AAC3D,MAAM,CAAC,MAAM,yBAAyB,GAAG,YAAY,CAAA;AAErD,SAAS,QAAQ,CAAC,KAAc;IAC9B,OAAO,KAAK,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC;QAChE,CAAC,CAAE,KAAiC;QACpC,CAAC,CAAC,SAAS,CAAA;AACf,CAAC;AAED,SAAS,WAAW,CAAC,OAAwB;IAC3C,OAAO,OAAO,OAAO,CAAC,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAA;AAC7D,CAAC;AAED,SAAS,yBAAyB,CAAC,SAA4B;IAC7D,OAAO,KAAK,CAAC,OAAO,CAAC,SAAS,CAAC,kBAAkB,CAAC;QAChD,CAAC,CAAC,SAAS,CAAC,kBAAkB,CAAC,MAAM,CACjC,CAAC,IAAI,EAAkB,EAAE,CAAC,OAAO,IAAI,KAAK,QAAQ,CACnD;QACH,CAAC,CAAC,EAA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,EAAE,YAAY,EAAE,cAAc,CAAC,CAAA;IAClE,MAAM,CAAC,MAAM,GAAG,MAAM,CAAA;IAEtB,MAAM,UAAU,GAAG,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,UAAU,CAAC;QACjD,CAAC,CAAC,MAAM,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,SAAS,EAAkC,EAAE,CACrE,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC,CAC7B;QACH,CAAC,CAAC,EAAE,CAAA;IACN,MAAM,cAAc,GAAG,IAAI,GAAG,CAAC,UAAU,CAAC,OAAO,CAAC,uBAAuB,CAAC,CAAC,CAAA;IAC3E,IAAI,CAAC,cAAc,CAAC,GAAG,CAAC,mBAAmB,CAAC,EAAE,CAAC;QAC7C,UAAU,CAAC,IAAI,CAAC;YACd,GAAG,EAAE,kBAAkB,CAAC,UAAU,EAAE,mBAAmB,CAAC;YACxD,eAAe,EAAE,CAAC,mBAAmB,CAAC;SACvC,CAAC,CAAA;IACJ,CAAC;IACD,MAAM,CAAC,UAAU,GAAG,UAAU,CAAA;IAC9B,OAAO,MAAM,CAAA;AACf,CAAC"}
@@ -1,49 +0,0 @@
1
- import type { CompiledTransactionQueryPlan, TransactionQueryBudget } from 'orez-sync-cf-host/transaction-query';
2
- import type { ExecResult, SqlStatementMetadata, TransactionQueryFormat } from 'orez-sync-executor';
3
- export type ApplicationSqlQueryCompiler = (ast: unknown, format: TransactionQueryFormat) => CompiledTransactionQueryPlan | Promise<CompiledTransactionQueryPlan>;
4
- export type ApplicationSqlTable = Pick<SqlStatementMetadata, 'table' | 'publicTable'> & {
5
- /** capture rollback images without publishing this table to Zero clients */
6
- publish?: boolean;
7
- };
8
- export type ApplicationSqlExecResult = ExecResult;
9
- export type ApplicationSqlTransaction = {
10
- exec(sql: string, params?: readonly unknown[], metadata?: SqlStatementMetadata): Promise<ApplicationSqlExecResult>;
11
- query<Row extends Record<string, unknown> = Record<string, unknown>>(sql: string, params?: readonly unknown[]): Promise<Row[]>;
12
- queryAst<Result = unknown>(ast: unknown, format: TransactionQueryFormat, queryName?: string): Promise<Result>;
13
- registerTables(tables: readonly ApplicationSqlTable[]): Promise<void>;
14
- };
15
- export type ApplicationSqlTransactionWork<Value> = (tx: ApplicationSqlTransaction) => Value | Promise<Value>;
16
- /**
17
- * private durable object RPC protocol. the session capability is returned
18
- * before it asks for ownership. waiting retries hold no durable object state,
19
- * and a cancellation signal closes a queued session or rolls back an active
20
- * session before rejecting work.
21
- */
22
- export type ApplicationSqlSessionRpc = Disposable & {
23
- begin(): Promise<boolean>;
24
- query<Row extends Record<string, unknown> = Record<string, unknown>>(sql: string, params?: readonly unknown[]): Promise<Row[]>;
25
- exec(sql: string, params?: readonly unknown[], metadata?: SqlStatementMetadata): Promise<ApplicationSqlExecResult>;
26
- queryPlan<Result = unknown>(plan: CompiledTransactionQueryPlan, queryName?: string, queryBudget?: Partial<TransactionQueryBudget>): Promise<Result>;
27
- registerTables(tables: readonly ApplicationSqlTable[]): Promise<void>;
28
- commit(): Promise<void>;
29
- rollback(): Promise<void>;
30
- };
31
- export type ApplicationSqlRpc = {
32
- applicationSqlSession(sessionID: string): Promise<ApplicationSqlSessionRpc>;
33
- };
34
- export type ApplicationSqlDurableObjectNamespace = {
35
- idFromName(name: string): unknown;
36
- get(id: unknown): ApplicationSqlRpc;
37
- };
38
- export type ApplicationSqlClient = {
39
- readonly namespace: string;
40
- query<Row extends Record<string, unknown> = Record<string, unknown>>(sql: string, params?: readonly unknown[]): Promise<Row[]>;
41
- exec(sql: string, params?: readonly unknown[], metadata?: SqlStatementMetadata): Promise<ApplicationSqlExecResult>;
42
- registerTables(tables: readonly ApplicationSqlTable[]): Promise<void>;
43
- transaction<Value>(compileQuery: ApplicationSqlQueryCompiler, work: ApplicationSqlTransactionWork<Value>, queryBudget?: Partial<TransactionQueryBudget>): Promise<Value>;
44
- };
45
- export type ApplicationSqlClientOptions = {
46
- signal?: AbortSignal;
47
- };
48
- export declare function createApplicationSqlClient(durableObjects: ApplicationSqlDurableObjectNamespace, namespace: string, options?: ApplicationSqlClientOptions): ApplicationSqlClient;
49
- //# sourceMappingURL=application-sql.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"application-sql.d.ts","sourceRoot":"","sources":["../../src/cf-do/application-sql.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,4BAA4B,EAC5B,sBAAsB,EACvB,MAAM,qCAAqC,CAAA;AAC5C,OAAO,KAAK,EACV,UAAU,EACV,oBAAoB,EACpB,sBAAsB,EACvB,MAAM,oBAAoB,CAAA;AAE3B,MAAM,MAAM,2BAA2B,GAAG,CACxC,GAAG,EAAE,OAAO,EACZ,MAAM,EAAE,sBAAsB,KAC3B,4BAA4B,GAAG,OAAO,CAAC,4BAA4B,CAAC,CAAA;AAEzE,MAAM,MAAM,mBAAmB,GAAG,IAAI,CAAC,oBAAoB,EAAE,OAAO,GAAG,aAAa,CAAC,GAAG;IACtF,4EAA4E;IAC5E,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB,CAAA;AAED,MAAM,MAAM,wBAAwB,GAAG,UAAU,CAAA;AAEjD,MAAM,MAAM,yBAAyB,GAAG;IACtC,IAAI,CACF,GAAG,EAAE,MAAM,EACX,MAAM,CAAC,EAAE,SAAS,OAAO,EAAE,EAC3B,QAAQ,CAAC,EAAE,oBAAoB,GAC9B,OAAO,CAAC,wBAAwB,CAAC,CAAA;IACpC,KAAK,CAAC,GAAG,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EACjE,GAAG,EAAE,MAAM,EACX,MAAM,CAAC,EAAE,SAAS,OAAO,EAAE,GAC1B,OAAO,CAAC,GAAG,EAAE,CAAC,CAAA;IACjB,QAAQ,CAAC,MAAM,GAAG,OAAO,EACvB,GAAG,EAAE,OAAO,EACZ,MAAM,EAAE,sBAAsB,EAC9B,SAAS,CAAC,EAAE,MAAM,GACjB,OAA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MAAM,oCAAoC,GAAG;IACjD,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAA;IACjC,GAAG,CAAC,EAAE,EAAE,OAAO,GAAG,iBAAiB,CAAA;CACpC,CAAA;AAED,MAAM,MAAM,oBAAoB,GAAG;IACjC,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAA;IAC1B,KAAK,CAAC,GAAG,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EACjE,GAAG,EAAE,MAAM,EACX,MAAM,CAAC,EAAE,SAAS,OAAO,EAAE,GAC1B,OAAO,CAAC,GAAG,EAAE,CAAC,CAAA;IACjB,IAAI,CACF,GAAG,EAAE,MAAM,EACX,MAAM,CAAC,EAAE,SAAS,OAAO,EAAE,EAC3B,QAAQ,CAAC,EAAE,oBAAoB,GAC9B,OAAO,CAAC,wBAAwB,CAAC,CAAA;IACpC,cAAc,CAAC,MAAM,EAAE,SAAS,mBAAmB,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;IACrE,WAAW,CAAC,KAAK,EACf,YAAY,EAAE,2BAA2B,EACzC,IAAI,EAAE,6BAA6B,CAAC,KAAK,CAAC,EAC1C,WAAW,CAAC,EAAE,OAAO,CAAC,sBAAsB,CAAC,GAC5C,OAAO,CAAC,KAAK,CAAC,CAAA;CAClB,CAAA;AAED,MAAM,MAAM,2BAA2B,GAAG;IACxC,MAAM,CAAC,EAAE,WAAW,CAAA;CACrB,CAAA;AA2CD,wBAAgB,0BAA0B,CACxC,cAAc,EAAE,oCAAoC,EACpD,SAAS,EAAE,MAAM,EACjB,OAAO,GAAE,2BAAgC,GACxC,oBAAoB,CAgCtB"}
@@ -1,124 +0,0 @@
1
- var __addDisposableResource = (this && this.__addDisposableResource) || function (env, value, async) {
2
- if (value !== null && value !== void 0) {
3
- if (typeof value !== "object" && typeof value !== "function") throw new TypeError("Object expected.");
4
- var dispose, inner;
5
- if (async) {
6
- if (!Symbol.asyncDispose) throw new TypeError("Symbol.asyncDispose is not defined.");
7
- dispose = value[Symbol.asyncDispose];
8
- }
9
- if (dispose === void 0) {
10
- if (!Symbol.dispose) throw new TypeError("Symbol.dispose is not defined.");
11
- dispose = value[Symbol.dispose];
12
- if (async) inner = dispose;
13
- }
14
- if (typeof dispose !== "function") throw new TypeError("Object not disposable.");
15
- if (inner) dispose = function() { try { inner.call(this); } catch (e) { return Promise.reject(e); } };
16
- env.stack.push({ value: value, dispose: dispose, async: async });
17
- }
18
- else if (async) {
19
- env.stack.push({ async: true });
20
- }
21
- return value;
22
- };
23
- var __disposeResources = (this && this.__disposeResources) || (function (SuppressedError) {
24
- return function (env) {
25
- function fail(e) {
26
- env.error = env.hasError ? new SuppressedError(e, env.error, "An error was suppressed during disposal.") : e;
27
- env.hasError = true;
28
- }
29
- var r, s = 0;
30
- function next() {
31
- while (r = env.stack.pop()) {
32
- try {
33
- if (!r.async && s === 1) return s = 0, env.stack.push(r), Promise.resolve().then(next);
34
- if (r.dispose) {
35
- var result = r.dispose.call(r.value);
36
- if (r.async) return s |= 2, Promise.resolve(result).then(next, function(e) { fail(e); return next(); });
37
- }
38
- else s |= 1;
39
- }
40
- catch (e) {
41
- fail(e);
42
- }
43
- }
44
- if (s === 1) return env.hasError ? Promise.reject(env.error) : Promise.resolve();
45
- if (env.hasError) throw env.error;
46
- }
47
- return next();
48
- };
49
- })(typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
50
- var e = new Error(message);
51
- return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
52
- });
53
- async function withApplicationSqlSession(target, signal, work) {
54
- const env_1 = { stack: [], error: void 0, hasError: false };
55
- try {
56
- const session = __addDisposableResource(env_1, await target.applicationSqlSession(crypto.randomUUID()), false);
57
- let rejectAbort;
58
- const aborted = signal
59
- ? new Promise((_resolve, reject) => {
60
- rejectAbort = reject;
61
- })
62
- : undefined;
63
- void aborted?.catch(() => { });
64
- const abort = () => {
65
- rejectAbort?.(signal?.reason ??
66
- new DOMException('application SQLite request was canceled', 'AbortError'));
67
- };
68
- signal?.addEventListener('abort', abort, { once: true });
69
- try {
70
- signal?.throwIfAborted();
71
- while (!(await session.begin())) {
72
- await new Promise((resolve) => setTimeout(resolve, 25));
73
- signal?.throwIfAborted();
74
- }
75
- const pendingWork = work(session);
76
- const value = aborted
77
- ? await Promise.race([Promise.resolve(pendingWork), aborted])
78
- : await pendingWork;
79
- signal?.throwIfAborted();
80
- await session.commit();
81
- return value;
82
- }
83
- catch (error) {
84
- await session.rollback().catch(() => { });
85
- throw error;
86
- }
87
- finally {
88
- signal?.removeEventListener('abort', abort);
89
- }
90
- }
91
- catch (e_1) {
92
- env_1.error = e_1;
93
- env_1.hasError = true;
94
- }
95
- finally {
96
- __disposeResources(env_1);
97
- }
98
- }
99
- export function createApplicationSqlClient(durableObjects, namespace, options = {}) {
100
- if (!namespace)
101
- throw new TypeError('application SQLite namespace is required');
102
- const target = durableObjects.get(durableObjects.idFromName(namespace));
103
- return {
104
- namespace,
105
- query: (sql, params = []) => withApplicationSqlSession(target, options.signal, (session) => session.query(sql, params)),
106
- exec: (sql, params = [], metadata) => withApplicationSqlSession(target, options.signal, (session) => session.exec(sql, params, metadata)),
107
- registerTables: (tables) => withApplicationSqlSession(target, options.signal, (session) => session.registerTables(tables)),
108
- async transaction(compileQuery, work, queryBudget) {
109
- return withApplicationSqlSession(target, options.signal, async (session) => {
110
- const tx = {
111
- exec: (sql, params = [], metadata) => session.exec(sql, params, metadata),
112
- query: (sql, params = []) => session.query(sql, params),
113
- async queryAst(ast, format, queryName) {
114
- const plan = await compileQuery(ast, format);
115
- return session.queryPlan(plan, queryName, queryBudget);
116
- },
117
- registerTables: (tables) => session.registerTables(tables),
118
- };
119
- return work(tx);
120
- });
121
- },
122
- };
123
- }
124
- //# sourceMappingURL=application-sql.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"application-sql.js","sourceRoot":"","sources":["../../src/cf-do/application-s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AE,OAAO,CAAC,MAAM,EAAE,CAAC,OAAO,EAAE,EAAE,CAC5D,OAAO,CAAC,cAAc,CAAC,MAAM,CAAC,CAC/B;QACH,KAAK,CAAC,WAAW,CAAC,YAAY,EAAE,IAAI,EAAE,WAAW;YAC/C,OAAO,yBAAyB,CAAC,MAAM,EAAE,OAAO,CAAC,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE;gBACzE,MAAM,EAAE,GAA8B;oBACpC,IAAI,EAAE,CAAC,GAAG,EAAE,MAAM,GAAG,EAAE,EAAE,QAAQ,EAAE,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,GAAG,EAAE,MAAM,EAAE,QAAQ,CAAC;oBACzE,KAAK,EAAE,CAAC,GAAG,EAAE,MAAM,GAAG,EAAE,EAAE,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,GAAG,EAAE,MAAM,CAAC;oBACvD,KAAK,CAAC,QAAQ,CAAC,GAAG,EAAE,MAAM,EAAE,SAAS;wBACnC,MAAM,IAAI,GAAG,MAAM,YAAY,CAAC,GAAG,EAAE,MAAM,CAAC,CAAA;wBAC5C,OAAO,OAAO,CAAC,SAAS,CAAC,IAAI,EAAE,SAAS,EAAE,WAAW,CAAC,CAAA;oBACxD,CAAC;oBACD,cAAc,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,OAAO,CAAC,cAAc,CAAC,MAAM,CAAC;iBAC3D,CAAA;gBACD,OAAO,IAAI,CAAC,EAAE,CAAC,CAAA;YACjB,CAAC,CAAC,CAAA;QACJ,CAAC;KACF,CAAA;AACH,CAAC"}
@@ -1,155 +0,0 @@
1
- import type { DurableSqlStorage } from './watermark.js';
2
- /** Bump whenever the generated trigger bodies or buffer shape change. */
3
- export declare const CDC_SCHEMA_VERSION = 2;
4
- export interface CdcTableRegistration {
5
- /** Physical, flattened SQLite table name. */
6
- physicalTableName: string;
7
- /** Schema-qualified identity exposed in `_zero_changes`. */
8
- tableName: string;
9
- /** Optional known column list. The live SQLite schema remains authoritative. */
10
- columns?: string[];
11
- /** False captures before/after images for transaction rollback only. */
12
- publish?: boolean;
13
- }
14
- /**
15
- * A row image in storage-journal form: one tagged string per column, carrying
16
- * the value's SQLite storage class and an exact, lossless payload. This is the
17
- * undo encoding, deliberately separate from the Zero wire encoding that
18
- * `journalToWire` derives.
19
- */
20
- export type JournalRecord = Record<string, string>;
21
- export interface CapturedRowChange {
22
- physicalTableName: string;
23
- tableName: string;
24
- op: 'INSERT' | 'UPDATE' | 'DELETE';
25
- /** Zero wire image (JSON-safe; blobs as postgres bytea text). */
26
- rowData: Record<string, unknown> | null;
27
- oldData: Record<string, unknown> | null;
28
- /** Lossless storage-journal image used only for undo. */
29
- rowJournal: JournalRecord | null;
30
- oldJournal: JournalRecord | null;
31
- /** Exact decimal rowid text, or null for WITHOUT ROWID tables. */
32
- newRowid: string | null;
33
- oldRowid: string | null;
34
- /** Omitted for normal published changes; false means rollback-only. */
35
- publish?: boolean;
36
- }
37
- export interface SuspendedCdcTable {
38
- physicalTableName: string;
39
- tableName: string;
40
- publish?: boolean;
41
- }
42
- /** Stable-identity and writability metadata read from the live SQLite schema. */
43
- export interface TableIdentity {
44
- /** rowid alias usable in SQL, or null for a WITHOUT ROWID table. */
45
- rowidAlias: string | null;
46
- /** The INTEGER PRIMARY KEY column, which *is* the rowid, when one exists. */
47
- rowidColumn: string | null;
48
- /** Declared primary-key columns in key order. */
49
- keyColumns: string[];
50
- /** Columns undo may write. Excludes generated columns. */
51
- writableColumns: string[];
52
- /** Every column captured in a row image, generated columns included. */
53
- columns: string[];
54
- }
55
- /**
56
- * Rebuild the exact SQLite value for an undo statement. Integers and reals go
57
- * back through CAST so the full int64 range and every double survive without
58
- * depending on the driver's numeric binding.
59
- */
60
- export declare function journalValueSqlBinding(encoded: string): {
61
- expr: string;
62
- params: unknown[];
63
- };
64
- export declare function parseJournalRecord(value: unknown): JournalRecord | null;
65
- /**
66
- * Read stable-identity metadata from the live schema. Returns null when the
67
- * table cannot be undone row-by-row (no rowid and no primary key), which keeps
68
- * capture off it entirely so the caller falls back to table snapshots.
69
- */
70
- export declare function tableIdentity(sql: DurableSqlStorage, table: string): TableIdentity | null;
71
- export interface TriggerDefinition {
72
- name: string;
73
- sql: string;
74
- }
75
- /**
76
- * Drop every trigger on these tables and return their definitions.
77
- *
78
- * A restore must not fire the table's own business triggers. Undoing an INSERT
79
- * with a DELETE would run its AFTER DELETE trigger and write side effects the
80
- * original transaction never made, and if that side effect lands on a captured
81
- * table, its CDC trigger stages a phantom change on top. Dropping only the
82
- * generated CDC triggers leaves both holes open, so every trigger goes.
83
- */
84
- export declare function suspendTriggers(sql: DurableSqlStorage, tables: Iterable<string>): TriggerDefinition[];
85
- /** Recreate triggers suspended for a restore, verbatim. */
86
- export declare function restoreTriggers(sql: DurableSqlStorage, triggers: TriggerDefinition[]): void;
87
- /** The columns a restore is allowed to write. Empty when the table is gone. */
88
- export declare function writableColumns(sql: DurableSqlStorage, table: string): string[];
89
- /**
90
- * Return physical tables whose SQLite schema may be changed by this statement.
91
- * The DO compiler emits one SQLite DDL statement at a time and quotes physical
92
- * names, but accepting every SQLite identifier form also covers direct /exec
93
- * callers and keeps CDC independent of the compiler.
94
- */
95
- export declare function schemaChangeTargets(sql: string): string[];
96
- /**
97
- * Transactional logical-row capture for the authoritative SQLite database.
98
- *
99
- * Generated AFTER triggers write full before/after row images to a staging
100
- * table in the same SQLite statement as the application write. The owner
101
- * drains that staging table before its storage transaction returns and moves
102
- * the rows to either `_zero_changes` or `_zero_pending_changes`. Consequently
103
- * a failed statement or storage transaction cannot leave an orphaned change.
104
- *
105
- * Every mutator of the in-memory registration cache runs inside the owner's
106
- * storage transaction, so the cache can outlive an abort that rolled its SQLite
107
- * side back. `reload()` re-derives the whole cache from SQLite and MUST be
108
- * called on any aborted transaction; see `atomically` in worker.ts.
109
- */
110
- export declare class TransactionalCdc {
111
- #private;
112
- private readonly sql;
113
- constructor(sql: DurableSqlStorage);
114
- get active(): boolean;
115
- /** Force the next per-table ensure to re-read SQLite's live schema. */
116
- invalidateSchema(): void;
117
- /**
118
- * Re-derive every cached decision from SQLite. Called after an aborted
119
- * storage transaction, where SQLite rolled back the trigger and metadata
120
- * writes but this object still remembers making them. Without it a table can
121
- * stay "registered and verified" in memory with no trigger on disk, and every
122
- * later write to it is silently uncaptured.
123
- */
124
- reload(): void;
125
- private loadRegistrations;
126
- private ensureTables;
127
- private tableExists;
128
- private triggersExist;
129
- private registered;
130
- capturesTable(tableName: string): boolean;
131
- /** True when a DDL statement must atomically suspend and rebuild CDC triggers. */
132
- capturesSchemaChange(sql: string): boolean;
133
- private dropTriggers;
134
- /**
135
- * Drop generated triggers before SQLite rewrites a captured table. SQLite
136
- * refuses DROP/RENAME COLUMN while any trigger still references the old row
137
- * shape. The caller must run this, the DDL, and finishSchemaChange in one
138
- * storage transaction so capture is never observably disabled.
139
- */
140
- beginSchemaChange(sql: string): SuspendedCdcTable[];
141
- /** Re-introspect changed tables and rebuild their triggers from the live shape. */
142
- finishSchemaChange(suspended: SuspendedCdcTable[]): void;
143
- private installTriggers;
144
- /**
145
- * Ensure one table is captured. Returns false when the table does not exist
146
- * or cannot be undone row-by-row, which leaves the caller on its table
147
- * snapshot path rather than capturing changes it could never roll back.
148
- */
149
- ensureTable(registration: CdcTableRegistration, refresh?: boolean): boolean;
150
- /** Replace the captured-table set with the caller's authoritative list. */
151
- syncTables(registrations: CdcTableRegistration[]): void;
152
- /** Drain all changes captured by the just-completed SQLite statement. */
153
- drain(): CapturedRowChange[];
154
- }
155
- //# sourceMappingURL=cdc.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"cdc.d.ts","sourceRoot":"","sources":["../../src/cf-do/cdc.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAA;AAEvD,yEAAyE;AACzE,eAAO,MAAM,kBAAkB,IAAI,CAAA;AAgBnC,MAAM,WAAW,oBAAoB;IACnC,6CAA6C;IAC7C,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