@prisma/orm-toolchain 8.0.0-rc.9-dev.11 → 8.0.0-rc.9-dev.13
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 +156 -15
- package/dist/cli.mjs.map +1 -1
- package/dist/cli__control-api.d.mts +10 -1
- package/dist/cli__control-api.d.mts.map +1 -1
- package/dist/cli__control-api.mjs +1 -1
- package/dist/{ref-BPBIUGrB-BQt8iSyJ.mjs → ref-DcqFmceq-QaUjgZeM.mjs} +63 -8
- package/dist/ref-DcqFmceq-QaUjgZeM.mjs.map +1 -0
- package/dist/vite-plugin-contract-emit.mjs +1 -1
- package/package.json +12 -12
- package/dist/ref-BPBIUGrB-BQt8iSyJ.mjs.map +0 -1
|
@@ -742,6 +742,11 @@ interface MigrationPlanResult {
|
|
|
742
742
|
* `node migration.ts` to self-emit `ops.json` / `migration.json`.
|
|
743
743
|
*/
|
|
744
744
|
readonly pendingPlaceholders?: boolean;
|
|
745
|
+
/**
|
|
746
|
+
* True when no `--from` was given and no `db` ref existed, so the origin
|
|
747
|
+
* defaulted to the empty contract. Absent when the user named the origin.
|
|
748
|
+
*/
|
|
749
|
+
readonly fromDefaulted?: boolean;
|
|
745
750
|
readonly timings: {
|
|
746
751
|
readonly total: number;
|
|
747
752
|
};
|
|
@@ -789,6 +794,7 @@ type FromResolution = {
|
|
|
789
794
|
kind: 'greenfield';
|
|
790
795
|
fromHash: null;
|
|
791
796
|
fromContract: null;
|
|
797
|
+
defaulted: boolean;
|
|
792
798
|
} | {
|
|
793
799
|
kind: 'graph-node';
|
|
794
800
|
fromHash: string;
|
|
@@ -899,7 +905,10 @@ interface ResolveRefAdvancementFieldsOptions {
|
|
|
899
905
|
* MigrationToolsError mapped, other errors rethrown.
|
|
900
906
|
*/
|
|
901
907
|
declare function resolveRefAdvancementFields(options: ResolveRefAdvancementFieldsOptions): Promise<Result<RefAdvancementFields, CliStructuredError$2>>;
|
|
902
|
-
/**
|
|
908
|
+
/**
|
|
909
|
+
* The --advance-ref tail of migrate and db sign: executeRefAdvancement with
|
|
910
|
+
* MigrationToolsError failures passed through as notOk, others rethrown.
|
|
911
|
+
*/
|
|
903
912
|
declare function advanceRefSafely(args: {
|
|
904
913
|
readonly refsDir: string;
|
|
905
914
|
readonly migrationsDir: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli__control-api.d.mts","names":[],"sources":["../../../../1-framework/3-tooling/cli/dist/exports/control-api.d.mts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAyBiB,oBAAoB,SAAS,uBAAuB;;;;;;iBAMpD,eAAe,IAAI,UAAU,YAAY,cAAc,kDAAkD;;;;iBAIzG,wBAAwB,iBAAiB;;;iBAGzC,mBAAmB,gBAAgB;WACzC;IACP,cAAc;;;KAGb;WACM,aAAa;;;;;;;;;;;;;;;;;;;;;;iBAsBP,oBAAoB,SAAS,qBAAqB,eAAe,2BAA2B,QAAQ;;;UAG3G;WACC,QAAQ;WACR;;WAEA;;WAEA;;;;;;;;;;KAUN,sCAAsC;WAChC;WACA;;WAEA;WACA;;UAED;WACC;WACA,cAAc;;WAEd;WACA;;iBAEM,6BAA6B,SAAS,sCAAsC,QAAQ,OAAO,qCAAqC;;;;;;;;;;;;;;;;iBAgBhI,uBAAuB,qBAAqB,sBAAsB,wBAAwB;;;;;;;;UAQjG,qBAAqB,0BAA0B;WAC9C,UAAU;WACV;WACA,aAAa;WACb,YAAY,cAAc,2BAA2B,WAAW;WAChE,sBAAsB,0BAA0B;;;;;;iBAM1C,sCAAsC,0BAA0B,0BAA0B,QAAQ,qBAAqB,WAAW,aAAa;;;;;;;iBAO/I,iCAAiC,0BAA0B,0BAA0B,QAAQ,qBAAqB,WAAW,aAAa,QAAQ,OAAO,wBAAwB;;;;;;iBAMjL,6BAA6B,WAAW,wBAAwB,SAAS,uBAAuB,wBAAwB;;;;;;iBAMxH,mCAAmC,WAAW,wBAAwB,wBAAw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ACV;WACA;;iBAEM,iBAAiB,mBAAmB,OAAO,wBAAwB,QAAQ,OAAO,qBAAqB;;;UAG9G;WACC;WACA;WACA;WACA;;UAED;WACC;WACA;WACA;;UAED;WACC;WACA,MAAM,eAAe;;UAEtB;WACC,QAAQ;;WAER;;WAEA;;iBAEM,qBAAqB,cAAc,uBAAuB,SAAS,sBAAsB,QAAQ,OAAO,cAAc;iBACtH,wBAAwB,cAAc,SAAS,sBAAsB,QAAQ,OAAO,iBAAiB;iBACrG,sBAAsB,SAAS,sBAAsB,QAAQ,OAAO,eAAe;;;UAG1F;WACC;WACA;;UAED;WACC;aACE;aACA;;WAEF;aACE;aACA;;;iBAGI,0BAA0B;WAChC;WACA;;iBAEM,eAAe,cAAc,yBAAyB,2BAA2B,QAAQ;iBACzF,sBAAsB,iBAAiB,uBAAuB,cAAc,cAAc,YAAY,aAAa;EAClI;EACA;;iBAEe,0BAA0B;WAChC;WACA;WACA;WACA;WACA,YAAY;WACZ;WACA;IACP,QAAQ;UACF;WACC;WACA;WACA;WACA;WACA,cAAc;;WAEd;WACA;WACA;;;;;;;iBAOM,4BAA4B,SAAS,qCAAqC,QAAQ,OAAO,sBAAsB
|
|
1
|
+
{"version":3,"file":"cli__control-api.d.mts","names":[],"sources":["../../../../1-framework/3-tooling/cli/dist/exports/control-api.d.mts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAyBiB,oBAAoB,SAAS,uBAAuB;;;;;;iBAMpD,eAAe,IAAI,UAAU,YAAY,cAAc,kDAAkD;;;;iBAIzG,wBAAwB,iBAAiB;;;iBAGzC,mBAAmB,gBAAgB;WACzC;IACP,cAAc;;;KAGb;WACM,aAAa;;;;;;;;;;;;;;;;;;;;;;iBAsBP,oBAAoB,SAAS,qBAAqB,eAAe,2BAA2B,QAAQ;;;UAG3G;WACC,QAAQ;WACR;;WAEA;;WAEA;;;;;;;;;;KAUN,sCAAsC;WAChC;WACA;;WAEA;WACA;;UAED;WACC;WACA,cAAc;;WA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OAAO,sBAAsB;;;;;iBAK/G,iBAAiB;WACvB;WACA;WACA;WACA;WACA,YAAY;IACnB,QAAQ;WACD;WACA;GACR;;;UAGO;WACC,OAAO;WACP,MAAM;WACN;;iBAEM,mBAAmB,eAAe,SAAS,uBAAuB,OAAO,aAAa;iBACtF,oBAAoB,eAAe;WACzC,OAAO;WACP,MAAM;IACb,OAAO,cAAc;;;;iBAIR,kBAAkB,kBAAkB,QAAQ,OAAO,MAAM;;;iBAGzD,iBAAiB"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { $ as
|
|
1
|
+
import { $ as loadAggregateIntegrityViolations, At as runMigrationList, B as executeDbInit, Ct as resolveFromForPlan, Et as resolveToForPlan, G as executeMigrationPlanCommand, H as executeDbVerify, J as executeRefListCommand, K as executeRefAdvancement, Mt as statusForMigrationHash, Ot as runContractSpaceSeedPhase, Q as listRefsByContractHash, St as resolveContractRefToSnapshot, Tt as resolveRefAdvancementFields, U as executeMigrateShowPlan, V as executeDbUpdate, W as executeMigrationNewCommand, Y as executeRefSetCommand, Z as hasMigrationPath, _ as enumerateCheckSpaces, _t as refusePackageCorruptionOnAggregate, a as buildContractSpaceAggregate, at as mapIntegrityViolations, c as buildRefAdvancementFields, ct as originHashForStatus, dt as readContractIR, et as loadContractRawSafely, f as computeRefAdvancementName, ft as readMigrationRefs, g as enrichContract, gt as refuseMissingInvariantPath, h as disposeEmitQueue, ht as refuseMarkerOutsideGraph, i as appliedHashesFromLedger, it as mapContractAtError, kt as runMigrationCheck, l as checkSingleTarget, m as deriveStatusEdgeAnnotations, mt as refuseDeclaredExtensionTargetMismatch, n as advanceRefSafely, o as buildMigrationSpaceGraphEntries, p as createControlClient, pt as refuseContractSpaceIntegrity, q as executeRefDeleteCommand, r as appContractStandInFromIdentity, rt as mapCaughtMigrationError, s as buildReadAggregate, st as migrationSpaceListEntriesFromAggregate, tt as loadContractSpaceAggregateForCli, vt as refuseUnknownInvariants, wt as resolveMigrationRef, xt as resolveContractRef$1, z as executeContractEmit } from "./ref-DcqFmceq-QaUjgZeM.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 };
|
|
@@ -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-DcqFmceq.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
|
|
@@ -86,6 +86,20 @@ function errorContractArgConflict(options) {
|
|
|
86
86
|
}
|
|
87
87
|
});
|
|
88
88
|
}
|
|
89
|
+
/**
|
|
90
|
+
* A command was told both which ref to advance and not to advance any ref.
|
|
91
|
+
* Same envelope as the positional/flag contract conflict, so a script sees
|
|
92
|
+
* every invocation conflict in one shape.
|
|
93
|
+
*/
|
|
94
|
+
function errorAdvanceRefArgConflict(options) {
|
|
95
|
+
const fix = "Pass either --advance-ref <name> or --no-advance-ref, not both.";
|
|
96
|
+
return new ActionableCliError("CLI.ADVANCE_REF_ARG_CONFLICT", "Cannot specify both --advance-ref and --no-advance-ref", {
|
|
97
|
+
why: `--advance-ref names "${options.advanceRef}" while --no-advance-ref asks for no ref to be written; there is no rule for which wins.`,
|
|
98
|
+
fix,
|
|
99
|
+
nextActions: [chooseAction(fix)],
|
|
100
|
+
meta: { advanceRef: options.advanceRef }
|
|
101
|
+
});
|
|
102
|
+
}
|
|
89
103
|
function errorRefSetHashNotInGraph(resolvedHash, reachableHashes, graphTipHash) {
|
|
90
104
|
const reachableList = reachableHashes.length > 0 ? reachableHashes.join(", ") : "(none — migration graph is empty)";
|
|
91
105
|
const fix = reachableHashes.length > 0 ? graphTipHash !== null ? `Set the ref to a graph-node hash such as ${graphTipHash}, or run \`{bin} migration plan\` to extend the graph.` : "Set the ref to a hash that appears in the migration graph." : "Run `{bin} migration plan` first.";
|
|
@@ -2974,12 +2988,43 @@ function computeRefAdvancementName(options) {
|
|
|
2974
2988
|
if (options.db === void 0) return "db";
|
|
2975
2989
|
return null;
|
|
2976
2990
|
}
|
|
2991
|
+
function contractDtsPathOf(contractJsonPath) {
|
|
2992
|
+
return contractJsonPath.replace(/\.json$/i, ".d.ts");
|
|
2993
|
+
}
|
|
2977
2994
|
async function readContractIR(contractJson, contractJsonPath) {
|
|
2978
2995
|
return {
|
|
2979
2996
|
contract: contractJson,
|
|
2980
|
-
contractDts: await readFile(contractJsonPath
|
|
2997
|
+
contractDts: await readFile(contractDtsPathOf(contractJsonPath), "utf-8")
|
|
2981
2998
|
};
|
|
2982
2999
|
}
|
|
3000
|
+
function fsErrorCodeOf(error) {
|
|
3001
|
+
const code = error instanceof Error ? Reflect.get(error, "code") : void 0;
|
|
3002
|
+
return typeof code === "string" ? code : void 0;
|
|
3003
|
+
}
|
|
3004
|
+
function errorUnreadableContractDts(contractJsonPath, cause) {
|
|
3005
|
+
const contractDtsPath = contractDtsPathOf(contractJsonPath);
|
|
3006
|
+
const code = fsErrorCodeOf(cause);
|
|
3007
|
+
return errorFileNotFound(contractDtsPath, {
|
|
3008
|
+
why: code === "ENOENT" ? `The contract types next to ${contractJsonPath} are missing: ${contractDtsPath}` : `The contract types next to ${contractJsonPath} could not be read${code === void 0 ? "" : ` (${code})`}: ${contractDtsPath}`,
|
|
3009
|
+
fix: "Run {bin} contract emit to regenerate the contract artifacts, then advance the ref again.",
|
|
3010
|
+
cause
|
|
3011
|
+
});
|
|
3012
|
+
}
|
|
3013
|
+
/**
|
|
3014
|
+
* Everything `advanceRefSafely` needs from disk, loaded before a command does
|
|
3015
|
+
* the work that precedes the ref write: the ref name is validated and the
|
|
3016
|
+
* sibling `.d.ts` of the contract to snapshot is read. The returned
|
|
3017
|
+
* `ContractIR` is what the command then hands to `advanceRefSafely`, so no
|
|
3018
|
+
* file is read after the database is signed.
|
|
3019
|
+
*/
|
|
3020
|
+
async function preflightRefAdvancement(args) {
|
|
3021
|
+
if (!validateRefName(args.name)) return notOk(errorInvalidRefName(args.name));
|
|
3022
|
+
try {
|
|
3023
|
+
return ok(await readContractIR(args.contractJson, args.contractJsonPath));
|
|
3024
|
+
} catch (error) {
|
|
3025
|
+
return notOk(errorUnreadableContractDts(args.contractJsonPath, error));
|
|
3026
|
+
}
|
|
3027
|
+
}
|
|
2983
3028
|
async function executeRefAdvancement(refsDir, migrationsDir, name, hash, contractIR) {
|
|
2984
3029
|
if (!validateRefName(name)) throw errorInvalidRefName(name);
|
|
2985
3030
|
await writeContractSnapshot(migrationsDir, hash, {
|
|
@@ -3045,7 +3090,10 @@ async function resolveRefAdvancementFields(options) {
|
|
|
3045
3090
|
throw error;
|
|
3046
3091
|
}
|
|
3047
3092
|
}
|
|
3048
|
-
/**
|
|
3093
|
+
/**
|
|
3094
|
+
* The --advance-ref tail of migrate and db sign: executeRefAdvancement with
|
|
3095
|
+
* MigrationToolsError failures passed through as notOk, others rethrown.
|
|
3096
|
+
*/
|
|
3049
3097
|
async function advanceRefSafely(args) {
|
|
3050
3098
|
try {
|
|
3051
3099
|
return ok(await executeRefAdvancement(args.refsDir, args.migrationsDir, args.name, args.hash, args.contractIR));
|
|
@@ -4175,7 +4223,8 @@ async function resolveFromForPlan(input) {
|
|
|
4175
4223
|
if (graphIsEmpty(space)) return ok({
|
|
4176
4224
|
kind: "greenfield",
|
|
4177
4225
|
fromHash: null,
|
|
4178
|
-
fromContract: null
|
|
4226
|
+
fromContract: null,
|
|
4227
|
+
defaulted: true
|
|
4179
4228
|
});
|
|
4180
4229
|
return notOk(errorPlanOriginUnknown(getReachableRefs(refs, graph), findLatestMigration(graph)?.to ?? null));
|
|
4181
4230
|
}
|
|
@@ -4203,7 +4252,8 @@ async function resolveFromForPlan(input) {
|
|
|
4203
4252
|
if (refResult.value.provenance.kind === "reserved-empty") return ok({
|
|
4204
4253
|
kind: "greenfield",
|
|
4205
4254
|
fromHash: null,
|
|
4206
|
-
fromContract: null
|
|
4255
|
+
fromContract: null,
|
|
4256
|
+
defaulted: false
|
|
4207
4257
|
});
|
|
4208
4258
|
return resolveFromPolicy(refResult.value, input, refs, optionsFrom);
|
|
4209
4259
|
}
|
|
@@ -4339,6 +4389,7 @@ async function executeMigrationPlanCommandInner(options, startTime, callbacks) {
|
|
|
4339
4389
|
let fromHash = null;
|
|
4340
4390
|
let snapshotStartContract = null;
|
|
4341
4391
|
let isAutoBaseline = false;
|
|
4392
|
+
let fromDefaulted = false;
|
|
4342
4393
|
const tolerantAggregateResult = await loadContractSpaceAggregateForCli({
|
|
4343
4394
|
targetId: config.target.targetId,
|
|
4344
4395
|
migrationsDir,
|
|
@@ -4354,7 +4405,9 @@ async function executeMigrationPlanCommandInner(options, startTime, callbacks) {
|
|
|
4354
4405
|
});
|
|
4355
4406
|
if (!resolutionResult.ok) return notOk(resolutionResult.failure);
|
|
4356
4407
|
switch (resolutionResult.value.kind) {
|
|
4357
|
-
case "greenfield":
|
|
4408
|
+
case "greenfield":
|
|
4409
|
+
fromDefaulted = resolutionResult.value.defaulted;
|
|
4410
|
+
break;
|
|
4358
4411
|
case "graph-node":
|
|
4359
4412
|
fromHash = resolutionResult.value.fromHash;
|
|
4360
4413
|
fromContract = resolutionResult.value.fromContract;
|
|
@@ -4552,6 +4605,7 @@ async function executeMigrationPlanCommandInner(options, startTime, callbacks) {
|
|
|
4552
4605
|
operations: [],
|
|
4553
4606
|
emittedExtensionDirs,
|
|
4554
4607
|
pendingPlaceholders: true,
|
|
4608
|
+
...fromDefaulted ? { fromDefaulted } : {},
|
|
4555
4609
|
summary: "Planned migration with placeholder(s) — edit migration.ts then run `node migration.ts` to self-emit",
|
|
4556
4610
|
timings: { total: Date.now() - startTime }
|
|
4557
4611
|
});
|
|
@@ -4570,6 +4624,7 @@ async function executeMigrationPlanCommandInner(options, startTime, callbacks) {
|
|
|
4570
4624
|
})),
|
|
4571
4625
|
emittedExtensionDirs,
|
|
4572
4626
|
...preview !== void 0 ? { preview } : {},
|
|
4627
|
+
...fromDefaulted ? { fromDefaulted } : {},
|
|
4573
4628
|
summary: buildPlanSummary(plannedOps.length, emittedExtensionDirs.length),
|
|
4574
4629
|
timings: { total: Date.now() - startTime }
|
|
4575
4630
|
});
|
|
@@ -4729,6 +4784,6 @@ async function executeRefListCommand(options) {
|
|
|
4729
4784
|
}
|
|
4730
4785
|
}
|
|
4731
4786
|
//#endregion
|
|
4732
|
-
export {
|
|
4787
|
+
export { loadAggregateIntegrityViolations as $, errorMigrationPackageNotFound as A, runMigrationList as At, executeDbInit as B, errorDatabaseConnectionRequired as C, resolveFromForPlan as Ct, errorHashMismatch as D, runCommandAction as Dt, errorFileNotFound as E, resolveToForPlan as Et, errorRuntime as F, executeMigrationPlanCommand as G, executeDbVerify as H, errorTargetMigrationNotSupported as I, executeRefListCommand as J, executeRefAdvancement as K, errorTargetMismatch as L, errorNoMigrations as M, statusForMigrationHash as Mt, errorPathUnreachable as N, targetSupportsMigrations as Nt, errorLegendHumanOnly as O, runContractSpaceSeedPhase as Ot, errorRunnerFailed as P, toDeclaredExtensionsFromRaw as Pt, listRefsByContractHash as Q, errorUnexpected as R, errorContractValidationFailed as S, resolveContractRefToSnapshot as St, errorDriverRequired as T, resolveRefAdvancementFields as Tt, executeMigrateShowPlan as U, executeDbUpdate as V, executeMigrationNewCommand as W, findPackageByDirPath as X, executeRefSetCommand as Y, hasMigrationPath as Z, enumerateCheckSpaces as _, refusePackageCorruptionOnAggregate as _t, buildContractSpaceAggregate as a, mapIntegrityViolations as at, errorConsentPlanMismatch as b, resolveAppTargetPath as bt, buildRefAdvancementFields as c, originHashForStatus as ct, closeQuietly as d, readContractIR as dt, loadContractRawSafely as et, computeRefAdvancementName as f, readMigrationRefs as ft, enrichContract as g, refuseMissingInvariantPath as gt, disposeEmitQueue as h, refuseMarkerOutsideGraph as ht, appliedHashesFromLedger as i, mapContractAtError as it, errorMigrationPlanningFailed as j, sanitizeErrorMessage as jt, errorMarkerMissing as k, runMigrationCheck as kt, checkSingleTarget as l, preflightRefAdvancement as lt, deriveStatusEdgeAnnotations as m, refuseDeclaredExtensionTargetMismatch as mt, advanceRefSafely as n, looksLikePath as nt, buildMigrationSpaceGraphEntries as o, maskConnectionUrl as ot, createControlClient as p, refuseContractSpaceIntegrity as pt, executeRefDeleteCommand as q, appContractStandInFromIdentity as r, mapCaughtMigrationError as rt, buildReadAggregate as s, migrationSpaceListEntriesFromAggregate as st, CliStructuredError$1 as t, loadContractSpaceAggregateForCli as tt, chooseAction as u, readContractEnvelope as ut, errorAdvanceRefArgConflict as v, refuseUnknownInvariants as vt, errorDestructiveChanges as w, resolveMigrationRef as wt, errorContractArgConflict as x, resolveContractRef$1 as xt, errorConfigValidation$1 as y, requireLiveDatabase as yt, executeContractEmit as z };
|
|
4733
4788
|
|
|
4734
|
-
//# sourceMappingURL=ref-
|
|
4789
|
+
//# sourceMappingURL=ref-DcqFmceq-QaUjgZeM.mjs.map
|