@prisma/orm-toolchain 8.0.0-rc.17-dev.18 → 8.0.0-rc.17-dev.19

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 CHANGED
@@ -10,7 +10,7 @@ import { d as writeRef, r as readRef } from "./refs-qwvw4_dV-DNg_7WTD.mjs";
10
10
  import { a as contractHashAtMarker } from "./aggregate-DlfOyErc.mjs";
11
11
  import { i as createScaffoldSpecifierResolver } from "./import-roots-B6vrm5bT.mjs";
12
12
  import { o as isLiveMarkerRef } from "./ref-resolution-Be_zewf7.mjs";
13
- import { $ as refuseUnknownInvariants, A as executeRefListCommand, B as loadContractSourceWithStack, D as executeMigrationPlanCommand, E as executeMigrationNewCommand, F as listRefsByContractHash, G as migrationSpaceListEntriesFromAggregate, H as looksLikePath, I as liveMarkerUse, J as refuseContractSpaceIntegrity, K as preflightRefAdvancement, L as loadAggregateIntegrityViolations, M as findPackageByDirPath, N as formatSourceDiagnostic, P as hasMigrationPath, Q as refusePackageCorruptionOnAggregate, R as loadContractRawSafely, T as executeMigrateShowPlan, U as mapContractAtError, V as loadContractSpaceAggregateForCli, X as refuseMarkerOutsideGraph, Z as refuseMissingInvariantPath, _t as toDeclaredExtensionsFromRaw, a as RECORDED_OR_EMPTY_CONTRACT_REF_FORMS, at as resolveMigrationRef, b as executeContractEmit, c as appliedHashesFromLedger, ct as retryCommandFor, d as buildReadAggregate, dt as runMigrationList, et as requireDatabaseForLiveMarkerUse, f as buildRefAdvancementFields, ft as shellQuoted, g as deriveStatusEdgeAnnotations, gt as statusForMigrationHash, h as createControlClient, ht as statementFlag, i as RECORDED_CONTRACT_REF_FORMS, j as executeRefSetCommand, k as executeRefDeleteCommand, m as computeRefAdvancementName, mt as sourceWarningDiagnostic, n as DB_UPDATE_POLICY, nt as resolveContractRef$1, o as advanceRefSafely, p as checkSingleTarget, pt as snapshotVerifierFor, q as readMigrationRefs, r as NO_REF_ADVANCEMENT, rt as resolveContractRefToSnapshot, t as ALL_CONTRACT_REF_FORMS, tt as resolveAppTargetPath, u as buildMigrationSpaceGraphEntries, ut as runMigrationCheck, vt as validateLoadedContract, y as enumerateCheckSpaces, z as loadContractSource } from "./ref-Cc_CTagE-D_HDIWdx.mjs";
13
+ import { $ as refuseUnknownInvariants, A as executeRefListCommand, B as loadContractSourceWithStack, D as executeMigrationPlanCommand, E as executeMigrationNewCommand, F as listRefsByContractHash, G as migrationSpaceListEntriesFromAggregate, H as looksLikePath, I as liveMarkerUse, J as refuseContractSpaceIntegrity, K as preflightRefAdvancement, L as loadAggregateIntegrityViolations, M as findPackageByDirPath, N as formatSourceDiagnostic, P as hasMigrationPath, Q as refusePackageCorruptionOnAggregate, R as loadContractRawSafely, T as executeMigrateShowPlan, U as mapContractAtError, V as loadContractSpaceAggregateForCli, X as refuseMarkerOutsideGraph, Z as refuseMissingInvariantPath, _t as toDeclaredExtensionsFromRaw, a as RECORDED_OR_EMPTY_CONTRACT_REF_FORMS, at as resolveMigrationRef, b as executeContractEmit, c as appliedHashesFromLedger, ct as retryCommandFor, d as buildReadAggregate, dt as runMigrationList, et as requireDatabaseForLiveMarkerUse, f as buildRefAdvancementFields, ft as shellQuoted, g as deriveStatusEdgeAnnotations, gt as statusForMigrationHash, h as createControlClient, ht as statementFlag, i as RECORDED_CONTRACT_REF_FORMS, j as executeRefSetCommand, k as executeRefDeleteCommand, m as computeRefAdvancementName, mt as sourceWarningDiagnostic, n as DB_UPDATE_POLICY, nt as resolveContractRef$1, o as advanceRefSafely, p as checkSingleTarget, pt as snapshotVerifierFor, q as readMigrationRefs, r as NO_REF_ADVANCEMENT, rt as resolveContractRefToSnapshot, t as ALL_CONTRACT_REF_FORMS, tt as resolveAppTargetPath, u as buildMigrationSpaceGraphEntries, ut as runMigrationCheck, vt as validateLoadedContract, y as enumerateCheckSpaces, z as loadContractSource } from "./ref-Cc_CTagE-BYkEh32b.mjs";
14
14
  import { a as PRISMA7_QUICK_REFERENCE_STEP, i as PRISMA7_LOOP_STEP, n as InitOutputSchema, o as buildNextSteps, r as NEXT_STEPS_BEFORE_SCAFFOLD, t as DB_SIGN_STEP } from "./output-BcC8eB0h-C5bRd-aC.mjs";
15
15
  import { createRequire } from "node:module";
16
16
  import { ifDefined } from "@prisma/orm-framework/utils/defined";
@@ -1,3 +1,3 @@
1
1
  import { g as errorFromCaught } from "./caught-errors-HFQjjQVE-b_GDV-6J.mjs";
2
- import { $ as refuseUnknownInvariants, A as executeRefListCommand, C as executeDbUpdate, D as executeMigrationPlanCommand, E as executeMigrationNewCommand, F as listRefsByContractHash, G as migrationSpaceListEntriesFromAggregate, J as refuseContractSpaceIntegrity, K as preflightRefAdvancement, L as loadAggregateIntegrityViolations, O as executeRefAdvancement, P as hasMigrationPath, Q as refusePackageCorruptionOnAggregate, R as loadContractRawSafely, S as executeDbSign, T as executeMigrateShowPlan, U as mapContractAtError, V as loadContractSpaceAggregateForCli, W as mapIntegrityViolations, X as refuseMarkerOutsideGraph, Y as refuseDeclaredExtensionTargetMismatch, Z as refuseMissingInvariantPath, _ as disposeEmitQueue, at as resolveMigrationRef, b as executeContractEmit, c as appliedHashesFromLedger, d as buildReadAggregate, dt as runMigrationList, f as buildRefAdvancementFields, g as deriveStatusEdgeAnnotations, gt as statusForMigrationHash, h as createControlClient, it as resolveFromForPlan, j as executeRefSetCommand, k as executeRefDeleteCommand, l as buildContractSpaceAggregate, lt as runContractSpaceSeedPhase, m as computeRefAdvancementName, nt as resolveContractRef$1, o as advanceRefSafely, ot as resolveStatements, p as checkSingleTarget, q as readMigrationRefs, r as NO_REF_ADVANCEMENT, rt as resolveContractRefToSnapshot, s as appContractStandInFromIdentity, st as resolveToForPlan, u as buildMigrationSpaceGraphEntries, ut as runMigrationCheck, v as enrichContract, w as executeDbVerify, x as executeDbInit, y as enumerateCheckSpaces, z as loadContractSource } from "./ref-Cc_CTagE-D_HDIWdx.mjs";
2
+ import { $ as refuseUnknownInvariants, A as executeRefListCommand, C as executeDbUpdate, D as executeMigrationPlanCommand, E as executeMigrationNewCommand, F as listRefsByContractHash, G as migrationSpaceListEntriesFromAggregate, J as refuseContractSpaceIntegrity, K as preflightRefAdvancement, L as loadAggregateIntegrityViolations, O as executeRefAdvancement, P as hasMigrationPath, Q as refusePackageCorruptionOnAggregate, R as loadContractRawSafely, S as executeDbSign, T as executeMigrateShowPlan, U as mapContractAtError, V as loadContractSpaceAggregateForCli, W as mapIntegrityViolations, X as refuseMarkerOutsideGraph, Y as refuseDeclaredExtensionTargetMismatch, Z as refuseMissingInvariantPath, _ as disposeEmitQueue, at as resolveMigrationRef, b as executeContractEmit, c as appliedHashesFromLedger, d as buildReadAggregate, dt as runMigrationList, f as buildRefAdvancementFields, g as deriveStatusEdgeAnnotations, gt as statusForMigrationHash, h as createControlClient, it as resolveFromForPlan, j as executeRefSetCommand, k as executeRefDeleteCommand, l as buildContractSpaceAggregate, lt as runContractSpaceSeedPhase, m as computeRefAdvancementName, nt as resolveContractRef$1, o as advanceRefSafely, ot as resolveStatements, p as checkSingleTarget, q as readMigrationRefs, r as NO_REF_ADVANCEMENT, rt as resolveContractRefToSnapshot, s as appContractStandInFromIdentity, st as resolveToForPlan, u as buildMigrationSpaceGraphEntries, ut as runMigrationCheck, v as enrichContract, w as executeDbVerify, x as executeDbInit, y as enumerateCheckSpaces, z as loadContractSource } from "./ref-Cc_CTagE-BYkEh32b.mjs";
3
3
  export { NO_REF_ADVANCEMENT, advanceRefSafely, appContractStandInFromIdentity, appliedHashesFromLedger, buildContractSpaceAggregate, buildMigrationSpaceGraphEntries, buildReadAggregate, buildRefAdvancementFields, checkSingleTarget, computeRefAdvancementName, createControlClient, deriveStatusEdgeAnnotations, disposeEmitQueue, enrichContract, enumerateCheckSpaces, errorFromCaught, executeContractEmit, executeDbInit, executeDbSign, executeDbUpdate, executeDbVerify, executeMigrateShowPlan, executeMigrationNewCommand, executeMigrationPlanCommand, executeRefAdvancement, executeRefDeleteCommand, executeRefListCommand, executeRefSetCommand, hasMigrationPath, listRefsByContractHash, loadAggregateIntegrityViolations, loadContractRawSafely, loadContractSource, loadContractSpaceAggregateForCli, mapContractAtError, mapIntegrityViolations, migrationSpaceListEntriesFromAggregate, preflightRefAdvancement, readMigrationRefs, refuseContractSpaceIntegrity, refuseDeclaredExtensionTargetMismatch, refuseMarkerOutsideGraph, refuseMissingInvariantPath, refusePackageCorruptionOnAggregate, refuseUnknownInvariants, resolveContractRef$1 as resolveContractRef, resolveContractRefToSnapshot, resolveFromForPlan, resolveMigrationRef, resolveStatements, resolveToForPlan, runContractSpaceSeedPhase, runMigrationCheck, runMigrationList, statusForMigrationHash };
@@ -20,6 +20,6 @@ import { n as validateInvariantId, t as deriveProvidedInvariants } from "./invar
20
20
  import { n as isGraphNode, r as isInSpaceHistory, t as assertHashIsGraphNode } from "./migration-graph-Dra4CcyN.mjs";
21
21
  import { t as EMPTY_CONTRACT_HASH } from "./constants-Dkcn8Qu4.mjs";
22
22
  import { t as ledgerOriginFromStored } from "./ledger-origin-BGRN77Oy.mjs";
23
- import { a as writeMigrationTs, i as shebangLineFor, n as detectScaffoldRuntime, r as hasMigrationTs, t as ScaffoldRuntime } from "./migration-ts-CNaAtK8C.mjs";
23
+ import { a as shebangLineFor, i as hasMigrationTs, n as detectScaffoldRuntime, o as writeMigrationTs, r as formatMigrationTs, t as ScaffoldRuntime } from "./migration-ts-SGer0PXq.mjs";
24
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-BWULKO54.mjs";
25
- export { APP_SPACE_ID, type AggregateContractSpace, type AggregateCurrentDBState, type AggregateMigrationEdgeRef, type AppSpacePlanningInputs, 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, EMPTY_CONTRACT_REF, type ExtensionSpaceApplyPathOutcome, HEAD_REF_NAME, type IntegrityComputationInput, type IntegrityQueryOptions, type IntegritySpaceState, type IntegrityViolation, LIVE_MARKER_REF, 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_CONTRACT_REFS, 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, WORKING_CONTRACT_REF, allStorageElementsExternal, assertDescriptorSelfConsistency, assertHashIsGraphNode, assertValidSpaceId, buildFabricatedMigrationEdge, buildMigrationArtifacts, collectAggregateNamespaces, computeExtensionSpaceApplyPath, computeIntegrityViolations, computeMigrationHash, contractHashAtMarker, contractSnapshotDir, contractSpaceFromJson, copyFilesWithRename, createAggregateContractSpace, createContractSpaceAggregate, createSnapshotContentVerifier, deleteRef, deriveProvidedInvariants, detectCycles, detectOrphans, detectScaffoldRuntime, emitContractSpaceArtifacts, errorContractDeserializationFailed, errorContractSnapshotHashMismatch, errorContractSnapshotMissing, errorDescriptorHeadHashMismatch, errorInvalidJson, errorInvalidRefName, errorNoInvariantPath, errorUnknownInvariant, findEdgeByDirName, findPath, findPathWithDecision, findPathWithInvariants, formatMigrationDirName, gatherDiskContractSpaceState, hasMigrationTs, isDirectEntrypoint, isGraphNode, isInSpaceHistory, isLiveMarkerRef, isReservedContractRef, 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, spacesInApplyOrder, validateInvariantId, validateRefName, validateRefValue, verifyContractSpaces, verifyMigration, verifyMigrationHash, writeContractSnapshot, writeMigrationMetadata, writeMigrationOps, writeMigrationPackage, writeMigrationTs, writeRef };
25
+ export { APP_SPACE_ID, type AggregateContractSpace, type AggregateCurrentDBState, type AggregateMigrationEdgeRef, type AppSpacePlanningInputs, 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, EMPTY_CONTRACT_REF, type ExtensionSpaceApplyPathOutcome, HEAD_REF_NAME, type IntegrityComputationInput, type IntegrityQueryOptions, type IntegritySpaceState, type IntegrityViolation, LIVE_MARKER_REF, 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_CONTRACT_REFS, 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, WORKING_CONTRACT_REF, allStorageElementsExternal, assertDescriptorSelfConsistency, assertHashIsGraphNode, assertValidSpaceId, buildFabricatedMigrationEdge, buildMigrationArtifacts, collectAggregateNamespaces, computeExtensionSpaceApplyPath, computeIntegrityViolations, computeMigrationHash, contractHashAtMarker, contractSnapshotDir, contractSpaceFromJson, copyFilesWithRename, createAggregateContractSpace, createContractSpaceAggregate, createSnapshotContentVerifier, deleteRef, deriveProvidedInvariants, detectCycles, detectOrphans, detectScaffoldRuntime, emitContractSpaceArtifacts, errorContractDeserializationFailed, errorContractSnapshotHashMismatch, errorContractSnapshotMissing, errorDescriptorHeadHashMismatch, errorInvalidJson, errorInvalidRefName, errorNoInvariantPath, errorUnknownInvariant, findEdgeByDirName, findPath, findPathWithDecision, findPathWithInvariants, formatMigrationDirName, formatMigrationTs, gatherDiskContractSpaceState, hasMigrationTs, isDirectEntrypoint, isGraphNode, isInSpaceHistory, isLiveMarkerRef, isReservedContractRef, 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, spacesInApplyOrder, validateInvariantId, validateRefName, validateRefValue, verifyContractSpaces, verifyMigration, verifyMigrationHash, writeContractSnapshot, writeMigrationMetadata, writeMigrationOps, writeMigrationPackage, writeMigrationTs, writeRef };
@@ -11,7 +11,7 @@ import { n as isGraphNode, r as isInSpaceHistory, t as assertHashIsGraphNode } f
11
11
  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-qwvw4_dV-DNg_7WTD.mjs";
12
12
  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-DlfOyErc.mjs";
13
13
  import { a as findEdgeByDirName, c as parseContractRef, i as WORKING_CONTRACT_REF, l as parseMigrationRef, n as LIVE_MARKER_REF, o as isLiveMarkerRef, r as RESERVED_CONTRACT_REFS, s as isReservedContractRef, t as EMPTY_CONTRACT_REF } from "./ref-resolution-Be_zewf7.mjs";
14
- import { i as writeMigrationTs, n as hasMigrationTs, r as shebangLineFor, t as detectScaffoldRuntime } from "./migration-ts-FyF55c4M.mjs";
14
+ import { a as writeMigrationTs, i as shebangLineFor, n as formatMigrationTs, r as hasMigrationTs, t as detectScaffoldRuntime } from "./migration-ts-DDgjsR1O.mjs";
15
15
  import { i as isDirectEntrypoint, n as MigrationContractViews, r as buildMigrationArtifacts, t as Migration } from "./migration-oIynqb-J.mjs";
16
16
  import { t as ledgerOriginFromStored } from "./ledger-origin-D7PN4Fon.mjs";
17
- export { APP_SPACE_ID, EMPTY_CONTRACT_HASH, EMPTY_CONTRACT_REF, HEAD_REF_NAME, LIVE_MARKER_REF, Migration, MigrationContractViews, MigrationToolsError, RESERVED_CONTRACT_REFS, RESERVED_SPACE_SUBDIR_NAMES, SPACE_REFS_DIRNAME, WORKING_CONTRACT_REF, allStorageElementsExternal, assertDescriptorSelfConsistency, assertHashIsGraphNode, assertValidSpaceId, buildFabricatedMigrationEdge, buildMigrationArtifacts, collectAggregateNamespaces, computeExtensionSpaceApplyPath, computeIntegrityViolations, computeMigrationHash, contractHashAtMarker, contractSnapshotDir, contractSpaceFromJson, copyFilesWithRename, createAggregateContractSpace, createContractSpaceAggregate, createSnapshotContentVerifier, deleteRef, deriveProvidedInvariants, detectCycles, detectOrphans, detectScaffoldRuntime, emitContractSpaceArtifacts, errorContractDeserializationFailed, errorContractSnapshotHashMismatch, errorContractSnapshotMissing, errorDescriptorHeadHashMismatch, errorInvalidJson, errorInvalidRefName, errorNoInvariantPath, errorUnknownInvariant, findEdgeByDirName, findPath, findPathWithDecision, findPathWithInvariants, formatMigrationDirName, gatherDiskContractSpaceState, hasMigrationTs, isDirectEntrypoint, isGraphNode, isInSpaceHistory, isLiveMarkerRef, isReservedContractRef, 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, spacesInApplyOrder, validateInvariantId, validateRefName, validateRefValue, verifyContractSpaces, verifyMigration, verifyMigrationHash, writeContractSnapshot, writeMigrationMetadata, writeMigrationOps, writeMigrationPackage, writeMigrationTs, writeRef };
17
+ export { APP_SPACE_ID, EMPTY_CONTRACT_HASH, EMPTY_CONTRACT_REF, HEAD_REF_NAME, LIVE_MARKER_REF, Migration, MigrationContractViews, MigrationToolsError, RESERVED_CONTRACT_REFS, RESERVED_SPACE_SUBDIR_NAMES, SPACE_REFS_DIRNAME, WORKING_CONTRACT_REF, allStorageElementsExternal, assertDescriptorSelfConsistency, assertHashIsGraphNode, assertValidSpaceId, buildFabricatedMigrationEdge, buildMigrationArtifacts, collectAggregateNamespaces, computeExtensionSpaceApplyPath, computeIntegrityViolations, computeMigrationHash, contractHashAtMarker, contractSnapshotDir, contractSpaceFromJson, copyFilesWithRename, createAggregateContractSpace, createContractSpaceAggregate, createSnapshotContentVerifier, deleteRef, deriveProvidedInvariants, detectCycles, detectOrphans, detectScaffoldRuntime, emitContractSpaceArtifacts, errorContractDeserializationFailed, errorContractSnapshotHashMismatch, errorContractSnapshotMissing, errorDescriptorHeadHashMismatch, errorInvalidJson, errorInvalidRefName, errorNoInvariantPath, errorUnknownInvariant, findEdgeByDirName, findPath, findPathWithDecision, findPathWithInvariants, formatMigrationDirName, formatMigrationTs, gatherDiskContractSpaceState, hasMigrationTs, isDirectEntrypoint, isGraphNode, isInSpaceHistory, isLiveMarkerRef, isReservedContractRef, 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, spacesInApplyOrder, validateInvariantId, validateRefName, validateRefValue, verifyContractSpaces, verifyMigration, verifyMigrationHash, writeContractSnapshot, writeMigrationMetadata, writeMigrationOps, writeMigrationPackage, writeMigrationTs, writeRef };
@@ -1,2 +1,2 @@
1
- import { a as writeMigrationTs, i as shebangLineFor, n as detectScaffoldRuntime, r as hasMigrationTs, t as ScaffoldRuntime } from "./migration-ts-CNaAtK8C.mjs";
2
- export { type ScaffoldRuntime, detectScaffoldRuntime, hasMigrationTs, shebangLineFor, writeMigrationTs };
1
+ import { a as shebangLineFor, i as hasMigrationTs, n as detectScaffoldRuntime, o as writeMigrationTs, r as formatMigrationTs, t as ScaffoldRuntime } from "./migration-ts-SGer0PXq.mjs";
2
+ export { type ScaffoldRuntime, detectScaffoldRuntime, formatMigrationTs, hasMigrationTs, shebangLineFor, writeMigrationTs };
@@ -1,2 +1,2 @@
1
- import { i as writeMigrationTs, n as hasMigrationTs, r as shebangLineFor, t as detectScaffoldRuntime } from "./migration-ts-FyF55c4M.mjs";
2
- export { detectScaffoldRuntime, hasMigrationTs, shebangLineFor, writeMigrationTs };
1
+ import { a as writeMigrationTs, i as shebangLineFor, n as formatMigrationTs, r as hasMigrationTs, t as detectScaffoldRuntime } from "./migration-ts-DDgjsR1O.mjs";
2
+ export { detectScaffoldRuntime, formatMigrationTs, hasMigrationTs, shebangLineFor, writeMigrationTs };
@@ -27,11 +27,12 @@ const MIGRATION_TS_FILE = "migration.ts";
27
27
  * already does for generated `contract.d.ts`.
28
28
  */
29
29
  async function writeMigrationTs(packageDir, content) {
30
- const formatted = await formatMigrationTsSource(content);
30
+ const formatted = await formatMigrationTs(content);
31
31
  const isExecutable = formatted.startsWith("#!");
32
32
  await writeFile(join(packageDir, MIGRATION_TS_FILE), formatted, isExecutable ? { mode: 493 } : void 0);
33
33
  }
34
- async function formatMigrationTsSource(source) {
34
+ /** `source` as `writeMigrationTs` writes it: formatted by prettier. */
35
+ async function formatMigrationTs(source) {
35
36
  return format(source, {
36
37
  parser: "typescript",
37
38
  singleQuote: true,
@@ -62,6 +63,6 @@ function shebangLineFor(runtime) {
62
63
  }
63
64
  }
64
65
  //#endregion
65
- export { writeMigrationTs as i, hasMigrationTs as n, shebangLineFor as r, detectScaffoldRuntime as t };
66
+ export { writeMigrationTs as a, shebangLineFor as i, formatMigrationTs as n, hasMigrationTs as r, detectScaffoldRuntime as t };
66
67
 
67
- //# sourceMappingURL=migration-ts-FyF55c4M.mjs.map
68
+ //# sourceMappingURL=migration-ts-DDgjsR1O.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"migration-ts-DDgjsR1O.mjs","names":[],"sources":["../../../../1-framework/3-tooling/migration/dist/exports/migration-ts.mjs"],"sourcesContent":["import { join } from \"pathe\";\nimport { stat, writeFile } from \"node:fs/promises\";\nimport { format } from \"prettier\";\n//#region src/migration-ts.ts\n/**\n* Utilities for reading/writing `migration.ts` files.\n*\n* Rendering migration.ts source is the target's responsibility — the CLI\n* obtains source strings from a planner's `plan.renderTypeScript()`. The\n* helper here is limited to file I/O: writing the returned source with the\n* right executable bit and probing for existence.\n*/\nconst MIGRATION_TS_FILE = \"migration.ts\";\n/**\n* Writes a pre-rendered `migration.ts` source string to the given package\n* directory. If the source begins with a shebang, the file is written with\n* executable permissions (0o755) so it can be run directly via\n* `./migration.ts` — the rendered scaffold ends with\n* `MigrationCLI.run(import.meta.url, M)` from\n* `@internal/cli/migration-cli` (re-exported by the postgres facade),\n* which guards on the entrypoint and serializes when the file is the main\n* module.\n*\n* The source is run through prettier before writing so migration renderers\n* can produce structurally-correct but loosely-indented source and rely on\n* a single canonical format on disk. Matches what `@internal/emitter`\n* already does for generated `contract.d.ts`.\n*/\nasync function writeMigrationTs(packageDir, content) {\n\tconst formatted = await formatMigrationTs(content);\n\tconst isExecutable = formatted.startsWith(\"#!\");\n\tawait writeFile(join(packageDir, MIGRATION_TS_FILE), formatted, isExecutable ? { mode: 493 } : void 0);\n}\n/** `source` as `writeMigrationTs` writes it: formatted by prettier. */\nasync function formatMigrationTs(source) {\n\treturn format(source, {\n\t\tparser: \"typescript\",\n\t\tsingleQuote: true,\n\t\tsemi: true,\n\t\tprintWidth: 100\n\t});\n}\n/**\n* Checks whether a migration.ts file exists in the package directory.\n*/\nasync function hasMigrationTs(packageDir) {\n\ttry {\n\t\treturn (await stat(join(packageDir, MIGRATION_TS_FILE))).isFile();\n\t} catch {\n\t\treturn false;\n\t}\n}\n//#endregion\n//#region src/runtime-detection.ts\nfunction detectScaffoldRuntime() {\n\tif (typeof globalThis.Bun !== \"undefined\") return \"bun\";\n\tif (typeof globalThis.Deno !== \"undefined\") return \"deno\";\n\treturn \"node\";\n}\nfunction shebangLineFor(runtime) {\n\tswitch (runtime) {\n\t\tcase \"bun\": return \"#!/usr/bin/env -S bun\";\n\t\tcase \"deno\": return \"#!/usr/bin/env -S deno run -A\";\n\t\tcase \"node\": return \"#!/usr/bin/env -S node\";\n\t}\n}\n//#endregion\nexport { detectScaffoldRuntime, formatMigrationTs, hasMigrationTs, shebangLineFor, writeMigrationTs };\n\n//# sourceMappingURL=migration-ts.mjs.map"],"mappings":";;;;;;;;;;;;AAYA,MAAM,oBAAoB;;;;;;;;;;;;;;;;AAgB1B,eAAe,iBAAiB,YAAY,SAAS;CACpD,MAAM,YAAY,MAAM,kBAAkB,OAAO;CACjD,MAAM,eAAe,UAAU,WAAW,IAAI;CAC9C,MAAM,UAAU,KAAK,YAAY,iBAAiB,GAAG,WAAW,eAAe,EAAE,MAAM,IAAI,IAAI,KAAK,CAAC;AACtG;;AAEA,eAAe,kBAAkB,QAAQ;CACxC,OAAO,OAAO,QAAQ;EACrB,QAAQ;EACR,aAAa;EACb,MAAM;EACN,YAAY;CACb,CAAC;AACF;;;;AAIA,eAAe,eAAe,YAAY;CACzC,IAAI;EACH,QAAQ,MAAM,KAAK,KAAK,YAAY,iBAAiB,CAAC,EAAA,CAAG,OAAO;CACjE,QAAQ;EACP,OAAO;CACR;AACD;AAGA,SAAS,wBAAwB;CAChC,IAAI,OAAO,WAAW,QAAQ,aAAa,OAAO;CAClD,IAAI,OAAO,WAAW,SAAS,aAAa,OAAO;CACnD,OAAO;AACR;AACA,SAAS,eAAe,SAAS;CAChC,QAAQ,SAAR;EACC,KAAK,OAAO,OAAO;EACnB,KAAK,QAAQ,OAAO;EACpB,KAAK,QAAQ,OAAO;CACrB;AACD"}
@@ -24,6 +24,8 @@
24
24
  * already does for generated `contract.d.ts`.
25
25
  */
26
26
  declare function writeMigrationTs(packageDir: string, content: string): Promise<void>;
27
+ /** `source` as `writeMigrationTs` writes it: formatted by prettier. */
28
+ declare function formatMigrationTs(source: string): Promise<string>;
27
29
  /**
28
30
  * Checks whether a migration.ts file exists in the package directory.
29
31
  */
@@ -34,5 +36,5 @@ type ScaffoldRuntime = 'node' | 'bun' | 'deno';
34
36
  declare function detectScaffoldRuntime(): ScaffoldRuntime;
35
37
  declare function shebangLineFor(runtime: ScaffoldRuntime): string;
36
38
  //#endregion
37
- export { writeMigrationTs as a, shebangLineFor as i, detectScaffoldRuntime as n, hasMigrationTs as r, ScaffoldRuntime as t };
38
- //# sourceMappingURL=migration-ts-CNaAtK8C.d.mts.map
39
+ export { shebangLineFor as a, hasMigrationTs as i, detectScaffoldRuntime as n, writeMigrationTs as o, formatMigrationTs as r, ScaffoldRuntime as t };
40
+ //# sourceMappingURL=migration-ts-SGer0PXq.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"migration-ts-SGer0PXq.d.mts","names":[],"sources":["../../../../1-framework/3-tooling/migration/dist/exports/migration-ts.d.mts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;iBAwBiB,iBAAiB,oBAAoB,kBAAkB;;iBAEvD,kBAAkB,iBAAiB;;;;iBAInC,eAAe,qBAAqB;;;KAGhD;iBACY,yBAAyB;iBACzB,eAAe,SAAS"}
@@ -15,7 +15,7 @@ import { d as writeRef, i as readRefs, l as validateRefName, n as deleteRef, o a
15
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-DlfOyErc.mjs";
16
16
  import { c as internalImportRoot, o as importRootForDependencies, r as createImportSpecifierResolver, t as ImportRootError } from "./import-roots-B6vrm5bT.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-Be_zewf7.mjs";
18
- import { i as writeMigrationTs } from "./migration-ts-FyF55c4M.mjs";
18
+ import { a as writeMigrationTs } from "./migration-ts-DDgjsR1O.mjs";
19
19
  import { createRequire } from "node:module";
20
20
  import { ifDefined } from "@prisma/orm-framework/utils/defined";
21
21
  import { CliStructuredError } from "@prisma/orm-framework/errors/control";
@@ -5751,4 +5751,4 @@ async function executeRefListCommand(options) {
5751
5751
  //#endregion
5752
5752
  export { refuseUnknownInvariants as $, executeRefListCommand as A, loadContractSourceWithStack as B, executeDbUpdate as C, executeMigrationPlanCommand as D, executeMigrationNewCommand as E, listRefsByContractHash as F, migrationSpaceListEntriesFromAggregate as G, looksLikePath as H, liveMarkerUse as I, refuseContractSpaceIntegrity as J, preflightRefAdvancement as K, loadAggregateIntegrityViolations as L, findPackageByDirPath as M, formatSourceDiagnostic as N, executeRefAdvancement as O, hasMigrationPath as P, refusePackageCorruptionOnAggregate as Q, loadContractRawSafely as R, executeDbSign as S, executeMigrateShowPlan as T, mapContractAtError as U, loadContractSpaceAggregateForCli as V, mapIntegrityViolations as W, refuseMarkerOutsideGraph as X, refuseDeclaredExtensionTargetMismatch as Y, refuseMissingInvariantPath as Z, disposeEmitQueue as _, toDeclaredExtensionsFromRaw as _t, RECORDED_OR_EMPTY_CONTRACT_REF_FORMS as a, resolveMigrationRef as at, executeContractEmit as b, appliedHashesFromLedger as c, retryCommandFor as ct, buildReadAggregate as d, runMigrationList as dt, requireDatabaseForLiveMarkerUse as et, buildRefAdvancementFields as f, shellQuoted as ft, deriveStatusEdgeAnnotations as g, statusForMigrationHash as gt, createControlClient as h, statementFlag as ht, RECORDED_CONTRACT_REF_FORMS as i, resolveFromForPlan as it, executeRefSetCommand as j, executeRefDeleteCommand as k, buildContractSpaceAggregate as l, runContractSpaceSeedPhase as lt, computeRefAdvancementName as m, sourceWarningDiagnostic as mt, DB_UPDATE_POLICY as n, resolveContractRef$1 as nt, advanceRefSafely as o, resolveStatements as ot, checkSingleTarget as p, snapshotVerifierFor as pt, readMigrationRefs as q, NO_REF_ADVANCEMENT as r, resolveContractRefToSnapshot as rt, appContractStandInFromIdentity as s, resolveToForPlan as st, ALL_CONTRACT_REF_FORMS as t, resolveAppTargetPath as tt, buildMigrationSpaceGraphEntries as u, runMigrationCheck as ut, enrichContract as v, validateLoadedContract as vt, executeDbVerify as w, executeDbInit as x, enumerateCheckSpaces as y, loadContractSource as z };
5753
5753
 
5754
- //# sourceMappingURL=ref-Cc_CTagE-D_HDIWdx.mjs.map
5754
+ //# sourceMappingURL=ref-Cc_CTagE-BYkEh32b.mjs.map