qubu 0.4.3 → 0.5.1
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/dist/{canonical-BXUguqfo.mjs → canonical-DMvR9yBe.mjs} +4 -4
- package/dist/codegen.mjs +2 -2
- package/dist/{complete-WYyVozgK.mjs → complete-DP7pliuY.mjs} +6 -6
- package/dist/diff.d.mts +201 -1
- package/dist/diff.mjs +8 -8
- package/dist/{index-DSX3IGM6.d.mts → index-C-480HmV.d.mts} +10 -10
- package/dist/introspection.mjs +24 -13
- package/dist/{snapshot-tkKoCd-F.mjs → snapshot-BSraiLtH.mjs} +2 -2
- package/dist/snapshot.d.mts +2 -2
- package/dist/snapshot.mjs +585 -5
- package/dist/{sqlite-mPVdrKrk.mjs → sqlite-CsIUtZ2Q.mjs} +4 -4
- package/docs/config.json +1 -0
- package/docs/dialects-and-execution.md +34 -0
- package/docs/index.md +6 -2
- package/docs/migrations/adapters.md +70 -0
- package/docs/migrations/artifacts-and-policy.md +123 -0
- package/docs/migrations/index.md +46 -0
- package/docs/migrations/lotta-adoption.md +50 -0
- package/docs/migrations/operations.md +133 -0
- package/docs/migrations/recovery.md +121 -0
- package/docs/reference/introspection-support.md +1 -1
- package/docs/reference/supported-surface.md +64 -44
- package/docs/schema/catalog-model.md +1 -1
- package/docs/schema/ddl-emission.md +15 -10
- package/docs/schema/introspection.md +4 -3
- package/docs/schema/migration-plans.md +6 -6
- package/docs/schema/snapshots.md +2 -2
- package/package.json +5 -14
- package/dist/ddl.d.mts +0 -118
- package/dist/ddl.mjs +0 -1119
- package/dist/index-C_BQNvbT.d.mts +0 -202
- package/dist/migration.d.mts +0 -214
- package/dist/migration.mjs +0 -1160
- package/dist/mysql-DxFleLw4.mjs +0 -585
|
@@ -943,10 +943,10 @@ function encodeCanonicalSnapshot(snapshot) {
|
|
|
943
943
|
return canonicalJson(snapshot);
|
|
944
944
|
}
|
|
945
945
|
/**
|
|
946
|
-
* Compute a small deterministic content
|
|
947
|
-
* not an entity identity, signature, or migration lineage.
|
|
946
|
+
* Compute a small deterministic content fingerprint for cache keys and diagnostics. It is
|
|
947
|
+
* deliberately not an entity identity, signature, or migration lineage.
|
|
948
948
|
*/
|
|
949
|
-
function
|
|
949
|
+
function schemaSnapshotFingerprint(snapshot) {
|
|
950
950
|
const source = encodeCanonicalSnapshot(assertSchemaSnapshot(snapshot));
|
|
951
951
|
let hash = 14695981039346656037n;
|
|
952
952
|
const prime = 1099511628211n;
|
|
@@ -969,4 +969,4 @@ function isBigInt(value) {
|
|
|
969
969
|
return Object.keys(value).length === 1 && "$bigint" in value && typeof value.$bigint === "string";
|
|
970
970
|
}
|
|
971
971
|
//#endregion
|
|
972
|
-
export { toSnapshotJsonValue as a, canonicalizeSchemaSnapshot as c, schemaSnapshotDialectVersion as d, schemaSnapshotFormat as f,
|
|
972
|
+
export { toSnapshotJsonValue as a, canonicalizeSchemaSnapshot as c, schemaSnapshotDialectVersion as d, schemaSnapshotFormat as f, schemaSnapshotFingerprint as i, decodeSchemaSnapshot as l, schemaSnapshotVersion as m, canonicalJson as n, SnapshotValidationError as o, schemaSnapshotNamingPolicyVersion as p, encodeCanonicalSnapshot as r, assertSchemaSnapshot as s, SnapshotCanonicalError as t, neutralSnapshotDialect as u };
|
package/dist/codegen.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { l as decodeSchemaSnapshot } from "./canonical-
|
|
2
|
-
import { t as mapCatalogToSnapshot } from "./snapshot-
|
|
1
|
+
import { l as decodeSchemaSnapshot } from "./canonical-DMvR9yBe.mjs";
|
|
2
|
+
import { t as mapCatalogToSnapshot } from "./snapshot-BSraiLtH.mjs";
|
|
3
3
|
//#region src/codegen/source.ts
|
|
4
4
|
const header = `/* Generated by Qubu. Do not edit this machine-owned file. */
|
|
5
5
|
import * as _qubu from 'qubu'
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as canonicalJson } from "./canonical-
|
|
1
|
+
import { n as canonicalJson } from "./canonical-DMvR9yBe.mjs";
|
|
2
2
|
//#region src/snapshot/complete-types.ts
|
|
3
3
|
/** The stable envelope tag shared by Snapshot v1 and the complete model. */
|
|
4
4
|
const completeSchemaSnapshotFormat = "qubu-schema";
|
|
@@ -68,8 +68,8 @@ function encodeCompleteSchemaSnapshot(snapshot) {
|
|
|
68
68
|
const canonical = assertCompleteSchemaSnapshot(snapshot);
|
|
69
69
|
return canonicalJson(canonical);
|
|
70
70
|
}
|
|
71
|
-
/** Compute the deterministic content
|
|
72
|
-
function
|
|
71
|
+
/** Compute the deterministic content fingerprint for a complete Snapshot v2. */
|
|
72
|
+
function completeSchemaSnapshotFingerprint(snapshot) {
|
|
73
73
|
const source = encodeCompleteSchemaSnapshot(snapshot);
|
|
74
74
|
let hash = 14695981039346656037n;
|
|
75
75
|
const prime = 1099511628211n;
|
|
@@ -89,11 +89,11 @@ const decodeSchemaSnapshotV2 = decodeCompleteSchemaSnapshot;
|
|
|
89
89
|
const assertSchemaSnapshotV2 = assertCompleteSchemaSnapshot;
|
|
90
90
|
const encodeSchemaSnapshotV2 = encodeCompleteSchemaSnapshot;
|
|
91
91
|
const canonicalizeSchemaSnapshotV2 = canonicalizeCompleteSchemaSnapshot;
|
|
92
|
-
const
|
|
92
|
+
const schemaSnapshotV2Fingerprint = completeSchemaSnapshotFingerprint;
|
|
93
93
|
const decodeCompleteSnapshot = decodeCompleteSchemaSnapshot;
|
|
94
94
|
const assertCompleteSnapshot = assertCompleteSchemaSnapshot;
|
|
95
95
|
const encodeCompleteSnapshot = encodeCompleteSchemaSnapshot;
|
|
96
|
-
const
|
|
96
|
+
const fingerprintCompleteSchemaSnapshot = completeSchemaSnapshotFingerprint;
|
|
97
97
|
function validateCompleteSnapshot(value, diagnostics) {
|
|
98
98
|
requireKeys(value, [
|
|
99
99
|
"format",
|
|
@@ -1785,4 +1785,4 @@ function deepFreeze(value, seen = /* @__PURE__ */ new WeakSet()) {
|
|
|
1785
1785
|
return Object.freeze(value);
|
|
1786
1786
|
}
|
|
1787
1787
|
//#endregion
|
|
1788
|
-
export { completeSchemaSnapshotVersion as _, canonicalizeCompleteSchemaSnapshot as a, schemaSnapshotVersion2 as b, decodeCompleteSchemaSnapshot as c,
|
|
1788
|
+
export { completeSchemaSnapshotVersion as _, canonicalizeCompleteSchemaSnapshot as a, schemaSnapshotVersion2 as b, decodeCompleteSchemaSnapshot as c, encodeCompleteSchemaSnapshot as d, encodeCompleteSnapshot as f, completeSchemaSnapshotFormat as g, schemaSnapshotV2Fingerprint as h, assertSchemaSnapshotV2 as i, decodeCompleteSnapshot as l, fingerprintCompleteSchemaSnapshot as m, assertCompleteSchemaSnapshot as n, canonicalizeSchemaSnapshotV2 as o, encodeSchemaSnapshotV2 as p, assertCompleteSnapshot as r, completeSchemaSnapshotFingerprint as s, CompleteSnapshotValidationError as t, decodeSchemaSnapshotV2 as u, schemaSnapshotCompleteVersion as v, schemaSnapshotV2Version as y };
|
package/dist/diff.d.mts
CHANGED
|
@@ -1,2 +1,202 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { T as SnapshotJsonValue, m as SnapshotDialect, n as SchemaSnapshot } from "./types-C0VkiwpR.mjs";
|
|
2
|
+
import { S as CompleteSnapshotObjectKind, t as CompleteSchemaSnapshot } from "./complete-types-CY0KbzNw.mjs";
|
|
3
|
+
//#region src/diff/types.d.ts
|
|
4
|
+
/** Object families understood by the snapshot diff engine. */
|
|
5
|
+
type SnapshotDiffObjectKind = CompleteSnapshotObjectKind;
|
|
6
|
+
/** A path into a canonical snapshot or one of its object records. */
|
|
7
|
+
type SnapshotDiffPath = readonly (string | number)[];
|
|
8
|
+
/** A stable reference to an object in a rename hint. */
|
|
9
|
+
interface SnapshotRenameTarget {
|
|
10
|
+
/** Stable logical ID, when the source or target snapshot has one. */
|
|
11
|
+
readonly id?: string;
|
|
12
|
+
/** Physical name evidence used when logical IDs changed. */
|
|
13
|
+
readonly physicalName?: string;
|
|
14
|
+
/** Optional exact object path for a repeated ID in a nested scope. */
|
|
15
|
+
readonly path?: SnapshotDiffPath;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* An explicit, serializable physical-rename mapping.
|
|
19
|
+
*
|
|
20
|
+
* `namespace` and `kind` are part of the key. A hint never crosses either boundary, and a hint is
|
|
21
|
+
* only authoritative after both targets resolve to exactly one object.
|
|
22
|
+
*/
|
|
23
|
+
interface SnapshotRenameHint {
|
|
24
|
+
readonly namespace?: string;
|
|
25
|
+
readonly kind: SnapshotDiffObjectKind;
|
|
26
|
+
readonly from: string | SnapshotRenameTarget;
|
|
27
|
+
readonly to: string | SnapshotRenameTarget;
|
|
28
|
+
}
|
|
29
|
+
/** Input accepted by the diff and hint helpers. */
|
|
30
|
+
type SnapshotDiffInput = SchemaSnapshot | CompleteSchemaSnapshot | string | Readonly<Record<string, unknown>>;
|
|
31
|
+
/** Evidence attached to an object, match, operation, or diagnostic. */
|
|
32
|
+
interface SnapshotDiffEvidence {
|
|
33
|
+
readonly kind: "logical-id" | "physical-name" | "physical-reference" | "provenance" | "dialect" | "canonical" | "explicit-hint" | "structural" | "ambiguity";
|
|
34
|
+
readonly path?: SnapshotDiffPath;
|
|
35
|
+
readonly value?: SnapshotJsonValue;
|
|
36
|
+
readonly message?: string;
|
|
37
|
+
readonly confidence?: number;
|
|
38
|
+
}
|
|
39
|
+
/** An immutable object view retained by a diff result. */
|
|
40
|
+
interface SnapshotDiffObject {
|
|
41
|
+
readonly kind: SnapshotDiffObjectKind;
|
|
42
|
+
/** The deferred or opaque kind observed by an adapter, if any. */
|
|
43
|
+
readonly observedKind?: string;
|
|
44
|
+
readonly namespace?: string;
|
|
45
|
+
readonly path: SnapshotDiffPath;
|
|
46
|
+
readonly parent?: SnapshotDiffObjectReference;
|
|
47
|
+
readonly id: string;
|
|
48
|
+
readonly physicalName?: string;
|
|
49
|
+
readonly physicalReference?: SnapshotJsonValue;
|
|
50
|
+
readonly dialect: SnapshotDialect;
|
|
51
|
+
readonly provenance?: SnapshotJsonValue;
|
|
52
|
+
/** The original validated object record, retained as immutable data. */
|
|
53
|
+
readonly value: Readonly<Record<string, SnapshotJsonValue>>;
|
|
54
|
+
readonly evidence: readonly SnapshotDiffEvidence[];
|
|
55
|
+
}
|
|
56
|
+
/** A logical object reference used in parent and related-object evidence. */
|
|
57
|
+
interface SnapshotDiffObjectReference {
|
|
58
|
+
readonly kind: SnapshotDiffObjectKind;
|
|
59
|
+
readonly id: string;
|
|
60
|
+
readonly namespace?: string;
|
|
61
|
+
}
|
|
62
|
+
/** One changed property in a matched object pair. */
|
|
63
|
+
interface SnapshotDiffPropertyChange {
|
|
64
|
+
readonly path: SnapshotDiffPath;
|
|
65
|
+
readonly before?: SnapshotJsonValue;
|
|
66
|
+
readonly after?: SnapshotJsonValue;
|
|
67
|
+
}
|
|
68
|
+
/** Categories of emitted diff operations. */
|
|
69
|
+
type SnapshotDiffOperationType = "add" | "remove" | "property-change" | "physical-rename";
|
|
70
|
+
/** A diff operation. All variants retain both object identity and evidence. */
|
|
71
|
+
interface SnapshotDiffOperation {
|
|
72
|
+
readonly type: SnapshotDiffOperationType;
|
|
73
|
+
/** Alias for callers that use operation terminology. */
|
|
74
|
+
readonly operation: SnapshotDiffOperationType;
|
|
75
|
+
readonly classification: SnapshotDiffOperationType;
|
|
76
|
+
readonly changeKind: SnapshotDiffOperationType;
|
|
77
|
+
readonly kind: SnapshotDiffObjectKind;
|
|
78
|
+
readonly objectKind: SnapshotDiffObjectKind;
|
|
79
|
+
readonly namespace?: string;
|
|
80
|
+
readonly path: SnapshotDiffPath;
|
|
81
|
+
readonly dialect: SnapshotDialect;
|
|
82
|
+
readonly physicalReference?: SnapshotJsonValue;
|
|
83
|
+
readonly provenance?: SnapshotJsonValue;
|
|
84
|
+
readonly before?: SnapshotDiffObject;
|
|
85
|
+
readonly after?: SnapshotDiffObject;
|
|
86
|
+
readonly object?: SnapshotDiffObject;
|
|
87
|
+
readonly logicalId?: string;
|
|
88
|
+
readonly physicalName?: string;
|
|
89
|
+
readonly changedProperties?: readonly SnapshotDiffPropertyChange[];
|
|
90
|
+
readonly evidence: readonly SnapshotDiffEvidence[];
|
|
91
|
+
readonly source: "stable-id" | "explicit-hint";
|
|
92
|
+
readonly destructive: boolean;
|
|
93
|
+
}
|
|
94
|
+
/** A conservative structural match suggestion. It is never an operation. */
|
|
95
|
+
interface SnapshotRenameSuggestion {
|
|
96
|
+
readonly type: "rename-suggestion";
|
|
97
|
+
readonly operation: "rename-suggestion";
|
|
98
|
+
readonly kind: SnapshotDiffObjectKind;
|
|
99
|
+
readonly objectKind: SnapshotDiffObjectKind;
|
|
100
|
+
readonly namespace?: string;
|
|
101
|
+
readonly before: SnapshotDiffObject;
|
|
102
|
+
readonly after: SnapshotDiffObject;
|
|
103
|
+
readonly confidence: number;
|
|
104
|
+
readonly evidence: readonly SnapshotDiffEvidence[];
|
|
105
|
+
}
|
|
106
|
+
/** Diagnostic categories emitted by snapshot comparison and hint validation. */
|
|
107
|
+
type SnapshotDiffDiagnosticCode = "ambiguous" | "destructive" | "unsupported" | "unknown" | "lossy" | "invalid-snapshot" | "invalid-rename-hint" | "rename-conflict" | "dialect-mismatch";
|
|
108
|
+
/** A path-addressed diff diagnostic with object and dialect context. */
|
|
109
|
+
interface SnapshotDiffDiagnostic {
|
|
110
|
+
readonly code: SnapshotDiffDiagnosticCode;
|
|
111
|
+
readonly category: SnapshotDiffDiagnosticCode;
|
|
112
|
+
readonly severity: "error" | "warning";
|
|
113
|
+
readonly message: string;
|
|
114
|
+
readonly path: SnapshotDiffPath;
|
|
115
|
+
readonly relatedPaths?: readonly SnapshotDiffPath[];
|
|
116
|
+
readonly kind?: SnapshotDiffObjectKind;
|
|
117
|
+
readonly objectKind?: SnapshotDiffObjectKind;
|
|
118
|
+
readonly namespace?: string;
|
|
119
|
+
readonly logicalId?: string;
|
|
120
|
+
readonly physicalName?: string;
|
|
121
|
+
readonly dialect?: SnapshotDialect;
|
|
122
|
+
readonly evidence?: readonly SnapshotDiffEvidence[];
|
|
123
|
+
}
|
|
124
|
+
/** Options controlling explicit hints and conservative suggestions. */
|
|
125
|
+
interface SnapshotDiffOptions {
|
|
126
|
+
/** Authoritative mappings. `renames` is accepted as an ergonomic alias. */
|
|
127
|
+
readonly renameHints?: readonly SnapshotRenameHint[];
|
|
128
|
+
readonly renames?: readonly SnapshotRenameHint[];
|
|
129
|
+
/** Disable structural suggestions while retaining stable and explicit matches. */
|
|
130
|
+
readonly suggestions?: boolean;
|
|
131
|
+
/** Minimum score for a unique heuristic suggestion. Defaults to 0.75. */
|
|
132
|
+
readonly suggestionThreshold?: number;
|
|
133
|
+
}
|
|
134
|
+
/** The complete immutable output of `diffSnapshots`. */
|
|
135
|
+
interface SnapshotDiff {
|
|
136
|
+
readonly equal: boolean;
|
|
137
|
+
readonly beforeVersion?: 1 | 2;
|
|
138
|
+
readonly afterVersion?: 1 | 2;
|
|
139
|
+
readonly beforeDialect?: SnapshotDialect;
|
|
140
|
+
readonly afterDialect?: SnapshotDialect;
|
|
141
|
+
readonly beforeFingerprint?: string;
|
|
142
|
+
readonly afterFingerprint?: string;
|
|
143
|
+
readonly operations: readonly SnapshotDiffOperation[];
|
|
144
|
+
readonly changes: readonly SnapshotDiffOperation[];
|
|
145
|
+
readonly additions: readonly SnapshotDiffOperation[];
|
|
146
|
+
readonly removals: readonly SnapshotDiffOperation[];
|
|
147
|
+
readonly propertyChanges: readonly SnapshotDiffOperation[];
|
|
148
|
+
readonly renames: readonly SnapshotDiffOperation[];
|
|
149
|
+
readonly added: readonly SnapshotDiffOperation[];
|
|
150
|
+
readonly removed: readonly SnapshotDiffOperation[];
|
|
151
|
+
readonly changed: readonly SnapshotDiffOperation[];
|
|
152
|
+
readonly physicalRenames: readonly SnapshotDiffOperation[];
|
|
153
|
+
readonly suggestions: readonly SnapshotRenameSuggestion[];
|
|
154
|
+
readonly diagnostics: readonly SnapshotDiffDiagnostic[];
|
|
155
|
+
readonly issues: readonly SnapshotDiffDiagnostic[];
|
|
156
|
+
readonly renameHints: readonly SnapshotRenameHint[];
|
|
157
|
+
readonly hints: readonly SnapshotRenameHint[];
|
|
158
|
+
}
|
|
159
|
+
/** Result returned by serializable rename-hint validation/decoding helpers. */
|
|
160
|
+
type SnapshotRenameHintResult = {
|
|
161
|
+
readonly ok: true;
|
|
162
|
+
readonly value: readonly SnapshotRenameHint[];
|
|
163
|
+
readonly diagnostics: readonly SnapshotDiffDiagnostic[];
|
|
164
|
+
} | {
|
|
165
|
+
readonly ok: false;
|
|
166
|
+
readonly value: readonly SnapshotRenameHint[];
|
|
167
|
+
readonly diagnostics: readonly SnapshotDiffDiagnostic[];
|
|
168
|
+
};
|
|
169
|
+
/** Decode diagnostics without throwing, suitable for editor and CLI callers. */
|
|
170
|
+
type SnapshotDiffDecodeResult = {
|
|
171
|
+
readonly ok: true;
|
|
172
|
+
readonly version: 1 | 2;
|
|
173
|
+
readonly value: SchemaSnapshot | CompleteSchemaSnapshot;
|
|
174
|
+
} | {
|
|
175
|
+
readonly ok: false;
|
|
176
|
+
readonly diagnostics: readonly SnapshotDiffDiagnostic[];
|
|
177
|
+
};
|
|
178
|
+
//#endregion
|
|
179
|
+
//#region src/diff/diff.d.ts
|
|
180
|
+
/**
|
|
181
|
+
* Compare Snapshot v1 or v2 values and return immutable, reviewable data.
|
|
182
|
+
*
|
|
183
|
+
* The function never opens a connection, renders SQL, or turns a heuristic match into a rename.
|
|
184
|
+
* Invalid input and malformed hints are represented by diagnostics in the returned value.
|
|
185
|
+
*/
|
|
186
|
+
declare function diffSnapshots(beforeInput: SnapshotDiffInput, afterInput: SnapshotDiffInput, options?: SnapshotDiffOptions): SnapshotDiff;
|
|
187
|
+
/** Alias that reads naturally in comparison-oriented callers. */
|
|
188
|
+
declare const compareSnapshots: typeof diffSnapshots;
|
|
189
|
+
/** Decode and normalize a Snapshot v1 or v2 value without throwing. */
|
|
190
|
+
declare function decodeSnapshotForDiff(input: SnapshotDiffInput): SnapshotDiffDecodeResult;
|
|
191
|
+
/** Validate rename hints and return a frozen, serializable list. */
|
|
192
|
+
declare function validateSnapshotRenameHints(hints: readonly SnapshotRenameHint[] | unknown): SnapshotRenameHintResult;
|
|
193
|
+
/** Serialize validated rename hints as deterministic JSON. */
|
|
194
|
+
declare function encodeSnapshotRenameHints(hints: readonly SnapshotRenameHint[]): string;
|
|
195
|
+
/** Decode deterministic rename-hint JSON without throwing. */
|
|
196
|
+
declare function decodeSnapshotRenameHints(input: string | unknown): SnapshotRenameHintResult;
|
|
197
|
+
/** Short aliases for callers that keep rename helpers beside `diffSnapshots`. */
|
|
198
|
+
declare const validateRenameHints: typeof validateSnapshotRenameHints;
|
|
199
|
+
declare const encodeRenameHints: typeof encodeSnapshotRenameHints;
|
|
200
|
+
declare const decodeRenameHints: typeof decodeSnapshotRenameHints;
|
|
201
|
+
//#endregion
|
|
2
202
|
export { SnapshotDiff, SnapshotDiffDecodeResult, SnapshotDiffDiagnostic, SnapshotDiffDiagnosticCode, SnapshotDiffEvidence, SnapshotDiffInput, SnapshotDiffObject, SnapshotDiffObjectKind, SnapshotDiffObjectReference, SnapshotDiffOperation, SnapshotDiffOperationType, SnapshotDiffOptions, SnapshotDiffPath, SnapshotDiffPropertyChange, SnapshotRenameHint, SnapshotRenameHintResult, SnapshotRenameSuggestion, SnapshotRenameTarget, compareSnapshots, decodeRenameHints, decodeSnapshotForDiff, decodeSnapshotRenameHints, diffSnapshots, encodeRenameHints, encodeSnapshotRenameHints, validateRenameHints, validateSnapshotRenameHints };
|
package/dist/diff.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { a as toSnapshotJsonValue, i as
|
|
2
|
-
import { c as decodeCompleteSchemaSnapshot, s as
|
|
1
|
+
import { a as toSnapshotJsonValue, i as schemaSnapshotFingerprint, l as decodeSchemaSnapshot, n as canonicalJson } from "./canonical-DMvR9yBe.mjs";
|
|
2
|
+
import { c as decodeCompleteSchemaSnapshot, s as completeSchemaSnapshotFingerprint } from "./complete-DP7pliuY.mjs";
|
|
3
3
|
//#region src/diff/diff.ts
|
|
4
4
|
const objectKinds = /* @__PURE__ */ new Set([
|
|
5
5
|
"namespace",
|
|
@@ -63,12 +63,12 @@ function diffSnapshots(beforeInput, afterInput, options = {}) {
|
|
|
63
63
|
...before.snapshot ? {
|
|
64
64
|
beforeVersion: before.snapshot.version,
|
|
65
65
|
beforeDialect: before.snapshot.value.dialect,
|
|
66
|
-
|
|
66
|
+
beforeFingerprint: before.snapshot.fingerprint
|
|
67
67
|
} : {},
|
|
68
68
|
...after.snapshot ? {
|
|
69
69
|
afterVersion: after.snapshot.version,
|
|
70
70
|
afterDialect: after.snapshot.value.dialect,
|
|
71
|
-
|
|
71
|
+
afterFingerprint: after.snapshot.fingerprint
|
|
72
72
|
} : {}
|
|
73
73
|
});
|
|
74
74
|
const left = before.snapshot;
|
|
@@ -233,8 +233,8 @@ function diffSnapshots(beforeInput, afterInput, options = {}) {
|
|
|
233
233
|
afterVersion: right.version,
|
|
234
234
|
beforeDialect: left.value.dialect,
|
|
235
235
|
afterDialect: right.value.dialect,
|
|
236
|
-
|
|
237
|
-
|
|
236
|
+
beforeFingerprint: left.fingerprint,
|
|
237
|
+
afterFingerprint: right.fingerprint,
|
|
238
238
|
operations: sortedOperations,
|
|
239
239
|
changes: sortedOperations,
|
|
240
240
|
additions,
|
|
@@ -376,7 +376,7 @@ function decodeSnapshot(input) {
|
|
|
376
376
|
version: 2,
|
|
377
377
|
value: snapshot,
|
|
378
378
|
records: extractCompleteObjects(snapshot),
|
|
379
|
-
|
|
379
|
+
fingerprint: completeSchemaSnapshotFingerprint(snapshot)
|
|
380
380
|
}
|
|
381
381
|
};
|
|
382
382
|
}
|
|
@@ -393,7 +393,7 @@ function decodeSnapshot(input) {
|
|
|
393
393
|
version: 1,
|
|
394
394
|
value: snapshot,
|
|
395
395
|
records: extractV1Objects(snapshot),
|
|
396
|
-
|
|
396
|
+
fingerprint: schemaSnapshotFingerprint(snapshot)
|
|
397
397
|
}
|
|
398
398
|
};
|
|
399
399
|
}
|
|
@@ -13,10 +13,10 @@ declare function canonicalJson(value: SnapshotJsonValue): string;
|
|
|
13
13
|
/** Canonical JSON for a schema snapshot after fixed-order reconstruction. */
|
|
14
14
|
declare function encodeCanonicalSnapshot(snapshot: SchemaSnapshot): string;
|
|
15
15
|
/**
|
|
16
|
-
* Compute a small deterministic content
|
|
17
|
-
* not an entity identity, signature, or migration lineage.
|
|
16
|
+
* Compute a small deterministic content fingerprint for cache keys and diagnostics. It is
|
|
17
|
+
* deliberately not an entity identity, signature, or migration lineage.
|
|
18
18
|
*/
|
|
19
|
-
declare function
|
|
19
|
+
declare function schemaSnapshotFingerprint(snapshot: SchemaSnapshotInput | string): string;
|
|
20
20
|
//#endregion
|
|
21
21
|
//#region src/snapshot/complete.d.ts
|
|
22
22
|
/** Error raised by throwing APIs after collecting strict v2 diagnostics. */
|
|
@@ -34,18 +34,18 @@ declare function assertCompleteSchemaSnapshot(input: CompleteSchemaSnapshotInput
|
|
|
34
34
|
declare function canonicalizeCompleteSchemaSnapshot(input: CompleteSchemaSnapshotInput): CompleteSchemaSnapshot;
|
|
35
35
|
/** Encode a complete snapshot with deterministic property and array order. */
|
|
36
36
|
declare function encodeCompleteSchemaSnapshot(snapshot: CompleteSchemaSnapshot): string;
|
|
37
|
-
/** Compute the deterministic content
|
|
38
|
-
declare function
|
|
37
|
+
/** Compute the deterministic content fingerprint for a complete Snapshot v2. */
|
|
38
|
+
declare function completeSchemaSnapshotFingerprint(snapshot: CompleteSchemaSnapshotInput | string): string;
|
|
39
39
|
/** Numbered aliases for tooling that keeps v1 and v2 side by side. */
|
|
40
40
|
declare const decodeSchemaSnapshotV2: typeof decodeCompleteSchemaSnapshot;
|
|
41
41
|
declare const assertSchemaSnapshotV2: typeof assertCompleteSchemaSnapshot;
|
|
42
42
|
declare const encodeSchemaSnapshotV2: typeof encodeCompleteSchemaSnapshot;
|
|
43
43
|
declare const canonicalizeSchemaSnapshotV2: typeof canonicalizeCompleteSchemaSnapshot;
|
|
44
|
-
declare const
|
|
44
|
+
declare const schemaSnapshotV2Fingerprint: typeof completeSchemaSnapshotFingerprint;
|
|
45
45
|
declare const decodeCompleteSnapshot: typeof decodeCompleteSchemaSnapshot;
|
|
46
46
|
declare const assertCompleteSnapshot: typeof assertCompleteSchemaSnapshot;
|
|
47
47
|
declare const encodeCompleteSnapshot: typeof encodeCompleteSchemaSnapshot;
|
|
48
|
-
declare const
|
|
48
|
+
declare const fingerprintCompleteSchemaSnapshot: typeof completeSchemaSnapshotFingerprint;
|
|
49
49
|
//#endregion
|
|
50
50
|
//#region src/snapshot/decode.d.ts
|
|
51
51
|
/** Error raised by throwing snapshot APIs after collecting diagnostics. */
|
|
@@ -90,8 +90,8 @@ declare function encodeSchemaSnapshot(snapshot: SchemaSnapshot): string;
|
|
|
90
90
|
declare const serializeSchema: typeof createSchemaSnapshot;
|
|
91
91
|
/** Alias for the canonical snapshot encoder. */
|
|
92
92
|
declare const encodeSnapshot: typeof encodeSchemaSnapshot;
|
|
93
|
-
/** Alias for the canonical snapshot
|
|
94
|
-
declare const
|
|
93
|
+
/** Alias for the canonical snapshot fingerprint helper. */
|
|
94
|
+
declare const fingerprintSchemaSnapshot: typeof schemaSnapshotFingerprint;
|
|
95
95
|
//#endregion
|
|
96
96
|
//#region src/snapshot/postgres.d.ts
|
|
97
97
|
/** PostgreSQL's v1 snapshot extension identity. */
|
|
@@ -143,4 +143,4 @@ declare function tryCreateMysqlSchemaSnapshot<TSchema extends Schema<any>>(schem
|
|
|
143
143
|
/** Options accepted by the MySQL snapshot convenience functions. */
|
|
144
144
|
type MysqlSnapshotOptions = Omit<SchemaSnapshotOptions, "adapter" | "dialect">;
|
|
145
145
|
//#endregion
|
|
146
|
-
export { assertSchemaSnapshot as A, decodeCompleteSchemaSnapshot as B, createSchemaSnapshot as C, serializeSchema as D,
|
|
146
|
+
export { assertSchemaSnapshot as A, decodeCompleteSchemaSnapshot as B, createSchemaSnapshot as C, serializeSchema as D, fingerprintSchemaSnapshot as E, assertCompleteSnapshot as F, encodeSchemaSnapshotV2 as G, decodeSchemaSnapshotV2 as H, assertSchemaSnapshotV2 as I, SnapshotCanonicalError as J, fingerprintCompleteSchemaSnapshot as K, canonicalizeCompleteSchemaSnapshot as L, decodeSchemaSnapshot as M, CompleteSnapshotValidationError as N, tryCreateSchemaSnapshot as O, assertCompleteSchemaSnapshot as P, toSnapshotJsonValue as Q, canonicalizeSchemaSnapshotV2 as R, SnapshotSerializationError as S, encodeSnapshot as T, encodeCompleteSchemaSnapshot as U, decodeCompleteSnapshot as V, encodeCompleteSnapshot as W, encodeCanonicalSnapshot as X, canonicalJson as Y, schemaSnapshotFingerprint as Z, postgresSchemaDialect as _, mysqlSnapshotDialect as a, tryCreatePostgresSchemaSnapshot as b, SqliteStorageAffinity as c, sqliteSnapshotAdapter as d, sqliteSnapshotDialect as f, createPostgresSchemaSnapshot as g, PostgresSnapshotOptions as h, mysqlSnapshotAdapter as i, canonicalizeSchemaSnapshot as j, SnapshotValidationError as k, createSqliteSchemaSnapshot as l, tryCreateSqliteSchemaSnapshot as m, createMysqlSchemaSnapshot as n, tryCreateMysqlSchemaSnapshot as o, sqliteStorageAffinity as p, schemaSnapshotV2Fingerprint as q, mysqlSchemaDialect as r, SqliteSnapshotOptions as s, MysqlSnapshotOptions as t, sqliteSchemaDialect as u, postgresSnapshotAdapter as v, encodeSchemaSnapshot as w, SchemaSnapshotOptions as x, postgresSnapshotDialect as y, completeSchemaSnapshotFingerprint as z };
|
package/dist/introspection.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { a as toSnapshotJsonValue } from "./canonical-
|
|
2
|
-
import { a as hasIntrospectionErrors, i as createIntrospectionDiagnostic, n as introspectedPhysicalIdentityPolicy, r as IntrospectionError, t as mapCatalogToSnapshot } from "./snapshot-
|
|
3
|
-
import { n as assertCompleteSchemaSnapshot } from "./complete-
|
|
1
|
+
import { a as toSnapshotJsonValue } from "./canonical-DMvR9yBe.mjs";
|
|
2
|
+
import { a as hasIntrospectionErrors, i as createIntrospectionDiagnostic, n as introspectedPhysicalIdentityPolicy, r as IntrospectionError, t as mapCatalogToSnapshot } from "./snapshot-BSraiLtH.mjs";
|
|
3
|
+
import { n as assertCompleteSchemaSnapshot } from "./complete-DP7pliuY.mjs";
|
|
4
4
|
import "./snapshot.mjs";
|
|
5
5
|
//#region src/introspection/catalog.ts
|
|
6
6
|
/**
|
|
@@ -3513,7 +3513,7 @@ async function readSqliteCatalog(connection, options) {
|
|
|
3513
3513
|
for (const indexRow of indexRows) {
|
|
3514
3514
|
const indexName = text(indexRow.name);
|
|
3515
3515
|
if (!indexName || indexName.startsWith("sqlite_autoindex_") && text(indexRow.origin)?.toLowerCase() !== "u") continue;
|
|
3516
|
-
const index = sqliteIndex(currentTable, indexRow, await query(connection, sqliteIndexInfoQuery, [indexName, options.namespace], options, diagnostics, `index-info:${indexName}`), tableSql.get(indexName), options.namespace, diagnostics, opaqueObjects);
|
|
3516
|
+
const index = sqliteIndex(currentTable, indexRow, await query(connection, sqliteIndexInfoQuery, [indexName, options.namespace], options, diagnostics, `index-info:${indexName}`), text(indexRow.origin)?.toLowerCase() === "u" ? sqlText : tableSql.get(indexName), options.namespace, diagnostics, opaqueObjects);
|
|
3517
3517
|
if (!index) continue;
|
|
3518
3518
|
if (index.kind === "index") mappedIndexes.push(index);
|
|
3519
3519
|
else mappedConstraints.push(index);
|
|
@@ -4082,25 +4082,27 @@ function tableConstraints(table, rows, columns, sqlText, namespace) {
|
|
|
4082
4082
|
const primaryColumns = columns.filter((column) => primaryNames.has(column.physicalName)).sort((left, right) => primaryNames.get(left.physicalName) - primaryNames.get(right.physicalName));
|
|
4083
4083
|
const constraints = [];
|
|
4084
4084
|
if (primaryColumns.length > 0) {
|
|
4085
|
+
const declaredName = declaredConstraintName(sqlText, "PRIMARY\\s+KEY", primaryColumns.map((column) => column.physicalName));
|
|
4086
|
+
const primaryName = declaredName ?? `primary_${table.physicalName}`;
|
|
4085
4087
|
const primary = {
|
|
4086
4088
|
kind: "primary-key",
|
|
4087
|
-
id: stableId(
|
|
4088
|
-
identitySource: "deterministic-fallback",
|
|
4089
|
-
physicalName:
|
|
4089
|
+
id: stableId(primaryName),
|
|
4090
|
+
identitySource: declaredName ? "physical-name" : "deterministic-fallback",
|
|
4091
|
+
physicalName: primaryName,
|
|
4090
4092
|
columns: primaryColumns.map((column) => column.physicalName),
|
|
4091
4093
|
dialect: sqliteExtension({ source: "pragma_table_xinfo" }),
|
|
4092
|
-
reference: reference("constraint",
|
|
4094
|
+
reference: reference("constraint", primaryName, namespace, "sqlite_schema", "tbl_name")
|
|
4093
4095
|
};
|
|
4094
4096
|
constraints.push(primary);
|
|
4095
4097
|
}
|
|
4096
|
-
[...sqlText?.matchAll(/CHECK\s*\(([^()]*(?:\([^()]*\)[^()]*)*)\)/gi) ?? []].forEach((match, index) => {
|
|
4097
|
-
const name = `check_${index}_${table.physicalName}`;
|
|
4098
|
+
[...sqlText?.matchAll(/(?:CONSTRAINT\s+("(?:[^"]|"")*"|`[^`]*`|\[[^\]]*\]|[A-Za-z_][A-Za-z0-9_$]*)\s+)?CHECK\s*\(([^()]*(?:\([^()]*\)[^()]*)*)\)/gi) ?? []].forEach((match, index) => {
|
|
4099
|
+
const name = unquoteIdentifier(match[1]) ?? `check_${index}_${table.physicalName}`;
|
|
4098
4100
|
const check = {
|
|
4099
4101
|
kind: "check",
|
|
4100
4102
|
id: stableId(name),
|
|
4101
4103
|
identitySource: "deterministic-fallback",
|
|
4102
4104
|
physicalName: name,
|
|
4103
|
-
expression: sql(match[
|
|
4105
|
+
expression: sql(match[2] ?? "true", namespace, table, name),
|
|
4104
4106
|
dialect: sqliteExtension({ source: "create-sql" })
|
|
4105
4107
|
};
|
|
4106
4108
|
constraints.push(check);
|
|
@@ -4170,11 +4172,12 @@ function sqliteIndex(table, row, infoRows, sqlText, namespace, diagnostics, opaq
|
|
|
4170
4172
|
if (text(row.origin) === "u") {
|
|
4171
4173
|
const internalName = physicalName.startsWith("sqlite_autoindex_");
|
|
4172
4174
|
const termNames = terms.map((term) => term.kind === "column" ? term.column : `expression_${term.position}`);
|
|
4173
|
-
const
|
|
4175
|
+
const declaredName = declaredConstraintName(sqlText, "UNIQUE", termNames);
|
|
4176
|
+
const constraintName = internalName ? declaredName ?? `unique_${table.physicalName}_${termNames.join("_") || "constraint"}` : physicalName;
|
|
4174
4177
|
return {
|
|
4175
4178
|
kind: "unique",
|
|
4176
4179
|
id: stableId(constraintName),
|
|
4177
|
-
identitySource: internalName ? "deterministic-fallback" : "physical-name",
|
|
4180
|
+
identitySource: internalName && !declaredName ? "deterministic-fallback" : "physical-name",
|
|
4178
4181
|
physicalName: constraintName,
|
|
4179
4182
|
columns: terms.flatMap((term) => term.kind === "column" ? [term.column] : []),
|
|
4180
4183
|
nulls: "distinct",
|
|
@@ -4202,6 +4205,14 @@ function sqliteIndex(table, row, infoRows, sqlText, namespace, diagnostics, opaq
|
|
|
4202
4205
|
reference: reference("index", physicalName, namespace, "sqlite_schema", "name")
|
|
4203
4206
|
};
|
|
4204
4207
|
}
|
|
4208
|
+
function declaredConstraintName(sqlText, keyword, columns) {
|
|
4209
|
+
if (!sqlText) return void 0;
|
|
4210
|
+
const pattern = new RegExp(`CONSTRAINT\\s+("(?:[^"]|"")*"|\`[^\`]*\`|\\[[^\\]]*\\]|[A-Za-z_][A-Za-z0-9_\$]*)\\s+${keyword}\\s*\\(([^)]*)\\)`, "gi");
|
|
4211
|
+
for (const match of sqlText.matchAll(pattern)) {
|
|
4212
|
+
const found = (match[2] ?? "").split(",").map((value) => unquoteIdentifier(value.trim())).filter((value) => value !== void 0);
|
|
4213
|
+
if (found.length === columns.length && found.every((value, index) => value === columns[index])) return unquoteIdentifier(match[1]);
|
|
4214
|
+
}
|
|
4215
|
+
}
|
|
4205
4216
|
function foreignKeys(table, rows, namespace) {
|
|
4206
4217
|
const grouped = /* @__PURE__ */ new Map();
|
|
4207
4218
|
for (const row of rows) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { s as assertSchemaSnapshot } from "./canonical-
|
|
2
|
-
import { a as sqliteStorageAffinity } from "./sqlite-
|
|
1
|
+
import { s as assertSchemaSnapshot } from "./canonical-DMvR9yBe.mjs";
|
|
2
|
+
import { a as sqliteStorageAffinity } from "./sqlite-CsIUtZ2Q.mjs";
|
|
3
3
|
//#region src/introspection/diagnostics.ts
|
|
4
4
|
/**
|
|
5
5
|
* Create one immutable diagnostic without interpreting catalog text or copying driver error details
|
package/dist/snapshot.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { A as SnapshotStorage, C as SnapshotIndexTerm, D as SnapshotLiteral, Dr as createSchemaDialect, E as SnapshotKeyConstraint, Er as SchemaDialectHooks, F as neutralSnapshotDialect, I as schemaSnapshotDialectVersion, L as schemaSnapshotFormat, M as SnapshotTable, N as SnapshotUniqueConstraint, O as SnapshotNamingPolicy, P as SnapshotValidationContext, R as schemaSnapshotNamingPolicyVersion, S as SnapshotIndex, T as SnapshotJsonValue, Tr as SchemaDialect, _ as SnapshotExpressionContext, a as SnapshotBigInt, b as SnapshotGeneratedColumn, c as SnapshotConstraint, d as SnapshotDefault, f as SnapshotDiagnostic, g as SnapshotExpression, h as SnapshotDialectExtension, i as SchemaSnapshotInput, j as SnapshotStorageContext, k as SnapshotSpecialNumber, l as SnapshotCreateResult, ls as PortableColumnStorage, m as SnapshotDialect, n as SchemaSnapshot, o as SnapshotCheckConstraint, os as NativeColumnStorage, p as SnapshotDiagnosticCode, r as SchemaSnapshotAdapter, s as SnapshotColumn, t as AnySchema, u as SnapshotDecodeResult, v as SnapshotExtensionContext, w as SnapshotIndexTermExpression, x as SnapshotIdentity, y as SnapshotForeignKey, z as schemaSnapshotVersion } from "./types-C0VkiwpR.mjs";
|
|
2
2
|
import { A as CompleteSnapshotProvenance, B as SchemaSnapshotV2Input, C as CompleteSnapshotObjectMetadata, D as CompleteSnapshotPartition, E as CompleteSnapshotOwnership, F as CompleteSnapshotTrigger, G as schemaSnapshotVersion2, H as completeSchemaSnapshotVersion, I as CompleteSnapshotValueFact, L as CompleteSnapshotView, M as CompleteSnapshotRoutineParameter, N as CompleteSnapshotSequence, O as CompleteSnapshotPhysicalReference, P as CompleteSnapshotTable, R as SchemaSnapshotV2, S as CompleteSnapshotObjectKind, T as CompleteSnapshotOpaqueObject, U as schemaSnapshotCompleteVersion, V as completeSchemaSnapshotFormat, W as schemaSnapshotV2Version, _ as CompleteSnapshotIndex, a as CompleteSnapshotCollation, b as CompleteSnapshotNamespace, c as CompleteSnapshotConstraint, d as CompleteSnapshotDeferredObject, f as CompleteSnapshotDomain, g as CompleteSnapshotIdentity, h as CompleteSnapshotForeignKey, i as CompleteSnapshotCheckConstraint, j as CompleteSnapshotRoutine, k as CompleteSnapshotPolicy, l as CompleteSnapshotCreateResult, m as CompleteSnapshotExtension, n as CompleteSchemaSnapshotInput, o as CompleteSnapshotColumn, p as CompleteSnapshotEnum, r as CompleteSnapshotCapabilities, s as CompleteSnapshotComment, t as CompleteSchemaSnapshot, u as CompleteSnapshotDecodeResult, v as CompleteSnapshotIndexTerm, w as CompleteSnapshotObjectReference, x as CompleteSnapshotObject, y as CompleteSnapshotKeyConstraint, z as SchemaSnapshotV2DecodeResult } from "./complete-types-CY0KbzNw.mjs";
|
|
3
|
-
import { A as assertSchemaSnapshot, B as decodeCompleteSchemaSnapshot, C as createSchemaSnapshot, D as serializeSchema, E as
|
|
4
|
-
export { AnySchema, CompleteSchemaSnapshot, CompleteSchemaSnapshotInput, CompleteSnapshotCapabilities, CompleteSnapshotCheckConstraint, CompleteSnapshotCollation, CompleteSnapshotColumn, CompleteSnapshotComment, CompleteSnapshotConstraint, CompleteSnapshotCreateResult, CompleteSnapshotDecodeResult, CompleteSnapshotDeferredObject, CompleteSnapshotDomain, CompleteSnapshotEnum, CompleteSnapshotExtension, CompleteSnapshotForeignKey, CompleteSnapshotIdentity, CompleteSnapshotIndex, CompleteSnapshotIndexTerm, CompleteSnapshotKeyConstraint, CompleteSnapshotNamespace, CompleteSnapshotObject, CompleteSnapshotObjectKind, CompleteSnapshotObjectMetadata, CompleteSnapshotObjectReference, CompleteSnapshotOpaqueObject, CompleteSnapshotOwnership, CompleteSnapshotPartition, CompleteSnapshotPhysicalReference, CompleteSnapshotPolicy, CompleteSnapshotProvenance, CompleteSnapshotRoutine, CompleteSnapshotRoutineParameter, CompleteSnapshotSequence, CompleteSnapshotTable, CompleteSnapshotTrigger, CompleteSnapshotValidationError, CompleteSnapshotValueFact, CompleteSnapshotView, MysqlSnapshotOptions, type NativeColumnStorage, type PortableColumnStorage, PostgresSnapshotOptions, type SchemaDialect, type SchemaDialectHooks, SchemaSnapshot, SchemaSnapshotAdapter, SchemaSnapshotInput, SchemaSnapshotOptions, SchemaSnapshotV2, SchemaSnapshotV2DecodeResult, SchemaSnapshotV2Input, SnapshotBigInt, SnapshotCanonicalError, SnapshotCheckConstraint, SnapshotColumn, SnapshotConstraint, SnapshotCreateResult, SnapshotDecodeResult, SnapshotDefault, SnapshotDiagnostic, SnapshotDiagnosticCode, SnapshotDialect, SnapshotDialectExtension, SnapshotExpression, SnapshotExpressionContext, SnapshotExtensionContext, SnapshotForeignKey, SnapshotGeneratedColumn, SnapshotIdentity, SnapshotIndex, SnapshotIndexTerm, SnapshotIndexTermExpression, SnapshotJsonValue, SnapshotKeyConstraint, SnapshotLiteral, SnapshotNamingPolicy, SnapshotSerializationError, SnapshotSpecialNumber, SnapshotStorage, SnapshotStorageContext, SnapshotTable, SnapshotUniqueConstraint, SnapshotValidationContext, SnapshotValidationError, SqliteSnapshotOptions, SqliteStorageAffinity, assertCompleteSchemaSnapshot, assertCompleteSnapshot, assertSchemaSnapshot, assertSchemaSnapshotV2, canonicalJson, canonicalizeCompleteSchemaSnapshot, canonicalizeSchemaSnapshot, canonicalizeSchemaSnapshotV2,
|
|
3
|
+
import { A as assertSchemaSnapshot, B as decodeCompleteSchemaSnapshot, C as createSchemaSnapshot, D as serializeSchema, E as fingerprintSchemaSnapshot, F as assertCompleteSnapshot, G as encodeSchemaSnapshotV2, H as decodeSchemaSnapshotV2, I as assertSchemaSnapshotV2, J as SnapshotCanonicalError, K as fingerprintCompleteSchemaSnapshot, L as canonicalizeCompleteSchemaSnapshot, M as decodeSchemaSnapshot, N as CompleteSnapshotValidationError, O as tryCreateSchemaSnapshot, P as assertCompleteSchemaSnapshot, Q as toSnapshotJsonValue, R as canonicalizeSchemaSnapshotV2, S as SnapshotSerializationError, T as encodeSnapshot, U as encodeCompleteSchemaSnapshot, V as decodeCompleteSnapshot, W as encodeCompleteSnapshot, X as encodeCanonicalSnapshot, Y as canonicalJson, Z as schemaSnapshotFingerprint, _ as postgresSchemaDialect, a as mysqlSnapshotDialect, b as tryCreatePostgresSchemaSnapshot, c as SqliteStorageAffinity, d as sqliteSnapshotAdapter, f as sqliteSnapshotDialect, g as createPostgresSchemaSnapshot, h as PostgresSnapshotOptions, i as mysqlSnapshotAdapter, j as canonicalizeSchemaSnapshot, k as SnapshotValidationError, l as createSqliteSchemaSnapshot, m as tryCreateSqliteSchemaSnapshot, n as createMysqlSchemaSnapshot, o as tryCreateMysqlSchemaSnapshot, p as sqliteStorageAffinity, q as schemaSnapshotV2Fingerprint, r as mysqlSchemaDialect, s as SqliteSnapshotOptions, t as MysqlSnapshotOptions, u as sqliteSchemaDialect, v as postgresSnapshotAdapter, w as encodeSchemaSnapshot, x as SchemaSnapshotOptions, y as postgresSnapshotDialect, z as completeSchemaSnapshotFingerprint } from "./index-C-480HmV.mjs";
|
|
4
|
+
export { AnySchema, CompleteSchemaSnapshot, CompleteSchemaSnapshotInput, CompleteSnapshotCapabilities, CompleteSnapshotCheckConstraint, CompleteSnapshotCollation, CompleteSnapshotColumn, CompleteSnapshotComment, CompleteSnapshotConstraint, CompleteSnapshotCreateResult, CompleteSnapshotDecodeResult, CompleteSnapshotDeferredObject, CompleteSnapshotDomain, CompleteSnapshotEnum, CompleteSnapshotExtension, CompleteSnapshotForeignKey, CompleteSnapshotIdentity, CompleteSnapshotIndex, CompleteSnapshotIndexTerm, CompleteSnapshotKeyConstraint, CompleteSnapshotNamespace, CompleteSnapshotObject, CompleteSnapshotObjectKind, CompleteSnapshotObjectMetadata, CompleteSnapshotObjectReference, CompleteSnapshotOpaqueObject, CompleteSnapshotOwnership, CompleteSnapshotPartition, CompleteSnapshotPhysicalReference, CompleteSnapshotPolicy, CompleteSnapshotProvenance, CompleteSnapshotRoutine, CompleteSnapshotRoutineParameter, CompleteSnapshotSequence, CompleteSnapshotTable, CompleteSnapshotTrigger, CompleteSnapshotValidationError, CompleteSnapshotValueFact, CompleteSnapshotView, MysqlSnapshotOptions, type NativeColumnStorage, type PortableColumnStorage, PostgresSnapshotOptions, type SchemaDialect, type SchemaDialectHooks, SchemaSnapshot, SchemaSnapshotAdapter, SchemaSnapshotInput, SchemaSnapshotOptions, SchemaSnapshotV2, SchemaSnapshotV2DecodeResult, SchemaSnapshotV2Input, SnapshotBigInt, SnapshotCanonicalError, SnapshotCheckConstraint, SnapshotColumn, SnapshotConstraint, SnapshotCreateResult, SnapshotDecodeResult, SnapshotDefault, SnapshotDiagnostic, SnapshotDiagnosticCode, SnapshotDialect, SnapshotDialectExtension, SnapshotExpression, SnapshotExpressionContext, SnapshotExtensionContext, SnapshotForeignKey, SnapshotGeneratedColumn, SnapshotIdentity, SnapshotIndex, SnapshotIndexTerm, SnapshotIndexTermExpression, SnapshotJsonValue, SnapshotKeyConstraint, SnapshotLiteral, SnapshotNamingPolicy, SnapshotSerializationError, SnapshotSpecialNumber, SnapshotStorage, SnapshotStorageContext, SnapshotTable, SnapshotUniqueConstraint, SnapshotValidationContext, SnapshotValidationError, SqliteSnapshotOptions, SqliteStorageAffinity, assertCompleteSchemaSnapshot, assertCompleteSnapshot, assertSchemaSnapshot, assertSchemaSnapshotV2, canonicalJson, canonicalizeCompleteSchemaSnapshot, canonicalizeSchemaSnapshot, canonicalizeSchemaSnapshotV2, completeSchemaSnapshotFingerprint, completeSchemaSnapshotFormat, completeSchemaSnapshotVersion, createMysqlSchemaSnapshot, createPostgresSchemaSnapshot, createSchemaDialect, createSchemaSnapshot, createSqliteSchemaSnapshot, decodeCompleteSchemaSnapshot, decodeCompleteSnapshot, decodeSchemaSnapshot, decodeSchemaSnapshotV2, encodeCanonicalSnapshot, encodeCompleteSchemaSnapshot, encodeCompleteSnapshot, encodeSchemaSnapshot, encodeSchemaSnapshotV2, encodeSnapshot, fingerprintCompleteSchemaSnapshot, fingerprintSchemaSnapshot, mysqlSchemaDialect, mysqlSnapshotAdapter, mysqlSnapshotDialect, neutralSnapshotDialect, postgresSchemaDialect, postgresSnapshotAdapter, postgresSnapshotDialect, schemaSnapshotCompleteVersion, schemaSnapshotDialectVersion, schemaSnapshotFingerprint, schemaSnapshotFormat, schemaSnapshotNamingPolicyVersion, schemaSnapshotV2Fingerprint, schemaSnapshotV2Version, schemaSnapshotVersion, schemaSnapshotVersion2, serializeSchema, sqliteSchemaDialect, sqliteSnapshotAdapter, sqliteSnapshotDialect, sqliteStorageAffinity, toSnapshotJsonValue, tryCreateMysqlSchemaSnapshot, tryCreatePostgresSchemaSnapshot, tryCreateSchemaSnapshot, tryCreateSqliteSchemaSnapshot };
|