@prisma/orm-toolchain 8.0.0-rc.24-dev.41 → 8.0.0-rc.24-dev.43
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-DgWdbWNs.d.mts → aggregate-BMh4SLep.d.mts} +3 -3
- package/dist/{aggregate-DgWdbWNs.d.mts.map → aggregate-BMh4SLep.d.mts.map} +1 -1
- package/dist/{aggregate-BAt9Aj73.mjs → aggregate-D7dLfF9a.mjs} +4 -4
- package/dist/{aggregate-BAt9Aj73.mjs.map → aggregate-D7dLfF9a.mjs.map} +1 -1
- package/dist/{caught-errors-D_pbHqmS-B-4jRN6g.mjs → caught-errors-D8Hn_D5h-C4BJDZ5y.mjs} +17 -4
- package/dist/caught-errors-D8Hn_D5h-C4BJDZ5y.mjs.map +1 -0
- package/dist/cli.d.mts +1 -1
- package/dist/cli.mjs +164 -47
- package/dist/cli.mjs.map +1 -1
- package/dist/cli__control-api.d.mts +5 -5
- package/dist/cli__control-api.mjs +2 -2
- package/dist/cli__control-api__testing.d.mts +1 -1
- package/dist/cli__migration-cli.mjs +1 -1
- package/dist/cli__migration-cli.mjs.map +1 -1
- package/dist/contract-snapshot-store-CtlOZtzJ.d.mts +2 -0
- package/dist/{contract-snapshot-store-xDOQSwJh-YNdzKU85.d.mts → contract-snapshot-store-DRAG5XXy-DOvf98Np.d.mts} +5 -3
- package/dist/contract-snapshot-store-DRAG5XXy-DOvf98Np.d.mts.map +1 -0
- package/dist/{contract-snapshot-store-B0fRbVHB-BN2g8BKh.mjs → contract-snapshot-store-Ds7lE7vL-Dn444yIq.mjs} +8 -4
- package/dist/contract-snapshot-store-Ds7lE7vL-Dn444yIq.mjs.map +1 -0
- package/dist/{db-sign-DLIR5swa-DQ0aN1nU.d.mts → db-sign-DLIR5swa-CMgFrBoH.d.mts} +3 -3
- package/dist/{db-sign-DLIR5swa-DQ0aN1nU.d.mts.map → db-sign-DLIR5swa-CMgFrBoH.d.mts.map} +1 -1
- package/dist/io-CpR7fgmB.d.mts +1 -0
- package/dist/{io-B39zsxMm-D5Wcf6cf.mjs → io-D51jgF31-RTnIqw4C.mjs} +3 -3
- package/dist/{io-B39zsxMm-D5Wcf6cf.mjs.map → io-D51jgF31-RTnIqw4C.mjs.map} +1 -1
- package/dist/{io-BzVNzfsY-DE_ev9K6.d.mts → io-DpAplMzQ-oLyfXvz-.d.mts} +3 -3
- package/dist/{io-BzVNzfsY-DE_ev9K6.d.mts.map → io-DpAplMzQ-oLyfXvz-.d.mts.map} +1 -1
- package/dist/migration-tools.d.mts +6 -6
- package/dist/migration-tools.mjs +6 -6
- 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 +3 -3
- package/dist/migration-tools__contract-snapshot-store.mjs +2 -2
- package/dist/migration-tools__io.d.mts +2 -2
- package/dist/migration-tools__io.mjs +1 -1
- package/dist/migration-tools__spaces.mjs +2 -2
- package/dist/{ref-Ba6Mk6Rg-DKaPWk2l.mjs → ref-BrtKINun-CRtoeAmD.mjs} +45 -11
- package/dist/ref-BrtKINun-CRtoeAmD.mjs.map +1 -0
- package/dist/{spaces-OVZ0QzWJ.mjs → spaces-qTjiPqw0.mjs} +4 -4
- package/dist/{spaces-OVZ0QzWJ.mjs.map → spaces-qTjiPqw0.mjs.map} +1 -1
- package/dist/{verify-contract-spaces-BOnqhfQs-BBq5YOKo.mjs → verify-contract-spaces-BZV67Pqk-DhswS52A.mjs} +3 -3
- package/dist/{verify-contract-spaces-BOnqhfQs-BBq5YOKo.mjs.map → verify-contract-spaces-BZV67Pqk-DhswS52A.mjs.map} +1 -1
- package/dist/vite-plugin-contract-emit.mjs +1 -1
- package/package.json +12 -12
- package/dist/caught-errors-D_pbHqmS-B-4jRN6g.mjs.map +0 -1
- package/dist/contract-snapshot-store-B0fRbVHB-BN2g8BKh.mjs.map +0 -1
- package/dist/contract-snapshot-store-DXFizCe8.d.mts +0 -2
- package/dist/contract-snapshot-store-xDOQSwJh-YNdzKU85.d.mts.map +0 -1
- package/dist/io--BGERFnD.d.mts +0 -1
- package/dist/ref-Ba6Mk6Rg-DKaPWk2l.mjs.map +0 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { A as allStorageElementsExternal, B as requireHeadRef, C as ResolveRecordedPathInputs, D as VerifierInput, E as VerifierError, F as createAggregateContractSpace, H as spacesInApplyOrder, I as createContractSpaceAggregate, L as loadContractSpaceAggregate, M as collectAggregateNamespaces, N as computeIntegrityViolations, O as VerifierOutput, P as contractHashAtMarker, R as loadProblemToViolation, S as PlannerSuccess, T as SchemaCheckSection, U as verifyMigration, V as resolveRecordedPath, _ as MarkerCheckSection, a as CallerPolicy, b as PlannerInput, c as ContractMarkerRecordLike, d as IntegrityComputationInput, f as IntegrityQueryOptions, g as MarkerCheckResult, h as LoadAggregateInput, i as AppSpacePlanningInputs, j as buildFabricatedMigrationEdge, k as VerifierSuccess, l as ContractSpaceAggregate, m as IntegrityViolation, n as AggregateCurrentDBState, o as ContractAtOptions, p as IntegritySpaceState, r as AggregateMigrationEdgeRef, s as ContractAtResult, t as AggregateContractSpace, u as DeclaredExtensionEntry, v as PerSpacePlan, w as ResolveRecordedPathOutcome, x as PlannerOutput, y as PlannerError, z as planMigration } from "./aggregate-
|
|
1
|
+
import { A as allStorageElementsExternal, B as requireHeadRef, C as ResolveRecordedPathInputs, D as VerifierInput, E as VerifierError, F as createAggregateContractSpace, H as spacesInApplyOrder, I as createContractSpaceAggregate, L as loadContractSpaceAggregate, M as collectAggregateNamespaces, N as computeIntegrityViolations, O as VerifierOutput, P as contractHashAtMarker, R as loadProblemToViolation, S as PlannerSuccess, T as SchemaCheckSection, U as verifyMigration, V as resolveRecordedPath, _ as MarkerCheckSection, a as CallerPolicy, b as PlannerInput, c as ContractMarkerRecordLike, d as IntegrityComputationInput, f as IntegrityQueryOptions, g as MarkerCheckResult, h as LoadAggregateInput, i as AppSpacePlanningInputs, j as buildFabricatedMigrationEdge, k as VerifierSuccess, l as ContractSpaceAggregate, m as IntegrityViolation, n as AggregateCurrentDBState, o as ContractAtOptions, p as IntegritySpaceState, r as AggregateMigrationEdgeRef, s as ContractAtResult, t as AggregateContractSpace, u as DeclaredExtensionEntry, v as PerSpacePlan, w as ResolveRecordedPathOutcome, x as PlannerOutput, y as PlannerError, z as planMigration } from "./aggregate-BMh4SLep.mjs";
|
|
2
2
|
export { type AggregateContractSpace, type AggregateCurrentDBState, type AggregateMigrationEdgeRef, type AppSpacePlanningInputs, 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, contractHashAtMarker, createAggregateContractSpace, createContractSpaceAggregate, loadContractSpaceAggregate, loadProblemToViolation, planMigration, requireHeadRef, resolveRecordedPath, spacesInApplyOrder, verifyMigration };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as contractHashAtMarker, c as loadContractSpaceAggregate, d as requireHeadRef, f as resolveRecordedPath, i as computeIntegrityViolations, l as loadProblemToViolation, m as verifyMigration, n as buildFabricatedMigrationEdge, o as createAggregateContractSpace, p as spacesInApplyOrder, r as collectAggregateNamespaces, s as createContractSpaceAggregate, t as allStorageElementsExternal, u as planMigration } from "./aggregate-
|
|
1
|
+
import { a as contractHashAtMarker, c as loadContractSpaceAggregate, d as requireHeadRef, f as resolveRecordedPath, i as computeIntegrityViolations, l as loadProblemToViolation, m as verifyMigration, n as buildFabricatedMigrationEdge, o as createAggregateContractSpace, p as spacesInApplyOrder, r as collectAggregateNamespaces, s as createContractSpaceAggregate, t as allStorageElementsExternal, u as planMigration } from "./aggregate-D7dLfF9a.mjs";
|
|
2
2
|
export { allStorageElementsExternal, buildFabricatedMigrationEdge, collectAggregateNamespaces, computeIntegrityViolations, contractHashAtMarker, createAggregateContractSpace, createContractSpaceAggregate, loadContractSpaceAggregate, loadProblemToViolation, planMigration, requireHeadRef, resolveRecordedPath, spacesInApplyOrder, verifyMigration };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { t as SnapshotCanonicalizationHooks } from "./hash-DclMqd7S-WBvXJ_4C.mjs";
|
|
2
|
-
import { a as createSnapshotContentVerifier, c as
|
|
3
|
-
import "./contract-snapshot-store-
|
|
4
|
-
export { type ContractSnapshotInput, type SnapshotCanonicalizationHooks, type SnapshotContentVerifier, contractSnapshotDir, contractSnapshotFiles, createSnapshotContentVerifier, readContractSnapshotJson, readContractSnapshotJsonTolerant, singleLineDeclarations, snapshotsImportPathFrom, writeContractSnapshot };
|
|
2
|
+
import { a as createSnapshotContentVerifier, c as readContractSnapshotJsonTolerant, d as writeContractSnapshot, i as contractSnapshotFiles, l as singleLineDeclarations, n as SnapshotContentVerifier, o as hasContractSnapshot, r as contractSnapshotDir, s as readContractSnapshotJson, t as ContractSnapshotInput, u as snapshotsImportPathFrom } from "./contract-snapshot-store-DRAG5XXy-DOvf98Np.mjs";
|
|
3
|
+
import "./contract-snapshot-store-CtlOZtzJ.mjs";
|
|
4
|
+
export { type ContractSnapshotInput, type SnapshotCanonicalizationHooks, type SnapshotContentVerifier, contractSnapshotDir, contractSnapshotFiles, createSnapshotContentVerifier, hasContractSnapshot, readContractSnapshotJson, readContractSnapshotJsonTolerant, singleLineDeclarations, snapshotsImportPathFrom, writeContractSnapshot };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as
|
|
2
|
-
export { contractSnapshotDir, contractSnapshotFiles, createSnapshotContentVerifier, readContractSnapshotJson, readContractSnapshotJsonTolerant, singleLineDeclarations, snapshotsImportPathFrom, writeContractSnapshot };
|
|
1
|
+
import { a as readContractSnapshotJson, c as snapshotsImportPathFrom, i as hasContractSnapshot, l as writeContractSnapshot, n as contractSnapshotFiles, o as readContractSnapshotJsonTolerant, r as createSnapshotContentVerifier, s as singleLineDeclarations, t as contractSnapshotDir } from "./contract-snapshot-store-Ds7lE7vL-Dn444yIq.mjs";
|
|
2
|
+
export { contractSnapshotDir, contractSnapshotFiles, createSnapshotContentVerifier, hasContractSnapshot, readContractSnapshotJson, readContractSnapshotJsonTolerant, singleLineDeclarations, snapshotsImportPathFrom, writeContractSnapshot };
|
|
@@ -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-DpAplMzQ-oLyfXvz-.mjs";
|
|
2
|
+
import "./io-CpR7fgmB.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-D51jgF31-RTnIqw4C.mjs";
|
|
2
2
|
export { copyFilesWithRename, formatMigrationDirName, materialiseExtensionMigrationPackageIfMissing, materialiseMigrationPackage, readMigrationPackage, readMigrationsDir, writeMigrationMetadata, writeMigrationOps, writeMigrationPackage };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { c as readContractSpaceHeadRef, d as verifyContractSpaces, i as assertValidSpaceId, l as spaceMigrationDirectory, n as RESERVED_SPACE_SUBDIR_NAMES, o as isValidSpaceId, r as SPACE_REFS_DIRNAME, s as listContractSpaceDirectories, t as APP_SPACE_ID, u as spaceRefsDirectory } 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 { c as readContractSpaceHeadRef, d as verifyContractSpaces, i as assertValidSpaceId, l as spaceMigrationDirectory, n as RESERVED_SPACE_SUBDIR_NAMES, o as isValidSpaceId, r as SPACE_REFS_DIRNAME, s as listContractSpaceDirectories, t as APP_SPACE_ID, u as spaceRefsDirectory } from "./verify-contract-spaces-BZV67Pqk-DhswS52A.mjs";
|
|
2
|
+
import { a as gatherDiskContractSpaceState, i as emitContractSpaceArtifacts, n as computeExtensionSpaceApplyPath, o as planAllSpaces, r as contractSpaceFromJson, t as assertDescriptorSelfConsistency } from "./spaces-qTjiPqw0.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 };
|
|
@@ -2,24 +2,24 @@ import { a as expandContractInputs } from "./exports-CZ6dPu-O.mjs";
|
|
|
2
2
|
import { t as EMPTY_CONTRACT_HASH } from "./constants-CM-w38DQ-Cz_EXbOc.mjs";
|
|
3
3
|
import { D as errorNoInvariantPath, M as errorUnknownInvariant, b as errorInvalidRefName, r as errorContractDeserializationFailed, t as MigrationToolsError, y as errorInvalidRefFile } from "./errors-BMq40nYH-Cg8PBect.mjs";
|
|
4
4
|
import { r as verifyMigrationHash, t as computeMigrationHash } from "./hash-BAZVWU4a-BQovI7hF.mjs";
|
|
5
|
-
import { c as
|
|
5
|
+
import { a as readContractSnapshotJson, c as snapshotsImportPathFrom, i as hasContractSnapshot, l as writeContractSnapshot, r as createSnapshotContentVerifier, t as contractSnapshotDir } from "./contract-snapshot-store-Ds7lE7vL-Dn444yIq.mjs";
|
|
6
6
|
import { t as deriveProvidedInvariants } from "./invariants-DxCj82g2-DhGkStla.mjs";
|
|
7
|
-
import { i as materialiseExtensionMigrationPackageIfMissing, r as formatMigrationDirName, u as writeMigrationPackage } from "./io-
|
|
7
|
+
import { i as materialiseExtensionMigrationPackageIfMissing, r as formatMigrationDirName, u as writeMigrationPackage } from "./io-D51jgF31-RTnIqw4C.mjs";
|
|
8
8
|
import { i as findPathWithDecision, r as findPath } from "./migration-graph-BoiiZAaU-DLht12k7.mjs";
|
|
9
|
-
import { c as readContractSpaceHeadRef, l as spaceMigrationDirectory, o as isValidSpaceId, s as listContractSpaceDirectories, t as APP_SPACE_ID$1, u as spaceRefsDirectory } from "./verify-contract-spaces-
|
|
10
|
-
import { i as emitContractSpaceArtifacts, o as planAllSpaces } from "./spaces-
|
|
11
|
-
import { $ as
|
|
9
|
+
import { c as readContractSpaceHeadRef, l as spaceMigrationDirectory, o as isValidSpaceId, s as listContractSpaceDirectories, t as APP_SPACE_ID$1, u as spaceRefsDirectory } from "./verify-contract-spaces-BZV67Pqk-DhswS52A.mjs";
|
|
10
|
+
import { i as emitContractSpaceArtifacts, o as planAllSpaces } from "./spaces-qTjiPqw0.mjs";
|
|
11
|
+
import { $ as errorStatementDidNotResolveLoss, A as errorFileNotFound, B as errorPathUnreachable, Ct as shellQuoted, Dt as writtenMigrationRunCommand, E as errorContractValidationFailed, Et as toStructuralEdge, G as errorRefSetEmptySentinel, H as errorPlanOriginUnknown, I as errorMigrationHasUnfilledPlaceholders, J as errorRuntime, K as errorRefSetHashNotInGraph, N as errorInvalidSpaceId, Q as errorStatementAnswersNoQuestion, R as errorMigrationPlanningFailed, S as errorConsentUnused, St as selfEmitCommand, T as errorContractTypesModuleMissing, U as errorPlanProducedNoOperations, V as errorPlanForgotTheFlag, W as errorRefSetBundleNotFound, X as errorSnapshotMissing, Z as errorSpaceNotFound, _t as requireLiveDatabase, b as errorAmbiguousMigrationRef, bt as resolveMigrationPaths, c as cliCommand, ct as mapRefResolutionError, d as closeQuietly, dt as migrationsDirFor, et as errorStatementInvalid, f as collectDeclaredInvariants, ft as planThenApply, g as dbUpdateRerun, h as dbMigrateRerun, ht as readContractEnvelope, it as errorTargetMigrationNotSupported, j as errorFromCaught, l as cliErrorFromStructured, m as contractTypesModuleOf, mt as printedPlanCommand, n as CliStructuredError$1, nt as errorStatementOriginUnknown, ot as errorUnexpected, pt as printedPath, r as STORE_ORIGIN_SNAPSHOT_STEPS, rt as errorStatementUnresolved, s as chooseAction, st as getTargetMigrations, t as ActionableCliError, tt as errorStatementNeedsMigrationFile, ut as migrationModuleOf, v as editFileAction, w as errorContractConfigMissing, wt as statementFlag, x as errorConfigValidation$1, xt as runCommandAction, yt as resolveContractPath } from "./caught-errors-D8Hn_D5h-C4BJDZ5y.mjs";
|
|
12
12
|
import { r as getEmittedArtifactPaths, t as emit } from "./exports-CCuYD8dO-yw1GizAT.mjs";
|
|
13
13
|
import { n as isGraphNode, t as assertHashIsGraphNode } from "./graph-membership-D7m41lWA-B68g1CRS.mjs";
|
|
14
14
|
import { a as readRefs, d as validateRefValue, n as advanceRef, r as deleteRef, s as refsByContractHash, t as HEAD_REF_NAME, u as validateRefName } from "./refs-t_JbIjGo-BVCqKpXd.mjs";
|
|
15
|
-
import { a as contractHashAtMarker, c as loadContractSpaceAggregate, d as requireHeadRef, f as resolveRecordedPath, m as verifyMigration, n as buildFabricatedMigrationEdge, p as spacesInApplyOrder, r as collectAggregateNamespaces, t as allStorageElementsExternal, u as planMigration } from "./aggregate-
|
|
15
|
+
import { a as contractHashAtMarker, c as loadContractSpaceAggregate, d as requireHeadRef, f as resolveRecordedPath, m as verifyMigration, n as buildFabricatedMigrationEdge, p as spacesInApplyOrder, r as collectAggregateNamespaces, t as allStorageElementsExternal, u as planMigration } from "./aggregate-D7dLfF9a.mjs";
|
|
16
16
|
import { a as writeMigrationTs, n as formatMigrationTs } from "./migration-ts-DDgjsR1O.mjs";
|
|
17
17
|
import { c as parseContractRef, l as parseMigrationRef, o as isLiveMarkerRef, r as RESERVED_CONTRACT_REFS, s as isReservedContractRef, t as EMPTY_CONTRACT_REF } from "./ref-resolution-C0xsiRig.mjs";
|
|
18
18
|
import { createRequire } from "node:module";
|
|
19
19
|
import { ifDefined } from "@prisma/orm-framework/utils/defined";
|
|
20
20
|
import { CliStructuredError } from "@prisma/orm-framework/errors/control";
|
|
21
21
|
import { APP_SPACE_ID, CONTRACT_SNAPSHOTS_DIRNAME, DATA_PROTECTION_KEYS, createControlStack, databasePoliciesOf, databasePolicyDifferences, databasePolicyValueText, describeMigrationStatement, enumValueCoordinateFromJson, enumValueStatementText, fieldStatementText, hasMigrations, hasOperationPreview, hasPslContractInfer, hasSchemaSubjectClassifier, hasSchemaView, isStorageHashHex, migrationStatementJson, migrationSubjectJson, migrationSubjectKey, modelDisplayName, modelStatementText, movedDatabasePoliciesWhy, planOriginOf, valueObjectFieldStatementText, withDeclaredDatabasePolicies } from "@prisma/orm-framework/components/control";
|
|
22
|
-
import { InternalError } from "@prisma/orm-framework/utils/internal-error";
|
|
22
|
+
import { InternalError, isInternalError } from "@prisma/orm-framework/utils/internal-error";
|
|
23
23
|
import { notOk, ok } from "@prisma/orm-framework/utils/result";
|
|
24
24
|
import { docsUrlFor, isStructuredError, isStructuredErrorCode, structuredError } from "@prisma/orm-framework/utils/structured-error";
|
|
25
25
|
import { basename, dirname, isAbsolute, join, relative, resolve } from "pathe";
|
|
@@ -35,7 +35,7 @@ import { mergeCapabilityMatrices } from "@prisma/orm-framework/components/compon
|
|
|
35
35
|
import { isDeepStrictEqual } from "node:util";
|
|
36
36
|
import { canonicalStringify } from "@prisma/orm-framework/utils/canonical-stringify";
|
|
37
37
|
import { abortable } from "@prisma/orm-framework/utils/abortable";
|
|
38
|
-
//#region ../../../1-framework/3-tooling/cli/dist/ref-
|
|
38
|
+
//#region ../../../1-framework/3-tooling/cli/dist/ref-BrtKINun.mjs
|
|
39
39
|
/**
|
|
40
40
|
* The meta of a contract that failed to load because the family refused it, such as the columns whose defaults it refused, for the command to report: the refusal's own meta, or the `refusedDefaults` a migration-tools error kept from it.
|
|
41
41
|
*/
|
|
@@ -6897,7 +6897,7 @@ async function buildRefAdvancementFields(options) {
|
|
|
6897
6897
|
});
|
|
6898
6898
|
}
|
|
6899
6899
|
/**
|
|
6900
|
-
* The
|
|
6900
|
+
* The ref-advancement tail of db sign: executeRefAdvancement with
|
|
6901
6901
|
* MigrationToolsError failures passed through as notOk, others rethrown.
|
|
6902
6902
|
*/
|
|
6903
6903
|
async function advanceRefSafely(args) {
|
|
@@ -6908,6 +6908,40 @@ async function advanceRefSafely(args) {
|
|
|
6908
6908
|
throw error;
|
|
6909
6909
|
}
|
|
6910
6910
|
}
|
|
6911
|
+
function refWriteFailure(error, failedAt) {
|
|
6912
|
+
const code = Reflect.get(Object(error), "code");
|
|
6913
|
+
return {
|
|
6914
|
+
reason: error instanceof Error ? error.message : String(error),
|
|
6915
|
+
causeCode: typeof code === "string" ? code : void 0,
|
|
6916
|
+
failedAt
|
|
6917
|
+
};
|
|
6918
|
+
}
|
|
6919
|
+
/**
|
|
6920
|
+
* Writes a ref after `db migrate` applied its migrations: the snapshot first, when this run
|
|
6921
|
+
* rendered it, then the pointer. Every failure is returned, not thrown: the database has already
|
|
6922
|
+
* moved, so a ref that cannot be written must not fail the run. An internal error is a bug and
|
|
6923
|
+
* goes to the outermost boundary.
|
|
6924
|
+
*/
|
|
6925
|
+
async function writeAdvancedRef(args, writePointer) {
|
|
6926
|
+
let stage = args.snapshot.kind === "render" ? "snapshot" : "store-check";
|
|
6927
|
+
try {
|
|
6928
|
+
if (args.snapshot.kind === "render") await writeContractSnapshot(args.migrationsDir, args.hash, {
|
|
6929
|
+
contractJson: args.snapshot.contractIR.contract,
|
|
6930
|
+
contractDts: args.snapshot.contractIR.contractDts
|
|
6931
|
+
});
|
|
6932
|
+
else if (!await hasContractSnapshot(args.migrationsDir, args.hash)) return notOk({
|
|
6933
|
+
reason: `the snapshot store holds no contract for ${args.hash}`,
|
|
6934
|
+
causeCode: void 0,
|
|
6935
|
+
failedAt: "snapshot"
|
|
6936
|
+
});
|
|
6937
|
+
stage = "pointer";
|
|
6938
|
+
await writePointer(args.refsDir, args.name, args.hash);
|
|
6939
|
+
return ok(void 0);
|
|
6940
|
+
} catch (error) {
|
|
6941
|
+
if (isInternalError(error)) throw error;
|
|
6942
|
+
return notOk(refWriteFailure(error, stage));
|
|
6943
|
+
}
|
|
6944
|
+
}
|
|
6911
6945
|
const RECORDED_FORMS = [
|
|
6912
6946
|
"hash",
|
|
6913
6947
|
"prefix",
|
|
@@ -8979,6 +9013,6 @@ async function executeRefListCommand(options) {
|
|
|
8979
9013
|
}
|
|
8980
9014
|
}
|
|
8981
9015
|
//#endregion
|
|
8982
|
-
export { planEverySpace as $, executeMigrationNewCommand as A, labelsText as B, errorPermitPolicyChangeNeedsRef as C, statusForMigrationHash as Ct, executeDbUpdate as D, executeDbSign as E, withWarningFindings as Et, executeRefSetCommand as F, loadContractSource as G, liveMarkerUse as H, findPackageByDirPath as I, looksLikePath as J, loadContractSourceWithStack as K, formatSourceDiagnostic as L, executeRefAdvancement as M, executeRefDeleteCommand as N, executeDbVerify as O, executeRefListCommand as P, migrationSpaceListEntriesFromAggregate as Q, hasMigrationPath as R, enumerateCheckSpaces as S, sourceWarningDiagnostic as St, executeDbInit as T, validateLoadedContract as Tt, loadAggregateIntegrityViolations as U, listRefsByContractHash as V, loadContractRawSafely as W, mapIntegrityViolations as X, mapContractAtError as Y, matchConsents as Z, databasePoliciesInForce as _, runContractSpaceSeedPhase as _t, advanceRefSafely as a, refusePackageCorruptionOnAggregate as at, disposeEmitQueue as b, skippedOperationsText as bt, buildContractSpaceAggregate as c, requireDatabaseForLiveMarkerUse as ct, buildRefAdvancementFields as d, resolveContractRefToSnapshot as dt, preflightRefAdvancement as et, checkSingleTarget as f, resolveFromForPlan as ft, createControlClient as g, retryCommandFor as gt, convertAndDelete as h, resolveToForPlan as ht, RECORDED_OR_EMPTY_CONTRACT_REF_FORMS as i, refuseMissingInvariantPath as it, executeMigrationPlanCommand as j, executeMigrateShowPlan as k, buildMigrationSpaceGraphEntries as l, resolveAppTargetPath as lt, contractValidationMeta as m, resolveStatements as mt, NO_REF_ADVANCEMENT as n, refuseContractSpaceIntegrity as nt, appContractStandInFromIdentity as o, refuseUnknownInvariants as ot, computeRefAdvancementName as p, resolveMigrationRef as pt, loadContractSpaceAggregateForCli as q, RECORDED_CONTRACT_REF_FORMS as r, refuseDeclaredExtensionTargetMismatch as rt, appliedHashesFromLedger as s, renamedAndDeleted as st, ALL_CONTRACT_REF_FORMS as t, readMigrationRefs as tt, buildReadAggregate as u, resolveContractRef$1 as ut, declaredSettingsText as v, runMigrationCheck as vt, executeContractEmit as w, toDeclaredExtensionsFromRaw as wt, enrichContract as x, snapshotVerifierFor as xt, deriveStatusEdgeAnnotations as y, runMigrationList as yt, isStatementVerb as z };
|
|
9016
|
+
export { planEverySpace as $, executeMigrationNewCommand as A, labelsText as B, errorPermitPolicyChangeNeedsRef as C, statusForMigrationHash as Ct, executeDbUpdate as D, writeAdvancedRef as Dt, executeDbSign as E, withWarningFindings as Et, executeRefSetCommand as F, loadContractSource as G, liveMarkerUse as H, findPackageByDirPath as I, looksLikePath as J, loadContractSourceWithStack as K, formatSourceDiagnostic as L, executeRefAdvancement as M, executeRefDeleteCommand as N, executeDbVerify as O, executeRefListCommand as P, migrationSpaceListEntriesFromAggregate as Q, hasMigrationPath as R, enumerateCheckSpaces as S, sourceWarningDiagnostic as St, executeDbInit as T, validateLoadedContract as Tt, loadAggregateIntegrityViolations as U, listRefsByContractHash as V, loadContractRawSafely as W, mapIntegrityViolations as X, mapContractAtError as Y, matchConsents as Z, databasePoliciesInForce as _, runContractSpaceSeedPhase as _t, advanceRefSafely as a, refusePackageCorruptionOnAggregate as at, disposeEmitQueue as b, skippedOperationsText as bt, buildContractSpaceAggregate as c, requireDatabaseForLiveMarkerUse as ct, buildRefAdvancementFields as d, resolveContractRefToSnapshot as dt, preflightRefAdvancement as et, checkSingleTarget as f, resolveFromForPlan as ft, createControlClient as g, retryCommandFor as gt, convertAndDelete as h, resolveToForPlan as ht, RECORDED_OR_EMPTY_CONTRACT_REF_FORMS as i, refuseMissingInvariantPath as it, executeMigrationPlanCommand as j, executeMigrateShowPlan as k, buildMigrationSpaceGraphEntries as l, resolveAppTargetPath as lt, contractValidationMeta as m, resolveStatements as mt, NO_REF_ADVANCEMENT as n, refuseContractSpaceIntegrity as nt, appContractStandInFromIdentity as o, refuseUnknownInvariants as ot, computeRefAdvancementName as p, resolveMigrationRef as pt, loadContractSpaceAggregateForCli as q, RECORDED_CONTRACT_REF_FORMS as r, refuseDeclaredExtensionTargetMismatch as rt, appliedHashesFromLedger as s, renamedAndDeleted as st, ALL_CONTRACT_REF_FORMS as t, readMigrationRefs as tt, buildReadAggregate as u, resolveContractRef$1 as ut, declaredSettingsText as v, runMigrationCheck as vt, executeContractEmit as w, toDeclaredExtensionsFromRaw as wt, enrichContract as x, snapshotVerifierFor as xt, deriveStatusEdgeAnnotations as y, runMigrationList as yt, isStatementVerb as z };
|
|
8983
9017
|
|
|
8984
|
-
//# sourceMappingURL=ref-
|
|
9018
|
+
//# sourceMappingURL=ref-BrtKINun-CRtoeAmD.mjs.map
|