@prisma/orm-framework 8.0.0-rc.12-dev.10 → 8.0.0-rc.12-dev.11
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-D_Czkofy.mjs +35 -0
- package/dist/authoring-D_Czkofy.mjs.map +1 -0
- package/dist/authoring-DjeaZGzp.d.mts +27 -0
- package/dist/authoring-DjeaZGzp.d.mts.map +1 -0
- package/dist/components.d.mts +4 -3
- package/dist/components.mjs +4 -3
- package/dist/components__authoring.d.mts +3 -2
- package/dist/components__authoring.mjs +3 -2
- package/dist/components__control.d.mts +3 -2
- package/dist/components__control.mjs +3 -2
- package/dist/{config-types-n_SgAl69.d.mts → config-types-DgoEWkgA.d.mts} +2 -2
- package/dist/{config-types-n_SgAl69.d.mts.map → config-types-DgoEWkgA.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.d.mts +75 -3
- package/dist/contract-authoring.d.mts.map +1 -1
- package/dist/contract-authoring.mjs +61 -2
- package/dist/contract-authoring.mjs.map +1 -1
- package/dist/contract.d.mts +2 -2
- package/dist/contract.mjs +2 -2
- package/dist/contract__types.d.mts +2 -2
- package/dist/contract__types.mjs +2 -2
- package/dist/{control-DQ-TrDyA.d.mts → control-Bc_dos9-.d.mts} +2 -1
- package/dist/control-Bc_dos9-.d.mts.map +1 -0
- package/dist/{control-0Teuhk1e.mjs → control-BjK3Jrmp.mjs} +2 -2
- package/dist/control-BjK3Jrmp.mjs.map +1 -0
- package/dist/{declarations-D79GooqC-BhBEz1Kc.mjs → declarations-D79GooqC-CcAbqTsq.mjs} +2 -2
- package/dist/{declarations-D79GooqC-BhBEz1Kc.mjs.map → declarations-D79GooqC-CcAbqTsq.mjs.map} +1 -1
- package/dist/errors.d.mts +1 -1
- package/dist/errors__execution.d.mts +1 -1
- package/dist/{execution-MIxP3di2.d.mts → execution-oqC6O8ES.d.mts} +2 -2
- package/dist/{execution-MIxP3di2.d.mts.map → execution-oqC6O8ES.d.mts.map} +1 -1
- package/dist/{parse-DN-F4ASD-CdISnhAA.mjs → parse-DN-F4ASD-ClJdPlzj.mjs} +2 -2
- package/dist/{parse-DN-F4ASD-CdISnhAA.mjs.map → parse-DN-F4ASD-ClJdPlzj.mjs.map} +1 -1
- package/dist/{parse-SHpUIBnv-D7vqty6E.d.mts → parse-SHpUIBnv-BvPsKLqw.d.mts} +3 -3
- package/dist/{parse-SHpUIBnv-D7vqty6E.d.mts.map → parse-SHpUIBnv-BvPsKLqw.d.mts.map} +1 -1
- package/dist/psl-parser.d.mts +4 -4
- package/dist/psl-parser.mjs +2 -2
- package/dist/psl-parser__format.mjs +2 -2
- package/dist/psl-parser__interpret.d.mts +61 -4
- package/dist/psl-parser__interpret.d.mts.map +1 -1
- package/dist/psl-parser__interpret.mjs +360 -1
- package/dist/psl-parser__interpret.mjs.map +1 -1
- package/dist/psl-parser__syntax.d.mts +1 -1
- package/dist/psl-parser__syntax.mjs +2 -2
- package/dist/psl-printer.d.mts +1 -1
- package/dist/psl-printer.mjs +1 -1
- package/dist/{symbol-table-DVPEY1fq-D2h-zqeQ.d.mts → symbol-table-DVPEY1fq-C5mC1wdG.d.mts} +3 -3
- package/dist/{symbol-table-DVPEY1fq-D2h-zqeQ.d.mts.map → symbol-table-DVPEY1fq-C5mC1wdG.d.mts.map} +1 -1
- package/dist/{framework-authoring-bUu_R58O-Cr-Mz1dC.mjs → temporal-presets-DABMpaxB-DDEaCwpa.mjs} +106 -4
- package/dist/temporal-presets-DABMpaxB-DDEaCwpa.mjs.map +1 -0
- package/dist/temporal-presets-L05Tl534-jgcrZX_O.d.mts +123 -0
- package/dist/temporal-presets-L05Tl534-jgcrZX_O.d.mts.map +1 -0
- package/dist/{types-BULt1qLG.d.mts → types-BiXRgK9f.d.mts} +6 -2
- package/dist/types-BiXRgK9f.d.mts.map +1 -0
- package/dist/{types-DG4qHrT8.mjs → types-QyibIZST.mjs} +28 -2
- package/dist/types-QyibIZST.mjs.map +1 -0
- package/package.json +15 -15
- package/dist/authoring-BnE2ayAF.d.mts +0 -1
- package/dist/control-0Teuhk1e.mjs.map +0 -1
- package/dist/control-DQ-TrDyA.d.mts.map +0 -1
- package/dist/framework-authoring-bUu_R58O-Cr-Mz1dC.mjs.map +0 -1
- package/dist/types-BULt1qLG.d.mts.map +0 -1
- package/dist/types-DG4qHrT8.mjs.map +0 -1
package/dist/psl-parser.d.mts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { f as CodecLookup } from "./codec-types-C4Bx6jXr-C2MBP0-0.mjs";
|
|
2
2
|
import { $ as PslExtensionBlockAttributeArg, A as AuthoringTypeNamespace, C as AuthoringPslBlockDescriptor, O as AuthoringTypeConstructorDescriptor, P as ControlDefaultRegistries, Q as PslExtensionBlockAttribute, X as PslDiagnosticCode, Z as PslExtensionBlock, at as PslExtensionBlockParamValue, ct as PslSpan, et as PslExtensionBlockParamBare, it as PslExtensionBlockParamScalarValue, nt as PslExtensionBlockParamOption, rt as PslExtensionBlockParamRef, st as PslPosition, tt as PslExtensionBlockParamList, w as AuthoringPslBlockDescriptorNamespace } from "./framework-authoring-C9VTqnML-BXtBl2dJ.mjs";
|
|
3
|
-
import "./authoring-
|
|
3
|
+
import "./authoring-DjeaZGzp.mjs";
|
|
4
4
|
import "./codec-D5McQin0.mjs";
|
|
5
5
|
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, s as PslAttributePositionalArgument, u as PslDefaultFunctionValue, v as PslModel, w as PslTypeConstructorCall, x as PslNamespace, y as PslModelAttribute } from "./psl-ast-BKF2fYgk-D6YxdCnP.mjs";
|
|
6
6
|
import { r as Result } from "./result-BYCOANWy.mjs";
|
|
7
|
-
import { ht as TaggedLiteralCanonicalization, n as AssembledAuthoringContributions } from "./control-
|
|
7
|
+
import { ht as TaggedLiteralCanonicalization, n as AssembledAuthoringContributions } from "./control-Bc_dos9-.mjs";
|
|
8
8
|
import "./psl-ast-Bu85Lu-k.mjs";
|
|
9
|
-
import { I as PslDiagnostic, K as SyntaxNode, L as PslDiagnosticCollector, M as ParseDiagnostic, R as PslSources, d as DiagnosticSource, et as createPslDiagnosticCollector, lt as mapPslDiagnostics, m as FieldAttributeAst, n as AstNode, nt as diagnosticFromSpan, p as ExpressionAst, r as AttributeArgAst, rt as diagnosticSource, w as ModelAttributeAst } from "./parse-SHpUIBnv-
|
|
10
|
-
import { _ as nodePslSpan, a as ModelSymbol, b as readResolvedConstructorCall, 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 readResolvedAttribute, y as readResolvedAttributes } from "./symbol-table-DVPEY1fq-
|
|
9
|
+
import { I as PslDiagnostic, K as SyntaxNode, L as PslDiagnosticCollector, M as ParseDiagnostic, R as PslSources, d as DiagnosticSource, et as createPslDiagnosticCollector, lt as mapPslDiagnostics, m as FieldAttributeAst, n as AstNode, nt as diagnosticFromSpan, p as ExpressionAst, r as AttributeArgAst, rt as diagnosticSource, w as ModelAttributeAst } from "./parse-SHpUIBnv-BvPsKLqw.mjs";
|
|
10
|
+
import { _ as nodePslSpan, a as ModelSymbol, b as readResolvedConstructorCall, 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 readResolvedAttribute, y as readResolvedAttributes } from "./symbol-table-DVPEY1fq-C5mC1wdG.mjs";
|
|
11
11
|
import { n as UnionToIntersection, t as Simplify } from "./types-DGxlljKG.mjs";
|
|
12
12
|
//#region ../../../1-framework/2-authoring/psl-parser/dist/index.d.mts
|
|
13
13
|
//#region src/attribute-helpers.d.ts
|
package/dist/psl-parser.mjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { t as blindCast } from "./casts-DpaahrlC-Bd5n2coI.mjs";
|
|
2
2
|
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
|
-
import {
|
|
4
|
+
import { _ as isAuthoringModelAttributeDescriptor, v as isAuthoringPslBlockDescriptor, y as isAuthoringTypeConstructorDescriptor } from "./temporal-presets-DABMpaxB-DDEaCwpa.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
|
-
import { D as TypesBlockAst, P 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, w as TaggedLiteralExprAst, x as StringLiteralExprAst, y as ObjectLiteralExprAst } from "./declarations-D79GooqC-
|
|
6
|
+
import { D as TypesBlockAst, P 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, w as TaggedLiteralExprAst, x as StringLiteralExprAst, y as ObjectLiteralExprAst } from "./declarations-D79GooqC-CcAbqTsq.mjs";
|
|
7
7
|
import { i as mapPslDiagnostics, n as diagnosticFromSpan, r as diagnosticSource, t as createPslDiagnosticCollector } from "./diagnostic-Esyl8Qw1-Cd6SnWPN.mjs";
|
|
8
8
|
//#region ../../../1-framework/2-authoring/psl-parser/dist/index.mjs
|
|
9
9
|
function getPositionalArgument(attribute, index = 0) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { o as structuredError } from "./structured-error-BXbihKQ-.mjs";
|
|
2
2
|
import { t as InternalError } from "./internal-error-ChGYPVpq-DhUD05u0.mjs";
|
|
3
|
-
import { D 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-D79GooqC-
|
|
4
|
-
import { o as parse } from "./parse-DN-F4ASD-
|
|
3
|
+
import { D 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-D79GooqC-CcAbqTsq.mjs";
|
|
4
|
+
import { o as parse } from "./parse-DN-F4ASD-ClJdPlzj.mjs";
|
|
5
5
|
//#region ../../../1-framework/2-authoring/psl-parser/dist/format.mjs
|
|
6
6
|
function emitDocument(document, indentUnit, newline) {
|
|
7
7
|
const writer = new LineWriter(indentUnit, newline);
|
|
@@ -1,9 +1,66 @@
|
|
|
1
1
|
import { t as Contract } from "./contract-types-Cdqr65a--BsYwlpQo.mjs";
|
|
2
|
+
import { ct as PslSpan, m as AuthoringFieldPresetDescriptor, n as AuthoringArgumentDescriptor, xt as instantiateAuthoringFieldPreset } from "./framework-authoring-C9VTqnML-BXtBl2dJ.mjs";
|
|
3
|
+
import "./authoring-DjeaZGzp.mjs";
|
|
2
4
|
import { r as Result } from "./result-BYCOANWy.mjs";
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
5
|
+
import "./psl-ast-Bu85Lu-k.mjs";
|
|
6
|
+
import { c as ContractSourceProvider, m as PslContractSourceProvider, n as ContractSourceContext, o as ContractSourceDiagnostics, r as ContractSourceDiagnostic } from "./config-types-DgoEWkgA.mjs";
|
|
7
|
+
import { I as PslDiagnostic, L as PslDiagnosticCollector, R as PslSources, d as DiagnosticSource, f as DocumentAst } from "./parse-SHpUIBnv-BvPsKLqw.mjs";
|
|
8
|
+
import { d as ResolvedTypeConstructorCall, f as SymbolTable, i as FieldSymbol, l as ResolvedAttributeArg } from "./symbol-table-DVPEY1fq-C5mC1wdG.mjs";
|
|
6
9
|
//#region ../../../1-framework/2-authoring/psl-parser/dist/interpret.d.mts
|
|
10
|
+
//#region src/authoring-arguments.d.ts
|
|
11
|
+
declare function mapPslHelperArgs(input: {
|
|
12
|
+
readonly args: readonly ResolvedAttributeArg[];
|
|
13
|
+
readonly descriptors: readonly AuthoringArgumentDescriptor[];
|
|
14
|
+
readonly helperLabel: string;
|
|
15
|
+
readonly span: PslSpan;
|
|
16
|
+
readonly diagnostics: PslDiagnosticCollector;
|
|
17
|
+
readonly source: DiagnosticSource;
|
|
18
|
+
readonly entityLabel: string;
|
|
19
|
+
}): readonly unknown[] | undefined;
|
|
20
|
+
//#endregion
|
|
21
|
+
//#region src/field-presets.d.ts
|
|
22
|
+
/**
|
|
23
|
+
* Pushes the canonical `PSL_EXTENSION_NAMESPACE_NOT_COMPOSED` diagnostic for a subject (attribute, model attribute, or type constructor) that references an extension namespace which is not composed in the current contract.
|
|
24
|
+
*
|
|
25
|
+
* The `data` payload carries the missing namespace so machine consumers (agents, IDE extensions, CLI auto-fix) don't have to parse the prose.
|
|
26
|
+
*/
|
|
27
|
+
declare function uncomposedNamespaceDiagnostic(input: {
|
|
28
|
+
readonly subjectLabel: string;
|
|
29
|
+
readonly namespace: string;
|
|
30
|
+
readonly source: DiagnosticSource;
|
|
31
|
+
readonly span: PslSpan;
|
|
32
|
+
}): PslDiagnostic;
|
|
33
|
+
declare function reportUncomposedNamespace(input: {
|
|
34
|
+
readonly subjectLabel: string;
|
|
35
|
+
readonly namespace: string;
|
|
36
|
+
readonly source: DiagnosticSource;
|
|
37
|
+
readonly span: PslSpan;
|
|
38
|
+
readonly diagnostics: PslDiagnosticCollector;
|
|
39
|
+
}): void;
|
|
40
|
+
/**
|
|
41
|
+
* Pushes the canonical `PSL_UNKNOWN_FIELD_PRESET` diagnostic when a typoed preset name is referenced inside a registered field-preset namespace. The `data` payload exposes the namespace and full helper path so machine consumers (agents, IDE extensions) don't have to parse the prose.
|
|
42
|
+
*/
|
|
43
|
+
declare function reportUnknownFieldPreset(input: {
|
|
44
|
+
readonly entityLabel: string;
|
|
45
|
+
readonly namespace: string;
|
|
46
|
+
readonly helperPath: string;
|
|
47
|
+
readonly source: DiagnosticSource;
|
|
48
|
+
readonly span: PslSpan;
|
|
49
|
+
readonly diagnostics: PslDiagnosticCollector;
|
|
50
|
+
}): void;
|
|
51
|
+
/**
|
|
52
|
+
* Instantiates a field-preset call against its descriptor, coercing PSL AST arguments into the descriptor's typed argument shape and returning the preset's full set of contract contributions.
|
|
53
|
+
*
|
|
54
|
+
* PSL → typed-args coercion happens here (via `mapPslHelperArgs`) so that `instantiateAuthoringFieldPreset` itself stays typed-input-only and TS keeps its zero-runtime-validation cost.
|
|
55
|
+
*/
|
|
56
|
+
declare function instantiatePslFieldPreset(input: {
|
|
57
|
+
readonly call: ResolvedTypeConstructorCall;
|
|
58
|
+
readonly descriptor: AuthoringFieldPresetDescriptor;
|
|
59
|
+
readonly diagnostics: PslDiagnosticCollector;
|
|
60
|
+
readonly source: DiagnosticSource;
|
|
61
|
+
readonly entityLabel: string;
|
|
62
|
+
}): ReturnType<typeof instantiateAuthoringFieldPreset> | undefined;
|
|
63
|
+
//#endregion
|
|
7
64
|
//#region src/interpret.d.ts
|
|
8
65
|
/**
|
|
9
66
|
* Lets editor tooling that already parses incrementally (e.g. the language
|
|
@@ -61,5 +118,5 @@ declare function requiredOneToOneBackrelationDiagnostic(input: {
|
|
|
61
118
|
readonly recordNoun: 'row' | 'document';
|
|
62
119
|
}): PslDiagnostic;
|
|
63
120
|
//#endregion
|
|
64
|
-
export { type InvalidFkPairing, type PslInterpretCapable, type PslInterpretInput, consumeInvalidFkPairing, fkRelationPairKey, hasPslInterpreter, requiredOneToOneBackrelationDiagnostic, withSeedDiagnostics };
|
|
121
|
+
export { type InvalidFkPairing, type PslInterpretCapable, type PslInterpretInput, consumeInvalidFkPairing, fkRelationPairKey, hasPslInterpreter, instantiatePslFieldPreset, mapPslHelperArgs, reportUncomposedNamespace, reportUnknownFieldPreset, requiredOneToOneBackrelationDiagnostic, uncomposedNamespaceDiagnostic, withSeedDiagnostics };
|
|
65
122
|
//# sourceMappingURL=psl-parser__interpret.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"psl-parser__interpret.d.mts","names":[],"sources":["../../../../1-framework/2-authoring/psl-parser/dist/interpret.d.mts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"psl-parser__interpret.d.mts","names":[],"sources":["../../../../1-framework/2-authoring/psl-parser/dist/interpret.d.mts"],"mappings":";;;;;;;;;;iBAQiB,iBAAiB;WACvB,eAAe;WACf,sBAAsB;WACtB;WACA,MAAM;WACN,aAAa;WACb,QAAQ;WACR;;;;;;;;;iBASM,8BAA8B;WACpC;WACA;WACA,QAAQ;WACR,MAAM;IACb;iBACa,0BAA0B;WAChC;WACA;WACA,QAAQ;WACR,MAAM;WACN,aAAa;;;;;iBAKP,yBAAyB;WAC/B;WACA;WACA;WACA,QAAQ;WACR,MAAM;WACN,aAAa;;;;;;;iBAOP,0BAA0B;WAChC,MAAM;WACN,YAAY;WACZ,aAAa;WACb,QAAQ;WACR;IACP,kBAAkB;;;;;;;;UAQZ;WACC,oBAAoB;WACpB,SAAS;WACT,aAAa;;;;;;;;UAQd,4BAA4B;EACpC,UAAU,OAAO,mBAAmB,SAAS,wBAAwB,OAAO,UAAU;;;;;;;;iBAQvE,oBAAoB,QAAQ,OAAO,UAAU,4BAA4B,0BAA0B,6BAA6B,OAAO,UAAU;;iBAEjJ,kBAAkB,QAAQ,yBAAyB,UAAU;;;;;;;;KAQzE;WACM;WACA;;iBAEM,kBAAkB,4BAA4B;;;;;;iBAM9C,wBAAwB;WAC9B;GACR,iBAAiB,mBAAmB;iBACtB,uCAAuC;WAC7C;WACA,OAAO;WACP;WACA,SAAS;WACT;IACP"}
|
|
@@ -1,6 +1,365 @@
|
|
|
1
1
|
import { n as notOk } from "./result-8OXF26MN.mjs";
|
|
2
|
+
import { f as instantiateAuthoringFieldPreset, j as validateAuthoringHelperArguments } from "./temporal-presets-DABMpaxB-DDEaCwpa.mjs";
|
|
2
3
|
import { r as diagnosticSource } from "./diagnostic-Esyl8Qw1-Cd6SnWPN.mjs";
|
|
3
4
|
//#region ../../../1-framework/2-authoring/psl-parser/dist/interpret.mjs
|
|
5
|
+
function unquoteStringLiteral(value) {
|
|
6
|
+
const trimmed = value.trim();
|
|
7
|
+
const match = trimmed.match(/^(['"])(.*)\1$/);
|
|
8
|
+
if (!match) return trimmed;
|
|
9
|
+
return match[2] ?? "";
|
|
10
|
+
}
|
|
11
|
+
const INVALID_AUTHORING_ARGUMENT = Symbol("invalidAuthoringArgument");
|
|
12
|
+
function isIdentifierStartCharacter(character) {
|
|
13
|
+
return character !== void 0 && /[A-Za-z_$]/.test(character);
|
|
14
|
+
}
|
|
15
|
+
function isIdentifierCharacter(character) {
|
|
16
|
+
return character !== void 0 && /[A-Za-z0-9_$]/.test(character);
|
|
17
|
+
}
|
|
18
|
+
function parseJsLikeLiteral(value) {
|
|
19
|
+
let index = 0;
|
|
20
|
+
function skipWhitespace() {
|
|
21
|
+
while (/\s/.test(value[index] ?? "")) index += 1;
|
|
22
|
+
}
|
|
23
|
+
function parseIdentifier() {
|
|
24
|
+
const first = value[index];
|
|
25
|
+
if (!isIdentifierStartCharacter(first)) return INVALID_AUTHORING_ARGUMENT;
|
|
26
|
+
let end = index + 1;
|
|
27
|
+
while (isIdentifierCharacter(value[end])) end += 1;
|
|
28
|
+
const identifier = value.slice(index, end);
|
|
29
|
+
index = end;
|
|
30
|
+
return identifier;
|
|
31
|
+
}
|
|
32
|
+
function parseString() {
|
|
33
|
+
const quote = value[index];
|
|
34
|
+
if (quote !== "\"" && quote !== "'") return INVALID_AUTHORING_ARGUMENT;
|
|
35
|
+
index += 1;
|
|
36
|
+
let result = "";
|
|
37
|
+
while (index < value.length) {
|
|
38
|
+
const character = value[index];
|
|
39
|
+
index += 1;
|
|
40
|
+
if (character === void 0) return INVALID_AUTHORING_ARGUMENT;
|
|
41
|
+
if (character === quote) return result;
|
|
42
|
+
if (character !== "\\") {
|
|
43
|
+
result += character;
|
|
44
|
+
continue;
|
|
45
|
+
}
|
|
46
|
+
const escaped = value[index];
|
|
47
|
+
index += 1;
|
|
48
|
+
if (escaped === void 0) return INVALID_AUTHORING_ARGUMENT;
|
|
49
|
+
switch (escaped) {
|
|
50
|
+
case "'":
|
|
51
|
+
case "\"":
|
|
52
|
+
case "\\":
|
|
53
|
+
case "/":
|
|
54
|
+
result += escaped;
|
|
55
|
+
break;
|
|
56
|
+
case "b":
|
|
57
|
+
result += "\b";
|
|
58
|
+
break;
|
|
59
|
+
case "f":
|
|
60
|
+
result += "\f";
|
|
61
|
+
break;
|
|
62
|
+
case "n":
|
|
63
|
+
result += "\n";
|
|
64
|
+
break;
|
|
65
|
+
case "r":
|
|
66
|
+
result += "\r";
|
|
67
|
+
break;
|
|
68
|
+
case "t":
|
|
69
|
+
result += " ";
|
|
70
|
+
break;
|
|
71
|
+
case "u": {
|
|
72
|
+
const hex = value.slice(index, index + 4);
|
|
73
|
+
if (!/^[0-9A-Fa-f]{4}$/.test(hex)) return INVALID_AUTHORING_ARGUMENT;
|
|
74
|
+
result += String.fromCharCode(Number.parseInt(hex, 16));
|
|
75
|
+
index += 4;
|
|
76
|
+
break;
|
|
77
|
+
}
|
|
78
|
+
default: return INVALID_AUTHORING_ARGUMENT;
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
return INVALID_AUTHORING_ARGUMENT;
|
|
82
|
+
}
|
|
83
|
+
function parseNumber() {
|
|
84
|
+
const raw = value.slice(index).match(/^-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?/)?.[0];
|
|
85
|
+
if (!raw) return INVALID_AUTHORING_ARGUMENT;
|
|
86
|
+
const parsed = Number(raw);
|
|
87
|
+
if (!Number.isFinite(parsed)) return INVALID_AUTHORING_ARGUMENT;
|
|
88
|
+
index += raw.length;
|
|
89
|
+
return parsed;
|
|
90
|
+
}
|
|
91
|
+
function parseArray() {
|
|
92
|
+
if (value[index] !== "[") return INVALID_AUTHORING_ARGUMENT;
|
|
93
|
+
index += 1;
|
|
94
|
+
const result = [];
|
|
95
|
+
skipWhitespace();
|
|
96
|
+
if (value[index] === "]") {
|
|
97
|
+
index += 1;
|
|
98
|
+
return result;
|
|
99
|
+
}
|
|
100
|
+
while (index < value.length) {
|
|
101
|
+
const entry = parseValue();
|
|
102
|
+
if (entry === INVALID_AUTHORING_ARGUMENT) return INVALID_AUTHORING_ARGUMENT;
|
|
103
|
+
result.push(entry);
|
|
104
|
+
skipWhitespace();
|
|
105
|
+
if (value[index] === ",") {
|
|
106
|
+
index += 1;
|
|
107
|
+
skipWhitespace();
|
|
108
|
+
continue;
|
|
109
|
+
}
|
|
110
|
+
if (value[index] === "]") {
|
|
111
|
+
index += 1;
|
|
112
|
+
return result;
|
|
113
|
+
}
|
|
114
|
+
return INVALID_AUTHORING_ARGUMENT;
|
|
115
|
+
}
|
|
116
|
+
return INVALID_AUTHORING_ARGUMENT;
|
|
117
|
+
}
|
|
118
|
+
function parseObject() {
|
|
119
|
+
if (value[index] !== "{") return INVALID_AUTHORING_ARGUMENT;
|
|
120
|
+
index += 1;
|
|
121
|
+
const result = {};
|
|
122
|
+
skipWhitespace();
|
|
123
|
+
if (value[index] === "}") {
|
|
124
|
+
index += 1;
|
|
125
|
+
return result;
|
|
126
|
+
}
|
|
127
|
+
while (index < value.length) {
|
|
128
|
+
skipWhitespace();
|
|
129
|
+
const key = value[index] === "\"" || value[index] === "'" ? parseString() : parseIdentifier();
|
|
130
|
+
if (key === INVALID_AUTHORING_ARGUMENT) return INVALID_AUTHORING_ARGUMENT;
|
|
131
|
+
skipWhitespace();
|
|
132
|
+
if (value[index] !== ":") return INVALID_AUTHORING_ARGUMENT;
|
|
133
|
+
index += 1;
|
|
134
|
+
const entry = parseValue();
|
|
135
|
+
if (entry === INVALID_AUTHORING_ARGUMENT) return INVALID_AUTHORING_ARGUMENT;
|
|
136
|
+
result[key] = entry;
|
|
137
|
+
skipWhitespace();
|
|
138
|
+
if (value[index] === ",") {
|
|
139
|
+
index += 1;
|
|
140
|
+
skipWhitespace();
|
|
141
|
+
continue;
|
|
142
|
+
}
|
|
143
|
+
if (value[index] === "}") {
|
|
144
|
+
index += 1;
|
|
145
|
+
return result;
|
|
146
|
+
}
|
|
147
|
+
return INVALID_AUTHORING_ARGUMENT;
|
|
148
|
+
}
|
|
149
|
+
return INVALID_AUTHORING_ARGUMENT;
|
|
150
|
+
}
|
|
151
|
+
function parseValue() {
|
|
152
|
+
skipWhitespace();
|
|
153
|
+
const character = value[index];
|
|
154
|
+
if (character === "{") return parseObject();
|
|
155
|
+
if (character === "[") return parseArray();
|
|
156
|
+
if (character === "\"" || character === "'") return parseString();
|
|
157
|
+
if (character === "-" || /\d/.test(character ?? "")) return parseNumber();
|
|
158
|
+
const identifier = parseIdentifier();
|
|
159
|
+
if (identifier === INVALID_AUTHORING_ARGUMENT) return INVALID_AUTHORING_ARGUMENT;
|
|
160
|
+
if (identifier === "true") return true;
|
|
161
|
+
if (identifier === "false") return false;
|
|
162
|
+
if (identifier === "null") return null;
|
|
163
|
+
return INVALID_AUTHORING_ARGUMENT;
|
|
164
|
+
}
|
|
165
|
+
skipWhitespace();
|
|
166
|
+
const parsed = parseValue();
|
|
167
|
+
if (parsed === INVALID_AUTHORING_ARGUMENT) return parsed;
|
|
168
|
+
skipWhitespace();
|
|
169
|
+
return index === value.length ? parsed : INVALID_AUTHORING_ARGUMENT;
|
|
170
|
+
}
|
|
171
|
+
function parseStringArrayLiteral(value) {
|
|
172
|
+
const parsed = parseJsLikeLiteral(value);
|
|
173
|
+
if (parsed === INVALID_AUTHORING_ARGUMENT || !Array.isArray(parsed)) return INVALID_AUTHORING_ARGUMENT;
|
|
174
|
+
if (!parsed.every((item) => typeof item === "string")) return INVALID_AUTHORING_ARGUMENT;
|
|
175
|
+
return parsed;
|
|
176
|
+
}
|
|
177
|
+
function isPlainObject(value) {
|
|
178
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
179
|
+
}
|
|
180
|
+
function parsePslObjectLiteral(value) {
|
|
181
|
+
const trimmed = value.trim();
|
|
182
|
+
if (!trimmed.startsWith("{") || !trimmed.endsWith("}")) return INVALID_AUTHORING_ARGUMENT;
|
|
183
|
+
let parsed;
|
|
184
|
+
try {
|
|
185
|
+
parsed = JSON.parse(trimmed);
|
|
186
|
+
} catch {
|
|
187
|
+
parsed = parseJsLikeLiteral(trimmed);
|
|
188
|
+
if (parsed === INVALID_AUTHORING_ARGUMENT) return INVALID_AUTHORING_ARGUMENT;
|
|
189
|
+
}
|
|
190
|
+
if (!isPlainObject(parsed)) return INVALID_AUTHORING_ARGUMENT;
|
|
191
|
+
return parsed;
|
|
192
|
+
}
|
|
193
|
+
function parsePslAuthoringArgumentValue(descriptor, rawValue) {
|
|
194
|
+
switch (descriptor.kind) {
|
|
195
|
+
case "string": return unquoteStringLiteral(rawValue);
|
|
196
|
+
case "boolean": {
|
|
197
|
+
const trimmed = rawValue.trim();
|
|
198
|
+
if (trimmed === "true") return true;
|
|
199
|
+
if (trimmed === "false") return false;
|
|
200
|
+
return INVALID_AUTHORING_ARGUMENT;
|
|
201
|
+
}
|
|
202
|
+
case "number": {
|
|
203
|
+
const parsed = Number(unquoteStringLiteral(rawValue));
|
|
204
|
+
return Number.isNaN(parsed) ? INVALID_AUTHORING_ARGUMENT : parsed;
|
|
205
|
+
}
|
|
206
|
+
case "stringArray": return parseStringArrayLiteral(rawValue);
|
|
207
|
+
case "object": return parsePslObjectLiteral(rawValue);
|
|
208
|
+
case "option": {
|
|
209
|
+
const trimmed = rawValue.trim();
|
|
210
|
+
return /^[A-Za-z_][A-Za-z0-9_]*$/.test(trimmed) ? trimmed : INVALID_AUTHORING_ARGUMENT;
|
|
211
|
+
}
|
|
212
|
+
default: return INVALID_AUTHORING_ARGUMENT;
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
function pushInvalidPslHelperArgument(input) {
|
|
216
|
+
input.diagnostics.push({
|
|
217
|
+
code: "PSL_INVALID_ATTRIBUTE_ARGUMENT",
|
|
218
|
+
message: `${input.entityLabel} ${input.helperLabel} ${input.message}`,
|
|
219
|
+
...input.source.at(input.span)
|
|
220
|
+
});
|
|
221
|
+
}
|
|
222
|
+
function mapPslHelperArgs(input) {
|
|
223
|
+
const mappedArgs = input.descriptors.map(() => void 0);
|
|
224
|
+
const positionalArgs = input.args.filter((arg) => arg.kind === "positional");
|
|
225
|
+
const namedArgs = input.args.filter((arg) => arg.kind === "named");
|
|
226
|
+
if (positionalArgs.length > input.descriptors.length) return pushInvalidPslHelperArgument({
|
|
227
|
+
diagnostics: input.diagnostics,
|
|
228
|
+
source: input.source,
|
|
229
|
+
span: input.span,
|
|
230
|
+
entityLabel: input.entityLabel,
|
|
231
|
+
helperLabel: input.helperLabel,
|
|
232
|
+
message: `accepts at most ${input.descriptors.length} argument(s), received ${positionalArgs.length}.`
|
|
233
|
+
});
|
|
234
|
+
for (const [index, argument] of positionalArgs.entries()) {
|
|
235
|
+
const descriptor = input.descriptors[index];
|
|
236
|
+
if (!descriptor) return pushInvalidPslHelperArgument({
|
|
237
|
+
diagnostics: input.diagnostics,
|
|
238
|
+
source: input.source,
|
|
239
|
+
span: argument.span,
|
|
240
|
+
entityLabel: input.entityLabel,
|
|
241
|
+
helperLabel: input.helperLabel,
|
|
242
|
+
message: `does not define positional argument #${index + 1}.`
|
|
243
|
+
});
|
|
244
|
+
const value = parsePslAuthoringArgumentValue(descriptor, argument.value);
|
|
245
|
+
if (value === INVALID_AUTHORING_ARGUMENT) return pushInvalidPslHelperArgument({
|
|
246
|
+
diagnostics: input.diagnostics,
|
|
247
|
+
source: input.source,
|
|
248
|
+
span: argument.span,
|
|
249
|
+
entityLabel: input.entityLabel,
|
|
250
|
+
helperLabel: input.helperLabel,
|
|
251
|
+
message: `cannot parse argument #${index + 1} for descriptor kind "${descriptor.kind}".`
|
|
252
|
+
});
|
|
253
|
+
mappedArgs[index] = value;
|
|
254
|
+
}
|
|
255
|
+
for (const argument of namedArgs) {
|
|
256
|
+
const descriptorIndex = input.descriptors.findIndex((descriptor) => descriptor.name === argument.name);
|
|
257
|
+
if (descriptorIndex < 0) return pushInvalidPslHelperArgument({
|
|
258
|
+
diagnostics: input.diagnostics,
|
|
259
|
+
source: input.source,
|
|
260
|
+
span: argument.span,
|
|
261
|
+
entityLabel: input.entityLabel,
|
|
262
|
+
helperLabel: input.helperLabel,
|
|
263
|
+
message: `received unknown named argument "${argument.name}".`
|
|
264
|
+
});
|
|
265
|
+
if (mappedArgs[descriptorIndex] !== void 0) return pushInvalidPslHelperArgument({
|
|
266
|
+
diagnostics: input.diagnostics,
|
|
267
|
+
source: input.source,
|
|
268
|
+
span: argument.span,
|
|
269
|
+
entityLabel: input.entityLabel,
|
|
270
|
+
helperLabel: input.helperLabel,
|
|
271
|
+
message: `received duplicate value for argument "${argument.name}".`
|
|
272
|
+
});
|
|
273
|
+
const descriptor = input.descriptors[descriptorIndex];
|
|
274
|
+
if (!descriptor) return pushInvalidPslHelperArgument({
|
|
275
|
+
diagnostics: input.diagnostics,
|
|
276
|
+
source: input.source,
|
|
277
|
+
span: argument.span,
|
|
278
|
+
entityLabel: input.entityLabel,
|
|
279
|
+
helperLabel: input.helperLabel,
|
|
280
|
+
message: `does not define named argument "${argument.name}".`
|
|
281
|
+
});
|
|
282
|
+
const value = parsePslAuthoringArgumentValue(descriptor, argument.value);
|
|
283
|
+
if (value === INVALID_AUTHORING_ARGUMENT) return pushInvalidPslHelperArgument({
|
|
284
|
+
diagnostics: input.diagnostics,
|
|
285
|
+
source: input.source,
|
|
286
|
+
span: argument.span,
|
|
287
|
+
entityLabel: input.entityLabel,
|
|
288
|
+
helperLabel: input.helperLabel,
|
|
289
|
+
message: `cannot parse named argument "${argument.name}" for descriptor kind "${descriptor.kind}".`
|
|
290
|
+
});
|
|
291
|
+
mappedArgs[descriptorIndex] = value;
|
|
292
|
+
}
|
|
293
|
+
return mappedArgs;
|
|
294
|
+
}
|
|
295
|
+
/**
|
|
296
|
+
* Pushes the canonical `PSL_EXTENSION_NAMESPACE_NOT_COMPOSED` diagnostic for a subject (attribute, model attribute, or type constructor) that references an extension namespace which is not composed in the current contract.
|
|
297
|
+
*
|
|
298
|
+
* The `data` payload carries the missing namespace so machine consumers (agents, IDE extensions, CLI auto-fix) don't have to parse the prose.
|
|
299
|
+
*/
|
|
300
|
+
function uncomposedNamespaceDiagnostic(input) {
|
|
301
|
+
return {
|
|
302
|
+
code: "PSL_EXTENSION_NAMESPACE_NOT_COMPOSED",
|
|
303
|
+
message: `${input.subjectLabel} uses unrecognized namespace "${input.namespace}". Add extension pack "${input.namespace}" to extensions in prisma.config.ts.`,
|
|
304
|
+
...input.source.at(input.span),
|
|
305
|
+
data: {
|
|
306
|
+
namespace: input.namespace,
|
|
307
|
+
suggestedPack: input.namespace
|
|
308
|
+
}
|
|
309
|
+
};
|
|
310
|
+
}
|
|
311
|
+
function reportUncomposedNamespace(input) {
|
|
312
|
+
input.diagnostics.push(uncomposedNamespaceDiagnostic({
|
|
313
|
+
subjectLabel: input.subjectLabel,
|
|
314
|
+
namespace: input.namespace,
|
|
315
|
+
source: input.source,
|
|
316
|
+
span: input.span
|
|
317
|
+
}));
|
|
318
|
+
}
|
|
319
|
+
/**
|
|
320
|
+
* Pushes the canonical `PSL_UNKNOWN_FIELD_PRESET` diagnostic when a typoed preset name is referenced inside a registered field-preset namespace. The `data` payload exposes the namespace and full helper path so machine consumers (agents, IDE extensions) don't have to parse the prose.
|
|
321
|
+
*/
|
|
322
|
+
function reportUnknownFieldPreset(input) {
|
|
323
|
+
input.diagnostics.push({
|
|
324
|
+
code: "PSL_UNKNOWN_FIELD_PRESET",
|
|
325
|
+
message: `${input.entityLabel} references unknown field preset "${input.helperPath}". Check the spelling against the available presets in the "${input.namespace}" namespace.`,
|
|
326
|
+
...input.source.at(input.span),
|
|
327
|
+
data: {
|
|
328
|
+
namespace: input.namespace,
|
|
329
|
+
helperPath: input.helperPath
|
|
330
|
+
}
|
|
331
|
+
});
|
|
332
|
+
}
|
|
333
|
+
/**
|
|
334
|
+
* Instantiates a field-preset call against its descriptor, coercing PSL AST arguments into the descriptor's typed argument shape and returning the preset's full set of contract contributions.
|
|
335
|
+
*
|
|
336
|
+
* PSL → typed-args coercion happens here (via `mapPslHelperArgs`) so that `instantiateAuthoringFieldPreset` itself stays typed-input-only and TS keeps its zero-runtime-validation cost.
|
|
337
|
+
*/
|
|
338
|
+
function instantiatePslFieldPreset(input) {
|
|
339
|
+
const helperPath = input.call.path.join(".");
|
|
340
|
+
const args = mapPslHelperArgs({
|
|
341
|
+
args: input.call.args,
|
|
342
|
+
descriptors: input.descriptor.args ?? [],
|
|
343
|
+
helperLabel: `preset "${helperPath}"`,
|
|
344
|
+
span: input.call.span,
|
|
345
|
+
diagnostics: input.diagnostics,
|
|
346
|
+
source: input.source,
|
|
347
|
+
entityLabel: input.entityLabel
|
|
348
|
+
});
|
|
349
|
+
if (!args) return;
|
|
350
|
+
try {
|
|
351
|
+
validateAuthoringHelperArguments(helperPath, input.descriptor.args, args);
|
|
352
|
+
return instantiateAuthoringFieldPreset(input.descriptor, args);
|
|
353
|
+
} catch (error) {
|
|
354
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
355
|
+
input.diagnostics.push({
|
|
356
|
+
code: "PSL_INVALID_ATTRIBUTE_ARGUMENT",
|
|
357
|
+
message: `${input.entityLabel} preset "${helperPath}" ${message}`,
|
|
358
|
+
...input.source.at(input.call.span)
|
|
359
|
+
});
|
|
360
|
+
return;
|
|
361
|
+
}
|
|
362
|
+
}
|
|
4
363
|
/**
|
|
5
364
|
* Merges caller-side diagnostics (e.g. parse / symbol-table findings) into an
|
|
6
365
|
* interpretation result. The authored headline is deliberately uniform — it
|
|
@@ -43,6 +402,6 @@ function requiredOneToOneBackrelationDiagnostic(input) {
|
|
|
43
402
|
};
|
|
44
403
|
}
|
|
45
404
|
//#endregion
|
|
46
|
-
export { consumeInvalidFkPairing, fkRelationPairKey, hasPslInterpreter, requiredOneToOneBackrelationDiagnostic, withSeedDiagnostics };
|
|
405
|
+
export { consumeInvalidFkPairing, fkRelationPairKey, hasPslInterpreter, instantiatePslFieldPreset, mapPslHelperArgs, reportUncomposedNamespace, reportUnknownFieldPreset, requiredOneToOneBackrelationDiagnostic, uncomposedNamespaceDiagnostic, withSeedDiagnostics };
|
|
47
406
|
|
|
48
407
|
//# sourceMappingURL=psl-parser__interpret.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"psl-parser__interpret.mjs","names":[],"sources":["../../../../1-framework/2-authoring/psl-parser/dist/interpret.mjs"],"sourcesContent":["import { r as diagnosticSource } from \"./diagnostic-Esyl8Qw1.mjs\";\nimport { notOk } from \"@internal/utils/result\";\n//#region src/interpret.ts\n/**\n* Merges caller-side diagnostics (e.g. parse / symbol-table findings) into an\n* interpretation result. The authored headline is deliberately uniform — it\n* reports how many errors the schema has, never which pipeline stage found\n* them.\n*/\nfunction withSeedDiagnostics(result, seedDiagnostics) {\n\tif (seedDiagnostics.length === 0) return result;\n\tconst diagnostics = result.ok ? seedDiagnostics : [...seedDiagnostics, ...result.failure.diagnostics];\n\treturn notOk({\n\t\tsummary: `Schema has ${diagnostics.length} error${diagnostics.length === 1 ? \"\" : \"s\"}`,\n\t\tdiagnostics,\n\t\t...result.ok || result.failure.meta === void 0 ? {} : { meta: result.failure.meta }\n\t});\n}\n/** The single seam that narrows a contract source to the interpret capability. */\nfunction hasPslInterpreter(source) {\n\treturn source.format === \"psl\" && \"interpret\" in source && typeof source.interpret === \"function\";\n}\n//#endregion\n//#region src/relation-backrelations.ts\nfunction fkRelationPairKey(declaringModelName, targetModelName) {\n\treturn `${declaringModelName}::${targetModelName}`;\n}\n/**\n* Claims the one rejected FK side that pairs with this back-relation candidate: same model pair\n* and the same relation name, where an unnamed candidate pairs only with an unnamed FK side.\n* A claimed pairing is removed, so a second candidate on the same pair reports its own problem.\n*/\nfunction consumeInvalidFkPairing(candidate, pairKey, invalidFkPairings) {\n\tconst index = invalidFkPairings.findIndex((pairing) => pairing.pairKey === pairKey && pairing.relationName === candidate.relationName);\n\tif (index === -1) return false;\n\tinvalidFkPairings.splice(index, 1);\n\treturn true;\n}\nfunction requiredOneToOneBackrelationDiagnostic(input) {\n\tconst { modelName, field, targetModelName, sources, recordNoun } = input;\n\treturn {\n\t\tcode: \"PSL_REQUIRED_ONE_TO_ONE_BACKRELATION\",\n\t\tmessage: `Backrelation field \"${modelName}.${field.name}\" is required, but \"${targetModelName}\" holds the relation fields, so nothing in storage guarantees a \"${targetModelName}\" ${recordNoun} exists. Make it optional: \"${field.name} ${targetModelName}?\".`,\n\t\t...diagnosticSource(sources, field.node.syntax).at(field.span)\n\t};\n}\n//#endregion\nexport { consumeInvalidFkPairing, fkRelationPairKey, hasPslInterpreter, requiredOneToOneBackrelationDiagnostic, withSeedDiagnostics };\n\n//# sourceMappingURL=interpret.mjs.map"],"mappings":";;;;;;;;;AASA,SAAS,oBAAoB,QAAQ,iBAAiB;CACrD,IAAI,gBAAgB,WAAW,GAAG,OAAO;CACzC,MAAM,cAAc,OAAO,KAAK,kBAAkB,CAAC,GAAG,iBAAiB,GAAG,OAAO,QAAQ,WAAW;CACpG,OAAO,MAAM;EACZ,SAAS,cAAc,YAAY,OAAO,QAAQ,YAAY,WAAW,IAAI,KAAK;EAClF;EACA,GAAG,OAAO,MAAM,OAAO,QAAQ,SAAS,KAAK,IAAI,CAAC,IAAI,EAAE,MAAM,OAAO,QAAQ,KAAK;CACnF,CAAC;AACF;;AAEA,SAAS,kBAAkB,QAAQ;CAClC,OAAO,OAAO,WAAW,SAAS,eAAe,UAAU,OAAO,OAAO,cAAc;AACxF;AAGA,SAAS,kBAAkB,oBAAoB,iBAAiB;CAC/D,OAAO,GAAG,mBAAmB,IAAI;AAClC;;;;;;AAMA,SAAS,wBAAwB,WAAW,SAAS,mBAAmB;CACvE,MAAM,QAAQ,kBAAkB,WAAW,YAAY,QAAQ,YAAY,WAAW,QAAQ,iBAAiB,UAAU,YAAY;CACrI,IAAI,UAAU,IAAI,OAAO;CACzB,kBAAkB,OAAO,OAAO,CAAC;CACjC,OAAO;AACR;AACA,SAAS,uCAAuC,OAAO;CACtD,MAAM,EAAE,WAAW,OAAO,iBAAiB,SAAS,eAAe;CACnE,OAAO;EACN,MAAM;EACN,SAAS,uBAAuB,UAAU,GAAG,MAAM,KAAK,sBAAsB,gBAAgB,mEAAmE,gBAAgB,IAAI,WAAW,8BAA8B,MAAM,KAAK,GAAG,gBAAgB;EAC5P,GAAG,iBAAiB,SAAS,MAAM,KAAK,MAAM,CAAC,CAAC,GAAG,MAAM,IAAI;CAC9D;AACD"}
|
|
1
|
+
{"version":3,"file":"psl-parser__interpret.mjs","names":[],"sources":["../../../../1-framework/2-authoring/psl-parser/dist/interpret.mjs"],"sourcesContent":["import { r as diagnosticSource } from \"./diagnostic-Esyl8Qw1.mjs\";\nimport { instantiateAuthoringFieldPreset, validateAuthoringHelperArguments } from \"@internal/framework-components/authoring\";\nimport { notOk } from \"@internal/utils/result\";\n//#region src/authoring-arguments.ts\nfunction unquoteStringLiteral(value) {\n\tconst trimmed = value.trim();\n\tconst match = trimmed.match(/^(['\"])(.*)\\1$/);\n\tif (!match) return trimmed;\n\treturn match[2] ?? \"\";\n}\nconst INVALID_AUTHORING_ARGUMENT = Symbol(\"invalidAuthoringArgument\");\nfunction isIdentifierStartCharacter(character) {\n\treturn character !== void 0 && /[A-Za-z_$]/.test(character);\n}\nfunction isIdentifierCharacter(character) {\n\treturn character !== void 0 && /[A-Za-z0-9_$]/.test(character);\n}\nfunction parseJsLikeLiteral(value) {\n\tlet index = 0;\n\tfunction skipWhitespace() {\n\t\twhile (/\\s/.test(value[index] ?? \"\")) index += 1;\n\t}\n\tfunction parseIdentifier() {\n\t\tconst first = value[index];\n\t\tif (!isIdentifierStartCharacter(first)) return INVALID_AUTHORING_ARGUMENT;\n\t\tlet end = index + 1;\n\t\twhile (isIdentifierCharacter(value[end])) end += 1;\n\t\tconst identifier = value.slice(index, end);\n\t\tindex = end;\n\t\treturn identifier;\n\t}\n\tfunction parseString() {\n\t\tconst quote = value[index];\n\t\tif (quote !== \"\\\"\" && quote !== \"'\") return INVALID_AUTHORING_ARGUMENT;\n\t\tindex += 1;\n\t\tlet result = \"\";\n\t\twhile (index < value.length) {\n\t\t\tconst character = value[index];\n\t\t\tindex += 1;\n\t\t\tif (character === void 0) return INVALID_AUTHORING_ARGUMENT;\n\t\t\tif (character === quote) return result;\n\t\t\tif (character !== \"\\\\\") {\n\t\t\t\tresult += character;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tconst escaped = value[index];\n\t\t\tindex += 1;\n\t\t\tif (escaped === void 0) return INVALID_AUTHORING_ARGUMENT;\n\t\t\tswitch (escaped) {\n\t\t\t\tcase \"'\":\n\t\t\t\tcase \"\\\"\":\n\t\t\t\tcase \"\\\\\":\n\t\t\t\tcase \"/\":\n\t\t\t\t\tresult += escaped;\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"b\":\n\t\t\t\t\tresult += \"\\b\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"f\":\n\t\t\t\t\tresult += \"\\f\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"n\":\n\t\t\t\t\tresult += \"\\n\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"r\":\n\t\t\t\t\tresult += \"\\r\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"t\":\n\t\t\t\t\tresult += \"\t\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"u\": {\n\t\t\t\t\tconst hex = value.slice(index, index + 4);\n\t\t\t\t\tif (!/^[0-9A-Fa-f]{4}$/.test(hex)) return INVALID_AUTHORING_ARGUMENT;\n\t\t\t\t\tresult += String.fromCharCode(Number.parseInt(hex, 16));\n\t\t\t\t\tindex += 4;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tdefault: return INVALID_AUTHORING_ARGUMENT;\n\t\t\t}\n\t\t}\n\t\treturn INVALID_AUTHORING_ARGUMENT;\n\t}\n\tfunction parseNumber() {\n\t\tconst raw = value.slice(index).match(/^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?(?:[eE][+-]?\\d+)?/)?.[0];\n\t\tif (!raw) return INVALID_AUTHORING_ARGUMENT;\n\t\tconst parsed = Number(raw);\n\t\tif (!Number.isFinite(parsed)) return INVALID_AUTHORING_ARGUMENT;\n\t\tindex += raw.length;\n\t\treturn parsed;\n\t}\n\tfunction parseArray() {\n\t\tif (value[index] !== \"[\") return INVALID_AUTHORING_ARGUMENT;\n\t\tindex += 1;\n\t\tconst result = [];\n\t\tskipWhitespace();\n\t\tif (value[index] === \"]\") {\n\t\t\tindex += 1;\n\t\t\treturn result;\n\t\t}\n\t\twhile (index < value.length) {\n\t\t\tconst entry = parseValue();\n\t\t\tif (entry === INVALID_AUTHORING_ARGUMENT) return INVALID_AUTHORING_ARGUMENT;\n\t\t\tresult.push(entry);\n\t\t\tskipWhitespace();\n\t\t\tif (value[index] === \",\") {\n\t\t\t\tindex += 1;\n\t\t\t\tskipWhitespace();\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif (value[index] === \"]\") {\n\t\t\t\tindex += 1;\n\t\t\t\treturn result;\n\t\t\t}\n\t\t\treturn INVALID_AUTHORING_ARGUMENT;\n\t\t}\n\t\treturn INVALID_AUTHORING_ARGUMENT;\n\t}\n\tfunction parseObject() {\n\t\tif (value[index] !== \"{\") return INVALID_AUTHORING_ARGUMENT;\n\t\tindex += 1;\n\t\tconst result = {};\n\t\tskipWhitespace();\n\t\tif (value[index] === \"}\") {\n\t\t\tindex += 1;\n\t\t\treturn result;\n\t\t}\n\t\twhile (index < value.length) {\n\t\t\tskipWhitespace();\n\t\t\tconst key = value[index] === \"\\\"\" || value[index] === \"'\" ? parseString() : parseIdentifier();\n\t\t\tif (key === INVALID_AUTHORING_ARGUMENT) return INVALID_AUTHORING_ARGUMENT;\n\t\t\tskipWhitespace();\n\t\t\tif (value[index] !== \":\") return INVALID_AUTHORING_ARGUMENT;\n\t\t\tindex += 1;\n\t\t\tconst entry = parseValue();\n\t\t\tif (entry === INVALID_AUTHORING_ARGUMENT) return INVALID_AUTHORING_ARGUMENT;\n\t\t\tresult[key] = entry;\n\t\t\tskipWhitespace();\n\t\t\tif (value[index] === \",\") {\n\t\t\t\tindex += 1;\n\t\t\t\tskipWhitespace();\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif (value[index] === \"}\") {\n\t\t\t\tindex += 1;\n\t\t\t\treturn result;\n\t\t\t}\n\t\t\treturn INVALID_AUTHORING_ARGUMENT;\n\t\t}\n\t\treturn INVALID_AUTHORING_ARGUMENT;\n\t}\n\tfunction parseValue() {\n\t\tskipWhitespace();\n\t\tconst character = value[index];\n\t\tif (character === \"{\") return parseObject();\n\t\tif (character === \"[\") return parseArray();\n\t\tif (character === \"\\\"\" || character === \"'\") return parseString();\n\t\tif (character === \"-\" || /\\d/.test(character ?? \"\")) return parseNumber();\n\t\tconst identifier = parseIdentifier();\n\t\tif (identifier === INVALID_AUTHORING_ARGUMENT) return INVALID_AUTHORING_ARGUMENT;\n\t\tif (identifier === \"true\") return true;\n\t\tif (identifier === \"false\") return false;\n\t\tif (identifier === \"null\") return null;\n\t\treturn INVALID_AUTHORING_ARGUMENT;\n\t}\n\tskipWhitespace();\n\tconst parsed = parseValue();\n\tif (parsed === INVALID_AUTHORING_ARGUMENT) return parsed;\n\tskipWhitespace();\n\treturn index === value.length ? parsed : INVALID_AUTHORING_ARGUMENT;\n}\nfunction parseStringArrayLiteral(value) {\n\tconst parsed = parseJsLikeLiteral(value);\n\tif (parsed === INVALID_AUTHORING_ARGUMENT || !Array.isArray(parsed)) return INVALID_AUTHORING_ARGUMENT;\n\tif (!parsed.every((item) => typeof item === \"string\")) return INVALID_AUTHORING_ARGUMENT;\n\treturn parsed;\n}\nfunction isPlainObject(value) {\n\treturn typeof value === \"object\" && value !== null && !Array.isArray(value);\n}\nfunction parsePslObjectLiteral(value) {\n\tconst trimmed = value.trim();\n\tif (!trimmed.startsWith(\"{\") || !trimmed.endsWith(\"}\")) return INVALID_AUTHORING_ARGUMENT;\n\tlet parsed;\n\ttry {\n\t\tparsed = JSON.parse(trimmed);\n\t} catch {\n\t\tparsed = parseJsLikeLiteral(trimmed);\n\t\tif (parsed === INVALID_AUTHORING_ARGUMENT) return INVALID_AUTHORING_ARGUMENT;\n\t}\n\tif (!isPlainObject(parsed)) return INVALID_AUTHORING_ARGUMENT;\n\treturn parsed;\n}\nfunction parsePslAuthoringArgumentValue(descriptor, rawValue) {\n\tswitch (descriptor.kind) {\n\t\tcase \"string\": return unquoteStringLiteral(rawValue);\n\t\tcase \"boolean\": {\n\t\t\tconst trimmed = rawValue.trim();\n\t\t\tif (trimmed === \"true\") return true;\n\t\t\tif (trimmed === \"false\") return false;\n\t\t\treturn INVALID_AUTHORING_ARGUMENT;\n\t\t}\n\t\tcase \"number\": {\n\t\t\tconst parsed = Number(unquoteStringLiteral(rawValue));\n\t\t\treturn Number.isNaN(parsed) ? INVALID_AUTHORING_ARGUMENT : parsed;\n\t\t}\n\t\tcase \"stringArray\": return parseStringArrayLiteral(rawValue);\n\t\tcase \"object\": return parsePslObjectLiteral(rawValue);\n\t\tcase \"option\": {\n\t\t\tconst trimmed = rawValue.trim();\n\t\t\treturn /^[A-Za-z_][A-Za-z0-9_]*$/.test(trimmed) ? trimmed : INVALID_AUTHORING_ARGUMENT;\n\t\t}\n\t\tdefault: return INVALID_AUTHORING_ARGUMENT;\n\t}\n}\nfunction pushInvalidPslHelperArgument(input) {\n\tinput.diagnostics.push({\n\t\tcode: \"PSL_INVALID_ATTRIBUTE_ARGUMENT\",\n\t\tmessage: `${input.entityLabel} ${input.helperLabel} ${input.message}`,\n\t\t...input.source.at(input.span)\n\t});\n}\nfunction mapPslHelperArgs(input) {\n\tconst mappedArgs = input.descriptors.map(() => void 0);\n\tconst positionalArgs = input.args.filter((arg) => arg.kind === \"positional\");\n\tconst namedArgs = input.args.filter((arg) => arg.kind === \"named\");\n\tif (positionalArgs.length > input.descriptors.length) return pushInvalidPslHelperArgument({\n\t\tdiagnostics: input.diagnostics,\n\t\tsource: input.source,\n\t\tspan: input.span,\n\t\tentityLabel: input.entityLabel,\n\t\thelperLabel: input.helperLabel,\n\t\tmessage: `accepts at most ${input.descriptors.length} argument(s), received ${positionalArgs.length}.`\n\t});\n\tfor (const [index, argument] of positionalArgs.entries()) {\n\t\tconst descriptor = input.descriptors[index];\n\t\tif (!descriptor) return pushInvalidPslHelperArgument({\n\t\t\tdiagnostics: input.diagnostics,\n\t\t\tsource: input.source,\n\t\t\tspan: argument.span,\n\t\t\tentityLabel: input.entityLabel,\n\t\t\thelperLabel: input.helperLabel,\n\t\t\tmessage: `does not define positional argument #${index + 1}.`\n\t\t});\n\t\tconst value = parsePslAuthoringArgumentValue(descriptor, argument.value);\n\t\tif (value === INVALID_AUTHORING_ARGUMENT) return pushInvalidPslHelperArgument({\n\t\t\tdiagnostics: input.diagnostics,\n\t\t\tsource: input.source,\n\t\t\tspan: argument.span,\n\t\t\tentityLabel: input.entityLabel,\n\t\t\thelperLabel: input.helperLabel,\n\t\t\tmessage: `cannot parse argument #${index + 1} for descriptor kind \"${descriptor.kind}\".`\n\t\t});\n\t\tmappedArgs[index] = value;\n\t}\n\tfor (const argument of namedArgs) {\n\t\tconst descriptorIndex = input.descriptors.findIndex((descriptor) => descriptor.name === argument.name);\n\t\tif (descriptorIndex < 0) return pushInvalidPslHelperArgument({\n\t\t\tdiagnostics: input.diagnostics,\n\t\t\tsource: input.source,\n\t\t\tspan: argument.span,\n\t\t\tentityLabel: input.entityLabel,\n\t\t\thelperLabel: input.helperLabel,\n\t\t\tmessage: `received unknown named argument \"${argument.name}\".`\n\t\t});\n\t\tif (mappedArgs[descriptorIndex] !== void 0) return pushInvalidPslHelperArgument({\n\t\t\tdiagnostics: input.diagnostics,\n\t\t\tsource: input.source,\n\t\t\tspan: argument.span,\n\t\t\tentityLabel: input.entityLabel,\n\t\t\thelperLabel: input.helperLabel,\n\t\t\tmessage: `received duplicate value for argument \"${argument.name}\".`\n\t\t});\n\t\tconst descriptor = input.descriptors[descriptorIndex];\n\t\tif (!descriptor) return pushInvalidPslHelperArgument({\n\t\t\tdiagnostics: input.diagnostics,\n\t\t\tsource: input.source,\n\t\t\tspan: argument.span,\n\t\t\tentityLabel: input.entityLabel,\n\t\t\thelperLabel: input.helperLabel,\n\t\t\tmessage: `does not define named argument \"${argument.name}\".`\n\t\t});\n\t\tconst value = parsePslAuthoringArgumentValue(descriptor, argument.value);\n\t\tif (value === INVALID_AUTHORING_ARGUMENT) return pushInvalidPslHelperArgument({\n\t\t\tdiagnostics: input.diagnostics,\n\t\t\tsource: input.source,\n\t\t\tspan: argument.span,\n\t\t\tentityLabel: input.entityLabel,\n\t\t\thelperLabel: input.helperLabel,\n\t\t\tmessage: `cannot parse named argument \"${argument.name}\" for descriptor kind \"${descriptor.kind}\".`\n\t\t});\n\t\tmappedArgs[descriptorIndex] = value;\n\t}\n\treturn mappedArgs;\n}\n//#endregion\n//#region src/field-presets.ts\n/**\n* Pushes the canonical `PSL_EXTENSION_NAMESPACE_NOT_COMPOSED` diagnostic for a subject (attribute, model attribute, or type constructor) that references an extension namespace which is not composed in the current contract.\n*\n* The `data` payload carries the missing namespace so machine consumers (agents, IDE extensions, CLI auto-fix) don't have to parse the prose.\n*/\nfunction uncomposedNamespaceDiagnostic(input) {\n\treturn {\n\t\tcode: \"PSL_EXTENSION_NAMESPACE_NOT_COMPOSED\",\n\t\tmessage: `${input.subjectLabel} uses unrecognized namespace \"${input.namespace}\". Add extension pack \"${input.namespace}\" to extensions in prisma.config.ts.`,\n\t\t...input.source.at(input.span),\n\t\tdata: {\n\t\t\tnamespace: input.namespace,\n\t\t\tsuggestedPack: input.namespace\n\t\t}\n\t};\n}\nfunction reportUncomposedNamespace(input) {\n\tinput.diagnostics.push(uncomposedNamespaceDiagnostic({\n\t\tsubjectLabel: input.subjectLabel,\n\t\tnamespace: input.namespace,\n\t\tsource: input.source,\n\t\tspan: input.span\n\t}));\n}\n/**\n* Pushes the canonical `PSL_UNKNOWN_FIELD_PRESET` diagnostic when a typoed preset name is referenced inside a registered field-preset namespace. The `data` payload exposes the namespace and full helper path so machine consumers (agents, IDE extensions) don't have to parse the prose.\n*/\nfunction reportUnknownFieldPreset(input) {\n\tinput.diagnostics.push({\n\t\tcode: \"PSL_UNKNOWN_FIELD_PRESET\",\n\t\tmessage: `${input.entityLabel} references unknown field preset \"${input.helperPath}\". Check the spelling against the available presets in the \"${input.namespace}\" namespace.`,\n\t\t...input.source.at(input.span),\n\t\tdata: {\n\t\t\tnamespace: input.namespace,\n\t\t\thelperPath: input.helperPath\n\t\t}\n\t});\n}\n/**\n* Instantiates a field-preset call against its descriptor, coercing PSL AST arguments into the descriptor's typed argument shape and returning the preset's full set of contract contributions.\n*\n* PSL → typed-args coercion happens here (via `mapPslHelperArgs`) so that `instantiateAuthoringFieldPreset` itself stays typed-input-only and TS keeps its zero-runtime-validation cost.\n*/\nfunction instantiatePslFieldPreset(input) {\n\tconst helperPath = input.call.path.join(\".\");\n\tconst args = mapPslHelperArgs({\n\t\targs: input.call.args,\n\t\tdescriptors: input.descriptor.args ?? [],\n\t\thelperLabel: `preset \"${helperPath}\"`,\n\t\tspan: input.call.span,\n\t\tdiagnostics: input.diagnostics,\n\t\tsource: input.source,\n\t\tentityLabel: input.entityLabel\n\t});\n\tif (!args) return;\n\ttry {\n\t\tvalidateAuthoringHelperArguments(helperPath, input.descriptor.args, args);\n\t\treturn instantiateAuthoringFieldPreset(input.descriptor, args);\n\t} catch (error) {\n\t\tconst message = error instanceof Error ? error.message : String(error);\n\t\tinput.diagnostics.push({\n\t\t\tcode: \"PSL_INVALID_ATTRIBUTE_ARGUMENT\",\n\t\t\tmessage: `${input.entityLabel} preset \"${helperPath}\" ${message}`,\n\t\t\t...input.source.at(input.call.span)\n\t\t});\n\t\treturn;\n\t}\n}\n//#endregion\n//#region src/interpret.ts\n/**\n* Merges caller-side diagnostics (e.g. parse / symbol-table findings) into an\n* interpretation result. The authored headline is deliberately uniform — it\n* reports how many errors the schema has, never which pipeline stage found\n* them.\n*/\nfunction withSeedDiagnostics(result, seedDiagnostics) {\n\tif (seedDiagnostics.length === 0) return result;\n\tconst diagnostics = result.ok ? seedDiagnostics : [...seedDiagnostics, ...result.failure.diagnostics];\n\treturn notOk({\n\t\tsummary: `Schema has ${diagnostics.length} error${diagnostics.length === 1 ? \"\" : \"s\"}`,\n\t\tdiagnostics,\n\t\t...result.ok || result.failure.meta === void 0 ? {} : { meta: result.failure.meta }\n\t});\n}\n/** The single seam that narrows a contract source to the interpret capability. */\nfunction hasPslInterpreter(source) {\n\treturn source.format === \"psl\" && \"interpret\" in source && typeof source.interpret === \"function\";\n}\n//#endregion\n//#region src/relation-backrelations.ts\nfunction fkRelationPairKey(declaringModelName, targetModelName) {\n\treturn `${declaringModelName}::${targetModelName}`;\n}\n/**\n* Claims the one rejected FK side that pairs with this back-relation candidate: same model pair\n* and the same relation name, where an unnamed candidate pairs only with an unnamed FK side.\n* A claimed pairing is removed, so a second candidate on the same pair reports its own problem.\n*/\nfunction consumeInvalidFkPairing(candidate, pairKey, invalidFkPairings) {\n\tconst index = invalidFkPairings.findIndex((pairing) => pairing.pairKey === pairKey && pairing.relationName === candidate.relationName);\n\tif (index === -1) return false;\n\tinvalidFkPairings.splice(index, 1);\n\treturn true;\n}\nfunction requiredOneToOneBackrelationDiagnostic(input) {\n\tconst { modelName, field, targetModelName, sources, recordNoun } = input;\n\treturn {\n\t\tcode: \"PSL_REQUIRED_ONE_TO_ONE_BACKRELATION\",\n\t\tmessage: `Backrelation field \"${modelName}.${field.name}\" is required, but \"${targetModelName}\" holds the relation fields, so nothing in storage guarantees a \"${targetModelName}\" ${recordNoun} exists. Make it optional: \"${field.name} ${targetModelName}?\".`,\n\t\t...diagnosticSource(sources, field.node.syntax).at(field.span)\n\t};\n}\n//#endregion\nexport { consumeInvalidFkPairing, fkRelationPairKey, hasPslInterpreter, instantiatePslFieldPreset, mapPslHelperArgs, reportUncomposedNamespace, reportUnknownFieldPreset, requiredOneToOneBackrelationDiagnostic, uncomposedNamespaceDiagnostic, withSeedDiagnostics };\n\n//# sourceMappingURL=interpret.mjs.map"],"mappings":";;;;AAIA,SAAS,qBAAqB,OAAO;CACpC,MAAM,UAAU,MAAM,KAAK;CAC3B,MAAM,QAAQ,QAAQ,MAAM,gBAAgB;CAC5C,IAAI,CAAC,OAAO,OAAO;CACnB,OAAO,MAAM,MAAM;AACpB;AACA,MAAM,6BAA6B,OAAO,0BAA0B;AACpE,SAAS,2BAA2B,WAAW;CAC9C,OAAO,cAAc,KAAK,KAAK,aAAa,KAAK,SAAS;AAC3D;AACA,SAAS,sBAAsB,WAAW;CACzC,OAAO,cAAc,KAAK,KAAK,gBAAgB,KAAK,SAAS;AAC9D;AACA,SAAS,mBAAmB,OAAO;CAClC,IAAI,QAAQ;CACZ,SAAS,iBAAiB;EACzB,OAAO,KAAK,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, D as NamespaceDeclarationAst, E as NamedTypeDeclarationAst, F as Position, G as SyntaxKind, H as StringLiteralExprAst, J as TaggedLiteralExprAst, K as SyntaxNode, M as ParseDiagnostic, N as ParseOptions, O as NamespaceMemberAst, P as ParseResult, Q as any, R as PslSources, S as IdentifierAst, T as ModelDeclarationAst, U as StringLiteralQuote, V as SourceFile, W as SyntaxElement, X as TypeAnnotationAst, Y as TokenAtOffset, Z as TypesBlockAst, _ as GenericBlockDeclarationAst, a as AttributeAst, at as findChildToken, b as GreenNode, c as BracedBlock, ct as greenToken, dt as printSyntax, f as DocumentAst, g as FunctionCallAst, h as FieldDeclarationAst, i as AttributeArgListAst, it as filterChildren, j as ObjectLiteralExprAst, k as NumberLiteralExprAst, l as CompositeTypeDeclarationAst, m as FieldAttributeAst, n as AstNode, o as BlockMemberAst, ot as findFirstChild, p as ExpressionAst, q as SyntaxToken, r as AttributeArgAst, s as BooleanLiteralExprAst, st as greenNode, t as ArrayLiteralAst, tt as createSyntaxTree, u as DeclarationAst, ut as parse, v as GenericBlockMemberAst, w as ModelAttributeAst, x as GreenToken, y as GreenElement, z as QualifiedNameAst } from "./parse-SHpUIBnv-
|
|
2
|
+
import { $ as castExpression, A as ObjectFieldAst, B as Range, C as KeyValuePairAst, D as NamespaceDeclarationAst, E as NamedTypeDeclarationAst, F as Position, G as SyntaxKind, H as StringLiteralExprAst, J as TaggedLiteralExprAst, K as SyntaxNode, M as ParseDiagnostic, N as ParseOptions, O as NamespaceMemberAst, P as ParseResult, Q as any, R as PslSources, S as IdentifierAst, T as ModelDeclarationAst, U as StringLiteralQuote, V as SourceFile, W as SyntaxElement, X as TypeAnnotationAst, Y as TokenAtOffset, Z as TypesBlockAst, _ as GenericBlockDeclarationAst, a as AttributeAst, at as findChildToken, b as GreenNode, c as BracedBlock, ct as greenToken, dt as printSyntax, f as DocumentAst, g as FunctionCallAst, h as FieldDeclarationAst, i as AttributeArgListAst, it as filterChildren, j as ObjectLiteralExprAst, k as NumberLiteralExprAst, l as CompositeTypeDeclarationAst, m as FieldAttributeAst, n as AstNode, o as BlockMemberAst, ot as findFirstChild, p as ExpressionAst, q as SyntaxToken, r as AttributeArgAst, s as BooleanLiteralExprAst, st as greenNode, t as ArrayLiteralAst, tt as createSyntaxTree, u as DeclarationAst, ut as parse, v as GenericBlockMemberAst, w as ModelAttributeAst, x as GreenToken, y as GreenElement, z as QualifiedNameAst } from "./parse-SHpUIBnv-BvPsKLqw.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 {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { A as createSyntaxTree, C as SyntaxToken, D as TypesBlockAst, E as TypeAnnotationAst, M as findChildToken, N as findFirstChild, O as any, P as printSyntax, S as SyntaxNode, T as TokenAtOffset, _ 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 filterChildren, k as castExpression, 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 TaggedLiteralExprAst, x as StringLiteralExprAst, y as ObjectLiteralExprAst } from "./declarations-D79GooqC-
|
|
2
|
-
import { a as greenToken, i as greenNode, n as PslSources, o as parse, r as SourceFile, t as GreenNodeBuilder } from "./parse-DN-F4ASD-
|
|
1
|
+
import { A as createSyntaxTree, C as SyntaxToken, D as TypesBlockAst, E as TypeAnnotationAst, M as findChildToken, N as findFirstChild, O as any, P as printSyntax, S as SyntaxNode, T as TokenAtOffset, _ 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 filterChildren, k as castExpression, 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 TaggedLiteralExprAst, x as StringLiteralExprAst, y as ObjectLiteralExprAst } from "./declarations-D79GooqC-CcAbqTsq.mjs";
|
|
2
|
+
import { a as greenToken, i as greenNode, n as PslSources, o as parse, r as SourceFile, t as GreenNodeBuilder } from "./parse-DN-F4ASD-ClJdPlzj.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.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { f as CodecLookup } from "./codec-types-C4Bx6jXr-C2MBP0-0.mjs";
|
|
2
2
|
import { w as AuthoringPslBlockDescriptorNamespace } from "./framework-authoring-C9VTqnML-BXtBl2dJ.mjs";
|
|
3
|
-
import "./authoring-
|
|
3
|
+
import "./authoring-DjeaZGzp.mjs";
|
|
4
4
|
import "./codec-D5McQin0.mjs";
|
|
5
5
|
import { m as PslDocumentAst } from "./psl-ast-BKF2fYgk-D6YxdCnP.mjs";
|
|
6
6
|
import "./psl-ast-Bu85Lu-k.mjs";
|
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 {
|
|
4
|
+
import { v as isAuthoringPslBlockDescriptor } from "./temporal-presets-DABMpaxB-DDEaCwpa.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,7 +1,7 @@
|
|
|
1
1
|
import { Z as PslExtensionBlock, ct as PslSpan, w as AuthoringPslBlockDescriptorNamespace } from "./framework-authoring-C9VTqnML-BXtBl2dJ.mjs";
|
|
2
|
-
import "./authoring-
|
|
2
|
+
import "./authoring-DjeaZGzp.mjs";
|
|
3
3
|
import "./psl-ast-Bu85Lu-k.mjs";
|
|
4
|
-
import { D as NamespaceDeclarationAst, E as NamedTypeDeclarationAst, K as SyntaxNode, M as ParseDiagnostic, R as PslSources, T as ModelDeclarationAst, X as TypeAnnotationAst, _ as GenericBlockDeclarationAst, f as DocumentAst, h as FieldDeclarationAst, l as CompositeTypeDeclarationAst, m as FieldAttributeAst, p as ExpressionAst, w as ModelAttributeAst } from "./parse-SHpUIBnv-
|
|
4
|
+
import { D as NamespaceDeclarationAst, E as NamedTypeDeclarationAst, K as SyntaxNode, M as ParseDiagnostic, R as PslSources, T as ModelDeclarationAst, X as TypeAnnotationAst, _ as GenericBlockDeclarationAst, f as DocumentAst, h as FieldDeclarationAst, l as CompositeTypeDeclarationAst, m as FieldAttributeAst, p as ExpressionAst, w as ModelAttributeAst } from "./parse-SHpUIBnv-BvPsKLqw.mjs";
|
|
5
5
|
//#region ../../../1-framework/2-authoring/psl-parser/dist/symbol-table-DVPEY1fq.d.mts
|
|
6
6
|
//#region src/resolve.d.ts
|
|
7
7
|
interface ResolvedAttributeArg {
|
|
@@ -123,4 +123,4 @@ interface SymbolTableResult {
|
|
|
123
123
|
declare function buildSymbolTable(options: BuildSymbolTableOptions): SymbolTableResult;
|
|
124
124
|
//#endregion
|
|
125
125
|
export { nodePslSpan as _, ModelSymbol as a, readResolvedConstructorCall as b, ResolvedAttribute as c, ResolvedTypeConstructorCall as d, SymbolTable as f, keywordPslSpan as g, buildSymbolTable as h, FieldSymbol as i, ResolvedAttributeArg as l, TopLevelScope as m, BuildSymbolTableOptions as n, NamedTypeSymbol as o, SymbolTableResult as p, CompositeTypeSymbol as r, NamespaceSymbol as s, BlockSymbol as t, ResolvedNamedTypeBinding as u, readResolvedAttribute as v, readResolvedAttributes as y };
|
|
126
|
-
//# sourceMappingURL=symbol-table-DVPEY1fq-
|
|
126
|
+
//# sourceMappingURL=symbol-table-DVPEY1fq-C5mC1wdG.d.mts.map
|
package/dist/{symbol-table-DVPEY1fq-D2h-zqeQ.d.mts.map → symbol-table-DVPEY1fq-C5mC1wdG.d.mts.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"symbol-table-DVPEY1fq-
|
|
1
|
+
{"version":3,"file":"symbol-table-DVPEY1fq-C5mC1wdG.d.mts","names":[],"sources":["../../../../1-framework/2-authoring/psl-parser/dist/symbol-table-DVPEY1fq.d.mts"],"mappings":";;;;;;UAIU;WACC;WACA;WACA;WACA,aAAa;WACb,MAAM;;UAEP;WACC;WACA,eAAe;WACf,MAAM;;UAEP;WACC;WACA,eAAe;WACf,MAAM;;iBAEA,sBAAsB,WAAW,oBAAoB,mBAAmB,SAAS,aAAa;iBAC9F,uBAAuB,YAAY,SAAS,oBAAoB,oBAAoB,SAAS,sBAAsB;iBACnH,4BAA4B,YAAY,+BAA+B,SAAS,aAAa;iBAC7F,YAAY,MAAM,YAAY,SAAS,aAAa;;iBAEpD,eAAe,MAAM,YAAY,iBAAiB,SAAS,aAAa;;;UAG/E;WACC,UAAU;;UAEX;WACC,YAAY,eAAe;WAC3B,YAAY,eAAe;WAC3B,QAAQ,eAAe;WACvB,QAAQ,eAAe;WACvB,gBAAgB,eAAe;;UAEhC;WACC;WACA;WACA;aACE,MAAM;aACN,MAAM;;WAER,QAAQ,eAAe;WACvB,gBAAgB,eAAe;WAC/B,QAAQ,eAAe;;UAExB;WACC;WACA;WACA,MAAM;WACN,MAAM;WACN,QAAQ,eAAe;WACvB,qBAAqB;;UAEtB;WACC;WACA;WACA,MAAM;WACN,MAAM;WACN,QAAQ,eAAe;WACvB,qBAAqB;;UAEtB;WACC;WACA;WACA;WACA,MAAM;WACN,MAAM;;WAEN,OAAO;;UAER;WACC;WACA,kBAAkB;WAClB;WACA,qBAAqB;;;;;;;UAOtB,wBAAwB;WACvB;WACA;WACA,MAAM;WACN,MAAM;;UAEP;WACC;WACA;WACA,MAAM;WACN,MAAM;WACN;WACA;WACA;WACA;WACA;WACA,kBAAkB;WAClB,qBAAqB;;WAErB;;UAED;WACC,oBAAoB;WACpB,SAAS;WACT,qBAAqB;;UAEtB;WACC,aAAa;WACb,sBAAsB;;;;;;iBAMhB,iBAAiB,SAAS,0BAA0B"}
|