orez-lite 0.9.7

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 (190) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +12 -0
  3. package/dist/browser/generated/sqlite3-browser.wasm +0 -0
  4. package/dist/browser/generated/sync_wasm.js +922 -0
  5. package/dist/browser/generated/sync_wasm_bg.wasm +0 -0
  6. package/dist/browser/host.d.ts +10 -0
  7. package/dist/browser/host.d.ts.map +1 -0
  8. package/dist/browser/host.js +496 -0
  9. package/dist/browser/host.js.map +1 -0
  10. package/dist/browser/idb-snapshot.d.ts +11 -0
  11. package/dist/browser/idb-snapshot.d.ts.map +1 -0
  12. package/dist/browser/idb-snapshot.js +122 -0
  13. package/dist/browser/idb-snapshot.js.map +1 -0
  14. package/dist/browser/index.d.ts +5 -0
  15. package/dist/browser/index.d.ts.map +1 -0
  16. package/dist/browser/index.js +5 -0
  17. package/dist/browser/index.js.map +1 -0
  18. package/dist/browser/message-port.d.ts +7 -0
  19. package/dist/browser/message-port.d.ts.map +1 -0
  20. package/dist/browser/message-port.js +188 -0
  21. package/dist/browser/message-port.js.map +1 -0
  22. package/dist/browser/sqlite-adapter.d.ts +53 -0
  23. package/dist/browser/sqlite-adapter.d.ts.map +1 -0
  24. package/dist/browser/sqlite-adapter.js +126 -0
  25. package/dist/browser/sqlite-adapter.js.map +1 -0
  26. package/dist/browser/types.d.ts +52 -0
  27. package/dist/browser/types.d.ts.map +1 -0
  28. package/dist/browser/types.js +2 -0
  29. package/dist/browser/types.js.map +1 -0
  30. package/dist/cf-deploy/bundle.d.ts +18 -0
  31. package/dist/cf-deploy/bundle.d.ts.map +1 -0
  32. package/dist/cf-deploy/bundle.js +273 -0
  33. package/dist/cf-deploy/bundle.js.map +1 -0
  34. package/dist/cf-deploy/config.d.ts +12 -0
  35. package/dist/cf-deploy/config.d.ts.map +1 -0
  36. package/dist/cf-deploy/config.js +11 -0
  37. package/dist/cf-deploy/config.js.map +1 -0
  38. package/dist/cf-deploy/index.d.ts +10 -0
  39. package/dist/cf-deploy/index.d.ts.map +1 -0
  40. package/dist/cf-deploy/index.js +12 -0
  41. package/dist/cf-deploy/index.js.map +1 -0
  42. package/dist/cf-deploy/leaves.d.ts +8 -0
  43. package/dist/cf-deploy/leaves.d.ts.map +1 -0
  44. package/dist/cf-deploy/leaves.js +66 -0
  45. package/dist/cf-deploy/leaves.js.map +1 -0
  46. package/dist/cf-deploy/migration.d.ts +27 -0
  47. package/dist/cf-deploy/migration.d.ts.map +1 -0
  48. package/dist/cf-deploy/migration.js +734 -0
  49. package/dist/cf-deploy/migration.js.map +1 -0
  50. package/dist/cf-deploy/nativeMigrations.d.ts +24 -0
  51. package/dist/cf-deploy/nativeMigrations.d.ts.map +1 -0
  52. package/dist/cf-deploy/nativeMigrations.js +185 -0
  53. package/dist/cf-deploy/nativeMigrations.js.map +1 -0
  54. package/dist/cf-deploy/prune.d.ts +14 -0
  55. package/dist/cf-deploy/prune.d.ts.map +1 -0
  56. package/dist/cf-deploy/prune.js +235 -0
  57. package/dist/cf-deploy/prune.js.map +1 -0
  58. package/dist/cf-deploy/readiness.d.ts +11 -0
  59. package/dist/cf-deploy/readiness.d.ts.map +1 -0
  60. package/dist/cf-deploy/readiness.js +56 -0
  61. package/dist/cf-deploy/readiness.js.map +1 -0
  62. package/dist/cf-deploy/sources.d.ts +3 -0
  63. package/dist/cf-deploy/sources.d.ts.map +1 -0
  64. package/dist/cf-deploy/sources.js +24 -0
  65. package/dist/cf-deploy/sources.js.map +1 -0
  66. package/dist/cf-deploy/wrangler.d.ts +9 -0
  67. package/dist/cf-deploy/wrangler.d.ts.map +1 -0
  68. package/dist/cf-deploy/wrangler.js +48 -0
  69. package/dist/cf-deploy/wrangler.js.map +1 -0
  70. package/dist/cf-do/application-sql.d.ts +49 -0
  71. package/dist/cf-do/application-sql.d.ts.map +1 -0
  72. package/dist/cf-do/application-sql.js +124 -0
  73. package/dist/cf-do/application-sql.js.map +1 -0
  74. package/dist/cf-do/cdc.d.ts +155 -0
  75. package/dist/cf-do/cdc.d.ts.map +1 -0
  76. package/dist/cf-do/cdc.js +723 -0
  77. package/dist/cf-do/cdc.js.map +1 -0
  78. package/dist/cf-do/cursor-pull.d.ts +27 -0
  79. package/dist/cf-do/cursor-pull.d.ts.map +1 -0
  80. package/dist/cf-do/cursor-pull.js +78 -0
  81. package/dist/cf-do/cursor-pull.js.map +1 -0
  82. package/dist/cf-do/lite-data-worker.d.ts +171 -0
  83. package/dist/cf-do/lite-data-worker.d.ts.map +1 -0
  84. package/dist/cf-do/lite-data-worker.js +685 -0
  85. package/dist/cf-do/lite-data-worker.js.map +1 -0
  86. package/dist/cf-do/namespace-backup.d.ts +85 -0
  87. package/dist/cf-do/namespace-backup.d.ts.map +1 -0
  88. package/dist/cf-do/namespace-backup.js +470 -0
  89. package/dist/cf-do/namespace-backup.js.map +1 -0
  90. package/dist/cf-do/row-undo.d.ts +36 -0
  91. package/dist/cf-do/row-undo.d.ts.map +1 -0
  92. package/dist/cf-do/row-undo.js +221 -0
  93. package/dist/cf-do/row-undo.js.map +1 -0
  94. package/dist/cf-do/tx-journal.d.ts +118 -0
  95. package/dist/cf-do/tx-journal.d.ts.map +1 -0
  96. package/dist/cf-do/tx-journal.js +717 -0
  97. package/dist/cf-do/tx-journal.js.map +1 -0
  98. package/dist/cf-do/watermark.d.ts +29 -0
  99. package/dist/cf-do/watermark.d.ts.map +1 -0
  100. package/dist/cf-do/watermark.js +105 -0
  101. package/dist/cf-do/watermark.js.map +1 -0
  102. package/dist/cf-do/worker.d.ts +282 -0
  103. package/dist/cf-do/worker.d.ts.map +1 -0
  104. package/dist/cf-do/worker.js +1999 -0
  105. package/dist/cf-do/worker.js.map +1 -0
  106. package/dist/client.d.ts +2 -0
  107. package/dist/client.d.ts.map +1 -0
  108. package/dist/client.js +2 -0
  109. package/dist/client.js.map +1 -0
  110. package/dist/cloudflare-build.d.ts +9 -0
  111. package/dist/cloudflare-build.d.ts.map +1 -0
  112. package/dist/cloudflare-build.js +9 -0
  113. package/dist/cloudflare-build.js.map +1 -0
  114. package/dist/cloudflare-bun-wasm-loader.d.ts +2 -0
  115. package/dist/cloudflare-bun-wasm-loader.d.ts.map +1 -0
  116. package/dist/cloudflare-bun-wasm-loader.js +2 -0
  117. package/dist/cloudflare-bun-wasm-loader.js.map +1 -0
  118. package/dist/cloudflare-query-compiler.d.ts +2 -0
  119. package/dist/cloudflare-query-compiler.d.ts.map +1 -0
  120. package/dist/cloudflare-query-compiler.js +2 -0
  121. package/dist/cloudflare-query-compiler.js.map +1 -0
  122. package/dist/cloudflare-runtime.d.ts +15 -0
  123. package/dist/cloudflare-runtime.d.ts.map +1 -0
  124. package/dist/cloudflare-runtime.js +11 -0
  125. package/dist/cloudflare-runtime.js.map +1 -0
  126. package/dist/cloudflare-sync.d.ts +3 -0
  127. package/dist/cloudflare-sync.d.ts.map +1 -0
  128. package/dist/cloudflare-sync.js +3 -0
  129. package/dist/cloudflare-sync.js.map +1 -0
  130. package/dist/cloudflare-transaction-query.d.ts +2 -0
  131. package/dist/cloudflare-transaction-query.d.ts.map +1 -0
  132. package/dist/cloudflare-transaction-query.js +2 -0
  133. package/dist/cloudflare-transaction-query.js.map +1 -0
  134. package/dist/cloudflare-vite-wasm-loader.d.ts +2 -0
  135. package/dist/cloudflare-vite-wasm-loader.d.ts.map +1 -0
  136. package/dist/cloudflare-vite-wasm-loader.js +2 -0
  137. package/dist/cloudflare-vite-wasm-loader.js.map +1 -0
  138. package/dist/cloudflare.d.ts +3 -0
  139. package/dist/cloudflare.d.ts.map +1 -0
  140. package/dist/cloudflare.js +3 -0
  141. package/dist/cloudflare.js.map +1 -0
  142. package/dist/do-sql-tracking.d.ts +114 -0
  143. package/dist/do-sql-tracking.d.ts.map +1 -0
  144. package/dist/do-sql-tracking.js +280 -0
  145. package/dist/do-sql-tracking.js.map +1 -0
  146. package/dist/index.d.ts +4 -0
  147. package/dist/index.d.ts.map +1 -0
  148. package/dist/index.js +3 -0
  149. package/dist/index.js.map +1 -0
  150. package/dist/wake.d.ts +22 -0
  151. package/dist/wake.d.ts.map +1 -0
  152. package/dist/wake.js +114 -0
  153. package/dist/wake.js.map +1 -0
  154. package/dist/worker/cf-do-shim.d.ts +53 -0
  155. package/dist/worker/cf-do-shim.d.ts.map +1 -0
  156. package/dist/worker/cf-do-shim.js +66 -0
  157. package/dist/worker/cf-do-shim.js.map +1 -0
  158. package/dist/zero-http/encrypted-column-codec.d.ts +46 -0
  159. package/dist/zero-http/encrypted-column-codec.d.ts.map +1 -0
  160. package/dist/zero-http/encrypted-column-codec.js +676 -0
  161. package/dist/zero-http/encrypted-column-codec.js.map +1 -0
  162. package/dist/zero-http/encrypted-column-conformance.d.ts +7 -0
  163. package/dist/zero-http/encrypted-column-conformance.d.ts.map +1 -0
  164. package/dist/zero-http/encrypted-column-conformance.js +161 -0
  165. package/dist/zero-http/encrypted-column-conformance.js.map +1 -0
  166. package/dist/zero-http/fixture-schema.d.ts +127 -0
  167. package/dist/zero-http/fixture-schema.d.ts.map +1 -0
  168. package/dist/zero-http/fixture-schema.js +56 -0
  169. package/dist/zero-http/fixture-schema.js.map +1 -0
  170. package/dist/zero-http/mount.d.ts +71 -0
  171. package/dist/zero-http/mount.d.ts.map +1 -0
  172. package/dist/zero-http/mount.js +594 -0
  173. package/dist/zero-http/mount.js.map +1 -0
  174. package/dist/zero-http/payload-codec.d.ts +91 -0
  175. package/dist/zero-http/payload-codec.d.ts.map +1 -0
  176. package/dist/zero-http/payload-codec.js +10 -0
  177. package/dist/zero-http/payload-codec.js.map +1 -0
  178. package/dist/zero-http/server.d.ts +16 -0
  179. package/dist/zero-http/server.d.ts.map +1 -0
  180. package/dist/zero-http/server.js +270 -0
  181. package/dist/zero-http/server.js.map +1 -0
  182. package/dist/zero-http/test-harness.d.ts +32 -0
  183. package/dist/zero-http/test-harness.d.ts.map +1 -0
  184. package/dist/zero-http/test-harness.js +77 -0
  185. package/dist/zero-http/test-harness.js.map +1 -0
  186. package/dist/zero-http/transport.d.ts +71 -0
  187. package/dist/zero-http/transport.d.ts.map +1 -0
  188. package/dist/zero-http/transport.js +1106 -0
  189. package/dist/zero-http/transport.js.map +1 -0
  190. package/package.json +116 -0
@@ -0,0 +1,18 @@
1
+ import { type Plugin } from 'esbuild';
2
+ import type { CloudflareConfig } from './config.js';
3
+ import type { WorkerChunkPruneSignatures } from './prune.js';
4
+ export interface BundleCloudflareWorkerOptions {
5
+ workerDir: string;
6
+ entryPoint: string;
7
+ outfile: string;
8
+ writeMigrationModule: (workerDir: string) => Promise<string>;
9
+ chunkPruneSignatures?: WorkerChunkPruneSignatures;
10
+ define?: Readonly<Record<string, string>>;
11
+ }
12
+ export declare const SERVER_CONTEXT_STUBS: Record<string, string>;
13
+ export declare function orezLiteAliasPlugin(cfg: CloudflareConfig, aliases: Record<string, string>, resolveDir: string, nodeModulesPath: string, wasmOutDir?: string): Plugin;
14
+ /** bundle a One app with SQL storage but without the zero-cache runtime. */
15
+ export declare function bundleCloudflareLiteAppWorker(cfg: CloudflareConfig, options: BundleCloudflareWorkerOptions): Promise<void>;
16
+ /** Bundle a data worker that owns the authoritative SQLite Durable Object. */
17
+ export declare function bundleCloudflareLiteDataWorker(cfg: CloudflareConfig, options: BundleCloudflareWorkerOptions): Promise<void>;
18
+ //# sourceMappingURL=bundle.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bundle.d.ts","sourceRoot":"","sources":["../../src/cf-deploy/bundle.ts"],"names":[],"mappings":"AAYA,OAAO,EAAS,KAAK,MAAM,EAAE,MAAM,SAAS,CAAA;AAW5C,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAA;AACnD,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,YAAY,CAAA;AAE5D,MAAM,WAAW,6BAA6B;IAC5C,SAAS,EAAE,MAAM,CAAA;IACjB,UAAU,EAAE,MAAM,CAAA;IAClB,OAAO,EAAE,MAAM,CAAA;IACf,oBAAoB,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,CAAC,CAAA;IAC5D,oBAAoB,CAAC,EAAE,0BAA0B,CAAA;IACjD,MAAM,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAA;CAC1C;AAWD,eAAO,MAAM,oBAAoB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAEvD,CAAA;AAED,wBAAgB,mBAAmB,CACjC,GAAG,EAAE,gBAAgB,EACrB,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EAC/B,UAAU,EAAE,MAAM,EAClB,eAAe,EAAE,MAAM,EACvB,UAAU,SAAa,GACtB,MAAM,CAmHR;AAED,4EAA4E;AAC5E,wBAAsB,6BAA6B,CACjD,GAAG,EAAE,gBAAgB,EACrB,OAAO,EAAE,6BAA6B,iBAcvC;AA0HD,8EAA8E;AAC9E,wBAAsB,8BAA8B,CAClD,GAAG,EAAE,gBAAgB,EACrB,OAAO,EAAE,6BAA6B,iBAwCvC"}
@@ -0,0 +1,273 @@
1
+ import { copyFileSync, existsSync, readFileSync, readdirSync, realpathSync, rmSync, writeFileSync, } from 'fs';
2
+ import { createRequire } from 'module';
3
+ import { basename, dirname, join } from 'path';
4
+ import { build } from 'esbuild';
5
+ import { NODE_EXTERNALS, isOrezLiteImporter, resolveAlias } from './leaves.js';
6
+ import { pruneUnreachableWorkerModules, shimWorkerCreateRequire } from './prune.js';
7
+ const WORKER_DEFINE = {
8
+ 'process.env.NODE_ENV': '"development"',
9
+ 'process.env.SINGLE_PROCESS': '"1"',
10
+ 'process.versions.node': '"20.0.0"',
11
+ };
12
+ // react's build-context marker packages, resolved for the SERVER context these
13
+ // workers are. 'server-only' ships a throwing default entry (its guard targets
14
+ // client bundles); under this bundle's [workerd, worker, import] conditions it
15
+ // resolves to that throw and kills any importing module at init — in prod this
16
+ // took out the data-worker push handler for every custom mutator (2026-07-09).
17
+ // the DO/data worker is a server context, so the marker must be a no-op here.
18
+ // unlike the generic aliases below, these apply to EVERY importer (consumer
19
+ // code, not just orez internals). scripts/check/zero-push-graph.ts asserts this
20
+ // map covers any marker package the push graph imports.
21
+ export const SERVER_CONTEXT_STUBS = {
22
+ 'server-only': 'export {}\n',
23
+ };
24
+ export function orezLiteAliasPlugin(cfg, aliases, resolveDir, nodeModulesPath, wasmOutDir = resolveDir) {
25
+ const entries = Object.entries(aliases);
26
+ const utilVirtualModule = 'export function promisify(fn) { return fn }\nexport function inspect(value) { try { return JSON.stringify(value) } catch { return String(value) } }\nexport function format(...args) { return args.map((arg) => typeof arg === "string" ? arg : inspect(arg)).join(" ") }\nexport function stripVTControlCharacters(value) { return value }\nexport function styleText(_format, text) { return text }\nexport function inherits(ctor, superCtor) { ctor.prototype = Object.create(superCtor.prototype); ctor.prototype.constructor = ctor }\nexport function deprecate(fn) { return fn }\nexport const types = { isDate: (value) => value instanceof Date, isRegExp: (value) => value instanceof RegExp, isTypedArray: (value) => ArrayBuffer.isView(value) && !(value instanceof DataView), isProxy: () => false }\nexport default { promisify, inspect, format, stripVTControlCharacters, styleText, inherits, deprecate, types }\n';
27
+ const eventsVirtualModule = 'export class EventEmitter { constructor() { this._events = new Map() } on(event, listener) { const list = this._events.get(event) || []; list.push(listener); this._events.set(event, list); return this } once(event, listener) { const wrapped = (...args) => { this.off(event, wrapped); listener(...args) }; return this.on(event, wrapped) } off(event, listener) { const list = this._events.get(event); if (list) this._events.set(event, list.filter((item) => item !== listener)); return this } removeListener(event, listener) { return this.off(event, listener) } removeAllListeners(event) { if (event === undefined) this._events.clear(); else this._events.delete(event); return this } emit(event, ...args) { for (const listener of this._events.get(event) || []) listener(...args); return true } }\nexport default EventEmitter\n';
28
+ const fsVirtualModule = 'const missing = () => new Error("filesystem is not available in Cloudflare Workers")\nexport function existsSync() { return false }\nexport function readFileSync() { return "" }\nexport function writeFileSync() {}\nexport function mkdirSync() {}\nexport function rmSync() {}\nexport function statSync() { return { size: 0, mode: 0, isFile: () => false, isDirectory: () => false } }\nexport function stat(_path, callback) { const error = missing(); if (callback) { queueMicrotask(() => callback(error)); return } return Promise.reject(error) }\nexport function createReadStream() { return { on() { return this }, once() { return this }, pipe(target) { return target }, destroy() {} } }\nexport function readFile() { return Promise.resolve("") }\nexport function writeFile() { return Promise.resolve() }\nexport function mkdir() { return Promise.resolve() }\nexport function mkdtemp(prefix = "") { return Promise.resolve(`${prefix}stub`) }\nexport function rm() { return Promise.resolve() }\nexport function access() { return Promise.reject(missing()) }\nexport const promises = { readFile, writeFile, mkdir, mkdtemp, rm, stat: () => Promise.reject(missing()), access }\nexport default { existsSync, readFileSync, writeFileSync, mkdirSync, rmSync, statSync, stat, createReadStream, readFile, writeFile, mkdir, mkdtemp, rm, access, promises }\n';
29
+ const pathVirtualModule = 'export const sep = "/"\nfunction normalizePath(path) { const absolute = String(path).startsWith("/"); const parts = []; for (const part of String(path).split("/")) { if (!part || part === ".") continue; if (part === "..") parts.pop(); else parts.push(part) } const normalized = parts.join("/"); return `${absolute ? "/" : ""}${normalized}` || (absolute ? "/" : ".") }\nexport const normalize = normalizePath\nexport function join(...parts) { return normalizePath(parts.filter(Boolean).join("/")) }\nexport function resolve(...parts) { const joined = parts.filter(Boolean).join("/"); return normalizePath(joined.startsWith("/") ? joined : `/${joined}`) }\nexport function basename(path) { const normalized = normalizePath(path); return normalized === "/" ? "" : normalized.split("/").pop() || "" }\nexport function dirname(path) { const normalized = normalizePath(path); if (normalized === "/") return "/"; const parts = normalized.split("/"); parts.pop(); return parts.join("/") || (normalized.startsWith("/") ? "/" : ".") }\nexport function relative(_from, to) { return normalizePath(to) }\nexport function extname(path) { const base = basename(path); const dot = base.lastIndexOf("."); return dot > 0 ? base.slice(dot) : "" }\nexport default { sep, normalize, join, resolve, basename, dirname, relative, extname }\n';
30
+ const bufferVirtualModule = 'export const Buffer = globalThis.Buffer\nexport default { Buffer }\n';
31
+ const virtualModules = {
32
+ buffer: bufferVirtualModule,
33
+ 'node:buffer': bufferVirtualModule,
34
+ util: utilVirtualModule,
35
+ 'node:util': utilVirtualModule,
36
+ events: eventsVirtualModule,
37
+ 'node:events': eventsVirtualModule,
38
+ fs: fsVirtualModule,
39
+ 'node:fs': fsVirtualModule,
40
+ 'fs/promises': fsVirtualModule,
41
+ 'node:fs/promises': fsVirtualModule,
42
+ path: pathVirtualModule,
43
+ 'node:path': pathVirtualModule,
44
+ '@dotenvx/dotenvx': 'const empty = { parsed: {}, error: undefined }\nexport function config() { return empty }\nexport function configDotenv() { return empty }\nexport function parse() { return {} }\nexport function populate(target, source = {}) { if (target && source && typeof target === "object") Object.assign(target, source); return target }\nexport function decrypt() { return "" }\nexport default { config, configDotenv, parse, populate, decrypt }\n',
45
+ '@fastify/websocket': 'export default function websocket() {}\n',
46
+ '@opentelemetry/api': 'const noopSpan = { setAttribute() { return this }, setAttributes() { return this }, addEvent() { return this }, recordException() { return this }, setStatus() { return this }, end() {}, spanContext() { return {} } }\nexport const ROOT_CONTEXT = {}\nexport const SpanStatusCode = { OK: 1, ERROR: 2, UNSET: 0 }\nexport const DiagLogLevel = { NONE: 0, ERROR: 30, WARN: 50, INFO: 60, DEBUG: 70, VERBOSE: 80, ALL: 9999 }\nexport const context = { active() { return ROOT_CONTEXT }, with(_ctx, fn, thisArg, ...args) { return fn.apply(thisArg, args) }, bind(_ctx, target) { return target } }\nexport const propagation = { inject() {}, extract(_ctx) { return _ctx || ROOT_CONTEXT } }\nexport const trace = { getTracer() { return { startSpan() { return noopSpan }, startActiveSpan(_name, a, b, c) { const fn = typeof a === "function" ? a : typeof b === "function" ? b : c; return fn(noopSpan) } } }, setSpan(ctx) { return ctx }, getSpan() { return noopSpan } }\nexport const metrics = { getMeter() { return { createCounter() { return { add() {} } }, createUpDownCounter() { return { add() {} } }, createHistogram() { return { record() {} } }, createGauge() { return { record() {} } }, createObservableGauge() { return { addCallback() {} } }, createObservableCounter() { return { addCallback() {} } } } } }\nexport const diag = { setLogger() {}, debug() {}, info() {}, warn() {}, error() {}, verbose() {} }\n',
47
+ '@opentelemetry/api-logs': 'export const SeverityNumber = { TRACE: 1, DEBUG: 5, INFO: 9, WARN: 13, ERROR: 17, FATAL: 21 }\nexport const logs = { getLogger() { return { emit() {} } } }\n',
48
+ '@opentelemetry/auto-instrumentations-node': 'export function getNodeAutoInstrumentations() { return [] }\n',
49
+ '@opentelemetry/exporter-metrics-otlp-http': 'export class OTLPMetricExporter { constructor() {} }\n',
50
+ '@opentelemetry/resources': 'export function resourceFromAttributes(attributes) { return { attributes } }\n',
51
+ '@opentelemetry/sdk-metrics': 'export class MeterProvider { constructor() {} getMeter() { return { createObservableGauge() { return { addCallback() {} } }, createObservableCounter() { return { addCallback() {} } } } } async shutdown() {} }\nexport class PeriodicExportingMetricReader { constructor() {} }\n',
52
+ '@opentelemetry/sdk-node': 'export class NodeSDK { constructor() {} start() {} async shutdown() {} }\n',
53
+ '@opentelemetry/semantic-conventions': "export const ATTR_SERVICE_VERSION = 'service.version'\n",
54
+ 'chalk-template': 'export function template(strings, ...values) { return String.raw({ raw: strings }, ...values) }\nexport default template\n',
55
+ 'command-line-usage': 'export default function commandLineUsage() { return "" }\n',
56
+ 'is-in-subnet': 'export function isIPv6(value) { return String(value).includes(":") }\nexport function isPrivate() { return false }\nexport function isReserved() { return false }\n',
57
+ ...SERVER_CONTEXT_STUBS,
58
+ };
59
+ return {
60
+ name: 'orez-lite-aliases',
61
+ setup(buildApi) {
62
+ // consumer-declared .wasm modules (cfg.compiledWasmModules) → attach each as a
63
+ // CompiledWasm worker module: resolve the specifier (honoring its package
64
+ // exports), copy the file next to the worker output, and rewrite the import to
65
+ // a relative external specifier. wrangler's CompiledWasm rule then turns it
66
+ // into a WebAssembly.Module at runtime (workerd forbids compiling wasm from
67
+ // bytes). app-neutral — every specifier comes from the consumer's config, not
68
+ // baked in here. each onResolve only fires when that specifier is imported.
69
+ const wasmModules = cfg.compiledWasmModules ?? [];
70
+ if (wasmModules.length > 0) {
71
+ const requireFrom = createRequire(join(nodeModulesPath, '..', '_orez-cf.cjs'));
72
+ for (const specifier of wasmModules) {
73
+ const filter = new RegExp(`^${specifier.replace(/[.*+?^${}()|[\]\\]/g, '\\$&')}$`);
74
+ buildApi.onResolve({ filter }, () => {
75
+ const real = requireFrom.resolve(specifier);
76
+ const name = basename(real);
77
+ copyFileSync(real, join(wasmOutDir, name));
78
+ return { path: `./${name}`, external: true };
79
+ });
80
+ }
81
+ }
82
+ for (const specifier of Object.keys(virtualModules)) {
83
+ const filter = new RegExp(`^${specifier.replace(/[.*+?^${}()|[\]\\]/g, '\\$&')}$`);
84
+ buildApi.onResolve({ filter }, (args) => {
85
+ // server-context stubs apply regardless of importer: consumer app
86
+ // code (e.g. an auth module's `import 'server-only'`) must hit the
87
+ // no-op, not the throwing client-guard entry
88
+ if (specifier in SERVER_CONTEXT_STUBS) {
89
+ return { path: specifier, namespace: 'orez-lite-virtual' };
90
+ }
91
+ if (args.importer && !isOrezLiteImporter(args.importer))
92
+ return undefined;
93
+ return { path: specifier, namespace: 'orez-lite-virtual' };
94
+ });
95
+ }
96
+ buildApi.onLoad({ filter: /.*/, namespace: 'orez-lite-virtual' }, (args) => ({
97
+ contents: virtualModules[args.path],
98
+ loader: 'js',
99
+ resolveDir,
100
+ }));
101
+ for (const [specifier, target] of entries) {
102
+ const filter = new RegExp(`^${specifier.replace(/[.*+?^${}()|[\]\\]/g, '\\$&')}$`);
103
+ buildApi.onResolve({ filter }, async (args) => {
104
+ const isVirtualBuildModule = specifier.startsWith('orez:');
105
+ if (!isVirtualBuildModule &&
106
+ args.importer &&
107
+ !isOrezLiteImporter(args.importer)) {
108
+ return undefined;
109
+ }
110
+ return ((await resolveAlias(buildApi, target, resolveDir, args.kind)) ?? {
111
+ path: target,
112
+ });
113
+ });
114
+ }
115
+ },
116
+ };
117
+ }
118
+ /** bundle a One app with SQL storage but without the zero-cache runtime. */
119
+ export async function bundleCloudflareLiteAppWorker(cfg, options) {
120
+ const { workerDir } = options;
121
+ const nodeModulesPath = realpathSync([
122
+ join(workerDir, 'node_modules'),
123
+ join(workerDir, '..', '..', 'node_modules'),
124
+ join(process.cwd(), 'node_modules'),
125
+ ].find((candidate) => existsSync(candidate)) || join(process.cwd(), 'node_modules'));
126
+ return bundleCloudflareSplitAppWorker(cfg, options, nodeModulesPath, {
127
+ 'orez:application-worker': join(workerDir, 'one-app.js'),
128
+ 'orez:cloudflare-migrations': join(workerDir, 'orez-migrations.js'),
129
+ });
130
+ }
131
+ async function bundleCloudflareSplitAppWorker(cfg, options, nodeModulesPath, aliases) {
132
+ const { workerDir, entryPoint, outfile, writeMigrationModule } = options;
133
+ await writeMigrationModule(workerDir);
134
+ // Expose One's worker output under a stable name so the entrypoint can dynamically
135
+ // import it (getOneWorker -> './one-app.js'). esbuild code-splitting then emits
136
+ // it as its own lazily-evaluated chunk, so the DO isolates (schema migration /
137
+ // SQL backend) never evaluate the One app graph — the fix for the 128 MiB DO
138
+ // OOM. without code-splitting, a single-outfile bundle inlines + eagerly
139
+ // evaluates the dynamic import, which is what OOMed the DO.
140
+ const oneAppPath = join(workerDir, 'one-app.js');
141
+ copyFileSync(join(workerDir, 'index.js'), oneAppPath);
142
+ // Workers node compatibility provides streams. leaving these external avoids
143
+ // pulling readable-stream's browser dependency graph into the DO bundle.
144
+ for (const key of [
145
+ 'node:stream',
146
+ 'stream',
147
+ 'node:stream/promises',
148
+ 'stream/promises',
149
+ 'readable-stream',
150
+ ]) {
151
+ delete aliases[key];
152
+ }
153
+ // split output into a directory so dynamic imports become real lazy chunks.
154
+ const outDir = join(workerDir, '.do-bundle');
155
+ if (existsSync(outDir))
156
+ rmSync(outDir, { recursive: true, force: true });
157
+ await build({
158
+ entryPoints: [entryPoint],
159
+ outdir: outDir,
160
+ entryNames: 'index',
161
+ bundle: true,
162
+ splitting: true,
163
+ format: 'esm',
164
+ platform: 'neutral',
165
+ target: 'es2022',
166
+ conditions: ['workerd', 'worker', 'import'],
167
+ mainFields: ['browser', 'module', 'main'],
168
+ external: ['cloudflare:*', './assets/*', ...NODE_EXTERNALS],
169
+ define: {
170
+ ...WORKER_DEFINE,
171
+ ...options.define,
172
+ // shim the CJS module globals, which are undefined in this workerd ESM
173
+ // bundle (platform: 'neutral' does not inject them). a bundled dep that
174
+ // references __filename/__dirname — common in RN/node libraries pulled
175
+ // into the SSR worker — otherwise throws "__filename is not defined" at
176
+ // worker startup, failing deploy validation.
177
+ __filename: JSON.stringify('index.js'),
178
+ __dirname: JSON.stringify('/'),
179
+ },
180
+ plugins: [orezLiteAliasPlugin(cfg, aliases, workerDir, nodeModulesPath, workerDir)],
181
+ logLevel: 'silent',
182
+ });
183
+ const oneAppChunks = readdirSync(outDir).filter((name) => /^one-app-[A-Za-z0-9_-]+\.js$/.test(name));
184
+ if (oneAppChunks.length > 1) {
185
+ throw new Error(`expected at most one lazy one-app chunk, found ${oneAppChunks.length}: ${oneAppChunks.join(', ')}`);
186
+ }
187
+ const oneAppChunk = oneAppChunks[0];
188
+ if (oneAppChunk) {
189
+ // Dynamic Orez Lite entrypoints emit one lazy app chunk. One's external asset
190
+ // modules import the entry's helpers back from ../index.js, so retarget
191
+ // those references to that chunk. A static entrypoint emits no chunk and
192
+ // needs no rewrite.
193
+ const assetsDir = join(workerDir, 'assets');
194
+ if (existsSync(assetsDir)) {
195
+ for (const name of readdirSync(assetsDir)) {
196
+ if (!name.endsWith('.js') && !name.endsWith('.mjs'))
197
+ continue;
198
+ const file = join(assetsDir, name);
199
+ const source = readFileSync(file, 'utf8');
200
+ const rewritten = source.replace(/(\b(?:from|import)\s*\(?\s*)(['"])\.\.\/index\.js\2/g, `$1$2../${oneAppChunk}$2`);
201
+ if (rewritten !== source)
202
+ writeFileSync(file, rewritten);
203
+ }
204
+ }
205
+ }
206
+ rmSync(oneAppPath, { force: true });
207
+ // The caller-owned entrypoint plus the migration + schema-version modules it
208
+ // statically imports are esbuild INPUTS: esbuild inlined their code into
209
+ // index.js, so the root source files are orphans. leave them and wrangler's
210
+ // general `*-*.js` module rule (they all contain a dash) attaches dead
211
+ // duplicates into every DO isolate — resident weight against the 128 MiB DO
212
+ // budget the code-splitting above exists to protect. rm them like one-app.js.
213
+ rmSync(join(workerDir, 'orez-migrations.js'), { force: true });
214
+ rmSync(join(workerDir, 'orez-schema-version.js'), { force: true });
215
+ // collect the split output: index.js (entry) + chunk-*.js (lazy graphs) ->
216
+ // place them where wrangler attaches modules. the entry goes to `outfile`; the
217
+ // chunks go next to it (the rules glob `assets/**` doesn't cover them, so they
218
+ // sit beside index.js in dist/worker and the `./chunk-*.js` relative imports
219
+ // resolve).
220
+ for (const name of readdirSync(outDir)) {
221
+ const src = join(outDir, name);
222
+ if (name === 'index.js') {
223
+ copyFileSync(src, outfile);
224
+ }
225
+ else {
226
+ copyFileSync(src, join(workerDir, name));
227
+ }
228
+ }
229
+ rmSync(outDir, { recursive: true, force: true });
230
+ // prune asset modules UNREACHABLE from the worker entry's import graph.
231
+ // wrangler's `assets/**/*.js` rule attaches every chunk in assets/ as a worker
232
+ // module, and workerd holds ALL attached modules resident in EVERY isolate.
233
+ // hundreds of those are orphans (client-only / dead route chunks the server
234
+ // never imports). that resident-module weight — not the migration — is what
235
+ // OOMs the 128 MiB DO isolate. attach only what the entry actually reaches.
236
+ pruneUnreachableWorkerModules(workerDir, basename(outfile));
237
+ // neutralize the CJS-interop banner that throws at module eval in workerd.
238
+ shimWorkerCreateRequire(workerDir);
239
+ }
240
+ /** Bundle a data worker that owns the authoritative SQLite Durable Object. */
241
+ export async function bundleCloudflareLiteDataWorker(cfg, options) {
242
+ const { workerDir, entryPoint, outfile, writeMigrationModule } = options;
243
+ const nodeModulesPath = realpathSync([
244
+ join(workerDir, 'node_modules'),
245
+ join(workerDir, '..', '..', 'node_modules'),
246
+ join(process.cwd(), 'node_modules'),
247
+ ].find((candidate) => existsSync(candidate)) || join(process.cwd(), 'node_modules'));
248
+ await writeMigrationModule(workerDir);
249
+ await build({
250
+ entryPoints: [entryPoint],
251
+ outfile,
252
+ bundle: true,
253
+ format: 'esm',
254
+ platform: 'neutral',
255
+ target: 'es2022',
256
+ conditions: ['workerd', 'worker', 'import'],
257
+ mainFields: ['browser', 'module', 'main'],
258
+ external: ['cloudflare:*', ...NODE_EXTERNALS],
259
+ define: {
260
+ ...WORKER_DEFINE,
261
+ ...options.define,
262
+ __filename: JSON.stringify('index.js'),
263
+ __dirname: JSON.stringify('/'),
264
+ },
265
+ plugins: [
266
+ orezLiteAliasPlugin(cfg, {
267
+ 'orez:cloudflare-migrations': join(workerDir, 'orez-migrations.js'),
268
+ }, workerDir, nodeModulesPath, dirname(outfile)),
269
+ ],
270
+ logLevel: 'silent',
271
+ });
272
+ }
273
+ //# sourceMappingURL=bundle.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bundle.js","sourceRoot":"","sources":["../../src/cf-deploy/bundle.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EACZ,UAAU,EACV,YAAY,EACZ,WAAW,EACX,YAAY,EACZ,MAAM,EACN,aAAa,GACd,MAAM,IAAI,CAAA;AACX,OAAO,EAAE,aAAa,EAAE,MAAM,QAAQ,CAAA;AACtC,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAA;AAE9C,OAAO,EAAE,KAAK,EAAe,MAAM,SAAS,CAAA;AAE5C,OAAO,EAAE,cAAc,EAAE,kBAAkB,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAC9E,OAAO,EAAE,6BAA6B,EAAE,uBAAuB,EAAE,MAAM,YAAY,CAAA;AAEnF,MAAM,aAAa,GAAG;IACpB,sBAAsB,EAAE,eAAe;IACvC,4BAA4B,EAAE,KAAK;IACnC,uBAAuB,EAAE,UAAU;CACpC,CAAA;AAcD,+EAA+E;AAC/E,+EAA+E;AAC/E,+EAA+E;AAC/E,+EAA+E;AAC/E,+EAA+E;AAC/E,8EAA8E;AAC9E,4EAA4E;AAC5E,gFAAgF;AAChF,wD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+ /** Stable lowercase identifier used to namespace Orez-owned tables and globals. */
3
+ name: string;
4
+ /** Package imports that workerd should receive as compiled WebAssembly modules. */
5
+ compiledWasmModules?: readonly string[];
6
+ };
7
+ /**
8
+ * Define the app-neutral configuration shared by Orez Cloudflare build and
9
+ * migration primitives.
10
+ */
11
+ export declare function defineCloudflareConfig(name: string, options?: Omit<CloudflareConfig, 'name'>): CloudflareConfig;
12
+ //# sourceMappingURL=config.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/cf-deploy/config.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,gBAAgB,GAAG;IAC7B,mFAAmF;IACnF,IAAI,EAAE,MAAM,CAAA;IACZ,mFAAmF;IACnF,mBAAmB,CAAC,EAAE,SAAS,MAAM,EAAE,CAAA;CACxC,CAAA;AAED;;;GAGG;AACH,wBAAgB,sBAAsB,CACpC,IAAI,EAAE,MAAM,EACZ,OAAO,GAAE,IAAI,CAAC,gBAAgB,EAAE,MAAM,CAAM,GAC3C,gBAAgB,CAOlB"}
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Define the app-neutral configuration shared by Orez Cloudflare build and
3
+ * migration primitives.
4
+ */
5
+ export function defineCloudflareConfig(name, options = {}) {
6
+ if (!/^[a-z][a-z0-9]*$/.test(name)) {
7
+ throw new TypeError(`Cloudflare config name must be a lowercase identifier, got ${JSON.stringify(name)}`);
8
+ }
9
+ return { name, ...options };
10
+ }
11
+ //# sourceMappingURL=config.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"config.js","sourceRoot":"","sources":["../../src/cf-deploy/config.ts"],"names":[],"mappings":"AAOA;;;GAGG;AACH,MAAM,UAAU,sBAAsB,CACpC,IAAY,EACZ,UAA0C,EAAE;IAE5C,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC;QACnC,MAAM,IAAI,SAAS,CACjB,8DAA8D,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,EAAE,CACrF,CAAA;IACH,CAAC;IACD,OAAO,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAA;AAC7B,CAAC"}
@@ -0,0 +1,10 @@
1
+ export * from './bundle.js';
2
+ export * from './config.js';
3
+ export * from './leaves.js';
4
+ export * from './migration.js';
5
+ export * from './nativeMigrations.js';
6
+ export * from './prune.js';
7
+ export * from './readiness.js';
8
+ export * from './sources.js';
9
+ export * from './wrangler.js';
10
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/cf-deploy/index.ts"],"names":[],"mappings":"AAEA,cAAc,aAAa,CAAA;AAC3B,cAAc,aAAa,CAAA;AAC3B,cAAc,aAAa,CAAA;AAC3B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,uBAAuB,CAAA;AACrC,cAAc,YAAY,CAAA;AAC1B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,cAAc,CAAA;AAC5B,cAAc,eAAe,CAAA"}
@@ -0,0 +1,12 @@
1
+ // App-neutral Orez Lite primitives. Public consumers import these through
2
+ // `orez-lite/cloudflare`.
3
+ export * from './bundle.js';
4
+ export * from './config.js';
5
+ export * from './leaves.js';
6
+ export * from './migration.js';
7
+ export * from './nativeMigrations.js';
8
+ export * from './prune.js';
9
+ export * from './readiness.js';
10
+ export * from './sources.js';
11
+ export * from './wrangler.js';
12
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/cf-deploy/index.ts"],"names":[],"mappings":"AAAA,0EAA0E;AAC1E,0BAA0B;AAC1B,cAAc,aAAa,CAAA;AAC3B,cAAc,aAAa,CAAA;AAC3B,cAAc,aAAa,CAAA;AAC3B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,uBAAuB,CAAA;AACrC,cAAc,YAAY,CAAA;AAC1B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,cAAc,CAAA;AAC5B,cAAc,eAAe,CAAA"}
@@ -0,0 +1,8 @@
1
+ import type { OnResolveArgs, PluginBuild } from 'esbuild';
2
+ export declare function isOrezLiteImporter(importer: string): boolean;
3
+ export declare function resolveAlias(buildApi: PluginBuild, path: string, resolveDir: string, kind: OnResolveArgs['kind']): Promise<import("esbuild").ResolveResult | undefined>;
4
+ export declare function packageEntryForDirectory(path: string): string;
5
+ export declare function importSpecifier(fromDir: string, filePath: string): string;
6
+ export declare function quoteSqlIdentifier(value: string): string;
7
+ export declare const NODE_EXTERNALS: string[];
8
+ //# sourceMappingURL=leaves.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"leaves.d.ts","sourceRoot":"","sources":["../../src/cf-deploy/leaves.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;AAEzD,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAU5D;AAED,wBAAsB,YAAY,CAChC,QAAQ,EAAE,WAAW,EACrB,IAAI,EAAE,MAAM,EACZ,UAAU,EAAE,MAAM,EAClB,IAAI,EAAE,aAAa,CAAC,MAAM,CAAC,wDAM5B;AAED,wBAAgB,wBAAwB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAQ7D;AAED,wBAAgB,eAAe,CAAC,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CAGzE;AAED,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAExD;AAED,eAAO,MAAM,cAAc,UAgC1B,CAAA"}
@@ -0,0 +1,66 @@
1
+ import { existsSync, readFileSync } from 'fs';
2
+ import { join, relative } from 'path';
3
+ export function isOrezLiteImporter(importer) {
4
+ const normalized = importer.replaceAll('\\', '/');
5
+ return (normalized.includes('/node_modules/orez-lite/') ||
6
+ normalized.includes('/node_modules/orez-sync-cf-host/') ||
7
+ normalized.includes('/node_modules/orez-sync-executor/') ||
8
+ normalized.includes('/packages/orez-lite/') ||
9
+ normalized.includes('/packages/sync-cf-host/') ||
10
+ normalized.includes('/packages/sync-executor/'));
11
+ }
12
+ export async function resolveAlias(buildApi, path, resolveDir, kind) {
13
+ const target = packageEntryForDirectory(path);
14
+ const resolved = await buildApi.resolve(target, { resolveDir, kind });
15
+ if (resolved.errors.length)
16
+ return undefined;
17
+ return resolved;
18
+ }
19
+ export function packageEntryForDirectory(path) {
20
+ const packagePath = join(path, 'package.json');
21
+ if (!existsSync(packagePath))
22
+ return path;
23
+ const pkg = JSON.parse(readFileSync(packagePath, 'utf-8'));
24
+ return join(path, pkg.module || pkg.main || 'index.js');
25
+ }
26
+ export function importSpecifier(fromDir, filePath) {
27
+ const specifier = relative(fromDir, filePath).replaceAll('\\', '/');
28
+ return specifier.startsWith('.') ? specifier : `./${specifier}`;
29
+ }
30
+ export function quoteSqlIdentifier(value) {
31
+ return `"${value.replaceAll('"', '""')}"`;
32
+ }
33
+ export const NODE_EXTERNALS = [
34
+ 'node:*',
35
+ 'async_hooks',
36
+ 'buffer',
37
+ 'child_process',
38
+ 'crypto',
39
+ 'diagnostics_channel',
40
+ 'dns',
41
+ 'dns/promises',
42
+ 'events',
43
+ 'fs',
44
+ 'fs/promises',
45
+ 'http',
46
+ 'http2',
47
+ 'https',
48
+ 'inspector/promises',
49
+ 'module',
50
+ 'net',
51
+ 'os',
52
+ 'path',
53
+ 'perf_hooks',
54
+ 'process',
55
+ 'querystring',
56
+ 'stream',
57
+ 'stream/promises',
58
+ 'tls',
59
+ 'tty',
60
+ 'url',
61
+ 'util',
62
+ 'v8',
63
+ 'worker_threads',
64
+ 'zlib',
65
+ ];
66
+ //# sourceMappingURL=leaves.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"leaves.js","sourceRoot":"","sources":["../../src/cf-deploy/leaves.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,IAAI,CAAA;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CAAC;AAED,MAAM,UAAU,eAAe,CAAC,OAAe,EAAE,QAAgB;IAC/D,MAAM,SAAS,GAAG,QAAQ,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC,UAAU,CAAC,IAAI,EAAE,GAAG,CAAC,CAAA;IACnE,OAAO,SAAS,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,KAAK,SAAS,EAAE,CAAA;AACjE,CAAC;AAED,MAAM,UAAU,kBAAkB,CAAC,KAAa;IAC9C,OAAO,IAAI,KAAK,CAAC,UAAU,CAAC,GAAG,EAAE,IAAI,CAAC,GAAG,CAAA;AAC3C,CAAC;AAED,MAAM,CAAC,MAAM,cAAc,GAAG;IAC5B,QAAQ;IACR,aAAa;IACb,QAAQ;IACR,eAAe;IACf,QAAQ;IACR,qBAAqB;IACrB,KAAK;IACL,cAAc;IACd,QAAQ;IACR,IAAI;IACJ,aAAa;IACb,MAAM;IACN,OAAO;IACP,OAAO;IACP,oBAAoB;IACpB,QAAQ;IACR,KAAK;IACL,IAAI;IACJ,MAAM;IACN,YAAY;IACZ,SAAS;IACT,aAAa;IACb,QAAQ;IACR,iBAAiB;IACjB,KAAK;IACL,KAAK;IACL,KAAK;IACL,MAAM;IACN,IAAI;IACJ,gBAAgB;IAChB,MAAM;CACP,CAAA"}
@@ -0,0 +1,27 @@
1
+ import type { CloudflareConfig } from './config.js';
2
+ export type CloudflareNativeTableShape = {
3
+ columns: Array<{
4
+ name: string;
5
+ notNull: boolean;
6
+ primaryKeyOrder: number;
7
+ sqlType: string;
8
+ }>;
9
+ name: string;
10
+ };
11
+ export type CloudflareMigrationModuleSourceParts = {
12
+ mode: 'noop';
13
+ schemaVersion: string;
14
+ } | {
15
+ /** SQLite-native schema path for the Rust-sync application worker. */
16
+ mode: 'native';
17
+ schemaVersion: string;
18
+ schemaImportSpecifier: string;
19
+ nativeSqlStatements: unknown;
20
+ publicTables?: Array<{
21
+ table: string;
22
+ publicTable: string;
23
+ }>;
24
+ expectedTables?: CloudflareNativeTableShape[];
25
+ };
26
+ export declare function buildMigrationModuleSource(cfg: CloudflareConfig, parts: CloudflareMigrationModuleSourceParts): string;
27
+ //# sourceMappingURL=migration.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"migration.d.ts","sourceRoot":"","sources":["../../src/cf-deploy/migration.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAA;AAcnD,MAAM,MAAM,0BAA0B,GAAG;IACvC,OAAO,EAAE,KAAK,CAAC;QACb,IAAI,EAAE,MAAM,CAAA;QACZ,OAAO,EAAE,OAAO,CAAA;QAChB,eAAe,EAAE,MAAM,CAAA;QACvB,OAAO,EAAE,MAAM,CAAA;KAChB,CAAC,CAAA;IACF,IAAI,EAAE,MAAM,CAAA;CACb,CAAA;AAED,MAAM,MAAM,oCAAoC,GAC5C;IACE,IAAI,EAAE,MAAM,CAAA;IACZ,aAAa,EAAE,MAAM,CAAA;CACtB,GACD;IACE,sEAAsE;IACtE,IAAI,EAAE,QAAQ,CAAA;IACd,aAAa,EAAE,MAAM,CAAA;IACrB,qBAAqB,EAAE,MAAM,CAAA;IAC7B,mBAAmB,EAAE,OAAO,CAAA;IAC5B,YAAY,CAAC,EAAE,KAAK,CAAC;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,WAAW,EAAE,MAAM,CAAA;KAAE,CAAC,CAAA;IAC5D,cAAc,CAAC,EAAE,0BAA0B,EAAE,CAAA;CAC9C,CAAA;AAEL,wBAAgB,0BAA0B,CACxC,GAAG,EAAE,gBAAgB,EACrB,KAAK,EAAE,oCAAoC,GAC1C,MAAM,CAqtBR"}