@prisma/orm-toolchain 8.0.0-rc.11-dev.40 → 8.0.0-rc.11-dev.41
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/{aggregate-DKBycuzO.d.mts → aggregate-BxeUZtei.d.mts} +14 -4
- package/dist/aggregate-BxeUZtei.d.mts.map +1 -0
- package/dist/{aggregate-DI9VS7yL.mjs → aggregate-DqY54LCk.mjs} +43 -31
- package/dist/aggregate-DqY54LCk.mjs.map +1 -0
- package/dist/cli.mjs +17 -11
- package/dist/cli.mjs.map +1 -1
- package/dist/cli__control-api.d.mts +26 -6
- package/dist/cli__control-api.d.mts.map +1 -1
- package/dist/cli__control-api.mjs +1 -1
- package/dist/cli__control-api__testing.d.mts +1 -1
- package/dist/cli__migration-cli.mjs +2 -2
- package/dist/contract-snapshot-store-Bok5nQYi-D3g_P7im.d.mts +59 -0
- package/dist/contract-snapshot-store-Bok5nQYi-D3g_P7im.d.mts.map +1 -0
- package/dist/{contract-snapshot-store-D-mFkiHR-CFl0ulR2.mjs → contract-snapshot-store-CM9ubenX-o8kTVHxP.mjs} +48 -11
- package/dist/contract-snapshot-store-CM9ubenX-o8kTVHxP.mjs.map +1 -0
- package/dist/contract-snapshot-store-DrIwu5pn.d.mts +2 -0
- package/dist/{db-verify-BdKY7U7l-6VLIVuKF.d.mts → db-verify-BkwsVjIf-CDWnVSjr.d.mts} +6 -2
- package/dist/db-verify-BkwsVjIf-CDWnVSjr.d.mts.map +1 -0
- package/dist/{errors-SoLLYLtw-DMxVbVs9.mjs → errors-BIroGS9E-Dg6CF-dm.mjs} +15 -3
- package/dist/{errors-SoLLYLtw-DMxVbVs9.mjs.map → errors-BIroGS9E-Dg6CF-dm.mjs.map} +1 -1
- package/dist/{graph-membership-DY1Onbc3-CwBd6wuB.mjs → graph-membership-CdU6royq-gP9Kb9Eh.mjs} +3 -3
- package/dist/{graph-membership-DY1Onbc3-CwBd6wuB.mjs.map → graph-membership-CdU6royq-gP9Kb9Eh.mjs.map} +1 -1
- package/dist/{hash-DH8hl5Rq-BpM2t3Nu.mjs → hash-BAZVWU4a-BdynTmar.mjs} +24 -3
- package/dist/hash-BAZVWU4a-BdynTmar.mjs.map +1 -0
- package/dist/hash-CwWGlFWV.d.mts +1 -0
- package/dist/{hash-XZYYKJ-i.d.mts → hash-DclMqd7S-WBvXJ_4C.d.mts} +17 -4
- package/dist/hash-DclMqd7S-WBvXJ_4C.d.mts.map +1 -0
- package/dist/{invariants-Cww4bv0v-BEiFxmbX.mjs → invariants-CUbFGAse-DqgE4fhO.mjs} +3 -3
- package/dist/{invariants-Cww4bv0v-BEiFxmbX.mjs.map → invariants-CUbFGAse-DqgE4fhO.mjs.map} +1 -1
- package/dist/{io-DSQXOfBH-GRpmFG2F.mjs → io-CyV6U3am-CMJIi_UO.mjs} +7 -7
- package/dist/io-CyV6U3am-CMJIi_UO.mjs.map +1 -0
- package/dist/io-D8Epu7iY.d.mts +1 -0
- package/dist/{io-sr4CO9_t-C3eV_kn-.d.mts → io-DZfMV51z-BKlH5Dhb.d.mts} +9 -2
- package/dist/io-DZfMV51z-BKlH5Dhb.d.mts.map +1 -0
- package/dist/{migration-B9w-7dKe.mjs → migration-D95UJ0Dj.mjs} +4 -4
- package/dist/{migration-B9w-7dKe.mjs.map → migration-D95UJ0Dj.mjs.map} +1 -1
- package/dist/{migration-graph-CW4bMmTz-B5xFtFVB.mjs → migration-graph-BBWEuNAt-C6X6rauo.mjs} +3 -3
- package/dist/{migration-graph-CW4bMmTz-B5xFtFVB.mjs.map → migration-graph-BBWEuNAt-C6X6rauo.mjs.map} +1 -1
- package/dist/{migration-graph-Dqndu0i5.d.mts → migration-graph-CHhNBJSJ.d.mts} +2 -2
- package/dist/{migration-graph-Dqndu0i5.d.mts.map → migration-graph-CHhNBJSJ.d.mts.map} +1 -1
- package/dist/{migration-graph-tarTxJ99-BrGBANeE.d.mts → migration-graph-tarTxJ99-2GNs0O8U.d.mts} +2 -2
- package/dist/{migration-graph-tarTxJ99-BrGBANeE.d.mts.map → migration-graph-tarTxJ99-2GNs0O8U.d.mts.map} +1 -1
- package/dist/migration-tools.d.mts +12 -10
- package/dist/migration-tools.mjs +14 -14
- package/dist/migration-tools__aggregate.d.mts +1 -1
- package/dist/migration-tools__aggregate.mjs +1 -1
- package/dist/migration-tools__contract-snapshot-store.d.mts +4 -2
- package/dist/migration-tools__contract-snapshot-store.mjs +2 -2
- package/dist/migration-tools__errors.mjs +1 -1
- package/dist/migration-tools__hash.d.mts +2 -1
- package/dist/migration-tools__hash.mjs +1 -1
- package/dist/migration-tools__invariants.mjs +1 -1
- package/dist/migration-tools__io.d.mts +2 -2
- package/dist/migration-tools__io.mjs +1 -1
- package/dist/migration-tools__migration-graph.d.mts +2 -2
- package/dist/migration-tools__migration-graph.mjs +2 -2
- package/dist/migration-tools__migration.mjs +1 -1
- package/dist/migration-tools__ref-resolution.mjs +1 -1
- package/dist/migration-tools__refs.mjs +1 -1
- package/dist/migration-tools__spaces.mjs +2 -2
- package/dist/{ref-CGE8q4jD-DNPh6Yqe.mjs → ref-D5u8Xxwc-BjjqYtnQ.mjs} +86 -31
- package/dist/ref-D5u8Xxwc-BjjqYtnQ.mjs.map +1 -0
- package/dist/{ref-resolution-BWpwb8_b.mjs → ref-resolution-BwWLoU7C.mjs} +2 -2
- package/dist/{ref-resolution-BWpwb8_b.mjs.map → ref-resolution-BwWLoU7C.mjs.map} +1 -1
- package/dist/{refs-BpSpzdYB-BcDelHGt.mjs → refs-S0wu2JkI-BbFdehLe.mjs} +3 -3
- package/dist/{refs-BpSpzdYB-BcDelHGt.mjs.map → refs-S0wu2JkI-BbFdehLe.mjs.map} +1 -1
- package/dist/{spaces-DzFtKEl3.mjs → spaces--kxjIRHx.mjs} +14 -13
- package/dist/spaces--kxjIRHx.mjs.map +1 -0
- package/dist/{verify-contract-spaces-_vwt5LT0-BQAf8Q4T.mjs → verify-contract-spaces-BLkC9r9l-CJIppNL8.mjs} +4 -4
- package/dist/{verify-contract-spaces-_vwt5LT0-BQAf8Q4T.mjs.map → verify-contract-spaces-BLkC9r9l-CJIppNL8.mjs.map} +1 -1
- package/dist/vite-plugin-contract-emit.mjs +1 -1
- package/package.json +12 -12
- package/dist/aggregate-DI9VS7yL.mjs.map +0 -1
- package/dist/aggregate-DKBycuzO.d.mts.map +0 -1
- package/dist/contract-snapshot-store-BqDMcO4r.d.mts +0 -27
- package/dist/contract-snapshot-store-BqDMcO4r.d.mts.map +0 -1
- package/dist/contract-snapshot-store-D-mFkiHR-CFl0ulR2.mjs.map +0 -1
- package/dist/db-verify-BdKY7U7l-6VLIVuKF.d.mts.map +0 -1
- package/dist/hash-DH8hl5Rq-BpM2t3Nu.mjs.map +0 -1
- package/dist/hash-XZYYKJ-i.d.mts.map +0 -1
- package/dist/io-DSQXOfBH-GRpmFG2F.mjs.map +0 -1
- package/dist/io-DYfeLJxR.d.mts +0 -1
- package/dist/io-sr4CO9_t-C3eV_kn-.d.mts.map +0 -1
- package/dist/ref-CGE8q4jD-DNPh6Yqe.mjs.map +0 -1
- package/dist/spaces-DzFtKEl3.mjs.map +0 -1
|
@@ -1,23 +1,25 @@
|
|
|
1
|
+
import { t as MigrationMetadata$1 } from "./metadata-2nbOAGsV-uYNeq2Cp.mjs";
|
|
2
|
+
import { n as OnDiskMigrationPackage, t as MigrationOps } from "./package-CfWiDNrr-ZR4HM_Iz.mjs";
|
|
3
|
+
import { i as verifyMigrationHash, n as VerifyResult, r as computeMigrationHash, t as SnapshotCanonicalizationHooks } from "./hash-DclMqd7S-WBvXJ_4C.mjs";
|
|
4
|
+
import { a as readContractSnapshotJson, c as writeContractSnapshot, i as createSnapshotContentVerifier, n as SnapshotContentVerifier, o as readContractSnapshotJsonTolerant, r as contractSnapshotDir, s as snapshotsImportPathFrom, t as ContractSnapshotInput } from "./contract-snapshot-store-Bok5nQYi-D3g_P7im.mjs";
|
|
5
|
+
import "./contract-snapshot-store-DrIwu5pn.mjs";
|
|
1
6
|
import { a as deleteRef, c as refsByContractHash, d as validateRefName, f as validateRefValue, i as Refs, l as resolveRef, n as RefEntry, o as readRef, p as writeRef, s as readRefs, t as HEAD_REF_NAME, u as resolveRefsByContractHash } from "./refs-BNCUu58Y-BIso5Jfg.mjs";
|
|
2
7
|
import { n as MigrationGraph, t as MigrationEdge } from "./graph-bDjJ4GL9-BhFevsJS.mjs";
|
|
3
8
|
import { a as RefResolutionAmbiguous, c as RefResolutionInvalidFormat, d as findEdgeByDirName, f as parseContractRef, i as MigrationRefProvenance, l as RefResolutionNotFound, n as ContractRefProvenance, o as RefResolutionContext, p as parseMigrationRef, r as MigrationRef, s as RefResolutionError, t as ContractRef, u as RefResolutionWrongGrammar } from "./ref-resolution-CaHQJXE0.mjs";
|
|
4
|
-
import { n as OnDiskMigrationPackage, t as MigrationOps } from "./package-CfWiDNrr-ZR4HM_Iz.mjs";
|
|
5
9
|
import { a as VerifyContractSpacesResult, i as VerifyContractSpacesInputs, n as SpaceMarkerRecord, o as listContractSpaceDirectories, r as SpaceVerifierViolation, s as verifyContractSpaces, t as ContractSpaceHeadRecord } from "./verify-contract-spaces-C3PiFBk3-DfomYyOE.mjs";
|
|
6
|
-
import { a as materialiseExtensionMigrationPackageIfMissing, c as readMigrationsDir, d as writeMigrationPackage, i as formatMigrationDirName, l as writeMigrationMetadata, n as ReadMigrationsDirResult, o as materialiseMigrationPackage, r as copyFilesWithRename, s as readMigrationPackage, t as PackageLoadProblem, u as writeMigrationOps } from "./io-
|
|
7
|
-
import { a as findLeaf, c as findPathWithInvariants, i as findLatestMigration, l as findReachableLeaves, n as detectCycles, o as findPath, r as detectOrphans, s as findPathWithDecision, t as PathDecision, u as reconstructGraph } from "./migration-graph-tarTxJ99-
|
|
8
|
-
import { A as buildFabricatedMigrationEdge, B as verifyMigration, C as ResolveRecordedPathOutcome, D as VerifierOutput, E as VerifierInput, F as loadContractSpaceAggregate, I as loadProblemToViolation, L as planMigration, M as computeIntegrityViolations, N as createAggregateContractSpace, O as VerifierSuccess, P as createContractSpaceAggregate, R as requireHeadRef, S as ResolveRecordedPathInputs, T as VerifierError, _ as PerSpacePlan, a as ContractAtOptions, b as PlannerOutput, c as ContractSpaceAggregate, d as IntegrityQueryOptions, f as IntegritySpaceState, g as MarkerCheckSection, h as MarkerCheckResult, i as CallerPolicy, j as collectAggregateNamespaces, k as allStorageElementsExternal, l as DeclaredExtensionEntry, m as LoadAggregateInput, n as AggregateCurrentDBState, o as ContractAtResult, p as IntegrityViolation, r as AggregateMigrationEdgeRef, s as ContractMarkerRecordLike, t as AggregateContractSpace, u as IntegrityComputationInput, v as PlannerError, w as SchemaCheckSection, x as PlannerSuccess, y as PlannerInput, z as resolveRecordedPath } from "./aggregate-
|
|
9
|
-
import { t as MigrationMetadata$1 } from "./metadata-2nbOAGsV-uYNeq2Cp.mjs";
|
|
10
|
+
import { a as materialiseExtensionMigrationPackageIfMissing, c as readMigrationsDir, d as writeMigrationPackage, i as formatMigrationDirName, l as writeMigrationMetadata, n as ReadMigrationsDirResult, o as materialiseMigrationPackage, r as copyFilesWithRename, s as readMigrationPackage, t as PackageLoadProblem, u as writeMigrationOps } from "./io-DZfMV51z-BKlH5Dhb.mjs";
|
|
11
|
+
import { a as findLeaf, c as findPathWithInvariants, i as findLatestMigration, l as findReachableLeaves, n as detectCycles, o as findPath, r as detectOrphans, s as findPathWithDecision, t as PathDecision, u as reconstructGraph } from "./migration-graph-tarTxJ99-2GNs0O8U.mjs";
|
|
12
|
+
import { A as buildFabricatedMigrationEdge, B as verifyMigration, C as ResolveRecordedPathOutcome, D as VerifierOutput, E as VerifierInput, F as loadContractSpaceAggregate, I as loadProblemToViolation, L as planMigration, M as computeIntegrityViolations, N as createAggregateContractSpace, O as VerifierSuccess, P as createContractSpaceAggregate, R as requireHeadRef, S as ResolveRecordedPathInputs, T as VerifierError, _ as PerSpacePlan, a as ContractAtOptions, b as PlannerOutput, c as ContractSpaceAggregate, d as IntegrityQueryOptions, f as IntegritySpaceState, g as MarkerCheckSection, h as MarkerCheckResult, i as CallerPolicy, j as collectAggregateNamespaces, k as allStorageElementsExternal, l as DeclaredExtensionEntry, m as LoadAggregateInput, n as AggregateCurrentDBState, o as ContractAtResult, p as IntegrityViolation, r as AggregateMigrationEdgeRef, s as ContractMarkerRecordLike, t as AggregateContractSpace, u as IntegrityComputationInput, v as PlannerError, w as SchemaCheckSection, x as PlannerSuccess, y as PlannerInput, z as resolveRecordedPath } from "./aggregate-BxeUZtei.mjs";
|
|
10
13
|
import "./metadata-BtscDay2.mjs";
|
|
11
14
|
import { t as MigrationPackage } from "./package-N9PPdFV_.mjs";
|
|
12
15
|
import { a as buildMigrationArtifacts, i as MigrationMeta, n as MigrationArtifacts, o as isDirectEntrypoint, r as MigrationContractViews, t as Migration } from "./migration-B2ljMJim.mjs";
|
|
13
16
|
import { a as errorContractSnapshotMissing, c as errorInvalidRefName, i as errorContractSnapshotHashMismatch, l as errorNoInvariantPath, n as NoInvariantPathStructuralEdge, o as errorDescriptorHeadHashMismatch, r as errorContractDeserializationFailed, s as errorInvalidJson, t as MigrationToolsError, u as errorUnknownInvariant } from "./errors-D59OCpoI.mjs";
|
|
14
|
-
import "./io-
|
|
15
|
-
import
|
|
16
|
-
import { n as computeMigrationHash, r as verifyMigrationHash, t as VerifyResult } from "./hash-XZYYKJ-i.mjs";
|
|
17
|
+
import "./io-D8Epu7iY.mjs";
|
|
18
|
+
import "./hash-CwWGlFWV.mjs";
|
|
17
19
|
import { n as validateInvariantId, t as deriveProvidedInvariants } from "./invariants-B5wLrgQS.mjs";
|
|
18
|
-
import { n as isGraphNode, t as assertHashIsGraphNode } from "./migration-graph-
|
|
20
|
+
import { n as isGraphNode, t as assertHashIsGraphNode } from "./migration-graph-CHhNBJSJ.mjs";
|
|
19
21
|
import { t as EMPTY_CONTRACT_HASH } from "./constants-Dkcn8Qu4.mjs";
|
|
20
22
|
import { t as ledgerOriginFromStored } from "./ledger-origin-BGRN77Oy.mjs";
|
|
21
23
|
import { a as writeMigrationTs, i as shebangLineFor, n as detectScaffoldRuntime, r as hasMigrationTs, t as ScaffoldRuntime } from "./migration-ts-CNaAtK8C.mjs";
|
|
22
24
|
import { C as spaceMigrationDirectory, S as readContractSpaceHeadRef, _ as contractSpaceFromJson, a as DescriptorSelfConsistencyInputs, b as isValidSpaceId, c as RESERVED_SPACE_SUBDIR_NAMES, d as SpacePlanInput, f as SpacePlanOutput, g as computeExtensionSpaceApplyPath, h as assertValidSpaceId, i as ContractSpaceHeadRef, l as SPACE_REFS_DIRNAME, m as assertDescriptorSelfConsistency, n as ComputeExtensionSpaceApplyPathInputs, o as DiskContractSpaceState, p as ValidSpaceId, r as ContractSpaceArtifactInputs, s as ExtensionSpaceApplyPathOutcome, t as APP_SPACE_ID, u as SpaceApplyInput, v as emitContractSpaceArtifacts, w as spaceRefsDirectory, x as planAllSpaces, y as gatherDiskContractSpaceState } from "./spaces-B20bgxF9.mjs";
|
|
23
|
-
export { APP_SPACE_ID, type AggregateContractSpace, type AggregateCurrentDBState, type AggregateMigrationEdgeRef, type CallerPolicy, type ComputeExtensionSpaceApplyPathInputs, type ContractAtOptions, type ContractAtResult, type ContractMarkerRecordLike, type ContractRef, type ContractRefProvenance, type ContractSnapshotInput, type ContractSpaceAggregate, type ContractSpaceArtifactInputs, type ContractSpaceHeadRecord, type ContractSpaceHeadRef, type DeclaredExtensionEntry, type DescriptorSelfConsistencyInputs, type DiskContractSpaceState, EMPTY_CONTRACT_HASH, type ExtensionSpaceApplyPathOutcome, HEAD_REF_NAME, type IntegrityComputationInput, type IntegrityQueryOptions, type IntegritySpaceState, type IntegrityViolation, type LoadAggregateInput, type MarkerCheckResult, type MarkerCheckSection, Migration, type MigrationArtifacts, MigrationContractViews, type MigrationEdge, type MigrationGraph, type MigrationMeta, type MigrationMetadata$1 as MigrationMetadata, type MigrationOps, type MigrationPackage, type MigrationRef, type MigrationRefProvenance, MigrationToolsError, type NoInvariantPathStructuralEdge, type OnDiskMigrationPackage, type PackageLoadProblem, type PathDecision, type PerSpacePlan, type PlannerError, type PlannerInput, type PlannerOutput, type PlannerSuccess, RESERVED_SPACE_SUBDIR_NAMES, type ReadMigrationsDirResult, type RefEntry, type RefResolutionAmbiguous, type RefResolutionContext, type RefResolutionError, type RefResolutionInvalidFormat, type RefResolutionNotFound, type RefResolutionWrongGrammar, type Refs, type ResolveRecordedPathInputs, type ResolveRecordedPathOutcome, SPACE_REFS_DIRNAME, type ScaffoldRuntime, type SchemaCheckSection, type SpaceApplyInput, type SpaceMarkerRecord, type SpacePlanInput, type SpacePlanOutput, type SpaceVerifierViolation, type ValidSpaceId, type VerifierError, type VerifierInput, type VerifierOutput, type VerifierSuccess, type VerifyContractSpacesInputs, type VerifyContractSpacesResult, type VerifyResult, allStorageElementsExternal, assertDescriptorSelfConsistency, assertHashIsGraphNode, assertValidSpaceId, buildFabricatedMigrationEdge, buildMigrationArtifacts, collectAggregateNamespaces, computeExtensionSpaceApplyPath, computeIntegrityViolations, computeMigrationHash, contractSnapshotDir, contractSpaceFromJson, copyFilesWithRename, createAggregateContractSpace, createContractSpaceAggregate, deleteRef, deriveProvidedInvariants, detectCycles, detectOrphans, detectScaffoldRuntime, emitContractSpaceArtifacts, errorContractDeserializationFailed, errorContractSnapshotHashMismatch, errorContractSnapshotMissing, errorDescriptorHeadHashMismatch, errorInvalidJson, errorInvalidRefName, errorNoInvariantPath, errorUnknownInvariant, findEdgeByDirName, findLatestMigration, findLeaf, findPath, findPathWithDecision, findPathWithInvariants, findReachableLeaves, formatMigrationDirName, gatherDiskContractSpaceState, hasMigrationTs, isDirectEntrypoint, isGraphNode, isValidSpaceId, ledgerOriginFromStored, listContractSpaceDirectories, loadContractSpaceAggregate, loadProblemToViolation, materialiseExtensionMigrationPackageIfMissing, materialiseMigrationPackage, parseContractRef, parseMigrationRef, planAllSpaces, planMigration, readContractSnapshotJson, readContractSnapshotJsonTolerant, readContractSpaceHeadRef, readMigrationPackage, readMigrationsDir, readRef, readRefs, reconstructGraph, refsByContractHash, requireHeadRef, resolveRecordedPath, resolveRef, resolveRefsByContractHash, shebangLineFor, snapshotsImportPathFrom, spaceMigrationDirectory, spaceRefsDirectory, validateInvariantId, validateRefName, validateRefValue, verifyContractSpaces, verifyMigration, verifyMigrationHash, writeContractSnapshot, writeMigrationMetadata, writeMigrationOps, writeMigrationPackage, writeMigrationTs, writeRef };
|
|
25
|
+
export { APP_SPACE_ID, type AggregateContractSpace, type AggregateCurrentDBState, type AggregateMigrationEdgeRef, type CallerPolicy, type ComputeExtensionSpaceApplyPathInputs, type ContractAtOptions, type ContractAtResult, type ContractMarkerRecordLike, type ContractRef, type ContractRefProvenance, type ContractSnapshotInput, type ContractSpaceAggregate, type ContractSpaceArtifactInputs, type ContractSpaceHeadRecord, type ContractSpaceHeadRef, type DeclaredExtensionEntry, type DescriptorSelfConsistencyInputs, type DiskContractSpaceState, EMPTY_CONTRACT_HASH, type ExtensionSpaceApplyPathOutcome, HEAD_REF_NAME, type IntegrityComputationInput, type IntegrityQueryOptions, type IntegritySpaceState, type IntegrityViolation, type LoadAggregateInput, type MarkerCheckResult, type MarkerCheckSection, Migration, type MigrationArtifacts, MigrationContractViews, type MigrationEdge, type MigrationGraph, type MigrationMeta, type MigrationMetadata$1 as MigrationMetadata, type MigrationOps, type MigrationPackage, type MigrationRef, type MigrationRefProvenance, MigrationToolsError, type NoInvariantPathStructuralEdge, type OnDiskMigrationPackage, type PackageLoadProblem, type PathDecision, type PerSpacePlan, type PlannerError, type PlannerInput, type PlannerOutput, type PlannerSuccess, RESERVED_SPACE_SUBDIR_NAMES, type ReadMigrationsDirResult, type RefEntry, type RefResolutionAmbiguous, type RefResolutionContext, type RefResolutionError, type RefResolutionInvalidFormat, type RefResolutionNotFound, type RefResolutionWrongGrammar, type Refs, type ResolveRecordedPathInputs, type ResolveRecordedPathOutcome, SPACE_REFS_DIRNAME, type ScaffoldRuntime, type SchemaCheckSection, type SnapshotCanonicalizationHooks, type SnapshotContentVerifier, type SpaceApplyInput, type SpaceMarkerRecord, type SpacePlanInput, type SpacePlanOutput, type SpaceVerifierViolation, type ValidSpaceId, type VerifierError, type VerifierInput, type VerifierOutput, type VerifierSuccess, type VerifyContractSpacesInputs, type VerifyContractSpacesResult, type VerifyResult, allStorageElementsExternal, assertDescriptorSelfConsistency, assertHashIsGraphNode, assertValidSpaceId, buildFabricatedMigrationEdge, buildMigrationArtifacts, collectAggregateNamespaces, computeExtensionSpaceApplyPath, computeIntegrityViolations, computeMigrationHash, contractSnapshotDir, contractSpaceFromJson, copyFilesWithRename, createAggregateContractSpace, createContractSpaceAggregate, createSnapshotContentVerifier, deleteRef, deriveProvidedInvariants, detectCycles, detectOrphans, detectScaffoldRuntime, emitContractSpaceArtifacts, errorContractDeserializationFailed, errorContractSnapshotHashMismatch, errorContractSnapshotMissing, errorDescriptorHeadHashMismatch, errorInvalidJson, errorInvalidRefName, errorNoInvariantPath, errorUnknownInvariant, findEdgeByDirName, findLatestMigration, findLeaf, findPath, findPathWithDecision, findPathWithInvariants, findReachableLeaves, formatMigrationDirName, gatherDiskContractSpaceState, hasMigrationTs, isDirectEntrypoint, isGraphNode, isValidSpaceId, ledgerOriginFromStored, listContractSpaceDirectories, loadContractSpaceAggregate, loadProblemToViolation, materialiseExtensionMigrationPackageIfMissing, materialiseMigrationPackage, parseContractRef, parseMigrationRef, planAllSpaces, planMigration, readContractSnapshotJson, readContractSnapshotJsonTolerant, readContractSpaceHeadRef, readMigrationPackage, readMigrationsDir, readRef, readRefs, reconstructGraph, refsByContractHash, requireHeadRef, resolveRecordedPath, resolveRef, resolveRefsByContractHash, shebangLineFor, snapshotsImportPathFrom, spaceMigrationDirectory, spaceRefsDirectory, validateInvariantId, validateRefName, validateRefValue, verifyContractSpaces, verifyMigration, verifyMigrationHash, writeContractSnapshot, writeMigrationMetadata, writeMigrationOps, writeMigrationPackage, writeMigrationTs, writeRef };
|
package/dist/migration-tools.mjs
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { n as
|
|
4
|
-
import { n as validateInvariantId, t as deriveProvidedInvariants } from "./invariants-
|
|
5
|
-
import { a as materialiseMigrationPackage, c as writeMigrationMetadata, i as materialiseExtensionMigrationPackageIfMissing, l as writeMigrationOps, n as copyFilesWithRename, o as readMigrationPackage, r as formatMigrationDirName, s as readMigrationsDir, u as writeMigrationPackage } from "./io-
|
|
1
|
+
import { F as errorUnknownInvariant, _ as errorInvalidJson, i as errorContractDeserializationFailed, k as errorNoInvariantPath, o as errorContractSnapshotHashMismatch, s as errorContractSnapshotMissing, t as MigrationToolsError, u as errorDescriptorHeadHashMismatch, x as errorInvalidRefName } from "./errors-BIroGS9E-Dg6CF-dm.mjs";
|
|
2
|
+
import { r as verifyMigrationHash, t as computeMigrationHash } from "./hash-BAZVWU4a-BdynTmar.mjs";
|
|
3
|
+
import { a as snapshotsImportPathFrom, i as readContractSnapshotJsonTolerant, n as createSnapshotContentVerifier, o as writeContractSnapshot, r as readContractSnapshotJson, t as contractSnapshotDir } from "./contract-snapshot-store-CM9ubenX-o8kTVHxP.mjs";
|
|
4
|
+
import { n as validateInvariantId, t as deriveProvidedInvariants } from "./invariants-CUbFGAse-DqgE4fhO.mjs";
|
|
5
|
+
import { a as materialiseMigrationPackage, c as writeMigrationMetadata, i as materialiseExtensionMigrationPackageIfMissing, l as writeMigrationOps, n as copyFilesWithRename, o as readMigrationPackage, r as formatMigrationDirName, s as readMigrationsDir, u as writeMigrationPackage } from "./io-CyV6U3am-CMJIi_UO.mjs";
|
|
6
6
|
import { t as EMPTY_CONTRACT_HASH } from "./constants-CM-w38DQ-Cz_EXbOc.mjs";
|
|
7
|
-
import { n as isGraphNode, t as assertHashIsGraphNode } from "./graph-membership-
|
|
8
|
-
import { a as findPath, c as findReachableLeaves, i as findLeaf, l as reconstructGraph, n as detectOrphans, o as findPathWithDecision, r as findLatestMigration, s as findPathWithInvariants, t as detectCycles } from "./migration-graph-
|
|
9
|
-
import { c as resolveRefsByContractHash, d as writeRef, i as readRefs, l as validateRefName, n as deleteRef, o as refsByContractHash, r as readRef, s as resolveRef, t as HEAD_REF_NAME, u as validateRefValue } from "./refs-
|
|
10
|
-
import { a as isValidSpaceId, c as spaceMigrationDirectory, i as assertValidSpaceId, l as spaceRefsDirectory, n as RESERVED_SPACE_SUBDIR_NAMES, o as listContractSpaceDirectories, r as SPACE_REFS_DIRNAME, s as readContractSpaceHeadRef, t as APP_SPACE_ID, u as verifyContractSpaces } from "./verify-contract-spaces-
|
|
11
|
-
import { a as createAggregateContractSpace, c as loadProblemToViolation, d as resolveRecordedPath, f as verifyMigration, i as computeIntegrityViolations, l as planMigration, n as buildFabricatedMigrationEdge, o as createContractSpaceAggregate, r as collectAggregateNamespaces, s as loadContractSpaceAggregate, t as allStorageElementsExternal, u as requireHeadRef } from "./aggregate-
|
|
12
|
-
import { a as gatherDiskContractSpaceState, i as emitContractSpaceArtifacts, n as computeExtensionSpaceApplyPath, o as planAllSpaces, r as contractSpaceFromJson, t as assertDescriptorSelfConsistency } from "./spaces
|
|
13
|
-
import { n as parseContractRef, r as parseMigrationRef, t as findEdgeByDirName } from "./ref-resolution-
|
|
7
|
+
import { n as isGraphNode, t as assertHashIsGraphNode } from "./graph-membership-CdU6royq-gP9Kb9Eh.mjs";
|
|
8
|
+
import { a as findPath, c as findReachableLeaves, i as findLeaf, l as reconstructGraph, n as detectOrphans, o as findPathWithDecision, r as findLatestMigration, s as findPathWithInvariants, t as detectCycles } from "./migration-graph-BBWEuNAt-C6X6rauo.mjs";
|
|
9
|
+
import { c as resolveRefsByContractHash, d as writeRef, i as readRefs, l as validateRefName, n as deleteRef, o as refsByContractHash, r as readRef, s as resolveRef, t as HEAD_REF_NAME, u as validateRefValue } from "./refs-S0wu2JkI-BbFdehLe.mjs";
|
|
10
|
+
import { a as isValidSpaceId, c as spaceMigrationDirectory, i as assertValidSpaceId, l as spaceRefsDirectory, n as RESERVED_SPACE_SUBDIR_NAMES, o as listContractSpaceDirectories, r as SPACE_REFS_DIRNAME, s as readContractSpaceHeadRef, t as APP_SPACE_ID, u as verifyContractSpaces } from "./verify-contract-spaces-BLkC9r9l-CJIppNL8.mjs";
|
|
11
|
+
import { a as createAggregateContractSpace, c as loadProblemToViolation, d as resolveRecordedPath, f as verifyMigration, i as computeIntegrityViolations, l as planMigration, n as buildFabricatedMigrationEdge, o as createContractSpaceAggregate, r as collectAggregateNamespaces, s as loadContractSpaceAggregate, t as allStorageElementsExternal, u as requireHeadRef } from "./aggregate-DqY54LCk.mjs";
|
|
12
|
+
import { a as gatherDiskContractSpaceState, i as emitContractSpaceArtifacts, n as computeExtensionSpaceApplyPath, o as planAllSpaces, r as contractSpaceFromJson, t as assertDescriptorSelfConsistency } from "./spaces--kxjIRHx.mjs";
|
|
13
|
+
import { n as parseContractRef, r as parseMigrationRef, t as findEdgeByDirName } from "./ref-resolution-BwWLoU7C.mjs";
|
|
14
14
|
import { i as writeMigrationTs, n as hasMigrationTs, r as shebangLineFor, t as detectScaffoldRuntime } from "./migration-ts-DdVm0rws.mjs";
|
|
15
|
-
import { i as isDirectEntrypoint, n as MigrationContractViews, r as buildMigrationArtifacts, t as Migration } from "./migration-
|
|
15
|
+
import { i as isDirectEntrypoint, n as MigrationContractViews, r as buildMigrationArtifacts, t as Migration } from "./migration-D95UJ0Dj.mjs";
|
|
16
16
|
import { t as ledgerOriginFromStored } from "./ledger-origin-D7PN4Fon.mjs";
|
|
17
|
-
export { APP_SPACE_ID, EMPTY_CONTRACT_HASH, HEAD_REF_NAME, Migration, MigrationContractViews, MigrationToolsError, RESERVED_SPACE_SUBDIR_NAMES, SPACE_REFS_DIRNAME, allStorageElementsExternal, assertDescriptorSelfConsistency, assertHashIsGraphNode, assertValidSpaceId, buildFabricatedMigrationEdge, buildMigrationArtifacts, collectAggregateNamespaces, computeExtensionSpaceApplyPath, computeIntegrityViolations, computeMigrationHash, contractSnapshotDir, contractSpaceFromJson, copyFilesWithRename, createAggregateContractSpace, createContractSpaceAggregate, deleteRef, deriveProvidedInvariants, detectCycles, detectOrphans, detectScaffoldRuntime, emitContractSpaceArtifacts, errorContractDeserializationFailed, errorContractSnapshotHashMismatch, errorContractSnapshotMissing, errorDescriptorHeadHashMismatch, errorInvalidJson, errorInvalidRefName, errorNoInvariantPath, errorUnknownInvariant, findEdgeByDirName, findLatestMigration, findLeaf, findPath, findPathWithDecision, findPathWithInvariants, findReachableLeaves, formatMigrationDirName, gatherDiskContractSpaceState, hasMigrationTs, isDirectEntrypoint, isGraphNode, isValidSpaceId, ledgerOriginFromStored, listContractSpaceDirectories, loadContractSpaceAggregate, loadProblemToViolation, materialiseExtensionMigrationPackageIfMissing, materialiseMigrationPackage, parseContractRef, parseMigrationRef, planAllSpaces, planMigration, readContractSnapshotJson, readContractSnapshotJsonTolerant, readContractSpaceHeadRef, readMigrationPackage, readMigrationsDir, readRef, readRefs, reconstructGraph, refsByContractHash, requireHeadRef, resolveRecordedPath, resolveRef, resolveRefsByContractHash, shebangLineFor, snapshotsImportPathFrom, spaceMigrationDirectory, spaceRefsDirectory, validateInvariantId, validateRefName, validateRefValue, verifyContractSpaces, verifyMigration, verifyMigrationHash, writeContractSnapshot, writeMigrationMetadata, writeMigrationOps, writeMigrationPackage, writeMigrationTs, writeRef };
|
|
17
|
+
export { APP_SPACE_ID, EMPTY_CONTRACT_HASH, HEAD_REF_NAME, Migration, MigrationContractViews, MigrationToolsError, RESERVED_SPACE_SUBDIR_NAMES, SPACE_REFS_DIRNAME, allStorageElementsExternal, assertDescriptorSelfConsistency, assertHashIsGraphNode, assertValidSpaceId, buildFabricatedMigrationEdge, buildMigrationArtifacts, collectAggregateNamespaces, computeExtensionSpaceApplyPath, computeIntegrityViolations, computeMigrationHash, contractSnapshotDir, contractSpaceFromJson, copyFilesWithRename, createAggregateContractSpace, createContractSpaceAggregate, createSnapshotContentVerifier, deleteRef, deriveProvidedInvariants, detectCycles, detectOrphans, detectScaffoldRuntime, emitContractSpaceArtifacts, errorContractDeserializationFailed, errorContractSnapshotHashMismatch, errorContractSnapshotMissing, errorDescriptorHeadHashMismatch, errorInvalidJson, errorInvalidRefName, errorNoInvariantPath, errorUnknownInvariant, findEdgeByDirName, findLatestMigration, findLeaf, findPath, findPathWithDecision, findPathWithInvariants, findReachableLeaves, formatMigrationDirName, gatherDiskContractSpaceState, hasMigrationTs, isDirectEntrypoint, isGraphNode, isValidSpaceId, ledgerOriginFromStored, listContractSpaceDirectories, loadContractSpaceAggregate, loadProblemToViolation, materialiseExtensionMigrationPackageIfMissing, materialiseMigrationPackage, parseContractRef, parseMigrationRef, planAllSpaces, planMigration, readContractSnapshotJson, readContractSnapshotJsonTolerant, readContractSpaceHeadRef, readMigrationPackage, readMigrationsDir, readRef, readRefs, reconstructGraph, refsByContractHash, requireHeadRef, resolveRecordedPath, resolveRef, resolveRefsByContractHash, shebangLineFor, snapshotsImportPathFrom, spaceMigrationDirectory, spaceRefsDirectory, validateInvariantId, validateRefName, validateRefValue, verifyContractSpaces, verifyMigration, verifyMigrationHash, writeContractSnapshot, writeMigrationMetadata, writeMigrationOps, writeMigrationPackage, writeMigrationTs, writeRef };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { A as buildFabricatedMigrationEdge, B as verifyMigration, C as ResolveRecordedPathOutcome, D as VerifierOutput, E as VerifierInput, F as loadContractSpaceAggregate, I as loadProblemToViolation, L as planMigration, M as computeIntegrityViolations, N as createAggregateContractSpace, O as VerifierSuccess, P as createContractSpaceAggregate, R as requireHeadRef, S as ResolveRecordedPathInputs, T as VerifierError, _ as PerSpacePlan, a as ContractAtOptions, b as PlannerOutput, c as ContractSpaceAggregate, d as IntegrityQueryOptions, f as IntegritySpaceState, g as MarkerCheckSection, h as MarkerCheckResult, i as CallerPolicy, j as collectAggregateNamespaces, k as allStorageElementsExternal, l as DeclaredExtensionEntry, m as LoadAggregateInput, n as AggregateCurrentDBState, o as ContractAtResult, p as IntegrityViolation, r as AggregateMigrationEdgeRef, s as ContractMarkerRecordLike, t as AggregateContractSpace, u as IntegrityComputationInput, v as PlannerError, w as SchemaCheckSection, x as PlannerSuccess, y as PlannerInput, z as resolveRecordedPath } from "./aggregate-
|
|
1
|
+
import { A as buildFabricatedMigrationEdge, B as verifyMigration, C as ResolveRecordedPathOutcome, D as VerifierOutput, E as VerifierInput, F as loadContractSpaceAggregate, I as loadProblemToViolation, L as planMigration, M as computeIntegrityViolations, N as createAggregateContractSpace, O as VerifierSuccess, P as createContractSpaceAggregate, R as requireHeadRef, S as ResolveRecordedPathInputs, T as VerifierError, _ as PerSpacePlan, a as ContractAtOptions, b as PlannerOutput, c as ContractSpaceAggregate, d as IntegrityQueryOptions, f as IntegritySpaceState, g as MarkerCheckSection, h as MarkerCheckResult, i as CallerPolicy, j as collectAggregateNamespaces, k as allStorageElementsExternal, l as DeclaredExtensionEntry, m as LoadAggregateInput, n as AggregateCurrentDBState, o as ContractAtResult, p as IntegrityViolation, r as AggregateMigrationEdgeRef, s as ContractMarkerRecordLike, t as AggregateContractSpace, u as IntegrityComputationInput, v as PlannerError, w as SchemaCheckSection, x as PlannerSuccess, y as PlannerInput, z as resolveRecordedPath } from "./aggregate-BxeUZtei.mjs";
|
|
2
2
|
export { type AggregateContractSpace, type AggregateCurrentDBState, type AggregateMigrationEdgeRef, type CallerPolicy, type ContractAtOptions, type ContractAtResult, type ContractMarkerRecordLike, type ContractSpaceAggregate, type DeclaredExtensionEntry, type IntegrityComputationInput, type IntegrityQueryOptions, type IntegritySpaceState, type IntegrityViolation, type LoadAggregateInput, type MarkerCheckResult, type MarkerCheckSection, type PerSpacePlan, type PlannerError, type PlannerInput, type PlannerOutput, type PlannerSuccess, type ResolveRecordedPathInputs, type ResolveRecordedPathOutcome, type SchemaCheckSection, type VerifierError, type VerifierInput, type VerifierOutput, type VerifierSuccess, allStorageElementsExternal, buildFabricatedMigrationEdge, collectAggregateNamespaces, computeIntegrityViolations, createAggregateContractSpace, createContractSpaceAggregate, loadContractSpaceAggregate, loadProblemToViolation, planMigration, requireHeadRef, resolveRecordedPath, verifyMigration };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as createAggregateContractSpace, c as loadProblemToViolation, d as resolveRecordedPath, f as verifyMigration, i as computeIntegrityViolations, l as planMigration, n as buildFabricatedMigrationEdge, o as createContractSpaceAggregate, r as collectAggregateNamespaces, s as loadContractSpaceAggregate, t as allStorageElementsExternal, u as requireHeadRef } from "./aggregate-
|
|
1
|
+
import { a as createAggregateContractSpace, c as loadProblemToViolation, d as resolveRecordedPath, f as verifyMigration, i as computeIntegrityViolations, l as planMigration, n as buildFabricatedMigrationEdge, o as createContractSpaceAggregate, r as collectAggregateNamespaces, s as loadContractSpaceAggregate, t as allStorageElementsExternal, u as requireHeadRef } from "./aggregate-DqY54LCk.mjs";
|
|
2
2
|
export { allStorageElementsExternal, buildFabricatedMigrationEdge, collectAggregateNamespaces, computeIntegrityViolations, createAggregateContractSpace, createContractSpaceAggregate, loadContractSpaceAggregate, loadProblemToViolation, planMigration, requireHeadRef, resolveRecordedPath, verifyMigration };
|
|
@@ -1,2 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { t as SnapshotCanonicalizationHooks } from "./hash-DclMqd7S-WBvXJ_4C.mjs";
|
|
2
|
+
import { a as readContractSnapshotJson, c as writeContractSnapshot, i as createSnapshotContentVerifier, n as SnapshotContentVerifier, o as readContractSnapshotJsonTolerant, r as contractSnapshotDir, s as snapshotsImportPathFrom, t as ContractSnapshotInput } from "./contract-snapshot-store-Bok5nQYi-D3g_P7im.mjs";
|
|
3
|
+
import "./contract-snapshot-store-DrIwu5pn.mjs";
|
|
4
|
+
export { type ContractSnapshotInput, type SnapshotCanonicalizationHooks, type SnapshotContentVerifier, contractSnapshotDir, createSnapshotContentVerifier, readContractSnapshotJson, readContractSnapshotJsonTolerant, snapshotsImportPathFrom, writeContractSnapshot };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as
|
|
2
|
-
export { contractSnapshotDir, readContractSnapshotJson, readContractSnapshotJsonTolerant, snapshotsImportPathFrom, writeContractSnapshot };
|
|
1
|
+
import { a as snapshotsImportPathFrom, i as readContractSnapshotJsonTolerant, n as createSnapshotContentVerifier, o as writeContractSnapshot, r as readContractSnapshotJson, t as contractSnapshotDir } from "./contract-snapshot-store-CM9ubenX-o8kTVHxP.mjs";
|
|
2
|
+
export { contractSnapshotDir, createSnapshotContentVerifier, readContractSnapshotJson, readContractSnapshotJsonTolerant, snapshotsImportPathFrom, writeContractSnapshot };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { F as errorUnknownInvariant, _ as errorInvalidJson, i as errorContractDeserializationFailed, k as errorNoInvariantPath, o as errorContractSnapshotHashMismatch, s as errorContractSnapshotMissing, t as MigrationToolsError, u as errorDescriptorHeadHashMismatch, x as errorInvalidRefName } from "./errors-BIroGS9E-Dg6CF-dm.mjs";
|
|
2
2
|
export { MigrationToolsError, errorContractDeserializationFailed, errorContractSnapshotHashMismatch, errorContractSnapshotMissing, errorDescriptorHeadHashMismatch, errorInvalidJson, errorInvalidRefName, errorNoInvariantPath, errorUnknownInvariant };
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { i as verifyMigrationHash, n as VerifyResult, r as computeMigrationHash } from "./hash-DclMqd7S-WBvXJ_4C.mjs";
|
|
2
|
+
import "./hash-CwWGlFWV.mjs";
|
|
2
3
|
export { type VerifyResult, computeMigrationHash, verifyMigrationHash };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { r as verifyMigrationHash, t as computeMigrationHash } from "./hash-BAZVWU4a-BdynTmar.mjs";
|
|
2
2
|
export { computeMigrationHash, verifyMigrationHash };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as validateInvariantId, t as deriveProvidedInvariants } from "./invariants-
|
|
1
|
+
import { n as validateInvariantId, t as deriveProvidedInvariants } from "./invariants-CUbFGAse-DqgE4fhO.mjs";
|
|
2
2
|
export { deriveProvidedInvariants, validateInvariantId };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { a as materialiseExtensionMigrationPackageIfMissing, c as readMigrationsDir, d as writeMigrationPackage, i as formatMigrationDirName, l as writeMigrationMetadata, n as ReadMigrationsDirResult, o as materialiseMigrationPackage, r as copyFilesWithRename, s as readMigrationPackage, t as PackageLoadProblem, u as writeMigrationOps } from "./io-
|
|
2
|
-
import "./io-
|
|
1
|
+
import { a as materialiseExtensionMigrationPackageIfMissing, c as readMigrationsDir, d as writeMigrationPackage, i as formatMigrationDirName, l as writeMigrationMetadata, n as ReadMigrationsDirResult, o as materialiseMigrationPackage, r as copyFilesWithRename, s as readMigrationPackage, t as PackageLoadProblem, u as writeMigrationOps } from "./io-DZfMV51z-BKlH5Dhb.mjs";
|
|
2
|
+
import "./io-D8Epu7iY.mjs";
|
|
3
3
|
export { type PackageLoadProblem, type ReadMigrationsDirResult, copyFilesWithRename, formatMigrationDirName, materialiseExtensionMigrationPackageIfMissing, materialiseMigrationPackage, readMigrationPackage, readMigrationsDir, writeMigrationMetadata, writeMigrationOps, writeMigrationPackage };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as materialiseMigrationPackage, c as writeMigrationMetadata, i as materialiseExtensionMigrationPackageIfMissing, l as writeMigrationOps, n as copyFilesWithRename, o as readMigrationPackage, r as formatMigrationDirName, s as readMigrationsDir, u as writeMigrationPackage } from "./io-
|
|
1
|
+
import { a as materialiseMigrationPackage, c as writeMigrationMetadata, i as materialiseExtensionMigrationPackageIfMissing, l as writeMigrationOps, n as copyFilesWithRename, o as readMigrationPackage, r as formatMigrationDirName, s as readMigrationsDir, u as writeMigrationPackage } from "./io-CyV6U3am-CMJIi_UO.mjs";
|
|
2
2
|
export { copyFilesWithRename, formatMigrationDirName, materialiseExtensionMigrationPackageIfMissing, materialiseMigrationPackage, readMigrationPackage, readMigrationsDir, writeMigrationMetadata, writeMigrationOps, writeMigrationPackage };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { a as findLeaf, c as findPathWithInvariants, i as findLatestMigration, l as findReachableLeaves, n as detectCycles, o as findPath, r as detectOrphans, s as findPathWithDecision, t as PathDecision, u as reconstructGraph } from "./migration-graph-tarTxJ99-
|
|
2
|
-
import { n as isGraphNode, t as assertHashIsGraphNode } from "./migration-graph-
|
|
1
|
+
import { a as findLeaf, c as findPathWithInvariants, i as findLatestMigration, l as findReachableLeaves, n as detectCycles, o as findPath, r as detectOrphans, s as findPathWithDecision, t as PathDecision, u as reconstructGraph } from "./migration-graph-tarTxJ99-2GNs0O8U.mjs";
|
|
2
|
+
import { n as isGraphNode, t as assertHashIsGraphNode } from "./migration-graph-CHhNBJSJ.mjs";
|
|
3
3
|
export { type PathDecision, assertHashIsGraphNode, detectCycles, detectOrphans, findLatestMigration, findLeaf, findPath, findPathWithDecision, findPathWithInvariants, findReachableLeaves, isGraphNode, reconstructGraph };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { n as isGraphNode, t as assertHashIsGraphNode } from "./graph-membership-
|
|
2
|
-
import { a as findPath, c as findReachableLeaves, i as findLeaf, l as reconstructGraph, n as detectOrphans, o as findPathWithDecision, r as findLatestMigration, s as findPathWithInvariants, t as detectCycles } from "./migration-graph-
|
|
1
|
+
import { n as isGraphNode, t as assertHashIsGraphNode } from "./graph-membership-CdU6royq-gP9Kb9Eh.mjs";
|
|
2
|
+
import { a as findPath, c as findReachableLeaves, i as findLeaf, l as reconstructGraph, n as detectOrphans, o as findPathWithDecision, r as findLatestMigration, s as findPathWithInvariants, t as detectCycles } from "./migration-graph-BBWEuNAt-C6X6rauo.mjs";
|
|
3
3
|
export { assertHashIsGraphNode, detectCycles, detectOrphans, findLatestMigration, findLeaf, findPath, findPathWithDecision, findPathWithInvariants, findReachableLeaves, isGraphNode, reconstructGraph };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { i as isDirectEntrypoint, n as MigrationContractViews, r as buildMigrationArtifacts, t as Migration } from "./migration-
|
|
1
|
+
import { i as isDirectEntrypoint, n as MigrationContractViews, r as buildMigrationArtifacts, t as Migration } from "./migration-D95UJ0Dj.mjs";
|
|
2
2
|
export { Migration, MigrationContractViews, buildMigrationArtifacts, isDirectEntrypoint };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as parseContractRef, r as parseMigrationRef, t as findEdgeByDirName } from "./ref-resolution-
|
|
1
|
+
import { n as parseContractRef, r as parseMigrationRef, t as findEdgeByDirName } from "./ref-resolution-BwWLoU7C.mjs";
|
|
2
2
|
export { findEdgeByDirName, parseContractRef, parseMigrationRef };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { c as resolveRefsByContractHash, d as writeRef, i as readRefs, l as validateRefName, n as deleteRef, o as refsByContractHash, r as readRef, s as resolveRef, t as HEAD_REF_NAME, u as validateRefValue } from "./refs-
|
|
1
|
+
import { c as resolveRefsByContractHash, d as writeRef, i as readRefs, l as validateRefName, n as deleteRef, o as refsByContractHash, r as readRef, s as resolveRef, t as HEAD_REF_NAME, u as validateRefValue } from "./refs-S0wu2JkI-BbFdehLe.mjs";
|
|
2
2
|
export { HEAD_REF_NAME, deleteRef, readRef, readRefs, refsByContractHash, resolveRef, resolveRefsByContractHash, validateRefName, validateRefValue, writeRef };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { a as isValidSpaceId, c as spaceMigrationDirectory, i as assertValidSpaceId, l as spaceRefsDirectory, n as RESERVED_SPACE_SUBDIR_NAMES, o as listContractSpaceDirectories, r as SPACE_REFS_DIRNAME, s as readContractSpaceHeadRef, t as APP_SPACE_ID, u as verifyContractSpaces } from "./verify-contract-spaces-
|
|
2
|
-
import { a as gatherDiskContractSpaceState, i as emitContractSpaceArtifacts, n as computeExtensionSpaceApplyPath, o as planAllSpaces, r as contractSpaceFromJson, t as assertDescriptorSelfConsistency } from "./spaces
|
|
1
|
+
import { a as isValidSpaceId, c as spaceMigrationDirectory, i as assertValidSpaceId, l as spaceRefsDirectory, n as RESERVED_SPACE_SUBDIR_NAMES, o as listContractSpaceDirectories, r as SPACE_REFS_DIRNAME, s as readContractSpaceHeadRef, t as APP_SPACE_ID, u as verifyContractSpaces } from "./verify-contract-spaces-BLkC9r9l-CJIppNL8.mjs";
|
|
2
|
+
import { a as gatherDiskContractSpaceState, i as emitContractSpaceArtifacts, n as computeExtensionSpaceApplyPath, o as planAllSpaces, r as contractSpaceFromJson, t as assertDescriptorSelfConsistency } from "./spaces--kxjIRHx.mjs";
|
|
3
3
|
export { APP_SPACE_ID, RESERVED_SPACE_SUBDIR_NAMES, SPACE_REFS_DIRNAME, assertDescriptorSelfConsistency, assertValidSpaceId, computeExtensionSpaceApplyPath, contractSpaceFromJson, emitContractSpaceArtifacts, gatherDiskContractSpaceState, isValidSpaceId, listContractSpaceDirectories, planAllSpaces, readContractSpaceHeadRef, spaceMigrationDirectory, spaceRefsDirectory, verifyContractSpaces };
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { r as getEmittedArtifactPaths, t as emit } from "./exports-DI1kMms6--e9LdT9A.mjs";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { n as
|
|
5
|
-
import { t as deriveProvidedInvariants } from "./invariants-
|
|
6
|
-
import { i as materialiseExtensionMigrationPackageIfMissing, r as formatMigrationDirName, u as writeMigrationPackage } from "./io-
|
|
2
|
+
import { F as errorUnknownInvariant, i as errorContractDeserializationFailed, k as errorNoInvariantPath, t as MigrationToolsError, x as errorInvalidRefName } from "./errors-BIroGS9E-Dg6CF-dm.mjs";
|
|
3
|
+
import { r as verifyMigrationHash, t as computeMigrationHash } from "./hash-BAZVWU4a-BdynTmar.mjs";
|
|
4
|
+
import { a as snapshotsImportPathFrom, n as createSnapshotContentVerifier, o as writeContractSnapshot, r as readContractSnapshotJson, t as contractSnapshotDir } from "./contract-snapshot-store-CM9ubenX-o8kTVHxP.mjs";
|
|
5
|
+
import { t as deriveProvidedInvariants } from "./invariants-CUbFGAse-DqgE4fhO.mjs";
|
|
6
|
+
import { i as materialiseExtensionMigrationPackageIfMissing, r as formatMigrationDirName, u as writeMigrationPackage } from "./io-CyV6U3am-CMJIi_UO.mjs";
|
|
7
7
|
import { t as EMPTY_CONTRACT_HASH } from "./constants-CM-w38DQ-Cz_EXbOc.mjs";
|
|
8
|
-
import { n as isGraphNode, t as assertHashIsGraphNode } from "./graph-membership-
|
|
9
|
-
import { a as findPath, o as findPathWithDecision, r as findLatestMigration } from "./migration-graph-
|
|
10
|
-
import { d as writeRef, i as readRefs, l as validateRefName, n as deleteRef, o as refsByContractHash, t as HEAD_REF_NAME, u as validateRefValue } from "./refs-
|
|
11
|
-
import { a as isValidSpaceId, c as spaceMigrationDirectory, l as spaceRefsDirectory, o as listContractSpaceDirectories, s as readContractSpaceHeadRef, t as APP_SPACE_ID$1 } from "./verify-contract-spaces-
|
|
12
|
-
import { d as resolveRecordedPath, f as verifyMigration, l as planMigration, n as buildFabricatedMigrationEdge, r as collectAggregateNamespaces, s as loadContractSpaceAggregate, t as allStorageElementsExternal, u as requireHeadRef } from "./aggregate-
|
|
13
|
-
import { i as emitContractSpaceArtifacts, o as planAllSpaces } from "./spaces
|
|
8
|
+
import { n as isGraphNode, t as assertHashIsGraphNode } from "./graph-membership-CdU6royq-gP9Kb9Eh.mjs";
|
|
9
|
+
import { a as findPath, o as findPathWithDecision, r as findLatestMigration } from "./migration-graph-BBWEuNAt-C6X6rauo.mjs";
|
|
10
|
+
import { d as writeRef, i as readRefs, l as validateRefName, n as deleteRef, o as refsByContractHash, t as HEAD_REF_NAME, u as validateRefValue } from "./refs-S0wu2JkI-BbFdehLe.mjs";
|
|
11
|
+
import { a as isValidSpaceId, c as spaceMigrationDirectory, l as spaceRefsDirectory, o as listContractSpaceDirectories, s as readContractSpaceHeadRef, t as APP_SPACE_ID$1 } from "./verify-contract-spaces-BLkC9r9l-CJIppNL8.mjs";
|
|
12
|
+
import { d as resolveRecordedPath, f as verifyMigration, l as planMigration, n as buildFabricatedMigrationEdge, r as collectAggregateNamespaces, s as loadContractSpaceAggregate, t as allStorageElementsExternal, u as requireHeadRef } from "./aggregate-DqY54LCk.mjs";
|
|
13
|
+
import { i as emitContractSpaceArtifacts, o as planAllSpaces } from "./spaces--kxjIRHx.mjs";
|
|
14
14
|
import { c as internalImportRoot, o as importRootForDependencies, r as createImportSpecifierResolver, t as ImportRootError } from "./import-roots-CCyOuQxb.mjs";
|
|
15
|
-
import { n as parseContractRef, r as parseMigrationRef } from "./ref-resolution-
|
|
15
|
+
import { n as parseContractRef, r as parseMigrationRef } from "./ref-resolution-BwWLoU7C.mjs";
|
|
16
16
|
import { i as writeMigrationTs } from "./migration-ts-DdVm0rws.mjs";
|
|
17
17
|
import { createRequire } from "node:module";
|
|
18
18
|
import { existsSync, readFileSync, readdirSync, statSync } from "node:fs";
|
|
@@ -28,12 +28,12 @@ import { mergeCapabilityMatrices } from "@prisma/orm-framework/components/compon
|
|
|
28
28
|
import { ERROR_CODE_DESTRUCTIVE_CHANGES, errorConsentPlanMismatch, errorDestructiveChanges, errorHashMismatch, errorMarkerMissing, errorRunnerFailed, errorRuntime, errorTargetMismatch } from "@prisma/orm-framework/errors/execution";
|
|
29
29
|
import "@prisma/orm-framework/errors/migration";
|
|
30
30
|
import { basename, dirname, isAbsolute, join, relative, resolve } from "pathe";
|
|
31
|
-
import { mkdir, readFile, rename, rm, writeFile } from "node:fs/promises";
|
|
32
31
|
import { createHash } from "node:crypto";
|
|
33
32
|
import { canonicalizeJson } from "@prisma/orm-framework/components/utils";
|
|
33
|
+
import { mkdir, readFile, rename, rm, writeFile } from "node:fs/promises";
|
|
34
34
|
import { abortable } from "@prisma/orm-framework/utils/abortable";
|
|
35
35
|
import { resolve as resolve$1 } from "node:path";
|
|
36
|
-
//#region ../../../1-framework/3-tooling/cli/dist/ref-
|
|
36
|
+
//#region ../../../1-framework/3-tooling/cli/dist/ref-D5u8Xxwc.mjs
|
|
37
37
|
/**
|
|
38
38
|
* The typed remediation the CLI attaches to its own errors and findings.
|
|
39
39
|
* Constructors live here rather than in any library the CLI calls: naming a
|
|
@@ -466,6 +466,23 @@ function assertFrameworkComponentsCompatible(expectedFamilyId, expectedTargetId,
|
|
|
466
466
|
}
|
|
467
467
|
return frameworkComponents;
|
|
468
468
|
}
|
|
469
|
+
/**
|
|
470
|
+
* Build the per-command snapshot content verifier from the target
|
|
471
|
+
* serializer's `hashCanonicalizationHooks` — the hooks the family's emit
|
|
472
|
+
* pipeline computed the published storage hash with. The serializer's own
|
|
473
|
+
* `shouldPreserveEmpty` / `sortStorage` must NOT be used here: they govern
|
|
474
|
+
* on-disk serialization and may be broader per target (Postgres preserves
|
|
475
|
+
* required entity-kind fields at default values), so recomputing with them
|
|
476
|
+
* would reject untampered snapshots. A serializer that does not declare its
|
|
477
|
+
* hashing hooks (structural test stand-ins) reads without content
|
|
478
|
+
* verification. Build one verifier per command run and share it across
|
|
479
|
+
* every load, so each snapshot hash is recomputed at most once per run.
|
|
480
|
+
*/
|
|
481
|
+
function snapshotVerifierFor(config) {
|
|
482
|
+
const hooks = config.target.contractSerializer?.hashCanonicalizationHooks;
|
|
483
|
+
if (hooks === void 0) return;
|
|
484
|
+
return createSnapshotContentVerifier(hooks);
|
|
485
|
+
}
|
|
469
486
|
function isPlainObject(value) {
|
|
470
487
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
471
488
|
}
|
|
@@ -828,7 +845,8 @@ async function loadContractSpaceAggregateForCli(inputs) {
|
|
|
828
845
|
return ok(await loadContractSpaceAggregate({
|
|
829
846
|
migrationsDir: inputs.migrationsDir,
|
|
830
847
|
deserializeContract: inputs.deserializeContract,
|
|
831
|
-
appContract: inputs.appContract
|
|
848
|
+
appContract: inputs.appContract,
|
|
849
|
+
...ifDefined("verifySnapshotContent", inputs.verifySnapshotContent)
|
|
832
850
|
}));
|
|
833
851
|
}
|
|
834
852
|
/**
|
|
@@ -930,7 +948,8 @@ async function buildReadAggregate(config, options) {
|
|
|
930
948
|
migrationsDir: options.migrationsDir,
|
|
931
949
|
appContract: appContractForLoad,
|
|
932
950
|
extensions: config.extensions ?? [],
|
|
933
|
-
deserializeContract
|
|
951
|
+
deserializeContract,
|
|
952
|
+
...ifDefined("verifySnapshotContent", options.verifySnapshotContent ?? snapshotVerifierFor(config))
|
|
934
953
|
});
|
|
935
954
|
if (!loaded.ok) return loaded;
|
|
936
955
|
return ok({
|
|
@@ -1143,7 +1162,8 @@ async function executeRun(options) {
|
|
|
1143
1162
|
migrationsDir,
|
|
1144
1163
|
appContract: contract,
|
|
1145
1164
|
extensions,
|
|
1146
|
-
deserializeContract: (json) => familyInstance.deserializeContract(json)
|
|
1165
|
+
deserializeContract: (json) => familyInstance.deserializeContract(json),
|
|
1166
|
+
...ifDefined("verifySnapshotContent", options.verifySnapshotContent)
|
|
1147
1167
|
});
|
|
1148
1168
|
if (!loaded.ok) throw loaded.failure;
|
|
1149
1169
|
const aggregate = loaded.value;
|
|
@@ -1403,6 +1423,7 @@ async function executeDbInit(options) {
|
|
|
1403
1423
|
extensions: options.extensions ?? [],
|
|
1404
1424
|
policy: { allowedOperationClasses: ["additive"] },
|
|
1405
1425
|
action: "dbInit",
|
|
1426
|
+
...ifDefined("verifySnapshotContent", options.verifySnapshotContent),
|
|
1406
1427
|
...ifDefined("onProgress", options.onProgress)
|
|
1407
1428
|
});
|
|
1408
1429
|
}
|
|
@@ -1433,6 +1454,7 @@ async function executeDbUpdate(options) {
|
|
|
1433
1454
|
extensions: options.extensions ?? [],
|
|
1434
1455
|
policy: DB_UPDATE_POLICY,
|
|
1435
1456
|
action: "dbUpdate",
|
|
1457
|
+
...ifDefined("verifySnapshotContent", options.verifySnapshotContent),
|
|
1436
1458
|
...ifDefined("onProgress", options.onProgress)
|
|
1437
1459
|
};
|
|
1438
1460
|
if (options.mode === "apply" && !options.acceptDataLoss && options.consent === void 0) {
|
|
@@ -1543,7 +1565,8 @@ function buildLoadInputs(options) {
|
|
|
1543
1565
|
migrationsDir: options.migrationsDir,
|
|
1544
1566
|
appContract: options.contract,
|
|
1545
1567
|
extensions: options.extensions,
|
|
1546
|
-
deserializeContract: (json) => options.familyInstance.deserializeContract(json)
|
|
1568
|
+
deserializeContract: (json) => options.familyInstance.deserializeContract(json),
|
|
1569
|
+
...ifDefined("verifySnapshotContent", options.verifySnapshotContent)
|
|
1547
1570
|
};
|
|
1548
1571
|
}
|
|
1549
1572
|
async function runIntrospection(args) {
|
|
@@ -1722,7 +1745,8 @@ async function executeMigrate(options) {
|
|
|
1722
1745
|
migrationsDir,
|
|
1723
1746
|
appContract: contract,
|
|
1724
1747
|
extensions,
|
|
1725
|
-
deserializeContract: (json) => familyInstance.deserializeContract(json)
|
|
1748
|
+
deserializeContract: (json) => familyInstance.deserializeContract(json),
|
|
1749
|
+
...ifDefined("verifySnapshotContent", options.verifySnapshotContent)
|
|
1726
1750
|
});
|
|
1727
1751
|
if (!loaded.ok) throw loaded.failure;
|
|
1728
1752
|
const aggregate = loaded.value;
|
|
@@ -2079,9 +2103,12 @@ var ControlClientImpl = class {
|
|
|
2079
2103
|
frameworkComponents = null;
|
|
2080
2104
|
initialized = false;
|
|
2081
2105
|
defaultConnection;
|
|
2106
|
+
/** One per client so the verified-hash memo spans operations (e.g. db update's pre-plan + consented apply). */
|
|
2107
|
+
snapshotVerifier;
|
|
2082
2108
|
constructor(options) {
|
|
2083
2109
|
this.options = options;
|
|
2084
2110
|
this.defaultConnection = options.connection;
|
|
2111
|
+
this.snapshotVerifier = snapshotVerifierFor(options);
|
|
2085
2112
|
}
|
|
2086
2113
|
init() {
|
|
2087
2114
|
if (this.initialized) return;
|
|
@@ -2310,6 +2337,7 @@ var ControlClientImpl = class {
|
|
|
2310
2337
|
migrationsDir: options.migrationsDir,
|
|
2311
2338
|
targetId: this.options.target.targetId,
|
|
2312
2339
|
extensions: this.options.extensions ?? [],
|
|
2340
|
+
...ifDefined("verifySnapshotContent", this.snapshotVerifier),
|
|
2313
2341
|
...ifDefined("onProgress", onProgress)
|
|
2314
2342
|
});
|
|
2315
2343
|
}
|
|
@@ -2338,6 +2366,7 @@ var ControlClientImpl = class {
|
|
|
2338
2366
|
extensions: this.options.extensions ?? [],
|
|
2339
2367
|
...ifDefined("acceptDataLoss", options.acceptDataLoss),
|
|
2340
2368
|
...ifDefined("consent", options.consent),
|
|
2369
|
+
...ifDefined("verifySnapshotContent", this.snapshotVerifier),
|
|
2341
2370
|
...ifDefined("onProgress", onProgress)
|
|
2342
2371
|
});
|
|
2343
2372
|
}
|
|
@@ -2356,6 +2385,7 @@ var ControlClientImpl = class {
|
|
|
2356
2385
|
mode: options.strict ? "strict" : "lenient",
|
|
2357
2386
|
skipSchema: options.skipSchema,
|
|
2358
2387
|
skipMarker: options.skipMarker,
|
|
2388
|
+
...ifDefined("verifySnapshotContent", this.snapshotVerifier),
|
|
2359
2389
|
...ifDefined("onProgress", onProgress)
|
|
2360
2390
|
});
|
|
2361
2391
|
}
|
|
@@ -2401,6 +2431,7 @@ var ControlClientImpl = class {
|
|
|
2401
2431
|
...ifDefined("refHash", options.refHash),
|
|
2402
2432
|
...ifDefined("refInvariants", options.refInvariants),
|
|
2403
2433
|
...ifDefined("refName", options.refName),
|
|
2434
|
+
...ifDefined("verifySnapshotContent", this.snapshotVerifier),
|
|
2404
2435
|
...ifDefined("onProgress", onProgress)
|
|
2405
2436
|
});
|
|
2406
2437
|
}
|
|
@@ -3218,7 +3249,7 @@ async function resolveContractRefToSnapshot(options) {
|
|
|
3218
3249
|
const targetHash = refResult.value.hash;
|
|
3219
3250
|
if (bundles.find((p) => p.metadata.to === targetHash)) return ok({
|
|
3220
3251
|
hash: targetHash,
|
|
3221
|
-
contractJson: blindCast(await readContractSnapshotJson(options.migrationsDir, targetHash)),
|
|
3252
|
+
contractJson: blindCast(await readContractSnapshotJson(options.migrationsDir, targetHash, snapshotVerifierFor(options.config))),
|
|
3222
3253
|
contractJsonPath: join(contractSnapshotDir(options.migrationsDir, targetHash), "contract.json"),
|
|
3223
3254
|
source: "snapshot"
|
|
3224
3255
|
});
|
|
@@ -3691,7 +3722,9 @@ function checkFileExists(space, dirPath, dirName, fileName) {
|
|
|
3691
3722
|
* package dir with only `migration.json` + `ops.json` is legitimate); a
|
|
3692
3723
|
* present entry whose inner `storage.storageHash` disagrees with
|
|
3693
3724
|
* `pkg.metadata.to` is `MIGRATION.CHECK_SNAPSHOT_HASH_MISMATCH`; an unparseable store
|
|
3694
|
-
* entry (or a malformed `to`) is `MIGRATION.CHECK_SNAPSHOT_UNPARSEABLE
|
|
3725
|
+
* entry (or a malformed `to`) is `MIGRATION.CHECK_SNAPSHOT_UNPARSEABLE`; a parseable
|
|
3726
|
+
* entry whose declared hash agrees but whose content recomputes to a different
|
|
3727
|
+
* storage hash is `MIGRATION.CHECK_SNAPSHOT_CONTENT_MISMATCH`.
|
|
3695
3728
|
*/
|
|
3696
3729
|
async function checkSnapshotConsistency(space, pkg, migrationsDir) {
|
|
3697
3730
|
const spaceId = space.spaceId;
|
|
@@ -3728,6 +3761,21 @@ async function checkSnapshotConsistency(space, pkg, migrationsDir) {
|
|
|
3728
3761
|
why: `Migration "${pkg.dirName}" declares to=${pkg.metadata.to} but its contract snapshot has storageHash=${snapshotHash}`,
|
|
3729
3762
|
nextActions: [chooseAction("Re-emit the migration package so migration.json and its contract snapshot agree")]
|
|
3730
3763
|
};
|
|
3764
|
+
if (space.verifySnapshotContent !== void 0) {
|
|
3765
|
+
const jsonPath = join(snapshotDir, "contract.json");
|
|
3766
|
+
try {
|
|
3767
|
+
space.verifySnapshotContent.assertSnapshotContentMatches(raw, pkg.metadata.to, jsonPath);
|
|
3768
|
+
} catch (error) {
|
|
3769
|
+
if (!MigrationToolsError.is(error) || error.code !== "MIGRATION.CONTRACT_SNAPSHOT_CONTENT_MISMATCH") throw error;
|
|
3770
|
+
return {
|
|
3771
|
+
space: spaceId,
|
|
3772
|
+
code: "MIGRATION.CHECK_SNAPSHOT_CONTENT_MISMATCH",
|
|
3773
|
+
where: migrationPathRelative(space.cwd, jsonPath),
|
|
3774
|
+
why: `Migration "${pkg.dirName}": ${error.why}`,
|
|
3775
|
+
nextActions: [chooseAction("Restore migrations/snapshots/ from version control"), chooseAction("Or re-run the command that produced this migration to regenerate its snapshot")]
|
|
3776
|
+
};
|
|
3777
|
+
}
|
|
3778
|
+
}
|
|
3731
3779
|
return null;
|
|
3732
3780
|
}
|
|
3733
3781
|
/**
|
|
@@ -3738,7 +3786,7 @@ async function checkSnapshotConsistency(space, pkg, migrationsDir) {
|
|
|
3738
3786
|
* membership matches the on-disk directories, package / ref / graph data come
|
|
3739
3787
|
* from `aggregate.space(id)`.
|
|
3740
3788
|
*/
|
|
3741
|
-
async function enumerateCheckSpaces(aggregate, projectMigrationsDir, cwd) {
|
|
3789
|
+
async function enumerateCheckSpaces(aggregate, projectMigrationsDir, cwd, verifySnapshotContent) {
|
|
3742
3790
|
const candidateDirs = await listContractSpaceDirectories(projectMigrationsDir);
|
|
3743
3791
|
const onDiskSpaceIds = new Set(candidateDirs.filter(isValidSpaceId));
|
|
3744
3792
|
const spaces = [];
|
|
@@ -3755,7 +3803,8 @@ async function enumerateCheckSpaces(aggregate, projectMigrationsDir, cwd) {
|
|
|
3755
3803
|
migrationsDir,
|
|
3756
3804
|
refsDir: spaceRefsDirectory(migrationsDir),
|
|
3757
3805
|
projectMigrationsDir,
|
|
3758
|
-
cwd
|
|
3806
|
+
cwd,
|
|
3807
|
+
...ifDefined("verifySnapshotContent", verifySnapshotContent)
|
|
3759
3808
|
});
|
|
3760
3809
|
}
|
|
3761
3810
|
return spaces;
|
|
@@ -3846,7 +3895,7 @@ async function runMigrationCheck(inputs) {
|
|
|
3846
3895
|
summary: `${failures.length} integrity failure(s)`
|
|
3847
3896
|
});
|
|
3848
3897
|
}
|
|
3849
|
-
async function loadAggregateIntegrityViolations(config, migrationsDir) {
|
|
3898
|
+
async function loadAggregateIntegrityViolations(config, migrationsDir, verifySnapshotContent) {
|
|
3850
3899
|
try {
|
|
3851
3900
|
const contractJsonContent = await readFile(resolveContractPath(config), "utf-8");
|
|
3852
3901
|
const familyInstance = config.family.create(createControlStack(config));
|
|
@@ -3855,7 +3904,8 @@ async function loadAggregateIntegrityViolations(config, migrationsDir) {
|
|
|
3855
3904
|
return (await loadContractSpaceAggregate({
|
|
3856
3905
|
migrationsDir,
|
|
3857
3906
|
deserializeContract: (json) => familyInstance.deserializeContract(json),
|
|
3858
|
-
appContract: familyInstance.deserializeContract(parsedAppContract)
|
|
3907
|
+
appContract: familyInstance.deserializeContract(parsedAppContract),
|
|
3908
|
+
...ifDefined("verifySnapshotContent", verifySnapshotContent)
|
|
3859
3909
|
})).checkIntegrity({
|
|
3860
3910
|
declaredExtensions,
|
|
3861
3911
|
checkContracts: true
|
|
@@ -4068,10 +4118,12 @@ async function executeMigrationNewCommand(options) {
|
|
|
4068
4118
|
why: `Contract at ${contractPathAbsolute} has no storageHash`,
|
|
4069
4119
|
fix: "Run `{bin} contract emit` to regenerate the contract"
|
|
4070
4120
|
}));
|
|
4121
|
+
const verifySnapshotContent = snapshotVerifierFor(config);
|
|
4071
4122
|
const aggregate = await loadContractSpaceAggregate({
|
|
4072
4123
|
migrationsDir,
|
|
4073
4124
|
deserializeContract: (json) => familyInstance.deserializeContract(json),
|
|
4074
|
-
appContract: toContract
|
|
4125
|
+
appContract: toContract,
|
|
4126
|
+
...ifDefined("verifySnapshotContent", verifySnapshotContent)
|
|
4075
4127
|
});
|
|
4076
4128
|
const packageCorruptionFailure = refusePackageCorruptionOnAggregate(aggregate, migrationsDir);
|
|
4077
4129
|
if (packageCorruptionFailure) return notOk(packageCorruptionFailure);
|
|
@@ -4569,12 +4621,14 @@ async function executeMigrationPlanCommandInner(options, startTime, callbacks) {
|
|
|
4569
4621
|
let fromContractInStore = false;
|
|
4570
4622
|
let isAutoBaseline = false;
|
|
4571
4623
|
let fromDefaulted = false;
|
|
4624
|
+
const verifySnapshotContent = snapshotVerifierFor(config);
|
|
4572
4625
|
const tolerantAggregateResult = await loadContractSpaceAggregateForCli({
|
|
4573
4626
|
targetId: config.target.targetId,
|
|
4574
4627
|
migrationsDir,
|
|
4575
4628
|
appContract: toContract,
|
|
4576
4629
|
extensions: config.extensions ?? [],
|
|
4577
|
-
deserializeContract: (json) => familyInstance.deserializeContract(json)
|
|
4630
|
+
deserializeContract: (json) => familyInstance.deserializeContract(json),
|
|
4631
|
+
...ifDefined("verifySnapshotContent", verifySnapshotContent)
|
|
4578
4632
|
});
|
|
4579
4633
|
if (!tolerantAggregateResult.ok) return notOk(tolerantAggregateResult.failure);
|
|
4580
4634
|
const resolutionSpace = tolerantAggregateResult.value.app;
|
|
@@ -4657,7 +4711,8 @@ async function executeMigrationPlanCommandInner(options, startTime, callbacks) {
|
|
|
4657
4711
|
migrationsDir,
|
|
4658
4712
|
appContract: toContract,
|
|
4659
4713
|
extensions: config.extensions ?? [],
|
|
4660
|
-
deserializeContract: (json) => familyInstance.deserializeContract(json)
|
|
4714
|
+
deserializeContract: (json) => familyInstance.deserializeContract(json),
|
|
4715
|
+
...ifDefined("verifySnapshotContent", verifySnapshotContent)
|
|
4661
4716
|
});
|
|
4662
4717
|
if (!aggregateResult.ok) return notOk(aggregateResult.failure);
|
|
4663
4718
|
const aggregate = aggregateResult.value;
|
|
@@ -4916,7 +4971,7 @@ async function executeRefSetCommand(name, contractInput, options) {
|
|
|
4916
4971
|
if (!bundles.find((bundle) => bundle.metadata.to === resolvedHash)) return notOk(errorRefSetBundleNotFound(resolvedHash));
|
|
4917
4972
|
const contractJsonPath = join(contractSnapshotDir(migrationsDir, resolvedHash), "contract.json");
|
|
4918
4973
|
try {
|
|
4919
|
-
await readContractSnapshotJson(migrationsDir, resolvedHash);
|
|
4974
|
+
await readContractSnapshotJson(migrationsDir, resolvedHash, snapshotVerifierFor(config));
|
|
4920
4975
|
} catch (readError) {
|
|
4921
4976
|
if (MigrationToolsError.is(readError) && readError.code === "MIGRATION.CONTRACT_SNAPSHOT_MISSING") return notOk(errorFileNotFound(contractJsonPath, {
|
|
4922
4977
|
why: `Migration bundle for hash ${resolvedHash} is missing its contract snapshot at ${contractJsonPath}`,
|
|
@@ -4966,6 +5021,6 @@ async function executeRefListCommand(options) {
|
|
|
4966
5021
|
}
|
|
4967
5022
|
}
|
|
4968
5023
|
//#endregion
|
|
4969
|
-
export { hasMigrationPath as $, errorLegendHumanOnly as A, runMigrationList as At, errorUnexpected as B, errorContractArgConflict as C, resolveContractRefToSnapshot as Ct, errorDriverRequired as D, runCommandAction as Dt, errorDestructiveChanges as E, resolveToForPlan as Et, errorPathUnreachable as F, executeMigrateShowPlan as G, executeDbInit as H, errorRunnerFailed as I, executeRefAdvancement as J, executeMigrationNewCommand as K, errorRuntime as L, errorMigrationPackageNotFound as M,
|
|
5024
|
+
export { hasMigrationPath as $, errorLegendHumanOnly as A, runMigrationList as At, errorUnexpected as B, errorContractArgConflict as C, resolveContractRefToSnapshot as Ct, errorDriverRequired as D, runCommandAction as Dt, errorDestructiveChanges as E, resolveToForPlan as Et, errorPathUnreachable as F, toDeclaredExtensionsFromRaw as Ft, executeMigrateShowPlan as G, executeDbInit as H, errorRunnerFailed as I, executeRefAdvancement as J, executeMigrationNewCommand as K, errorRuntime as L, errorMigrationPackageNotFound as M, snapshotVerifierFor as Mt, errorMigrationPlanningFailed as N, statusForMigrationHash as Nt, errorFileNotFound as O, runContractSpaceSeedPhase as Ot, errorNoMigrations as P, targetSupportsMigrations as Pt, findPackageByDirPath as Q, errorTargetMigrationNotSupported as R, errorConsentPlanMismatch as S, resolveContractRef$1 as St, errorDatabaseConnectionRequired as T, resolveMigrationRef as Tt, executeDbUpdate as U, executeContractEmit as V, executeDbVerify as W, executeRefListCommand as X, executeRefDeleteCommand as Y, executeRefSetCommand as Z, disposeEmitQueue as _, refuseMissingInvariantPath as _t, appContractStandInFromIdentity as a, mapCaughtMigrationError as at, errorAdvanceRefArgConflict as b, requireLiveDatabase as bt, buildMigrationSpaceGraphEntries as c, maskConnectionUrl as ct, checkSingleTarget as d, preflightRefAdvancement as dt, listRefsByContractHash as et, chooseAction as f, readContractEnvelope as ft, deriveStatusEdgeAnnotations as g, refuseMarkerOutsideGraph as gt, createControlClient as h, refuseDeclaredExtensionTargetMismatch as ht, advanceRefSafely as i, looksLikePath as it, errorMarkerMissing as j, sanitizeErrorMessage as jt, errorHashMismatch as k, runMigrationCheck as kt, buildReadAggregate as l, migrationSpaceListEntriesFromAggregate as lt, computeRefAdvancementName as m, refuseContractSpaceIntegrity as mt, ERROR_CODE_DESTRUCTIVE_CHANGES as n, loadContractRawSafely as nt, appliedHashesFromLedger as o, mapContractAtError as ot, closeQuietly as p, readMigrationRefs as pt, executeMigrationPlanCommand as q, NO_REF_ADVANCEMENT as r, loadContractSpaceAggregateForCli as rt, buildContractSpaceAggregate as s, mapIntegrityViolations as st, CliStructuredError$1 as t, loadAggregateIntegrityViolations as tt, buildRefAdvancementFields as u, originHashForStatus as ut, enrichContract as v, refusePackageCorruptionOnAggregate as vt, errorContractValidationFailed as w, resolveFromForPlan as wt, errorConfigValidation$1 as x, resolveAppTargetPath as xt, enumerateCheckSpaces as y, refuseUnknownInvariants as yt, errorTargetMismatch as z };
|
|
4970
5025
|
|
|
4971
|
-
//# sourceMappingURL=ref-
|
|
5026
|
+
//# sourceMappingURL=ref-D5u8Xxwc-BjjqYtnQ.mjs.map
|