@hasna/domains 0.0.45 → 0.0.46
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/cli/index.js +348 -329
- package/dist/generated/storage-kit/index.d.ts +1 -1
- package/dist/generated/storage-kit/migrations.d.ts +21 -0
- package/dist/generated/storage-kit/migrations.d.ts.map +1 -1
- package/dist/index.js +223 -222
- package/dist/mcp/index.js +219 -218
- package/dist/server/migrations.d.ts.map +1 -1
- package/package.json +3 -3
|
@@ -27,11 +27,32 @@ export declare function checksumSql(sql: string): string;
|
|
|
27
27
|
export declare function defineMigration(id: string, sql: string): Migration;
|
|
28
28
|
export interface MigrationRunnerOptions {
|
|
29
29
|
ledgerTable?: string;
|
|
30
|
+
/**
|
|
31
|
+
* Applied-ledger rows whose ids the build ACKNOWLEDGES as non-reproducible
|
|
32
|
+
* history: a migration that was applied to the ledger by an out-of-band
|
|
33
|
+
* operation or by a build whose id scheme no longer exists, so no current
|
|
34
|
+
* source can reproduce its id or its SQL.
|
|
35
|
+
*
|
|
36
|
+
* An acknowledged id:
|
|
37
|
+
* - passes the downgrade guard (it IS recognized — as history),
|
|
38
|
+
* - is never checksum-compared (its SQL is gone, so no checksum can be
|
|
39
|
+
* computed for it; storing an arbitrary placeholder in `checksum` is
|
|
40
|
+
* what the prod ledger already holds for such rows),
|
|
41
|
+
* - is never re-applied and never re-inserted (it is already in the
|
|
42
|
+
* ledger; the plan covers declared migrations only).
|
|
43
|
+
*
|
|
44
|
+
* The list is EXPLICIT and OPT-IN: an acknowledged id may not also be a
|
|
45
|
+
* declared migration (enforced at construction), and any OTHER applied row
|
|
46
|
+
* unknown to the build still fails the downgrade guard. Every declared
|
|
47
|
+
* migration keeps its checksum bind unchanged.
|
|
48
|
+
*/
|
|
49
|
+
acknowledgedLegacyIds?: readonly string[];
|
|
30
50
|
}
|
|
31
51
|
export declare class MigrationLedger {
|
|
32
52
|
private readonly client;
|
|
33
53
|
private readonly migrations;
|
|
34
54
|
private readonly ledgerTable;
|
|
55
|
+
private readonly acknowledgedLegacyIds;
|
|
35
56
|
constructor(client: TypedQueryClient, migrations: readonly Migration[], options?: MigrationRunnerOptions);
|
|
36
57
|
ensureLedger(): Promise<void>;
|
|
37
58
|
listApplied(): Promise<AppliedMigration[]>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"migrations.d.ts","sourceRoot":"","sources":["../../../src/generated/storage-kit/migrations.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"migrations.d.ts","sourceRoot":"","sources":["../../../src/generated/storage-kit/migrations.ts"],"names":[],"mappings":"AAqBA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAGnD,2EAA2E;AAC3E,eAAO,MAAM,8BAA8B,sBAAsB,CAAC;AAElE,MAAM,WAAW,SAAS;IACxB,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;CAC3B;AAED,MAAM,MAAM,cAAc,GAAG,iBAAiB,GAAG,SAAS,CAAC;AAE3D,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,SAAS,EAAE,SAAS,CAAC;IAC9B,QAAQ,CAAC,KAAK,EAAE,cAAc,CAAC;CAChC;AAED,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;CAC5B;AAED,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC;IACzB,QAAQ,CAAC,OAAO,EAAE,gBAAgB,EAAE,CAAC;IACrC,QAAQ,CAAC,IAAI,EAAE,iBAAiB,EAAE,CAAC;CACpC;AAED,yDAAyD;AACzD,wBAAgB,WAAW,CAAC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