@prisma/orm-toolchain 8.0.0-rc.7-dev.3 → 8.0.0-rc.7-dev.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.mjs +3 -3
- package/dist/cli.mjs.map +1 -1
- package/dist/cli__control-api.d.mts +2 -2
- package/dist/cli__control-api.mjs +1 -1
- package/dist/cli__control-api__testing.d.mts +1 -1
- package/dist/{db-verify-BRDzImLV-3eI346zy.d.mts → db-verify-BRDzImLV-e7n1L4Vk.d.mts} +2 -2
- package/dist/{db-verify-BRDzImLV-3eI346zy.d.mts.map → db-verify-BRDzImLV-e7n1L4Vk.d.mts.map} +1 -1
- package/dist/migration-tools.d.mts +1 -1
- package/dist/migration-tools.mjs +1 -1
- package/dist/migration-tools__ref-resolution.d.mts +1 -1
- package/dist/migration-tools__ref-resolution.mjs +1 -1
- package/dist/{ref-XdaDN3GF-Io-mSVS6.mjs → ref-knkpu_zy-B5bc9JJw.mjs} +50 -8
- package/dist/ref-knkpu_zy-B5bc9JJw.mjs.map +1 -0
- package/dist/{ref-resolution-D77jPigU.mjs → ref-resolution-BWpwb8_b.mjs} +8 -1
- package/dist/ref-resolution-BWpwb8_b.mjs.map +1 -0
- package/dist/{ref-resolution-COGOSL57.d.mts → ref-resolution-CaHQJXE0.d.mts} +11 -1
- package/dist/ref-resolution-CaHQJXE0.d.mts.map +1 -0
- package/dist/vite-plugin-contract-emit.mjs +1 -1
- package/package.json +12 -12
- package/dist/ref-XdaDN3GF-Io-mSVS6.mjs.map +0 -1
- package/dist/ref-resolution-COGOSL57.d.mts.map +0 -1
- package/dist/ref-resolution-D77jPigU.mjs.map +0 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { i as Refs, n as RefEntry } from "./refs-BNCUu58Y-BIso5Jfg.mjs";
|
|
2
2
|
import { n as MigrationGraph } from "./graph-bDjJ4GL9-BhFevsJS.mjs";
|
|
3
|
-
import { r as MigrationRef, t as ContractRef } from "./ref-resolution-
|
|
4
|
-
import { A as SchemaVerifyOptions, C as EmitResult, D as IntrospectOptions, E as ExecuteDbVerifyResult, M as VerifyOptions, N as executeDbVerify, S as EmitOptions, T as ExecuteDbVerifyOptions, _ as DbUpdateResult, a as ControlClient, b as EmitFailure, c as CreateControlClient, d as DbInitOptions, f as DbInitResult, g as DbUpdateOptions, h as DbUpdateFailureCode, i as ControlActionName, j as SignOptions, k as OnControlProgress, l as DbInitFailure, m as DbUpdateFailure, n as ContractEmitOptions, o as ControlClientOptions, p as DbInitSuccess, r as ContractEmitResult, s as ControlProgressEvent, t as CliStructuredError$2, u as DbInitFailureCode, v as DbUpdateSuccess, w as EmitSuccess, x as EmitFailureCode, y as EmitContractConfig } from "./db-verify-BRDzImLV-
|
|
3
|
+
import { r as MigrationRef, t as ContractRef } from "./ref-resolution-CaHQJXE0.mjs";
|
|
4
|
+
import { A as SchemaVerifyOptions, C as EmitResult, D as IntrospectOptions, E as ExecuteDbVerifyResult, M as VerifyOptions, N as executeDbVerify, S as EmitOptions, T as ExecuteDbVerifyOptions, _ as DbUpdateResult, a as ControlClient, b as EmitFailure, c as CreateControlClient, d as DbInitOptions, f as DbInitResult, g as DbUpdateOptions, h as DbUpdateFailureCode, i as ControlActionName, j as SignOptions, k as OnControlProgress, l as DbInitFailure, m as DbUpdateFailure, n as ContractEmitOptions, o as ControlClientOptions, p as DbInitSuccess, r as ContractEmitResult, s as ControlProgressEvent, t as CliStructuredError$2, u as DbInitFailureCode, v as DbUpdateSuccess, w as EmitSuccess, x as EmitFailureCode, y as EmitContractConfig } from "./db-verify-BRDzImLV-e7n1L4Vk.mjs";
|
|
5
5
|
import { a as emit } from "./index-Dgwl8Tzs.mjs";
|
|
6
6
|
import { n as OnDiskMigrationPackage, t as MigrationOps } from "./package-CfWiDNrr-ZR4HM_Iz.mjs";
|
|
7
7
|
import { c as ContractSpaceAggregate, d as IntegrityQueryOptions, p as IntegrityViolation, t as AggregateContractSpace } from "./aggregate-DLUJLq5Y.mjs";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { $ as loadContractRawSafely, At as statusForMigrationHash, B as executeDbUpdate, Ct as resolveRefAdvancementFields, Dt as runMigrationCheck, Et as runContractSpaceSeedPhase, G as executeRefAdvancement, H as executeMigrateShowPlan, J as executeRefSetCommand, K as executeRefDeleteCommand, Ot as runMigrationList, Q as loadAggregateIntegrityViolations, R as executeContractEmit, St as resolveMigrationRef, U as executeMigrationNewCommand, V as executeDbVerify, W as executeMigrationPlanCommand, X as hasMigrationPath, Z as listRefsByContractHash, _ as enumerateCheckSpaces, a as buildContractSpaceAggregate, bt as resolveContractRefToSnapshot, c as buildRefAdvancementFields, dt as refuseContractSpaceIntegrity, et as loadContractSpaceAggregateForCli, f as computeRefAdvancementName, ft as refuseDeclaredExtensionTargetMismatch, g as enrichContract, gt as refuseUnknownInvariants, h as disposeEmitQueue, ht as refusePackageCorruptionOnAggregate, i as appliedHashesFromLedger, it as mapIntegrityViolations, l as checkSingleTarget, lt as readContractIR, m as deriveStatusEdgeAnnotations, mt as refuseMissingInvariantPath, n as advanceRefSafely, nt as mapCaughtMigrationError, o as buildMigrationSpaceGraphEntries, ot as migrationSpaceListEntriesFromAggregate, p as createControlClient, pt as refuseMarkerOutsideGraph, q as executeRefListCommand, r as appContractStandInFromIdentity, rt as mapContractAtError, s as buildReadAggregate, st as originHashForStatus, ut as readMigrationRefs, wt as resolveToForPlan, xt as resolveFromForPlan, yt as resolveContractRef$1, z as executeDbInit } from "./ref-
|
|
1
|
+
import { $ as loadContractRawSafely, At as statusForMigrationHash, B as executeDbUpdate, Ct as resolveRefAdvancementFields, Dt as runMigrationCheck, Et as runContractSpaceSeedPhase, G as executeRefAdvancement, H as executeMigrateShowPlan, J as executeRefSetCommand, K as executeRefDeleteCommand, Ot as runMigrationList, Q as loadAggregateIntegrityViolations, R as executeContractEmit, St as resolveMigrationRef, U as executeMigrationNewCommand, V as executeDbVerify, W as executeMigrationPlanCommand, X as hasMigrationPath, Z as listRefsByContractHash, _ as enumerateCheckSpaces, a as buildContractSpaceAggregate, bt as resolveContractRefToSnapshot, c as buildRefAdvancementFields, dt as refuseContractSpaceIntegrity, et as loadContractSpaceAggregateForCli, f as computeRefAdvancementName, ft as refuseDeclaredExtensionTargetMismatch, g as enrichContract, gt as refuseUnknownInvariants, h as disposeEmitQueue, ht as refusePackageCorruptionOnAggregate, i as appliedHashesFromLedger, it as mapIntegrityViolations, l as checkSingleTarget, lt as readContractIR, m as deriveStatusEdgeAnnotations, mt as refuseMissingInvariantPath, n as advanceRefSafely, nt as mapCaughtMigrationError, o as buildMigrationSpaceGraphEntries, ot as migrationSpaceListEntriesFromAggregate, p as createControlClient, pt as refuseMarkerOutsideGraph, q as executeRefListCommand, r as appContractStandInFromIdentity, rt as mapContractAtError, s as buildReadAggregate, st as originHashForStatus, ut as readMigrationRefs, wt as resolveToForPlan, xt as resolveFromForPlan, yt as resolveContractRef$1, z as executeDbInit } from "./ref-knkpu_zy-B5bc9JJw.mjs";
|
|
2
2
|
export { advanceRefSafely, appContractStandInFromIdentity, appliedHashesFromLedger, buildContractSpaceAggregate, buildMigrationSpaceGraphEntries, buildReadAggregate, buildRefAdvancementFields, checkSingleTarget, computeRefAdvancementName, createControlClient, deriveStatusEdgeAnnotations, disposeEmitQueue, enrichContract, enumerateCheckSpaces, executeContractEmit, executeDbInit, executeDbUpdate, executeDbVerify, executeMigrateShowPlan, executeMigrationNewCommand, executeMigrationPlanCommand, executeRefAdvancement, executeRefDeleteCommand, executeRefListCommand, executeRefSetCommand, hasMigrationPath, listRefsByContractHash, loadAggregateIntegrityViolations, loadContractRawSafely, loadContractSpaceAggregateForCli, mapCaughtMigrationError, mapContractAtError, mapIntegrityViolations, migrationSpaceListEntriesFromAggregate, originHashForStatus, readContractIR, readMigrationRefs, refuseContractSpaceIntegrity, refuseDeclaredExtensionTargetMismatch, refuseMarkerOutsideGraph, refuseMissingInvariantPath, refusePackageCorruptionOnAggregate, refuseUnknownInvariants, resolveContractRef$1 as resolveContractRef, resolveContractRefToSnapshot, resolveFromForPlan, resolveMigrationRef, resolveRefAdvancementFields, resolveToForPlan, runContractSpaceSeedPhase, runMigrationCheck, runMigrationList, statusForMigrationHash };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { C as EmitResult, E as ExecuteDbVerifyResult, O as MigrateResult, _ as DbUpdateResult, a as ControlClient, f as DbInitResult } from "./db-verify-BRDzImLV-
|
|
1
|
+
import { C as EmitResult, E as ExecuteDbVerifyResult, O as MigrateResult, _ as DbUpdateResult, a as ControlClient, f as DbInitResult } from "./db-verify-BRDzImLV-e7n1L4Vk.mjs";
|
|
2
2
|
import { CoreSchemaView, OperationPreview, SignDatabaseResult, VerifyDatabaseResult, VerifyDatabaseSchemaResult } from "@prisma/orm-framework/components/control";
|
|
3
3
|
import { ContractMarkerRecord, LedgerEntryRecord } from "@prisma/orm-framework/contract/types";
|
|
4
4
|
import { AuthoringPslBlockDescriptorNamespace } from "@prisma/orm-framework/components/authoring";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import "./ref-resolution-
|
|
1
|
+
import "./ref-resolution-CaHQJXE0.mjs";
|
|
2
2
|
import { CliStructuredError as CliStructuredError$2 } from "@prisma/orm-framework/errors/control";
|
|
3
3
|
import { ControlAdapterDescriptor, ControlDriverDescriptor, ControlDriverInstance, ControlExtensionDescriptor, ControlFamilyDescriptor, ControlFamilyInstance, ControlTargetDescriptor, CoreSchemaView, MigrationPlanOperation, MigrationPlannerConflict, OperationPreview, SignDatabaseResult, VerifyDatabaseResult, VerifyDatabaseSchemaResult } from "@prisma/orm-framework/components/control";
|
|
4
4
|
import { Result } from "@prisma/orm-framework/utils/result";
|
|
@@ -960,4 +960,4 @@ type ExecuteDbVerifyResult = Result<ExecuteDbVerifySuccess, CliStructuredError$2
|
|
|
960
960
|
declare function executeDbVerify<TFamilyId extends string, TTargetId extends string>(options: ExecuteDbVerifyOptions<TFamilyId, TTargetId>): Promise<ExecuteDbVerifyResult>;
|
|
961
961
|
//#endregion
|
|
962
962
|
export { SchemaVerifyOptions as A, EmitResult as C, IntrospectOptions as D, ExecuteDbVerifyResult as E, VerifyOptions as M, executeDbVerify as N, MigrateResult as O, EmitOptions as S, ExecuteDbVerifyOptions as T, DbUpdateResult as _, ControlClient as a, EmitFailure as b, CreateControlClient as c, DbInitOptions as d, DbInitResult as f, DbUpdateOptions as g, DbUpdateFailureCode as h, ControlActionName as i, SignOptions as j, OnControlProgress as k, DbInitFailure as l, DbUpdateFailure as m, ContractEmitOptions as n, ControlClientOptions as o, DbInitSuccess as p, ContractEmitResult as r, ControlProgressEvent as s, CliStructuredError$2 as t, DbInitFailureCode as u, DbUpdateSuccess as v, EmitSuccess as w, EmitFailureCode as x, EmitContractConfig as y };
|
|
963
|
-
//# sourceMappingURL=db-verify-BRDzImLV-
|
|
963
|
+
//# sourceMappingURL=db-verify-BRDzImLV-e7n1L4Vk.d.mts.map
|
package/dist/{db-verify-BRDzImLV-3eI346zy.d.mts.map → db-verify-BRDzImLV-e7n1L4Vk.d.mts.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"db-verify-BRDzImLV-
|
|
1
|
+
{"version":3,"file":"db-verify-BRDzImLV-e7n1L4Vk.d.mts","names":[],"sources":["../../../../1-framework/3-tooling/cli/dist/db-verify-BRDzImLV.d.mts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;UAyBU;WACC,QAAQ;WACR,QAAQ;WACR,SAAS;;WAET,SAAS;WACT,aAAa,cAAc;;;;;;WAM3B;;;;;;KAMN,uBAAuB,SAAS,yBAAyB;;;;KAIzD;;;;;;;;;;;;;;KAcA;WACM,QAAQ;WACR;WACA;WACA;WACA;;WAEA,QAAQ;WACR;WACA;WACA;;;;;;;KAON,qBAAqB,OAAO;;;;UAIvB;;WAEC;;;;;;WAMA;;WAEA,aAAa;;;;;UAKd;;WAEC;;;;;;WAMA;;;;;;WAMA;;WAEA,aAAa;;;;;U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BAAiB,QAAQ;;;;;;;EAO1C,WAAW,UAAU,oBAAoB;;;;;;;;EAQzC,aAAa,oBAAoB;;;;;;;;EAQjC,iBAAiB,oBAAoB;;;;;;;;EAQrC,0BAA0B;;;;;;;;;EAS1B,mBAAmB,qBAAqB,2BAA2B;;;;;;;;EAQnE,KAAK,SAAS,cAAc,QAAQ;;;;;;;;;;;;;UAa5B,uBAAuB,0BAA0B;WAChD,QAAQ,sBAAsB,WAAW;WACzC,gBAAgB,sBAAsB;WACtC,UAAU;WACV;WACA,UAAU;WACV,YAAY,cAAc,2BAA2B,WAAW;WAChE,qBAAqB,cAAc,+BAA+B,WAAW;WAC7E;WACA;WACA;WACA,aAAa;;;;;;;;;;;;;;UAcd;WACC,eAAe,oBAAoB;;;;;;WAMnC;WACA;WACA;;;;;;;;WAQA,aAAa;;KAEnB,wBAAwB,OAAO,wBAAwB;;;;;;;;;;;;;;;;;iBAiB3C,gBAAgB,0BAA0B,0BAA0B,SAAS,uBAAuB,WAAW,aAAa,QAAQ"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
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
2
|
import { n as MigrationGraph, t as MigrationEdge } from "./graph-bDjJ4GL9-BhFevsJS.mjs";
|
|
3
|
-
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-
|
|
3
|
+
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
4
|
import { n as OnDiskMigrationPackage, t as MigrationOps } from "./package-CfWiDNrr-ZR4HM_Iz.mjs";
|
|
5
5
|
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
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-sr4CO9_t-C3eV_kn-.mjs";
|
package/dist/migration-tools.mjs
CHANGED
|
@@ -10,7 +10,7 @@ import { c as resolveRefsByContractHash, d as writeRef, i as readRefs, l as vali
|
|
|
10
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-CrxvgpwD-D5LLXGci.mjs";
|
|
11
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-EMuVN6hq.mjs";
|
|
12
12
|
import { a as gatherDiskContractSpaceState, i as emitContractSpaceArtifacts, n as computeExtensionSpaceApplyPath, o as planAllSpaces, r as contractSpaceFromJson, t as assertDescriptorSelfConsistency } from "./spaces-BCZiAZQn.mjs";
|
|
13
|
-
import { n as parseContractRef, r as parseMigrationRef, t as findEdgeByDirName } from "./ref-resolution-
|
|
13
|
+
import { n as parseContractRef, r as parseMigrationRef, t as findEdgeByDirName } from "./ref-resolution-BWpwb8_b.mjs";
|
|
14
14
|
import { i as writeMigrationTs, n as hasMigrationTs, r as shebangLineFor, t as detectScaffoldRuntime } from "./migration-ts-DdVm0rws.mjs";
|
|
15
15
|
import { i as isDirectEntrypoint, n as MigrationContractViews, r as buildMigrationArtifacts, t as Migration } from "./migration-B9w-7dKe.mjs";
|
|
16
16
|
import { t as ledgerOriginFromStored } from "./ledger-origin-D7PN4Fon.mjs";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
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-
|
|
1
|
+
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";
|
|
2
2
|
export { type ContractRef, type ContractRefProvenance, type MigrationRef, type MigrationRefProvenance, type RefResolutionAmbiguous, type RefResolutionContext, type RefResolutionError, type RefResolutionInvalidFormat, type RefResolutionNotFound, type RefResolutionWrongGrammar, findEdgeByDirName, parseContractRef, parseMigrationRef };
|
|
@@ -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-BWpwb8_b.mjs";
|
|
2
2
|
export { findEdgeByDirName, parseContractRef, parseMigrationRef };
|
|
@@ -12,7 +12,7 @@ import { a as isValidSpaceId, c as spaceMigrationDirectory, l as spaceRefsDirect
|
|
|
12
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-EMuVN6hq.mjs";
|
|
13
13
|
import { i as emitContractSpaceArtifacts, o as planAllSpaces } from "./spaces-BCZiAZQn.mjs";
|
|
14
14
|
import { c as internalImportRoot, o as importRootForDependencies, r as createImportSpecifierResolver } from "./import-roots-kw_vAdpJ.mjs";
|
|
15
|
-
import { n as parseContractRef, r as parseMigrationRef } from "./ref-resolution-
|
|
15
|
+
import { n as parseContractRef, r as parseMigrationRef } from "./ref-resolution-BWpwb8_b.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";
|
|
@@ -32,7 +32,7 @@ import { createHash } from "node:crypto";
|
|
|
32
32
|
import { canonicalizeJson } from "@prisma/orm-framework/components/utils";
|
|
33
33
|
import { abortable } from "@prisma/orm-framework/utils/abortable";
|
|
34
34
|
import { resolve as resolve$1 } from "node:path";
|
|
35
|
-
//#region ../../../1-framework/3-tooling/cli/dist/ref-
|
|
35
|
+
//#region ../../../1-framework/3-tooling/cli/dist/ref-knkpu_zy.mjs
|
|
36
36
|
/**
|
|
37
37
|
* The typed remediation the CLI attaches to its own errors and findings.
|
|
38
38
|
* Constructors live here rather than in any library the CLI calls: naming a
|
|
@@ -230,6 +230,33 @@ function errorSnapshotMissing(identifier, options) {
|
|
|
230
230
|
...ifDefined("cause", options?.cause)
|
|
231
231
|
});
|
|
232
232
|
}
|
|
233
|
+
/**
|
|
234
|
+
* Default origin resolution for `migration plan` found nothing (no `--from`,
|
|
235
|
+
* no `db` ref) while migrations already exist on disk. Planning would silently
|
|
236
|
+
* produce an empty-origin migration that ignores the existing history — almost
|
|
237
|
+
* always a mistake — so the command refuses and names the three exits.
|
|
238
|
+
*/
|
|
239
|
+
function errorPlanOriginUnknown(reachableRefs, graphTipHash) {
|
|
240
|
+
const fromSuggestion = reachableRefs.length > 0 ? reachableRefs.map((r) => `--from ${r.name}`).join(" or ") : graphTipHash !== null ? `--from ${graphTipHash}` : "--from <contract>";
|
|
241
|
+
const refSetCommand = graphTipHash !== null ? `{bin} migration ref set db ${graphTipHash}` : "{bin} migration ref set db <contract>";
|
|
242
|
+
return new ActionableCliError("MIGRATION.PLAN_ORIGIN_UNKNOWN", "Cannot determine the plan origin: migrations exist but no origin is named", {
|
|
243
|
+
why: "Migrations exist on disk, but there is no `db` ref and no --from was given, so the plan origin would silently fall back to an empty database and the resulting migration would recreate everything the existing migrations already create.",
|
|
244
|
+
fix: [
|
|
245
|
+
`Set the \`db\` ref to the contract your dev database is at (\`${refSetCommand}\`), or advance it via \`{bin} db update\`.`,
|
|
246
|
+
`Or pass the origin explicitly: \`{bin} migration plan ${fromSuggestion}\`.`,
|
|
247
|
+
"Or pass --from @empty to deliberately plan from an empty database."
|
|
248
|
+
].join("\n"),
|
|
249
|
+
nextActions: [
|
|
250
|
+
runCommandAction("Point the db ref at the origin contract", refSetCommand),
|
|
251
|
+
...reachableRefs.length > 0 ? reachableRefs.map((ref) => runCommandAction(`Plan from ${ref.name}`, `{bin} migration plan --from ${ref.name}`)) : [runCommandAction("Plan from an explicit origin", `{bin} migration plan ${fromSuggestion}`)],
|
|
252
|
+
runCommandAction("Plan from an empty database deliberately", "{bin} migration plan --from @empty")
|
|
253
|
+
],
|
|
254
|
+
meta: {
|
|
255
|
+
reachableRefs: reachableRefs.map((r) => r.name),
|
|
256
|
+
...graphTipHash !== null ? { graphTipHash } : {}
|
|
257
|
+
}
|
|
258
|
+
});
|
|
259
|
+
}
|
|
233
260
|
function errorMarkerMismatch(markerHash, reachableHashes, graphTip) {
|
|
234
261
|
const reachableList = reachableHashes.length > 0 ? reachableHashes.join(", ") : "(none — migration graph is empty)";
|
|
235
262
|
const planFromFix = graphTip !== null ? `Run \`{bin} migration plan --from ${graphTip}\` if the live marker is canonical and the on-disk graph needs catching up.` : "Run `{bin} migration plan` if the live marker is canonical and the on-disk graph needs catching up.";
|
|
@@ -4140,11 +4167,14 @@ async function resolveFromForPlan(input) {
|
|
|
4140
4167
|
const refs = space.refs;
|
|
4141
4168
|
if (optionsFrom === void 0) {
|
|
4142
4169
|
const dbRef = refs["db"];
|
|
4143
|
-
if (!dbRef)
|
|
4144
|
-
|
|
4145
|
-
|
|
4146
|
-
|
|
4147
|
-
|
|
4170
|
+
if (!dbRef) {
|
|
4171
|
+
if (graphIsEmpty(space)) return ok({
|
|
4172
|
+
kind: "greenfield",
|
|
4173
|
+
fromHash: null,
|
|
4174
|
+
fromContract: null
|
|
4175
|
+
});
|
|
4176
|
+
return notOk(errorPlanOriginUnknown(getReachableRefs(refs, graph), findLatestMigration(graph)?.to ?? null));
|
|
4177
|
+
}
|
|
4148
4178
|
return resolveFromPolicy({
|
|
4149
4179
|
hash: dbRef.hash,
|
|
4150
4180
|
provenance: {
|
|
@@ -4166,6 +4196,11 @@ async function resolveFromForPlan(input) {
|
|
|
4166
4196
|
}
|
|
4167
4197
|
return notOk(mapRefResolutionError(refResult.failure));
|
|
4168
4198
|
}
|
|
4199
|
+
if (refResult.value.provenance.kind === "reserved-empty") return ok({
|
|
4200
|
+
kind: "greenfield",
|
|
4201
|
+
fromHash: null,
|
|
4202
|
+
fromContract: null
|
|
4203
|
+
});
|
|
4169
4204
|
return resolveFromPolicy(refResult.value, input, refs, optionsFrom);
|
|
4170
4205
|
}
|
|
4171
4206
|
async function resolveToForPlan(optionsTo, input) {
|
|
@@ -4177,6 +4212,13 @@ async function resolveToForPlan(optionsTo, input) {
|
|
|
4177
4212
|
refs
|
|
4178
4213
|
});
|
|
4179
4214
|
if (!refResult.ok) return notOk(mapRefResolutionError(refResult.failure));
|
|
4215
|
+
if (refResult.value.provenance.kind === "reserved-empty") return notOk(mapRefResolutionError({
|
|
4216
|
+
kind: "wrong-grammar",
|
|
4217
|
+
input: optionsTo,
|
|
4218
|
+
expectedGrammar: "contract",
|
|
4219
|
+
message: "`@empty` is only valid as an origin (`--from`); planning a migration to the empty contract is not supported through this shortcut",
|
|
4220
|
+
fix: "Pass `--to` a contract hash, ref name, or migration directory name. To plan starting from an empty database, use `--from @empty`."
|
|
4221
|
+
}));
|
|
4180
4222
|
const resolution = await resolveContractRef(refResult.value, space, {
|
|
4181
4223
|
explicitLabel: optionsTo,
|
|
4182
4224
|
artifactRole: "to"
|
|
@@ -4685,4 +4727,4 @@ async function executeRefListCommand(options) {
|
|
|
4685
4727
|
//#endregion
|
|
4686
4728
|
export { loadContractRawSafely as $, errorMigrationPlanningFailed as A, statusForMigrationHash as At, executeDbUpdate as B, errorDestructiveChanges as C, resolveRefAdvancementFields as Ct, errorLegendHumanOnly as D, runMigrationCheck as Dt, errorHashMismatch as E, runContractSpaceSeedPhase as Et, errorTargetMigrationNotSupported as F, executeRefAdvancement as G, executeMigrateShowPlan as H, errorTargetMismatch as I, executeRefSetCommand as J, executeRefDeleteCommand as K, errorUnexpected as L, errorPathUnreachable as M, toDeclaredExtensionsFromRaw as Mt, errorRunnerFailed as N, errorMarkerMissing as O, runMigrationList as Ot, errorRuntime as P, loadAggregateIntegrityViolations as Q, executeContractEmit as R, errorDatabaseConnectionRequired as S, resolveMigrationRef as St, errorFileNotFound as T, runCommandAction as Tt, executeMigrationNewCommand as U, executeDbVerify as V, executeMigrationPlanCommand as W, hasMigrationPath as X, findPackageByDirPath as Y, listRefsByContractHash as Z, enumerateCheckSpaces as _, requireLiveDatabase as _t, buildContractSpaceAggregate as a, maskConnectionUrl as at, errorContractArgConflict as b, resolveContractRefToSnapshot as bt, buildRefAdvancementFields as c, readContractEnvelope as ct, closeQuietly as d, refuseContractSpaceIntegrity as dt, loadContractSpaceAggregateForCli as et, computeRefAdvancementName as f, refuseDeclaredExtensionTargetMismatch as ft, enrichContract as g, refuseUnknownInvariants as gt, disposeEmitQueue as h, refusePackageCorruptionOnAggregate as ht, appliedHashesFromLedger as i, mapIntegrityViolations as it, errorNoMigrations as j, targetSupportsMigrations as jt, errorMigrationPackageNotFound as k, sanitizeErrorMessage as kt, checkSingleTarget as l, readContractIR as lt, deriveStatusEdgeAnnotations as m, refuseMissingInvariantPath as mt, advanceRefSafely as n, mapCaughtMigrationError as nt, buildMigrationSpaceGraphEntries as o, migrationSpaceListEntriesFromAggregate as ot, createControlClient as p, refuseMarkerOutsideGraph as pt, executeRefListCommand as q, appContractStandInFromIdentity as r, mapContractAtError as rt, buildReadAggregate as s, originHashForStatus as st, CliStructuredError$1 as t, looksLikePath as tt, chooseAction as u, readMigrationRefs as ut, errorConfigValidation$1 as v, resolveAppTargetPath as vt, errorDriverRequired as w, resolveToForPlan as wt, errorContractValidationFailed as x, resolveFromForPlan as xt, errorConsentPlanMismatch as y, resolveContractRef$1 as yt, executeDbInit as z };
|
|
4687
4729
|
|
|
4688
|
-
//# sourceMappingURL=ref-
|
|
4730
|
+
//# sourceMappingURL=ref-knkpu_zy-B5bc9JJw.mjs.map
|