@prisma/orm-toolchain 8.0.0-rc.3-dev.7 → 8.0.0-rc.3-dev.8
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-CPZB020V.mjs → aggregate-BOlLu7k7.mjs} +8 -8
- package/dist/{aggregate-CPZB020V.mjs.map → aggregate-BOlLu7k7.mjs.map} +1 -1
- package/dist/cli-telemetry.d.mts +2 -2
- package/dist/cli-telemetry.mjs +9 -12
- package/dist/cli-telemetry.mjs.map +1 -1
- package/dist/cli.d.mts +1 -5
- package/dist/cli.d.mts.map +1 -1
- package/dist/cli.mjs +117 -58
- package/dist/cli.mjs.map +1 -1
- package/dist/cli__control-api.d.mts +3 -3
- package/dist/cli__control-api.d.mts.map +1 -1
- package/dist/cli__control-api.mjs +1 -1
- package/dist/cli__control-api__testing.d.mts +1 -1
- package/dist/cli__migration-cli.mjs +5 -5
- package/dist/cli__migration-cli.mjs.map +1 -1
- package/dist/config-loader.d.mts +1 -1
- package/dist/config-loader.mjs +1 -1
- package/dist/{contract-snapshot-store-B0G1Fw_F-CHc4QfKb.mjs → contract-snapshot-store-BAmQkHe5-BJFpuIQQ.mjs} +3 -3
- package/dist/{contract-snapshot-store-B0G1Fw_F-CHc4QfKb.mjs.map → contract-snapshot-store-BAmQkHe5-BJFpuIQQ.mjs.map} +1 -1
- package/dist/{db-verify-BwgNK50T-DGvKgFCK.d.mts → db-verify-BRDzImLV-3eI346zy.d.mts} +3 -3
- package/dist/{db-verify-BwgNK50T-DGvKgFCK.d.mts.map → db-verify-BRDzImLV-3eI346zy.d.mts.map} +1 -1
- package/dist/emitter.mjs +1 -1
- package/dist/{errors-CXbGUWGu-CstQHPh6.mjs → errors-CcEpbfnE-CsSXrttT.mjs} +6 -6
- package/dist/errors-CcEpbfnE-CsSXrttT.mjs.map +1 -0
- package/dist/{exports-DLDFkjNv.mjs → exports-CN1Qe98l.mjs} +3 -3
- package/dist/{exports-DLDFkjNv.mjs.map → exports-CN1Qe98l.mjs.map} +1 -1
- package/dist/{exports-UjssmDwy.mjs → exports-Cv8nMmBT.mjs} +15 -51
- package/dist/exports-Cv8nMmBT.mjs.map +1 -0
- package/dist/{exports-BCLg4CiV-05kuwcb0.mjs → exports-Dw2WIX63-CQgI2e_L.mjs} +6 -6
- package/dist/exports-Dw2WIX63-CQgI2e_L.mjs.map +1 -0
- package/dist/{graph-membership-BViWUMpP-C4lYYJdU.mjs → graph-membership-BoITerZB-C2-x1Qp6.mjs} +3 -3
- package/dist/{graph-membership-BViWUMpP-C4lYYJdU.mjs.map → graph-membership-BoITerZB-C2-x1Qp6.mjs.map} +1 -1
- package/dist/{import-roots-CfoYgejL.d.mts → import-roots-ARK1wjzc.d.mts} +3 -3
- package/dist/{import-roots-CfoYgejL.d.mts.map → import-roots-ARK1wjzc.d.mts.map} +1 -1
- package/dist/{import-roots-CNFBPAT1.mjs → import-roots-D0H8HuRw.mjs} +3 -3
- package/dist/import-roots-D0H8HuRw.mjs.map +1 -0
- package/dist/{index-BRjNSwL-.d.mts → index-u5RdrumF.d.mts} +2 -10
- package/dist/index-u5RdrumF.d.mts.map +1 -0
- package/dist/{invariants-CTHy88OP-CYI2a8IO.mjs → invariants-DcFfhJMZ-BHDWZP9k.mjs} +3 -3
- package/dist/{invariants-CTHy88OP-CYI2a8IO.mjs.map → invariants-DcFfhJMZ-BHDWZP9k.mjs.map} +1 -1
- package/dist/{io-635GlNx1-D3zrw2qu.mjs → io-DsViRB_O-Ci1kJGBg.mjs} +5 -5
- package/dist/{io-635GlNx1-D3zrw2qu.mjs.map → io-DsViRB_O-Ci1kJGBg.mjs.map} +1 -1
- package/dist/{migration-BB4LDjuS.mjs → migration-CWSj4pMr.mjs} +3 -3
- package/dist/{migration-BB4LDjuS.mjs.map → migration-CWSj4pMr.mjs.map} +1 -1
- package/dist/{migration-graph-_SJImD5V-BURyY1KM.mjs → migration-graph-DwXAHP6T-NgmP2DNz.mjs} +3 -3
- package/dist/{migration-graph-_SJImD5V-BURyY1KM.mjs.map → migration-graph-DwXAHP6T-NgmP2DNz.mjs.map} +1 -1
- package/dist/migration-tools.d.mts +1 -1
- package/dist/migration-tools.mjs +12 -12
- package/dist/migration-tools__aggregate.mjs +1 -1
- package/dist/migration-tools__contract-snapshot-store.mjs +1 -1
- package/dist/migration-tools__errors.mjs +1 -1
- package/dist/migration-tools__invariants.mjs +1 -1
- package/dist/migration-tools__io.mjs +1 -1
- package/dist/migration-tools__migration-graph.mjs +2 -2
- package/dist/migration-tools__migration.mjs +1 -1
- package/dist/migration-tools__ref-resolution.mjs +1 -1
- package/dist/migration-tools__refs.mjs +1 -1
- package/dist/migration-tools__spaces.d.mts +1 -1
- package/dist/migration-tools__spaces.mjs +2 -2
- package/dist/publish-surface.d.mts +1 -1
- package/dist/publish-surface.mjs +1 -1
- package/dist/publish-surface__import-roots.d.mts +1 -1
- package/dist/publish-surface__import-roots.mjs +1 -1
- package/dist/quick-reference-postgres.md +1 -1
- package/dist/{ref-BSRf-7Uh-JmET-ptm.mjs → ref-dWFulULw-TMeX1ZM1.mjs} +16 -16
- package/dist/ref-dWFulULw-TMeX1ZM1.mjs.map +1 -0
- package/dist/{ref-resolution-HeNBXW53.mjs → ref-resolution-Cbdejrwt.mjs} +2 -2
- package/dist/{ref-resolution-HeNBXW53.mjs.map → ref-resolution-Cbdejrwt.mjs.map} +1 -1
- package/dist/{refs-WK86uYYp-gM8tvWQP.mjs → refs-KVVlm3lE-BcqdpdYD.mjs} +6 -6
- package/dist/refs-KVVlm3lE-BcqdpdYD.mjs.map +1 -0
- package/dist/{spaces-Dj65JrwZ.d.mts → spaces-B20bgxF9.d.mts} +2 -2
- package/dist/{spaces-Dj65JrwZ.d.mts.map → spaces-B20bgxF9.d.mts.map} +1 -1
- package/dist/{spaces-4qMOAYE9.mjs → spaces-CHrjWRoZ.mjs} +7 -7
- package/dist/spaces-CHrjWRoZ.mjs.map +1 -0
- package/dist/{verify-contract-spaces-DhJTb0zM-B62maCfE.mjs → verify-contract-spaces-DomK5uP5-CyI3hD3Q.mjs} +7 -7
- package/dist/{verify-contract-spaces-DhJTb0zM-B62maCfE.mjs.map → verify-contract-spaces-DomK5uP5-CyI3hD3Q.mjs.map} +1 -1
- package/dist/vite-plugin-contract-emit.mjs +3 -3
- package/package.json +12 -12
- package/dist/errors-CXbGUWGu-CstQHPh6.mjs.map +0 -1
- package/dist/exports-BCLg4CiV-05kuwcb0.mjs.map +0 -1
- package/dist/exports-UjssmDwy.mjs.map +0 -1
- package/dist/import-roots-CNFBPAT1.mjs.map +0 -1
- package/dist/index-BRjNSwL-.d.mts.map +0 -1
- package/dist/ref-BSRf-7Uh-JmET-ptm.mjs.map +0 -1
- package/dist/refs-WK86uYYp-gM8tvWQP.mjs.map +0 -1
- package/dist/spaces-4qMOAYE9.mjs.map +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"refs-WK86uYYp-gM8tvWQP.mjs","names":[],"sources":["../../../../1-framework/3-tooling/migration/dist/refs-WK86uYYp.mjs"],"sourcesContent":["import { b as errorInvalidRefName, t as MigrationToolsError, x as errorInvalidRefValue, y as errorInvalidRefFile } from \"./errors-CXbGUWGu.mjs\";\nimport { dirname, join, relative } from \"pathe\";\nimport { mkdir, readFile, readdir, rename, rmdir, unlink, writeFile } from \"node:fs/promises\";\nimport { type } from \"arktype\";\n//#region src/refs.ts\n/**\n* The system head ref lives at `refs/head.json`. It is read (and its\n* corruption judged) through `readContractSpaceHeadRef`, not as a\n* user-authored ref, so {@link readRefsTolerant} excludes it.\n*/\nconst HEAD_REF_NAME = \"head\";\nconst REF_NAME_PATTERN = /^[a-z0-9]([a-z0-9-]*[a-z0-9])?(\\/[a-z0-9]([a-z0-9-]*[a-z0-9])?)*$/;\nconst REF_VALUE_PATTERN = /^(empty|[0-9a-f]{64})$/;\nfunction validateRefName(name) {\n\tif (name.length === 0) return false;\n\tif (name.includes(\"..\")) return false;\n\tif (name.includes(\"//\")) return false;\n\tif (name.startsWith(\".\")) return false;\n\treturn REF_NAME_PATTERN.test(name);\n}\nfunction validateRefValue(value) {\n\treturn REF_VALUE_PATTERN.test(value);\n}\nconst RefEntrySchema = type({\n\thash: \"string\",\n\tinvariants: \"string[]\"\n}).narrow((entry, ctx) => {\n\tif (!validateRefValue(entry.hash)) return ctx.mustBe(`a valid contract hash (got \"${entry.hash}\")`);\n\treturn true;\n});\nfunction refFilePath(refsDir, name) {\n\treturn join(refsDir, `${name}.json`);\n}\nfunction refNameFromPath(refsDir, filePath) {\n\treturn relative(refsDir, filePath).replace(/\\.json$/, \"\");\n}\nasync function readRef(refsDir, name) {\n\tif (!validateRefName(name)) throw errorInvalidRefName(name);\n\tconst filePath = refFilePath(refsDir, name);\n\tlet raw;\n\ttry {\n\t\traw = await readFile(filePath, \"utf-8\");\n\t} catch (error) {\n\t\tif (error instanceof Error && error.code === \"ENOENT\") throw new MigrationToolsError(\"MIGRATION.UNKNOWN_REF\", `Unknown ref \"${name}\"`, {\n\t\t\twhy: `No ref file found at \"${filePath}\".`,\n\t\t\tfix: `Create the ref with: prisma-next ref set ${name} <hash>`,\n\t\t\tnextActions: [{\n\t\t\t\tkind: \"run-command\",\n\t\t\t\tlabel: `Create the ref \"${name}\"`,\n\t\t\t\tcommand: `{bin} ref set ${name} <hash>`\n\t\t\t}],\n\t\t\tmeta: {\n\t\t\t\trefName: name,\n\t\t\t\tfilePath\n\t\t\t}\n\t\t});\n\t\tthrow error;\n\t}\n\tlet parsed;\n\ttry {\n\t\tparsed = JSON.parse(raw);\n\t} catch {\n\t\tthrow errorInvalidRefFile(filePath, \"Failed to parse as JSON\");\n\t}\n\tconst result = RefEntrySchema(parsed);\n\tif (result instanceof type.errors) throw errorInvalidRefFile(filePath, result.summary);\n\treturn result;\n}\nasync function readRefs(refsDir) {\n\tlet entries;\n\ttry {\n\t\tentries = await readdir(refsDir, {\n\t\t\trecursive: true,\n\t\t\tencoding: \"utf-8\"\n\t\t});\n\t} catch (error) {\n\t\tif (error instanceof Error && error.code === \"ENOENT\") return {};\n\t\tthrow error;\n\t}\n\tconst jsonFiles = entries.filter((entry) => entry.endsWith(\".json\") && !entry.endsWith(\".contract.json\"));\n\tconst refs = {};\n\tfor (const jsonFile of jsonFiles) {\n\t\tconst filePath = join(refsDir, jsonFile);\n\t\tconst name = refNameFromPath(refsDir, filePath);\n\t\tlet raw;\n\t\ttry {\n\t\t\traw = await readFile(filePath, \"utf-8\");\n\t\t} catch (error) {\n\t\t\tconst code = error instanceof Error ? error.code : void 0;\n\t\t\tif (code === \"ENOENT\" || code === \"EISDIR\") continue;\n\t\t\tthrow error;\n\t\t}\n\t\tlet parsed;\n\t\ttry {\n\t\t\tparsed = JSON.parse(raw);\n\t\t} catch {\n\t\t\tthrow errorInvalidRefFile(filePath, \"Failed to parse as JSON\");\n\t\t}\n\t\tconst result = RefEntrySchema(parsed);\n\t\tif (result instanceof type.errors) throw errorInvalidRefFile(filePath, result.summary);\n\t\trefs[name] = result;\n\t}\n\treturn refs;\n}\n/**\n* Read a space's user-authored refs without ever throwing on disk\n* content. A ref whose JSON is unparseable or whose shape fails\n* {@link RefEntrySchema} is omitted from `refs` and reported as a\n* {@link RefLoadProblem}; the remaining well-formed refs are still\n* returned. A missing `refs/` directory yields no refs and no problems.\n*\n* `refs/head.json` is deliberately skipped here: the system head ref is\n* read through `readContractSpaceHeadRef` (which validates head-ref\n* shape, distinct from the strict user-ref hash grammar), so it is judged\n* there and never doubles as a user ref. Genuine I/O faults (EACCES, EIO,\n* …) still propagate — only parse / schema problems are made tolerant.\n*/\nasync function readRefsTolerant(refsDir) {\n\tlet entries;\n\ttry {\n\t\tentries = await readdir(refsDir, {\n\t\t\trecursive: true,\n\t\t\tencoding: \"utf-8\"\n\t\t});\n\t} catch (error) {\n\t\tif (error instanceof Error && error.code === \"ENOENT\") return {\n\t\t\trefs: {},\n\t\t\tproblems: []\n\t\t};\n\t\tthrow error;\n\t}\n\tconst jsonFiles = entries.filter((entry) => entry.endsWith(\".json\") && !entry.endsWith(\".contract.json\") && entry !== `head.json`);\n\tconst refs = {};\n\tconst problems = [];\n\tfor (const jsonFile of jsonFiles) {\n\t\tconst filePath = join(refsDir, jsonFile);\n\t\tconst name = refNameFromPath(refsDir, filePath);\n\t\tlet raw;\n\t\ttry {\n\t\t\traw = await readFile(filePath, \"utf-8\");\n\t\t} catch (error) {\n\t\t\tconst code = error instanceof Error ? error.code : void 0;\n\t\t\tif (code === \"ENOENT\" || code === \"EISDIR\") continue;\n\t\t\tthrow error;\n\t\t}\n\t\tlet parsed;\n\t\ttry {\n\t\t\tparsed = JSON.parse(raw);\n\t\t} catch (e) {\n\t\t\tproblems.push({\n\t\t\t\trefName: name,\n\t\t\t\tdetail: e instanceof Error ? e.message : String(e)\n\t\t\t});\n\t\t\tcontinue;\n\t\t}\n\t\tconst result = RefEntrySchema(parsed);\n\t\tif (result instanceof type.errors) {\n\t\t\tproblems.push({\n\t\t\t\trefName: name,\n\t\t\t\tdetail: result.summary\n\t\t\t});\n\t\t\tcontinue;\n\t\t}\n\t\trefs[name] = result;\n\t}\n\treturn {\n\t\trefs,\n\t\tproblems\n\t};\n}\nasync function writeRef(refsDir, name, entry) {\n\tif (!validateRefName(name)) throw errorInvalidRefName(name);\n\tif (!validateRefValue(entry.hash)) throw errorInvalidRefValue(entry.hash);\n\tconst filePath = refFilePath(refsDir, name);\n\tconst dir = dirname(filePath);\n\tawait mkdir(dir, { recursive: true });\n\tconst tmpPath = join(dir, `.${name.split(\"/\").pop()}.json.${Date.now()}.tmp`);\n\tawait writeFile(tmpPath, `${JSON.stringify({\n\t\thash: entry.hash,\n\t\tinvariants: [...entry.invariants]\n\t}, null, 2)}\\n`);\n\tawait rename(tmpPath, filePath);\n}\nasync function deleteRef(refsDir, name) {\n\tif (!validateRefName(name)) throw errorInvalidRefName(name);\n\tconst filePath = refFilePath(refsDir, name);\n\ttry {\n\t\tawait unlink(filePath);\n\t} catch (error) {\n\t\tif (error instanceof Error && error.code === \"ENOENT\") throw new MigrationToolsError(\"MIGRATION.UNKNOWN_REF\", `Unknown ref \"${name}\"`, {\n\t\t\twhy: `No ref file found at \"${filePath}\".`,\n\t\t\tfix: \"Run `prisma-next ref list` to see available refs.\",\n\t\t\tnextActions: [{\n\t\t\t\tkind: \"run-command\",\n\t\t\t\tlabel: \"List the available refs\",\n\t\t\t\tcommand: \"{bin} ref list\"\n\t\t\t}],\n\t\t\tmeta: {\n\t\t\t\trefName: name,\n\t\t\t\tfilePath\n\t\t\t}\n\t\t});\n\t\tthrow error;\n\t}\n\tlet dir = dirname(filePath);\n\twhile (dir !== refsDir && dir.startsWith(refsDir)) try {\n\t\tawait rmdir(dir);\n\t\tdir = dirname(dir);\n\t} catch (error) {\n\t\tconst code = error instanceof Error ? error.code : void 0;\n\t\tif (code === \"ENOTEMPTY\" || code === \"EEXIST\" || code === \"ENOENT\") break;\n\t\tthrow error;\n\t}\n}\n/**\n* Index user-authored refs by the contract hash each ref points at.\n* Each bucket is sorted lex-asc for deterministic output.\n*/\nfunction refsByContractHash(refs) {\n\tconst byHash = /* @__PURE__ */ new Map();\n\tfor (const [name, entry] of Object.entries(refs)) {\n\t\tconst bucket = byHash.get(entry.hash);\n\t\tif (bucket) bucket.push(name);\n\t\telse byHash.set(entry.hash, [name]);\n\t}\n\tfor (const bucket of byHash.values()) bucket.sort();\n\treturn byHash;\n}\n/**\n* Read `migrations/<space>/refs/*.json` and index by destination hash.\n* Returns an empty map when the refs directory does not exist.\n*/\nasync function resolveRefsByContractHash(refsDir) {\n\treturn refsByContractHash(await readRefs(refsDir));\n}\nfunction resolveRef(refs, name) {\n\tif (!validateRefName(name)) throw errorInvalidRefName(name);\n\tif (!Object.hasOwn(refs, name)) throw new MigrationToolsError(\"MIGRATION.UNKNOWN_REF\", `Unknown ref \"${name}\"`, {\n\t\twhy: `No ref named \"${name}\" exists.`,\n\t\tfix: `Available refs: ${Object.keys(refs).join(\", \") || \"(none)\"}. Create a ref with: prisma-next ref set ${name} <hash>`,\n\t\tnextActions: [{\n\t\t\tkind: \"run-command\",\n\t\t\tlabel: `Create the ref \"${name}\"`,\n\t\t\tcommand: `{bin} ref set ${name} <hash>`,\n\t\t\treason: `Available refs: ${Object.keys(refs).join(\", \") || \"(none)\"}.`\n\t\t}],\n\t\tmeta: {\n\t\t\trefName: name,\n\t\t\tavailableRefs: Object.keys(refs)\n\t\t}\n\t});\n\treturn refs[name];\n}\n//#endregion\nexport { readRefsTolerant as a, resolveRefsByContractHash as c, writeRef as d, readRefs as i, validateRefName as l, deleteRef as n, refsByContractHash as o, readRef as r, resolveRef as s, HEAD_REF_NAME as t, validateRefValue as u };\n\n//# sourceMappingURL=refs-WK86uYYp.mjs.map"],"mappings":";;;;;;;;;;AAUA,MAAM,gBAAgB;AACtB,MAAM,mBAAmB;AACzB,MAAM,oBAAoB;AAC1B,SAAS,gBAAgB,MAAM;CAC9B,IAAI,KAAK,WAAW,GAAG,OAAO;CAC9B,IAAI,KAAK,SAAS,IAAI,GAAG,OAAO;CAChC,IAAI,KAAK,SAAS,IAAI,GAAG,OAAO;CAChC,IAAI,KAAK,WAAW,GAAG,GAAG,OAAO;CACjC,OAAO,iBAAiB,KAAK,IAAI;AAClC;AACA,SAAS,iBAAiB,OAAO;CAChC,OAAO,kBAAkB,KAAK,KAAK;AACpC;AACA,MAAM,iBAAiB,KAAK;CAC3B,MAAM;CACN,YAAY;AACb,CAAC,CAAC,CAAC,QAAQ,OAAO,QAAQ;CACzB,IAAI,CAAC,iBAAiB,MAAM,IAAI,GAAG,OAAO,IAAI,OAAO,+BAA+B,MAAM,KAAK,GAAG;CAClG,OAAO;AACR,CAAC;AACD,SAAS,YAAY,SAAS,MAAM;CACnC,OAAO,KAAK,SAAS,GAAG,KAAK,MAAM;AACpC;AACA,SAAS,gBAAgB,SAAS,UAAU;CAC3C,OAAO,SAAS,SAAS,QAAQ,CAAC,CAAC,QAAQ,WAAW,EAAE;AACzD;AACA,eAAe,QAAQ,SAAS,MAAM;CACrC,IA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/dist/exports/spaces.mjs"],"sourcesContent":["import { f as errorDuplicateSpaceId, l as errorDescriptorHeadHashMismatch } from \"../errors-CXbGUWGu.mjs\";\nimport { o as writeContractSnapshot } from \"../contract-snapshot-store-B0G1Fw_F.mjs\";\nimport { s as readMigrationsDir } from \"../io-635GlNx1.mjs\";\nimport \"../constants-CM-w38DQ.mjs\";\nimport { l as reconstructGraph, o as findPathWithDecision } from \"../migration-graph-_SJImD5V.mjs\";\nimport { a as RESERVED_SPACE_SUBDIR_NAMES, c as isValidSpaceId, i as APP_SPACE_ID, l as spaceMigrationDirectory, n as verifyContractSpaces, o as SPACE_REFS_DIRNAME, r as readContractSpaceHeadRef, s as assertValidSpaceId, t as listContractSpaceDirectories, u as spaceRefsDirectory } from \"../verify-contract-spaces-DhJTb0zM.mjs\";\nimport { ifDefined } from \"@internal/utils/defined\";\nimport { join } from \"pathe\";\nimport { mkdir, writeFile } from \"node:fs/promises\";\nimport { canonicalizeJson } from \"@internal/framework-components/utils\";\nimport { InternalError } from \"@internal/utils/internal-error\";\nimport { computeStorageHash } from \"@internal/contract/hashing\";\n//#region src/assert-descriptor-self-consistency.ts\n/**\n* Assert that an extension descriptor is self-consistent: the\n* `headRef.hash` it publishes must match the canonical hash recomputed\n* from its `contractSpace.contractJson`.\n*\n* Recomputes via {@link computeStorageHash} — the same canonical-JSON\n* pipeline the descriptor's own emit pipeline produced the hash with —\n* over `(target, targetFamily, storage)`. Mismatch indicates the\n* extension author bumped `contractJson` without rerunning emit, leaving\n* the descriptor's `headRef.hash` stale; the consumer-side helpers\n* (drift detection, on-disk artefact emission, runner marker writes) all\n* trust `headRef.hash` as the canonical identity, so a stale value would\n* silently corrupt every downstream boundary.\n*\n* Synchronous, pure, no I/O. Throws\n* `MIGRATION.DESCRIPTOR_HEAD_HASH_MISMATCH` on failure with both the\n* recomputed and published hashes in `meta` so callers can surface a\n* clear remediation hint without re-deriving them.\n*/\nfunction assertDescriptorSelfConsistency(inputs) {\n\tconst { storageHash: _stripped, ...storageWithoutHash } = inputs.storage;\n\tconst recomputed = computeStorageHash({\n\t\ttarget: inputs.target,\n\t\ttargetFamily: inputs.targetFamily,\n\t\tstorage: storageWithoutHash,\n\t\t...ifDefined(\"shouldPreserveEmpty\", inputs.shouldPreserveEmpty),\n\t\t...ifDefined(\"sortStorage\", inputs.sortStorage)\n\t});\n\tif (recomputed !== inputs.headRefHash) throw errorDescriptorHeadHashMismatch({\n\t\textensionId: inputs.extensionId,\n\t\trecomputedHash: recomputed,\n\t\theadRefHash: inputs.headRefHash\n\t});\n}\n//#endregion\n//#region src/compute-extension-space-apply-path.ts\n/**\n* Compute the apply path for an extension contract space — the shortest\n* sequence of on-disk migration packages that walks the live marker\n* forward to the on-disk head ref hash, covering every required\n* invariant.\n*\n* Reads only on-disk artifacts (`migrations/<spaceId>/refs/head.json`\n* and the per-space migration packages). **Does not import any\n* extension descriptor module** — `db init` / `db update` must remain\n* runnable without the descriptor source on disk.\n*\n* Behaviour:\n* - Returns `{ kind: 'ok', pathOps: [], … }` when the marker is already\n* at the recorded head and no required invariants are missing.\n* - Returns `{ kind: 'unreachable' }` when the marker hash is not\n* structurally connected to the recorded head in the graph.\n* - Returns `{ kind: 'unsatisfiable', missing, … }` when the marker is\n* reachable but no path covers the required invariants.\n* - Returns `{ kind: 'contractSpaceHeadRefMissing' }` when the per-space\n* `refs/head.json` is absent — the precheck verifier should already\n* have rejected this case, but the helper is defensive so callers can\n* surface a coherent error rather than throw.\n*/\nasync function computeExtensionSpaceApplyPath(inputs) {\n\tconst { projectMigrationsDir, spaceId, currentMarkerHash, currentMarkerInvariants } = inputs;\n\tconst contractSpaceHeadRef = await readContractSpaceHeadRef(projectMigrationsDir, spaceId);\n\tif (contractSpaceHeadRef === null) return { kind: \"contractSpaceHeadRefMissing\" };\n\tconst { packages } = await readMigrationsDir(spaceMigrationDirectory(projectMigrationsDir, spaceId), { migrationsDir: projectMigrationsDir });\n\tconst graph = reconstructGraph(packages);\n\tconst fromHash = currentMarkerHash ?? \"empty\";\n\tconst required = new Set(contractSpaceHeadRef.invariants.filter((id) => !currentMarkerInvariants.includes(id)));\n\tconst outcome = findPathWithDecision(graph, fromHash, contractSpaceHeadRef.hash, { required });\n\tif (outcome.kind === \"unreachable\") return {\n\t\tkind: \"unreachable\",\n\t\tcontractSpaceHeadRef\n\t};\n\tif (outcome.kind === \"unsatisfiable\") return {\n\t\tkind: \"unsatisfiable\",\n\t\tcontractSpaceHeadRef,\n\t\tmissing: outcome.missing,\n\t\tstructuralPath: outcome.structuralPath.map(({ dirName, to }) => ({\n\t\t\tdirName,\n\t\t\tto\n\t\t}))\n\t};\n\tconst packagesByHash = new Map(packages.map((pkg) => [pkg.metadata.migrationHash, pkg]));\n\tconst pathOps = [];\n\tconst walkedMigrationDirs = [];\n\tconst providedInvariantsSet = /* @__PURE__ */ new Set();\n\tfor (const edge of outcome.decision.selectedPath) {\n\t\tconst pkg = packagesByHash.get(edge.migrationHash);\n\t\tif (!pkg) throw new InternalError(`Migration package missing for edge ${edge.migrationHash} in space \"${spaceId}\"`);\n\t\twalkedMigrationDirs.push(pkg.dirName);\n\t\tfor (const op of pkg.ops) pathOps.push(op);\n\t\tfor (const invariant of pkg.metadata.providedInvariants) providedInvariantsSet.add(invariant);\n\t}\n\treturn {\n\t\tkind: \"ok\",\n\t\tcontractSpaceHeadRef,\n\t\tprovidedInvariants: [...providedInvariantsSet].sort(),\n\t\tpathOps,\n\t\twalkedMigrationDirs\n\t};\n}\n//#endregion\n//#region src/contract-space-from-json.ts\n/**\n* Materialise a typed {@link ContractSpace} from the JSON artefacts a\n* contract-space extension package emits to disk.\n*\n* Extension descriptors wire `contract.json`, per-migration\n* `migration.json` / `ops.json`, and `refs/head.json` to the framework's\n* typed surfaces. TypeScript widens JSON imports to a structural record\n* that does not preserve readonly modifiers or branded scalars (e.g.\n* `StorageHashBase<'abc123...'>`), so authoring the descriptor inline\n* forces every wiring site to cast through `unknown`. This helper\n* encapsulates the single narrowing point: descriptor sources stay\n* cast-free, and the (necessary) coercion is colocated with the\n* documentation explaining why it is safe.\n*\n* Safety: the JSON files passed here are produced by the framework's own\n* emit pipeline (`prisma-next contract emit` and `MigrationCLI.run`)\n* and re-validated downstream by the runner / verifier. The descriptor\n* is a pass-through wiring layer — no descriptor consumer treats the\n* narrowed types as a stronger guarantee than \"these came from the\n* canonical emit pipeline\".\n*\n* The helper does not introspect or schema-validate the inputs; runtime\n* validation is the responsibility of `family.deserializeContract`\n* (codec-aware, invoked at control-stack construction) and the\n* per-migration `readMigrationPackage` reader used when loading\n* from disk. JSON-imported packages flow through the descriptor without\n* a disk read, so the equivalent runtime guarantee comes from the emit\n* pipeline that produced the JSON in the first place.\n*/\nfunction contractSpaceFromJson(inputs) {\n\tconst migrations = inputs.migrations.map((m) => ({\n\t\tdirName: m.dirName,\n\t\tmetadata: m.metadata,\n\t\tops: m.ops\n\t}));\n\treturn {\n\t\tcontractJson: inputs.contractJson,\n\t\tmigrations,\n\t\theadRef: inputs.headRef\n\t};\n}\n//#endregion\n//#region src/emit-contract-space-artifacts.ts\n/**\n* Emit the per-space artifacts — the head contract snapshot (written into\n* the migrations-root-wide `snapshots/` store, keyed by `headRef.hash`) and\n* `refs/head.json` — under `<projectMigrationsDir>/<spaceId>/`.\n*\n* The head contract snapshot is write-if-absent (see\n* {@link writeContractSnapshot}): a changed extension contract has a new\n* hash, so it lands as a new store entry; an unchanged hash means identical\n* canonical content already sits there. `refs/head.json` stays\n* always-overwrite: the framework owns it, so running `migrate` twice with\n* the same inputs is a no-op observably (idempotent), but the helper does\n* not check pre-existing contents — re-emit always wins.\n*\n* Path layout matches the convention in\n* [`spaceMigrationDirectory`](./space-layout.ts). The space id is\n* validated against `[a-z][a-z0-9_-]{0,63}` via\n* {@link assertValidSpaceId} for filesystem-safety reasons; the helper\n* accepts every space uniformly (including the app space, default\n* `'app'`).\n*\n* The migrations directory and space subdirectory are created if they\n* do not yet exist (`mkdir { recursive: true }`).\n*/\nasync function emitContractSpaceArtifacts(projectMigrationsDir, spaceId, inputs) {\n\tassertValidSpaceId(spaceId);\n\tconst refsDir = spaceRefsDirectory(join(projectMigrationsDir, spaceId));\n\tawait mkdir(refsDir, { recursive: true });\n\tawait writeContractSnapshot(projectMigrationsDir, inputs.headRef.hash, {\n\t\tcontractJson: inputs.contract,\n\t\tcontractDts: inputs.contractDts\n\t});\n\tconst sortedInvariants = [...inputs.headRef.invariants].sort();\n\tconst headJson = canonicalizeJson({\n\t\thash: inputs.headRef.hash,\n\t\tinvariants: sortedInvariants\n\t});\n\tawait writeFile(join(refsDir, \"head.json\"), `${headJson}\\n`);\n}\n//#endregion\n//#region src/gather-disk-contract-space-state.ts\n/**\n* Read the on-disk state the per-space verifier needs:\n*\n* - The list of contract-space directories under\n* `<projectMigrationsDir>/` (via\n* {@link import('./verify-contract-spaces').listContractSpaceDirectories}).\n* - The on-disk head ref `(hash, invariants)` for each declared extension space\n* (via {@link readContractSpaceHeadRef}; missing on-disk artefacts are simply\n* omitted — the verifier reports them as `declaredButUnmigrated`).\n*\n* Synchronous in spirit but async due to filesystem reads. Reads only\n* the user's repo. **Does not import any extension descriptor module.**\n*\n* Composition convention: pure target-agnostic primitive in\n* `1-framework`; the SQL family (and any future target family) wires\n* it into its `dbInit` / `verify` flows alongside its own marker-row\n* read before invoking `verifyContractSpaces`.\n*/\nasync function gatherDiskContractSpaceState(args) {\n\tconst { projectMigrationsDir, loadedSpaceIds } = args;\n\tconst spaceDirsOnDisk = await listContractSpaceDirectories(projectMigrationsDir);\n\tconst headRefsBySpace = /* @__PURE__ */ new Map();\n\tfor (const spaceId of loadedSpaceIds) {\n\t\tif (spaceId === APP_SPACE_ID) continue;\n\t\tconst head = await readContractSpaceHeadRef(projectMigrationsDir, spaceId);\n\t\tif (head !== null) headRefsBySpace.set(spaceId, head);\n\t}\n\treturn {\n\t\tspaceDirsOnDisk,\n\t\theadRefsBySpace\n\t};\n}\n//#endregion\n//#region src/plan-all-spaces.ts\n/**\n* Iterate the per-space planner across a set of loaded contract spaces\n* and return a deterministic shape regardless of declaration order.\n*\n* Behaviour:\n*\n* - The output is sorted alphabetically by `spaceId`. Two callers\n* passing the same set of inputs in different orders observe\n* byte-identical outputs.\n* - The per-space planner (`planSpace`) is called exactly once per\n* input, in alphabetical-by-spaceId order. Its return value is\n* attached to the corresponding output entry verbatim.\n* - Duplicate `spaceId`s in the input array throw\n* `MIGRATION.DUPLICATE_SPACE_ID` before any `planSpace` call runs,\n* keeping the planner pure when the input is malformed.\n*\n* The signature is generic over `TContract` and `TPackage` because the\n* shape is framework-neutral (SQL family today, Mongo family\n* eventually). Callers wire in whatever contract value and migration\n* package shape their family already speaks.\n*\n* Synchronous: the underlying per-space planner (target's\n* `MigrationPlanner.plan(...)`) is synchronous; callers that need to\n* resolve async I/O (e.g. reading on-disk `contract.json` from disk)\n* resolve it before calling `planAllSpaces` and pass the materialised\n* inputs through.\n*/\nfunction planAllSpaces(inputs, planSpace) {\n\tconst seen = /* @__PURE__ */ new Set();\n\tfor (const input of inputs) {\n\t\tif (seen.has(input.spaceId)) throw errorDuplicateSpaceId(input.spaceId);\n\t\tseen.add(input.spaceId);\n\t}\n\treturn [...inputs].sort((a, b) => {\n\t\tif (a.spaceId < b.spaceId) return -1;\n\t\tif (a.spaceId > b.spaceId) return 1;\n\t\treturn 0;\n\t}).map((input) => ({\n\t\tspaceId: input.spaceId,\n\t\tmigrationPackages: planSpace(input)\n\t}));\n}\n//#endregion\nexport { APP_SPACE_ID, RESERVED_SPACE_SUBDIR_NAMES, SPACE_REFS_DIRNAME, assertDescriptorSelfConsistency, assertValidSpaceId, computeExtensionSpaceApplyPath, contractSpaceFromJson, emitContractSpaceArtifacts, gatherDiskContractSpaceState, isValidSpaceId, listContractSpaceDirectories, planAllSpaces, readContractSpaceHeadRef, spaceMigrationDirectory, spaceRefsDirectory, verifyContractSpaces };\n\n//# sourceMappingURL=spaces.mjs.map"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgCA,SAA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