@prisma/orm-framework 8.0.0-rc.17-dev.5 → 8.0.0-rc.17-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/dist/{authoring-Doh4Co1l.mjs → authoring-III9x7Sy.mjs} +2 -2
- package/dist/authoring-III9x7Sy.mjs.map +1 -0
- package/dist/{authoring-cZOt2wXI.d.mts → authoring-_Lh745Bn.d.mts} +2 -2
- package/dist/{authoring-cZOt2wXI.d.mts.map → authoring-_Lh745Bn.d.mts.map} +1 -1
- package/dist/{binder-wwlr2lKn-DfmFKEQX.d.mts → binder-B0JUKmhl-C8xZ40pa.d.mts} +8 -8
- package/dist/{binder-wwlr2lKn-DfmFKEQX.d.mts.map → binder-B0JUKmhl-C8xZ40pa.d.mts.map} +1 -1
- package/dist/{components-CGaSppZs.d.mts → components-cAWnlT7V.d.mts} +2 -2
- package/dist/{components-CGaSppZs.d.mts.map → components-cAWnlT7V.d.mts.map} +1 -1
- package/dist/components.d.mts +8 -8
- package/dist/components.mjs +4 -4
- package/dist/components__authoring.d.mts +3 -3
- package/dist/components__authoring.mjs +3 -3
- package/dist/components__components.d.mts +2 -2
- package/dist/components__control.d.mts +4 -4
- package/dist/components__control.mjs +3 -3
- package/dist/components__execution.d.mts +1 -1
- package/dist/{config-types-DmyJC5iY.d.mts → config-types-D_Iu3bNl.d.mts} +6 -6
- package/dist/{config-types-DmyJC5iY.d.mts.map → config-types-D_Iu3bNl.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 +1 -1
- package/dist/contract-authoring.mjs +1 -1
- package/dist/{control-BUalXfZN.d.mts → control-Bh3RtVrv.d.mts} +4 -4
- package/dist/{control-BUalXfZN.d.mts.map → control-Bh3RtVrv.d.mts.map} +1 -1
- package/dist/{control-C4Q85sT5-CkUAJH3B.mjs → control-C4Q85sT5-CIjVNitX.mjs} +2 -2
- package/dist/{control-C4Q85sT5-CkUAJH3B.mjs.map → control-C4Q85sT5-CIjVNitX.mjs.map} +1 -1
- package/dist/{control-DNzOW6HH.mjs → control-COaCVAZw.mjs} +2 -2
- package/dist/control-COaCVAZw.mjs.map +1 -0
- package/dist/control-CXCnsj07.d.mts +1 -0
- package/dist/{control-DhWsAbYJ-BP2WpSuz.d.mts → control-DhWsAbYJ-D9eWSlYE.d.mts} +2 -2
- package/dist/{control-DhWsAbYJ-BP2WpSuz.d.mts.map → control-DhWsAbYJ-D9eWSlYE.d.mts.map} +1 -1
- package/dist/{declarations-5xLxC310-CwLYk_p4.mjs → declarations-DosoNVo9-Bnoie4Sr.mjs} +3 -3
- package/dist/declarations-DosoNVo9-Bnoie4Sr.mjs.map +1 -0
- package/dist/errors.d.mts +4 -4
- package/dist/errors.mjs +3 -3
- package/dist/errors__control.d.mts +2 -2
- package/dist/errors__control.mjs +1 -1
- package/dist/errors__execution.d.mts +1 -1
- package/dist/errors__execution.mjs +1 -1
- package/dist/errors__migration.d.mts +1 -1
- package/dist/errors__migration.mjs +1 -1
- package/dist/{execution-CasccCMg.mjs → execution-B6GZC7hD.mjs} +2 -2
- package/dist/{execution-CasccCMg.mjs.map → execution-B6GZC7hD.mjs.map} +1 -1
- package/dist/{execution-CbrInl3u.d.mts → execution-B82y8eTq.d.mts} +3 -3
- package/dist/{execution-CbrInl3u.d.mts.map → execution-B82y8eTq.d.mts.map} +1 -1
- package/dist/{execution-Cp6YhqRw.d.mts → execution-TiUa7G25.d.mts} +2 -2
- package/dist/{execution-Cp6YhqRw.d.mts.map → execution-TiUa7G25.d.mts.map} +1 -1
- package/dist/{framework-components-Dvnsxez4-BMA6jGDK.d.mts → framework-components-Cu_suxg--H_VCpMlz.d.mts} +3 -3
- package/dist/{framework-components-Dvnsxez4-BMA6jGDK.d.mts.map → framework-components-Cu_suxg--H_VCpMlz.d.mts.map} +1 -1
- package/dist/{migration-A-VM0FBS.mjs → migration-BMYBXx-x.mjs} +2 -2
- package/dist/{migration-A-VM0FBS.mjs.map → migration-BMYBXx-x.mjs.map} +1 -1
- package/dist/{migration-Dk6KltsR.d.mts → migration-BRSTbjHJ.d.mts} +2 -2
- package/dist/{migration-Dk6KltsR.d.mts.map → migration-BRSTbjHJ.d.mts.map} +1 -1
- package/dist/{mutation-default-types-CMx8Y9zx-yQN8l2GU.d.mts → mutation-default-types-DCgdIlXt-C6Sc9h16.d.mts} +3 -5
- package/dist/{mutation-default-types-CMx8Y9zx-yQN8l2GU.d.mts.map → mutation-default-types-DCgdIlXt-C6Sc9h16.d.mts.map} +1 -1
- package/dist/{parse-Cjjj1-m4-BoNI-c25.mjs → parse-CKPyOsa_-k7l8eoV7.mjs} +3 -3
- package/dist/{parse-Cjjj1-m4-BoNI-c25.mjs.map → parse-CKPyOsa_-k7l8eoV7.mjs.map} +1 -1
- package/dist/{parse-GXhoypXR-DTQlI99j.d.mts → parse-Dz0FUoAQ-CrN3O48P.d.mts} +5 -5
- package/dist/{parse-GXhoypXR-DTQlI99j.d.mts.map → parse-Dz0FUoAQ-CrN3O48P.d.mts.map} +1 -1
- package/dist/psl-parser.d.mts +57 -9
- package/dist/psl-parser.d.mts.map +1 -1
- package/dist/psl-parser.mjs +85 -18
- package/dist/psl-parser.mjs.map +1 -1
- package/dist/psl-parser__format.d.mts +1 -1
- package/dist/psl-parser__format.mjs +2 -2
- package/dist/psl-parser__format.mjs.map +1 -1
- package/dist/psl-parser__interpret.d.mts +4 -4
- package/dist/psl-parser__interpret.mjs +1 -1
- package/dist/psl-parser__syntax.d.mts +1 -1
- package/dist/psl-parser__syntax.mjs +2 -2
- package/dist/psl-parser__syntax.mjs.map +1 -1
- package/dist/psl-printer.d.mts +1 -1
- package/dist/psl-printer.mjs +1 -1
- package/dist/{temporal-presets-DUCEijgt-FF49h-O0.mjs → temporal-presets-CjxLjyl8-DhMFaNE2.mjs} +9 -8
- package/dist/{temporal-presets-DUCEijgt-FF49h-O0.mjs.map → temporal-presets-CjxLjyl8-DhMFaNE2.mjs.map} +1 -1
- package/dist/{written-value-KxYWetU9-Byq71bSU.d.mts → written-value-DdEQAH_R-yhLbzRP4.d.mts} +11 -8
- package/dist/written-value-DdEQAH_R-yhLbzRP4.d.mts.map +1 -0
- package/package.json +15 -15
- package/dist/authoring-Doh4Co1l.mjs.map +0 -1
- package/dist/control-C9QQV63U.d.mts +0 -1
- package/dist/control-DNzOW6HH.mjs.map +0 -1
- package/dist/declarations-5xLxC310-CwLYk_p4.mjs.map +0 -1
- package/dist/written-value-KxYWetU9-Byq71bSU.d.mts.map +0 -1
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { U as PslSpan } from "./framework-authoring-BaBmrcxi-9J-ebDLU.mjs";
|
|
2
|
-
import { d as TaggedLiteralCanonicalization } from "./written-value-
|
|
3
|
-
import "./
|
|
2
|
+
import { d as TaggedLiteralCanonicalization } from "./written-value-DdEQAH_R-yhLbzRP4.mjs";
|
|
3
|
+
import "./authoring-_Lh745Bn.mjs";
|
|
4
4
|
import "./psl-ast-DqB4Tq08.mjs";
|
|
5
|
-
import { h as PslParserOptions, r as ContractSourceDiagnostic } from "./config-types-
|
|
5
|
+
import { h as PslParserOptions, r as ContractSourceDiagnostic } from "./config-types-D_Iu3bNl.mjs";
|
|
6
6
|
import { n as TokenKind, t as Token } from "./tokenizer-DW30uwhx-BHsWTwYk.mjs";
|
|
7
|
-
//#region ../../../1-framework/2-authoring/psl-parser/dist/parse-
|
|
7
|
+
//#region ../../../1-framework/2-authoring/psl-parser/dist/parse-Dz0FUoAQ.d.mts
|
|
8
8
|
//#region src/syntax/syntax-kind.d.ts
|
|
9
9
|
type SyntaxKind = 'Document' | 'ModelDeclaration' | 'CompositeTypeDeclaration' | 'Namespace' | 'TypesBlock' | 'GenericBlockDeclaration' | 'FieldDeclaration' | 'NamedTypeDeclaration' | 'KeyValuePair' | 'FieldAttribute' | 'ModelAttribute' | 'AttributeArgList' | 'AttributeArg' | 'TypeAnnotation' | 'Identifier' | 'QualifiedName' | 'FunctionCall' | 'PathExpr' | 'ArrayLiteral' | 'StringLiteralExpr' | 'TaggedLiteral' | 'NumberLiteralExpr' | 'BooleanLiteralExpr' | 'ObjectLiteralExpr' | 'ObjectField';
|
|
10
10
|
//#endregion
|
|
@@ -525,4 +525,4 @@ interface ParseResult {
|
|
|
525
525
|
declare function parse(source: string, filename: string, options?: PslParserOptions): ParseResult;
|
|
526
526
|
//#endregion
|
|
527
527
|
export { any as $, NumberLiteralExprAst as A, QualifiedNameAst as B, IdentifierAst as C, NamedTypeDeclarationAst as D, ModelDeclarationAst as E, PathExprAst as F, SyntaxElement as G, SourceFile as H, Position as I, SyntaxToken as J, SyntaxKind as K, PslDiagnostic as L, ObjectLiteralExprAst as M, ParseDiagnostic as N, NamespaceDeclarationAst as O, ParseResult as P, TypesBlockAst as Q, PslDiagnosticCollector as R, HasDocComment as S, ModelAttributeAst as T, StringLiteralExprAst as U, Range as V, StringLiteralQuote as W, TokenAtOffset as X, TaggedLiteralExprAst as Y, TypeAnnotationAst as Z, GenericBlockDeclarationAst as _, AttributeAst as a, dottedPathsIn as at, GreenNode as b, BracedBlock as c, findFirstChild as ct, DiagnosticSource as d, mapPslDiagnostics as dt, castExpression as et, DocumentAst as f, parse as ft, FunctionCallAst as g, FieldDeclarationAst as h, AttributeArgListAst as i, diagnosticSource as it, ObjectFieldAst as j, NamespaceMemberAst as k, CompositeTypeDeclarationAst as l, greenNode as lt, FieldAttributeAst as m, AstNode as n, createSyntaxTree as nt, BlockMemberAst as o, filterChildren as ot, ExpressionAst as p, printSyntax as pt, SyntaxNode as q, AttributeArgAst as r, diagnosticFromSpan as rt, BooleanLiteralExprAst as s, findChildToken as st, ArrayLiteralAst as t, createPslDiagnosticCollector as tt, DeclarationAst as u, greenToken as ut, GenericBlockMemberAst as v, KeyValuePairAst as w, GreenToken as x, GreenElement as y, PslSources as z };
|
|
528
|
-
//# sourceMappingURL=parse-
|
|
528
|
+
//# sourceMappingURL=parse-Dz0FUoAQ-CrN3O48P.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parse-
|
|
1
|
+
{"version":3,"file":"parse-Dz0FUoAQ-CrN3O48P.d.mts","names":[],"sources":["../../../../1-framework/2-authoring/psl-parser/dist/parse-Dz0FUoAQ.d.mts"],"mappings":";;;;;;;;KAKK;;;UAGK;WACC;WACA,MAAM;WACN;;UAED;WACC;WACA,MAAM;WACN,UAAU,cAAc;WACxB;;KAEN,eAAe,YAAY;iBACf,WAAW,MAAM,WAAW,eAAe;iBAC3C,UAAU,MAAM,YAAY,UAAU,cAAc,gBAAgB;;;;;;;;;;cAUvE,uBAAuB;WAC1B,OAAO;WACP,MAAM;WACN;WACA;WACA,QAAQ;;WAER;EACT,YAAY,OAAO,YAAY,gBAAgB,QAAQ,YAAY;MAC/D;MACA;;EAEJ,SAAS;EACT,UAAU;;MAEN,sBAAsB;;MAEtB,sBAAsB;;MAEtB,aAAa;;MAEb,aAAa;;KAEd,gBAAgB,aAAa;cACpB;;UAEJ;SACD,QAAQ;SACR,OAAO,OAAO,cAAc;SAC5B,QAAQ,MAAM,aAAa,OAAO,cAAc;MACnD;MACA;EACJ,cAAc;EACd,eAAe;;cAEH;;WAEH,OAAO;WACP;WACA,QAAQ;;WAER;EACT,YAAY,OAAO,WAAW,gBAAgB,QAAQ,wBAAwB;EAC9E,QAAQ,gBAAgB;MACpB,QAAQ;MACR;MACA;;EAEJ,SAAS;EACT,UAAU;MACN,cAAc;MACd,aAAa;MACb,eAAe;MACf,eAAe;;MAEf,sBAAsB;;MAEtB,sBAAsB;;MAEtB,cAAc;;MAEd,aAAa;EACjB,YAAY,SAAS;EACrB,cAAc,SAAS;EACvB,QAAQ;EACR,aAAa,SAAS;;EAEtB,aAAa,GAAG,OAAO,MAAM,eAAe,gBAAgB;EAC5D,eAAe,SAAS;EACxB,UAAU,SAAS;;;;;EAKnB,cAAc,iBAAiB;;;;;;EAM/B,gBAAgB,eAAe,cAAc;;iBAE9B,iBAAiB,OAA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AAS;EACnB,cAAc,SAAS;EACvB,WAAW,SAAS;EACpB;SACO,KAAK,MAAM,aAAa;;cAEnB,mCAAmC;WACtC,QAAQ;EACjB,YAAY,QAAQ;EACpB,WAAW;EACX,QAAQ;EACR,UAAU;EACV,UAAU;EACV,gBAAgB,SAAS;SAClB,KAAK,MAAM,aAAa;;cAEnB,yBAAyB;WAC5B,QAAQ;EACjB,YAAY,QAAQ;EACpB,WAAW;EACX,UAAU;EACV,UAAU;EACV,gBAAgB,SAAS;SAClB,KAAK,MAAM,aAAa;;cAEnB,sCAAsC,aAAa;WACtD,QAAQ;EACjB,YAAY,QAAQ;EACpB,WAAW;EACX,QAAQ;EACR,UAAU;EACV,UAAU;EACV,WAAW,SAAS;;EAEpB,UAAU,SAAS;EACnB,cAAc,SAAS;EACvB,WAAW,SAAS;EACpB;SACO,KAAK,MAAM,aAAa;;cAEnB,2BAA2B;WAC9B,QAAQ;EACjB,YAAY,QAAQ;EACpB,OAAO;EACP,UAAU;EACV,SAAS;;EAET,cAAc,SAAS;SAChB,KAAK,MAAM,aAAa;;cAEnB,+BAA+B,SAAS;WAC3C,QAAQ;EACjB,YAAY,QAAQ;EACpB,QAAQ;EACR,kBAAkB;EAClB,cAAc,SAAS;EACvB;SACO,KAAK,MAAM,aAAa;;cAEnB,mCAAmC,SAAS;WAC/C,QAAQ;EACjB,YAAY,QAAQ;EACpB,QAAQ;EACR,UAAU;EACV,kBAAkB;EAClB,cAAc,SAAS;EACvB;SACO,KAAK,MAAM,aAAa;;;;KAI5B,kBAAkB;UACb;WACC,UAAU;WACV,sBAAsB;WACtB,SAAS;;;;;;iBAMH,MAAM,gBAAgB,kBAAkB,UAAU,mBAAmB"}
|
package/dist/psl-parser.d.mts
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { y as DataTypeId } from "./codec-types-CQNZE70G-DZIvCZwY.mjs";
|
|
2
2
|
import { B as PslExtensionBlockParsedAttribute, C as AuthoringPslBlockDescriptorNamespace, F as ParsedPslExtensionBlock, H as PslPosition, I as PslDiagnosticCode, L as PslExtensionBlock, R as PslExtensionBlockAttribute, S as AuthoringPslBlockDescriptor, U as PslSpan, V as PslExtensionBlockPrintEntry, z as PslExtensionBlockAttributeArg } from "./framework-authoring-BaBmrcxi-9J-ebDLU.mjs";
|
|
3
|
-
import {
|
|
3
|
+
import { n as ControlMutationDefaultRegistry } from "./mutation-default-types-DCgdIlXt-C6Sc9h16.mjs";
|
|
4
4
|
import { r as Result } from "./result-BYCOANWy.mjs";
|
|
5
|
-
import { m as WrittenScalar, n as DataTypeSupport } from "./written-value-
|
|
6
|
-
import "./authoring-
|
|
5
|
+
import { m as WrittenScalar, n as DataTypeSupport } from "./written-value-DdEQAH_R-yhLbzRP4.mjs";
|
|
6
|
+
import "./authoring-_Lh745Bn.mjs";
|
|
7
7
|
import "./codec-CBvtmEz2.mjs";
|
|
8
8
|
import { C as PslTypesBlock, O as flatPslModels, S as PslTypeConstructorCall, _ as PslModelAttribute, a as PslAttributePositionalArgument, c as PslDefaultFunctionValue, f as PslDocumentAst, g as PslModel, i as PslAttributeNamedArgument, j as namespacePslExtensionBlocks, l as PslDefaultLiteralValue, m as PslFieldAttribute, n as PslAttribute, o as PslAttributeTarget, p as PslField, r as PslAttributeArgument, s as PslCompositeType, u as PslDefaultValue, v as PslNamedTypeDeclaration, y as PslNamespace } from "./psl-ast-BER6m646-RXgNvJDn.mjs";
|
|
9
|
-
import { r as AssembledAuthoringContributions } from "./control-
|
|
9
|
+
import { r as AssembledAuthoringContributions } from "./control-Bh3RtVrv.mjs";
|
|
10
10
|
import "./psl-ast-DqB4Tq08.mjs";
|
|
11
11
|
import { i as isPslIdentifier } from "./tokenizer-DW30uwhx-BHsWTwYk.mjs";
|
|
12
|
-
import { L as PslDiagnostic, R as PslDiagnosticCollector, T as ModelAttributeAst, d as DiagnosticSource, dt as mapPslDiagnostics, it as diagnosticSource, m as FieldAttributeAst, n as AstNode, p as ExpressionAst, q as SyntaxNode, r as AttributeArgAst, rt as diagnosticFromSpan, tt as createPslDiagnosticCollector, z as PslSources } from "./parse-
|
|
13
|
-
import { $ as NamedOut, A as DescribeUnresolvedType, At as TaggedLiteralArgType, B as FixedStrArgType, Bt as createBinder, C as ContributedTypeNamespace, Ct as ResolvedEntityReference, D as CtxOf, Dt as ScopeResolution, E as CreateBinderInput, Et as Scope, F as FieldAttributeCtx, Ft as UnrestrictedNumArgType, G as InferAttr, Gt as memberEntries, H as FuncCallSig, Ht as isNamespaceLike, I as FieldRefArgType, It as UnrestrictedStrArgType, J as JsonArgType, Jt as readResolvedAttributes, K as InspectableArgType, Kt as nodePslSpan, L as FieldSymbol, Lt as UnsupportedAttribute, M as EntityDeclaration, Mt as TypedFuncCall, N as EntityRefArgType, Nt as UnresolvedTypeReference, O as DataTypeValueArgType, Ot as SymbolTable, P as EntitySelector, Pt as UnrestrictedIdentifierArgType, Q as ModelSymbol, R as FixedIdentifierArgType, Rt as buildSymbolTable, S as ContributedTypeDescriptor, St as ResolvedAttributeArg, T as ContributedTypeSymbol, Tt as ResolvedTypeConstructorCall, U as FunctionSymbol, Ut as keywordPslSpan, V as FuncCallArgType, Vt as entityReference, W as IdentifierArgType, Wt as matchesSelector, X as ListArgType, Xt as typeReferenceNode, Y as JsonValueArgType, Yt as readResolvedConstructorCall, Z as ModelAttributeCtx, _ as CompositeTypeSymbol, _t as ReferencedFieldRefArgType, a as AttributeLevel, at as OneOfArgType, b as ContributedMember, bt as Resolution, c as AttributeSymbol, ct as PSL_UNRESOLVED_REFERENCE, d as BinderResult, dt as ParsedTaggedLiteral, et as NamedTypeSymbol, f as BlockAttributeCtx, ft as ParsedTypedValue, g as BuildSymbolTableOptions, gt as RecordArgType, h as BoundSpec, ht as PslSymbol, i as AttributeCtx, it as NumLiteralArgType, j as DescribeUnsupportedAttribute, jt as TopLevelScope, k as DeclarationFor, kt as SymbolTableResult, l as Binder, lt as Param, m as BoolArgType, mt as PositionalParam, n as ArgType, nt as NullArgType, o as AttributeOut, ot as OptionalArgType, p as BlockSymbol, pt as PosOut, q as IntArgType, qt as readResolvedAttribute, r as ArgTypeKind, rt as NumLiteral, s as AttributeSpec, st as OutOf, t as AnyArgType, tt as NamespaceSymbol, u as BinderContext, ut as ParameterSymbol, v as ConstantSymbol, vt as RejectingArgType, w as ContributedTypeScope, wt as ResolvedNamedTypeBinding, x as ContributedNamespaceSymbol, xt as ResolvedAttribute, y as ContextForRequirement, yt as RequiredContextFor, z as FixedNumArgType, zt as contributedTypeOf } from "./binder-
|
|
12
|
+
import { L as PslDiagnostic, R as PslDiagnosticCollector, T as ModelAttributeAst, d as DiagnosticSource, dt as mapPslDiagnostics, it as diagnosticSource, m as FieldAttributeAst, n as AstNode, p as ExpressionAst, q as SyntaxNode, r as AttributeArgAst, rt as diagnosticFromSpan, tt as createPslDiagnosticCollector, z as PslSources } from "./parse-Dz0FUoAQ-CrN3O48P.mjs";
|
|
13
|
+
import { $ as NamedOut, A as DescribeUnresolvedType, At as TaggedLiteralArgType, B as FixedStrArgType, Bt as createBinder, C as ContributedTypeNamespace, Ct as ResolvedEntityReference, D as CtxOf, Dt as ScopeResolution, E as CreateBinderInput, Et as Scope, F as FieldAttributeCtx, Ft as UnrestrictedNumArgType, G as InferAttr, Gt as memberEntries, H as FuncCallSig, Ht as isNamespaceLike, I as FieldRefArgType, It as UnrestrictedStrArgType, J as JsonArgType, Jt as readResolvedAttributes, K as InspectableArgType, Kt as nodePslSpan, L as FieldSymbol, Lt as UnsupportedAttribute, M as EntityDeclaration, Mt as TypedFuncCall, N as EntityRefArgType, Nt as UnresolvedTypeReference, O as DataTypeValueArgType, Ot as SymbolTable, P as EntitySelector, Pt as UnrestrictedIdentifierArgType, Q as ModelSymbol, R as FixedIdentifierArgType, Rt as buildSymbolTable, S as ContributedTypeDescriptor, St as ResolvedAttributeArg, T as ContributedTypeSymbol, Tt as ResolvedTypeConstructorCall, U as FunctionSymbol, Ut as keywordPslSpan, V as FuncCallArgType, Vt as entityReference, W as IdentifierArgType, Wt as matchesSelector, X as ListArgType, Xt as typeReferenceNode, Y as JsonValueArgType, Yt as readResolvedConstructorCall, Z as ModelAttributeCtx, _ as CompositeTypeSymbol, _t as ReferencedFieldRefArgType, a as AttributeLevel, at as OneOfArgType, b as ContributedMember, bt as Resolution, c as AttributeSymbol, ct as PSL_UNRESOLVED_REFERENCE, d as BinderResult, dt as ParsedTaggedLiteral, et as NamedTypeSymbol, f as BlockAttributeCtx, ft as ParsedTypedValue, g as BuildSymbolTableOptions, gt as RecordArgType, h as BoundSpec, ht as PslSymbol, i as AttributeCtx, it as NumLiteralArgType, j as DescribeUnsupportedAttribute, jt as TopLevelScope, k as DeclarationFor, kt as SymbolTableResult, l as Binder, lt as Param, m as BoolArgType, mt as PositionalParam, n as ArgType, nt as NullArgType, o as AttributeOut, ot as OptionalArgType, p as BlockSymbol, pt as PosOut, q as IntArgType, qt as readResolvedAttribute, r as ArgTypeKind, rt as NumLiteral, s as AttributeSpec, st as OutOf, t as AnyArgType, tt as NamespaceSymbol, u as BinderContext, ut as ParameterSymbol, v as ConstantSymbol, vt as RejectingArgType, w as ContributedTypeScope, wt as ResolvedNamedTypeBinding, x as ContributedNamespaceSymbol, xt as ResolvedAttribute, y as ContextForRequirement, yt as RequiredContextFor, z as FixedNumArgType, zt as contributedTypeOf } from "./binder-B0JUKmhl-C8xZ40pa.mjs";
|
|
14
14
|
//#region ../../../1-framework/2-authoring/psl-parser/dist/index.d.mts
|
|
15
15
|
//#region src/attribute-helpers.d.ts
|
|
16
16
|
declare function getPositionalArgument(attribute: PslAttribute, index?: number): string | undefined;
|
|
@@ -19,6 +19,7 @@ declare function parseQuotedStringLiteral(value: string): string | undefined;
|
|
|
19
19
|
//#region src/block-spec/types.d.ts
|
|
20
20
|
interface BlockSpecContext {
|
|
21
21
|
readonly symbols: SymbolTable;
|
|
22
|
+
readonly dataTypes: DataTypeSupport;
|
|
22
23
|
}
|
|
23
24
|
interface BlockEntryValueSpec {
|
|
24
25
|
readonly type: ArgType<unknown, BlockAttributeCtx>;
|
|
@@ -43,7 +44,7 @@ type BlockSpecFactory = (ctx: BlockSpecContext) => BlockSpec<Readonly<Record<str
|
|
|
43
44
|
interface AttributeSpecContext {
|
|
44
45
|
readonly symbols: SymbolTable;
|
|
45
46
|
readonly model: ModelSymbol;
|
|
46
|
-
readonly
|
|
47
|
+
readonly defaultFunctionRegistry: ControlMutationDefaultRegistry;
|
|
47
48
|
readonly dataTypes: DataTypeSupport;
|
|
48
49
|
}
|
|
49
50
|
/** The data types of a stack that registers none. */
|
|
@@ -80,7 +81,7 @@ declare function blockAttribute<const Pos extends readonly PositionalParam<unkno
|
|
|
80
81
|
declare function bool(): BoolArgType<AttributeCtx>;
|
|
81
82
|
//#endregion
|
|
82
83
|
//#region src/attribute-spec/combinators/data-type-value.d.ts
|
|
83
|
-
/** An argument typed by a data type: any literal, admitted by the ADR 254 cast rule. Used as a parameter of an attribute or a `funcCall`. ADR 231, ADR 254. */
|
|
84
|
+
/** An argument typed by a data type: any literal, admitted by the ADR 254 cast rule. Used as a parameter of an attribute, a block or a `funcCall`, never as a bare arm of `oneOf`. ADR 231, ADR 254, ADR 268. */
|
|
84
85
|
declare function dataTypeValue(dataType: DataTypeId, support: DataTypeSupport): DataTypeValueArgType<AttributeCtx>;
|
|
85
86
|
//#endregion
|
|
86
87
|
//#region src/attribute-spec/combinators/diagnostic.d.ts
|
|
@@ -128,6 +129,14 @@ interface ListOptions {
|
|
|
128
129
|
}
|
|
129
130
|
declare function list<T, Ctx extends AttributeCtx>(of: ArgType<T, Ctx>, opts?: ListOptions): ListArgType<T, Ctx>;
|
|
130
131
|
//#endregion
|
|
132
|
+
//#region src/attribute-spec/combinators/map-arg.d.ts
|
|
133
|
+
/**
|
|
134
|
+
* `arm`, with the value it parses passed through `map`. The result keeps the arm's `kind`, `label`
|
|
135
|
+
* and metadata, which describe the syntax it accepts for tooling, not its output. A refusal passes
|
|
136
|
+
* through unchanged.
|
|
137
|
+
*/
|
|
138
|
+
declare function mapArg<In, Out, Ctx extends AttributeCtx>(arm: ArgType<In, Ctx>, map: (value: In, arg: ExpressionAst, ctx: Ctx) => Out): ArgType<Out, Ctx>;
|
|
139
|
+
//#endregion
|
|
131
140
|
//#region src/attribute-spec/combinators/num.d.ts
|
|
132
141
|
/** The pinned form retains its value as the output literal type. */
|
|
133
142
|
declare function num(): UnrestrictedNumArgType<AttributeCtx>;
|
|
@@ -160,6 +169,34 @@ declare function taggedLiteral(tags: readonly string[], options: {
|
|
|
160
169
|
readonly documentation: string;
|
|
161
170
|
}): TaggedLiteralArgType<AttributeCtx>;
|
|
162
171
|
//#endregion
|
|
172
|
+
//#region src/attribute-spec/combinators/written-scalar.d.ts
|
|
173
|
+
/** A literal argument read as a written scalar, with its span. A tagged literal whose text cannot be canonicalized has no `written` value and carries why. */
|
|
174
|
+
type ParsedWrittenScalar = {
|
|
175
|
+
readonly kind: 'scalar';
|
|
176
|
+
readonly written: WrittenScalar;
|
|
177
|
+
readonly span: PslSpan;
|
|
178
|
+
} | {
|
|
179
|
+
readonly kind: 'scalar';
|
|
180
|
+
readonly written: undefined;
|
|
181
|
+
readonly reason: 'nul' | 'too-large';
|
|
182
|
+
readonly span: PslSpan;
|
|
183
|
+
};
|
|
184
|
+
/**
|
|
185
|
+
* `arm`, yielding the literal it accepts as a written scalar with its span, so a consumer that reads
|
|
186
|
+
* the value by the cast rule reports at the value. `arm` must accept only literals. The result keeps
|
|
187
|
+
* the arm's `kind` and metadata, which describe the syntax it accepts for tooling, not its output.
|
|
188
|
+
* ADR 231, ADR 254.
|
|
189
|
+
*/
|
|
190
|
+
declare function writtenScalar<Ctx extends AttributeCtx>(arm: ArgType<unknown, Ctx>): ArgType<ParsedWrittenScalar, Ctx>;
|
|
191
|
+
/** A written list with its span, so a refusal about the whole list is reported at it. */
|
|
192
|
+
interface ParsedWrittenList<Element = ParsedWrittenScalar> {
|
|
193
|
+
readonly kind: 'list';
|
|
194
|
+
readonly elements: readonly Element[];
|
|
195
|
+
readonly span: PslSpan;
|
|
196
|
+
}
|
|
197
|
+
/** A list of the elements `of` yields, with the span of the whole list. ADR 254. */
|
|
198
|
+
declare function writtenList<Element, Ctx extends AttributeCtx>(of: ArgType<Element, Ctx>): ArgType<ParsedWrittenList<Element>, Ctx>;
|
|
199
|
+
//#endregion
|
|
163
200
|
//#region src/attribute-spec/field-attribute.d.ts
|
|
164
201
|
interface FieldAttributeConfig<Pos extends readonly PositionalParam<unknown, FieldAttributeCtx>[], Named extends Record<string, Param<unknown, FieldAttributeCtx>>> {
|
|
165
202
|
readonly documentation: string;
|
|
@@ -217,6 +254,7 @@ interface InterpretExtensionBlockInput<S> {
|
|
|
217
254
|
readonly symbols: SymbolTable;
|
|
218
255
|
readonly sources: PslSources;
|
|
219
256
|
readonly binder: Binder;
|
|
257
|
+
readonly dataTypes: DataTypeSupport;
|
|
220
258
|
}
|
|
221
259
|
declare function interpretExtensionBlock<S extends BlockSpec<unknown>>(input: InterpretExtensionBlockInput<S>): Result<ParsedPslExtensionBlock<InferBlock<S>>, readonly PslDiagnostic[]>;
|
|
222
260
|
interface InterpretExtensionBlockAttributesInput {
|
|
@@ -225,6 +263,7 @@ interface InterpretExtensionBlockAttributesInput {
|
|
|
225
263
|
readonly symbols: SymbolTable;
|
|
226
264
|
readonly sources: PslSources;
|
|
227
265
|
readonly binder: Binder;
|
|
266
|
+
readonly dataTypes: DataTypeSupport;
|
|
228
267
|
}
|
|
229
268
|
declare function interpretExtensionBlockAttributes(input: InterpretExtensionBlockAttributesInput): {
|
|
230
269
|
readonly attributes: Readonly<Record<string, PslExtensionBlockParsedAttribute>>;
|
|
@@ -239,9 +278,18 @@ interface InterpretExtensionBlocksInput {
|
|
|
239
278
|
readonly sources: PslSources;
|
|
240
279
|
readonly pslBlockDescriptors: AuthoringPslBlockDescriptorNamespace;
|
|
241
280
|
readonly binder: Binder;
|
|
281
|
+
/** The data types `binder` was created with, so binding and interpretation build each block's spec from the same data types. */
|
|
282
|
+
readonly dataTypes: DataTypeSupport;
|
|
242
283
|
}
|
|
243
284
|
declare function interpretExtensionBlocks(input: InterpretExtensionBlocksInput): InterpretExtensionBlocksResult;
|
|
244
285
|
//#endregion
|
|
286
|
+
//#region src/block-spec/spec-context.d.ts
|
|
287
|
+
/** The context a block spec factory and a block-attribute spec factory are built from. ADR 262. */
|
|
288
|
+
declare function blockSpecContext(input: {
|
|
289
|
+
readonly symbols: SymbolTable;
|
|
290
|
+
readonly dataTypes: DataTypeSupport;
|
|
291
|
+
}): BlockSpecContext;
|
|
292
|
+
//#endregion
|
|
245
293
|
//#region src/extension-block.d.ts
|
|
246
294
|
declare function findBlockDescriptor(descriptors: AuthoringPslBlockDescriptorNamespace | undefined, keyword: string): AuthoringPslBlockDescriptor | undefined;
|
|
247
295
|
//#endregion
|
|
@@ -272,5 +320,5 @@ type WrittenScalarResult = {
|
|
|
272
320
|
/** Reads a PSL literal expression as a `WrittenScalar`, for a position that takes a value of a data type. ADR 254. */
|
|
273
321
|
declare function readWrittenScalar(expression: ExpressionAst): WrittenScalarResult;
|
|
274
322
|
//#endregion
|
|
275
|
-
export { type ArgBindingSpec, type ArgType, type ArgTypeKind, type AssembledAttributeSpecs, type AttributeCtx, type AttributeLevel, type AttributeOut, type AttributeSpec, type AttributeSpecContext, type AttributeSpecNamespace, type AttributeSymbol, type Binder, type BinderContext, type BinderResult, type BlockAttributeCtx, type BlockAttributeSpecFactory, type BlockEntryValueSpec, type BlockSpec, type BlockSpecContext, type BlockSpecFactory, type BlockSymbol, type BoundSpec, type BuildSymbolTableOptions, type CompositeTypeSymbol, type ConstantSymbol, type ContributedMember, type ContributedNamespaceSymbol, type ContributedTypeDescriptor, type ContributedTypeNamespace, type ContributedTypeScope, type ContributedTypeSymbol, type CreateBinderInput, type DataTypeValueArgType, type DeclarationFor, type DescribeUnresolvedType, type DescribeUnsupportedAttribute, type DiagnosticSource, EMPTY_DATA_TYPES, type EntityDeclaration, type EntityRefArgType, type EntitySelector, type FieldAttributeCtx, type FieldAttributeSpecContext, type FieldAttributeSpecFactory, type FieldSymbol, type FixedIdentifierArgType, type FuncCallSig, type FunctionSymbol, type IdentifierArgType, type InferAttr, type InferBlock, type InspectableArgType, type InterpretExtensionBlockAttributesInput, type InterpretExtensionBlockInput, type InterpretExtensionBlocksResult, type JsonValueArgType, type ListOptions, type MapBlockSpec, type ModelAttributeCtx, type ModelAttributeSpecFactory, type ModelSymbol, NAME_THE_PSL_SOURCE_LOSES, type NamedOut, type NamedTypeSymbol, type NamespaceSymbol, type NullArgType, type NumLiteral, type OptionalArgType, type OutOf, PSL_UNRESOLVED_REFERENCE, type Param, type ParameterSymbol, type ParsedPslExtensionBlock, type ParsedTaggedLiteral, type ParsedTypedValue, type PosOut, type PositionalParam, type PslAttribute, type PslAttributeArgument, type PslAttributeNamedArgument, type PslAttributePositionalArgument, type PslAttributeTarget, type PslBlockSpecDescriptor, type PslCompositeType, type PslDefaultFunctionValue, type PslDefaultLiteralValue, type PslDefaultValue, type PslDiagnostic, type PslDiagnosticCode, type PslDiagnosticCollector, type PslDocumentAst, type PslExtensionBlock, type PslExtensionBlockAttribute, type PslExtensionBlockAttributeArg, type PslExtensionBlockParsedAttribute, type PslExtensionBlockPrintEntry, type PslField, type PslFieldAttribute, type PslModel, type PslModelAttribute, type PslNamedTypeDeclaration, type PslNamespace, type PslPosition, type PslSpan, type PslSymbol, type PslTypeConstructorCall, type PslTypesBlock, type RejectingArgType, type Resolution, type ResolvedAttribute, type ResolvedAttributeArg, type ResolvedEntityReference, type ResolvedNamedTypeBinding, type ResolvedTypeConstructorCall, type Scope, type ScopeResolution, type StructBlockSpec, type SymbolTable, type SymbolTableResult, type TaggedLiteralArgType, type TopLevelScope, type TypedFuncCall, type UnresolvedTypeReference, type UnrestrictedIdentifierArgType, type UnsupportedAttribute, type WrittenScalarResult, assembleAttributeSpecs, blockAttribute, blockSpecFactoryOf, bool, buildSymbolTable, contributedTypeOf, createBinder, createPslDiagnosticCollector, dataTypeValue, diagnosticFromSpan, diagnosticSource, entityRef, entityReference, fieldAttribute, fieldRef, findBlockDescriptor, flatPslModels, funcCall, getPositionalArgument, identifier, int, interpretArgs, interpretAttribute, interpretExtensionBlock, interpretExtensionBlockAttributes, interpretExtensionBlocks, isNamespaceLike, isPrismaNextSchema, isPslIdentifier, json, jsonValue, keywordPslSpan, leafDiagnostic, list, mapBlock, mapPslDiagnostics, matchesSelector, memberEntries, modelAttribute, namespacePslExtensionBlocks, nodePslSpan, num, numLiteral, oneOf, optional, parseQuotedStringLiteral, readResolvedAttribute, readResolvedAttributes, readResolvedConstructorCall, readWrittenScalar, record, referencedFieldRef, renameLegacyDirective, str, structBlock, taggedLiteral, typeReferenceNode };
|
|
323
|
+
export { type ArgBindingSpec, type ArgType, type ArgTypeKind, type AssembledAttributeSpecs, type AttributeCtx, type AttributeLevel, type AttributeOut, type AttributeSpec, type AttributeSpecContext, type AttributeSpecNamespace, type AttributeSymbol, type Binder, type BinderContext, type BinderResult, type BlockAttributeCtx, type BlockAttributeSpecFactory, type BlockEntryValueSpec, type BlockSpec, type BlockSpecContext, type BlockSpecFactory, type BlockSymbol, type BoundSpec, type BuildSymbolTableOptions, type CompositeTypeSymbol, type ConstantSymbol, type ContributedMember, type ContributedNamespaceSymbol, type ContributedTypeDescriptor, type ContributedTypeNamespace, type ContributedTypeScope, type ContributedTypeSymbol, type CreateBinderInput, type DataTypeValueArgType, type DeclarationFor, type DescribeUnresolvedType, type DescribeUnsupportedAttribute, type DiagnosticSource, EMPTY_DATA_TYPES, type EntityDeclaration, type EntityRefArgType, type EntitySelector, type FieldAttributeCtx, type FieldAttributeSpecContext, type FieldAttributeSpecFactory, type FieldSymbol, type FixedIdentifierArgType, type FuncCallSig, type FunctionSymbol, type IdentifierArgType, type InferAttr, type InferBlock, type InspectableArgType, type InterpretExtensionBlockAttributesInput, type InterpretExtensionBlockInput, type InterpretExtensionBlocksResult, type JsonValueArgType, type ListOptions, type MapBlockSpec, type ModelAttributeCtx, type ModelAttributeSpecFactory, type ModelSymbol, NAME_THE_PSL_SOURCE_LOSES, type NamedOut, type NamedTypeSymbol, type NamespaceSymbol, type NullArgType, type NumLiteral, type OptionalArgType, type OutOf, PSL_UNRESOLVED_REFERENCE, type Param, type ParameterSymbol, type ParsedPslExtensionBlock, type ParsedTaggedLiteral, type ParsedTypedValue, type ParsedWrittenList, type ParsedWrittenScalar, type PosOut, type PositionalParam, type PslAttribute, type PslAttributeArgument, type PslAttributeNamedArgument, type PslAttributePositionalArgument, type PslAttributeTarget, type PslBlockSpecDescriptor, type PslCompositeType, type PslDefaultFunctionValue, type PslDefaultLiteralValue, type PslDefaultValue, type PslDiagnostic, type PslDiagnosticCode, type PslDiagnosticCollector, type PslDocumentAst, type PslExtensionBlock, type PslExtensionBlockAttribute, type PslExtensionBlockAttributeArg, type PslExtensionBlockParsedAttribute, type PslExtensionBlockPrintEntry, type PslField, type PslFieldAttribute, type PslModel, type PslModelAttribute, type PslNamedTypeDeclaration, type PslNamespace, type PslPosition, type PslSpan, type PslSymbol, type PslTypeConstructorCall, type PslTypesBlock, type RejectingArgType, type Resolution, type ResolvedAttribute, type ResolvedAttributeArg, type ResolvedEntityReference, type ResolvedNamedTypeBinding, type ResolvedTypeConstructorCall, type Scope, type ScopeResolution, type StructBlockSpec, type SymbolTable, type SymbolTableResult, type TaggedLiteralArgType, type TopLevelScope, type TypedFuncCall, type UnresolvedTypeReference, type UnrestrictedIdentifierArgType, type UnsupportedAttribute, type WrittenScalarResult, assembleAttributeSpecs, blockAttribute, blockSpecContext, blockSpecFactoryOf, bool, buildSymbolTable, contributedTypeOf, createBinder, createPslDiagnosticCollector, dataTypeValue, diagnosticFromSpan, diagnosticSource, entityRef, entityReference, fieldAttribute, fieldRef, findBlockDescriptor, flatPslModels, funcCall, getPositionalArgument, identifier, int, interpretArgs, interpretAttribute, interpretExtensionBlock, interpretExtensionBlockAttributes, interpretExtensionBlocks, isNamespaceLike, isPrismaNextSchema, isPslIdentifier, json, jsonValue, keywordPslSpan, leafDiagnostic, list, mapArg, mapBlock, mapPslDiagnostics, matchesSelector, memberEntries, modelAttribute, namespacePslExtensionBlocks, nodePslSpan, num, numLiteral, oneOf, optional, parseQuotedStringLiteral, readResolvedAttribute, readResolvedAttributes, readResolvedConstructorCall, readWrittenScalar, record, referencedFieldRef, renameLegacyDirective, str, structBlock, taggedLiteral, typeReferenceNode, writtenList, writtenScalar };
|
|
276
324
|
//# sourceMappingURL=psl-parser.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"psl-parser.d.mts","names":[],"sources":["../../../../1-framework/2-authoring/psl-parser/dist/index.d.mts"],"mappings":";;;;;;;;;;;;;;;iBAUiB,sBAAsB,WAAW,cAAgB;iBACjD,yBAAyB;;;UAGhC;WACC,SAAS;;
|
|
1
|
+
{"version":3,"file":"psl-parser.d.mts","names":[],"sources":["../../../../1-framework/2-authoring/psl-parser/dist/index.d.mts"],"mappings":";;;;;;;;;;;;;;;iBAUiB,sBAAsB,WAAW,cAAgB;iBACjD,yBAAyB;;;UAGhC;WACC,SAAS;WACT,WAAW;;UAEZ;WACC,MAAM,iBAAiB;WACvB;;UAED,gBAAgB;WACf;WACA,YAAY,SAAS,eAAe,eAAe;WACnD,OAAO;;UAER,aAAa;WACZ;WACA,OAAO;WACP;WACA,OAAO;;KAEb,UAAU,iBAAiB,gBAAgB,OAAO,aAAa;KAC/D,WAAW,KAAK,UAAU,gBAAgB,OAAO;KACjD,oBAAoB,KAAK,qBAAqB,UAAU,SAAS;;;UAG5D;WACC,SAAS;WACT,OAAO;WACP,yBAAyB;WACzB,WAAW;;;cAGR,kBAAkB;UACtB,kCAAkC;WACjC,OAAO;WACP,gBAAgB;;KAEtB,6BAA6B,KAAK,yBAAyB,qBAAqB;KAChF,6BAA6B,KAAK,8BAA8B,qBAAqB;UAChF;WACC,OAAO,SAAS,eAAe;WAC/B,OAAO,SAAS,eAAe;;KAErC,6BAA6B,KAAK,qBAAqB,qBAAqB;;;UAGvE;WACC,OAAO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nB,sBAAsB;;;;KAIlC;WACM;WACA,SAAS;;WAET;WACA;;WAEA;WACA;WACA;;;iBAGM,kBAAkB,YAAY,gBAAgB"}
|
package/dist/psl-parser.mjs
CHANGED
|
@@ -2,13 +2,13 @@ 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
4
|
import { r as createDataTypeLookup } from "./data-type-4xQlxYB5-DD158cOq.mjs";
|
|
5
|
-
import { S as isAuthoringPslBlockDescriptor, f as describeTaggedLiteralFailure, x as isAuthoringModelAttributeDescriptor } from "./temporal-presets-
|
|
6
|
-
import { _ as tagForm, a as describeExpected, g as readWrittenValue, i as describeAdmittedForms, n as admittedTags, o as describeRefusal, r as castTypedValue, t as admittedForms, u as exactRewrite } from "./authoring-
|
|
5
|
+
import { S as isAuthoringPslBlockDescriptor, f as describeTaggedLiteralFailure, x as isAuthoringModelAttributeDescriptor } from "./temporal-presets-CjxLjyl8-DhMFaNE2.mjs";
|
|
6
|
+
import { _ as tagForm, a as describeExpected, g as readWrittenValue, i as describeAdmittedForms, n as admittedTags, o as describeRefusal, r as castTypedValue, t as admittedForms, u as exactRewrite } from "./authoring-III9x7Sy.mjs";
|
|
7
7
|
import { a as flatPslModels, c as namespacePslExtensionBlocks } from "./psl-ast-CyvE6CR-.mjs";
|
|
8
8
|
import { n as isPslIdentifier } from "./tokenizer-BMz7z2KR-J0yZ4im3.mjs";
|
|
9
|
-
import { C as TaggedLiteralExprAst, S as StringLiteralExprAst, T as TypesBlockAst, _ as NumberLiteralExprAst, a as CompositeTypeDeclarationAst, b as PathExprAst, d as IdentifierAst, g as NamespaceDeclarationAst, i as BooleanLiteralExprAst, l as FunctionCallAst, m as ModelDeclarationAst, t as ArrayLiteralAst, u as GenericBlockDeclarationAst, y as ObjectLiteralExprAst } from "./declarations-
|
|
9
|
+
import { C as TaggedLiteralExprAst, S as StringLiteralExprAst, T as TypesBlockAst, _ as NumberLiteralExprAst, a as CompositeTypeDeclarationAst, b as PathExprAst, d as IdentifierAst, g as NamespaceDeclarationAst, i as BooleanLiteralExprAst, l as FunctionCallAst, m as ModelDeclarationAst, t as ArrayLiteralAst, u as GenericBlockDeclarationAst, y as ObjectLiteralExprAst } from "./declarations-DosoNVo9-Bnoie4Sr.mjs";
|
|
10
10
|
import { a as mapPslDiagnostics, c as readResolvedAttributes, i as keywordPslSpan, l as readResolvedConstructorCall, n as diagnosticFromSpan, o as nodePslSpan, r as diagnosticSource, s as readResolvedAttribute, t as createPslDiagnosticCollector } from "./resolve-C8PUf8zv-QAvnPhCt.mjs";
|
|
11
|
-
//#region ../../../1-framework/2-authoring/psl-parser/dist/symbol-table-
|
|
11
|
+
//#region ../../../1-framework/2-authoring/psl-parser/dist/symbol-table-Bn6r8gOG.mjs
|
|
12
12
|
function* modelAttributeDescriptors(namespace) {
|
|
13
13
|
for (const value of Object.values(namespace)) {
|
|
14
14
|
if (isAuthoringModelAttributeDescriptor(value)) {
|
|
@@ -159,6 +159,13 @@ function describeResolution(resolution) {
|
|
|
159
159
|
function blockSpecFactoryOf(descriptor) {
|
|
160
160
|
return blindCast(descriptor.spec);
|
|
161
161
|
}
|
|
162
|
+
/** The context a block spec factory and a block-attribute spec factory are built from. ADR 262. */
|
|
163
|
+
function blockSpecContext(input) {
|
|
164
|
+
return {
|
|
165
|
+
symbols: input.symbols,
|
|
166
|
+
dataTypes: input.dataTypes
|
|
167
|
+
};
|
|
168
|
+
}
|
|
162
169
|
function isContributedTypeDescriptor(value) {
|
|
163
170
|
return "kind" in value && (value.kind === "typeConstructor" || value.kind === "fieldPreset");
|
|
164
171
|
}
|
|
@@ -439,14 +446,14 @@ function createBinder(input) {
|
|
|
439
446
|
contributedTypes: mergeContributedTypes(contributions.field, contributions.type),
|
|
440
447
|
attributeSpecs: assembleAttributeSpecs(contributions),
|
|
441
448
|
pslBlockDescriptors: contributions.pslBlockDescriptors,
|
|
442
|
-
|
|
449
|
+
defaultFunctionRegistry: context.controlMutationDefaults.defaultFunctionRegistry,
|
|
443
450
|
dataTypes: context.dataTypes,
|
|
444
451
|
...describeUnsupportedAttributeFactory !== void 0 ? { describeUnsupportedAttribute: describeUnsupportedAttributeFactory(sources) } : {},
|
|
445
452
|
...describeUnresolvedTypeFactory !== void 0 ? { describeUnresolvedType: describeUnresolvedTypeFactory(contributions) } : {}
|
|
446
453
|
});
|
|
447
454
|
}
|
|
448
455
|
function bind(options) {
|
|
449
|
-
const { sources, symbolTable, contributedTypes, attributeSpecs,
|
|
456
|
+
const { sources, symbolTable, contributedTypes, attributeSpecs, defaultFunctionRegistry, dataTypes, describeUnsupportedAttribute, describeUnresolvedType } = options;
|
|
450
457
|
const pslBlockDescriptors = options.pslBlockDescriptors ?? {};
|
|
451
458
|
const contributed = contributedScope(contributedTypeScope(contributedTypes));
|
|
452
459
|
const document = documentScope(symbolTable.topLevel, contributed);
|
|
@@ -544,7 +551,7 @@ function bind(options) {
|
|
|
544
551
|
const specContext = entity.kind === "model" ? {
|
|
545
552
|
symbols: symbolTable,
|
|
546
553
|
model: entity,
|
|
547
|
-
|
|
554
|
+
defaultFunctionRegistry,
|
|
548
555
|
dataTypes
|
|
549
556
|
} : void 0;
|
|
550
557
|
bindAttributes(entity, entity.attributes, attributeSpecs.model, (factory) => specContext === void 0 ? void 0 : factory(specContext), {
|
|
@@ -568,6 +575,7 @@ function bind(options) {
|
|
|
568
575
|
const blockContext = {
|
|
569
576
|
pslBlockDescriptors,
|
|
570
577
|
symbolTable,
|
|
578
|
+
dataTypes,
|
|
571
579
|
sources,
|
|
572
580
|
references,
|
|
573
581
|
diagnostics
|
|
@@ -593,7 +601,11 @@ function bind(options) {
|
|
|
593
601
|
function bindBlock(block, ctx) {
|
|
594
602
|
const descriptor = findBlockDescriptor(ctx.pslBlockDescriptors, block.keyword);
|
|
595
603
|
if (descriptor === void 0) return;
|
|
596
|
-
const
|
|
604
|
+
const specContext = blockSpecContext({
|
|
605
|
+
symbols: ctx.symbolTable,
|
|
606
|
+
dataTypes: ctx.dataTypes
|
|
607
|
+
});
|
|
608
|
+
const spec = blockSpecFactoryOf(descriptor)(specContext);
|
|
597
609
|
for (const entry of block.node.entries()) {
|
|
598
610
|
const key = entry.key()?.name();
|
|
599
611
|
if (key === void 0) continue;
|
|
@@ -619,7 +631,7 @@ function bindBlock(block, ctx) {
|
|
|
619
631
|
for (const attribute of readResolvedAttributes(block.node.attributes(), ctx.sources)) {
|
|
620
632
|
const factory = attributeSpecs[attribute.name];
|
|
621
633
|
if (factory === void 0) continue;
|
|
622
|
-
const attributeSpec = blindCast(factory)(
|
|
634
|
+
const attributeSpec = blindCast(factory)(specContext);
|
|
623
635
|
const attributeSymbol = {
|
|
624
636
|
kind: "attribute",
|
|
625
637
|
name: attribute.name,
|
|
@@ -1336,7 +1348,7 @@ const TAGGED_LITERAL_FAILURE_CODES = {
|
|
|
1336
1348
|
nul: "PSL_TAGGED_LITERAL_NUL",
|
|
1337
1349
|
"too-large": "PSL_TAGGED_LITERAL_TOO_LARGE"
|
|
1338
1350
|
};
|
|
1339
|
-
/** An argument typed by a data type: any literal, admitted by the ADR 254 cast rule. Used as a parameter of an attribute or a `funcCall`. ADR 231, ADR 254. */
|
|
1351
|
+
/** An argument typed by a data type: any literal, admitted by the ADR 254 cast rule. Used as a parameter of an attribute, a block or a `funcCall`, never as a bare arm of `oneOf`. ADR 231, ADR 254, ADR 268. */
|
|
1340
1352
|
function dataTypeValue(dataType, support) {
|
|
1341
1353
|
const tags = admittedTags(support, dataType);
|
|
1342
1354
|
const [firstTag] = tags;
|
|
@@ -1774,6 +1786,21 @@ function jsonNull() {
|
|
|
1774
1786
|
}
|
|
1775
1787
|
};
|
|
1776
1788
|
}
|
|
1789
|
+
/**
|
|
1790
|
+
* `arm`, with the value it parses passed through `map`. The result keeps the arm's `kind`, `label`
|
|
1791
|
+
* and metadata, which describe the syntax it accepts for tooling, not its output. A refusal passes
|
|
1792
|
+
* through unchanged.
|
|
1793
|
+
*/
|
|
1794
|
+
function mapArg(arm, map) {
|
|
1795
|
+
const parse = (arg, ctx) => {
|
|
1796
|
+
const parsed = arm.parse(arg, ctx);
|
|
1797
|
+
return parsed.ok ? ok(map(parsed.value, arg, ctx)) : parsed;
|
|
1798
|
+
};
|
|
1799
|
+
return blindCast({
|
|
1800
|
+
...arm,
|
|
1801
|
+
parse
|
|
1802
|
+
});
|
|
1803
|
+
}
|
|
1777
1804
|
function num(value) {
|
|
1778
1805
|
if (value === void 0) return {
|
|
1779
1806
|
kind: "num",
|
|
@@ -1835,6 +1862,38 @@ function taggedLiteral(tags, options) {
|
|
|
1835
1862
|
}
|
|
1836
1863
|
};
|
|
1837
1864
|
}
|
|
1865
|
+
/**
|
|
1866
|
+
* `arm`, yielding the literal it accepts as a written scalar with its span, so a consumer that reads
|
|
1867
|
+
* the value by the cast rule reports at the value. `arm` must accept only literals. The result keeps
|
|
1868
|
+
* the arm's `kind` and metadata, which describe the syntax it accepts for tooling, not its output.
|
|
1869
|
+
* ADR 231, ADR 254.
|
|
1870
|
+
*/
|
|
1871
|
+
function writtenScalar(arm) {
|
|
1872
|
+
return mapArg(arm, (_accepted, arg, ctx) => {
|
|
1873
|
+
const span = nodePslSpan(arg.syntax, ctx.sources);
|
|
1874
|
+
const literal = readWrittenScalar(arg);
|
|
1875
|
+
if (literal.ok) return {
|
|
1876
|
+
kind: "scalar",
|
|
1877
|
+
written: literal.written,
|
|
1878
|
+
span
|
|
1879
|
+
};
|
|
1880
|
+
if (literal.reason === "not-a-literal") throw new InternalError(`writtenScalar wraps an arm that accepted ${literal.found}.`);
|
|
1881
|
+
return {
|
|
1882
|
+
kind: "scalar",
|
|
1883
|
+
written: void 0,
|
|
1884
|
+
reason: literal.reason,
|
|
1885
|
+
span
|
|
1886
|
+
};
|
|
1887
|
+
});
|
|
1888
|
+
}
|
|
1889
|
+
/** A list of the elements `of` yields, with the span of the whole list. ADR 254. */
|
|
1890
|
+
function writtenList(of) {
|
|
1891
|
+
return mapArg(list(of, { label: `list of (${of.label})` }), (elements, arg, ctx) => ({
|
|
1892
|
+
kind: "list",
|
|
1893
|
+
elements,
|
|
1894
|
+
span: nodePslSpan(arg.syntax, ctx.sources)
|
|
1895
|
+
}));
|
|
1896
|
+
}
|
|
1838
1897
|
function fieldAttribute(name, config) {
|
|
1839
1898
|
return {
|
|
1840
1899
|
level: "field",
|
|
@@ -1887,7 +1946,7 @@ function mapBlock(config) {
|
|
|
1887
1946
|
};
|
|
1888
1947
|
}
|
|
1889
1948
|
function interpretExtensionBlock(input) {
|
|
1890
|
-
const { block, descriptor, spec, symbols, sources, binder } = input;
|
|
1949
|
+
const { block, descriptor, spec, symbols, sources, binder, dataTypes } = input;
|
|
1891
1950
|
const ctx = {
|
|
1892
1951
|
sources,
|
|
1893
1952
|
symbols,
|
|
@@ -1901,7 +1960,8 @@ function interpretExtensionBlock(input) {
|
|
|
1901
1960
|
descriptor,
|
|
1902
1961
|
symbols,
|
|
1903
1962
|
sources,
|
|
1904
|
-
binder
|
|
1963
|
+
binder,
|
|
1964
|
+
dataTypes
|
|
1905
1965
|
});
|
|
1906
1966
|
diagnostics.push(...interpretedAttributes.diagnostics);
|
|
1907
1967
|
if (entries.failed || diagnostics.length > 0) return notOk(diagnostics);
|
|
@@ -2022,7 +2082,7 @@ function bareEntryDiagnostic(block, key, ctx, node, span) {
|
|
|
2022
2082
|
return entryDiagnostic("PSL_INVALID_EXTENSION_BLOCK_MEMBER", `Parameter "${key}" in "${block.keyword}" block "${block.name}" must be written as "${key} = <value>".`, ctx, node, span);
|
|
2023
2083
|
}
|
|
2024
2084
|
function interpretExtensionBlockAttributes(input) {
|
|
2025
|
-
const { block, descriptor, symbols, sources, binder } = input;
|
|
2085
|
+
const { block, descriptor, symbols, sources, binder, dataTypes } = input;
|
|
2026
2086
|
const declared = descriptor.attributes ?? {};
|
|
2027
2087
|
const attributes = Object.create(null);
|
|
2028
2088
|
const diagnostics = [];
|
|
@@ -2047,7 +2107,10 @@ function interpretExtensionBlockAttributes(input) {
|
|
|
2047
2107
|
continue;
|
|
2048
2108
|
}
|
|
2049
2109
|
seenNames.add(name);
|
|
2050
|
-
const spec = blindCast(declared[name])({
|
|
2110
|
+
const spec = blindCast(declared[name])(blockSpecContext({
|
|
2111
|
+
symbols,
|
|
2112
|
+
dataTypes
|
|
2113
|
+
}));
|
|
2051
2114
|
const result = interpretAttribute(attribute, spec, {
|
|
2052
2115
|
sources,
|
|
2053
2116
|
symbols,
|
|
@@ -2081,7 +2144,7 @@ function entryDiagnostic(code, message, ctx, node, span) {
|
|
|
2081
2144
|
};
|
|
2082
2145
|
}
|
|
2083
2146
|
function interpretExtensionBlocks(input) {
|
|
2084
|
-
const { symbolTable, sources, pslBlockDescriptors, binder } = input;
|
|
2147
|
+
const { symbolTable, sources, pslBlockDescriptors, binder, dataTypes } = input;
|
|
2085
2148
|
const parsedBlocks = /* @__PURE__ */ new Map();
|
|
2086
2149
|
const diagnostics = [];
|
|
2087
2150
|
const scopes = [symbolTable.topLevel, ...Object.values(symbolTable.topLevel.namespaces)];
|
|
@@ -2091,10 +2154,14 @@ function interpretExtensionBlocks(input) {
|
|
|
2091
2154
|
const parsed = interpretExtensionBlock({
|
|
2092
2155
|
block,
|
|
2093
2156
|
descriptor,
|
|
2094
|
-
spec: blockSpecFactoryOf(descriptor)({
|
|
2157
|
+
spec: blockSpecFactoryOf(descriptor)(blockSpecContext({
|
|
2158
|
+
symbols: symbolTable,
|
|
2159
|
+
dataTypes
|
|
2160
|
+
})),
|
|
2095
2161
|
symbols: symbolTable,
|
|
2096
2162
|
sources,
|
|
2097
|
-
binder
|
|
2163
|
+
binder,
|
|
2164
|
+
dataTypes
|
|
2098
2165
|
});
|
|
2099
2166
|
if (parsed.ok) parsedBlocks.set(block, parsed.value);
|
|
2100
2167
|
else diagnostics.push(...parsed.failure);
|
|
@@ -2118,6 +2185,6 @@ function renameLegacyDirective(text) {
|
|
|
2118
2185
|
return text.replace(DIRECTIVE, (whole, lead, name, trail) => name === LEGACY_NAME ? `${lead}prisma-8${trail}` : whole);
|
|
2119
2186
|
}
|
|
2120
2187
|
//#endregion
|
|
2121
|
-
export { EMPTY_DATA_TYPES, NAME_THE_PSL_SOURCE_LOSES, PSL_UNRESOLVED_REFERENCE, assembleAttributeSpecs, blockAttribute, blockSpecFactoryOf, bool, buildSymbolTable, contributedTypeOf, createBinder, createPslDiagnosticCollector, dataTypeValue, diagnosticFromSpan, diagnosticSource, entityRef, entityReference, fieldAttribute, fieldRef, findBlockDescriptor, flatPslModels, funcCall, getPositionalArgument, identifier, int, interpretArgs, interpretAttribute, interpretExtensionBlock, interpretExtensionBlockAttributes, interpretExtensionBlocks, isNamespaceLike, isPrismaNextSchema, isPslIdentifier, json, jsonValue, keywordPslSpan, leafDiagnostic, list, mapBlock, mapPslDiagnostics, matchesSelector, memberEntries, modelAttribute, namespacePslExtensionBlocks, nodePslSpan, num, numLiteral, oneOf, optional, parseQuotedStringLiteral, readResolvedAttribute, readResolvedAttributes, readResolvedConstructorCall, readWrittenScalar, record, referencedFieldRef, renameLegacyDirective, str, structBlock, taggedLiteral, typeReferenceNode };
|
|
2188
|
+
export { EMPTY_DATA_TYPES, NAME_THE_PSL_SOURCE_LOSES, PSL_UNRESOLVED_REFERENCE, assembleAttributeSpecs, blockAttribute, blockSpecContext, blockSpecFactoryOf, bool, buildSymbolTable, contributedTypeOf, createBinder, createPslDiagnosticCollector, dataTypeValue, diagnosticFromSpan, diagnosticSource, entityRef, entityReference, fieldAttribute, fieldRef, findBlockDescriptor, flatPslModels, funcCall, getPositionalArgument, identifier, int, interpretArgs, interpretAttribute, interpretExtensionBlock, interpretExtensionBlockAttributes, interpretExtensionBlocks, isNamespaceLike, isPrismaNextSchema, isPslIdentifier, json, jsonValue, keywordPslSpan, leafDiagnostic, list, mapArg, mapBlock, mapPslDiagnostics, matchesSelector, memberEntries, modelAttribute, namespacePslExtensionBlocks, nodePslSpan, num, numLiteral, oneOf, optional, parseQuotedStringLiteral, readResolvedAttribute, readResolvedAttributes, readResolvedConstructorCall, readWrittenScalar, record, referencedFieldRef, renameLegacyDirective, str, structBlock, taggedLiteral, typeReferenceNode, writtenList, writtenScalar };
|
|
2122
2189
|
|
|
2123
2190
|
//# sourceMappingURL=psl-parser.mjs.map
|