@prisma/orm-framework 8.0.0-rc.9-dev.5 → 8.0.0-rc.9-dev.7
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/README.md +1 -1
- package/dist/{apply-specifier-default-control-policy-yxEeh3lJ.d.mts → apply-specifier-default-control-policy-C2Njpc_G.d.mts} +2 -2
- package/dist/apply-specifier-default-control-policy-C2Njpc_G.d.mts.map +1 -0
- package/dist/{assertions-Cz-GWH8P.mjs → assertions-Dw1lZz_Q.mjs} +2 -2
- package/dist/{assertions-Cz-GWH8P.mjs.map → assertions-Dw1lZz_Q.mjs.map} +1 -1
- package/dist/{canonicalization-uZb7Sjk2-Dx6ifIWL.d.mts → canonicalization-BAvRuZ2i-IwsqxGme.d.mts} +3 -3
- package/dist/{canonicalization-uZb7Sjk2-Dx6ifIWL.d.mts.map → canonicalization-BAvRuZ2i-IwsqxGme.d.mts.map} +1 -1
- package/dist/{codec-BuNywPrz.mjs → codec-G-sce0J8.mjs} +2 -2
- package/dist/{codec-BuNywPrz.mjs.map → codec-G-sce0J8.mjs.map} +1 -1
- package/dist/components.d.mts +3 -3
- package/dist/components.mjs +4 -4
- package/dist/components__authoring.mjs +1 -1
- package/dist/components__codec.mjs +1 -1
- package/dist/components__control.d.mts +1 -1
- package/dist/components__control.mjs +1 -1
- package/dist/components__emission.d.mts +2 -2
- package/dist/components__ir.mjs +1 -1
- package/dist/{config-types-udmMgDBA.d.mts → config-types-CeduUYkY.d.mts} +4 -4
- package/dist/{config-types-udmMgDBA.d.mts.map → config-types-CeduUYkY.d.mts.map} +1 -1
- package/dist/config.d.mts +1 -1
- package/dist/config__config-types.d.mts +1 -1
- package/dist/contract-authoring.mjs +1 -1
- package/dist/{contract-types-HCUyPohe-CuimQxo_.d.mts → contract-types-Bje5yT4f-0D1Z41Lq.d.mts} +6 -6
- package/dist/{contract-types-HCUyPohe-CuimQxo_.d.mts.map → contract-types-Bje5yT4f-0D1Z41Lq.d.mts.map} +1 -1
- package/dist/contract.d.mts +6 -6
- package/dist/contract__apply-specifier-default-control-policy.d.mts +1 -1
- package/dist/contract__enum-accessor.d.mts +1 -1
- package/dist/contract__hashing-utils.d.mts +1 -1
- package/dist/contract__hashing.d.mts +2 -2
- package/dist/contract__types.d.mts +1 -1
- package/dist/{control-B85tHWHg.mjs → control-BQNAs06v.mjs} +3 -3
- package/dist/{control-B85tHWHg.mjs.map → control-BQNAs06v.mjs.map} +1 -1
- package/dist/{control-B32e7diK.d.mts → control-eH2MIHqA.d.mts} +4 -4
- package/dist/{control-B32e7diK.d.mts.map → control-eH2MIHqA.d.mts.map} +1 -1
- package/dist/{dist-CYHrKNWw.mjs → dist-DUlexZHp.mjs} +2 -2
- package/dist/{dist-CYHrKNWw.mjs.map → dist-DUlexZHp.mjs.map} +1 -1
- package/dist/{emission-Cd3DfQdp.d.mts → emission-BWD6Z6w9.d.mts} +1 -1
- package/dist/{emission-types-BoSJNKfQ-D0NRnZiA.d.mts → emission-types-BoSJNKfQ-B_19ILPP.d.mts} +2 -2
- package/dist/{emission-types-BoSJNKfQ-D0NRnZiA.d.mts.map → emission-types-BoSJNKfQ-B_19ILPP.d.mts.map} +1 -1
- package/dist/{enum-accessor-Gr9UcG-r.d.mts → enum-accessor-PSFq-BB1.d.mts} +2 -2
- package/dist/{enum-accessor-Gr9UcG-r.d.mts.map → enum-accessor-PSFq-BB1.d.mts.map} +1 -1
- package/dist/errors.d.mts +1 -1
- package/dist/errors.mjs +1 -1
- package/dist/errors__execution.d.mts +1 -1
- package/dist/errors__execution.mjs +1 -1
- package/dist/{execution-Dejx90fO.mjs → execution-BEVehm0I.mjs} +2 -2
- package/dist/execution-BEVehm0I.mjs.map +1 -0
- package/dist/{execution-CdhoM1OQ.d.mts → execution-BpT2YjbZ.d.mts} +2 -2
- package/dist/{execution-CdhoM1OQ.d.mts.map → execution-BpT2YjbZ.d.mts.map} +1 -1
- package/dist/{framework-authoring-BvxZnsPY-ZPMm8wzu.mjs → framework-authoring-BvxZnsPY-DlD1nwU5.mjs} +3 -3
- package/dist/{framework-authoring-BvxZnsPY-ZPMm8wzu.mjs.map → framework-authoring-BvxZnsPY-DlD1nwU5.mjs.map} +1 -1
- package/dist/{hashing-D9wV2IJu.d.mts → hashing-BTx0s6Zw.d.mts} +2 -2
- package/dist/{hashing-D9wV2IJu.d.mts.map → hashing-BTx0s6Zw.d.mts.map} +1 -1
- package/dist/{hashing-utils-Bp0ZYY57.d.mts → hashing-utils-Bh9PVd4J.d.mts} +2 -2
- package/dist/{hashing-utils-Bp0ZYY57.d.mts.map → hashing-utils-Bh9PVd4J.d.mts.map} +1 -1
- package/dist/ids__runtime.mjs +1 -1
- package/dist/{internal-error-kK8QvlDE.d.mts → internal-error-2fJ9fcZX.d.mts} +2 -2
- package/dist/{internal-error-kK8QvlDE.d.mts.map → internal-error-2fJ9fcZX.d.mts.map} +1 -1
- package/dist/{internal-error-BIc-ehme-ouBQPoEL.mjs → internal-error-ChGYPVpq-DhUD05u0.mjs} +3 -3
- package/dist/internal-error-ChGYPVpq-DhUD05u0.mjs.map +1 -0
- package/dist/{ir-ChmSSAhX.mjs → ir-CV5d1FJ0.mjs} +2 -2
- package/dist/{ir-ChmSSAhX.mjs.map → ir-CV5d1FJ0.mjs.map} +1 -1
- package/dist/{parse-GbZGfMUj-BFSrD2AN.mjs → parse-GbZGfMUj-C9tHGn-6.mjs} +2 -2
- package/dist/{parse-GbZGfMUj-BFSrD2AN.mjs.map → parse-GbZGfMUj-C9tHGn-6.mjs.map} +1 -1
- package/dist/psl-parser.d.mts +1 -1
- package/dist/psl-parser.mjs +3 -3
- package/dist/psl-parser__format.mjs +1 -1
- package/dist/psl-parser__interpret.d.mts +2 -2
- package/dist/psl-parser__interpret.mjs +1 -1
- package/dist/psl-parser__syntax.mjs +1 -1
- package/dist/psl-printer.mjs +1 -1
- package/dist/{result-CBZ8X9mU.mjs → result-C0NUq1Ok.mjs} +2 -2
- package/dist/{result-CBZ8X9mU.mjs.map → result-C0NUq1Ok.mjs.map} +1 -1
- package/dist/ts-render.mjs +1 -1
- package/dist/utils.d.mts +1 -1
- package/dist/utils.mjs +3 -3
- package/dist/utils__assertions.mjs +1 -1
- package/dist/utils__internal-error.d.mts +1 -1
- package/dist/utils__internal-error.mjs +1 -1
- package/dist/utils__result.mjs +1 -1
- package/package.json +16 -16
- package/dist/apply-specifier-default-control-policy-yxEeh3lJ.d.mts.map +0 -1
- package/dist/execution-Dejx90fO.mjs.map +0 -1
- package/dist/internal-error-BIc-ehme-ouBQPoEL.mjs.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parse-GbZGfMUj-BFSrD2AN.mjs","names":["#text","#lineStarts","#lineIndexAt","#lineStartAt","#lineEndAt","#stack","#tokenizer","#sourceFile","#diagnostics","#offset","#depth","#builder","#advance"],"sources":["../../../../1-framework/2-authoring/psl-parser/dist/parse-GbZGfMUj.mjs"],"sourcesContent":["import { N as createSyntaxTree, n as DocumentAst } from \"./declarations-DR6To8_k.mjs\";\nimport { n as isTerminatedStringLiteral, t as Tokenizer } from \"./tokenizer-1hAHZzmp.mjs\";\nimport { UNSPECIFIED_PSL_NAMESPACE_ID } from \"@internal/framework-components/psl-ast\";\nimport { InternalError } from \"@internal/utils/internal-error\";\n//#region src/source-file.ts\nconst CARRIAGE_RETURN = 13;\nconst LINE_FEED = 10;\nvar SourceFile = class {\n\t#text;\n\t#lineStarts;\n\tconstructor(text) {\n\t\tthis.#text = text;\n\t\tconst lineStarts = [0];\n\t\tfor (let offset = 0; offset < text.length; offset++) if (text.charCodeAt(offset) === LINE_FEED) lineStarts.push(offset + 1);\n\t\tthis.#lineStarts = lineStarts;\n\t}\n\tget text() {\n\t\treturn this.#text;\n\t}\n\tget length() {\n\t\treturn this.#text.length;\n\t}\n\tget lineCount() {\n\t\treturn this.#lineStarts.length;\n\t}\n\tlineStartOffsets() {\n\t\treturn this.#lineStarts;\n\t}\n\tlineStartOffset(line) {\n\t\tif (line <= 0) return 0;\n\t\treturn this.#lineStarts[line] ?? this.#text.length;\n\t}\n\tlineEndOffset(line) {\n\t\tif (line < 0) return 0;\n\t\tconst nextLineStart = this.#lineStarts[line + 1];\n\t\tif (nextLineStart === void 0) return this.#text.length;\n\t\tconst lineFeedOffset = nextLineStart - 1;\n\t\tconst carriageReturnOffset = lineFeedOffset - 1;\n\t\treturn this.#text.charCodeAt(carriageReturnOffset) === CARRIAGE_RETURN ? carriageReturnOffset : lineFeedOffset;\n\t}\n\tpositionAt(offset) {\n\t\tconst clamped = clamp(offset, 0, this.#text.length);\n\t\tconst line = this.#lineIndexAt(clamped);\n\t\treturn {\n\t\t\tline,\n\t\t\tcharacter: clamped - this.#lineStartAt(line)\n\t\t};\n\t}\n\toffsetAt(position) {\n\t\tconst line = clamp(position.line, 0, this.#lineStarts.length - 1);\n\t\tconst lineStart = this.#lineStartAt(line);\n\t\tconst lineEnd = this.#lineEndAt(line);\n\t\treturn clamp(lineStart + position.character, lineStart, lineEnd);\n\t}\n\t#lineStartAt(line) {\n\t\treturn this.#lineStarts[line] ?? 0;\n\t}\n\t#lineEndAt(line) {\n\t\treturn line + 1 < this.#lineStarts.length ? this.#lineStartAt(line + 1) - 1 : this.#text.length;\n\t}\n\t#lineIndexAt(offset) {\n\t\tconst lineStarts = this.#lineStarts;\n\t\tlet low = 0;\n\t\tlet high = lineStarts.length - 1;\n\t\twhile (low < high) {\n\t\t\tconst mid = low + high + 1 >>> 1;\n\t\t\tif ((lineStarts[mid] ?? 0) <= offset) low = mid;\n\t\t\telse high = mid - 1;\n\t\t}\n\t\treturn low;\n\t}\n};\nfunction clamp(value, min, max) {\n\tif (value < min) return min;\n\tif (value > max) return max;\n\treturn value;\n}\n//#endregion\n//#region src/syntax/green.ts\nfunction greenToken(kind, text) {\n\treturn {\n\t\ttype: \"token\",\n\t\tkind,\n\t\ttext\n\t};\n}\nfunction greenNode(kind, children) {\n\tlet textLength = 0;\n\tfor (const child of children) textLength += child.type === \"token\" ? child.text.length : child.textLength;\n\treturn {\n\t\ttype: \"node\",\n\t\tkind,\n\t\tchildren,\n\t\ttextLength\n\t};\n}\n//#endregion\n//#region src/syntax/green-builder.ts\nvar GreenNodeBuilder = class {\n\t#stack = [];\n\tstartNode(kind) {\n\t\tthis.#stack.push({\n\t\t\tkind,\n\t\t\tchildren: []\n\t\t});\n\t}\n\ttoken(kind, text) {\n\t\tconst current = this.#stack.at(-1);\n\t\tif (!current) throw new InternalError(\"GreenNodeBuilder: token() called with no open node\");\n\t\tcurrent.children.push(greenToken(kind, text));\n\t}\n\tfinishNode() {\n\t\tconst completed = this.#stack.pop();\n\t\tif (!completed) throw new InternalError(\"GreenNodeBuilder: finishNode() called with no open node\");\n\t\tconst node = greenNode(completed.kind, completed.children);\n\t\tconst parent = this.#stack.at(-1);\n\t\tif (parent) parent.children.push(node);\n\t\treturn node;\n\t}\n};\n//#endregion\n//#region src/parse.ts\nconst TRIVIA_KINDS = /* @__PURE__ */ new Set([\n\t\"Whitespace\",\n\t\"Newline\",\n\t\"Comment\"\n]);\n/**\n* The fault-tolerant parser substrate the grammars drive. Trivia is flushed\n* into the enclosing open node, so every child node spans exactly its first\n* through last significant token.\n*/\nvar Cursor = class {\n\t#tokenizer;\n\t#sourceFile;\n\t#builder = new GreenNodeBuilder();\n\t#diagnostics = [];\n\t#offset = 0;\n\t#depth = 0;\n\tconstructor(source) {\n\t\tthis.#tokenizer = new Tokenizer(source);\n\t\tthis.#sourceFile = new SourceFile(source);\n\t}\n\tget diagnostics() {\n\t\treturn this.#diagnostics;\n\t}\n\tget sourceFile() {\n\t\treturn this.#sourceFile;\n\t}\n\tpeekKind(ahead = 0) {\n\t\treturn this.peekToken(ahead).kind;\n\t}\n\tpeekToken(ahead = 0) {\n\t\tlet rawIndex = 0;\n\t\tlet remaining = ahead;\n\t\tfor (;;) {\n\t\t\tconst token = this.#tokenizer.peek(rawIndex);\n\t\t\tif (token.kind === \"Eof\") return token;\n\t\t\tif (TRIVIA_KINDS.has(token.kind)) {\n\t\t\t\trawIndex++;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif (remaining === 0) return token;\n\t\t\tremaining--;\n\t\t\trawIndex++;\n\t\t}\n\t}\n\t/** Span of the significant token `lookahead` positions ahead (`mark(0)` = the next). */\n\tmark(lookahead = 0) {\n\t\tlet rawIndex = 0;\n\t\tlet offset = this.#offset;\n\t\tlet remaining = lookahead;\n\t\tfor (;;) {\n\t\t\tconst token = this.#tokenizer.peek(rawIndex);\n\t\t\tif (token.kind === \"Eof\") return {\n\t\t\t\toffset,\n\t\t\t\tlength: token.text.length\n\t\t\t};\n\t\t\tif (!TRIVIA_KINDS.has(token.kind) && remaining === 0) return {\n\t\t\t\toffset,\n\t\t\t\tlength: token.text.length\n\t\t\t};\n\t\t\tif (!TRIVIA_KINDS.has(token.kind)) remaining--;\n\t\t\toffset += token.text.length;\n\t\t\trawIndex++;\n\t\t}\n\t}\n\t/**\n\t* Zero-width mark just past the last consumed significant token — anchors an\n\t* \"expected here\" diagnostic, e.g. the `{` missing after a declaration's name.\n\t*/\n\tmarkAfterLastToken() {\n\t\treturn {\n\t\t\toffset: this.#offset,\n\t\t\tlength: 0\n\t\t};\n\t}\n\tstartNode(kind) {\n\t\tif (this.#depth > 0) this.flushTrivia();\n\t\tthis.#builder.startNode(kind);\n\t\tthis.#depth++;\n\t}\n\tfinishNode() {\n\t\tthis.#depth--;\n\t\treturn this.#builder.finishNode();\n\t}\n\tbump() {\n\t\tthis.flushTrivia();\n\t\tconst token = this.#tokenizer.peek();\n\t\tif (token.kind === \"Eof\") return token;\n\t\tthis.#builder.token(token.kind, token.text);\n\t\tthis.#advance();\n\t\treturn token;\n\t}\n\trecoverToSyncPoint() {\n\t\tfor (;;) {\n\t\t\tconst token = this.#tokenizer.peek();\n\t\t\tif (token.kind === \"Eof\" || token.kind === \"Newline\" || token.kind === \"RBrace\") return;\n\t\t\tthis.#builder.token(token.kind, token.text);\n\t\t\tthis.#advance();\n\t\t}\n\t}\n\tflushTrivia() {\n\t\tfor (;;) {\n\t\t\tconst token = this.#tokenizer.peek();\n\t\t\tif (!TRIVIA_KINDS.has(token.kind)) return;\n\t\t\tthis.#builder.token(token.kind, token.text);\n\t\t\tthis.#advance();\n\t\t}\n\t}\n\tdiagnostic(code, message, mark) {\n\t\tconst start = mark.offset;\n\t\tconst end = start + mark.length;\n\t\tthis.#diagnostics.push({\n\t\t\tcode,\n\t\t\tmessage,\n\t\t\trange: {\n\t\t\t\tstart: this.#sourceFile.positionAt(start),\n\t\t\t\tend: this.#sourceFile.positionAt(end)\n\t\t\t}\n\t\t});\n\t}\n\t#advance() {\n\t\tthis.#offset += this.#tokenizer.next().text.length;\n\t}\n};\nfunction parseIdentifier(cursor) {\n\tcursor.startNode(\"Identifier\");\n\tcursor.bump();\n\tcursor.finishNode();\n}\n/**\n* Returns `undefined` when the next significant token does not start a\n* recognised expression, leaving recovery to the caller.\n*/\nfunction parseExpression(cursor) {\n\treturn parseStringLiteralExpr(cursor) ?? parseNumberLiteralExpr(cursor) ?? parseArrayLiteral(cursor) ?? parseObjectLiteralExpr(cursor) ?? parseFunctionCall(cursor) ?? parseBooleanLiteralExpr(cursor) ?? parseIdentifierExpr(cursor);\n}\nfunction parseStringLiteralExpr(cursor) {\n\tif (cursor.peekKind() !== \"StringLiteral\") return void 0;\n\tconst stringMark = cursor.mark();\n\tconst text = cursor.peekToken().text;\n\tcursor.startNode(\"StringLiteralExpr\");\n\tcursor.bump();\n\tif (!isTerminatedStringLiteral(text)) cursor.diagnostic(\"PSL_UNTERMINATED_STRING\", \"Unterminated string literal\", stringMark);\n\treturn cursor.finishNode();\n}\nfunction parseNumberLiteralExpr(cursor) {\n\tif (cursor.peekKind() !== \"NumberLiteral\") return void 0;\n\tcursor.startNode(\"NumberLiteralExpr\");\n\tcursor.bump();\n\treturn cursor.finishNode();\n}\n/**\n* Parses a namespace-qualified name `[space ':']? Ident ('.' Ident)*`. The\n* caller guarantees a leading `Ident`.\n*\n* Parsing the whole chain up front lets a position decide\n* constructor-vs-reference by peeking exactly one token for `(`, with no scan of\n* the dotted chain's length.\n*/\nfunction parseQualifiedName(cursor) {\n\tcursor.startNode(\"QualifiedName\");\n\tparseIdentifier(cursor);\n\tparseQualifiedSegments(cursor, \"Colon\");\n\tparseQualifiedSegments(cursor, \"Dot\");\n\tcursor.finishNode();\n}\n/**\n* A well-formed name carries at most one colon space and one dot namespace, so\n* each separator past the first of its kind reports `PSL_INVALID_QUALIFIED_NAME`.\n* The separator is consumed regardless, keeping the lossless round-trip intact.\n*/\nfunction parseQualifiedSegments(cursor, separator) {\n\tlet seen = 0;\n\twhile (cursor.peekKind() === separator) {\n\t\tseen++;\n\t\tconst separatorMark = cursor.mark();\n\t\tcursor.bump();\n\t\tif (seen > 1) cursor.diagnostic(\"PSL_INVALID_QUALIFIED_NAME\", \"Qualified name has too many segments\", separatorMark);\n\t\tif (cursor.peekKind() === \"Ident\") parseIdentifier(cursor);\n\t\telse cursor.diagnostic(\"PSL_INVALID_QUALIFIED_NAME\", \"Qualified name is missing a name after the separator\", cursor.mark());\n\t}\n}\nfunction parseBooleanLiteralExpr(cursor) {\n\tif (cursor.peekKind() !== \"Ident\") return void 0;\n\tconst text = cursor.peekToken().text;\n\tif (text !== \"true\" && text !== \"false\") return void 0;\n\tcursor.startNode(\"BooleanLiteralExpr\");\n\tcursor.bump();\n\treturn cursor.finishNode();\n}\nfunction parseIdentifierExpr(cursor) {\n\tif (cursor.peekKind() !== \"Ident\") return void 0;\n\tcursor.startNode(\"Identifier\");\n\tcursor.bump();\n\treturn cursor.finishNode();\n}\nfunction parseArrayLiteral(cursor) {\n\tif (cursor.peekKind() !== \"LBracket\") return void 0;\n\tcursor.startNode(\"ArrayLiteral\");\n\tcursor.bump();\n\twhile (cursor.peekKind() !== \"RBracket\" && cursor.peekKind() !== \"Eof\") {\n\t\tif (!parseExpression(cursor)) break;\n\t\tif (cursor.peekKind() === \"Comma\") cursor.bump();\n\t\telse break;\n\t}\n\tif (cursor.peekKind() === \"RBracket\") cursor.bump();\n\treturn cursor.finishNode();\n}\nfunction parseObjectLiteralExpr(cursor) {\n\tif (cursor.peekKind() !== \"LBrace\") return void 0;\n\tconst braceMark = cursor.mark();\n\tcursor.startNode(\"ObjectLiteralExpr\");\n\tcursor.bump();\n\twhile (cursor.peekKind() !== \"RBrace\" && cursor.peekKind() !== \"Eof\") {\n\t\tparseObjectField(cursor);\n\t\tif (cursor.peekKind() === \"Comma\") cursor.bump();\n\t\telse if (cursor.peekKind() === \"Ident\") cursor.diagnostic(\"PSL_INVALID_OBJECT_LITERAL\", \"Expected \\\",\\\" between object-literal fields\", cursor.markAfterLastToken());\n\t\telse break;\n\t}\n\tif (cursor.peekKind() === \"RBrace\") cursor.bump();\n\telse cursor.diagnostic(\"PSL_INVALID_OBJECT_LITERAL\", \"Unterminated object literal\", braceMark);\n\treturn cursor.finishNode();\n}\nfunction parseObjectField(cursor) {\n\tcursor.startNode(\"ObjectField\");\n\tconst keyMark = cursor.mark();\n\tconst keyText = cursor.peekToken().text;\n\tif (cursor.peekKind() === \"Ident\") parseIdentifier(cursor);\n\telse if (cursor.peekKind() === \"StringLiteral\") parseStringLiteralExpr(cursor);\n\tif (cursor.peekKind() === \"Colon\") {\n\t\tcursor.bump();\n\t\tif (!parseExpression(cursor)) cursor.diagnostic(\"PSL_INVALID_OBJECT_LITERAL\", \"Expected a value after \\\":\\\"\", cursor.mark());\n\t} else {\n\t\tcursor.diagnostic(\"PSL_INVALID_OBJECT_LITERAL\", `Expected \":\" after \"${keyText}\"`, keyMark);\n\t\tif (!(cursor.peekKind() === \"Ident\" && cursor.peekKind(1) === \"Colon\")) parseExpression(cursor);\n\t}\n\treturn cursor.finishNode();\n}\n/**\n* Whether the next tokens open a call: a bare `Ident(` or a namespace-qualified\n* `Ident.Ident(`. The lookahead is deliberately bounded so a bare dotted\n* reference like `a.b` is not mistaken for a call, rather than scanning an\n* unbounded dotted chain ahead to find the paren.\n*/\nfunction isCallAhead(cursor) {\n\tif (cursor.peekKind() !== \"Ident\") return false;\n\tif (cursor.peekKind(1) === \"LParen\") return true;\n\treturn cursor.peekKind(1) === \"Dot\" && cursor.peekKind(2) === \"Ident\" && cursor.peekKind(3) === \"LParen\";\n}\n/**\n* Parses a function/constructor call — bare `autoincrement()` or qualified\n* `temporal.updatedAt()`. Returns `undefined` unless {@link isCallAhead}\n* confirms a trailing `(`, so the `parseExpression` chain falls through to the\n* boolean and bare-identifier forms.\n*/\nfunction parseFunctionCall(cursor) {\n\tif (!isCallAhead(cursor)) return void 0;\n\tcursor.startNode(\"FunctionCall\");\n\tparseQualifiedName(cursor);\n\tif (cursor.peekKind() === \"LParen\") parseParenArgs(cursor);\n\treturn cursor.finishNode();\n}\n/** Parses a parenthesised, comma-separated `AttributeArg` list into the currently open node. */\nfunction parseParenArgs(cursor) {\n\tcursor.bump();\n\twhile (cursor.peekKind() !== \"RParen\" && cursor.peekKind() !== \"Eof\") {\n\t\tparseAttributeArg(cursor);\n\t\tif (cursor.peekKind() === \"Comma\") cursor.bump();\n\t\telse break;\n\t}\n\tif (cursor.peekKind() === \"RParen\") cursor.bump();\n}\nfunction parseAttributeArg(cursor) {\n\tconst kind = cursor.peekKind();\n\tif (kind !== \"Ident\" && kind !== \"StringLiteral\" && kind !== \"NumberLiteral\" && kind !== \"LBracket\" && kind !== \"LBrace\") return;\n\tcursor.startNode(\"AttributeArg\");\n\tif (cursor.peekKind() === \"Ident\" && cursor.peekKind(1) === \"Colon\") {\n\t\tparseIdentifier(cursor);\n\t\tcursor.bump();\n\t}\n\tparseArgValue(cursor);\n\tcursor.finishNode();\n}\nfunction parseArgValue(cursor) {\n\tparseExpression(cursor);\n}\nfunction parseAttributeArgList(cursor) {\n\tcursor.startNode(\"AttributeArgList\");\n\tparseParenArgs(cursor);\n\treturn cursor.finishNode();\n}\nfunction parseAttribute(cursor) {\n\tconst isBlockAttribute = cursor.peekKind() === \"DoubleAt\";\n\tconst attributeMark = cursor.mark();\n\tcursor.startNode(isBlockAttribute ? \"ModelAttribute\" : \"FieldAttribute\");\n\tcursor.bump();\n\tif (cursor.peekKind() === \"Ident\") parseQualifiedName(cursor);\n\telse cursor.diagnostic(\"PSL_INVALID_ATTRIBUTE_SYNTAX\", \"Attribute name expected\", attributeMark);\n\tif (cursor.peekKind() === \"LParen\") parseAttributeArgList(cursor);\n\treturn cursor.finishNode();\n}\n/**\n* A type annotation: `QualifiedName (argList)? ([])? (?)?`, e.g.\n* `pgvector.Vector(1536)[]?`. When the field has no type, no node is emitted —\n* a missing type is the absence of a `TypeAnnotation`, not a zero-width one.\n*/\nfunction parseTypeAnnotation(cursor) {\n\tconst kind = cursor.peekKind();\n\tif (kind !== \"Ident\" && kind !== \"LBracket\" && kind !== \"Question\") return;\n\tcursor.startNode(\"TypeAnnotation\");\n\tif (cursor.peekKind() === \"Ident\") {\n\t\tparseQualifiedName(cursor);\n\t\tif (cursor.peekKind() === \"LParen\") parseAttributeArgList(cursor);\n\t}\n\tif (cursor.peekKind() === \"LBracket\") {\n\t\tcursor.bump();\n\t\tif (cursor.peekKind() === \"RBracket\") cursor.bump();\n\t}\n\tif (cursor.peekKind() === \"Question\") cursor.bump();\n\tcursor.finishNode();\n}\n/**\n* Parses a full PSL document. Never throws — malformed input yields diagnostics\n* and a recovered tree, not an exception.\n*/\nfunction parse(source) {\n\tconst cursor = new Cursor(source);\n\tconst root = createSyntaxTree(parseDocument(cursor));\n\treturn {\n\t\tdocument: DocumentAst.cast(root) ?? new DocumentAst(root),\n\t\tdiagnostics: cursor.diagnostics,\n\t\tsourceFile: cursor.sourceFile\n\t};\n}\nfunction parseDocument(cursor) {\n\tcursor.startNode(\"Document\");\n\twhile (cursor.peekKind() !== \"Eof\") parseDeclaration(cursor, false);\n\tcursor.flushTrivia();\n\treturn cursor.finishNode();\n}\nconst RESERVED_BLOCK_KEYWORDS = /* @__PURE__ */ new Set([\n\t\"model\",\n\t\"namespace\",\n\t\"type\",\n\t\"types\"\n]);\nfunction keywordIs(cursor, keyword) {\n\treturn cursor.peekKind() === \"Ident\" && cursor.peekToken().text === keyword;\n}\n/**\n* Each alternative is a no-op on non-match, consuming nothing, so the\n* forward-only cursor is never left half-consumed by a rejected alternative.\n* Recovery runs via the `if (!node)` tail rather than as a `??` arm, because it\n* appends raw tokens to the open parent instead of returning a child node.\n*/\nfunction parseDeclaration(cursor, insideNamespace) {\n\tconst name = cursor.peekKind(1) === \"Ident\" ? cursor.peekToken(1).text : \"\";\n\tif (insideNamespace && keywordIs(cursor, \"namespace\")) cursor.diagnostic(\"PSL_INVALID_NAMESPACE_BLOCK\", `Recursive \"namespace ${name}\" block is not allowed; namespace blocks may not nest`, cursor.mark());\n\telse if (insideNamespace && keywordIs(cursor, \"types\")) cursor.diagnostic(\"PSL_INVALID_NAMESPACE_BLOCK\", \"`types` blocks must be declared at the document top level, not inside a namespace block\", cursor.mark());\n\telse if (keywordIs(cursor, \"namespace\") && name === UNSPECIFIED_PSL_NAMESPACE_ID) cursor.diagnostic(\"PSL_INVALID_NAMESPACE_BLOCK\", `Namespace name \"${UNSPECIFIED_PSL_NAMESPACE_ID}\" is reserved for the parser-synthesised bucket for top-level declarations`, cursor.mark(1));\n\tif (!(parseModel(cursor) ?? parseNamespace(cursor) ?? parseCompositeType(cursor) ?? parseTypesBlock(cursor) ?? parseGenericBlock(cursor))) parseUnsupportedTopLevel(cursor);\n}\n/**\n* Reports only the first missing piece — a missing name suppresses the\n* missing-brace diagnostic. `nameRequired` is false only for the `types` block.\n*/\nfunction parseBlock(cursor, kind, nameRequired, parseMember) {\n\tconst keyword = cursor.peekToken().text;\n\tconst keywordMark = cursor.mark();\n\tcursor.startNode(kind);\n\tcursor.bump();\n\tconst hasName = nameRequired && cursor.peekKind() === \"Ident\";\n\tif (hasName) parseIdentifier(cursor);\n\tif (nameRequired && !hasName) cursor.diagnostic(\"PSL_INVALID_DECLARATION\", `Expected a name after \"${keyword}\"`, keywordMark);\n\telse if (cursor.peekKind() !== \"LBrace\") cursor.diagnostic(\"PSL_INVALID_DECLARATION\", `Expected \"{\" to open the \"${keyword}\" block`, cursor.markAfterLastToken());\n\tif (cursor.peekKind() === \"LBrace\") parseBlockBody(cursor, parseMember);\n\telse cursor.recoverToSyncPoint();\n\treturn cursor.finishNode();\n}\nfunction parseModel(cursor) {\n\tif (!keywordIs(cursor, \"model\")) return void 0;\n\treturn parseBlock(cursor, \"ModelDeclaration\", true, parseModelMember);\n}\n/**\n* Excluding the reserved keywords keeps a malformed reserved block (e.g. `model\n* {` with no name) routed to its dedicated parser. The generic keyword set is\n* open, so a bare identifier with no brace (e.g. `oops`) is read as an unfinished\n* custom declaration rather than unsupported content.\n*/\nfunction parseGenericBlock(cursor) {\n\tif (cursor.peekKind() !== \"Ident\") return void 0;\n\tconst keyword = cursor.peekToken().text;\n\tif (RESERVED_BLOCK_KEYWORDS.has(keyword)) return void 0;\n\tconst hasName = cursor.peekKind(1) === \"Ident\" && cursor.peekKind(2) === \"LBrace\";\n\tcursor.startNode(\"GenericBlockDeclaration\");\n\tcursor.bump();\n\tif (hasName) parseIdentifier(cursor);\n\tif (cursor.peekKind() === \"LBrace\") parseBlockBody(cursor, parseKeyValueMember);\n\telse {\n\t\tcursor.diagnostic(\"PSL_INVALID_DECLARATION\", `Expected \"{\" to open the \"${keyword}\" block`, cursor.markAfterLastToken());\n\t\tcursor.recoverToSyncPoint();\n\t}\n\treturn cursor.finishNode();\n}\nfunction parseNamespace(cursor) {\n\tif (!keywordIs(cursor, \"namespace\")) return void 0;\n\treturn parseBlock(cursor, \"Namespace\", true, (inner) => parseDeclaration(inner, true));\n}\nfunction parseCompositeType(cursor) {\n\tif (!keywordIs(cursor, \"type\")) return void 0;\n\treturn parseBlock(cursor, \"CompositeTypeDeclaration\", true, parseModelMember);\n}\n/** `types` (plural) is the no-name types block; the singular `type` is the composite type above. */\nfunction parseTypesBlock(cursor) {\n\tif (!keywordIs(cursor, \"types\")) return void 0;\n\treturn parseBlock(cursor, \"TypesBlock\", false, parseNamedTypeMember);\n}\n/** Every `parseMember` consumes at least one significant token, so the loop always terminates. */\nfunction parseBlockBody(cursor, parseMember) {\n\tconst braceMark = cursor.mark();\n\tcursor.bump();\n\tfor (;;) {\n\t\tconst kind = cursor.peekKind();\n\t\tif (kind === \"RBrace\" || kind === \"Eof\") break;\n\t\tparseMember(cursor);\n\t}\n\tif (cursor.peekKind() === \"RBrace\") cursor.bump();\n\telse cursor.diagnostic(\"PSL_UNTERMINATED_BLOCK\", \"Unterminated block declaration\", braceMark);\n}\nfunction parseUnsupportedTopLevel(cursor) {\n\tconst offending = cursor.peekToken().text;\n\tconst message = cursor.peekKind(1) === \"LBrace\" ? `Unsupported top-level block \"${offending}\"` : `Unsupported top-level declaration \"${offending}\"`;\n\tcursor.diagnostic(\"PSL_UNSUPPORTED_TOP_LEVEL_BLOCK\", message, cursor.mark());\n\tcursor.bump();\n\tcursor.recoverToSyncPoint();\n}\n/**\n* Matches a leading `@@` block attribute, a no-op otherwise. Single-`@`\n* attributes belong to fields and are parsed inside `parseField`.\n*/\nfunction parseBlockAttribute(cursor) {\n\tif (cursor.peekKind() !== \"DoubleAt\") return void 0;\n\treturn parseAttribute(cursor);\n}\nfunction parseModelMember(cursor) {\n\tif (!(parseBlockAttribute(cursor) ?? parseField(cursor))) invalidMember(cursor, \"PSL_INVALID_MODEL_MEMBER\", `Invalid model member declaration \"${cursor.peekToken().text}\"`);\n}\nfunction parseNamedTypeMember(cursor) {\n\tif (!parseNamedType(cursor)) invalidMember(cursor, \"PSL_INVALID_TYPES_MEMBER\", `Invalid types declaration \"${cursor.peekToken().text}\"`);\n}\n/**\n* A generic-block member is either a `@@`-block attribute or a `key = value`\n* entry. The block-attribute alternative is purely syntactic — it does not judge\n* whether the attribute is valid for the block's kind.\n*/\nfunction parseKeyValueMember(cursor) {\n\tif (!(parseBlockAttribute(cursor) ?? parseKeyValue(cursor))) invalidMember(cursor, \"PSL_INVALID_EXTENSION_BLOCK_MEMBER\", \"Invalid block entry\");\n}\nfunction invalidMember(cursor, code, message) {\n\tcursor.diagnostic(code, message, cursor.mark());\n\tcursor.bump();\n\tcursor.recoverToSyncPoint();\n}\nfunction parseField(cursor) {\n\tif (cursor.peekKind() !== \"Ident\") return void 0;\n\tcursor.startNode(\"FieldDeclaration\");\n\tconst nameMark = cursor.mark();\n\tconst nameText = cursor.peekToken().text;\n\tparseIdentifier(cursor);\n\tif (cursor.peekKind() !== \"Ident\") cursor.diagnostic(\"PSL_INVALID_MODEL_MEMBER\", `Expected a type after field \"${nameText}\"`, nameMark);\n\tparseTypeAnnotation(cursor);\n\twhile (cursor.peekKind() === \"At\") parseAttribute(cursor);\n\treturn cursor.finishNode();\n}\nfunction parseNamedType(cursor) {\n\tif (cursor.peekKind() !== \"Ident\") return void 0;\n\tcursor.startNode(\"NamedTypeDeclaration\");\n\tconst nameMark = cursor.mark();\n\tconst nameText = cursor.peekToken().text;\n\tparseIdentifier(cursor);\n\tif (cursor.peekKind() === \"Equals\") cursor.bump();\n\telse cursor.diagnostic(\"PSL_INVALID_TYPES_MEMBER\", `Expected \"=\" after \"${nameText}\"`, nameMark);\n\tparseTypeAnnotation(cursor);\n\twhile (cursor.peekKind() === \"At\") parseAttribute(cursor);\n\treturn cursor.finishNode();\n}\n/**\n* A generic-block entry is either `key = value` or a bare `key` (committing a\n* `KeyValuePair` carrying only the key). A `key =` with no following expression\n* is flagged.\n*/\nfunction parseKeyValue(cursor) {\n\tif (cursor.peekKind() !== \"Ident\") return void 0;\n\tcursor.startNode(\"KeyValuePair\");\n\tparseIdentifier(cursor);\n\tif (cursor.peekKind() === \"Equals\") {\n\t\tcursor.bump();\n\t\tif (!parseExpression(cursor)) cursor.diagnostic(\"PSL_INVALID_EXTENSION_BLOCK_MEMBER\", \"Expected a value after \\\"=\\\"\", cursor.mark());\n\t}\n\treturn cursor.finishNode();\n}\n//#endregion\nexport { SourceFile as a, greenToken as i, GreenNodeBuilder as n, greenNode as r, parse as t };\n\n//# sourceMappingURL=parse-GbZGfMU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j-C9tHGn-6.mjs","names":["#text","#lineStarts","#lineIndexAt","#lineStartAt","#lineEndAt","#stack","#tokenizer","#sourceFile","#diagnostics","#offset","#depth","#builder","#advance"],"sources":["../../../../1-framework/2-authoring/psl-parser/dist/parse-GbZGfMUj.mjs"],"sourcesContent":["import { N as createSyntaxTree, n as DocumentAst } from \"./declarations-DR6To8_k.mjs\";\nimport { n as isTerminatedStringLiteral, t as Tokenizer } from \"./tokenizer-1hAHZzmp.mjs\";\nimport { UNSPECIFIED_PSL_NAMESPACE_ID } from \"@internal/framework-components/psl-ast\";\nimport { InternalError } from \"@internal/utils/internal-error\";\n//#region src/source-file.ts\nconst CARRIAGE_RETURN = 13;\nconst LINE_FEED = 10;\nvar SourceFile = class {\n\t#text;\n\t#lineStarts;\n\tconstructor(text) {\n\t\tthis.#text = text;\n\t\tconst lineStarts = [0];\n\t\tfor (let offset = 0; offset < text.length; offset++) if (text.charCodeAt(offset) === LINE_FEED) lineStarts.push(offset + 1);\n\t\tthis.#lineStarts = lineStarts;\n\t}\n\tget text() {\n\t\treturn this.#text;\n\t}\n\tget length() {\n\t\treturn this.#text.length;\n\t}\n\tget lineCount() {\n\t\treturn this.#lineStarts.length;\n\t}\n\tlineStartOffsets() {\n\t\treturn this.#lineStarts;\n\t}\n\tlineStartOffset(line) {\n\t\tif (line <= 0) return 0;\n\t\treturn this.#lineStarts[line] ?? this.#text.length;\n\t}\n\tlineEndOffset(line) {\n\t\tif (line < 0) return 0;\n\t\tconst nextLineStart = this.#lineStarts[line + 1];\n\t\tif (nextLineStart === void 0) return this.#text.length;\n\t\tconst lineFeedOffset = nextLineStart - 1;\n\t\tconst carriageReturnOffset = lineFeedOffset - 1;\n\t\treturn this.#text.charCodeAt(carriageReturnOffset) === CARRIAGE_RETURN ? carriageReturnOffset : lineFeedOffset;\n\t}\n\tpositionAt(offset) {\n\t\tconst clamped = clamp(offset, 0, this.#text.length);\n\t\tconst line = this.#lineIndexAt(clamped);\n\t\treturn {\n\t\t\tline,\n\t\t\tcharacter: clamped - this.#lineStartAt(line)\n\t\t};\n\t}\n\toffsetAt(position) {\n\t\tconst line = clamp(position.line, 0, this.#lineStarts.length - 1);\n\t\tconst lineStart = this.#lineStartAt(line);\n\t\tconst lineEnd = this.#lineEndAt(line);\n\t\treturn clamp(lineStart + position.character, lineStart, lineEnd);\n\t}\n\t#lineStartAt(line) {\n\t\treturn this.#lineStarts[line] ?? 0;\n\t}\n\t#lineEndAt(line) {\n\t\treturn line + 1 < this.#lineStarts.length ? this.#lineStartAt(line + 1) - 1 : this.#text.length;\n\t}\n\t#lineIndexAt(offset) {\n\t\tconst lineStarts = this.#lineStarts;\n\t\tlet low = 0;\n\t\tlet high = lineStarts.length - 1;\n\t\twhile (low < high) {\n\t\t\tconst mid = low + high + 1 >>> 1;\n\t\t\tif ((lineStarts[mid] ?? 0) <= offset) low = mid;\n\t\t\telse high = mid - 1;\n\t\t}\n\t\treturn low;\n\t}\n};\nfunction clamp(value, min, max) {\n\tif (value < min) return min;\n\tif (value > max) return max;\n\treturn value;\n}\n//#endregion\n//#region src/syntax/green.ts\nfunction greenToken(kind, text) {\n\treturn {\n\t\ttype: \"token\",\n\t\tkind,\n\t\ttext\n\t};\n}\nfunction greenNode(kind, children) {\n\tlet textLength = 0;\n\tfor (const child of children) textLength += child.type === \"token\" ? child.text.length : child.textLength;\n\treturn {\n\t\ttype: \"node\",\n\t\tkind,\n\t\tchildren,\n\t\ttextLength\n\t};\n}\n//#endregion\n//#region src/syntax/green-builder.ts\nvar GreenNodeBuilder = class {\n\t#stack = [];\n\tstartNode(kind) {\n\t\tthis.#stack.push({\n\t\t\tkind,\n\t\t\tchildren: []\n\t\t});\n\t}\n\ttoken(kind, text) {\n\t\tconst current = this.#stack.at(-1);\n\t\tif (!current) throw new InternalError(\"GreenNodeBuilder: token() called with no open node\");\n\t\tcurrent.children.push(greenToken(kind, text));\n\t}\n\tfinishNode() {\n\t\tconst completed = this.#stack.pop();\n\t\tif (!completed) throw new InternalError(\"GreenNodeBuilder: finishNode() called with no open node\");\n\t\tconst node = greenNode(completed.kind, completed.children);\n\t\tconst parent = this.#stack.at(-1);\n\t\tif (parent) parent.children.push(node);\n\t\treturn node;\n\t}\n};\n//#endregion\n//#region src/parse.ts\nconst TRIVIA_KINDS = /* @__PURE__ */ new Set([\n\t\"Whitespace\",\n\t\"Newline\",\n\t\"Comment\"\n]);\n/**\n* The fault-tolerant parser substrate the grammars drive. Trivia is flushed\n* into the enclosing open node, so every child node spans exactly its first\n* through last significant token.\n*/\nvar Cursor = class {\n\t#tokenizer;\n\t#sourceFile;\n\t#builder = new GreenNodeBuilder();\n\t#diagnostics = [];\n\t#offset = 0;\n\t#depth = 0;\n\tconstructor(source) {\n\t\tthis.#tokenizer = new Tokenizer(source);\n\t\tthis.#sourceFile = new SourceFile(source);\n\t}\n\tget diagnostics() {\n\t\treturn this.#diagnostics;\n\t}\n\tget sourceFile() {\n\t\treturn this.#sourceFile;\n\t}\n\tpeekKind(ahead = 0) {\n\t\treturn this.peekToken(ahead).kind;\n\t}\n\tpeekToken(ahead = 0) {\n\t\tlet rawIndex = 0;\n\t\tlet remaining = ahead;\n\t\tfor (;;) {\n\t\t\tconst token = this.#tokenizer.peek(rawIndex);\n\t\t\tif (token.kind === \"Eof\") return token;\n\t\t\tif (TRIVIA_KINDS.has(token.kind)) {\n\t\t\t\trawIndex++;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif (remaining === 0) return token;\n\t\t\tremaining--;\n\t\t\trawIndex++;\n\t\t}\n\t}\n\t/** Span of the significant token `lookahead` positions ahead (`mark(0)` = the next). */\n\tmark(lookahead = 0) {\n\t\tlet rawIndex = 0;\n\t\tlet offset = this.#offset;\n\t\tlet remaining = lookahead;\n\t\tfor (;;) {\n\t\t\tconst token = this.#tokenizer.peek(rawIndex);\n\t\t\tif (token.kind === \"Eof\") return {\n\t\t\t\toffset,\n\t\t\t\tlength: token.text.length\n\t\t\t};\n\t\t\tif (!TRIVIA_KINDS.has(token.kind) && remaining === 0) return {\n\t\t\t\toffset,\n\t\t\t\tlength: token.text.length\n\t\t\t};\n\t\t\tif (!TRIVIA_KINDS.has(token.kind)) remaining--;\n\t\t\toffset += token.text.length;\n\t\t\trawIndex++;\n\t\t}\n\t}\n\t/**\n\t* Zero-width mark just past the last consumed significant token — anchors an\n\t* \"expected here\" diagnostic, e.g. the `{` missing after a declaration's name.\n\t*/\n\tmarkAfterLastToken() {\n\t\treturn {\n\t\t\toffset: this.#offset,\n\t\t\tlength: 0\n\t\t};\n\t}\n\tstartNode(kind) {\n\t\tif (this.#depth > 0) this.flushTrivia();\n\t\tthis.#builder.startNode(kind);\n\t\tthis.#depth++;\n\t}\n\tfinishNode() {\n\t\tthis.#depth--;\n\t\treturn this.#builder.finishNode();\n\t}\n\tbump() {\n\t\tthis.flushTrivia();\n\t\tconst token = this.#tokenizer.peek();\n\t\tif (token.kind === \"Eof\") return token;\n\t\tthis.#builder.token(token.kind, token.text);\n\t\tthis.#advance();\n\t\treturn token;\n\t}\n\trecoverToSyncPoint() {\n\t\tfor (;;) {\n\t\t\tconst token = this.#tokenizer.peek();\n\t\t\tif (token.kind === \"Eof\" || token.kind === \"Newline\" || token.kind === \"RBrace\") return;\n\t\t\tthis.#builder.token(token.kind, token.text);\n\t\t\tthis.#advance();\n\t\t}\n\t}\n\tflushTrivia() {\n\t\tfor (;;) {\n\t\t\tconst token = this.#tokenizer.peek();\n\t\t\tif (!TRIVIA_KINDS.has(token.kind)) return;\n\t\t\tthis.#builder.token(token.kind, token.text);\n\t\t\tthis.#advance();\n\t\t}\n\t}\n\tdiagnostic(code, message, mark) {\n\t\tconst start = mark.offset;\n\t\tconst end = start + mark.length;\n\t\tthis.#diagnostics.push({\n\t\t\tcode,\n\t\t\tmessage,\n\t\t\trange: {\n\t\t\t\tstart: this.#sourceFile.positionAt(start),\n\t\t\t\tend: this.#sourceFile.positionAt(end)\n\t\t\t}\n\t\t});\n\t}\n\t#advance() {\n\t\tthis.#offset += this.#tokenizer.next().text.length;\n\t}\n};\nfunction parseIdentifier(cursor) {\n\tcursor.startNode(\"Identifier\");\n\tcursor.bump();\n\tcursor.finishNode();\n}\n/**\n* Returns `undefined` when the next significant token does not start a\n* recognised expression, leaving recovery to the caller.\n*/\nfunction parseExpression(cursor) {\n\treturn parseStringLiteralExpr(cursor) ?? parseNumberLiteralExpr(cursor) ?? parseArrayLiteral(cursor) ?? parseObjectLiteralExpr(cursor) ?? parseFunctionCall(cursor) ?? parseBooleanLiteralExpr(cursor) ?? parseIdentifierExpr(cursor);\n}\nfunction parseStringLiteralExpr(cursor) {\n\tif (cursor.peekKind() !== \"StringLiteral\") return void 0;\n\tconst stringMark = cursor.mark();\n\tconst text = cursor.peekToken().text;\n\tcursor.startNode(\"StringLiteralExpr\");\n\tcursor.bump();\n\tif (!isTerminatedStringLiteral(text)) cursor.diagnostic(\"PSL_UNTERMINATED_STRING\", \"Unterminated string literal\", stringMark);\n\treturn cursor.finishNode();\n}\nfunction parseNumberLiteralExpr(cursor) {\n\tif (cursor.peekKind() !== \"NumberLiteral\") return void 0;\n\tcursor.startNode(\"NumberLiteralExpr\");\n\tcursor.bump();\n\treturn cursor.finishNode();\n}\n/**\n* Parses a namespace-qualified name `[space ':']? Ident ('.' Ident)*`. The\n* caller guarantees a leading `Ident`.\n*\n* Parsing the whole chain up front lets a position decide\n* constructor-vs-reference by peeking exactly one token for `(`, with no scan of\n* the dotted chain's length.\n*/\nfunction parseQualifiedName(cursor) {\n\tcursor.startNode(\"QualifiedName\");\n\tparseIdentifier(cursor);\n\tparseQualifiedSegments(cursor, \"Colon\");\n\tparseQualifiedSegments(cursor, \"Dot\");\n\tcursor.finishNode();\n}\n/**\n* A well-formed name carries at most one colon space and one dot namespace, so\n* each separator past the first of its kind reports `PSL_INVALID_QUALIFIED_NAME`.\n* The separator is consumed regardless, keeping the lossless round-trip intact.\n*/\nfunction parseQualifiedSegments(cursor, separator) {\n\tlet seen = 0;\n\twhile (cursor.peekKind() === separator) {\n\t\tseen++;\n\t\tconst separatorMark = cursor.mark();\n\t\tcursor.bump();\n\t\tif (seen > 1) cursor.diagnostic(\"PSL_INVALID_QUALIFIED_NAME\", \"Qualified name has too many segments\", separatorMark);\n\t\tif (cursor.peekKind() === \"Ident\") parseIdentifier(cursor);\n\t\telse cursor.diagnostic(\"PSL_INVALID_QUALIFIED_NAME\", \"Qualified name is missing a name after the separator\", cursor.mark());\n\t}\n}\nfunction parseBooleanLiteralExpr(cursor) {\n\tif (cursor.peekKind() !== \"Ident\") return void 0;\n\tconst text = cursor.peekToken().text;\n\tif (text !== \"true\" && text !== \"false\") return void 0;\n\tcursor.startNode(\"BooleanLiteralExpr\");\n\tcursor.bump();\n\treturn cursor.finishNode();\n}\nfunction parseIdentifierExpr(cursor) {\n\tif (cursor.peekKind() !== \"Ident\") return void 0;\n\tcursor.startNode(\"Identifier\");\n\tcursor.bump();\n\treturn cursor.finishNode();\n}\nfunction parseArrayLiteral(cursor) {\n\tif (cursor.peekKind() !== \"LBracket\") return void 0;\n\tcursor.startNode(\"ArrayLiteral\");\n\tcursor.bump();\n\twhile (cursor.peekKind() !== \"RBracket\" && cursor.peekKind() !== \"Eof\") {\n\t\tif (!parseExpression(cursor)) break;\n\t\tif (cursor.peekKind() === \"Comma\") cursor.bump();\n\t\telse break;\n\t}\n\tif (cursor.peekKind() === \"RBracket\") cursor.bump();\n\treturn cursor.finishNode();\n}\nfunction parseObjectLiteralExpr(cursor) {\n\tif (cursor.peekKind() !== \"LBrace\") return void 0;\n\tconst braceMark = cursor.mark();\n\tcursor.startNode(\"ObjectLiteralExpr\");\n\tcursor.bump();\n\twhile (cursor.peekKind() !== \"RBrace\" && cursor.peekKind() !== \"Eof\") {\n\t\tparseObjectField(cursor);\n\t\tif (cursor.peekKind() === \"Comma\") cursor.bump();\n\t\telse if (cursor.peekKind() === \"Ident\") cursor.diagnostic(\"PSL_INVALID_OBJECT_LITERAL\", \"Expected \\\",\\\" between object-literal fields\", cursor.markAfterLastToken());\n\t\telse break;\n\t}\n\tif (cursor.peekKind() === \"RBrace\") cursor.bump();\n\telse cursor.diagnostic(\"PSL_INVALID_OBJECT_LITERAL\", \"Unterminated object literal\", braceMark);\n\treturn cursor.finishNode();\n}\nfunction parseObjectField(cursor) {\n\tcursor.startNode(\"ObjectField\");\n\tconst keyMark = cursor.mark();\n\tconst keyText = cursor.peekToken().text;\n\tif (cursor.peekKind() === \"Ident\") parseIdentifier(cursor);\n\telse if (cursor.peekKind() === \"StringLiteral\") parseStringLiteralExpr(cursor);\n\tif (cursor.peekKind() === \"Colon\") {\n\t\tcursor.bump();\n\t\tif (!parseExpression(cursor)) cursor.diagnostic(\"PSL_INVALID_OBJECT_LITERAL\", \"Expected a value after \\\":\\\"\", cursor.mark());\n\t} else {\n\t\tcursor.diagnostic(\"PSL_INVALID_OBJECT_LITERAL\", `Expected \":\" after \"${keyText}\"`, keyMark);\n\t\tif (!(cursor.peekKind() === \"Ident\" && cursor.peekKind(1) === \"Colon\")) parseExpression(cursor);\n\t}\n\treturn cursor.finishNode();\n}\n/**\n* Whether the next tokens open a call: a bare `Ident(` or a namespace-qualified\n* `Ident.Ident(`. The lookahead is deliberately bounded so a bare dotted\n* reference like `a.b` is not mistaken for a call, rather than scanning an\n* unbounded dotted chain ahead to find the paren.\n*/\nfunction isCallAhead(cursor) {\n\tif (cursor.peekKind() !== \"Ident\") return false;\n\tif (cursor.peekKind(1) === \"LParen\") return true;\n\treturn cursor.peekKind(1) === \"Dot\" && cursor.peekKind(2) === \"Ident\" && cursor.peekKind(3) === \"LParen\";\n}\n/**\n* Parses a function/constructor call — bare `autoincrement()` or qualified\n* `temporal.updatedAt()`. Returns `undefined` unless {@link isCallAhead}\n* confirms a trailing `(`, so the `parseExpression` chain falls through to the\n* boolean and bare-identifier forms.\n*/\nfunction parseFunctionCall(cursor) {\n\tif (!isCallAhead(cursor)) return void 0;\n\tcursor.startNode(\"FunctionCall\");\n\tparseQualifiedName(cursor);\n\tif (cursor.peekKind() === \"LParen\") parseParenArgs(cursor);\n\treturn cursor.finishNode();\n}\n/** Parses a parenthesised, comma-separated `AttributeArg` list into the currently open node. */\nfunction parseParenArgs(cursor) {\n\tcursor.bump();\n\twhile (cursor.peekKind() !== \"RParen\" && cursor.peekKind() !== \"Eof\") {\n\t\tparseAttributeArg(cursor);\n\t\tif (cursor.peekKind() === \"Comma\") cursor.bump();\n\t\telse break;\n\t}\n\tif (cursor.peekKind() === \"RParen\") cursor.bump();\n}\nfunction parseAttributeArg(cursor) {\n\tconst kind = cursor.peekKind();\n\tif (kind !== \"Ident\" && kind !== \"StringLiteral\" && kind !== \"NumberLiteral\" && kind !== \"LBracket\" && kind !== \"LBrace\") return;\n\tcursor.startNode(\"AttributeArg\");\n\tif (cursor.peekKind() === \"Ident\" && cursor.peekKind(1) === \"Colon\") {\n\t\tparseIdentifier(cursor);\n\t\tcursor.bump();\n\t}\n\tparseArgValue(cursor);\n\tcursor.finishNode();\n}\nfunction parseArgValue(cursor) {\n\tparseExpression(cursor);\n}\nfunction parseAttributeArgList(cursor) {\n\tcursor.startNode(\"AttributeArgList\");\n\tparseParenArgs(cursor);\n\treturn cursor.finishNode();\n}\nfunction parseAttribute(cursor) {\n\tconst isBlockAttribute = cursor.peekKind() === \"DoubleAt\";\n\tconst attributeMark = cursor.mark();\n\tcursor.startNode(isBlockAttribute ? \"ModelAttribute\" : \"FieldAttribute\");\n\tcursor.bump();\n\tif (cursor.peekKind() === \"Ident\") parseQualifiedName(cursor);\n\telse cursor.diagnostic(\"PSL_INVALID_ATTRIBUTE_SYNTAX\", \"Attribute name expected\", attributeMark);\n\tif (cursor.peekKind() === \"LParen\") parseAttributeArgList(cursor);\n\treturn cursor.finishNode();\n}\n/**\n* A type annotation: `QualifiedName (argList)? ([])? (?)?`, e.g.\n* `pgvector.Vector(1536)[]?`. When the field has no type, no node is emitted —\n* a missing type is the absence of a `TypeAnnotation`, not a zero-width one.\n*/\nfunction parseTypeAnnotation(cursor) {\n\tconst kind = cursor.peekKind();\n\tif (kind !== \"Ident\" && kind !== \"LBracket\" && kind !== \"Question\") return;\n\tcursor.startNode(\"TypeAnnotation\");\n\tif (cursor.peekKind() === \"Ident\") {\n\t\tparseQualifiedName(cursor);\n\t\tif (cursor.peekKind() === \"LParen\") parseAttributeArgList(cursor);\n\t}\n\tif (cursor.peekKind() === \"LBracket\") {\n\t\tcursor.bump();\n\t\tif (cursor.peekKind() === \"RBracket\") cursor.bump();\n\t}\n\tif (cursor.peekKind() === \"Question\") cursor.bump();\n\tcursor.finishNode();\n}\n/**\n* Parses a full PSL document. Never throws — malformed input yields diagnostics\n* and a recovered tree, not an exception.\n*/\nfunction parse(source) {\n\tconst cursor = new Cursor(source);\n\tconst root = createSyntaxTree(parseDocument(cursor));\n\treturn {\n\t\tdocument: DocumentAst.cast(root) ?? new DocumentAst(root),\n\t\tdiagnostics: cursor.diagnostics,\n\t\tsourceFile: cursor.sourceFile\n\t};\n}\nfunction parseDocument(cursor) {\n\tcursor.startNode(\"Document\");\n\twhile (cursor.peekKind() !== \"Eof\") parseDeclaration(cursor, false);\n\tcursor.flushTrivia();\n\treturn cursor.finishNode();\n}\nconst RESERVED_BLOCK_KEYWORDS = /* @__PURE__ */ new Set([\n\t\"model\",\n\t\"namespace\",\n\t\"type\",\n\t\"types\"\n]);\nfunction keywordIs(cursor, keyword) {\n\treturn cursor.peekKind() === \"Ident\" && cursor.peekToken().text === keyword;\n}\n/**\n* Each alternative is a no-op on non-match, consuming nothing, so the\n* forward-only cursor is never left half-consumed by a rejected alternative.\n* Recovery runs via the `if (!node)` tail rather than as a `??` arm, because it\n* appends raw tokens to the open parent instead of returning a child node.\n*/\nfunction parseDeclaration(cursor, insideNamespace) {\n\tconst name = cursor.peekKind(1) === \"Ident\" ? cursor.peekToken(1).text : \"\";\n\tif (insideNamespace && keywordIs(cursor, \"namespace\")) cursor.diagnostic(\"PSL_INVALID_NAMESPACE_BLOCK\", `Recursive \"namespace ${name}\" block is not allowed; namespace blocks may not nest`, cursor.mark());\n\telse if (insideNamespace && keywordIs(cursor, \"types\")) cursor.diagnostic(\"PSL_INVALID_NAMESPACE_BLOCK\", \"`types` blocks must be declared at the document top level, not inside a namespace block\", cursor.mark());\n\telse if (keywordIs(cursor, \"namespace\") && name === UNSPECIFIED_PSL_NAMESPACE_ID) cursor.diagnostic(\"PSL_INVALID_NAMESPACE_BLOCK\", `Namespace name \"${UNSPECIFIED_PSL_NAMESPACE_ID}\" is reserved for the parser-synthesised bucket for top-level declarations`, cursor.mark(1));\n\tif (!(parseModel(cursor) ?? parseNamespace(cursor) ?? parseCompositeType(cursor) ?? parseTypesBlock(cursor) ?? parseGenericBlock(cursor))) parseUnsupportedTopLevel(cursor);\n}\n/**\n* Reports only the first missing piece — a missing name suppresses the\n* missing-brace diagnostic. `nameRequired` is false only for the `types` block.\n*/\nfunction parseBlock(cursor, kind, nameRequired, parseMember) {\n\tconst keyword = cursor.peekToken().text;\n\tconst keywordMark = cursor.mark();\n\tcursor.startNode(kind);\n\tcursor.bump();\n\tconst hasName = nameRequired && cursor.peekKind() === \"Ident\";\n\tif (hasName) parseIdentifier(cursor);\n\tif (nameRequired && !hasName) cursor.diagnostic(\"PSL_INVALID_DECLARATION\", `Expected a name after \"${keyword}\"`, keywordMark);\n\telse if (cursor.peekKind() !== \"LBrace\") cursor.diagnostic(\"PSL_INVALID_DECLARATION\", `Expected \"{\" to open the \"${keyword}\" block`, cursor.markAfterLastToken());\n\tif (cursor.peekKind() === \"LBrace\") parseBlockBody(cursor, parseMember);\n\telse cursor.recoverToSyncPoint();\n\treturn cursor.finishNode();\n}\nfunction parseModel(cursor) {\n\tif (!keywordIs(cursor, \"model\")) return void 0;\n\treturn parseBlock(cursor, \"ModelDeclaration\", true, parseModelMember);\n}\n/**\n* Excluding the reserved keywords keeps a malformed reserved block (e.g. `model\n* {` with no name) routed to its dedicated parser. The generic keyword set is\n* open, so a bare identifier with no brace (e.g. `oops`) is read as an unfinished\n* custom declaration rather than unsupported content.\n*/\nfunction parseGenericBlock(cursor) {\n\tif (cursor.peekKind() !== \"Ident\") return void 0;\n\tconst keyword = cursor.peekToken().text;\n\tif (RESERVED_BLOCK_KEYWORDS.has(keyword)) return void 0;\n\tconst hasName = cursor.peekKind(1) === \"Ident\" && cursor.peekKind(2) === \"LBrace\";\n\tcursor.startNode(\"GenericBlockDeclaration\");\n\tcursor.bump();\n\tif (hasName) parseIdentifier(cursor);\n\tif (cursor.peekKind() === \"LBrace\") parseBlockBody(cursor, parseKeyValueMember);\n\telse {\n\t\tcursor.diagnostic(\"PSL_INVALID_DECLARATION\", `Expected \"{\" to open the \"${keyword}\" block`, cursor.markAfterLastToken());\n\t\tcursor.recoverToSyncPoint();\n\t}\n\treturn cursor.finishNode();\n}\nfunction parseNamespace(cursor) {\n\tif (!keywordIs(cursor, \"namespace\")) return void 0;\n\treturn parseBlock(cursor, \"Namespace\", true, (inner) => parseDeclaration(inner, true));\n}\nfunction parseCompositeType(cursor) {\n\tif (!keywordIs(cursor, \"type\")) return void 0;\n\treturn parseBlock(cursor, \"CompositeTypeDeclaration\", true, parseModelMember);\n}\n/** `types` (plural) is the no-name types block; the singular `type` is the composite type above. */\nfunction parseTypesBlock(cursor) {\n\tif (!keywordIs(cursor, \"types\")) return void 0;\n\treturn parseBlock(cursor, \"TypesBlock\", false, parseNamedTypeMember);\n}\n/** Every `parseMember` consumes at least one significant token, so the loop always terminates. */\nfunction parseBlockBody(cursor, parseMember) {\n\tconst braceMark = cursor.mark();\n\tcursor.bump();\n\tfor (;;) {\n\t\tconst kind = cursor.peekKind();\n\t\tif (kind === \"RBrace\" || kind === \"Eof\") break;\n\t\tparseMember(cursor);\n\t}\n\tif (cursor.peekKind() === \"RBrace\") cursor.bump();\n\telse cursor.diagnostic(\"PSL_UNTERMINATED_BLOCK\", \"Unterminated block declaration\", braceMark);\n}\nfunction parseUnsupportedTopLevel(cursor) {\n\tconst offending = cursor.peekToken().text;\n\tconst message = cursor.peekKind(1) === \"LBrace\" ? `Unsupported top-level block \"${offending}\"` : `Unsupported top-level declaration \"${offending}\"`;\n\tcursor.diagnostic(\"PSL_UNSUPPORTED_TOP_LEVEL_BLOCK\", message, cursor.mark());\n\tcursor.bump();\n\tcursor.recoverToSyncPoint();\n}\n/**\n* Matches a leading `@@` block attribute, a no-op otherwise. Single-`@`\n* attributes belong to fields and are parsed inside `parseField`.\n*/\nfunction parseBlockAttribute(cursor) {\n\tif (cursor.peekKind() !== \"DoubleAt\") return void 0;\n\treturn parseAttribute(cursor);\n}\nfunction parseModelMember(cursor) {\n\tif (!(parseBlockAttribute(cursor) ?? parseField(cursor))) invalidMember(cursor, \"PSL_INVALID_MODEL_MEMBER\", `Invalid model member declaration \"${cursor.peekToken().text}\"`);\n}\nfunction parseNamedTypeMember(cursor) {\n\tif (!parseNamedType(cursor)) invalidMember(cursor, \"PSL_INVALID_TYPES_MEMBER\", `Invalid types declaration \"${cursor.peekToken().text}\"`);\n}\n/**\n* A generic-block member is either a `@@`-block attribute or a `key = value`\n* entry. The block-attribute alternative is purely syntactic — it does not judge\n* whether the attribute is valid for the block's kind.\n*/\nfunction parseKeyValueMember(cursor) {\n\tif (!(parseBlockAttribute(cursor) ?? parseKeyValue(cursor))) invalidMember(cursor, \"PSL_INVALID_EXTENSION_BLOCK_MEMBER\", \"Invalid block entry\");\n}\nfunction invalidMember(cursor, code, message) {\n\tcursor.diagnostic(code, message, cursor.mark());\n\tcursor.bump();\n\tcursor.recoverToSyncPoint();\n}\nfunction parseField(cursor) {\n\tif (cursor.peekKind() !== \"Ident\") return void 0;\n\tcursor.startNode(\"FieldDeclaration\");\n\tconst nameMark = cursor.mark();\n\tconst nameText = cursor.peekToken().text;\n\tparseIdentifier(cursor);\n\tif (cursor.peekKind() !== \"Ident\") cursor.diagnostic(\"PSL_INVALID_MODEL_MEMBER\", `Expected a type after field \"${nameText}\"`, nameMark);\n\tparseTypeAnnotation(cursor);\n\twhile (cursor.peekKind() === \"At\") parseAttribute(cursor);\n\treturn cursor.finishNode();\n}\nfunction parseNamedType(cursor) {\n\tif (cursor.peekKind() !== \"Ident\") return void 0;\n\tcursor.startNode(\"NamedTypeDeclaration\");\n\tconst nameMark = cursor.mark();\n\tconst nameText = cursor.peekToken().text;\n\tparseIdentifier(cursor);\n\tif (cursor.peekKind() === \"Equals\") cursor.bump();\n\telse cursor.diagnostic(\"PSL_INVALID_TYPES_MEMBER\", `Expected \"=\" after \"${nameText}\"`, nameMark);\n\tparseTypeAnnotation(cursor);\n\twhile (cursor.peekKind() === \"At\") parseAttribute(cursor);\n\treturn cursor.finishNode();\n}\n/**\n* A generic-block entry is either `key = value` or a bare `key` (committing a\n* `KeyValuePair` carrying only the key). A `key =` with no following expression\n* is flagged.\n*/\nfunction parseKeyValue(cursor) {\n\tif (cursor.peekKind() !== \"Ident\") return void 0;\n\tcursor.startNode(\"KeyValuePair\");\n\tparseIdentifier(cursor);\n\tif (cursor.peekKind() === \"Equals\") {\n\t\tcursor.bump();\n\t\tif (!parseExpression(cursor)) cursor.diagnostic(\"PSL_INVALID_EXTENSION_BLOCK_MEMBER\", \"Expected a value after \\\"=\\\"\", cursor.mark());\n\t}\n\treturn cursor.finishNode();\n}\n//#endregion\nexport { SourceFile as a, greenToken as i, GreenNodeBuilder as n, greenNode as r, parse as t };\n\n//# sourceMappingURL=parse-GbZGfMUj.mjs.map"],"mappings":";;;;;AAKA,MAAM,kBAAkB;AACxB,MAAM,YAAY;AAClB,IAAI,aAAa,MAAM;CACtB;CACA;CACA,YAAY,MAAM;EACjB,KAAKA,QAAQ;EACb,MAAM,aAAa,CAAC,CAAC;EACrB,KAAK,IAAI,SAAS,GAAG,SAAS,KAAK,QAAQ,UAAU,IAAI,KAAK,WAAW,MAAM,MAAM,WAAW,WAAW,KAAK,SAAS,CAAC;EAC1H,KAAKC,cAAc;CACpB;CACA,IAAI,OAAO;EACV,OAAO,KAAKD;CACb;CACA,IAAI,SAAS;EACZ,OAAO,KAAKA,MAAM;CACnB;CACA,IAAI,YAAY;EACf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1B,OAAO,OAAO,SAAS,MAAM,MAAM,eAAe,MAAM;CACxD,OAAO,OAAO,WAAW;AAC1B;AACA,SAAS,eAAe,QAAQ;CAC/B,IAAI,OAAO,SAAS,MAAM,SAAS,OAAO,KAAK;CAC/C,OAAO,UAAU,sBAAsB;CACvC,MAAM,WAAW,OAAO,KAAK;CAC7B,MAAM,WAAW,OAAO,UAAU,CAAC,CAAC;CACpC,gBAAgB,MAAM;CACtB,IAAI,OAAO,SAAS,MAAM,UAAU,OAAO,KAAK;MAC3C,OAAO,WAAW,4BAA4B,uBAAuB,SAAS,IAAI,QAAQ;CAC/F,oBAAoB,MAAM;CAC1B,OAAO,OAAO,SAAS,MAAM,MAAM,eAAe,MAAM;CACxD,OAAO,OAAO,WAAW;AAC1B;;;;;;AAMA,SAAS,cAAc,QAAQ;CAC9B,IAAI,OAAO,SAAS,MAAM,SAAS,OAAO,KAAK;CAC/C,OAAO,UAAU,cAAc;CAC/B,gBAAgB,MAAM;CACtB,IAAI,OAAO,SAAS,MAAM,UAAU;EACnC,OAAO,KAAK;EACZ,IAAI,CAAC,gBAAgB,MAAM,GAAG,OAAO,WAAW,sCAAsC,gCAAgC,OAAO,KAAK,CAAC;CACpI;CACA,OAAO,OAAO,WAAW;AAC1B"}
|
package/dist/psl-parser.d.mts
CHANGED
|
@@ -5,7 +5,7 @@ import "./codec-DxAIshoO.mjs";
|
|
|
5
5
|
import { l as ControlMutationDefaultRegistry } from "./framework-components-CDppKaT_-DcMHokB8.mjs";
|
|
6
6
|
import { M as namespacePslExtensionBlocks, T as PslTypesBlock, a as PslAttributeArgument, b as PslNamedTypeDeclaration, c as PslAttributeTarget, d as PslDefaultLiteralValue, f as PslDefaultValue, g as PslFieldAttribute, h as PslField, i as PslAttribute, k as flatPslModels, l as PslCompositeType, m as PslDocumentAst, o as PslAttributeNamedArgument, p as PslDiagnostic, s as PslAttributePositionalArgument, u as PslDefaultFunctionValue, v as PslModel, w as PslTypeConstructorCall, x as PslNamespace, y as PslModelAttribute } from "./psl-ast-dnXw52MT-1jSUKlC9.mjs";
|
|
7
7
|
import { r as Result } from "./result-Bpupv5vO.mjs";
|
|
8
|
-
import { n as AssembledAuthoringContributions } from "./control-
|
|
8
|
+
import { n as AssembledAuthoringContributions } from "./control-eH2MIHqA.mjs";
|
|
9
9
|
import "./psl-ast-BkfQwHjE.mjs";
|
|
10
10
|
import { C as ModelAttributeAst, I as SourceFile, f as ExpressionAst, n as AstNode, p as FieldAttributeAst, r as AttributeArgAst } from "./parse-B5xYL_oV-aGFgfM8N.mjs";
|
|
11
11
|
import { _ as nodePslSpan, a as ModelSymbol, b as readResolvedAttributes, c as ResolvedAttribute, d as ResolvedTypeConstructorCall, f as SymbolTable, g as keywordPslSpan, h as buildSymbolTable, i as FieldSymbol, l as ResolvedAttributeArg, m as TopLevelScope, n as BuildSymbolTableOptions, o as NamedTypeSymbol, p as SymbolTableResult, r as CompositeTypeSymbol, s as NamespaceSymbol, t as BlockSymbol, u as ResolvedNamedTypeBinding, v as rangeToPslSpan, x as readResolvedConstructorCall, y as readResolvedAttribute } from "./symbol-table-BeOQBu3C-DduAXEh6.mjs";
|
package/dist/psl-parser.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as blindCast } from "./casts-DpaahrlC-Bd5n2coI.mjs";
|
|
2
|
-
import { t as InternalError } from "./internal-error-
|
|
3
|
-
import { n as ok, t as notOk } from "./result-
|
|
4
|
-
import { h as isAuthoringPslBlockDescriptor, m as isAuthoringModelAttributeDescriptor } from "./framework-authoring-BvxZnsPY-
|
|
2
|
+
import { t as InternalError } from "./internal-error-ChGYPVpq-DhUD05u0.mjs";
|
|
3
|
+
import { n as ok, t as notOk } from "./result-C0NUq1Ok.mjs";
|
|
4
|
+
import { h as isAuthoringPslBlockDescriptor, m as isAuthoringModelAttributeDescriptor } from "./framework-authoring-BvxZnsPY-DlD1nwU5.mjs";
|
|
5
5
|
import { a as makePslNamespace, c as validateExtensionBlock, i as flatPslModels, n as UNSPECIFIED_PSL_NAMESPACE_ID, o as makePslNamespaceEntries, s as namespacePslExtensionBlocks } from "./psl-ast-DUCvVXbB.mjs";
|
|
6
6
|
import { E as TypesBlockAst, N as printSyntax, _ as NumberLiteralExprAst, a as CompositeTypeDeclarationAst, d as IdentifierAst, g as NamespaceDeclarationAst, i as BooleanLiteralExprAst, l as FunctionCallAst, m as ModelDeclarationAst, t as ArrayLiteralAst, u as GenericBlockDeclarationAst, x as StringLiteralExprAst, y as ObjectLiteralExprAst } from "./declarations-DR6To8_k-BFwkCGeP.mjs";
|
|
7
7
|
//#region ../../../1-framework/2-authoring/psl-parser/dist/index.mjs
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { o as structuredError } from "./structured-error-BXbihKQ-.mjs";
|
|
2
2
|
import { E as TypesBlockAst, S as SyntaxNode, a as CompositeTypeDeclarationAst, c as FieldDeclarationAst, f as KeyValuePairAst, g as NamespaceDeclarationAst, h as NamedTypeDeclarationAst, m as ModelDeclarationAst, p as ModelAttributeAst, u as GenericBlockDeclarationAst } from "./declarations-DR6To8_k-BFwkCGeP.mjs";
|
|
3
|
-
import { a as parse } from "./parse-GbZGfMUj-
|
|
3
|
+
import { a as parse } from "./parse-GbZGfMUj-C9tHGn-6.mjs";
|
|
4
4
|
//#region ../../../1-framework/2-authoring/psl-parser/dist/format.mjs
|
|
5
5
|
function emitDocument(document, indentUnit, newline) {
|
|
6
6
|
const writer = new LineWriter(indentUnit, newline);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { t as Contract } from "./contract-types-
|
|
1
|
+
import { t as Contract } from "./contract-types-Bje5yT4f-0D1Z41Lq.mjs";
|
|
2
2
|
import { r as Result } from "./result-Bpupv5vO.mjs";
|
|
3
|
-
import { c as ContractSourceProvider, m as PslContractSourceProvider, n as ContractSourceContext, o as ContractSourceDiagnostics, r as ContractSourceDiagnostic } from "./config-types-
|
|
3
|
+
import { c as ContractSourceProvider, m as PslContractSourceProvider, n as ContractSourceContext, o as ContractSourceDiagnostics, r as ContractSourceDiagnostic } from "./config-types-CeduUYkY.mjs";
|
|
4
4
|
import { I as SourceFile, d as DocumentAst } from "./parse-B5xYL_oV-aGFgfM8N.mjs";
|
|
5
5
|
import { f as SymbolTable, i as FieldSymbol } from "./symbol-table-BeOQBu3C-DduAXEh6.mjs";
|
|
6
6
|
//#region ../../../1-framework/2-authoring/psl-parser/dist/interpret.d.mts
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { A as filterChildren, C as SyntaxToken, D as any, E as TypesBlockAst, M as findFirstChild, N as printSyntax, O as castExpression, S as SyntaxNode, T as TypeAnnotationAst, _ as NumberLiteralExprAst, a as CompositeTypeDeclarationAst, b as QualifiedNameAst, c as FieldDeclarationAst, d as IdentifierAst, f as KeyValuePairAst, g as NamespaceDeclarationAst, h as NamedTypeDeclarationAst, i as BooleanLiteralExprAst, j as findChildToken, k as createSyntaxTree, l as FunctionCallAst, m as ModelDeclarationAst, n as AttributeArgAst, o as DocumentAst, p as ModelAttributeAst, r as AttributeArgListAst, s as FieldAttributeAst, t as ArrayLiteralAst, u as GenericBlockDeclarationAst, v as ObjectFieldAst, w as TokenAtOffset, x as StringLiteralExprAst, y as ObjectLiteralExprAst } from "./declarations-DR6To8_k-BFwkCGeP.mjs";
|
|
2
|
-
import { a as parse, i as greenToken, n as SourceFile, r as greenNode, t as GreenNodeBuilder } from "./parse-GbZGfMUj-
|
|
2
|
+
import { a as parse, i as greenToken, n as SourceFile, r as greenNode, t as GreenNodeBuilder } from "./parse-GbZGfMUj-C9tHGn-6.mjs";
|
|
3
3
|
//#region ../../../1-framework/2-authoring/psl-parser/dist/syntax.mjs
|
|
4
4
|
const TRIVIA_KINDS = /* @__PURE__ */ new Set([
|
|
5
5
|
"Whitespace",
|
package/dist/psl-printer.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as blindCast } from "./casts-DpaahrlC-Bd5n2coI.mjs";
|
|
2
2
|
import { t as ifDefined } from "./defined-BQWA85QH-BRSBMULx.mjs";
|
|
3
3
|
import { o as structuredError } from "./structured-error-BXbihKQ-.mjs";
|
|
4
|
-
import { h as isAuthoringPslBlockDescriptor } from "./framework-authoring-BvxZnsPY-
|
|
4
|
+
import { h as isAuthoringPslBlockDescriptor } from "./framework-authoring-BvxZnsPY-DlD1nwU5.mjs";
|
|
5
5
|
import { i as flatPslModels, s as namespacePslExtensionBlocks } from "./psl-ast-DUCvVXbB.mjs";
|
|
6
6
|
//#region ../../../1-framework/2-authoring/psl-printer/dist/index.mjs
|
|
7
7
|
function contractError(code, message, options) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as blindCast } from "./casts-DpaahrlC-Bd5n2coI.mjs";
|
|
2
|
-
import { t as InternalError } from "./internal-error-
|
|
2
|
+
import { t as InternalError } from "./internal-error-ChGYPVpq-DhUD05u0.mjs";
|
|
3
3
|
//#region ../../../1-framework/0-foundation/utils/dist/result.mjs
|
|
4
4
|
/**
|
|
5
5
|
* Generic Result type for representing success or failure outcomes.
|
|
@@ -89,4 +89,4 @@ function okVoid() {
|
|
|
89
89
|
//#endregion
|
|
90
90
|
export { ok as n, okVoid as r, notOk as t };
|
|
91
91
|
|
|
92
|
-
//# sourceMappingURL=result-
|
|
92
|
+
//# sourceMappingURL=result-C0NUq1Ok.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"result-
|
|
1
|
+
{"version":3,"file":"result-C0NUq1Ok.mjs","names":[],"sources":["../../../../1-framework/0-foundation/utils/dist/result.mjs"],"sourcesContent":["import { t as InternalError } from \"./internal-error-ChGYPVpq.mjs\";\nimport { t as blindCast } from \"./casts-DpaahrlC.mjs\";\n//#region src/result.ts\n/**\n* Generic Result type for representing success or failure outcomes.\n*\n* This is the standard way to return \"expected failures\" as values rather than\n* throwing exceptions. See docs/Error Handling.md for the full taxonomy.\n*\n* Naming rationale:\n* - `Ok<T>` / `NotOk<F>` mirror the `ok: true/false` discriminator\n* - `NotOk` avoids collision with domain types like \"Failure\" or \"Error\"\n* - `failure` property distinguishes from JS Error semantics\n*/\n/**\n* Result class that implements both Ok and NotOk variants.\n*/\nvar ResultImpl = class ResultImpl {\n\tok;\n\t_value;\n\t_failure;\n\tconstructor(ok, valueOrFailure) {\n\t\tthis.ok = ok;\n\t\tif (ok) this._value = valueOrFailure;\n\t\telse this._failure = valueOrFailure;\n\t\tObject.freeze(this);\n\t}\n\tget value() {\n\t\tif (!this.ok) throw new InternalError(\"Cannot access value on NotOk result\");\n\t\treturn this._value;\n\t}\n\tget failure() {\n\t\tif (this.ok) throw new InternalError(\"Cannot access failure on Ok result\");\n\t\treturn this._failure;\n\t}\n\t/**\n\t* Creates a successful result.\n\t*/\n\tstatic ok(value) {\n\t\treturn blindCast(new ResultImpl(true, value));\n\t}\n\t/**\n\t* Creates an unsuccessful result.\n\t*/\n\tstatic notOk(failure) {\n\t\treturn blindCast(new ResultImpl(false, failure));\n\t}\n\t/**\n\t* Asserts that this result is Ok and returns the value.\n\t* Throws if the result is NotOk.\n\t*/\n\tassertOk() {\n\t\tif (!this.ok) throw new InternalError(\"Expected Ok result but got NotOk\");\n\t\treturn this.value;\n\t}\n\t/**\n\t* Asserts that this result is NotOk and returns the failure.\n\t* Throws if the result is Ok.\n\t*/\n\tassertNotOk() {\n\t\tif (this.ok) throw new InternalError(\"Expected NotOk result but got Ok\");\n\t\treturn this.failure;\n\t}\n};\n/**\n* Creates a successful result.\n*/\nfunction ok(value) {\n\treturn ResultImpl.ok(value);\n}\n/**\n* Creates an unsuccessful result.\n*/\nfunction notOk(failure) {\n\treturn ResultImpl.notOk(failure);\n}\n/**\n* Singleton for void success results.\n* Use this for validation checks that don't produce a value.\n*/\nconst OK_VOID = ResultImpl.ok(void 0);\n/**\n* Returns a successful void result.\n* Use this for validation checks that don't produce a value.\n*/\nfunction okVoid() {\n\treturn OK_VOID;\n}\n//#endregion\nexport { notOk, ok, okVoid };\n\n//# sourceMappingURL=result.mjs.map"],"mappings":";;;;;;;;;;;;;;;;;AAiBA,IAAI,aAAa,MAAM,WAAW;CACjC;CACA;CACA;CACA,YAAY,IAAI,gBAAgB;EAC/B,KAAK,KAAK;EACV,IAAI,IAAI,KAAK,SAAS;OACjB,KAAK,WAAW;EACrB,OAAO,OAAO,IAAI;CACnB;CACA,IAAI,QAAQ;EACX,IAAI,CAAC,KAAK,IAAI,MAAM,IAAI,cAAc,qCAAqC;EAC3E,OAAO,KAAK;CACb;CACA,IAAI,UAAU;EACb,IAAI,KAAK,IAAI,MAAM,IAAI,cAAc,oCAAoC;EACzE,OAAO,KAAK;CACb;;;;CAIA,OAAO,GAAG,OAAO;EAChB,OAAO,UAAU,IAAI,WAAW,MAAM,KAAK,CAAC;CAC7C;;;;CAIA,OAAO,MAAM,SAAS;EACrB,OAAO,UAAU,IAAI,WAAW,OAAO,OAAO,CAAC;CAChD;;;;;CAKA,WAAW;EACV,IAAI,CAAC,KAAK,IAAI,MAAM,IAAI,cAAc,kCAAkC;EACxE,OAAO,KAAK;CACb;;;;;CAKA,cAAc;EACb,IAAI,KAAK,IAAI,MAAM,IAAI,cAAc,kCAAkC;EACvE,OAAO,KAAK;CACb;AACD;;;;AAIA,SAAS,GAAG,OAAO;CAClB,OAAO,WAAW,GAAG,KAAK;AAC3B;;;;AAIA,SAAS,MAAM,SAAS;CACvB,OAAO,WAAW,MAAM,OAAO;AAChC;;;;;AAKA,MAAM,UAAU,WAAW,GAAG,KAAK,CAAC;;;;;AAKpC,SAAS,SAAS;CACjB,OAAO;AACR"}
|
package/dist/ts-render.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { i as tsStringLiteral, n as jsonToTsSource, r as renderImports, t as TsExpression } from "./dist-
|
|
1
|
+
import { i as tsStringLiteral, n as jsonToTsSource, r as renderImports, t as TsExpression } from "./dist-DUlexZHp.mjs";
|
|
2
2
|
export { TsExpression, jsonToTsSource, renderImports, tsStringLiteral };
|
package/dist/utils.d.mts
CHANGED
|
@@ -9,7 +9,7 @@ import { t as canonicalStringify } from "./canonical-stringify-Bl6agy_g.mjs";
|
|
|
9
9
|
import { n as castAs, t as blindCast } from "./casts-D29CHGrr.mjs";
|
|
10
10
|
import { t as ifDefined } from "./defined-BSXuxrnl.mjs";
|
|
11
11
|
import { t as hashContent } from "./hash-content-DwEUh-Rx.mjs";
|
|
12
|
-
import { n as assertNever, r as isInternalError, t as InternalError } from "./internal-error-
|
|
12
|
+
import { n as assertNever, r as isInternalError, t as InternalError } from "./internal-error-2fJ9fcZX.mjs";
|
|
13
13
|
import { t as isThenable } from "./promise-DHJWZv49.mjs";
|
|
14
14
|
import { n as redactDatabaseUrl, t as RedactedDatabaseUrl } from "./redact-db-url-BlaloOwt.mjs";
|
|
15
15
|
import { t as SimplifyDeep } from "./simplify-deep-Dw9I_ZUl.mjs";
|
package/dist/utils.mjs
CHANGED
|
@@ -3,12 +3,12 @@ import { t as ifDefined } from "./defined-BQWA85QH-BRSBMULx.mjs";
|
|
|
3
3
|
import { a as isStructuredErrorCode, i as isStructuredError, n as DOCS_ERRORS_VERSION, o as structuredError, r as docsUrlFor, t as DOCS_BASE } from "./structured-error-BXbihKQ-.mjs";
|
|
4
4
|
import { t as isArrayEqual } from "./array-equal-28xupwIB.mjs";
|
|
5
5
|
import { t as abortable } from "./abortable-CQO6uG9F.mjs";
|
|
6
|
-
import { n as assertNever, r as isInternalError, t as InternalError } from "./internal-error-
|
|
7
|
-
import { n as invariant, t as assertDefined } from "./assertions-
|
|
6
|
+
import { n as assertNever, r as isInternalError, t as InternalError } from "./internal-error-ChGYPVpq-DhUD05u0.mjs";
|
|
7
|
+
import { n as invariant, t as assertDefined } from "./assertions-Dw1lZz_Q.mjs";
|
|
8
8
|
import { t as canonicalStringify } from "./canonical-stringify-DY4NaAJi.mjs";
|
|
9
9
|
import { t as hashContent } from "./hash-content-Bugg_nZn.mjs";
|
|
10
10
|
import { t as isThenable } from "./promise-D8meygPf.mjs";
|
|
11
11
|
import { t as redactDatabaseUrl } from "./redact-db-url-CRWJWdB1.mjs";
|
|
12
|
-
import { n as ok, r as okVoid, t as notOk } from "./result-
|
|
12
|
+
import { n as ok, r as okVoid, t as notOk } from "./result-C0NUq1Ok.mjs";
|
|
13
13
|
import { t as suppressIdleConnectionErrors } from "./suppress-idle-connection-errors-DzApeUb3.mjs";
|
|
14
14
|
export { DOCS_BASE, DOCS_ERRORS_VERSION, InternalError, abortable, assertDefined, assertNever, blindCast, canonicalStringify, castAs, docsUrlFor, hashContent, ifDefined, invariant, isArrayEqual, isInternalError, isStructuredError, isStructuredErrorCode, isThenable, notOk, ok, okVoid, redactDatabaseUrl, structuredError, suppressIdleConnectionErrors };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as invariant, t as assertDefined } from "./assertions-
|
|
1
|
+
import { n as invariant, t as assertDefined } from "./assertions-Dw1lZz_Q.mjs";
|
|
2
2
|
export { assertDefined, invariant };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as assertNever, r as isInternalError, t as InternalError } from "./internal-error-
|
|
1
|
+
import { n as assertNever, r as isInternalError, t as InternalError } from "./internal-error-2fJ9fcZX.mjs";
|
|
2
2
|
export { InternalError, assertNever, isInternalError };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as assertNever, r as isInternalError, t as InternalError } from "./internal-error-
|
|
1
|
+
import { n as assertNever, r as isInternalError, t as InternalError } from "./internal-error-ChGYPVpq-DhUD05u0.mjs";
|
|
2
2
|
export { InternalError, assertNever, isInternalError };
|
package/dist/utils__result.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as ok, r as okVoid, t as notOk } from "./result-
|
|
1
|
+
import { n as ok, r as okVoid, t as notOk } from "./result-C0NUq1Ok.mjs";
|
|
2
2
|
export { notOk, ok, okVoid };
|
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@prisma/orm-framework",
|
|
3
|
-
"version": "8.0.0-rc.9-dev.
|
|
3
|
+
"version": "8.0.0-rc.9-dev.7",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": false,
|
|
7
|
-
"description": "Prisma
|
|
7
|
+
"description": "Prisma 8 target-agnostic runtime: contract, components, authoring surface",
|
|
8
8
|
"files": [
|
|
9
9
|
"dist"
|
|
10
10
|
],
|
|
@@ -15,20 +15,20 @@
|
|
|
15
15
|
"uniku": "^0.5.0"
|
|
16
16
|
},
|
|
17
17
|
"devDependencies": {
|
|
18
|
-
"@internal/config": "8.0.0-rc.9-dev.
|
|
19
|
-
"@internal/contract": "8.0.0-rc.9-dev.
|
|
20
|
-
"@internal/contract-authoring": "8.0.0-rc.9-dev.
|
|
21
|
-
"@internal/errors": "8.0.0-rc.9-dev.
|
|
22
|
-
"@internal/framework-components": "8.0.0-rc.9-dev.
|
|
23
|
-
"@internal/ids": "8.0.0-rc.9-dev.
|
|
24
|
-
"@internal/operations": "8.0.0-rc.9-dev.
|
|
25
|
-
"@internal/psl-parser": "8.0.0-rc.9-dev.
|
|
26
|
-
"@internal/psl-printer": "8.0.0-rc.9-dev.
|
|
27
|
-
"@internal/ts-render": "8.0.0-rc.9-dev.
|
|
28
|
-
"@repo/tsconfig": "8.0.0-rc.9-dev.
|
|
29
|
-
"@internal/publish-surface": "8.0.0-rc.9-dev.
|
|
30
|
-
"@repo/tsdown": "8.0.0-rc.9-dev.
|
|
31
|
-
"@internal/utils": "8.0.0-rc.9-dev.
|
|
18
|
+
"@internal/config": "8.0.0-rc.9-dev.7",
|
|
19
|
+
"@internal/contract": "8.0.0-rc.9-dev.7",
|
|
20
|
+
"@internal/contract-authoring": "8.0.0-rc.9-dev.7",
|
|
21
|
+
"@internal/errors": "8.0.0-rc.9-dev.7",
|
|
22
|
+
"@internal/framework-components": "8.0.0-rc.9-dev.7",
|
|
23
|
+
"@internal/ids": "8.0.0-rc.9-dev.7",
|
|
24
|
+
"@internal/operations": "8.0.0-rc.9-dev.7",
|
|
25
|
+
"@internal/psl-parser": "8.0.0-rc.9-dev.7",
|
|
26
|
+
"@internal/psl-printer": "8.0.0-rc.9-dev.7",
|
|
27
|
+
"@internal/ts-render": "8.0.0-rc.9-dev.7",
|
|
28
|
+
"@repo/tsconfig": "8.0.0-rc.9-dev.7",
|
|
29
|
+
"@internal/publish-surface": "8.0.0-rc.9-dev.7",
|
|
30
|
+
"@repo/tsdown": "8.0.0-rc.9-dev.7",
|
|
31
|
+
"@internal/utils": "8.0.0-rc.9-dev.7",
|
|
32
32
|
"tsdown": "0.22.14",
|
|
33
33
|
"typescript": "5.9.3",
|
|
34
34
|
"vitest": "5.0.0-rc.2"
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"apply-specifier-default-control-policy-yxEeh3lJ.d.mts","names":[],"sources":["../../../../1-framework/0-foundation/contract/dist/apply-specifier-default-control-policy.d.mts"],"mappings":";;;iBAEiB,mCAAmC,UAAU,UAAU,kBAAkB,4BAA4B"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"execution-Dejx90fO.mjs","names":[],"sources":["../../../../1-framework/1-core/errors/dist/execution.mjs"],"sourcesContent":["import { t as CliStructuredError } from \"./control-ZdvxNTVU.mjs\";\nimport { ifDefined } from \"@internal/utils/defined\";\n//#region src/execution.ts\n/**\n* Contract marker not found in database.\n*/\nfunction errorMarkerMissing(options) {\n\treturn new CliStructuredError(\"CONTRACT.MARKER_MISSING\", \"Database not signed\", {\n\t\twhy: options?.why ?? \"No database signature (marker) found\",\n\t\tfix: \"Run `{bin} db sign --db <url>` to sign the database\",\n\t\tnextActions: [{\n\t\t\tkind: \"run-command\",\n\t\t\tlabel: \"Sign the database\",\n\t\t\tcommand: \"{bin} db sign --db <url>\"\n\t\t}]\n\t});\n}\n/**\n* Contract hash does not match database marker.\n*/\nfunction errorHashMismatch(options) {\n\treturn new CliStructuredError(\"CONTRACT.MARKER_MISMATCH\", \"Hash mismatch\", {\n\t\twhy: options?.why ?? \"Contract hash does not match database marker\",\n\t\tfix: \"Migrate database or re-sign if intentional\",\n\t\t...options?.expected !== void 0 || options?.actual !== void 0 ? { meta: {\n\t\t\t...ifDefined(\"expected\", options?.expected),\n\t\t\t...ifDefined(\"actual\", options?.actual)\n\t\t} } : {}\n\t});\n}\n/**\n* Contract target does not match config target.\n*/\nfunction errorTargetMismatch(expected, actual, options) {\n\treturn new CliStructuredError(\"CONTRACT.TARGET_MISMATCH\", \"Target mismatch\", {\n\t\twhy: options?.why ?? `Contract target does not match config target (expected: ${expected}, actual: ${actual})`,\n\t\tfix: \"Align contract target and config target\",\n\t\tmeta: {\n\t\t\texpected,\n\t\t\tactual\n\t\t}\n\t});\n}\n/**\n* Marker row exists but column values fail schema validation.\n*/\nfunction errorMarkerRowCorrupt(options) {\n\treturn new CliStructuredError(\"CONTRACT.MARKER_ROW_CORRUPT\", \"Marker row is corrupt or incompatible\", {\n\t\twhy: options.why,\n\t\tfix: `The ${options.markerLocation} row for space \"${options.space}\" contains invalid data. Delete the row, then run \\`{bin} db sign --db <url>\\` to write a fresh marker.`,\n\t\tnextActions: [{\n\t\t\tkind: \"run-command\",\n\t\t\tlabel: \"Write a fresh marker\",\n\t\t\tcommand: \"{bin} db sign --db <url>\",\n\t\t\treason: `Delete the invalid ${options.markerLocation} row for space \"${options.space}\" first — this command then writes a valid one.`\n\t\t}],\n\t\tmeta: { space: options.space },\n\t\t...ifDefined(\"cause\", options.cause)\n\t});\n}\n/**\n* Driver-level failure while reading the contract marker table.\n*/\nfunction errorMarkerReadFailed(options) {\n\treturn new CliStructuredError(\"CONTRACT.MARKER_READ_FAILED\", \"Database error while reading contract marker\", {\n\t\twhy: options.why,\n\t\tfix: `Could not read marker at ${options.markerLocation} for space \"${options.space}\". Verify read permissions, connectivity, and locks, then retry.`,\n\t\tmeta: { space: options.space },\n\t\t...ifDefined(\"cause\", options.cause)\n\t});\n}\nfunction isMarkerRowParseError(err) {\n\treturn err instanceof Error && (err.message.startsWith(\"Invalid contract marker row:\") || err.message.startsWith(\"Invalid marker doc on\"));\n}\nfunction isLegacyMarkerShapeReadError(message) {\n\tconst normalized = message.toLowerCase();\n\treturn normalized.includes(\"column \\\"space\\\" does not exist\") || normalized.includes(\"no such column: space\");\n}\nfunction errorLegacyMarkerShape(options) {\n\treturn errorRunnerFailed(`Legacy marker-table shape detected on ${options.markerLocation} (no \\`space\\` column). Prisma Next is in pre-1.0; the previous transitional auto-migration to the per-space-row schema has been removed. Drop \\`${options.markerLocation}\\` and re-run \\`{bin} db init\\` to reinitialise from a clean baseline.`, {\n\t\twhy: options.why,\n\t\tfix: \"Legacy marker-table shape detected. Drop `prisma_contract.marker` (Postgres) or `_prisma_marker` (SQLite) and re-run `{bin} db init` to recreate it with the current per-space schema.\",\n\t\tnextActions: [{\n\t\t\tkind: \"run-command\",\n\t\t\tlabel: \"Reinitialise the marker table from a clean baseline\",\n\t\t\tcommand: \"{bin} db init\",\n\t\t\treason: `Drop \\`${options.markerLocation}\\` first — it has the legacy shape (no \\`space\\` column) and this command recreates it with the current per-space schema.`\n\t\t}],\n\t\tmeta: { runnerErrorCode: \"MIGRATION.LEGACY_MARKER_SHAPE\" },\n\t\t...ifDefined(\"cause\", options.cause)\n\t});\n}\nfunction rethrowMarkerReadError(err, context) {\n\tif (CliStructuredError.is(err)) throw err;\n\tif (isMarkerRowParseError(err)) throw errorMarkerRowCorrupt({\n\t\twhy: err.message,\n\t\tspace: context.space,\n\t\tmarkerLocation: context.markerLocation,\n\t\tcause: err\n\t});\n\tconst message = err instanceof Error ? err.message : String(err);\n\tif (isLegacyMarkerShapeReadError(message)) throw errorLegacyMarkerShape({\n\t\twhy: message,\n\t\tmarkerLocation: context.markerLocation,\n\t\tcause: err\n\t});\n\tthrow errorMarkerReadFailed({\n\t\twhy: message,\n\t\tspace: context.space,\n\t\tmarkerLocation: context.markerLocation,\n\t\tcause: err\n\t});\n}\nasync function withMarkerReadErrorHandling(operation, context) {\n\ttry {\n\t\treturn await operation();\n\t} catch (err) {\n\t\trethrowMarkerReadError(err, context);\n\t}\n}\nfunction parseMarkerRowSafely(row, parse, context) {\n\ttry {\n\t\treturn parse(row);\n\t} catch (err) {\n\t\trethrowMarkerReadError(err, context);\n\t}\n}\n/**\n* Database marker is required but not found.\n* Used by commands that require a pre-existing marker as a precondition.\n*/\nfunction errorMarkerRequired(options) {\n\treturn new CliStructuredError(\"CONTRACT.MARKER_REQUIRED\", \"Database must be signed first\", {\n\t\twhy: options?.why ?? \"No database signature (marker) found\",\n\t\tfix: options?.fix ?? \"Run `{bin} db init` first to sign the database\",\n\t\tnextActions: options?.nextActions ?? [{\n\t\t\tkind: \"run-command\",\n\t\t\tlabel: \"Sign the database\",\n\t\t\tcommand: \"{bin} db init\"\n\t\t}]\n\t});\n}\n/**\n* Schema verification found mismatches between the database and the contract.\n* The full verification result is preserved in `meta.verificationResult`.\n*/\nfunction errorSchemaVerificationFailed(options) {\n\treturn new CliStructuredError(\"CONTRACT.SCHEMA_VERIFICATION_FAILED\", options.summary, {\n\t\twhy: \"Database schema does not satisfy the contract\",\n\t\tfix: \"Run `{bin} db update` to reconcile, or adjust your contract to match the database\",\n\t\tnextActions: [{\n\t\t\tkind: \"run-command\",\n\t\t\tlabel: \"Reconcile the database\",\n\t\t\tcommand: \"{bin} db update\"\n\t\t}, {\n\t\t\tkind: \"edit-file\",\n\t\t\tlabel: \"Adjust your contract to match the database\"\n\t\t}],\n\t\tmeta: {\n\t\t\tverificationResult: options.verificationResult,\n\t\t\t...ifDefined(\"issues\", options.issues)\n\t\t}\n\t});\n}\n/**\n* Migration runner failed during execution.\n*/\nfunction errorRunnerFailed(summary, options) {\n\treturn new CliStructuredError(\"MIGRATION.RUNNER_FAILED\", summary, {\n\t\twhy: options?.why ?? \"Migration runner failed\",\n\t\tfix: options?.fix ?? \"Inspect the reported conflict and reconcile schema drift\",\n\t\t...ifDefined(\"nextActions\", options?.nextActions),\n\t\t...options?.meta ? { meta: options.meta } : {},\n\t\t...ifDefined(\"cause\", options?.cause)\n\t});\n}\n/** Error code for destructive changes that require explicit confirmation. */\nconst ERROR_CODE_DESTRUCTIVE_CHANGES = \"MIGRATION.DESTRUCTIVE_CHANGES\";\n/**\n* Destructive operations require explicit confirmation via -y/--yes.\n*/\nfunction errorDestructiveChanges(summary, options) {\n\treturn new CliStructuredError(ERROR_CODE_DESTRUCTIVE_CHANGES, summary, {\n\t\twhy: options?.why ?? \"Planned operations include destructive changes that require confirmation\",\n\t\tfix: options?.fix ?? \"Re-run with `-y` to apply, or use `--dry-run` to preview first\",\n\t\t...options?.meta ? { meta: options.meta } : {}\n\t});\n}\nconst ERROR_CODE_CONSENT_PLAN_MISMATCH = \"MIGRATION.CONSENT_PLAN_MISMATCH\";\n/**\n* An apply carrying consent was refused because the plan recomputed for it is\n* not the plan that was consented to.\n*/\nfunction errorConsentPlanMismatch(options) {\n\treturn new CliStructuredError(ERROR_CODE_CONSENT_PLAN_MISMATCH, \"The plan changed between consent and apply\", {\n\t\twhy: options.why ?? \"The plan recomputed for the consented apply is not the plan that was consented to, so applying it could destroy something nobody agreed to.\",\n\t\tfix: \"Re-run the command and review the freshly planned operations before consenting again\",\n\t\tmeta: {\n\t\t\tconsentedPlanHash: options.consentedPlanHash,\n\t\t\tplanHash: options.planHash\n\t\t}\n\t});\n}\n/**\n* Generic runtime error carrying a caller-provided dotted code.\n*/\nfunction errorRuntime(code, summary, options) {\n\treturn new CliStructuredError(code, summary, {\n\t\t...ifDefined(\"why\", options?.why),\n\t\t...ifDefined(\"fix\", options?.fix),\n\t\t...ifDefined(\"meta\", options?.meta),\n\t\t...ifDefined(\"cause\", options?.cause)\n\t});\n}\n//#endregion\nexport { ERROR_CODE_CONSENT_PLAN_MISMATCH, ERROR_CODE_DESTRUCTIVE_CHANGES, errorConsentPlanMismatch, errorDestructiveChanges, errorHashMismatch, errorMarkerMissing, errorMarkerReadFailed, errorMarkerRequired, errorMarkerRowCorrupt, errorRunnerFailed, errorRuntime, errorSchemaVerificationFailed, errorTargetMismatch, parseMarkerRowSafely, rethrowMarkerReadError, withMarkerReadErrorHandling };\n\n//# sourceMappingURL=execution.mjs.map"],"mappings":";;;;;;AAMA,SAAS,mBAAmB,SAAS;CACpC,OAAO,IAAI,mBAAmB,2BAA2B,uBAAuB;EAC/E,KAAK,SAAS,OAAO;EACrB,KAAK;EACL,aAAa,CAAC;GACb,MAAM;GACN,OAAO;GACP,SAAS;EACV,CAAC;CACF,CAAC;AACF;;;;AAIA,SAAS,kBAAkB,SAAS;CACnC,OAAO,IAAI,mBAAmB,4BAA4B,iBAAiB;EAC1E,KAAK,SAAS,OAAO;EACrB,KAAK;EACL,GAAG,SAAS,aAAa,KAAK,KAAK,SAAS,WAAW,KAAK,IAAI,EAAE,MAAM;GACvE,GAAG,UAAU,YAAY,SAAS,QAAQ;GAC1C,GAAG,UAAU,UAAU,SAAS,MAAM;EACvC,EAAE,IAAI,CAAC;CACR,CAAC;AACF;;;;AAIA,SAAS,oBAAoB,UAAU,QAAQ,SAAS;CACvD,OAAO,IAAI,mBAAmB,4BAA4B,mBAAmB;EAC5E,KAAK,SAAS,OAAO,2DAA2D,SAAS,YAAY,OAAO;EAC5G,KAAK;EACL,MAAM;GACL;GACA;EACD;CACD,CAAC;AACF;;;;AAIA,SAAS,sBAAsB,SAAS;CACvC,OAAO,IAAI,mBAAmB,+BAA+B,yCAAyC;EACrG,KAAK,QAAQ;EACb,KAAK,OAAO,QAAQ,eAAe,kBAAkB,QAAQ,MAAM;EACnE,aAAa,CAAC;GACb,MAAM;GACN,OAAO;GACP,SAAS;GACT,QAAQ,sBAAsB,QAAQ,eAAe,kBAAkB,QAAQ,MAAM;EACtF,CAAC;EACD,MAAM,EAAE,OAAO,QAAQ,MAAM;EAC7B,GAAG,UAAU,SAAS,QAAQ,KAAK;CACpC,CAAC;AACF;;;;AAIA,SAAS,sBAAsB,SAAS;CACvC,OAAO,IAAI,mBAAmB,+BAA+B,gDAAgD;EAC5G,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BAAyB,SAAS;CAC1C,OAAO,IAAI,mBAAmB,kCAAkC,8CAA8C;EAC7G,KAAK,QAAQ,OAAO;EACpB,KAAK;EACL,MAAM;GACL,mBAAmB,QAAQ;GAC3B,UAAU,QAAQ;EACnB;CACD,CAAC;AACF;;;;AAIA,SAAS,aAAa,MAAM,SAAS,SAAS;CAC7C,OAAO,IAAI,mBAAmB,MAAM,SAAS;EAC5C,GAAG,UAAU,OAAO,SAAS,GAAG;EAChC,GAAG,UAAU,OAAO,SAAS,GAAG;EAChC,GAAG,UAAU,QAAQ,SAAS,IAAI;EAClC,GAAG,UAAU,SAAS,SAAS,KAAK;CACrC,CAAC;AACF"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"internal-error-BIc-ehme-ouBQPoEL.mjs","names":[],"sources":["../../../../1-framework/0-foundation/utils/dist/internal-error-BIc-ehme.mjs"],"sourcesContent":["//#region src/internal-error.ts\n/**\n* A bug in Prisma Next, not a user error. Never catch this except at the\n* outermost boundary for crash reporting — an InternalError means an invariant\n* broke and the process cannot reliably continue. User-facing failures use\n* `structuredError` with a dotted code instead.\n*/\nvar InternalError = class extends Error {\n\tisPrismaInternalError = true;\n\tconstructor(message, options) {\n\t\tsuper(message, options?.cause !== void 0 ? { cause: options.cause } : void 0);\n\t\tthis.name = \"InternalError\";\n\t}\n};\nfunction isInternalError(e) {\n\treturn typeof e === \"object\" && e !== null && \"isPrismaInternalError\" in e && e.isPrismaInternalError === true;\n}\nfunction assertNever(value, message) {\n\tthrow new InternalError(message ?? `Unreachable: unexpected value ${String(value)}`);\n}\n//#endregion\nexport { assertNever as n, isInternalError as r, InternalError as t };\n\n//# sourceMappingURL=internal-error-BIc-ehme.mjs.map"],"mappings":";;;;;;;AAOA,IAAI,gBAAgB,cAAc,MAAM;CACvC,wBAAwB;CACxB,YAAY,SAAS,SAAS;EAC7B,MAAM,SAAS,SAAS,UAAU,KAAK,IAAI,EAAE,OAAO,QAAQ,MAAM,IAAI,KAAK,CAAC;EAC5E,KAAK,OAAO;CACb;AACD;AACA,SAAS,gBAAgB,GAAG;CAC3B,OAAO,OAAO,MAAM,YAAY,MAAM,QAAQ,2BAA2B,KAAK,EAAE,0BAA0B;AAC3G;AACA,SAAS,YAAY,OAAO,SAAS;CACpC,MAAM,IAAI,cAAc,WAAW,iCAAiC,OAAO,KAAK,GAAG;AACpF"}
|