@prisma/orm-framework 8.0.0-rc.16-dev.6 → 8.0.0-rc.16-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/{authoring-BollGD3p.mjs → authoring-Doh4Co1l.mjs} +2 -2
- package/dist/{authoring-BollGD3p.mjs.map → authoring-Doh4Co1l.mjs.map} +1 -1
- package/dist/{binder-CfxKD8hm-DG9ndi6m.d.mts → binder-CfxKD8hm-D5RMNOlu.d.mts} +4 -4
- package/dist/{binder-CfxKD8hm-DG9ndi6m.d.mts.map → binder-CfxKD8hm-D5RMNOlu.d.mts.map} +1 -1
- package/dist/components.d.mts +2 -2
- package/dist/components.mjs +9 -8
- package/dist/components__authoring.mjs +1 -1
- package/dist/components__codec.mjs +1 -1
- package/dist/components__control.d.mts +2 -2
- package/dist/components__control.mjs +2 -2
- package/dist/components__ir.mjs +2 -1
- package/dist/{config-types-CVe1Oivb.d.mts → config-types-CzRkQS8v.d.mts} +2 -2
- package/dist/{config-types-CVe1Oivb.d.mts.map → config-types-CzRkQS8v.d.mts.map} +1 -1
- package/dist/config.d.mts +1 -1
- package/dist/config__config-types.d.mts +1 -1
- package/dist/control-BrhkTtvb.d.mts +1 -0
- package/dist/{control-BaynP47g-Bg8xTRS3.mjs → control-C4Q85sT5-CkUAJH3B.mjs} +17 -3
- package/dist/control-C4Q85sT5-CkUAJH3B.mjs.map +1 -0
- package/dist/{control-tyaNVmQ-.d.mts → control-CdQIjZLo.d.mts} +293 -123
- package/dist/control-CdQIjZLo.d.mts.map +1 -0
- package/dist/{control-Dv7d6sU1.mjs → control-DNzOW6HH.mjs} +87 -4
- package/dist/control-DNzOW6HH.mjs.map +1 -0
- package/dist/{control-CJlRO0fS-DW9k9mRB.d.mts → control-DhWsAbYJ-D37F1KSm.d.mts} +9 -2
- package/dist/control-DhWsAbYJ-D37F1KSm.d.mts.map +1 -0
- package/dist/errors.d.mts +5 -4
- package/dist/errors.mjs +4 -4
- package/dist/errors__control.d.mts +2 -1
- package/dist/errors__control.mjs +1 -1
- package/dist/errors__execution.d.mts +2 -2
- package/dist/errors__execution.mjs +2 -2
- package/dist/errors__migration.d.mts +2 -2
- package/dist/errors__migration.mjs +2 -2
- package/dist/{execution-BAT2IoUz.d.mts → execution-CJz0gW0j.d.mts} +4 -24
- package/dist/{execution-BAT2IoUz.d.mts.map → execution-CJz0gW0j.d.mts.map} +1 -1
- package/dist/{execution-qoPA8PQQ.mjs → execution-CasccCMg.mjs} +3 -30
- package/dist/{execution-qoPA8PQQ.mjs.map → execution-CasccCMg.mjs.map} +1 -1
- package/dist/{ir-RR6raWW5.mjs → ir-uDGU9vaj.mjs} +3 -50
- package/dist/ir-uDGU9vaj.mjs.map +1 -0
- package/dist/{migration-C8GCVMjt.mjs → migration-A-VM0FBS.mjs} +14 -3
- package/dist/migration-A-VM0FBS.mjs.map +1 -0
- package/dist/{migration-o0OGRAcI.d.mts → migration-CwaNPvbt.d.mts} +10 -3
- package/dist/migration-CwaNPvbt.d.mts.map +1 -0
- package/dist/namespace-VUH2dgnS-By5y75h9.mjs +53 -0
- package/dist/namespace-VUH2dgnS-By5y75h9.mjs.map +1 -0
- package/dist/{parse-GXhoypXR-CJoPrjXn.d.mts → parse-GXhoypXR-pRzlssbl.d.mts} +3 -3
- package/dist/{parse-GXhoypXR-CJoPrjXn.d.mts.map → parse-GXhoypXR-pRzlssbl.d.mts.map} +1 -1
- package/dist/psl-parser.d.mts +3 -3
- package/dist/psl-parser.mjs +1 -1
- package/dist/psl-parser__format.d.mts +1 -1
- package/dist/psl-parser__interpret.d.mts +3 -3
- package/dist/psl-parser__syntax.d.mts +1 -1
- package/package.json +15 -15
- package/dist/control-BaynP47g-Bg8xTRS3.mjs.map +0 -1
- package/dist/control-CJlRO0fS-DW9k9mRB.d.mts.map +0 -1
- package/dist/control-Dv7d6sU1.mjs.map +0 -1
- package/dist/control-tyaNVmQ-.d.mts.map +0 -1
- package/dist/ir-RR6raWW5.mjs.map +0 -1
- package/dist/migration-C8GCVMjt.mjs.map +0 -1
- package/dist/migration-o0OGRAcI.d.mts.map +0 -1
|
@@ -2,55 +2,8 @@ import { t as blindCast } from "./casts-DpaahrlC-Bd5n2coI.mjs";
|
|
|
2
2
|
import { t as InternalError } from "./internal-error-ChGYPVpq-DhUD05u0.mjs";
|
|
3
3
|
import { t as isPlainRecord } from "./is-plain-record-CUofyVQ7-DWEzdhIx.mjs";
|
|
4
4
|
import { n as runtimeError } from "./runtime-error-BA9d7XjZ-BlT8t6LB.mjs";
|
|
5
|
+
import { r as UNBOUND_NAMESPACE_ID } from "./namespace-VUH2dgnS-By5y75h9.mjs";
|
|
5
6
|
//#region ../../../1-framework/1-core/framework-components/dist/ir.mjs
|
|
6
|
-
var IRNodeBase = class {};
|
|
7
|
-
/**
|
|
8
|
-
* Seal an IR class instance after its constructor has assigned all
|
|
9
|
-
* fields. The free-helper form (rather than a `protected freeze()`
|
|
10
|
-
* instance method) keeps the class type structurally narrow so emitted
|
|
11
|
-
* contract literal types remain assignable to their class types.
|
|
12
|
-
*
|
|
13
|
-
* The helper name stays `freezeNode` — it operates on IR nodes
|
|
14
|
-
* regardless of root naming.
|
|
15
|
-
*/
|
|
16
|
-
function freezeNode(node) {
|
|
17
|
-
Object.freeze(node);
|
|
18
|
-
return node;
|
|
19
|
-
}
|
|
20
|
-
/**
|
|
21
|
-
* Reserved sentinel namespace id for the late-bound storage slot —
|
|
22
|
-
* the slot whose binding the target resolves at connection time
|
|
23
|
-
* rather than at authoring time. Postgres uses it for `search_path`
|
|
24
|
-
* late binding; SQLite uses it for the trivial singleton; Mongo uses
|
|
25
|
-
* it for the connection's `db` binding.
|
|
26
|
-
*
|
|
27
|
-
* Materialised target-side as a singleton subclass of the target's
|
|
28
|
-
* `NamespaceBase` concretion that overrides the namespace's
|
|
29
|
-
* qualifier-emission methods to elide the prefix entirely. Call sites
|
|
30
|
-
* stay polymorphic and never branch on `id === UNBOUND_NAMESPACE_ID`
|
|
31
|
-
* — the singleton's overrides drop the qualifier so emitted SQL / Mongo
|
|
32
|
-
* commands look unqualified.
|
|
33
|
-
*
|
|
34
|
-
* The double-underscore decoration marks the id as a framework-reserved
|
|
35
|
-
* coordinate when it appears in a JSON envelope (cold-read-as-reserved
|
|
36
|
-
* — no realistic collision with user-declared namespace names).
|
|
37
|
-
*
|
|
38
|
-
* Encoded as an exported const (rather than scattered string literals)
|
|
39
|
-
* so the sentinel-id invariant is single-sourced: any production-source
|
|
40
|
-
* site that constructs an unbound-namespace singleton imports this
|
|
41
|
-
* constant.
|
|
42
|
-
*/
|
|
43
|
-
const UNBOUND_NAMESPACE_ID = "__unbound__";
|
|
44
|
-
var NamespaceBase = class extends IRNodeBase {
|
|
45
|
-
/**
|
|
46
|
-
* Answers "am I the unbound namespace" as node behavior, so consumers
|
|
47
|
-
* never compare ids against the sentinel. This getter is the single
|
|
48
|
-
* encapsulated place the {@link UNBOUND_NAMESPACE_ID} comparison lives.
|
|
49
|
-
*/
|
|
50
|
-
get isUnbound() {
|
|
51
|
-
return this.id === UNBOUND_NAMESPACE_ID;
|
|
52
|
-
}
|
|
53
|
-
};
|
|
54
7
|
/**
|
|
55
8
|
* Projects one namespace's `entries` into the view shape: each built-in kind
|
|
56
9
|
* becomes a top-level slot (materialized empty if absent), and the remaining
|
|
@@ -196,6 +149,6 @@ function entityAt(storage, coord) {
|
|
|
196
149
|
return blindCast(kindMap[coord.entityName]);
|
|
197
150
|
}
|
|
198
151
|
//#endregion
|
|
199
|
-
export {
|
|
152
|
+
export { elementCoordinates as a, promoteBuiltinKinds as c, domainElementCoordinates as i, buildSingleNamespaceView as n, entityAt as o, coordinateKey as r, hydrateNamespaceEntities as s, buildNamespacedEntities as t };
|
|
200
153
|
|
|
201
|
-
//# sourceMappingURL=ir-
|
|
154
|
+
//# sourceMappingURL=ir-uDGU9vaj.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ir-uDGU9vaj.mjs","names":[],"sources":["../../../../1-framework/1-core/framework-components/dist/ir.mjs"],"sourcesContent":["import { n as runtimeError } from \"./runtime-error-BA9d7XjZ.mjs\";\nimport { i as freezeNode, n as UNBOUND_NAMESPACE_ID, r as IRNodeBase, t as NamespaceBase } from \"./namespace-VUH2dgnS.mjs\";\nimport { blindCast } from \"@internal/utils/casts\";\nimport { InternalError } from \"@internal/utils/internal-error\";\nimport { isPlainRecord } from \"@internal/contract/is-plain-record\";\n//#region src/ir/contract-view.ts\n/**\n* Projects one namespace's `entries` into the view shape: each built-in kind\n* becomes a top-level slot (materialized empty if absent), and the remaining\n* pack-contributed kinds sit under `.entries`. Shared by the single-namespace\n* builder and the namespace-map builder.\n*/\nfunction promoteBuiltinKinds(entries, builtinKinds) {\n\tconst view = {};\n\tconst rest = {};\n\tfor (const [kind, kindMap] of Object.entries(entries)) if (builtinKinds.includes(kind)) view[kind] = kindMap;\n\telse rest[kind] = kindMap;\n\tfor (const kind of builtinKinds) if (!(kind in view)) view[kind] = {};\n\tview[\"entries\"] = rest;\n\treturn blindCast(view);\n}\n/**\n* Builds one namespace's entity view: promotes the given built-in kind slots to\n* top-level for the default (`UNBOUND_NAMESPACE_ID`) namespace. Single-namespace\n* targets (Mongo, SQLite) use this to unwrap their sole namespace to the root.\n*\n* Throws if the contract has no default (`UNBOUND_NAMESPACE_ID`) namespace.\n*/\nfunction buildSingleNamespaceView(storage, builtinKinds) {\n\tconst defaultNs = storage.namespaces[UNBOUND_NAMESPACE_ID];\n\tif (defaultNs === void 0) throw new InternalError(`ContractView: contract has no default namespace (${UNBOUND_NAMESPACE_ID})`);\n\treturn promoteBuiltinKinds(blindCast(defaultNs.entries), builtinKinds);\n}\n/**\n* Builds the namespace-keyed entity-view map (`{ <nsId>: SingleNamespaceView }`)\n* for every namespace in the storage, keyed by raw namespace id. It is the storage-side\n* counterpart of `buildNamespacedEnums(domain, codecFor)`, which builds the same map of enum\n* accessors from the domain, reading each enum through the codec `codecFor` returns.\n*/\nfunction buildNamespacedEntities(storage, builtinKinds) {\n\tconst out = {};\n\tfor (const [nsId, ns] of Object.entries(storage.namespaces)) out[nsId] = promoteBuiltinKinds(blindCast(ns.entries), builtinKinds);\n\treturn blindCast(out);\n}\n//#endregion\n//#region src/ir/domain.ts\n/**\n* Lazy walk over every named domain entity in a {@link ApplicationDomain},\n* yielded as {@link EntityCoordinate} tuples with `plane: 'domain'`.\n*\n* Same structural rules as {@link elementCoordinates} over storage: skip\n* scalar `id`; each other object-valued property is an entity-kind slot.\n*/\nfunction* domainElementCoordinates(domain) {\n\tfor (const [namespaceId, ns] of Object.entries(domain.namespaces)) for (const [entityKind, slot] of Object.entries(ns)) {\n\t\tif (entityKind === \"id\") continue;\n\t\tif (slot === null || typeof slot !== \"object\") continue;\n\t\tfor (const entityName of Object.keys(slot)) yield {\n\t\t\tplane: \"domain\",\n\t\t\tnamespaceId,\n\t\t\tentityKind,\n\t\t\tentityName\n\t\t};\n\t}\n}\n//#endregion\n//#region src/ir/entity-kind.ts\n/**\n* Hydrates a namespace's entities from raw JSON maps into IR class instances.\n*\n* For each kind in `entries`: if the descriptor map has a descriptor,\n* construct each inner-map value; otherwise freeze-and-carry (`'carry'`)\n* or throw naming the kind and nsId (`'fail'`).\n*\n* The single boundary cast hands `value` to `descriptor.construct` as its\n* `Input`. The value satisfies the kind's `Input` either by the\n* entries-input contract at authoring time or by prior `validateStorage`\n* validation at hydration time.\n*/\nfunction hydrateNamespaceEntities(entries, kinds, onUnknown, nsId) {\n\tconst result = {};\n\tfor (const [kind, rawMap] of Object.entries(entries)) {\n\t\tconst descriptor = kinds.get(kind);\n\t\tif (descriptor !== void 0) {\n\t\t\tconst built = {};\n\t\t\tfor (const [name, value] of Object.entries(rawMap)) built[name] = descriptor.construct(blindCast(value));\n\t\t\tresult[kind] = Object.freeze(built);\n\t\t} else if (onUnknown === \"carry\") result[kind] = Object.freeze(rawMap);\n\t\telse throw runtimeError(\"CONTRACT.ENTITY_KIND_UNKNOWN\", `Unknown entries key \"${kind}\" in namespace \"${nsId ?? \"?\"}\"; no hydration factory registered for this entity kind`);\n\t}\n\treturn result;\n}\n//#endregion\n//#region src/ir/storage.ts\n/**\n* Lazy walk over every named storage entity in a `Storage`-shaped\n* value, yielded as {@link EntityCoordinate} tuples with\n* `plane: 'storage'` (the parameter type binds the plane).\n*\n* Iterates each namespace's `entries` kind maps structurally. Skips\n* non-object `entries`; `id` and `kind` are not walked (`kind` is\n* non-enumerable on concretions). For every entity-kind key under\n* `entries` whose value is a non-null object, yields one coordinate per\n* entity name in that map. No family-specific kind vocabulary is required.\n*/\nfunction* elementCoordinates(storage) {\n\tfor (const [namespaceId, ns] of Object.entries(storage.namespaces)) {\n\t\tconst entries = ns.entries;\n\t\tif (entries === null || typeof entries !== \"object\") continue;\n\t\tfor (const [entityKind, kindMap] of Object.entries(entries)) {\n\t\t\tif (kindMap === null || typeof kindMap !== \"object\") continue;\n\t\t\tfor (const entityName of Object.keys(kindMap)) yield {\n\t\t\t\tplane: \"storage\",\n\t\t\t\tnamespaceId,\n\t\t\t\tentityKind,\n\t\t\t\tentityName\n\t\t\t};\n\t\t}\n\t}\n}\n/**\n* Canonical, collision-safe key for an {@link EntityCoordinate}. Encodes each\n* axis individually with `JSON.stringify` before joining with `-`, so no\n* namespace id, entity kind, or entity name can forge a collision by\n* embedding the delimiter itself (e.g. a delimiter of `:` would let\n* `('a', 'b:c', 'd')` collide with `('a:b', 'c', 'd')`) — each component is\n* quoted, and any `-` or `\"` inside it is escaped or safely inside those\n* quotes.\n*\n* The single shared key every coordinate-driven ownership/omission/collision\n* check should use — `contract infer`'s pack-described-element omission and\n* the migration tools' cross-space disjointness check both key on this.\n*/\nfunction coordinateKey(coordinate) {\n\treturn [\n\t\tcoordinate.namespaceId,\n\t\tcoordinate.entityKind,\n\t\tcoordinate.entityName\n\t].map((value) => JSON.stringify(value)).join(\"-\");\n}\n/**\n* Looks up a single entity in a `Storage`-shaped value by its full coordinate.\n* Returns `undefined` if the namespace, entity kind, or entity name is absent.\n* The type parameter is a caller assertion — the walk itself is structural\n* and cannot verify the entity's shape.\n*/\nfunction entityAt(storage, coord) {\n\tconst ns = storage.namespaces[coord.namespaceId];\n\tif (ns === void 0) return void 0;\n\tconst entries = ns.entries;\n\tif (!isPlainRecord(entries)) return void 0;\n\tconst kindMap = entries[coord.entityKind];\n\tif (!isPlainRecord(kindMap)) return void 0;\n\tif (!Object.hasOwn(kindMap, coord.entityName)) return void 0;\n\treturn blindCast(kindMap[coord.entityName]);\n}\n//#endregion\nexport { IRNodeBase, NamespaceBase, UNBOUND_NAMESPACE_ID, buildNamespacedEntities, buildSingleNamespaceView, coordinateKey, domainElementCoordinates, elementCoordinates, entityAt, freezeNode, hydrateNamespaceEntities, isPlainRecord, promoteBuiltinKinds };\n\n//# sourceMappingURL=ir.mjs.map"],"mappings":";;;;;;;;;;;;AAYA,SAAS,oBAAoB,SAAS,cAAc;CACnD,MAAM,OAAO,CAAC;CACd,MAAM,OAAO,CAAC;CACd,KAAK,MAAM,CAAC,MAAM,YAAY,OAAO,QAAQ,OAAO,GAAG,IAAI,aAAa,SAAS,IAAI,GAAG,KAAK,QAAQ;MAChG,KAAK,QAAQ;CAClB,KAAK,MAAM,QAAQ,cAAc,IAAI,EAAE,QAAQ,OAAO,KAAK,QAAQ,CAAC;CACpE,KAAK,aAAa;CAClB,OAAO,UAAU,IAAI;AACtB;;;;;;;;AAQA,SAAS,yBAAyB,SAAS,cAAc;CACxD,MAAM,YAAY,QAAQ,WAAW;CACrC,IAAI,cAAc,KAAK,GAAG,MAAM,IAAI,cAAc,oDAAoD,qBAAqB,EAAE;CAC7H,OAAO,oBAAoB,UAAU,UAAU,OAAO,GAAG,YAAY;AACtE;;;;;;;AAOA,SAAS,wBAAwB,SAAS,cAAc;CACvD,MAAM,MAAM,CAAC;CACb,KAAK,MAAM,CAAC,MAAM,OAAO,OAAO,QAAQ,QAAQ,UAAU,GAAG,IAAI,QAAQ,oBAAoB,UAAU,GAAG,OAAO,GAAG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pD,OAAO;IACP;IACA;IACA;GACD;EACD;CACD;AACD;;;;;;;;;;;;;;AAcA,SAAS,cAAc,YAAY;CAClC,OAAO;EACN,WAAW;EACX,WAAW;EACX,WAAW;CACZ,CAAC,CAAC,KAAK,UAAU,KAAK,UAAU,KAAK,CAAC,CAAC,CAAC,KAAK,GAAG;AACjD;;;;;;;AAOA,SAAS,SAAS,SAAS,OAAO;CACjC,MAAM,KAAK,QAAQ,WAAW,MAAM;CACpC,IAAI,OAAO,KAAK,GAAG,OAAO,KAAK;CAC/B,MAAM,UAAU,GAAG;CACnB,IAAI,CAAC,cAAc,OAAO,GAAG,OAAO,KAAK;CACzC,MAAM,UAAU,QAAQ,MAAM;CAC9B,IAAI,CAAC,cAAc,OAAO,GAAG,OAAO,KAAK;CACzC,IAAI,CAAC,OAAO,OAAO,SAAS,MAAM,UAAU,GAAG,OAAO,KAAK;CAC3D,OAAO,UAAU,QAAQ,MAAM,WAAW;AAC3C"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as CliStructuredError } from "./control-
|
|
1
|
+
import { t as CliStructuredError } from "./control-C4Q85sT5-CkUAJH3B.mjs";
|
|
2
2
|
//#region ../../../1-framework/1-core/errors/dist/migration.mjs
|
|
3
3
|
/**
|
|
4
4
|
* A scaffolded migration contains a placeholder slot that was never filled in.
|
|
@@ -15,6 +15,17 @@ function errorUnfilledPlaceholder(slot) {
|
|
|
15
15
|
});
|
|
16
16
|
}
|
|
17
17
|
/**
|
|
18
|
+
* The operation of a planner-stubbed data transform: a promise that rejects with
|
|
19
|
+
* `MIGRATION.UNFILLED_PLACEHOLDER`. A plan's other operations stay readable beside it. The
|
|
20
|
+
* rejection is marked handled, and so is any promise a target wraps it in, so reading a plan's
|
|
21
|
+
* operations without awaiting each one does not raise an unhandled rejection.
|
|
22
|
+
*/
|
|
23
|
+
function unfilledPlaceholderOperation(slot) {
|
|
24
|
+
const operation = Promise.reject(errorUnfilledPlaceholder(slot));
|
|
25
|
+
operation.catch(() => void 0);
|
|
26
|
+
return operation;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
18
29
|
* Scaffolded `migration.ts` files call this wherever the scaffolder couldn't
|
|
19
30
|
* emit a real query and the author is expected to fill one in. Always throws
|
|
20
31
|
* a structured migration error (`MIGRATION.UNFILLED_PLACEHOLDER`).
|
|
@@ -138,6 +149,6 @@ function errorMigrationOperationOptionRemoved(options) {
|
|
|
138
149
|
});
|
|
139
150
|
}
|
|
140
151
|
//#endregion
|
|
141
|
-
export { errorMigrationPlanNotArray as a, placeholder as c, errorMigrationOperationOptionRemoved as i, errorMigrationFileMissing as n, errorMigrationTargetMismatch as o, errorMigrationInvalidDefaultExport as r, errorUnfilledPlaceholder as s, errorDataTransformContractMismatch as t };
|
|
152
|
+
export { errorMigrationPlanNotArray as a, placeholder as c, errorMigrationOperationOptionRemoved as i, unfilledPlaceholderOperation as l, errorMigrationFileMissing as n, errorMigrationTargetMismatch as o, errorMigrationInvalidDefaultExport as r, errorUnfilledPlaceholder as s, errorDataTransformContractMismatch as t };
|
|
142
153
|
|
|
143
|
-
//# sourceMappingURL=migration-
|
|
154
|
+
//# sourceMappingURL=migration-A-VM0FBS.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"migration-A-VM0FBS.mjs","names":[],"sources":["../../../../1-framework/1-core/errors/dist/migration.mjs"],"sourcesContent":["import { t as CliStructuredError } from \"./control-C4Q85sT5.mjs\";\n//#region src/migration.ts\n/**\n* A scaffolded migration contains a placeholder slot that was never filled in.\n*\n* Thrown at emit time (when `check.source()` or `run()` is invoked) via the\n* `placeholder(...)` utility. The `slot` identifies the exact location the\n* author still needs to edit, e.g. `\"backfill-product-status:check.source\"`.\n*/\nfunction errorUnfilledPlaceholder(slot) {\n\treturn new CliStructuredError(\"MIGRATION.UNFILLED_PLACEHOLDER\", \"Unfilled migration placeholder\", {\n\t\twhy: `The migration contains a placeholder that has not been filled in: ${slot}`,\n\t\tfix: \"Open migration.ts and replace the `placeholder(...)` call with your actual query.\",\n\t\tmeta: { slot }\n\t});\n}\n/**\n* The operation of a planner-stubbed data transform: a promise that rejects with\n* `MIGRATION.UNFILLED_PLACEHOLDER`. A plan's other operations stay readable beside it. The\n* rejection is marked handled, and so is any promise a target wraps it in, so reading a plan's\n* operations without awaiting each one does not raise an unhandled rejection.\n*/\nfunction unfilledPlaceholderOperation(slot) {\n\tconst operation = Promise.reject(errorUnfilledPlaceholder(slot));\n\toperation.catch(() => void 0);\n\treturn operation;\n}\n/**\n* Scaffolded `migration.ts` files call this wherever the scaffolder couldn't\n* emit a real query and the author is expected to fill one in. Always throws\n* a structured migration error (`MIGRATION.UNFILLED_PLACEHOLDER`).\n*\n* The return type `never` makes it assignable to any expected return type, so\n* a scaffolded `() => placeholder('...')` satisfies signatures like\n* `() => MongoQueryPlan` without polluting them with a sentinel union arm.\n*/\nfunction placeholder(slot) {\n\tthrow errorUnfilledPlaceholder(slot);\n}\n/**\n* A `dataTransform(endContract, …)` factory was handed a `SqlQueryPlan` whose\n* `meta.storageHash` does not match the `endContract.storage.storageHash` it\n* was configured with. This almost always means the user's query-builder\n* (`sql({ context: createExecutionContext({ contract: endContract, … }) })`)\n* was instantiated from a different contract reference than the one passed\n* to `dataTransform(endContract, …)`.\n*\n* Distinct from `errorHashMismatch` (`CONTRACT.MARKER_MISMATCH`) which\n* rejects a plan at runtime execution; this is an authoring-time rejection\n* so it lives in the `MIGRATION` namespace.\n*/\nfunction errorDataTransformContractMismatch(options) {\n\treturn new CliStructuredError(\"MIGRATION.DATA_TRANSFORM_CONTRACT_MISMATCH\", \"dataTransform query plan built against wrong contract\", {\n\t\twhy: `Data transform \"${options.dataTransformName}\" produced a query plan whose storage hash (${options.actual}) does not match the migration's contract (${options.expected}). The query builder was configured with a different contract than the one passed to dataTransform(endContract, ...).`,\n\t\tfix: \"Ensure the `endContract` imported at module scope (used for both `dataTransform(endContract, …)` and `sql({ context: createExecutionContext({ contract: endContract, … }) })`) is the same reference.\",\n\t\tmeta: {\n\t\t\tdataTransformName: options.dataTransformName,\n\t\t\texpected: options.expected,\n\t\t\tactual: options.actual\n\t\t}\n\t});\n}\n/**\n* `migration.ts` was expected at the given package directory but could not be\n* located. Thrown when consumers attempt to read a migration package that is\n* missing its source file.\n*/\nfunction errorMigrationFileMissing(dir) {\n\treturn new CliStructuredError(\"MIGRATION.FILE_MISSING\", \"migration.ts not found\", {\n\t\twhy: `No migration.ts file was found at \"${dir}\"`,\n\t\tfix: \"Scaffold one with `{bin} migration new` or `{bin} migration plan`.\",\n\t\tnextActions: [{\n\t\t\tkind: \"run-command\",\n\t\t\tlabel: \"Scaffold an empty migration\",\n\t\t\tcommand: \"{bin} migration new\"\n\t\t}, {\n\t\t\tkind: \"run-command\",\n\t\t\tlabel: \"Scaffold a migration from a contract diff\",\n\t\t\tcommand: \"{bin} migration plan\"\n\t\t}],\n\t\tmeta: { dir }\n\t});\n}\n/**\n* The `migration.ts` at the given package directory does not default-export a\n* valid migration shape. Two shapes are accepted: a `Migration` subclass, or a\n* factory function returning a `MigrationPlan`-shaped object (with at least\n* an `operations` array, plus `targetId` and `destination`). Thrown when the\n* default export is missing, is not a constructor/function, does not extend\n* `Migration`, or (for factory functions) returns a value that is not\n* `MigrationPlan`-shaped.\n*/\nfunction errorMigrationInvalidDefaultExport(dir, actualExportDescription) {\n\treturn new CliStructuredError(\"MIGRATION.INVALID_DEFAULT_EXPORT\", \"migration.ts default export is not a valid migration\", {\n\t\twhy: actualExportDescription !== void 0 ? `migration.ts at \"${dir}\" must default-export a Migration subclass or a factory function returning a MigrationPlan-shaped object; got ${actualExportDescription}` : `migration.ts at \"${dir}\" must default-export a Migration subclass or a factory function returning a MigrationPlan-shaped object.`,\n\t\tfix: \"Use `export default class extends Migration { ... }` or `export default () => ({ targetId, destination, operations })`.\",\n\t\tmeta: {\n\t\t\tdir,\n\t\t\t...actualExportDescription !== void 0 ? { actualExport: actualExportDescription } : {}\n\t\t}\n\t});\n}\n/**\n* The migration class declares one `targetId` but the loaded\n* `prisma.config.ts` declares another. Thrown by `MigrationCLI.run`\n* when a migration script is invoked against a config whose target\n* descriptor disagrees with the migration's own `targetId`. Distinct from generic\n* config-validation errors because the mismatch is between two valid\n* artifacts (the script and the config), not a malformed input.\n*/\nfunction errorMigrationTargetMismatch(options) {\n\treturn new CliStructuredError(\"MIGRATION.TARGET_MISMATCH\", \"Migration target does not match config target\", {\n\t\twhy: `This migration is for target \"${options.migrationTargetId}\" but the loaded prisma.config.ts declares target \"${options.configTargetId}\". The migration script can only be run against a config that targets the same database.`,\n\t\tfix: \"Switch to a config whose `target` matches the migration's target, or pass `--config <path>` to point at the right config file.\",\n\t\tmeta: {\n\t\t\tmigrationTargetId: options.migrationTargetId,\n\t\t\tconfigTargetId: options.configTargetId\n\t\t}\n\t});\n}\n/**\n* A `Migration.operations` getter returned a value that is not an array. Used\n* by emit capabilities after instantiating the authored migration.\n*/\nfunction errorMigrationPlanNotArray(dir, actualValueDescription) {\n\treturn new CliStructuredError(\"MIGRATION.PLAN_NOT_ARRAY\", \"Migration.operations must be an array of operations\", {\n\t\twhy: actualValueDescription !== void 0 ? `Migration.operations for migration.ts at \"${dir}\" was ${actualValueDescription}; an array of operations is required.` : `Migration.operations for migration.ts at \"${dir}\" is not an array of operations.`,\n\t\tfix: \"Ensure your `operations` getter returns an array of operations; see the data-migrations authoring guide.\",\n\t\tmeta: {\n\t\t\tdir,\n\t\t\t...actualValueDescription !== void 0 ? { actualValue: actualValueDescription } : {}\n\t\t}\n\t});\n}\nconst UPGRADE_GUIDES_URL = \"https://github.com/prisma/orm/tree/main/skills/prisma-8/upgrading\";\n/**\n* A `migration.ts` passes an operation an option in the form an earlier version wrote, which this version no longer reads. `node migration.ts` strips types without checking them, so such a file runs; the operation refuses the option rather than leave out what it carries. `subject` names what the option was for, `rewrite` says how to write it now, and `upgradeEntry` is the id of the upgrade entry that shows the new form.\n*/\nfunction errorMigrationOperationOptionRemoved(options) {\n\tconst { operation, option, upgradeEntry } = options;\n\treturn new CliStructuredError(\"MIGRATION.OPERATION_OPTION_REMOVED\", `\\`${operation}\\` in migration.ts passes \\`${option}\\`, which this version no longer reads, for ${options.subject}`, {\n\t\twhy: \"An earlier version wrote this migration.ts. `node migration.ts` does not check its types, so the file runs, and this version would leave out what the option carries.\",\n\t\tfix: `${options.rewrite} Or, if the migration is not applied, delete its package and run \\`migration plan\\` again. The upgrade entry \\`${upgradeEntry}\\` shows the new shape: ${UPGRADE_GUIDES_URL}`,\n\t\tmeta: {\n\t\t\toperation,\n\t\t\toption,\n\t\t\tupgradeEntry\n\t\t}\n\t});\n}\n//#endregion\nexport { errorDataTransformContractMismatch, errorMigrationFileMissing, errorMigrationInvalidDefaultExport, errorMigrationOperationOptionRemoved, errorMigrationPlanNotArray, errorMigrationTargetMismatch, errorUnfilledPlaceholder, placeholder, unfilledPlaceholderOperation };\n\n//# sourceMappingURL=migration.mjs.map"],"mappings":";;;;;;;;;AASA,SAAS,yBAAyB,MAAM;CACvC,OAAO,IAAI,mBAAmB,kCAAkC,kCAAkC;EACjG,KAAK,qEAAqE;EAC1E,KAAK;EACL,MAAM,EAAE,KAAK;CACd,CAAC;AACF;;;;;;;AAOA,SAAS,6BAA6B,MAAM;CAC3C,MAAM,YAAY,QAAQ,OAAO,yBAAyB,IAAI,CAAC;CAC/D,UAAU,YAAY,KAAK,CAAC;CAC5B,OAAO;AACR;;;;;;;;;;AAUA,SAAS,YAAY,MAAM;CAC1B,MAAM,yBAAyB,IAAI;AACpC;;;;;;;;;;;;;AAaA,SAAS,mCAAmC,SAAS;CACpD,OAAO,IAAI,mBAAmB,8CAA8C,yDAAyD;EACpI,KAAK,mBAAmB,QAAQ,kBAAkB,8CAA8C,QAAQ,OAAO,6CAA6C,QAAQ,SAAS;EAC7K,KAAK;EACL,MAAM;GACL,mBAAmB,QAAQ;GAC3B,UAAU,QAAQ;GAClB,QAAQ,QAAQ;EACjB;CACD,CAAC;AACF;;;;;;AAMA,SAAS,0BAA0B,K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AQ,iHAAiH,aAAa,0BAA0B;EAChL,MAAM;GACL;GACA;GACA;EACD;CACD,CAAC;AACF"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as CliStructuredError } from "./control-
|
|
1
|
+
import { r as CliStructuredError } from "./control-DhWsAbYJ-D37F1KSm.mjs";
|
|
2
2
|
//#region ../../../1-framework/1-core/errors/dist/migration.d.mts
|
|
3
3
|
//#region src/migration.d.ts
|
|
4
4
|
/**
|
|
@@ -9,6 +9,13 @@ import { r as CliStructuredError } from "./control-CJlRO0fS-DW9k9mRB.mjs";
|
|
|
9
9
|
* author still needs to edit, e.g. `"backfill-product-status:check.source"`.
|
|
10
10
|
*/
|
|
11
11
|
declare function errorUnfilledPlaceholder(slot: string): CliStructuredError;
|
|
12
|
+
/**
|
|
13
|
+
* The operation of a planner-stubbed data transform: a promise that rejects with
|
|
14
|
+
* `MIGRATION.UNFILLED_PLACEHOLDER`. A plan's other operations stay readable beside it. The
|
|
15
|
+
* rejection is marked handled, and so is any promise a target wraps it in, so reading a plan's
|
|
16
|
+
* operations without awaiting each one does not raise an unhandled rejection.
|
|
17
|
+
*/
|
|
18
|
+
declare function unfilledPlaceholderOperation(slot: string): Promise<never>;
|
|
12
19
|
/**
|
|
13
20
|
* Scaffolded `migration.ts` files call this wherever the scaffolder couldn't
|
|
14
21
|
* emit a real query and the author is expected to fill one in. Always throws
|
|
@@ -80,5 +87,5 @@ declare function errorMigrationOperationOptionRemoved(options: {
|
|
|
80
87
|
readonly upgradeEntry: string;
|
|
81
88
|
}): CliStructuredError;
|
|
82
89
|
//#endregion
|
|
83
|
-
export { errorMigrationPlanNotArray as a, placeholder as c, errorMigrationOperationOptionRemoved as i, errorMigrationFileMissing as n, errorMigrationTargetMismatch as o, errorMigrationInvalidDefaultExport as r, errorUnfilledPlaceholder as s, errorDataTransformContractMismatch as t };
|
|
84
|
-
//# sourceMappingURL=migration-
|
|
90
|
+
export { errorMigrationPlanNotArray as a, placeholder as c, errorMigrationOperationOptionRemoved as i, unfilledPlaceholderOperation as l, errorMigrationFileMissing as n, errorMigrationTargetMismatch as o, errorMigrationInvalidDefaultExport as r, errorUnfilledPlaceholder as s, errorDataTransformContractMismatch as t };
|
|
91
|
+
//# sourceMappingURL=migration-CwaNPvbt.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"migration-CwaNPvbt.d.mts","names":[],"sources":["../../../../1-framework/1-core/errors/dist/migration.d.mts"],"mappings":";;;;;;;;;;iBASiB,yBAAyB,eAAe;;;;;;;iBAOxC,6BAA6B,eAAe;;;;;;;;;;iBAU5C,YAAY;;;;;;;;;;;;;iBAaZ,mCAAmC;WACzC;WACA;WACA;IACP;;;;;;iBAMa,0BAA0B,cAAc;;;;;;;;;;iBAUxC,mCAAmC,aAAa,mCAAmC;;;;;;;;;iBASnF,6BAA6B;WACnC;WACA;IACP;;;;;iBAKa,2BAA2B,aAAa,kCAAkC;;;;iBAI1E,qCAAqC;WAC3C;WACA;WACA;WACA;WACA;IACP"}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
//#region ../../../1-framework/1-core/framework-components/dist/namespace-VUH2dgnS.mjs
|
|
2
|
+
var IRNodeBase = class {};
|
|
3
|
+
/**
|
|
4
|
+
* Seal an IR class instance after its constructor has assigned all
|
|
5
|
+
* fields. The free-helper form (rather than a `protected freeze()`
|
|
6
|
+
* instance method) keeps the class type structurally narrow so emitted
|
|
7
|
+
* contract literal types remain assignable to their class types.
|
|
8
|
+
*
|
|
9
|
+
* The helper name stays `freezeNode` — it operates on IR nodes
|
|
10
|
+
* regardless of root naming.
|
|
11
|
+
*/
|
|
12
|
+
function freezeNode(node) {
|
|
13
|
+
Object.freeze(node);
|
|
14
|
+
return node;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Reserved sentinel namespace id for the late-bound storage slot —
|
|
18
|
+
* the slot whose binding the target resolves at connection time
|
|
19
|
+
* rather than at authoring time. Postgres uses it for `search_path`
|
|
20
|
+
* late binding; SQLite uses it for the trivial singleton; Mongo uses
|
|
21
|
+
* it for the connection's `db` binding.
|
|
22
|
+
*
|
|
23
|
+
* Materialised target-side as a singleton subclass of the target's
|
|
24
|
+
* `NamespaceBase` concretion that overrides the namespace's
|
|
25
|
+
* qualifier-emission methods to elide the prefix entirely. Call sites
|
|
26
|
+
* stay polymorphic and never branch on `id === UNBOUND_NAMESPACE_ID`
|
|
27
|
+
* — the singleton's overrides drop the qualifier so emitted SQL / Mongo
|
|
28
|
+
* commands look unqualified.
|
|
29
|
+
*
|
|
30
|
+
* The double-underscore decoration marks the id as a framework-reserved
|
|
31
|
+
* coordinate when it appears in a JSON envelope (cold-read-as-reserved
|
|
32
|
+
* — no realistic collision with user-declared namespace names).
|
|
33
|
+
*
|
|
34
|
+
* Encoded as an exported const (rather than scattered string literals)
|
|
35
|
+
* so the sentinel-id invariant is single-sourced: any production-source
|
|
36
|
+
* site that constructs an unbound-namespace singleton imports this
|
|
37
|
+
* constant.
|
|
38
|
+
*/
|
|
39
|
+
const UNBOUND_NAMESPACE_ID = "__unbound__";
|
|
40
|
+
var NamespaceBase = class extends IRNodeBase {
|
|
41
|
+
/**
|
|
42
|
+
* Answers "am I the unbound namespace" as node behavior, so consumers
|
|
43
|
+
* never compare ids against the sentinel. This getter is the single
|
|
44
|
+
* encapsulated place the {@link UNBOUND_NAMESPACE_ID} comparison lives.
|
|
45
|
+
*/
|
|
46
|
+
get isUnbound() {
|
|
47
|
+
return this.id === UNBOUND_NAMESPACE_ID;
|
|
48
|
+
}
|
|
49
|
+
};
|
|
50
|
+
//#endregion
|
|
51
|
+
export { freezeNode as i, NamespaceBase as n, UNBOUND_NAMESPACE_ID as r, IRNodeBase as t };
|
|
52
|
+
|
|
53
|
+
//# sourceMappingURL=namespace-VUH2dgnS-By5y75h9.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"namespace-VUH2dgnS-By5y75h9.mjs","names":[],"sources":["../../../../1-framework/1-core/framework-components/dist/namespace-VUH2dgnS.mjs"],"sourcesContent":["//#region src/ir/ir-node.ts\nvar IRNodeBase = class {};\n/**\n* Seal an IR class instance after its constructor has assigned all\n* fields. The free-helper form (rather than a `protected freeze()`\n* instance method) keeps the class type structurally narrow so emitted\n* contract literal types remain assignable to their class types.\n*\n* The helper name stays `freezeNode` — it operates on IR nodes\n* regardless of root naming.\n*/\nfunction freezeNode(node) {\n\tObject.freeze(node);\n\treturn node;\n}\n//#endregion\n//#region src/ir/namespace.ts\n/**\n* Reserved sentinel namespace id for the late-bound storage slot —\n* the slot whose binding the target resolves at connection time\n* rather than at authoring time. Postgres uses it for `search_path`\n* late binding; SQLite uses it for the trivial singleton; Mongo uses\n* it for the connection's `db` binding.\n*\n* Materialised target-side as a singleton subclass of the target's\n* `NamespaceBase` concretion that overrides the namespace's\n* qualifier-emission methods to elide the prefix entirely. Call sites\n* stay polymorphic and never branch on `id === UNBOUND_NAMESPACE_ID`\n* — the singleton's overrides drop the qualifier so emitted SQL / Mongo\n* commands look unqualified.\n*\n* The double-underscore decoration marks the id as a framework-reserved\n* coordinate when it appears in a JSON envelope (cold-read-as-reserved\n* — no realistic collision with user-declared namespace names).\n*\n* Encoded as an exported const (rather than scattered string literals)\n* so the sentinel-id invariant is single-sourced: any production-source\n* site that constructs an unbound-namespace singleton imports this\n* constant.\n*/\nconst UNBOUND_NAMESPACE_ID = \"__unbound__\";\nvar NamespaceBase = class extends IRNodeBase {\n\t/**\n\t* Answers \"am I the unbound namespace\" as node behavior, so consumers\n\t* never compare ids against the sentinel. This getter is the single\n\t* encapsulated place the {@link UNBOUND_NAMESPACE_ID} comparison lives.\n\t*/\n\tget isUnbound() {\n\t\treturn this.id === UNBOUND_NAMESPACE_ID;\n\t}\n};\n//#endregion\nexport { freezeNode as i, UNBOUND_NAMESPACE_ID as n, IRNodeBase as r, NamespaceBase as t };\n\n//# sourceMappingURL=namespace-VUH2dgnS.mjs.map"],"mappings":";AACA,IAAI,aAAa,MAAM,CAAC;;;;;;;;;;AAUxB,SAAS,WAAW,MAAM;CACzB,OAAO,OAAO,IAAI;CAClB,OAAO;AACR;;;;;;;;;;;;;;;;;;;;;;;;AA0BA,MAAM,uBAAuB;AAC7B,IAAI,gBAAgB,cAAc,WAAW;;;;;;CAM5C,IAAI,YAAY;EACf,OAAO,KAAK,OAAO;CACpB;AACD"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { U as PslSpan } from "./framework-authoring-CEQ3YaZw-BAeSxl0O.mjs";
|
|
2
2
|
import { d as TaggedLiteralCanonicalization } from "./written-value-CNeNAoHU-D43ei57w.mjs";
|
|
3
|
-
import "./control-
|
|
3
|
+
import "./control-CdQIjZLo.mjs";
|
|
4
4
|
import "./psl-ast-HnFe3DUL.mjs";
|
|
5
|
-
import { h as PslParserOptions, r as ContractSourceDiagnostic } from "./config-types-
|
|
5
|
+
import { h as PslParserOptions, r as ContractSourceDiagnostic } from "./config-types-CzRkQS8v.mjs";
|
|
6
6
|
import { n as TokenKind, t as Token } from "./tokenizer-DW30uwhx-BHsWTwYk.mjs";
|
|
7
7
|
//#region ../../../1-framework/2-authoring/psl-parser/dist/parse-GXhoypXR.d.mts
|
|
8
8
|
//#region src/syntax/syntax-kind.d.ts
|
|
@@ -525,4 +525,4 @@ interface ParseResult {
|
|
|
525
525
|
declare function parse(source: string, filename: string, options?: PslParserOptions): ParseResult;
|
|
526
526
|
//#endregion
|
|
527
527
|
export { any as $, NumberLiteralExprAst as A, QualifiedNameAst as B, IdentifierAst as C, NamedTypeDeclarationAst as D, ModelDeclarationAst as E, PathExprAst as F, SyntaxElement as G, SourceFile as H, Position as I, SyntaxToken as J, SyntaxKind as K, PslDiagnostic as L, ObjectLiteralExprAst as M, ParseDiagnostic as N, NamespaceDeclarationAst as O, ParseResult as P, TypesBlockAst as Q, PslDiagnosticCollector as R, HasDocComment as S, ModelAttributeAst as T, StringLiteralExprAst as U, Range as V, StringLiteralQuote as W, TokenAtOffset as X, TaggedLiteralExprAst as Y, TypeAnnotationAst as Z, GenericBlockDeclarationAst as _, AttributeAst as a, dottedPathsIn as at, GreenNode as b, BracedBlock as c, findFirstChild as ct, DiagnosticSource as d, mapPslDiagnostics as dt, castExpression as et, DocumentAst as f, parse as ft, FunctionCallAst as g, FieldDeclarationAst as h, AttributeArgListAst as i, diagnosticSource as it, ObjectFieldAst as j, NamespaceMemberAst as k, CompositeTypeDeclarationAst as l, greenNode as lt, FieldAttributeAst as m, AstNode as n, createSyntaxTree as nt, BlockMemberAst as o, filterChildren as ot, ExpressionAst as p, printSyntax as pt, SyntaxNode as q, AttributeArgAst as r, diagnosticFromSpan as rt, BooleanLiteralExprAst as s, findChildToken as st, ArrayLiteralAst as t, createPslDiagnosticCollector as tt, DeclarationAst as u, greenToken as ut, GenericBlockMemberAst as v, KeyValuePairAst as w, GreenToken as x, GreenElement as y, PslSources as z };
|
|
528
|
-
//# sourceMappingURL=parse-GXhoypXR-
|
|
528
|
+
//# sourceMappingURL=parse-GXhoypXR-pRzlssbl.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parse-GXhoypXR-
|
|
1
|
+
{"version":3,"file":"parse-GXhoypXR-pRzlssbl.d.mts","names":[],"sources":["../../../../1-framework/2-authoring/psl-parser/dist/parse-GXhoypXR.d.mts"],"mappings":";;;;;;;;KAKK;;;UAGK;WACC;WACA,MAAM;WACN;;UAED;WACC;WACA,MAAM;WACN,UAAU,cAAc;WACxB;;KAEN,eAAe,YAAY;iBACf,WAAW,MAAM,WAAW,eAAe;iBAC3C,UAAU,MAAM,YAAY,UAAU,cAAc,gBAAgB;;;;;;;;;;cAUvE,uBAAuB;WAC1B,OAAO;WACP,MAAM;WACN;WACA;WACA,QAAQ;;WAER;EACT,YAAY,OAAO,YAAY,gBAAgB,QAAQ,YAAY;MAC/D;MACA;;EAEJ,SAAS;EACT,UAAU;;MAEN,sBAAsB;;MAEtB,sBAAsB;;MAEtB,aAAa;;MAEb,aAAa;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pB,OAAO;EACP,UAAU;EACV,SAAS;;EAET,cAAc,SAAS;SAChB,KAAK,MAAM,aAAa;;cAEnB,+BAA+B,SAAS;WAC3C,QAAQ;EACjB,YAAY,QAAQ;EACpB,QAAQ;EACR,kBAAkB;EAClB,cAAc,SAAS;EACvB;SACO,KAAK,MAAM,aAAa;;cAEnB,mCAAmC,SAAS;WAC/C,QAAQ;EACjB,YAAY,QAAQ;EACpB,QAAQ;EACR,UAAU;EACV,kBAAkB;EAClB,cAAc,SAAS;EACvB;SACO,KAAK,MAAM,aAAa;;;;KAI5B,kBAAkB;UACb;WACC,UAAU;WACV,sBAAsB;WACtB,SAAS;;;;;;iBAMH,MAAM,gBAAgB,kBAAkB,UAAU,mBAAmB"}
|
package/dist/psl-parser.d.mts
CHANGED
|
@@ -6,11 +6,11 @@ import { m as WrittenScalar, n as DataTypeSupport } from "./written-value-CNeNAo
|
|
|
6
6
|
import "./authoring-DGSsfqRj.mjs";
|
|
7
7
|
import "./codec-CBvtmEz2.mjs";
|
|
8
8
|
import { C as PslTypesBlock, O as flatPslModels, S as PslTypeConstructorCall, _ as PslModelAttribute, a as PslAttributePositionalArgument, c as PslDefaultFunctionValue, f as PslDocumentAst, g as PslModel, i as PslAttributeNamedArgument, j as namespacePslExtensionBlocks, l as PslDefaultLiteralValue, m as PslFieldAttribute, n as PslAttribute, o as PslAttributeTarget, p as PslField, r as PslAttributeArgument, s as PslCompositeType, u as PslDefaultValue, v as PslNamedTypeDeclaration, y as PslNamespace } from "./psl-ast-Ck6mEWGG-DYkcqsFz.mjs";
|
|
9
|
-
import {
|
|
9
|
+
import { r as AssembledAuthoringContributions } from "./control-CdQIjZLo.mjs";
|
|
10
10
|
import "./psl-ast-HnFe3DUL.mjs";
|
|
11
11
|
import { i as isPslIdentifier } from "./tokenizer-DW30uwhx-BHsWTwYk.mjs";
|
|
12
|
-
import { L as PslDiagnostic, R as PslDiagnosticCollector, T as ModelAttributeAst, d as DiagnosticSource, dt as mapPslDiagnostics, it as diagnosticSource, m as FieldAttributeAst, n as AstNode, p as ExpressionAst, q as SyntaxNode, r as AttributeArgAst, rt as diagnosticFromSpan, tt as createPslDiagnosticCollector, z as PslSources } from "./parse-GXhoypXR-
|
|
13
|
-
import { $ as NamedOut, A as DescribeUnresolvedType, At as TaggedLiteralArgType, B as FixedStrArgType, Bt as createBinder, C as ContributedTypeNamespace, Ct as ResolvedEntityReference, D as CtxOf, Dt as ScopeResolution, E as CreateBinderInput, Et as Scope, F as FieldAttributeCtx, Ft as UnrestrictedNumArgType, G as InferAttr, Gt as memberEntries, H as FuncCallSig, Ht as isNamespaceLike, I as FieldRefArgType, It as UnrestrictedStrArgType, J as JsonArgType, Jt as readResolvedAttributes, K as InspectableArgType, Kt as nodePslSpan, L as FieldSymbol, Lt as UnsupportedAttribute, M as EntityDeclaration, Mt as TypedFuncCall, N as EntityRefArgType, Nt as UnresolvedTypeReference, O as DataTypeValueArgType, Ot as SymbolTable, P as EntitySelector, Pt as UnrestrictedIdentifierArgType, Q as ModelSymbol, R as FixedIdentifierArgType, Rt as buildSymbolTable, S as ContributedTypeDescriptor, St as ResolvedAttributeArg, T as ContributedTypeSymbol, Tt as ResolvedTypeConstructorCall, U as FunctionSymbol, Ut as keywordPslSpan, V as FuncCallArgType, Vt as entityReference, W as IdentifierArgType, Wt as matchesSelector, X as ListArgType, Xt as typeReferenceNode, Y as JsonValueArgType, Yt as readResolvedConstructorCall, Z as ModelAttributeCtx, _ as CompositeTypeSymbol, _t as ReferencedFieldRefArgType, a as AttributeLevel, at as OneOfArgType, b as ContributedMember, bt as Resolution, c as AttributeSymbol, ct as PSL_UNRESOLVED_REFERENCE, d as BinderResult, dt as ParsedTaggedLiteral, et as NamedTypeSymbol, f as BlockAttributeCtx, ft as ParsedTypedValue, g as BuildSymbolTableOptions, gt as RecordArgType, h as BoundSpec, ht as PslSymbol, i as AttributeCtx, it as NumLiteralArgType, j as DescribeUnsupportedAttribute, jt as TopLevelScope, k as DeclarationFor, kt as SymbolTableResult, l as Binder, lt as Param, m as BoolArgType, mt as PositionalParam, n as ArgType, nt as NullArgType, o as AttributeOut, ot as OptionalArgType, p as BlockSymbol, pt as PosOut, q as IntArgType, qt as readResolvedAttribute, r as ArgTypeKind, rt as NumLiteral, s as AttributeSpec, st as OutOf, t as AnyArgType, tt as NamespaceSymbol, u as BinderContext, ut as ParameterSymbol, v as ConstantSymbol, vt as RejectingArgType, w as ContributedTypeScope, wt as ResolvedNamedTypeBinding, x as ContributedNamespaceSymbol, xt as ResolvedAttribute, y as ContextForRequirement, yt as RequiredContextFor, z as FixedNumArgType, zt as contributedTypeOf } from "./binder-CfxKD8hm-
|
|
12
|
+
import { L as PslDiagnostic, R as PslDiagnosticCollector, T as ModelAttributeAst, d as DiagnosticSource, dt as mapPslDiagnostics, it as diagnosticSource, m as FieldAttributeAst, n as AstNode, p as ExpressionAst, q as SyntaxNode, r as AttributeArgAst, rt as diagnosticFromSpan, tt as createPslDiagnosticCollector, z as PslSources } from "./parse-GXhoypXR-pRzlssbl.mjs";
|
|
13
|
+
import { $ as NamedOut, A as DescribeUnresolvedType, At as TaggedLiteralArgType, B as FixedStrArgType, Bt as createBinder, C as ContributedTypeNamespace, Ct as ResolvedEntityReference, D as CtxOf, Dt as ScopeResolution, E as CreateBinderInput, Et as Scope, F as FieldAttributeCtx, Ft as UnrestrictedNumArgType, G as InferAttr, Gt as memberEntries, H as FuncCallSig, Ht as isNamespaceLike, I as FieldRefArgType, It as UnrestrictedStrArgType, J as JsonArgType, Jt as readResolvedAttributes, K as InspectableArgType, Kt as nodePslSpan, L as FieldSymbol, Lt as UnsupportedAttribute, M as EntityDeclaration, Mt as TypedFuncCall, N as EntityRefArgType, Nt as UnresolvedTypeReference, O as DataTypeValueArgType, Ot as SymbolTable, P as EntitySelector, Pt as UnrestrictedIdentifierArgType, Q as ModelSymbol, R as FixedIdentifierArgType, Rt as buildSymbolTable, S as ContributedTypeDescriptor, St as ResolvedAttributeArg, T as ContributedTypeSymbol, Tt as ResolvedTypeConstructorCall, U as FunctionSymbol, Ut as keywordPslSpan, V as FuncCallArgType, Vt as entityReference, W as IdentifierArgType, Wt as matchesSelector, X as ListArgType, Xt as typeReferenceNode, Y as JsonValueArgType, Yt as readResolvedConstructorCall, Z as ModelAttributeCtx, _ as CompositeTypeSymbol, _t as ReferencedFieldRefArgType, a as AttributeLevel, at as OneOfArgType, b as ContributedMember, bt as Resolution, c as AttributeSymbol, ct as PSL_UNRESOLVED_REFERENCE, d as BinderResult, dt as ParsedTaggedLiteral, et as NamedTypeSymbol, f as BlockAttributeCtx, ft as ParsedTypedValue, g as BuildSymbolTableOptions, gt as RecordArgType, h as BoundSpec, ht as PslSymbol, i as AttributeCtx, it as NumLiteralArgType, j as DescribeUnsupportedAttribute, jt as TopLevelScope, k as DeclarationFor, kt as SymbolTableResult, l as Binder, lt as Param, m as BoolArgType, mt as PositionalParam, n as ArgType, nt as NullArgType, o as AttributeOut, ot as OptionalArgType, p as BlockSymbol, pt as PosOut, q as IntArgType, qt as readResolvedAttribute, r as ArgTypeKind, rt as NumLiteral, s as AttributeSpec, st as OutOf, t as AnyArgType, tt as NamespaceSymbol, u as BinderContext, ut as ParameterSymbol, v as ConstantSymbol, vt as RejectingArgType, w as ContributedTypeScope, wt as ResolvedNamedTypeBinding, x as ContributedNamespaceSymbol, xt as ResolvedAttribute, y as ContextForRequirement, yt as RequiredContextFor, z as FixedNumArgType, zt as contributedTypeOf } from "./binder-CfxKD8hm-D5RMNOlu.mjs";
|
|
14
14
|
//#region ../../../1-framework/2-authoring/psl-parser/dist/index.d.mts
|
|
15
15
|
//#region src/attribute-helpers.d.ts
|
|
16
16
|
declare function getPositionalArgument(attribute: PslAttribute, index?: number): string | undefined;
|
package/dist/psl-parser.mjs
CHANGED
|
@@ -3,7 +3,7 @@ import { t as InternalError } from "./internal-error-ChGYPVpq-DhUD05u0.mjs";
|
|
|
3
3
|
import { a as or, i as okVoid, n as notOk, r as ok, t as and } from "./result-8OXF26MN.mjs";
|
|
4
4
|
import { r as createDataTypeLookup } from "./data-type-4xQlxYB5-DD158cOq.mjs";
|
|
5
5
|
import { S as isAuthoringPslBlockDescriptor, f as describeTaggedLiteralFailure, x as isAuthoringModelAttributeDescriptor } from "./temporal-presets-DUCEijgt-FF49h-O0.mjs";
|
|
6
|
-
import { _ as tagForm, a as describeExpected, g as readWrittenValue, i as describeAdmittedForms, n as admittedTags, o as describeRefusal, r as castTypedValue, t as admittedForms, u as exactRewrite } from "./authoring-
|
|
6
|
+
import { _ as tagForm, a as describeExpected, g as readWrittenValue, i as describeAdmittedForms, n as admittedTags, o as describeRefusal, r as castTypedValue, t as admittedForms, u as exactRewrite } from "./authoring-Doh4Co1l.mjs";
|
|
7
7
|
import { a as flatPslModels, c as namespacePslExtensionBlocks } from "./psl-ast-CyvE6CR-.mjs";
|
|
8
8
|
import { n as isPslIdentifier } from "./tokenizer-BMz7z2KR-J0yZ4im3.mjs";
|
|
9
9
|
import { C as TaggedLiteralExprAst, S as StringLiteralExprAst, T as TypesBlockAst, _ as NumberLiteralExprAst, a as CompositeTypeDeclarationAst, b as PathExprAst, d as IdentifierAst, g as NamespaceDeclarationAst, i as BooleanLiteralExprAst, l as FunctionCallAst, m as ModelDeclarationAst, t as ArrayLiteralAst, u as GenericBlockDeclarationAst, y as ObjectLiteralExprAst } from "./declarations-5xLxC310-CwLYk_p4.mjs";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { h as PslParserOptions } from "./config-types-
|
|
1
|
+
import { h as PslParserOptions } from "./config-types-CzRkQS8v.mjs";
|
|
2
2
|
//#region ../../../1-framework/2-authoring/psl-parser/dist/format.d.mts
|
|
3
3
|
//#region src/format/options.d.ts
|
|
4
4
|
interface FormatOptions {
|
|
@@ -3,9 +3,9 @@ import { $ as instantiateAuthoringFieldPreset, C as AuthoringPslBlockDescriptorN
|
|
|
3
3
|
import { r as Result } from "./result-BYCOANWy.mjs";
|
|
4
4
|
import "./authoring-DGSsfqRj.mjs";
|
|
5
5
|
import "./psl-ast-HnFe3DUL.mjs";
|
|
6
|
-
import { c as ContractSourceProvider, n as ContractSourceContext, o as ContractSourceDiagnostics, p as PslContractSourceProvider, r as ContractSourceDiagnostic } from "./config-types-
|
|
7
|
-
import { L as PslDiagnostic, R as PslDiagnosticCollector, d as DiagnosticSource, f as DocumentAst, z as PslSources } from "./parse-GXhoypXR-
|
|
8
|
-
import { L as FieldSymbol, Ot as SymbolTable, St as ResolvedAttributeArg, Tt as ResolvedTypeConstructorCall, l as Binder, p as BlockSymbol } from "./binder-CfxKD8hm-
|
|
6
|
+
import { c as ContractSourceProvider, n as ContractSourceContext, o as ContractSourceDiagnostics, p as PslContractSourceProvider, r as ContractSourceDiagnostic } from "./config-types-CzRkQS8v.mjs";
|
|
7
|
+
import { L as PslDiagnostic, R as PslDiagnosticCollector, d as DiagnosticSource, f as DocumentAst, z as PslSources } from "./parse-GXhoypXR-pRzlssbl.mjs";
|
|
8
|
+
import { L as FieldSymbol, Ot as SymbolTable, St as ResolvedAttributeArg, Tt as ResolvedTypeConstructorCall, l as Binder, p as BlockSymbol } from "./binder-CfxKD8hm-D5RMNOlu.mjs";
|
|
9
9
|
//#region ../../../1-framework/2-authoring/psl-parser/dist/interpret.d.mts
|
|
10
10
|
//#region src/authoring-arguments.d.ts
|
|
11
11
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { n as TokenKind } from "./tokenizer-DW30uwhx-BHsWTwYk.mjs";
|
|
2
|
-
import { $ as any, A as NumberLiteralExprAst, B as QualifiedNameAst, C as IdentifierAst, D as NamedTypeDeclarationAst, E as ModelDeclarationAst, F as PathExprAst, G as SyntaxElement, H as SourceFile, I as Position, J as SyntaxToken, K as SyntaxKind, M as ObjectLiteralExprAst, N as ParseDiagnostic, O as NamespaceDeclarationAst, P as ParseResult, Q as TypesBlockAst, S as HasDocComment, T as ModelAttributeAst, U as StringLiteralExprAst, V as Range, W as StringLiteralQuote, X as TokenAtOffset, Y as TaggedLiteralExprAst, Z as TypeAnnotationAst, _ as GenericBlockDeclarationAst, a as AttributeAst, at as dottedPathsIn, b as GreenNode, c as BracedBlock, ct as findFirstChild, et as castExpression, f as DocumentAst, ft as parse, g as FunctionCallAst, h as FieldDeclarationAst, i as AttributeArgListAst, j as ObjectFieldAst, k as NamespaceMemberAst, l as CompositeTypeDeclarationAst, lt as greenNode, m as FieldAttributeAst, n as AstNode, nt as createSyntaxTree, o as BlockMemberAst, ot as filterChildren, p as ExpressionAst, pt as printSyntax, q as SyntaxNode, r as AttributeArgAst, s as BooleanLiteralExprAst, st as findChildToken, t as ArrayLiteralAst, u as DeclarationAst, ut as greenToken, v as GenericBlockMemberAst, w as KeyValuePairAst, x as GreenToken, y as GreenElement, z as PslSources } from "./parse-GXhoypXR-
|
|
2
|
+
import { $ as any, A as NumberLiteralExprAst, B as QualifiedNameAst, C as IdentifierAst, D as NamedTypeDeclarationAst, E as ModelDeclarationAst, F as PathExprAst, G as SyntaxElement, H as SourceFile, I as Position, J as SyntaxToken, K as SyntaxKind, M as ObjectLiteralExprAst, N as ParseDiagnostic, O as NamespaceDeclarationAst, P as ParseResult, Q as TypesBlockAst, S as HasDocComment, T as ModelAttributeAst, U as StringLiteralExprAst, V as Range, W as StringLiteralQuote, X as TokenAtOffset, Y as TaggedLiteralExprAst, Z as TypeAnnotationAst, _ as GenericBlockDeclarationAst, a as AttributeAst, at as dottedPathsIn, b as GreenNode, c as BracedBlock, ct as findFirstChild, et as castExpression, f as DocumentAst, ft as parse, g as FunctionCallAst, h as FieldDeclarationAst, i as AttributeArgListAst, j as ObjectFieldAst, k as NamespaceMemberAst, l as CompositeTypeDeclarationAst, lt as greenNode, m as FieldAttributeAst, n as AstNode, nt as createSyntaxTree, o as BlockMemberAst, ot as filterChildren, p as ExpressionAst, pt as printSyntax, q as SyntaxNode, r as AttributeArgAst, s as BooleanLiteralExprAst, st as findChildToken, t as ArrayLiteralAst, u as DeclarationAst, ut as greenToken, v as GenericBlockMemberAst, w as KeyValuePairAst, x as GreenToken, y as GreenElement, z as PslSources } from "./parse-GXhoypXR-pRzlssbl.mjs";
|
|
3
3
|
//#region ../../../1-framework/2-authoring/psl-parser/dist/syntax.d.mts
|
|
4
4
|
//#region src/syntax/green-builder.d.ts
|
|
5
5
|
declare class GreenNodeBuilder {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@prisma/orm-framework",
|
|
3
|
-
"version": "8.0.0-rc.16-dev.
|
|
3
|
+
"version": "8.0.0-rc.16-dev.8",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -16,20 +16,20 @@
|
|
|
16
16
|
"uniku": "^0.5.0"
|
|
17
17
|
},
|
|
18
18
|
"devDependencies": {
|
|
19
|
-
"@internal/config": "8.0.0-rc.16-dev.
|
|
20
|
-
"@internal/contract": "8.0.0-rc.16-dev.
|
|
21
|
-
"@internal/contract-authoring": "8.0.0-rc.16-dev.
|
|
22
|
-
"@internal/errors": "8.0.0-rc.16-dev.
|
|
23
|
-
"@internal/framework-components": "8.0.0-rc.16-dev.
|
|
24
|
-
"@internal/ids": "8.0.0-rc.16-dev.
|
|
25
|
-
"@internal/operations": "8.0.0-rc.16-dev.
|
|
26
|
-
"@internal/psl-parser": "8.0.0-rc.16-dev.
|
|
27
|
-
"@internal/psl-printer": "8.0.0-rc.16-dev.
|
|
28
|
-
"@internal/ts-render": "8.0.0-rc.16-dev.
|
|
29
|
-
"@repo/tsconfig": "8.0.0-rc.16-dev.
|
|
30
|
-
"@internal/publish-surface": "8.0.0-rc.16-dev.
|
|
31
|
-
"@repo/tsdown": "8.0.0-rc.16-dev.
|
|
32
|
-
"@internal/utils": "8.0.0-rc.16-dev.
|
|
19
|
+
"@internal/config": "8.0.0-rc.16-dev.8",
|
|
20
|
+
"@internal/contract": "8.0.0-rc.16-dev.8",
|
|
21
|
+
"@internal/contract-authoring": "8.0.0-rc.16-dev.8",
|
|
22
|
+
"@internal/errors": "8.0.0-rc.16-dev.8",
|
|
23
|
+
"@internal/framework-components": "8.0.0-rc.16-dev.8",
|
|
24
|
+
"@internal/ids": "8.0.0-rc.16-dev.8",
|
|
25
|
+
"@internal/operations": "8.0.0-rc.16-dev.8",
|
|
26
|
+
"@internal/psl-parser": "8.0.0-rc.16-dev.8",
|
|
27
|
+
"@internal/psl-printer": "8.0.0-rc.16-dev.8",
|
|
28
|
+
"@internal/ts-render": "8.0.0-rc.16-dev.8",
|
|
29
|
+
"@repo/tsconfig": "8.0.0-rc.16-dev.8",
|
|
30
|
+
"@internal/publish-surface": "8.0.0-rc.16-dev.8",
|
|
31
|
+
"@repo/tsdown": "8.0.0-rc.16-dev.8",
|
|
32
|
+
"@internal/utils": "8.0.0-rc.16-dev.8",
|
|
33
33
|
"tsdown": "0.22.14",
|
|
34
34
|
"typescript": "5.9.3",
|
|
35
35
|
"vitest": "5.0.0-rc.2"
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"control-BaynP47g-Bg8xTRS3.mjs","names":[],"sources":["../../../../1-framework/1-core/errors/dist/control-BaynP47g.mjs"],"sourcesContent":["import { ifDefined } from \"@internal/utils/defined\";\nimport { docsUrlFor } from \"@internal/utils/structured-error\";\n//#region src/control.ts\n/**\n* Structured CLI error that contains all information needed for error envelopes.\n* Call sites throw these errors with full context.\n*\n* A `CliStructuredError` is a `StructuredError` (see\n* `@internal/utils/structured-error`): `code` is a dotted\n* `NAMESPACE.SUBCODE` string, and the namespace prefix is the error's\n* category — there is no separate `domain` field. See\n* [ADR 239](../../../../../docs/architecture%20docs/adrs/ADR%20239%20-%20Errors%20are%20structural%20envelopes%20with%20dotted%20namespace%20codes.md)\n* for the namespace taxonomy.\n*/\nvar CliStructuredError = class extends Error {\n\tcode;\n\tseverity;\n\tconstructor(code, summary, options) {\n\t\tsuper(summary, options?.cause !== void 0 ? { cause: options.cause } : void 0);\n\t\tthis.name = \"CliStructuredError\";\n\t\tthis.code = code;\n\t\tthis.severity = options?.severity ?? \"error\";\n\t\tconst fix = options?.fix === options?.why ? void 0 : options?.fix;\n\t\tconst where = options?.where ? {\n\t\t\t...ifDefined(\"path\", options.where.path),\n\t\t\t...ifDefined(\"line\", options.where.line)\n\t\t} : void 0;\n\t\tObject.assign(this, {\n\t\t\t...ifDefined(\"why\", options?.why),\n\t\t\t...ifDefined(\"fix\", fix),\n\t\t\t...ifDefined(\"nextActions\", options?.nextActions),\n\t\t\t...ifDefined(\"diagnostics\", options?.diagnostics),\n\t\t\t...ifDefined(\"where\", where),\n\t\t\t...ifDefined(\"meta\", options?.meta),\n\t\t\t...ifDefined(\"docsUrl\", options?.docsUrl)\n\t\t});\n\t}\n\t/**\n\t* Converts this error to a CLI error envelope for output formatting.\n\t*\n\t* This is the boundary that emits the envelope, so it is where a missing\n\t* `nextActions` becomes `[]`.\n\t*/\n\ttoEnvelope() {\n\t\treturn {\n\t\t\tok: false,\n\t\t\tcode: this.code,\n\t\t\tseverity: this.severity,\n\t\t\tsummary: this.message,\n\t\t\t...ifDefined(\"why\", this.why),\n\t\t\t...ifDefined(\"fix\", this.fix),\n\t\t\tnextActions: this.nextActions ?? [],\n\t\t\t...ifDefined(\"diagnostics\", this.diagnostics),\n\t\t\t...ifDefined(\"where\", this.where),\n\t\t\t...ifDefined(\"meta\", this.meta),\n\t\t\t...ifDefined(\"docsUrl\", this.docsUrl)\n\t\t};\n\t}\n\t/**\n\t* Type guard to check if an error is a CliStructuredError.\n\t* Uses duck-typing to work across module boundaries where instanceof may fail.\n\t*/\n\tstatic is(error) {\n\t\tif (!(error instanceof Error)) return false;\n\t\tconst candidate = error;\n\t\treturn candidate.name === \"CliStructuredError\" && typeof candidate.code === \"string\" && typeof candidate.toEnvelope === \"function\";\n\t}\n};\n/**\n* Config file not found or missing.\n*/\nfunction errorConfigFileNotFound(configPath, options) {\n\treturn new CliStructuredError(\"CONFIG.FILE_NOT_FOUND\", \"Config file not found\", {\n\t\t...options?.why ? { why: options.why } : { why: \"Config file not found\" },\n\t\tfix: \"Run '{bin} orm init' to create a config file\",\n\t\tnextActions: [{\n\t\t\tkind: \"run-command\",\n\t\t\tlabel: \"Create a config file\",\n\t\t\tcommand: \"{bin} orm init\"\n\t\t}],\n\t\tdocsUrl: docsUrlFor(\"CONFIG.FILE_NOT_FOUND\"),\n\t\t...configPath ? { where: { path: configPath } } : {}\n\t});\n}\n/**\n* Config module failed to evaluate (syntax error, module threw during import).\n*/\nfunction errorConfigEvaluationFailed(configPath, options) {\n\treturn new CliStructuredError(\"CONFIG.EVALUATION_FAILED\", \"Config file could not be evaluated\", {\n\t\twhy: options.why,\n\t\tfix: \"Fix the error in your prisma.config.ts so the module evaluates, then rerun the command\",\n\t\tdocsUrl: docsUrlFor(\"CONFIG.EVALUATION_FAILED\"),\n\t\t...configPath ? { where: { path: configPath } } : {},\n\t\t...options.cause !== void 0 ? { cause: options.cause } : {}\n\t});\n}\n/**\n* Config module evaluated, but its export does not carry the definePrismaConfig\n* version marker (plain object export, or a config produced by a different\n* defineConfig such as classic Prisma's).\n*/\nfunction errorConfigVersionMarkerMissing(configPath) {\n\treturn new CliStructuredError(\"CONFIG.VERSION_MARKER_MISSING\", \"Config is not a definePrismaConfig result\", {\n\t\twhy: \"The config module evaluated, but its default export was not created by a current definePrismaConfig\",\n\t\tfix: \"Create the config with definePrismaConfig from '@prisma/cli-engine', nest your settings under its `orm` section, and export its return value directly\",\n\t\tdocsUrl: docsUrlFor(\"CONFIG.VERSION_MARKER_MISSING\"),\n\t\t...configPath ? { where: { path: configPath } } : {}\n\t});\n}\n/**\n* Contract configuration missing from config.\n*/\nfunction errorContractConfigMissing(options) {\n\treturn new CliStructuredError(\"CONFIG.CONTRACT_MISSING\", \"Contract configuration missing\", {\n\t\twhy: options?.why ?? \"The contract configuration is required for emit\",\n\t\tfix: \"Add contract configuration to your prisma.config.ts\",\n\t\tdocsUrl: docsUrlFor(\"CONFIG.CONTRACT_MISSING\")\n\t});\n}\n/**\n* Contract validation failed.\n*/\nfunction errorContractValidationFailed(reason, options) {\n\treturn new CliStructuredError(\"CONTRACT.VALIDATION_FAILED\", \"Contract validation failed\", {\n\t\twhy: reason,\n\t\tfix: \"Re-run `{bin} contract emit`, or fix the contract file and try again\",\n\t\tnextActions: [{\n\t\t\tkind: \"run-command\",\n\t\t\tlabel: \"Re-emit the contract\",\n\t\t\tcommand: \"{bin} contract emit\"\n\t\t}, {\n\t\t\tkind: \"edit-file\",\n\t\t\tlabel: \"Fix the contract file, then re-run the command\",\n\t\t\treason\n\t\t}],\n\t\tdocsUrl: docsUrlFor(\"CONTRACT.VALIDATION_FAILED\"),\n\t\t...options?.where ? { where: options.where } : {},\n\t\t...ifDefined(\"cause\", options?.cause)\n\t});\n}\n/**\n* File not found.\n*/\nfunction errorFileNotFound(filePath, options) {\n\treturn new CliStructuredError(\"CLI.FILE_NOT_FOUND\", \"File not found\", {\n\t\twhy: options?.why ?? `File not found: ${filePath}`,\n\t\tfix: options?.fix ?? \"Check that the file path is correct\",\n\t\twhere: { path: filePath },\n\t\t...options?.docsUrl ? { docsUrl: options.docsUrl } : {},\n\t\t...ifDefined(\"cause\", options?.cause)\n\t});\n}\n/**\n* Database connection is required but not provided.\n*/\nfunction errorDatabaseConnectionRequired(options) {\n\tconst runHint = options?.retryCommand ? `Run \\`${options.retryCommand}\\`` : options?.commandName ? `Run \\`{bin} ${options.commandName} --db <url>\\`` : \"Provide `--db <url>`\";\n\treturn new CliStructuredError(\"CONFIG.DB_CONNECTION_REQUIRED\", \"Database connection is required\", {\n\t\twhy: options?.why ?? \"Database connection is required for this command\",\n\t\tfix: `${runHint}, or set \\`db: { connection: \"postgres://…\" }\\` in prisma.config.ts`,\n\t\t...options?.missingFlags !== void 0 ? { meta: { missingFlags: [...options.missingFlags] } } : {}\n\t});\n}\n/**\n* Query runner factory is required but not provided in config.\n*/\nfunction errorQueryRunnerFactoryRequired(options) {\n\treturn new CliStructuredError(\"CONFIG.QUERY_RUNNER_FACTORY_REQUIRED\", \"Query runner factory is required\", {\n\t\twhy: options?.why ?? \"Config.db.queryRunnerFactory is required for db verify\",\n\t\tfix: \"Add db.queryRunnerFactory to prisma.config.ts\",\n\t\tdocsUrl: docsUrlFor(\"CONFIG.QUERY_RUNNER_FACTORY_REQUIRED\")\n\t});\n}\n/**\n* Family verify.readMarker is required but not provided.\n*/\nfunction errorFamilyReadMarkerSqlRequired(options) {\n\treturn new CliStructuredError(\"CONFIG.FAMILY_READ_MARKER_REQUIRED\", \"Family readMarker() is required\", {\n\t\twhy: options?.why ?? \"Family verify.readMarker is required for db verify\",\n\t\tfix: \"Ensure family.verify.readMarker() is exported by your family package\",\n\t\tdocsUrl: docsUrlFor(\"CONFIG.FAMILY_READ_MARKER_REQUIRED\")\n\t});\n}\n/**\n* JSON output format not supported.\n*/\nfunction errorJsonFormatNotSupported(options) {\n\treturn new CliStructuredError(\"CLI.JSON_FORMAT_UNSUPPORTED\", \"Unsupported JSON format\", {\n\t\twhy: `The ${options.command} command does not support --json ${options.format}`,\n\t\tfix: `Use --json ${options.supportedFormats.join(\" or \")}, or omit --json for human output`,\n\t\tmeta: {\n\t\t\tcommand: options.command,\n\t\t\tformat: options.format,\n\t\t\tsupportedFormats: options.supportedFormats\n\t\t}\n\t});\n}\n/**\n* Driver is required for DB-connected commands but not provided.\n*/\nfunction errorDriverRequired(options) {\n\treturn new CliStructuredError(\"CONFIG.DRIVER_REQUIRED\", \"Driver is required for DB-connected commands\", {\n\t\twhy: options?.why ?? \"Config.driver is required for DB-connected commands\",\n\t\tfix: \"Add a control-plane driver to prisma.config.ts (e.g. import a driver descriptor and set `driver: postgresDriver`)\",\n\t\tdocsUrl: docsUrlFor(\"CONFIG.DRIVER_REQUIRED\")\n\t});\n}\n/**\n* Contract requires extension packs that are not provided by config descriptors.\n*/\nfunction errorContractMissingExtensions(options) {\n\tconst missing = [...options.missingExtensions].sort();\n\treturn new CliStructuredError(\"CONFIG.MISSING_EXTENSION_PACKS\", \"Missing extension packs in config\", {\n\t\twhy: missing.length === 1 ? `Contract requires extension pack '${missing[0]}', but CLI config does not provide a matching descriptor.` : `Contract requires extension packs ${missing.map((p) => `'${p}'`).join(\", \")}, but CLI config does not provide matching descriptors.`,\n\t\tfix: \"Add the missing extension descriptors to `extensions` in prisma.config.ts\",\n\t\tdocsUrl: docsUrlFor(\"CONFIG.MISSING_EXTENSION_PACKS\"),\n\t\tmeta: {\n\t\t\tmissingExtensions: missing,\n\t\t\tprovidedComponentIds: [...options.providedComponentIds].sort()\n\t\t}\n\t});\n}\n/**\n* Migration planning failed due to conflicts.\n*/\nfunction errorMigrationPlanningFailed(options) {\n\tconst conflictSummaries = options.conflicts.map((c) => c.summary);\n\tconst computedWhy = options.why ?? conflictSummaries.join(\"\\n\");\n\tconst conflictFixes = options.conflicts.map((c) => c.why).filter((why) => typeof why === \"string\");\n\treturn new CliStructuredError(\"MIGRATION.PLANNING_FAILED\", \"Migration planning failed\", {\n\t\twhy: computedWhy,\n\t\tfix: conflictFixes.length > 0 ? conflictFixes.join(\"\\n\") : \"Use `db verify --schema-only` to inspect conflicts, or ensure the database is empty\",\n\t\tmeta: { conflicts: options.conflicts },\n\t\tdocsUrl: docsUrlFor(\"MIGRATION.PLANNING_FAILED\")\n\t});\n}\n/**\n* Target does not support migrations (missing createPlanner/createRunner).\n*/\nfunction errorTargetMigrationNotSupported(options) {\n\treturn new CliStructuredError(\"MIGRATION.TARGET_UNSUPPORTED\", \"Target does not support migrations\", {\n\t\twhy: options?.why ?? \"The configured target does not provide migration planner/runner\",\n\t\tfix: \"Select a target that provides migrations (it must export `target.migrations` for db init)\",\n\t\tdocsUrl: docsUrlFor(\"MIGRATION.TARGET_UNSUPPORTED\")\n\t});\n}\n/**\n* The migration-file CLI received `--config` without a path argument (either\n* a bare trailing `--config`, or `--config` followed by another flag like\n* `--config --dry-run`). Surfacing this as a structured error fails fast\n* rather than silently consuming the next flag as the config path or\n* falling back to default discovery against the wrong project.\n*/\nfunction errorMigrationCliInvalidConfigArg(options) {\n\treturn new CliStructuredError(\"CLI.CONFIG_ARG_MISSING_PATH\", \"--config flag requires a path argument\", {\n\t\twhy: options?.nextToken !== void 0 ? `\\`--config\\` was followed by another flag (\\`${options.nextToken}\\`) instead of a path argument.` : \"`--config` was passed without a following path argument.\",\n\t\tfix: \"Pass a config path: `--config <path>` or `--config=<path>`.\",\n\t\tmeta: options?.nextToken !== void 0 ? { nextToken: options.nextToken } : {}\n\t});\n}\n/**\n* The migration-file CLI received a flag it does not recognise. Surfaced as a\n* structured error so consumers can render their own \"did you mean\"\n* suggestions from `meta.knownFlags` rather than parsing the message.\n*\n* Designed to wrap clipanion's `UnknownSyntaxError` at the parser boundary:\n* pass the offending token as `flag` and the option declarations as\n* `knownFlags`.\n*/\nfunction errorMigrationCliUnknownFlag(options) {\n\tconst knownList = options.knownFlags.join(\", \");\n\treturn new CliStructuredError(\"CLI.UNKNOWN_FLAG\", \"Unknown migration CLI flag\", {\n\t\twhy: `Unknown flag \\`${options.flag}\\`.`,\n\t\tfix: `Known flags: ${knownList}. Run with \\`--help\\` to see the full list.`,\n\t\tmeta: {\n\t\t\tflag: options.flag,\n\t\t\tknownFlags: options.knownFlags\n\t\t}\n\t});\n}\n/**\n* The main CLI received an unsupported `--format` value.\n*/\nfunction errorInvalidOutputFormat(value) {\n\treturn new CliStructuredError(\"CLI.INVALID_OUTPUT_FORMAT\", `Invalid --format value \"${value}\". Allowed values: pretty, json.`, { meta: {\n\t\tvalue,\n\t\tallowed: [\"pretty\", \"json\"]\n\t} });\n}\n/**\n* The main CLI received mutually exclusive output format flags\n* (`--format pretty` together with `--json`).\n*/\nfunction errorOutputFormatMutex() {\n\treturn new CliStructuredError(\"CLI.OUTPUT_FORMAT_CONFLICT\", \"Cannot use --format pretty together with --json. Use --format json or --json alone for JSON output.\");\n}\n/**\n* Config validation error (missing required fields).\n*/\nfunction errorConfigValidation(field, options) {\n\treturn new CliStructuredError(\"CONFIG.VALIDATION_FAILED\", \"Config validation error\", {\n\t\twhy: options?.why ?? `Config must have a \"${field}\" field`,\n\t\tfix: \"Check your prisma.config.ts and ensure all required fields are provided\",\n\t\tdocsUrl: docsUrlFor(\"CONFIG.VALIDATION_FAILED\"),\n\t\tmeta: {\n\t\t\tfield,\n\t\t\t...options?.section !== void 0 ? { section: options.section } : {}\n\t\t}\n\t});\n}\n/**\n* An enum declares a codecId that no component in the contract's pack stack provides,\n* so its member values cannot be encoded. Thrown by both authoring paths (TS `defineContract`\n* and PSL interpretation) when the codec lookup built from the contract's packs has no\n* descriptor for the codecId.\n*/\nfunction errorEnumCodecNotInPackStack(options) {\n\treturn new CliStructuredError(\"CONTRACT.ENUM_CODEC_NOT_IN_PACK_STACK\", `Enum codec \"${options.codecId}\" is not part of the contract's pack stack`, {\n\t\twhy: `An enum uses codec \"${options.codecId}\", but no family, target, or extension pack in the contract provides it.`,\n\t\tfix: \"Use a codec provided by the contract's target/extension packs, or add the pack that supplies this codec.\",\n\t\tmeta: { codecId: options.codecId }\n\t});\n}\n/**\n* Generic unexpected error.\n*/\nfunction errorUnexpected(message, options) {\n\treturn new CliStructuredError(\"CLI.UNEXPECTED\", \"Unexpected error\", {\n\t\twhy: options?.why ?? message,\n\t\tfix: options?.fix ?? \"Check the error message and try again\",\n\t\t...ifDefined(\"meta\", options?.meta),\n\t\t...ifDefined(\"cause\", options?.cause)\n\t});\n}\n//#endregion\nexport { errorUnexpected as S, errorMigrationCliUnknownFlag as _, errorConfigVersionMarkerMissing as a, errorQueryRunnerFactoryRequired as b, errorContractValidationFailed as c, errorEnumCodecNotInPackStack as d, errorFamilyReadMarkerSqlRequired as f, errorMigrationCliInvalidConfigArg as g, errorJsonFormatNotSupported as h, errorConfigValidation as i, errorDatabaseConnectionRequired as l, errorInvalidOutputFormat as m, errorConfigEvaluationFailed as n, errorContractConfigMissing as o, errorFileNotFound as p, errorConfigFileNotFound as r, errorContractMissingExtensions as s, CliStructuredError as t, errorDriverRequired as u, errorMigrationPlanningFailed as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,KAAK,uBAAuB,QAAQ,QAAQ;EAC5C,KAAK;EACL,MAAM,EAAE,SAAS,QAAQ,QAAQ;CAClC,CAAC;AACF;;;;AAIA,SAAS,gBAAgB,SAAS,SAAS;CAC1C,OAAO,IAAI,mBAAmB,kBAAkB,oBAAoB;EACnE,KAAK,SAAS,OAAO;EACrB,KAAK,SAAS,OAAO;EACrB,GAAG,UAAU,QAAQ,SAAS,IAAI;EAClC,GAAG,UAAU,SAAS,SAAS,KAAK;CACrC,CAAC;AACF"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"control-CJlRO0fS-DW9k9mRB.d.mts","names":[],"sources":["../../../../1-framework/1-core/errors/dist/control-CJlRO0fS.d.mts"],"mappings":";;;;;;;;;;;;;;;UAcU;WACC;WACA;WACA;WACA;WACA;WACA;WACA,sBAAsB;WACtB,uBAAuB;WACvB;aACE;aACA;;WAEF,OAAO;WACP;;;;;UAKD;WACC;WACA;WACA;;;;;;;;;;;;;cAaG,2BAA2B,iBAAiB;WAC/C;WACA;WACA;WACA;WACA,uBAAuB;WACvB,uBAAuB;WACvB;aACE;aACA;;WAEF,OAAO;WACP;EACT,YAAY,6BAA6B,iBAAiB;aAC/C;aACA;aACA;aACA,uBAAuB;aACvB,uBAAuB;aACvB;eACE;eACA;;aAEF,OAAO;aACP;aACA;;;;;;;;EAQX,cAAc;;;;;SAKP,GAAG,iBAAiB,SAAS;;;;;iBAKrB,wBAAwB,qBAAqB;WACnD;IACP;;;;iBAIa,4BAA4B,gCAAgC;WAClE;WACA;IACP;;;;;;iBAMa,gCAAgC,sBAAsB;;;;iBAItD,2BAA2B;WACjC;IACP;;;;iBAIa,8BAA8B,gBAAgB;WACpD;aACE;aACA;;WAEF;IACP;;;;iBAIa,kBAAkB,kBAAkB;WAC1C;WACA;WACA;WACA;IACP;;;;iBAIa,gCAAgC;WACtC;WACA;WACA;WACA;IACP;;;;iBAIa,gCAAgC;WACtC;IACP;;;;iBAIa,iCAAiC;WACvC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