@prisma/orm-framework 8.0.0-rc.20-dev.14 → 8.0.0-rc.20-dev.15
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-C9wgJCNs.d.mts → authoring-C2UAuRfN.d.mts} +4 -14
- package/dist/{authoring-C9wgJCNs.d.mts.map → authoring-C2UAuRfN.d.mts.map} +1 -1
- package/dist/{authoring-BNzxszPO.mjs → authoring-CuGQP7_1.mjs} +4 -26
- package/dist/authoring-CuGQP7_1.mjs.map +1 -0
- package/dist/{binder-DJRPMfsD-D7PEvJOJ.d.mts → binder-BszqDG1t-icu83_4f.d.mts} +16 -12
- package/dist/{binder-DJRPMfsD-D7PEvJOJ.d.mts.map → binder-BszqDG1t-icu83_4f.d.mts.map} +1 -1
- package/dist/{components-Cl5lB_Iw.d.mts → components-BenCVFk4.d.mts} +3 -3
- package/dist/{components-Cl5lB_Iw.d.mts.map → components-BenCVFk4.d.mts.map} +1 -1
- package/dist/components.d.mts +10 -10
- package/dist/components.mjs +4 -4
- package/dist/components__authoring.d.mts +4 -4
- package/dist/components__authoring.mjs +3 -3
- package/dist/components__components.d.mts +3 -3
- package/dist/components__control.d.mts +3 -3
- package/dist/components__control.mjs +2 -2
- package/dist/components__execution.d.mts +1 -1
- package/dist/components__psl-ast.d.mts +3 -3
- package/dist/{config-types-j3Elycru.d.mts → config-types-BJ79TZCl.d.mts} +5 -5
- package/dist/{config-types-j3Elycru.d.mts.map → config-types-BJ79TZCl.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 +19 -54
- package/dist/contract-authoring.d.mts.map +1 -1
- package/dist/contract-authoring.mjs +15 -28
- package/dist/contract-authoring.mjs.map +1 -1
- package/dist/control-B3OS8JEw.d.mts +1 -0
- package/dist/{control-BeXOxtXA-DRX60Yu3.d.mts → control-BeXOxtXA-BU8y-LiK.d.mts} +2 -2
- package/dist/{control-BeXOxtXA-DRX60Yu3.d.mts.map → control-BeXOxtXA-BU8y-LiK.d.mts.map} +1 -1
- package/dist/{control-Df-HE5e4.d.mts → control-CS1uqJj_.d.mts} +8 -9
- package/dist/{control-Df-HE5e4.d.mts.map → control-CS1uqJj_.d.mts.map} +1 -1
- package/dist/{control-DKOWXGUq.mjs → control-Dn1CMH6R.mjs} +8 -16
- package/dist/control-Dn1CMH6R.mjs.map +1 -0
- package/dist/{control-MllEQmML-tXi_WAy3.mjs → control-MllEQmML-BdhmgQVr.mjs} +2 -2
- package/dist/{control-MllEQmML-tXi_WAy3.mjs.map → control-MllEQmML-BdhmgQVr.mjs.map} +1 -1
- package/dist/{declarations-BgUAq1RG-Dz_-EI1Q.mjs → declarations-BgUAq1RG-DPNkVezv.mjs} +2 -2
- package/dist/{declarations-BgUAq1RG-Dz_-EI1Q.mjs.map → declarations-BgUAq1RG-DPNkVezv.mjs.map} +1 -1
- 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-D5tvAHf4.d.mts → execution-BPJbNttJ.d.mts} +2 -2
- package/dist/{execution-D5tvAHf4.d.mts.map → execution-BPJbNttJ.d.mts.map} +1 -1
- package/dist/{execution-CgR7dFMU.d.mts → execution-BWR_z8XI.d.mts} +2 -2
- package/dist/{execution-CgR7dFMU.d.mts.map → execution-BWR_z8XI.d.mts.map} +1 -1
- package/dist/{execution-DMsDYKSr.mjs → execution-GInmnTZ9.mjs} +2 -2
- package/dist/{execution-DMsDYKSr.mjs.map → execution-GInmnTZ9.mjs.map} +1 -1
- package/dist/{expressions-CMQzbnHk-BL2zN0Iv.mjs → expressions-CMQzbnHk-FYhlr1aG.mjs} +2 -2
- package/dist/{expressions-CMQzbnHk-BL2zN0Iv.mjs.map → expressions-CMQzbnHk-FYhlr1aG.mjs.map} +1 -1
- package/dist/{framework-authoring-DSqNuI8w-BMQDwpgF.d.mts → framework-authoring-ebqZ8M_M-DIDpVcUB.d.mts} +17 -97
- package/dist/framework-authoring-ebqZ8M_M-DIDpVcUB.d.mts.map +1 -0
- package/dist/{framework-components-BhbsOiJc-BpDfGsqn.d.mts → framework-components-BqHA1V92-D9j8uXa-.d.mts} +3 -3
- package/dist/{framework-components-BhbsOiJc-BpDfGsqn.d.mts.map → framework-components-BqHA1V92-D9j8uXa-.d.mts.map} +1 -1
- package/dist/ids.d.mts +3 -98
- package/dist/ids.d.mts.map +1 -1
- package/dist/ids.mjs +12 -52
- package/dist/ids.mjs.map +1 -1
- package/dist/{migration-DpdvEAEC.mjs → migration-D57w8Uxv.mjs} +2 -2
- package/dist/{migration-DpdvEAEC.mjs.map → migration-D57w8Uxv.mjs.map} +1 -1
- package/dist/{migration-Ox7HWa_t.d.mts → migration-Dk1sYIvs.d.mts} +2 -2
- package/dist/{migration-Ox7HWa_t.d.mts.map → migration-Dk1sYIvs.d.mts.map} +1 -1
- package/dist/{parse-bZgfjovA-BNgYhylT.mjs → parse-bZgfjovA-gD3hVy3X.mjs} +3 -3
- package/dist/{parse-bZgfjovA-BNgYhylT.mjs.map → parse-bZgfjovA-gD3hVy3X.mjs.map} +1 -1
- package/dist/{parse-djL5wker-sY18Mt5K.d.mts → parse-djL5wker-DnMlKOii.d.mts} +6 -6
- package/dist/{parse-djL5wker-sY18Mt5K.d.mts.map → parse-djL5wker-DnMlKOii.d.mts.map} +1 -1
- package/dist/{psl-ast-C8W7AM1f-DYtFq1nP.d.mts → psl-ast-0oMzInxd-Nx9cHmcc.d.mts} +3 -3
- package/dist/{psl-ast-C8W7AM1f-DYtFq1nP.d.mts.map → psl-ast-0oMzInxd-Nx9cHmcc.d.mts.map} +1 -1
- package/dist/psl-ast-CFQfCJeM.d.mts +2 -0
- package/dist/psl-parser.d.mts +12 -12
- package/dist/psl-parser.mjs +17 -55
- package/dist/psl-parser.mjs.map +1 -1
- package/dist/psl-parser__format.d.mts +1 -1
- package/dist/psl-parser__format.mjs +3 -3
- package/dist/psl-parser__interpret.d.mts +30 -30
- package/dist/psl-parser__interpret.d.mts.map +1 -1
- package/dist/psl-parser__interpret.mjs +110 -298
- package/dist/psl-parser__interpret.mjs.map +1 -1
- package/dist/psl-parser__syntax.d.mts +1 -1
- package/dist/psl-parser__syntax.mjs +3 -3
- package/dist/psl-printer.d.mts +4 -4
- package/dist/psl-printer.mjs +1 -1
- package/dist/temporal-type-aliases-BIiamFSH-BrpK13hf.d.mts +133 -0
- package/dist/temporal-type-aliases-BIiamFSH-BrpK13hf.d.mts.map +1 -0
- package/dist/{temporal-presets-5TK1pTYJ-DmhrnMP1.mjs → temporal-type-aliases-D98ei6Fj-DEtfAQYL.mjs} +29 -281
- package/dist/temporal-type-aliases-D98ei6Fj-DEtfAQYL.mjs.map +1 -0
- package/dist/{type-constructor-calls-BLf-HsFy-CHiXyVEH.mjs → type-constructor-calls-CNd1Xlw2-DjyX5mKn.mjs} +52 -7
- package/dist/type-constructor-calls-CNd1Xlw2-DjyX5mKn.mjs.map +1 -0
- package/package.json +15 -15
- package/dist/authoring-BNzxszPO.mjs.map +0 -1
- package/dist/control-CV9doMHb.d.mts +0 -1
- package/dist/control-DKOWXGUq.mjs.map +0 -1
- package/dist/framework-authoring-DSqNuI8w-BMQDwpgF.d.mts.map +0 -1
- package/dist/psl-ast-sZ1tAYRc.d.mts +0 -2
- package/dist/temporal-presets-5TK1pTYJ-DmhrnMP1.mjs.map +0 -1
- package/dist/temporal-presets-De4oKG36-DlGYQgF1.d.mts +0 -258
- package/dist/temporal-presets-De4oKG36-DlGYQgF1.d.mts.map +0 -1
- package/dist/type-constructor-calls-BLf-HsFy-CHiXyVEH.mjs.map +0 -1
package/dist/psl-parser.d.mts
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { T as DataTypeValue, v as DataTypeId } from "./codec-types-B4wPvO-K-BqcGrCE-.mjs";
|
|
2
2
|
import { r as Result } from "./result-BYCOANWy.mjs";
|
|
3
|
-
import {
|
|
4
|
-
import "./authoring-
|
|
3
|
+
import { E as AuthoringTypeConstructorDescriptor, I as ControlMutationDefaultRegistry, J as GeneratorFunctionRegistry, O as AuthoringTypeNamespace, Z as GeneratorPhase, at as PslExtensionBlock, b as AuthoringPslBlockDescriptor, bt as WrittenScalar, ct as PslExtensionBlockParsedAttribute, dt as PslSpan, it as PslDiagnosticCode, lt as PslExtensionBlockPrintEntry, ot as PslExtensionBlockAttribute, st as PslExtensionBlockAttributeArg, tt as ParsedPslExtensionBlock, ut as PslPosition, w as AuthoringTypeAliasDescriptor, x as AuthoringPslBlockDescriptorNamespace, z as DataTypeSupport } from "./framework-authoring-ebqZ8M_M-DIDpVcUB.mjs";
|
|
4
|
+
import "./authoring-C2UAuRfN.mjs";
|
|
5
5
|
import "./codec-CZ3VQq7G.mjs";
|
|
6
|
-
import "./components-
|
|
7
|
-
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-
|
|
8
|
-
import { r as AssembledAuthoringContributions } from "./control-
|
|
9
|
-
import "./psl-ast-
|
|
6
|
+
import "./components-BenCVFk4.mjs";
|
|
7
|
+
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-0oMzInxd-Nx9cHmcc.mjs";
|
|
8
|
+
import { r as AssembledAuthoringContributions } from "./control-CS1uqJj_.mjs";
|
|
9
|
+
import "./psl-ast-CFQfCJeM.mjs";
|
|
10
10
|
import { i as isPslIdentifier } from "./tokenizer-i8RaVWVa-7fRwlCPP.mjs";
|
|
11
|
-
import { B as PslDiagnosticCollector, D as ModelAttributeAst, V as PslSources, Y as SyntaxNode, at as diagnosticFromSpan, d as DiagnosticSource, m as FieldAttributeAst, n as AstNode, ot as diagnosticSource, p as ExpressionAst, pt as mapPslDiagnostics, r as AttributeArgAst, rt as createPslDiagnosticCollector, z as PslDiagnostic } from "./parse-djL5wker-
|
|
12
|
-
import { $ as ModelSymbol, A as DescribeUnresolvedType, At as SymbolTableResult, B as FixedStrArgType, Bt as
|
|
11
|
+
import { B as PslDiagnosticCollector, D as ModelAttributeAst, V as PslSources, Y as SyntaxNode, at as diagnosticFromSpan, d as DiagnosticSource, m as FieldAttributeAst, n as AstNode, ot as diagnosticSource, p as ExpressionAst, pt as mapPslDiagnostics, r as AttributeArgAst, rt as createPslDiagnosticCollector, z as PslDiagnostic } from "./parse-djL5wker-DnMlKOii.mjs";
|
|
12
|
+
import { $ as ModelSymbol, A as DescribeUnresolvedType, At as SymbolTableResult, B as FixedStrArgType, Bt as contributedTypeCodecId, C as ContributedTypeNamespace, Ct as ResolvedAttributeArg, D as CtxOf, Dt as Scope, E as CreateBinderInput, Et as ResolvedTypeConstructorCall, F as FieldAttributeCtx, Ft as UnrestrictedNumArgType, G as InferAttr, Gt as keywordPslSpan, H as FuncCallSig, Ht as createBinder, I as FieldRefArgType, It as UnrestrictedStrArgType, J as JsonArgType, Jt as nodePslSpan, K as InspectableArgType, Kt as matchesSelector, L as FieldSymbol, Lt as UnsupportedAttribute, M as EntityDeclaration, Mt as TypedFuncCall, N as EntityRefArgType, Nt as UnresolvedTypeReference, O as DataTypeValueArgType, Ot as ScopeResolution, P as EntitySelector, Pt as UnrestrictedIdentifierArgType, Q as ModelAttributeCtx, Qt as typeReferenceNode, R as FixedIdentifierArgType, Rt as buildSymbolTable, S as ContributedTypeDescriptor, St as ResolvedAttribute, T as ContributedTypeSymbol, Tt as ResolvedNamedTypeBinding, U as FunctionSymbol, Ut as entityReference, V as FuncCallArgType, Vt as contributedTypeOf, W as IdentifierArgType, Wt as isNamespaceLike, X as ListArgType, Xt as readResolvedAttributes, Y as JsonValueArgType, Yt as readResolvedAttribute, Z as MixinSymbol, Zt as readResolvedConstructorCall, _ as CompositeTypeSymbol, _t as RecordArgType, a as AttributeLevel, at as NumLiteralArgType, b as ContributedMember, bt as RequiredContextFor, c as AttributeSymbol, ct as OutOf, d as BinderResult, dt as ParameterSymbol, et as NamedOut, f as BlockAttributeCtx, ft as ParsedTaggedLiteral, g as BuildSymbolTableOptions, gt as PslSymbol, h as BoundSpec, ht as PositionalParam, i as AttributeCtx, it as NumLiteral, j as DescribeUnsupportedAttribute, jt as TaggedLiteralArgType, k as DeclarationFor, kt as SymbolTable, l as Binder, lt as PSL_UNRESOLVED_REFERENCE, m as BoolArgType, mt as PosOut, n as ArgType, nt as NamespaceSymbol, o as AttributeOut, ot as OneOfArgType, p as BlockSymbol, pt as ParsedTypedValue, q as IntArgType, qt as memberEntries, r as ArgTypeKind, rt as NullArgType, s as AttributeSpec, st as OptionalArgType, t as AnyArgType, tt as NamedTypeSymbol, u as BinderContext, ut as Param, v as ConstantSymbol, vt as ReferencedFieldRefArgType, w as ContributedTypeScope, wt as ResolvedEntityReference, x as ContributedNamespaceSymbol, xt as Resolution, y as ContextForRequirement, yt as RejectingArgType, z as FixedNumArgType, zt as contributedTypeAt } from "./binder-BszqDG1t-icu83_4f.mjs";
|
|
13
13
|
//#region ../../../1-framework/2-authoring/psl-parser/dist/index.d.mts
|
|
14
14
|
//#region src/attribute-helpers.d.ts
|
|
15
15
|
declare function getPositionalArgument(attribute: PslAttribute, index?: number): string | undefined;
|
|
@@ -52,7 +52,7 @@ declare const EMPTY_DATA_TYPES: DataTypeSupport;
|
|
|
52
52
|
interface FieldAttributeSpecContext extends AttributeSpecContext {
|
|
53
53
|
readonly field: FieldSymbol;
|
|
54
54
|
readonly typeResolution: Resolution | undefined;
|
|
55
|
-
/** The type constructor
|
|
55
|
+
/** The type constructor the field's type resolves to, through a named type when it is declared with one. */
|
|
56
56
|
readonly typeConstructor: ContributedTypeSymbol | undefined;
|
|
57
57
|
}
|
|
58
58
|
/** The declaration an attribute that reads its type is written on: a field, or a type alias whose fields take the attribute. */
|
|
@@ -70,7 +70,7 @@ interface TypeAttributeSpecContext extends Omit<AttributeSpecContext, 'model'> {
|
|
|
70
70
|
/** The type as written, such as an enum's name. */
|
|
71
71
|
readonly typeName: string;
|
|
72
72
|
readonly typeResolution: Resolution | undefined;
|
|
73
|
-
/** The type constructor
|
|
73
|
+
/** The type constructor the type resolves to, through a named type when it is declared with one. */
|
|
74
74
|
readonly typeConstructor: ContributedTypeSymbol | undefined;
|
|
75
75
|
}
|
|
76
76
|
declare function typeAttributeSpecContextOfField(ctx: FieldAttributeSpecContext): TypeAttributeSpecContext;
|
|
@@ -421,7 +421,7 @@ interface TypeAlias {
|
|
|
421
421
|
readonly attributes: readonly ResolvedAttribute<FieldAttributeAst>[];
|
|
422
422
|
}
|
|
423
423
|
/**
|
|
424
|
-
* Reads each `types {}` declaration as a type alias. A base must be a type constructor or a block; another alias
|
|
424
|
+
* Reads each `types {}` declaration as a type alias. A base must be a type constructor or a block; another alias or anything else is refused, as is an alias with no base. Of the attributes, those the family accepts are kept and every other one is refused and dropped, keeping the alias, so its fields are not refused for it too.
|
|
425
425
|
*/
|
|
426
426
|
declare function resolveTypeAliases(input: {
|
|
427
427
|
readonly declarations: readonly NamedTypeSymbol[];
|
|
@@ -483,5 +483,5 @@ type WrittenScalarResult = {
|
|
|
483
483
|
/** Reads a PSL literal expression as a `WrittenScalar`, for a position that takes a value of a data type. ADR 254. */
|
|
484
484
|
declare function readWrittenScalar(expression: ExpressionAst): WrittenScalarResult;
|
|
485
485
|
//#endregion
|
|
486
|
-
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 ContributedTypeAlias, type ContributedTypeDescriptor, type ContributedTypeNamespace, type ContributedTypeScope, type ContributedTypeSymbol, type CreateBinderInput, type DataTypeValueArgType, type DataTypeValueOptions, type DataTypeValueRefusal, 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 FixedNumArgType, type FuncCallSig, type FunctionSymbol, type IdentifierArgType, type InferAttr, type InferBlock, type InspectableArgType, type IntArgType, type InterpretExtensionBlockAttributesInput, type InterpretExtensionBlockInput, type InterpretExtensionBlocksResult, type JsonValueArgType, type ListOptions, type MapBlockSpec, type MixinSymbol, type ModelAttributeCtx, type ModelAttributeSpecFactory, type ModelSymbol, NAME_THE_PSL_SOURCE_LOSES, type NamedOut, type NamedTypeSymbol, type NamespaceSymbol, type NullArgType, type NumLiteral, type OneOfArgType, 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_ALIAS_ATTRIBUTE_NAMES, type TaggedLiteralArgType, type TypeAlias, type TypeAliasBase, type TypeAttributeSpecContext, type TypeAttributeSubject, type TypedFuncCall, type UnresolvedTypeReference, type UnrestrictedIdentifierArgType, type UnrestrictedNumArgType, type UnsupportedAttribute, type WrittenScalarResult, assembleAttributeSpecs, blockAttribute, blockSpecContext, blockSpecFactoryOf, bool, buildSymbolTable, contributedTypeAliasOf, contributedTypeCodecId, contributedTypeOf, createBinder, createPslDiagnosticCollector, dataTypeValue, diagnosticFromSpan, diagnosticSource, entityRef, entityReference, enumMemberValue, fieldAttribute, fieldRef, findBlockDescriptor, flatPslModels, funcCall, generatorAttributeSpec, generatorFunctionCall, getPositionalArgument, groupedTypeLabel, identifier, int, interpretArgs, interpretAttribute, interpretExtensionBlock, interpretExtensionBlockAttributes, interpretExtensionBlocks, isNamespaceLike, isPrismaNextSchema, isPslIdentifier, json, jsonValue, keywordPslSpan, leafDiagnostic, list, mapArg, mapBlock, mapPslDiagnostics, matchesSelector, memberEntries, modelAttribute, namespacePslExtensionBlocks, nodePslSpan, nodeSourceText, num, numLiteral, oneOf, optional, parseQuotedStringLiteral, readExpressionAs, readResolvedAttribute, readResolvedAttributes, readResolvedConstructorCall, readWrittenScalar, record, referencedFieldRef, refineArg, refuseRepeatedTypeAliasAttributes, renameLegacyDirective, resolveTypeAliases, str, structBlock, taggedLiteral, typeAliasAttributeNames, typeAliasOfField, typeAliasSpecContext, typeAttribute, typeAttributeSpecContextOfField, typeAttributeSubjectLabel, typeGeneratorAttributeSpec, typeReferenceNode, writtenList, writtenScalar };
|
|
486
|
+
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 ContributedTypeAlias, type ContributedTypeDescriptor, type ContributedTypeNamespace, type ContributedTypeScope, type ContributedTypeSymbol, type CreateBinderInput, type DataTypeValueArgType, type DataTypeValueOptions, type DataTypeValueRefusal, 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 FixedNumArgType, type FuncCallSig, type FunctionSymbol, type IdentifierArgType, type InferAttr, type InferBlock, type InspectableArgType, type IntArgType, type InterpretExtensionBlockAttributesInput, type InterpretExtensionBlockInput, type InterpretExtensionBlocksResult, type JsonValueArgType, type ListOptions, type MapBlockSpec, type MixinSymbol, type ModelAttributeCtx, type ModelAttributeSpecFactory, type ModelSymbol, NAME_THE_PSL_SOURCE_LOSES, type NamedOut, type NamedTypeSymbol, type NamespaceSymbol, type NullArgType, type NumLiteral, type OneOfArgType, 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_ALIAS_ATTRIBUTE_NAMES, type TaggedLiteralArgType, type TypeAlias, type TypeAliasBase, type TypeAttributeSpecContext, type TypeAttributeSubject, type TypedFuncCall, type UnresolvedTypeReference, type UnrestrictedIdentifierArgType, type UnrestrictedNumArgType, type UnsupportedAttribute, type WrittenScalarResult, assembleAttributeSpecs, blockAttribute, blockSpecContext, blockSpecFactoryOf, bool, buildSymbolTable, contributedTypeAliasOf, contributedTypeAt, contributedTypeCodecId, contributedTypeOf, createBinder, createPslDiagnosticCollector, dataTypeValue, diagnosticFromSpan, diagnosticSource, entityRef, entityReference, enumMemberValue, fieldAttribute, fieldRef, findBlockDescriptor, flatPslModels, funcCall, generatorAttributeSpec, generatorFunctionCall, getPositionalArgument, groupedTypeLabel, identifier, int, interpretArgs, interpretAttribute, interpretExtensionBlock, interpretExtensionBlockAttributes, interpretExtensionBlocks, isNamespaceLike, isPrismaNextSchema, isPslIdentifier, json, jsonValue, keywordPslSpan, leafDiagnostic, list, mapArg, mapBlock, mapPslDiagnostics, matchesSelector, memberEntries, modelAttribute, namespacePslExtensionBlocks, nodePslSpan, nodeSourceText, num, numLiteral, oneOf, optional, parseQuotedStringLiteral, readExpressionAs, readResolvedAttribute, readResolvedAttributes, readResolvedConstructorCall, readWrittenScalar, record, referencedFieldRef, refineArg, refuseRepeatedTypeAliasAttributes, renameLegacyDirective, resolveTypeAliases, str, structBlock, taggedLiteral, typeAliasAttributeNames, typeAliasOfField, typeAliasSpecContext, typeAttribute, typeAttributeSpecContextOfField, typeAttributeSubjectLabel, typeGeneratorAttributeSpec, typeReferenceNode, writtenList, writtenScalar };
|
|
487
487
|
//# sourceMappingURL=psl-parser.d.mts.map
|
package/dist/psl-parser.mjs
CHANGED
|
@@ -2,15 +2,15 @@ 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 { c as createDataTypeLookup } from "./data-type-V6mcDhcG-DVQAPOQT.mjs";
|
|
5
|
-
import {
|
|
5
|
+
import { T as isAuthoringPslBlockDescriptor, h as describeTaggedLiteralFailure, w as isAuthoringModelAttributeDescriptor, y as instantiateAuthoringTypeAlias } from "./temporal-type-aliases-D98ei6Fj-DEtfAQYL.mjs";
|
|
6
6
|
import { r as UNBOUND_NAMESPACE_ID } from "./namespace-VUH2dgnS-By5y75h9.mjs";
|
|
7
|
-
import {
|
|
7
|
+
import { n as admittedTags, s as describeAdmittedForms, v as findAuthoringTypeConstructorCall, w as tagForm } from "./authoring-CuGQP7_1.mjs";
|
|
8
8
|
import { a as flatPslModels, c as namespacePslExtensionBlocks, n as UNBOUND_PSL_NAMESPACE_NAME } from "./psl-ast-CyvE6CR-.mjs";
|
|
9
9
|
import { n as isPslIdentifier } from "./tokenizer-C-GTKKjR-B1vOzJy0.mjs";
|
|
10
|
-
import { C as printSyntax, a as IdentifierAst, c as ObjectLiteralExprAst, d as StringLiteralExprAst, i as FunctionCallAst, l as PathExprAst, m as TaggedLiteralExprAst, o as NumberLiteralExprAst, r as BooleanLiteralExprAst, t as ArrayLiteralAst } from "./expressions-CMQzbnHk-
|
|
11
|
-
import { a as
|
|
12
|
-
import { a as FieldDeclarationAst, c as MixinDeclarationAst, d as ModelDeclarationAst, g as isTrivia, h as TypesBlockAst, n as CompositeTypeDeclarationAst, o as GenericBlockDeclarationAst, p as NamespaceDeclarationAst, s as KeyValuePairAst, u as ModelAttributeAst } from "./declarations-BgUAq1RG-
|
|
13
|
-
//#region ../../../1-framework/2-authoring/psl-parser/dist/binder-
|
|
10
|
+
import { C as printSyntax, a as IdentifierAst, c as ObjectLiteralExprAst, d as StringLiteralExprAst, i as FunctionCallAst, l as PathExprAst, m as TaggedLiteralExprAst, o as NumberLiteralExprAst, r as BooleanLiteralExprAst, t as ArrayLiteralAst } from "./expressions-CMQzbnHk-FYhlr1aG.mjs";
|
|
11
|
+
import { a as contributedTypeCodecId, c as diagnosticFromSpan, d as mapPslDiagnostics, f as nodePslSpan, g as readWrittenScalar, h as readResolvedConstructorCall, i as contributedTypeAt, l as diagnosticSource, m as readResolvedAttributes, n as readExpressionAs, o as contributedTypeScope, p as readResolvedAttribute, s as createPslDiagnosticCollector, t as isBareTypeConstructor, u as keywordPslSpan } from "./type-constructor-calls-CNd1Xlw2-DjyX5mKn.mjs";
|
|
12
|
+
import { a as FieldDeclarationAst, c as MixinDeclarationAst, d as ModelDeclarationAst, g as isTrivia, h as TypesBlockAst, n as CompositeTypeDeclarationAst, o as GenericBlockDeclarationAst, p as NamespaceDeclarationAst, s as KeyValuePairAst, u as ModelAttributeAst } from "./declarations-BgUAq1RG-DPNkVezv.mjs";
|
|
13
|
+
//#region ../../../1-framework/2-authoring/psl-parser/dist/binder-BvVe33ov.mjs
|
|
14
14
|
function* modelAttributeDescriptors(namespace) {
|
|
15
15
|
for (const value of Object.values(namespace)) {
|
|
16
16
|
if (isAuthoringModelAttributeDescriptor(value)) {
|
|
@@ -92,50 +92,6 @@ function describeResolution(resolution) {
|
|
|
92
92
|
default: return resolution.kind;
|
|
93
93
|
}
|
|
94
94
|
}
|
|
95
|
-
function isContributedTypeDescriptor(value) {
|
|
96
|
-
return "kind" in value && (value.kind === "typeConstructor" || value.kind === "typeAlias" || value.kind === "fieldPreset");
|
|
97
|
-
}
|
|
98
|
-
/** The codec a column typed by `descriptor` is stored with. */
|
|
99
|
-
function contributedTypeCodecId(descriptor) {
|
|
100
|
-
return descriptor.kind === "typeAlias" ? descriptor.output.type.codecId : descriptor.output.codecId;
|
|
101
|
-
}
|
|
102
|
-
function mergeContributedTypes(...namespaces) {
|
|
103
|
-
const merged = {};
|
|
104
|
-
for (const namespace of namespaces) for (const [name, value] of Object.entries(namespace)) {
|
|
105
|
-
const existing = Object.hasOwn(merged, name) ? merged[name] : void 0;
|
|
106
|
-
merged[name] = existing !== void 0 && !isContributedTypeDescriptor(existing) && !isContributedTypeDescriptor(value) ? mergeContributedTypes(existing, value) : value;
|
|
107
|
-
}
|
|
108
|
-
return merged;
|
|
109
|
-
}
|
|
110
|
-
function contributedTypeScope(contributedTypes) {
|
|
111
|
-
const members = collect(contributedTypes, []);
|
|
112
|
-
return {
|
|
113
|
-
lookup(name) {
|
|
114
|
-
return members.get(name);
|
|
115
|
-
},
|
|
116
|
-
entries() {
|
|
117
|
-
return members.entries();
|
|
118
|
-
}
|
|
119
|
-
};
|
|
120
|
-
}
|
|
121
|
-
function collect(namespace, prefix) {
|
|
122
|
-
const members = /* @__PURE__ */ new Map();
|
|
123
|
-
for (const [name, value] of Object.entries(namespace)) {
|
|
124
|
-
const path = [...prefix, name];
|
|
125
|
-
members.set(name, isContributedTypeDescriptor(value) ? {
|
|
126
|
-
kind: "contributedType",
|
|
127
|
-
name,
|
|
128
|
-
path,
|
|
129
|
-
descriptor: value
|
|
130
|
-
} : {
|
|
131
|
-
kind: "contributedNamespace",
|
|
132
|
-
name,
|
|
133
|
-
path,
|
|
134
|
-
members: collect(value, path)
|
|
135
|
-
});
|
|
136
|
-
}
|
|
137
|
-
return members;
|
|
138
|
-
}
|
|
139
95
|
function blockSpecFactoryOf(descriptor) {
|
|
140
96
|
return blindCast(descriptor.spec);
|
|
141
97
|
}
|
|
@@ -764,7 +720,7 @@ function createBinder(input) {
|
|
|
764
720
|
return bind({
|
|
765
721
|
sources,
|
|
766
722
|
symbolTable,
|
|
767
|
-
contributedTypes:
|
|
723
|
+
contributedTypes: contributions.type,
|
|
768
724
|
attributeSpecs: assembleAttributeSpecs(contributions),
|
|
769
725
|
pslBlockDescriptors: contributions.pslBlockDescriptors,
|
|
770
726
|
defaultFunctionRegistry: context.controlMutationDefaults.defaultFunctionRegistry,
|
|
@@ -866,10 +822,12 @@ function bind(options) {
|
|
|
866
822
|
const node = typeReferenceNode(field);
|
|
867
823
|
if (node === void 0) continue;
|
|
868
824
|
const name = field.node.typeAnnotation()?.name();
|
|
869
|
-
const
|
|
825
|
+
const scope = stack.current();
|
|
826
|
+
const outcome = resolveTypeReference(name, scope, references, (written) => describeUnresolvedType?.({
|
|
870
827
|
field,
|
|
871
828
|
owner: entity,
|
|
872
|
-
written
|
|
829
|
+
written,
|
|
830
|
+
isDeclared: (declaredName) => declaredInSchema(scope, declaredName)
|
|
873
831
|
}));
|
|
874
832
|
if (outcome === void 0) continue;
|
|
875
833
|
references.set(node, outcome.resolution);
|
|
@@ -1426,6 +1384,10 @@ function bindQualifier(qualifier, scope, references) {
|
|
|
1426
1384
|
if (resolution !== void 0 && isNamespaceLike(resolution)) references.set(qualifier.syntax, resolution);
|
|
1427
1385
|
return resolution;
|
|
1428
1386
|
}
|
|
1387
|
+
function declaredInSchema(scope, name) {
|
|
1388
|
+
const found = scope.lookup(name);
|
|
1389
|
+
return found !== void 0 && found.kind !== "contributedType" && found.kind !== "contributedNamespace";
|
|
1390
|
+
}
|
|
1429
1391
|
function resolveTypeReference(reference, scope, references, describeUnresolved) {
|
|
1430
1392
|
if (reference === void 0 || reference.isOverQualified()) return void 0;
|
|
1431
1393
|
if (reference.space() !== void 0) return { resolution: { kind: "crossSpace" } };
|
|
@@ -2625,7 +2587,7 @@ function fieldOnlyAttributeMessage(attribute, declaration) {
|
|
|
2625
2587
|
return attribute.name === "id" || attribute.name === "unique" ? `Type alias "${declaration.name}" cannot carry @${attribute.name}. @id and @unique belong to a model's field, not to its type; write them on the field.` : void 0;
|
|
2626
2588
|
}
|
|
2627
2589
|
/**
|
|
2628
|
-
* Reads each `types {}` declaration as a type alias. A base must be a type constructor or a block; another alias
|
|
2590
|
+
* Reads each `types {}` declaration as a type alias. A base must be a type constructor or a block; another alias or anything else is refused, as is an alias with no base. Of the attributes, those the family accepts are kept and every other one is refused and dropped, keeping the alias, so its fields are not refused for it too.
|
|
2629
2591
|
*/
|
|
2630
2592
|
function resolveTypeAliases(input) {
|
|
2631
2593
|
const aliases = /* @__PURE__ */ new Map();
|
|
@@ -2729,6 +2691,6 @@ function refuseRepeatedTypeAliasAttributes(input) {
|
|
|
2729
2691
|
return repeated.length > 0;
|
|
2730
2692
|
}
|
|
2731
2693
|
//#endregion
|
|
2732
|
-
export { EMPTY_DATA_TYPES, NAME_THE_PSL_SOURCE_LOSES, PSL_UNRESOLVED_REFERENCE, TYPE_ALIAS_ATTRIBUTE_NAMES, assembleAttributeSpecs, blockAttribute, blockSpecContext, blockSpecFactoryOf, bool, buildSymbolTable, contributedTypeAliasOf, contributedTypeCodecId, contributedTypeOf, createBinder, createPslDiagnosticCollector, dataTypeValue, diagnosticFromSpan, diagnosticSource, entityRef, entityReference, enumMemberValue, fieldAttribute, fieldRef, findBlockDescriptor, flatPslModels, funcCall, generatorAttributeSpec, generatorFunctionCall, getPositionalArgument, groupedTypeLabel, identifier, int, interpretArgs, interpretAttribute, interpretExtensionBlock, interpretExtensionBlockAttributes, interpretExtensionBlocks, isNamespaceLike, isPrismaNextSchema, isPslIdentifier, json, jsonValue, keywordPslSpan, leafDiagnostic, list, mapArg, mapBlock, mapPslDiagnostics, matchesSelector, memberEntries, modelAttribute, namespacePslExtensionBlocks, nodePslSpan, nodeSourceText, num, numLiteral, oneOf, optional, parseQuotedStringLiteral, readExpressionAs, readResolvedAttribute, readResolvedAttributes, readResolvedConstructorCall, readWrittenScalar, record, referencedFieldRef, refineArg, refuseRepeatedTypeAliasAttributes, renameLegacyDirective, resolveTypeAliases, str, structBlock, taggedLiteral, typeAliasAttributeNames, typeAliasOfField, typeAliasSpecContext, typeAttribute, typeAttributeSpecContextOfField, typeAttributeSubjectLabel, typeGeneratorAttributeSpec, typeReferenceNode, writtenList, writtenScalar };
|
|
2694
|
+
export { EMPTY_DATA_TYPES, NAME_THE_PSL_SOURCE_LOSES, PSL_UNRESOLVED_REFERENCE, TYPE_ALIAS_ATTRIBUTE_NAMES, assembleAttributeSpecs, blockAttribute, blockSpecContext, blockSpecFactoryOf, bool, buildSymbolTable, contributedTypeAliasOf, contributedTypeAt, contributedTypeCodecId, contributedTypeOf, createBinder, createPslDiagnosticCollector, dataTypeValue, diagnosticFromSpan, diagnosticSource, entityRef, entityReference, enumMemberValue, fieldAttribute, fieldRef, findBlockDescriptor, flatPslModels, funcCall, generatorAttributeSpec, generatorFunctionCall, getPositionalArgument, groupedTypeLabel, identifier, int, interpretArgs, interpretAttribute, interpretExtensionBlock, interpretExtensionBlockAttributes, interpretExtensionBlocks, isNamespaceLike, isPrismaNextSchema, isPslIdentifier, json, jsonValue, keywordPslSpan, leafDiagnostic, list, mapArg, mapBlock, mapPslDiagnostics, matchesSelector, memberEntries, modelAttribute, namespacePslExtensionBlocks, nodePslSpan, nodeSourceText, num, numLiteral, oneOf, optional, parseQuotedStringLiteral, readExpressionAs, readResolvedAttribute, readResolvedAttributes, readResolvedConstructorCall, readWrittenScalar, record, referencedFieldRef, refineArg, refuseRepeatedTypeAliasAttributes, renameLegacyDirective, resolveTypeAliases, str, structBlock, taggedLiteral, typeAliasAttributeNames, typeAliasOfField, typeAliasSpecContext, typeAttribute, typeAttributeSpecContextOfField, typeAttributeSubjectLabel, typeGeneratorAttributeSpec, typeReferenceNode, writtenList, writtenScalar };
|
|
2733
2695
|
|
|
2734
2696
|
//# sourceMappingURL=psl-parser.mjs.map
|