@voltro/data-transfer 0.87.0 → 0.88.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.
@@ -11,7 +11,7 @@ import { tmpdir as h } from "node:os";
11
11
  import { Transform as g } from "node:stream";
12
12
  import { pipeline as _ } from "node:stream/promises";
13
13
  import { storageAddressIdentity as v } from "@voltro/plugin-storage/errors";
14
- //#region src/assetAdmission.ts
14
+ // src/assetAdmission.ts
15
15
  var y = Symbol("admitted-assets"), b = /* @__PURE__ */ new WeakMap(), x = (t) => o.decodeUnknownEffect(r)(t).pipe(a.mapError(() => new e({ reason: "asset index contains invalid key, digest, size or content type" }))), S = o.Struct({
16
16
  ...r.fields,
17
17
  sha256: o.optionalKey(r.fields.sha256)
@@ -88,5 +88,4 @@ var y = Symbol("admitted-assets"), b = /* @__PURE__ */ new WeakMap(), x = (t) =>
88
88
  b.delete(T);
89
89
  })), T;
90
90
  });
91
- //#endregion
92
91
  export { S as AssetSourceInfo, w as assertPreparedAssets, x as decodeAssetEntry, C as decodeAssetSourceInfo, E as prepareAssetEntries, T as readmitPreparedAssets };
package/dist/assets.js CHANGED
@@ -6,7 +6,7 @@ import { Effect as a, Stream as o } from "effect";
6
6
  import { createHash as s } from "node:crypto";
7
7
  import { fromNodeReadable as c, getObjectStream as l, putObjectStream as u, toNodeReadable as d } from "@voltro/plugin-storage";
8
8
  import { storageAddressIdentity as f } from "@voltro/plugin-storage/errors";
9
- //#region src/assets.ts
9
+ // src/assets.ts
10
10
  var p = (e, t) => ({
11
11
  list: t,
12
12
  open: (t) => e.resolve(t).pipe(a.flatMap((e) => l(e, t.key)))
@@ -64,5 +64,4 @@ var p = (e, t) => ({
64
64
  totalSize: i.size
65
65
  });
66
66
  });
67
- //#endregion
68
67
  export { _ as applyAdmittedAsset, g as restoreAssetFromCas, m as storageAssetSink, p as storageAssetSource, h as writeAssetToCas };
@@ -6,7 +6,7 @@ import { streamTable as s } from "@voltro/database";
6
6
  import { STORAGE_REFS_TABLE as c, StorageError as l, fromNodeReadable as u, getObjectStream as d, putObjectStream as f, toNodeReadable as p } from "@voltro/plugin-storage";
7
7
  import { Readable as m } from "node:stream";
8
8
  import { finished as h } from "node:stream/promises";
9
- //#region src/blobStorage.ts
9
+ // src/blobStorage.ts
10
10
  var g = (e, t) => ({
11
11
  list: (e) => {
12
12
  let n = t(e);
@@ -60,5 +60,4 @@ var g = (e, t) => ({
60
60
  }
61
61
  }, "admitted asset write failed")
62
62
  });
63
- //#endregion
64
63
  export { b as blobAssetSink, v as storageBlobSink, g as storageBlobSource, _ as storageRefsBlobSource };
@@ -11,7 +11,7 @@ import { dirname as S, join as C, resolve as w, sep as T } from "node:path";
11
11
  import { tmpdir as E } from "node:os";
12
12
  import { PassThrough as D } from "node:stream";
13
13
  import { storageAddressIdentity as O } from "@voltro/plugin-storage/errors";
14
- //#region src/bundleArchive.ts
14
+ // src/bundleArchive.ts
15
15
  var k = Buffer.from("VBUNDLE3"), A = 0, j = 1, M = 2, N = 32, P = async (e) => {
16
16
  let t = [], n = async (r) => {
17
17
  let i;
@@ -306,5 +306,4 @@ var R = (e, t) => new Promise((n, r) => e.write(t, (e) => e ? r(e) : n())), z =
306
306
  }
307
307
  };
308
308
  };
309
- //#endregion
310
309
  export { W as dirBlobSink, L as packBundle, H as peekBundle, B as unpackBundle, U as unpackBundleToDir };
@@ -1,6 +1,6 @@
1
1
  import { createCipheriv as e, createDecipheriv as t, randomBytes as n, scrypt as r } from "node:crypto";
2
2
  import { promisify as i } from "node:util";
3
- //#region src/bundleCrypto.ts
3
+ // src/bundleCrypto.ts
4
4
  var a = i(r), o = Buffer.from("VENC1\0\0\0"), s = 32, c = 16, l = 7, u = 16, d = 262144, f = {
5
5
  N: 32768,
6
6
  r: 8,
@@ -102,5 +102,4 @@ async function* _(e, n) {
102
102
  }
103
103
  }
104
104
  }
105
- //#endregion
106
105
  export { _ as decryptStream, g as encryptStream };
@@ -1,4 +1,3 @@
1
- //#region src/bundlePaths.ts
1
+ // src/bundlePaths.ts
2
2
  var e = (e) => e.length > 0 && !e.includes("\0") && !e.includes("\\") && !e.startsWith("/") && !/^[a-z]:/i.test(e) && !e.split("/").some((e) => e === "" || e === "." || e === "..");
3
- //#endregion
4
3
  export { e as isSafeBundlePath };
@@ -7,7 +7,7 @@ import { constants as u } from "node:fs";
7
7
  import { open as d } from "node:fs/promises";
8
8
  import { fromNodeReadable as f } from "@voltro/plugin-storage";
9
9
  import { storageAddressIdentity as p } from "@voltro/plugin-storage/errors";
10
- //#region src/casAssetPhase.ts
10
+ // src/casAssetPhase.ts
11
11
  var m = {
12
12
  done: () => !1,
13
13
  mark: () => c.void
@@ -83,5 +83,4 @@ var m = {
83
83
  ...e,
84
84
  entries: Array.from(t)
85
85
  })));
86
- //#endregion
87
86
  export { g as captureAssetsToCas, m as noAssetProgress, y as prepareAssetsFromCas, _ as readAssetIndex, v as restoreAssetsFromCas };
package/dist/compress.js CHANGED
@@ -1,6 +1,5 @@
1
1
  import { PassThrough as e } from "node:stream";
2
2
  import * as t from "node:zlib";
3
- //#region src/compress.ts
3
+ // src/compress.ts
4
4
  var n = () => typeof t.createZstdCompress == "function", r = (e) => e === "none" ? "none" : e === "gzip" ? "gzip" : n() ? "zstd" : "gzip", i = (e) => e === "zstd" ? ".zst" : e === "gzip" ? ".gz" : "", a = (n) => n === "zstd" ? t.createZstdCompress() : n === "gzip" ? t.createGzip() : new e(), o = (n) => n === "zstd" ? t.createZstdDecompress() : n === "gzip" ? t.createGunzip() : new e();
5
- //#endregion
6
5
  export { i as compressionExt, n as hasZstd, a as makeCompressor, o as makeDecompressor, r as pickCompression };
@@ -1,4 +1,4 @@
1
- //#region src/consistency.ts
1
+ // src/consistency.ts
2
2
  var e = (e) => {
3
3
  switch (e) {
4
4
  case "postgres": return ["SET TRANSACTION ISOLATION LEVEL REPEATABLE READ"];
@@ -10,5 +10,4 @@ var e = (e) => {
10
10
  default: return [];
11
11
  }
12
12
  };
13
- //#endregion
14
13
  export { e as snapshotPrelude };
@@ -1,4 +1,4 @@
1
- //#region src/crossDialect.ts
1
+ // src/crossDialect.ts
2
2
  var e = (e) => {
3
3
  switch (e) {
4
4
  case "id":
@@ -54,5 +54,4 @@ var e = (e) => {
54
54
  }
55
55
  return i;
56
56
  }, i = (e) => `[${e.severity}] ${e.table}.${e.column} (${e.type}): ${e.reason}`;
57
- //#endregion
58
57
  export { e as canonicalType, r as checkPortability, i as formatIssue };
@@ -1,4 +1,4 @@
1
- //#region src/driftClassification.ts
1
+ // src/driftClassification.ts
2
2
  var e = (e, t) => {
3
3
  let n = new Map(t.map((e) => [e.name, e])), r = [], i = {};
4
4
  for (let t of e) {
@@ -54,5 +54,4 @@ var e = (e, t) => {
54
54
  }, n = e.findings.map((e) => ` ${t[e.verdict]} ${e.detail}`), r = (t) => e.findings.filter((e) => e.verdict === t).length;
55
55
  return n.push(""), n.push(` discarded: ${r("value-dropped")} defaulted: ${r("filled-by-default")} refused: ${r("refuse")}`), e.refuse && (n.push(""), n.push(" REFUSED — no row was written. These are the differences that would make"), n.push(" imported rows WRONG rather than merely incomplete.")), n;
56
56
  };
57
- //#endregion
58
57
  export { e as classifyImportDrift, t as formatImportDrift };
@@ -1,4 +1,4 @@
1
- //#region src/environmentLocal.ts
1
+ // src/environmentLocal.ts
2
2
  var e = /* @__PURE__ */ new Map([
3
3
  ["_voltro_billing_customer_accounts", "financial provider/account/mode intent recorded by THIS deployment — a foreign namespace must not qualify local usage or grant adoption of prior financial rows"],
4
4
  ["_voltro_billing_customer_custody", "current and retired customer ownership positively admitted HERE — foreign rows cannot establish this deployment's original customer evidence or replace its current slot"],
@@ -382,5 +382,4 @@ var e = /* @__PURE__ */ new Map([
382
382
  let n = e.map((e) => ` ${e} — ${r(e) ?? "describes this deployment"}`);
383
383
  return `${t} ${e.length} table(s) that describe a deployment rather than its data:\n${n.join("\n")}\n A row from another environment is not stale there, it is a false statement about this one.`;
384
384
  };
385
- //#endregion
386
385
  export { e as ENVIRONMENT_LOCAL_TABLES, t as ENVIRONMENT_PORTABLE_TABLES, i as environmentLocalNotice, r as environmentLocalReason, n as isEnvironmentLocal };
package/dist/errors.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { Data as e, Schema as t } from "effect";
2
- //#region src/errors.ts
2
+ // src/errors.ts
3
3
  var n = class extends t.TaggedError()("BundleError", {
4
4
  reason: t.String,
5
5
  path: t.optional(t.String)
@@ -85,5 +85,4 @@ var n = class extends t.TaggedError()("BundleError", {
85
85
  targetDialect: t.String,
86
86
  blocking: t.Array(t.String)
87
87
  }) {};
88
- //#endregion
89
88
  export { n as BundleError, r as CodecError, a as CompressionError, p as CrossDialectError, l as FieldKeysMissingError, f as ImportModeError, i as IntegrityError, d as MaskingError, u as NativeToolError, s as RowsRefusedError, c as SchemaDriftError, o as ScopeError };
package/dist/exporter.js CHANGED
@@ -15,7 +15,7 @@ import { topoSortTables as j } from "./topo.js";
15
15
  import { Cause as M, Effect as N, Exit as P, Schedule as F, Stream as I } from "effect";
16
16
  import { streamTable as L } from "@voltro/database";
17
17
  import { fingerprintSchema as R } from "@voltro/database/sql";
18
- //#region src/exporter.ts
18
+ // src/exporter.ts
19
19
  var z = (e) => {
20
20
  let t = e, n = [];
21
21
  typeof t?._tag == "string" && t._tag !== "" && n.push(t._tag);
@@ -267,5 +267,4 @@ var z = (e) => {
267
267
  })
268
268
  }), G;
269
269
  });
270
- //#endregion
271
270
  export { X as runExport };
@@ -1,7 +1,7 @@
1
1
  import { constants as e } from "node:fs";
2
2
  import { copyFile as t, lstat as n, mkdir as r, mkdtemp as i, rename as a, rm as o } from "node:fs/promises";
3
3
  import { dirname as s, join as c, parse as l, resolve as u, sep as d } from "node:path";
4
- //#region src/filesystemAdmission.ts
4
+ // src/filesystemAdmission.ts
5
5
  var f = async (e, t) => {
6
6
  let r = u(e), i = l(r).root, a = r.slice(i.length).split(d).filter(Boolean), o = i;
7
7
  for (let e = 0; e < a.length; e++) {
@@ -29,5 +29,4 @@ var f = async (e, t) => {
29
29
  });
30
30
  }
31
31
  };
32
- //#endregion
33
32
  export { f as admitFilesystemPath, p as publishBundleFile };
package/dist/importer.js CHANGED
@@ -17,7 +17,7 @@ import { Cause as b, Effect as x, Exit as S, Option as C, Stream as Ce } from "e
17
17
  import { DATA_TRANSFERS_TABLE as w, REPLACE_IN_PROGRESS_TABLE as T, _voltroDataTransfersTable as we, derivedRowId as E, ensureTableRegistered as Te, getTable as D, isNotNull as Ee, recordsTable as De, registerTable as Oe, suspendWriteRecorders as ke, suspendWriteRecordersEffect as Ae, unregisterTable as je } from "@voltro/database";
18
18
  import { createReadStream as Me } from "node:fs";
19
19
  import { fromNodeReadable as Ne } from "@voltro/plugin-storage";
20
- //#region src/importer.ts
20
+ // src/importer.ts
21
21
  var Pe = 2e3, Fe = 2e3, O = 200, k = /* @__PURE__ */ new Set([
22
22
  "BundleError",
23
23
  "CodecError",
@@ -572,5 +572,4 @@ var Pe = 2e3, Fe = 2e3, O = 200, k = /* @__PURE__ */ new Set([
572
572
  };
573
573
  }).pipe(x.scoped, x.tapError((e) => x.promise(() => f?.(e._tag === "RowsRefusedError" ? e.message : e?.reason ?? e?._tag ?? "the import did not finish") ?? Promise.resolve())));
574
574
  };
575
- //#endregion
576
575
  export { O as SAVEPOINT_BATCH_SIZE, A as asImportError, j as runImport };
package/dist/ledger.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { BundleError as e } from "./errors.js";
2
2
  import { Effect as t } from "effect";
3
- //#region src/ledger.ts
3
+ // src/ledger.ts
4
4
  var n = () => ({
5
5
  tables: {},
6
6
  assets: {}
@@ -17,5 +17,4 @@ var n = () => ({
17
17
  path: n
18
18
  })
19
19
  }), a = (e, t) => t in e.tables, o = (e, t) => t in e.assets;
20
- //#endregion
21
20
  export { o as assetDone, n as emptyLedger, r as readLedger, a as tableDone, i as writeLedger };
package/dist/liveGuard.js CHANGED
@@ -1,4 +1,4 @@
1
- //#region src/liveGuard.ts
1
+ // src/liveGuard.ts
2
2
  var e = (e) => {
3
3
  if (e.allowLive || e.liveInstance === null || e.sameTarget === "different") return { refuse: !1 };
4
4
  let t = e.targetLabel === void 0 ? "" : ` Target: ${e.targetLabel}.`, n = e.sameTarget === "same" ? " That instance is connected to the SAME database." : " We could not confirm which database that instance is connected to, so this is refused on the conservative reading — an older instance, or one whose connection could not be parsed, reports nothing to compare.";
@@ -7,5 +7,4 @@ var e = (e) => {
7
7
  message: `refusing to write into a target with a LIVE instance (${e.liveInstance}).${t}${n} A direct import is an uncoordinated concurrent writer — readers see partial state, the reactive layer either storms or goes stale, and rows race with live writes. Re-run with --allow-live to override, or use a live-safe strategy (shadow-swap for replace, or the api target).`
8
8
  };
9
9
  };
10
- //#endregion
11
10
  export { e as assessLiveImport };
package/dist/manifest.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { isSafeBundlePath as e } from "./bundlePaths.js";
2
2
  import { Schema as t } from "effect";
3
3
  import { StorageAddress as n } from "@voltro/plugin-storage/errors";
4
- //#region src/manifest.ts
4
+ // src/manifest.ts
5
5
  var r = 2, i = t.Struct({
6
6
  name: t.String,
7
7
  file: t.String,
@@ -52,5 +52,4 @@ var r = 2, i = t.Struct({
52
52
  transformed: t.Array(t.String)
53
53
  }))
54
54
  }), u = t.encodeSync(t.fromJsonString(l)), d = t.decodeUnknownSync(t.fromJsonString(l)), f = "manifest.json", p = "README.md", m = "data", h = "assets", g = "assets/index.ndjson", _ = ".ledger.json";
55
- //#endregion
56
55
  export { h as ASSETS_DIR, g as ASSET_INDEX_FILE, s as AssetAddress, c as AssetEntry, o as AssetSummary, m as DATA_DIR, a as ExportScope, r as FORMAT_VERSION, _ as LEDGER_FILE, f as MANIFEST_FILE, l as Manifest, p as README_FILE, i as TableEntry, d as decodeManifest, u as encodeManifest };
package/dist/masking.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { createHmac as e } from "node:crypto";
2
- //#region src/masking.ts
2
+ // src/masking.ts
3
3
  var t = {
4
4
  email: { fake: "email" },
5
5
  fullName: { fake: "fullName" },
@@ -242,5 +242,4 @@ var t = {
242
242
  });
243
243
  return a;
244
244
  };
245
- //#endregion
246
245
  export { t as DEFAULT_CLASS_ACTIONS, h as applyAction, n as classificationFromSnapshot, v as isMaskAction, S as maskRow, y as planMasking, r as resolveAction, x as scanForLeaks };
@@ -3,7 +3,7 @@ import { resolveScope as i } from "./scope.js";
3
3
  import { topoSortTables as a } from "./topo.js";
4
4
  import { Effect as o, Stream as s } from "effect";
5
5
  import { streamTable as c } from "@voltro/database";
6
- //#region src/maskingPreview.ts
6
+ // src/maskingPreview.ts
7
7
  var l = (e) => typeof e == "object" && e ? "fake" in e ? `fake:${e.fake}` : "custom" : String(e), u = (u) => o.gen(function* () {
8
8
  let d = u.scope ?? { kind: "all" }, f = yield* i(d, u.snapshot, {
9
9
  store: u.store,
@@ -44,5 +44,4 @@ var l = (e) => typeof e == "object" && e ? "fake" in e ? `fake:${e.fake}` : "cus
44
44
  unclassified: _.unclassified
45
45
  };
46
46
  });
47
- //#endregion
48
47
  export { u as previewMasking };
@@ -5,7 +5,7 @@ import { randomUUID as i } from "node:crypto";
5
5
  import { copyFile as a, createReadStream as o, createWriteStream as s, existsSync as c, rename as l, statSync as u, unlinkSync as d } from "node:fs";
6
6
  import { basename as f, delimiter as p, join as m } from "node:path";
7
7
  import { spawn as h } from "node:child_process";
8
- //#region src/nativeDump.ts
8
+ // src/nativeDump.ts
9
9
  var g = (e, t) => {
10
10
  let n = t === "dump" ? "mariadb-dump" : "mariadb", r = t === "dump" ? "mysqldump" : "mysql";
11
11
  return e === "mariadb" ? _(n) ? { tool: n } : {
@@ -414,5 +414,4 @@ END`;
414
414
  return "?";
415
415
  }
416
416
  };
417
- //#endregion
418
417
  export { C as EXCLUDED_FROM_DUMP, v as backupArtifactName, S as backupCommand, T as dumpExcludedTables, P as mssqlReplaceStatements, A as mssqlScratchName, E as restoreCommand, L as runNativeStep };
package/dist/ndjson.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { CodecError as e } from "./errors.js";
2
2
  import { decodeRow as t, encodeRow as n } from "./typedCodec.js";
3
3
  import { Effect as r, Stream as i } from "effect";
4
- //#region src/ndjson.ts
4
+ // src/ndjson.ts
5
5
  var a = new TextEncoder(), o = (e, t) => e.pipe(i.map((e) => a.encode(`${JSON.stringify(n(e, t))}\n`))), s = (n, a, o) => n.pipe(i.decodeText(), i.splitLines, i.filter((e) => e.trim().length > 0), i.mapEffect((n) => r.try({
6
6
  try: () => t(JSON.parse(n), o),
7
7
  catch: (t) => new e({
@@ -9,5 +9,4 @@ var a = new TextEncoder(), o = (e, t) => e.pipe(i.map((e) => a.encode(`${JSON.st
9
9
  reason: String(t?.message ?? t)
10
10
  })
11
11
  })));
12
- //#endregion
13
12
  export { s as ndjsonToRows, o as rowsToNdjson };
@@ -1,10 +1,9 @@
1
1
  import { Effect as e } from "effect";
2
- //#region src/physicalRequest.ts
2
+ // src/physicalRequest.ts
3
3
  var t = (t, n) => e.callback((r) => {
4
4
  let i = new AbortController(), a = Promise.resolve().then(() => t(i.signal));
5
5
  return a.then((t) => r(e.succeed(t)), (t) => r(e.fail(n(t)))), e.sync(() => {
6
6
  i.abort();
7
7
  }).pipe(e.andThen(e.promise(() => a.then(() => void 0, () => void 0))));
8
8
  });
9
- //#endregion
10
9
  export { t as physicalRequest };
package/dist/profile.js CHANGED
@@ -1,4 +1,3 @@
1
- //#region src/profile.ts
1
+ // src/profile.ts
2
2
  var e = (e) => e;
3
- //#endregion
4
3
  export { e as defineDataProfile };
package/dist/progress.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { Effect as e, Metric as t } from "effect";
2
- //#region src/progress.ts
2
+ // src/progress.ts
3
3
  var n = t.counter("voltro_data_transfer_rows", { description: "Rows exported/imported by @voltro/data-transfer, tagged by phase + table." }), r = Array.from({ length: 16 }, (e, t) => .01 * 2 ** t), i = t.histogram("voltro_data_transfer_table_seconds", {
4
4
  boundaries: r,
5
5
  description: "Per-table export/import duration in seconds, tagged by phase."
@@ -13,5 +13,4 @@ var n = t.counter("voltro_data_transfer_rows", { description: "Rows exported/imp
13
13
  tableCount: s,
14
14
  phase: r
15
15
  } }));
16
- //#endregion
17
16
  export { a as reportProgress, o as withTableSpan };
package/dist/readme.js CHANGED
@@ -1,4 +1,4 @@
1
- //#region src/readme.ts
1
+ // src/readme.ts
2
2
  var e = (e) => e.kind === "tenant" ? `tenant \`${e.tenantId}\`` : e.kind === "tables" ? `tables \`${(e.tables ?? []).join(", ")}\`` : "all tables", t = (t, n) => {
3
3
  let r = t.tables.reduce((e, t) => e + t.rowCount, 0), i = t.masking ? `✅ **Masked at the source** — ${t.masking.transformed.length} column(s) transformed${t.masking.policyId ? ` (policy \`${t.masking.policyId}\`)` : ""}. Personal data was replaced with realistic, referentially-consistent fakes before any byte was written.` : "⚠️ **NOT masked — this bundle contains REAL data (PII included).** Treat it as production data: do not copy it into a lower environment or share it without review. To produce a safe copy, re-export under a masking profile (`--profile`).", a = t.masking && t.masking.transformed.length > 0 ? `\n\nMasked columns: ${t.masking.transformed.map((e) => `\`${e}\``).join(", ")}.` : "", o = t.assets.count > 0 ? `${t.assets.count} object(s), ${t.assets.totalBytes} bytes` : "none", s = t.tables.map((e) => `| \`${e.name}\` | ${e.rowCount} |`).join("\n");
4
4
  return `# Voltro data export
@@ -39,5 +39,4 @@ voltro data import <this-directory> --target api --api-url <url> --token <secret
39
39
  \`\`\`
40
40
  `;
41
41
  };
42
- //#endregion
43
42
  export { t as buildReadme };
@@ -1,4 +1,4 @@
1
- //#region src/replacePreflight.ts
1
+ // src/replacePreflight.ts
2
2
  var e = (e, t) => {
3
3
  let n = new Set(t), r = [];
4
4
  for (let t of e.tables) if (!n.has(t.name)) for (let e of t.columns) {
@@ -19,5 +19,4 @@ var e = (e, t) => {
19
19
  });
20
20
  return `replace cannot empty this target: ${t.size} table(s) OUTSIDE the bundle hold rows that reference tables INSIDE it. Emptying the bundle's tables would leave those rows pointing at nothing, and the bundle cannot restore them.\n${n.join("\n")}\nNothing has been deleted. Either re-export with a scope that includes those tables, or use --mode upsert if those rows are meant to survive.`;
21
21
  };
22
- //#endregion
23
22
  export { t as outsideReferenceRefusal, e as outsideReferencesInto };
@@ -1,7 +1,7 @@
1
1
  import { BundleError as e } from "./errors.js";
2
2
  import { runExport as t } from "./exporter.js";
3
3
  import { Effect as n } from "effect";
4
- //#region src/rollbackCapture.ts
4
+ // src/rollbackCapture.ts
5
5
  var r = (r) => n.gen(function* () {
6
6
  if (r.mode !== "replace" || r.dir === void 0 || r.tables.length === 0) return;
7
7
  if (r.snapshot === void 0) return yield* n.fail(new e({
@@ -32,5 +32,4 @@ var r = (r) => n.gen(function* () {
32
32
  tables: a.tables.length
33
33
  };
34
34
  }), i = (e) => `rollback capture: ${e.rows} row(s) across ${e.tables} table(s) → ${e.dir}\n If this run does not finish, restore with: voltro data import ${e.dir} --mode replace`;
35
- //#endregion
36
35
  export { r as captureRollback, i as rollbackNotice };
@@ -1,5 +1,5 @@
1
1
  import { classifyConstraintViolation as e, extractDbCause as t } from "@voltro/database";
2
- //#region src/rowFailureReason.ts
2
+ // src/rowFailureReason.ts
3
3
  var n = (e) => {
4
4
  let t = e.constraint ?? e.column, n = t === void 0 ? "" : ` ${t}`;
5
5
  switch (e.kind) {
@@ -32,5 +32,4 @@ var n = (e) => {
32
32
  }
33
33
  return s(n);
34
34
  };
35
- //#endregion
36
35
  export { o as rowFailureDiagnosis, s as rowFailureReason, c as tableFailureReason };
@@ -1,5 +1,5 @@
1
1
  import { fingerprintSchema as e } from "@voltro/database/sql";
2
- //#region src/schemaDrift.ts
2
+ // src/schemaDrift.ts
3
3
  var t = /__dropped_\d+$/, n = (e, n) => {
4
4
  let r = [], i = /* @__PURE__ */ new Map();
5
5
  for (let e of n.tables) {
@@ -36,5 +36,4 @@ var t = /__dropped_\d+$/, n = (e, n) => {
36
36
  diff: o
37
37
  };
38
38
  };
39
- //#endregion
40
39
  export { r as checkSchemaDrift, n as diffSnapshots };
package/dist/scope.js CHANGED
@@ -3,7 +3,7 @@ import { ScopeError as t } from "./errors.js";
3
3
  import { computeSubsetIds as n, pkOf as r } from "./subset.js";
4
4
  import { Effect as i } from "effect";
5
5
  import { eq as a, inSet as o } from "@voltro/database";
6
- //#region src/scope.ts
6
+ // src/scope.ts
7
7
  var s = "tenantId", c = (c, l, u) => i.gen(function* () {
8
8
  let d = l.tables.map((e) => e.name), f = new Map(l.tables.map((e) => [e.name, e]));
9
9
  if (c.kind === "all") {
@@ -36,5 +36,4 @@ var s = "tenantId", c = (c, l, u) => i.gen(function* () {
36
36
  predicateFor: (e) => _.has(e) ? a(s, p) : h.has(e) ? o(r(l, e), [...h.get(e)]) : void 0
37
37
  };
38
38
  });
39
- //#endregion
40
39
  export { c as resolveScope };
@@ -1,5 +1,5 @@
1
1
  import { ciphertextKeyId as e } from "@voltro/database";
2
- //#region src/sealedKeys.ts
2
+ // src/sealedKeys.ts
3
3
  var t = /enc:v[12]:[A-Za-z0-9+/=:_-]+/g, n = () => ({
4
4
  byKey: {},
5
5
  unnamed: 0
@@ -36,5 +36,4 @@ var t = /enc:v[12]:[A-Za-z0-9+/=:_-]+/g, n = () => ({
36
36
  }
37
37
  return u;
38
38
  };
39
- //#endregion
40
39
  export { n as emptyTally, a as mergeTally, s as nullUnreadableSealed, i as tallyRow };
@@ -1,7 +1,7 @@
1
1
  import { Effect as e } from "effect";
2
2
  import { STAGING_TABLE_PREFIX as t } from "@voltro/database";
3
3
  import { SqlClient as n } from "effect/sql";
4
- //#region src/stagedSwap.ts
4
+ // src/stagedSwap.ts
5
5
  var r = t, i = (e) => `${r}${e}`, a = (e) => typeof e.run == "function", o = (e) => `staging is not available for this run — loading directly into the target instead: ${e}\n The load therefore holds the destructive transaction open for its whole duration, so a
6
6
  process that dies mid-load depends on the database rolling it back. The rollback capture
7
7
  written before the first delete is what covers that case.`, s = /^[a-zA-Z_][a-zA-Z0-9_]*$/, c = (e, t) => {
@@ -160,5 +160,4 @@ var r = t, i = (e) => `${r}${e}`, a = (e) => typeof e.run == "function", o = (e)
160
160
  tables: o
161
161
  };
162
162
  };
163
- //#endregion
164
163
  export { r as STAGING_PREFIX, a as canStage, l as createStagingSql, m as danglingProbeSql, h as danglingReport, x as decideStaging, u as dropStagingSql, g as execStatements, v as findDangling, y as forwardReferences, c as quoteIdent, f as registerStagingClones, _ as runSwap, p as stagedReferences, i as stagingNameFor, o as stagingUnavailable, b as suspendsIntegrity, d as swapStatements };
@@ -11,7 +11,7 @@ import { readFile as f } from "node:fs/promises";
11
11
  import { join as p } from "node:path";
12
12
  import { STORAGE_REFS_TABLE as m, fromNodeReadable as h } from "@voltro/plugin-storage";
13
13
  import { compose as g } from "node:stream";
14
- //#region src/storageAssetMetadata.ts
14
+ // src/storageAssetMetadata.ts
15
15
  var _ = (t) => c.tryPromise({
16
16
  try: async () => {
17
17
  let e = i(await f(p(t, r), "utf8"));
@@ -43,5 +43,4 @@ var _ = (t) => c.tryPromise({
43
43
  })));
44
44
  }));
45
45
  };
46
- //#endregion
47
46
  export { _ as assetBundleContext, y as bundleAssetInfoStream, v as storageAssetInfo };
package/dist/subset.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { Effect as e, Stream as t } from "effect";
2
2
  import { inSet as n, or as r, streamTable as i } from "@voltro/database";
3
- //#region src/subset.ts
3
+ // src/subset.ts
4
4
  var a = (e, t) => e.tables.find((e) => e.name === t)?.columns.find((e) => e.type === "id")?.name ?? "id", o = (a, o, s) => e.gen(function* () {
5
5
  let c = s.maxDepth ?? 12, l = new Set(s.pinned ?? []), u = /* @__PURE__ */ new Map(), d = /* @__PURE__ */ new Map(), f = /* @__PURE__ */ new Map(), p = /* @__PURE__ */ new Map();
6
6
  for (let e of o.tables) p.has(e.name) || p.set(e.name, e);
@@ -86,5 +86,4 @@ var a = (e, t) => e.tables.find((e) => e.name === t)?.columns.find((e) => e.type
86
86
  return i ? n(a(t, r), [...i]) : void 0;
87
87
  }
88
88
  });
89
- //#endregion
90
89
  export { o as computeSubsetIds, a as pkOf, s as subsetToScope };
package/dist/topo.js CHANGED
@@ -1,4 +1,4 @@
1
- //#region src/topo.ts
1
+ // src/topo.ts
2
2
  var e = (e, t) => {
3
3
  let n = new Set(e), r = /* @__PURE__ */ new Map();
4
4
  for (let e of t.tables) {
@@ -20,5 +20,4 @@ var e = (e, t) => {
20
20
  for (let t of e) n.has(t) && s(t);
21
21
  return i;
22
22
  };
23
- //#endregion
24
23
  export { e as topoSortTables };
@@ -1,4 +1,4 @@
1
- //#region src/typedCodec.ts
1
+ // src/typedCodec.ts
2
2
  var e = /* @__PURE__ */ new Set([
3
3
  "json",
4
4
  "array",
@@ -32,5 +32,4 @@ var e = /* @__PURE__ */ new Set([
32
32
  for (let [r, i] of Object.entries(e)) n[r] = s(i, t[r]);
33
33
  return n;
34
34
  };
35
- //#endregion
36
35
  export { l as decodeRow, s as decodeValue, c as encodeRow, a as encodeValue };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@voltro/data-transfer",
3
- "version": "0.87.0",
3
+ "version": "0.88.0",
4
4
  "description": "Portable export/import for a Voltro app's data + assets — typed-NDJSON row codec, content-addressed assets, framed compression, a resumable chunk ledger, and FK-ordered idempotent import. Dialect-agnostic; the resilient backbone under `voltro data export|import` and native backups.",
5
5
  "keywords": [
6
6
  "voltro",
@@ -33,11 +33,11 @@
33
33
  "node": ">=24.0.0"
34
34
  },
35
35
  "dependencies": {
36
- "@voltro/database": "0.87.0",
37
- "@voltro/plugin-storage": "0.87.0"
36
+ "@voltro/database": "0.88.0",
37
+ "@voltro/plugin-storage": "0.88.0"
38
38
  },
39
39
  "peerDependencies": {
40
- "effect": "4.0.1"
40
+ "effect": "4.1.0"
41
41
  },
42
42
  "publishConfig": {
43
43
  "access": "public"