@voltro/data-transfer 0.84.0 → 0.86.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.
- package/CHANGELOG.md +1215 -0
- package/THIRD-PARTY-NOTICES.md +91 -365
- package/dist/assets.js +47 -0
- package/dist/blobStorage.js +40 -0
- package/dist/bundleArchive.js +165 -0
- package/dist/bundleCrypto.js +106 -0
- package/dist/casAssetPhase.js +43 -0
- package/dist/compress.js +6 -0
- package/dist/consistency.js +14 -0
- package/dist/crossDialect.js +58 -0
- package/dist/driftClassification.js +58 -0
- package/dist/environmentLocal.js +122 -0
- package/dist/errors.js +82 -0
- package/dist/exporter.js +257 -0
- package/dist/importer.js +536 -0
- package/dist/index.d.ts +118 -121
- package/dist/index.js +28 -2578
- package/dist/ledger.js +21 -0
- package/dist/liveGuard.js +11 -0
- package/dist/manifest.js +52 -0
- package/dist/masking.js +246 -0
- package/dist/maskingPreview.js +48 -0
- package/dist/nativeDump.js +369 -0
- package/dist/ndjson.js +13 -0
- package/dist/profile.js +4 -0
- package/dist/progress.js +17 -0
- package/dist/readme.js +43 -0
- package/dist/replacePreflight.js +23 -0
- package/dist/rollbackCapture.js +36 -0
- package/dist/rowFailureReason.js +36 -0
- package/dist/schemaDrift.js +40 -0
- package/dist/scope.js +40 -0
- package/dist/stagedSwap.js +164 -0
- package/dist/subset.js +90 -0
- package/dist/topo.js +24 -0
- package/dist/typedCodec.js +36 -0
- package/package.json +4 -5
package/dist/index.d.ts
CHANGED
|
@@ -20,11 +20,11 @@ import { YieldableError } from 'effect/Cause';
|
|
|
20
20
|
export declare const applyAction: (action: MaskAction, input: MaskInput) => unknown;
|
|
21
21
|
|
|
22
22
|
/**
|
|
23
|
-
* The `ImportError` inside a value, or `undefined` — through a
|
|
23
|
+
* The `ImportError` inside a value, or `undefined` — through a Cause if
|
|
24
24
|
* that is what it arrived as.
|
|
25
25
|
*
|
|
26
26
|
* A rejection that came out of the Effect runtime does not expose its payload by
|
|
27
|
-
* property access: `err._tag` reads `undefined` on a
|
|
27
|
+
* property access: `err._tag` reads `undefined` on a Cause whose failures
|
|
28
28
|
* holds a perfectly good `RowsRefusedError`. Every consumer that branches on the
|
|
29
29
|
* tag therefore silently takes the "not my error" path — which is exactly how a
|
|
30
30
|
* refusal report that was wired, tested and correct printed nothing.
|
|
@@ -60,10 +60,10 @@ export declare const assetDone: (ledger: Ledger, sha256: string) => boolean;
|
|
|
60
60
|
/** One content-addressed asset. `path` is `assets/<sha256>`; `key` is the
|
|
61
61
|
* original storage key so the importer restores it under the same key. */
|
|
62
62
|
export declare const AssetEntry: Schema.Struct<{
|
|
63
|
-
key:
|
|
64
|
-
sha256:
|
|
65
|
-
size:
|
|
66
|
-
contentType:
|
|
63
|
+
readonly key: Schema.String;
|
|
64
|
+
readonly sha256: Schema.String;
|
|
65
|
+
readonly size: Schema.Number;
|
|
66
|
+
readonly contentType: Schema.String;
|
|
67
67
|
}>;
|
|
68
68
|
|
|
69
69
|
export declare type AssetEntry = Schema.Schema.Type<typeof AssetEntry>;
|
|
@@ -114,11 +114,11 @@ export declare interface AssetSource {
|
|
|
114
114
|
}
|
|
115
115
|
|
|
116
116
|
export declare const AssetSummary: Schema.Struct<{
|
|
117
|
-
count:
|
|
118
|
-
totalBytes:
|
|
117
|
+
readonly count: Schema.Number;
|
|
118
|
+
readonly totalBytes: Schema.Number;
|
|
119
119
|
/** Bundle-relative path of the asset index (`assets/index.ndjson`), when any
|
|
120
120
|
* assets were exported. Each line is an {@link AssetEntry}. */
|
|
121
|
-
index: Schema.optional<
|
|
121
|
+
readonly index: Schema.optional<Schema.String>;
|
|
122
122
|
}>;
|
|
123
123
|
|
|
124
124
|
export declare type AssetSummary = Schema.Schema.Type<typeof AssetSummary>;
|
|
@@ -150,14 +150,14 @@ export declare interface BlobSource {
|
|
|
150
150
|
|
|
151
151
|
/** A bundle is malformed: bad manifest, unknown format version, missing file. */
|
|
152
152
|
export declare class BundleError extends BundleError_base {
|
|
153
|
+
/** The text a log line or a run record shows for this refusal. */
|
|
154
|
+
get message(): string;
|
|
153
155
|
}
|
|
154
156
|
|
|
155
|
-
declare const BundleError_base: Schema.
|
|
156
|
-
readonly
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
path: Schema.optional<typeof Schema.String>;
|
|
160
|
-
}>;
|
|
157
|
+
declare const BundleError_base: Schema.Class<BundleError, Schema.TaggedStruct<"BundleError", {
|
|
158
|
+
readonly reason: Schema.String;
|
|
159
|
+
readonly path: Schema.optional<Schema.String>;
|
|
160
|
+
}>, YieldableError>;
|
|
161
161
|
|
|
162
162
|
/** The portable meaning of a DSL column type. */
|
|
163
163
|
export declare type CanonicalCategory = 'string' | 'integer' | 'float' | 'boolean' | 'datetime' | 'date' | 'json' | 'binary' | 'reference' | 'vector' | 'enum' | 'array' | 'interval' | 'raw';
|
|
@@ -281,12 +281,10 @@ export declare const classifyImportDrift: (bundle: ReadonlyArray<DriftTable>, ta
|
|
|
281
281
|
export declare class CodecError extends CodecError_base {
|
|
282
282
|
}
|
|
283
283
|
|
|
284
|
-
declare const CodecError_base: Schema.
|
|
285
|
-
readonly
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
reason: typeof Schema.String;
|
|
289
|
-
}>;
|
|
284
|
+
declare const CodecError_base: Schema.Class<CodecError, Schema.TaggedStruct<"CodecError", {
|
|
285
|
+
readonly table: Schema.String;
|
|
286
|
+
readonly reason: Schema.String;
|
|
287
|
+
}>, YieldableError>;
|
|
290
288
|
|
|
291
289
|
export declare interface ColumnClassification {
|
|
292
290
|
readonly sensitive?: {
|
|
@@ -337,13 +335,11 @@ export declare const computeSubsetIds: (store: DataStore, snapshot: SchemaSnapsh
|
|
|
337
335
|
export declare class CrossDialectError extends CrossDialectError_base {
|
|
338
336
|
}
|
|
339
337
|
|
|
340
|
-
declare const CrossDialectError_base: Schema.
|
|
341
|
-
readonly
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
blocking: Schema.Array$<typeof Schema.String>;
|
|
346
|
-
}>;
|
|
338
|
+
declare const CrossDialectError_base: Schema.Class<CrossDialectError, Schema.TaggedStruct<"CrossDialectError", {
|
|
339
|
+
readonly sourceDialect: Schema.String;
|
|
340
|
+
readonly targetDialect: Schema.String;
|
|
341
|
+
readonly blocking: Schema.$Array<Schema.String>;
|
|
342
|
+
}>, YieldableError>;
|
|
347
343
|
|
|
348
344
|
export declare const DATA_DIR = "data";
|
|
349
345
|
|
|
@@ -392,7 +388,7 @@ export declare const decideStaging: (input: {
|
|
|
392
388
|
readonly canRunSql: boolean;
|
|
393
389
|
}) => StagingDecision;
|
|
394
390
|
|
|
395
|
-
export declare const decodeManifest: (
|
|
391
|
+
export declare const decodeManifest: (input: unknown, options?: ParseOptions) => {
|
|
396
392
|
readonly createdAt: string;
|
|
397
393
|
readonly source: {
|
|
398
394
|
readonly dialect: string;
|
|
@@ -406,25 +402,25 @@ export declare const decodeManifest: (u: unknown, overrideOptions?: ParseOptions
|
|
|
406
402
|
};
|
|
407
403
|
readonly tables: readonly {
|
|
408
404
|
readonly name: string;
|
|
409
|
-
readonly primaryKey: string;
|
|
410
405
|
readonly file: string;
|
|
411
406
|
readonly rowCount: number;
|
|
412
407
|
readonly checksum: string;
|
|
413
408
|
readonly columnTypes: {
|
|
414
409
|
readonly [x: string]: string;
|
|
415
410
|
};
|
|
411
|
+
readonly primaryKey: string;
|
|
416
412
|
}[];
|
|
417
|
-
readonly formatVersion: number;
|
|
418
413
|
readonly consistency: "live" | "snapshot";
|
|
419
414
|
readonly compression: "zstd" | "gzip" | "none";
|
|
415
|
+
readonly formatVersion: number;
|
|
420
416
|
readonly assets: {
|
|
421
|
-
readonly index?: string | undefined;
|
|
422
417
|
readonly count: number;
|
|
423
418
|
readonly totalBytes: number;
|
|
419
|
+
readonly index?: string | undefined;
|
|
424
420
|
};
|
|
425
421
|
readonly masking?: {
|
|
426
|
-
readonly policyId?: string | undefined;
|
|
427
422
|
readonly transformed: readonly string[];
|
|
423
|
+
readonly policyId?: string | undefined;
|
|
428
424
|
} | undefined;
|
|
429
425
|
};
|
|
430
426
|
|
|
@@ -516,7 +512,7 @@ export declare const dumpExcludedTables: (dialect: string) => ReadonlyArray<stri
|
|
|
516
512
|
|
|
517
513
|
export declare const emptyLedger: () => Ledger;
|
|
518
514
|
|
|
519
|
-
export declare const encodeManifest: (
|
|
515
|
+
export declare const encodeManifest: (input: {
|
|
520
516
|
readonly createdAt: string;
|
|
521
517
|
readonly source: {
|
|
522
518
|
readonly dialect: string;
|
|
@@ -530,27 +526,27 @@ export declare const encodeManifest: (a: {
|
|
|
530
526
|
};
|
|
531
527
|
readonly tables: readonly {
|
|
532
528
|
readonly name: string;
|
|
533
|
-
readonly primaryKey: string;
|
|
534
529
|
readonly file: string;
|
|
535
530
|
readonly rowCount: number;
|
|
536
531
|
readonly checksum: string;
|
|
537
532
|
readonly columnTypes: {
|
|
538
533
|
readonly [x: string]: string;
|
|
539
534
|
};
|
|
535
|
+
readonly primaryKey: string;
|
|
540
536
|
}[];
|
|
541
|
-
readonly formatVersion: number;
|
|
542
537
|
readonly consistency: "live" | "snapshot";
|
|
543
538
|
readonly compression: "zstd" | "gzip" | "none";
|
|
539
|
+
readonly formatVersion: number;
|
|
544
540
|
readonly assets: {
|
|
545
|
-
readonly index?: string | undefined;
|
|
546
541
|
readonly count: number;
|
|
547
542
|
readonly totalBytes: number;
|
|
543
|
+
readonly index?: string | undefined;
|
|
548
544
|
};
|
|
549
545
|
readonly masking?: {
|
|
550
|
-
readonly policyId?: string | undefined;
|
|
551
546
|
readonly transformed: readonly string[];
|
|
547
|
+
readonly policyId?: string | undefined;
|
|
552
548
|
} | undefined;
|
|
553
|
-
},
|
|
549
|
+
}, options?: ParseOptions) => string;
|
|
554
550
|
|
|
555
551
|
/** Encode a whole row to a JSON-safe object. */
|
|
556
552
|
export declare const encodeRow: (row: Row, columnTypes: ColumnTypes) => Record<string, unknown>;
|
|
@@ -705,9 +701,9 @@ export declare interface ExportOptions {
|
|
|
705
701
|
/** Export scope — what was selected. `all` = every table; `tenant` = the rows
|
|
706
702
|
* of one tenant (+ its FK closure); `tables` = an explicit set. */
|
|
707
703
|
export declare const ExportScope: Schema.Struct<{
|
|
708
|
-
kind: Schema.
|
|
709
|
-
tenantId: Schema.optional<
|
|
710
|
-
tables: Schema.optional<Schema
|
|
704
|
+
readonly kind: Schema.Literals<readonly ["all", "tenant", "tables"]>;
|
|
705
|
+
readonly tenantId: Schema.optional<Schema.String>;
|
|
706
|
+
readonly tables: Schema.optional<Schema.$Array<Schema.String>>;
|
|
711
707
|
/**
|
|
712
708
|
* Names deliberately left OUT of a `kind: 'all'` export.
|
|
713
709
|
*
|
|
@@ -723,7 +719,7 @@ export declare const ExportScope: Schema.Struct<{
|
|
|
723
719
|
* runs, and the manifest still says "everything, except these", which is a
|
|
724
720
|
* different and truer claim than "these".
|
|
725
721
|
*/
|
|
726
|
-
exclude: Schema.optional<Schema
|
|
722
|
+
readonly exclude: Schema.optional<Schema.$Array<Schema.String>>;
|
|
727
723
|
}>;
|
|
728
724
|
|
|
729
725
|
export declare type ExportScope = Schema.Schema.Type<typeof ExportScope>;
|
|
@@ -778,14 +774,14 @@ export declare type ImportMode = 'upsert' | 'append' | 'replace';
|
|
|
778
774
|
* bundle — e.g. `replace` (which truncates) against a PARTIAL bundle (a subset
|
|
779
775
|
* or tenant/table scope), which would delete rows the bundle never carried. */
|
|
780
776
|
export declare class ImportModeError extends ImportModeError_base {
|
|
777
|
+
/** The text a log line or a run record shows for this refusal. */
|
|
778
|
+
get message(): string;
|
|
781
779
|
}
|
|
782
780
|
|
|
783
|
-
declare const ImportModeError_base: Schema.
|
|
784
|
-
readonly
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
reason: typeof Schema.String;
|
|
788
|
-
}>;
|
|
781
|
+
declare const ImportModeError_base: Schema.Class<ImportModeError, Schema.TaggedStruct<"ImportModeError", {
|
|
782
|
+
readonly mode: Schema.String;
|
|
783
|
+
readonly reason: Schema.String;
|
|
784
|
+
}>, YieldableError>;
|
|
789
785
|
|
|
790
786
|
export declare interface ImportOptions {
|
|
791
787
|
/** Target store to write into. */
|
|
@@ -980,15 +976,15 @@ export declare interface ImportOutcome {
|
|
|
980
976
|
/** An integrity check failed — a table's content checksum or row count did not
|
|
981
977
|
* match the manifest, or an asset's bytes did not hash to its recorded id. */
|
|
982
978
|
export declare class IntegrityError extends IntegrityError_base {
|
|
979
|
+
/** The text a log line or a run record shows for this refusal. */
|
|
980
|
+
get message(): string;
|
|
983
981
|
}
|
|
984
982
|
|
|
985
|
-
declare const IntegrityError_base: Schema.
|
|
986
|
-
readonly
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
actual: typeof Schema.String;
|
|
991
|
-
}>;
|
|
983
|
+
declare const IntegrityError_base: Schema.Class<IntegrityError, Schema.TaggedStruct<"IntegrityError", {
|
|
984
|
+
readonly what: Schema.String;
|
|
985
|
+
readonly expected: Schema.String;
|
|
986
|
+
readonly actual: Schema.String;
|
|
987
|
+
}>, YieldableError>;
|
|
992
988
|
|
|
993
989
|
/** Is this table one whose rows are about the deployment rather than the app? */
|
|
994
990
|
export declare const isEnvironmentLocal: (tableName: string) => boolean;
|
|
@@ -1047,17 +1043,17 @@ export declare const makeCompressor: (c: Compression) => Duplex;
|
|
|
1047
1043
|
export declare const makeDecompressor: (c: Compression) => Duplex;
|
|
1048
1044
|
|
|
1049
1045
|
export declare const Manifest: Schema.Struct<{
|
|
1050
|
-
formatVersion:
|
|
1046
|
+
readonly formatVersion: Schema.Number;
|
|
1051
1047
|
/** ISO-8601 stamp of when the export started. */
|
|
1052
|
-
createdAt:
|
|
1053
|
-
source: Schema.Struct<{
|
|
1054
|
-
dialect:
|
|
1055
|
-
schemaFingerprint:
|
|
1048
|
+
readonly createdAt: Schema.String;
|
|
1049
|
+
readonly source: Schema.Struct<{
|
|
1050
|
+
readonly dialect: Schema.String;
|
|
1051
|
+
readonly schemaFingerprint: Schema.String;
|
|
1056
1052
|
}>;
|
|
1057
|
-
scope: Schema.Struct<{
|
|
1058
|
-
kind: Schema.
|
|
1059
|
-
tenantId: Schema.optional<
|
|
1060
|
-
tables: Schema.optional<Schema
|
|
1053
|
+
readonly scope: Schema.Struct<{
|
|
1054
|
+
readonly kind: Schema.Literals<readonly ["all", "tenant", "tables"]>;
|
|
1055
|
+
readonly tenantId: Schema.optional<Schema.String>;
|
|
1056
|
+
readonly tables: Schema.optional<Schema.$Array<Schema.String>>;
|
|
1061
1057
|
/**
|
|
1062
1058
|
* Names deliberately left OUT of a `kind: 'all'` export.
|
|
1063
1059
|
*
|
|
@@ -1073,35 +1069,35 @@ export declare const Manifest: Schema.Struct<{
|
|
|
1073
1069
|
* runs, and the manifest still says "everything, except these", which is a
|
|
1074
1070
|
* different and truer claim than "these".
|
|
1075
1071
|
*/
|
|
1076
|
-
exclude: Schema.optional<Schema
|
|
1072
|
+
readonly exclude: Schema.optional<Schema.$Array<Schema.String>>;
|
|
1077
1073
|
}>;
|
|
1078
|
-
consistency: Schema.
|
|
1079
|
-
compression: Schema.
|
|
1080
|
-
tables: Schema
|
|
1081
|
-
name:
|
|
1074
|
+
readonly consistency: Schema.Literals<readonly ["live", "snapshot"]>;
|
|
1075
|
+
readonly compression: Schema.Literals<readonly ["zstd", "gzip", "none"]>;
|
|
1076
|
+
readonly tables: Schema.$Array<Schema.Struct<{
|
|
1077
|
+
readonly name: Schema.String;
|
|
1082
1078
|
/** Bundle-relative path, e.g. `data/users.ndjson.zst`. */
|
|
1083
|
-
file:
|
|
1084
|
-
rowCount:
|
|
1079
|
+
readonly file: Schema.String;
|
|
1080
|
+
readonly rowCount: Schema.Number;
|
|
1085
1081
|
/** sha256 hex of the uncompressed NDJSON bytes. */
|
|
1086
|
-
checksum:
|
|
1082
|
+
readonly checksum: Schema.String;
|
|
1087
1083
|
/** column name → logical column type (the `ColumnType` union, as a string). */
|
|
1088
|
-
columnTypes: Schema
|
|
1084
|
+
readonly columnTypes: Schema.$Record<Schema.String, Schema.String>;
|
|
1089
1085
|
/** The unique column keyset-streamed on export (usually `id`). */
|
|
1090
|
-
primaryKey:
|
|
1086
|
+
readonly primaryKey: Schema.String;
|
|
1091
1087
|
}>>;
|
|
1092
|
-
assets: Schema.Struct<{
|
|
1093
|
-
count:
|
|
1094
|
-
totalBytes:
|
|
1088
|
+
readonly assets: Schema.Struct<{
|
|
1089
|
+
readonly count: Schema.Number;
|
|
1090
|
+
readonly totalBytes: Schema.Number;
|
|
1095
1091
|
/** Bundle-relative path of the asset index (`assets/index.ndjson`), when any
|
|
1096
1092
|
* assets were exported. Each line is an {@link AssetEntry}. */
|
|
1097
|
-
index: Schema.optional<
|
|
1093
|
+
readonly index: Schema.optional<Schema.String>;
|
|
1098
1094
|
}>;
|
|
1099
1095
|
/** Masking audit — present when the export applied a masking policy. Lists
|
|
1100
1096
|
* every `table.column` that was transformed (not copied verbatim), so a
|
|
1101
1097
|
* reviewer can see exactly what was pseudonymised. */
|
|
1102
|
-
masking: Schema.optional<Schema.Struct<{
|
|
1103
|
-
policyId: Schema.optional<
|
|
1104
|
-
transformed: Schema
|
|
1098
|
+
readonly masking: Schema.optional<Schema.Struct<{
|
|
1099
|
+
readonly policyId: Schema.optional<Schema.String>;
|
|
1100
|
+
readonly transformed: Schema.$Array<Schema.String>;
|
|
1105
1101
|
}>>;
|
|
1106
1102
|
}>;
|
|
1107
1103
|
|
|
@@ -1121,14 +1117,15 @@ export declare type MaskAction = 'keep' | 'null' | 'redact' | 'hash' | 'dateShif
|
|
|
1121
1117
|
* neither `.sensitive()` nor `.safe()` (fail-closed). Lists them so the author
|
|
1122
1118
|
* can classify each — a new column can never silently leak to a lower env. */
|
|
1123
1119
|
export declare class MaskingError extends MaskingError_base {
|
|
1120
|
+
/** The run record and the operator log carry this text; it names both lists
|
|
1121
|
+
* because they have different fixes. */
|
|
1122
|
+
get message(): string;
|
|
1124
1123
|
}
|
|
1125
1124
|
|
|
1126
|
-
declare const MaskingError_base: Schema.
|
|
1127
|
-
readonly _tag: Schema.tag<"MaskingError">;
|
|
1128
|
-
} & {
|
|
1125
|
+
declare const MaskingError_base: Schema.Class<MaskingError, Schema.TaggedStruct<"MaskingError", {
|
|
1129
1126
|
/** Columns that are neither `.sensitive()` nor `.safe()` nor covered by the
|
|
1130
1127
|
* policy — the fix is to classify them. */
|
|
1131
|
-
unclassified: Schema
|
|
1128
|
+
readonly unclassified: Schema.$Array<Schema.String>;
|
|
1132
1129
|
/**
|
|
1133
1130
|
* Columns whose policy names an action this build cannot carry out — the fix
|
|
1134
1131
|
* is to correct the policy. Kept separate from `unclassified` because a
|
|
@@ -1138,8 +1135,8 @@ declare const MaskingError_base: Schema.TaggedErrorClass<MaskingError, "MaskingE
|
|
|
1138
1135
|
* Empty on every pre-existing failure, so a reader that only knows
|
|
1139
1136
|
* `unclassified` is unaffected.
|
|
1140
1137
|
*/
|
|
1141
|
-
invalidActions: Schema.optional<Schema
|
|
1142
|
-
}>;
|
|
1138
|
+
readonly invalidActions: Schema.optional<Schema.$Array<Schema.String>>;
|
|
1139
|
+
}>, YieldableError>;
|
|
1143
1140
|
|
|
1144
1141
|
export declare interface MaskingPlan {
|
|
1145
1142
|
/** `table.column` → resolved action (excludes columns that resolve to error). */
|
|
@@ -1566,23 +1563,23 @@ declare interface RollbackCapture {
|
|
|
1566
1563
|
* list sorted by nothing sees hundreds of lines of which one matters.
|
|
1567
1564
|
*/
|
|
1568
1565
|
export declare class RowsRefusedError extends RowsRefusedError_base {
|
|
1566
|
+
/** Preserve the bounded refusal report when an error is stored as text. */
|
|
1567
|
+
get message(): string;
|
|
1569
1568
|
}
|
|
1570
1569
|
|
|
1571
|
-
declare const RowsRefusedError_base: Schema.
|
|
1572
|
-
readonly _tag: Schema.tag<"RowsRefusedError">;
|
|
1573
|
-
} & {
|
|
1570
|
+
declare const RowsRefusedError_base: Schema.Class<RowsRefusedError, Schema.TaggedStruct<"RowsRefusedError", {
|
|
1574
1571
|
/** The refused rows (capped — see {@link totalCount}), PRIMARY ones first. */
|
|
1575
|
-
rows: Schema
|
|
1576
|
-
table:
|
|
1577
|
-
id:
|
|
1578
|
-
reason:
|
|
1572
|
+
readonly rows: Schema.$Array<Schema.Struct<{
|
|
1573
|
+
readonly table: Schema.String;
|
|
1574
|
+
readonly id: Schema.String;
|
|
1575
|
+
readonly reason: Schema.String;
|
|
1579
1576
|
/** This row failed because another failed row was its parent. */
|
|
1580
|
-
derived:
|
|
1577
|
+
readonly derived: Schema.Boolean;
|
|
1581
1578
|
}>>;
|
|
1582
1579
|
/** Refused rows that are NOT a consequence of another refused row. */
|
|
1583
|
-
primaryCount:
|
|
1580
|
+
readonly primaryCount: Schema.Number;
|
|
1584
1581
|
/** Total number of refused rows (may exceed `rows.length`). */
|
|
1585
|
-
totalCount:
|
|
1582
|
+
readonly totalCount: Schema.Number;
|
|
1586
1583
|
/**
|
|
1587
1584
|
* Every table that refused a row, with COMPLETE counts — not counts of the
|
|
1588
1585
|
* capped `rows` list.
|
|
@@ -1595,14 +1592,14 @@ declare const RowsRefusedError_base: Schema.TaggedErrorClass<RowsRefusedError, "
|
|
|
1595
1592
|
* worst-first and capped separately (a bundle can carry thousands of tables;
|
|
1596
1593
|
* a hundred failing ones is already a different conversation).
|
|
1597
1594
|
*/
|
|
1598
|
-
byTable: Schema
|
|
1599
|
-
table:
|
|
1595
|
+
readonly byTable: Schema.$Array<Schema.Struct<{
|
|
1596
|
+
readonly table: Schema.String;
|
|
1600
1597
|
/** Rows of this table that were refused. */
|
|
1601
|
-
refused:
|
|
1598
|
+
readonly refused: Schema.Number;
|
|
1602
1599
|
/** …of which are not a consequence of another refused row. */
|
|
1603
|
-
primary:
|
|
1600
|
+
readonly primary: Schema.Number;
|
|
1604
1601
|
}>>;
|
|
1605
|
-
}>;
|
|
1602
|
+
}>, YieldableError>;
|
|
1606
1603
|
|
|
1607
1604
|
/** Row stream → NDJSON byte stream (each row → typed-encoded JSON + `\n`). The
|
|
1608
1605
|
* source stream's error + requirement channels pass straight through. */
|
|
@@ -1643,31 +1640,31 @@ export declare const scanForLeaks: (rows: ReadonlyArray<Row>, table: string, act
|
|
|
1643
1640
|
* the observable schema differences (missing/extra tables, per-table column
|
|
1644
1641
|
* changes) so the operator can see exactly what moved. */
|
|
1645
1642
|
export declare class SchemaDriftError extends SchemaDriftError_base {
|
|
1643
|
+
/** The text a log line or a run record shows for this refusal. */
|
|
1644
|
+
get message(): string;
|
|
1646
1645
|
}
|
|
1647
1646
|
|
|
1648
|
-
declare const SchemaDriftError_base: Schema.
|
|
1649
|
-
readonly _tag: Schema.tag<"SchemaDriftError">;
|
|
1650
|
-
} & {
|
|
1647
|
+
declare const SchemaDriftError_base: Schema.Class<SchemaDriftError, Schema.TaggedStruct<"SchemaDriftError", {
|
|
1651
1648
|
/** The fingerprint stamped in the bundle manifest (the source schema). */
|
|
1652
|
-
bundleFingerprint:
|
|
1649
|
+
readonly bundleFingerprint: Schema.String;
|
|
1653
1650
|
/** The target app's current schema fingerprint. */
|
|
1654
|
-
targetFingerprint:
|
|
1651
|
+
readonly targetFingerprint: Schema.String;
|
|
1655
1652
|
/** Human-readable summary of the drift (capped), or a note that the shape
|
|
1656
1653
|
* differs but the specific diff was not enumerated. */
|
|
1657
|
-
diff: Schema
|
|
1658
|
-
}>;
|
|
1654
|
+
readonly diff: Schema.$Array<Schema.String>;
|
|
1655
|
+
}>, YieldableError>;
|
|
1659
1656
|
|
|
1660
1657
|
/** An export scope could not be resolved safely — e.g. `{ kind: 'tenant' }`
|
|
1661
1658
|
* without a `tenantId`. Fail-closed: a scoping ambiguity refuses the export
|
|
1662
1659
|
* instead of silently widening to more rows than the operator asked for. */
|
|
1663
1660
|
export declare class ScopeError extends ScopeError_base {
|
|
1661
|
+
/** The text a log line or a run record shows for this refusal. */
|
|
1662
|
+
get message(): string;
|
|
1664
1663
|
}
|
|
1665
1664
|
|
|
1666
|
-
declare const ScopeError_base: Schema.
|
|
1667
|
-
readonly
|
|
1668
|
-
}
|
|
1669
|
-
reason: typeof Schema.String;
|
|
1670
|
-
}>;
|
|
1665
|
+
declare const ScopeError_base: Schema.Class<ScopeError, Schema.TaggedStruct<"ScopeError", {
|
|
1666
|
+
readonly reason: Schema.String;
|
|
1667
|
+
}>, YieldableError>;
|
|
1671
1668
|
|
|
1672
1669
|
/**
|
|
1673
1670
|
* A store that can run raw SQL for us.
|
|
@@ -1831,16 +1828,16 @@ export declare const tableDone: (ledger: Ledger, name: string) => boolean;
|
|
|
1831
1828
|
* re-introspecting the source. `checksum` is the sha256 of the UNCOMPRESSED
|
|
1832
1829
|
* NDJSON payload — verified during import. */
|
|
1833
1830
|
export declare const TableEntry: Schema.Struct<{
|
|
1834
|
-
name:
|
|
1831
|
+
readonly name: Schema.String;
|
|
1835
1832
|
/** Bundle-relative path, e.g. `data/users.ndjson.zst`. */
|
|
1836
|
-
file:
|
|
1837
|
-
rowCount:
|
|
1833
|
+
readonly file: Schema.String;
|
|
1834
|
+
readonly rowCount: Schema.Number;
|
|
1838
1835
|
/** sha256 hex of the uncompressed NDJSON bytes. */
|
|
1839
|
-
checksum:
|
|
1836
|
+
readonly checksum: Schema.String;
|
|
1840
1837
|
/** column name → logical column type (the `ColumnType` union, as a string). */
|
|
1841
|
-
columnTypes: Schema
|
|
1838
|
+
readonly columnTypes: Schema.$Record<Schema.String, Schema.String>;
|
|
1842
1839
|
/** The unique column keyset-streamed on export (usually `id`). */
|
|
1843
|
-
primaryKey:
|
|
1840
|
+
readonly primaryKey: Schema.String;
|
|
1844
1841
|
}>;
|
|
1845
1842
|
|
|
1846
1843
|
export declare type TableEntry = Schema.Schema.Type<typeof TableEntry>;
|