@prisma/orm-framework 0.17.0-dev.1 → 0.17.0-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-ljy8m56O.d.mts +1 -0
- package/dist/capabilities-D_lE1L0x-x4Dq0wCx.mjs +119 -0
- package/dist/capabilities-D_lE1L0x-x4Dq0wCx.mjs.map +1 -0
- package/dist/{codec-Cly9VPoA.mjs → codec-D6TctTla.mjs} +6 -21
- package/dist/codec-D6TctTla.mjs.map +1 -0
- package/dist/{codec-D3GVAkR_.d.mts → codec-LWTqo1GG.d.mts} +3 -7
- package/dist/{codec-D3GVAkR_.d.mts.map → codec-LWTqo1GG.d.mts.map} +1 -1
- package/dist/{codec-types-XJO6eC9U-B_K2q0zm.d.mts → codec-types-720XoDZ0-Br-QaYK3.d.mts} +5 -3
- package/dist/{codec-types-XJO6eC9U-B_K2q0zm.d.mts.map → codec-types-720XoDZ0-Br-QaYK3.d.mts.map} +1 -1
- package/dist/codec-types-DcNvNeY1-BO6kUiH0.mjs +30 -0
- package/dist/codec-types-DcNvNeY1-BO6kUiH0.mjs.map +1 -0
- package/dist/components-D7bixOE0.d.mts +50 -0
- package/dist/components-D7bixOE0.d.mts.map +1 -0
- package/dist/components-ifbUGzY-.mjs +88 -0
- package/dist/components-ifbUGzY-.mjs.map +1 -0
- package/dist/components.d.mts +16 -16
- package/dist/components.mjs +6 -4
- package/dist/components__authoring.d.mts +2 -2
- package/dist/components__codec.d.mts +2 -2
- package/dist/components__codec.mjs +2 -1
- package/dist/components__components.d.mts +4 -3
- package/dist/components__components.mjs +3 -2
- package/dist/components__control.d.mts +3 -3
- package/dist/components__control.mjs +1 -1
- package/dist/components__emission.d.mts +3 -3
- package/dist/components__execution.d.mts +1 -1
- package/dist/components__psl-ast.d.mts +3 -3
- package/dist/components__runtime.d.mts +1 -1
- package/dist/config-types-DzIlP4Ue.d.mts +1 -0
- package/dist/{config-types-W-87vhZ4-BgYaH8YO.d.mts → config-types-W-87vhZ4-xE_-BXZD.d.mts} +6 -6
- package/dist/{config-types-W-87vhZ4-BgYaH8YO.d.mts.map → config-types-W-87vhZ4-xE_-BXZD.d.mts.map} +1 -1
- package/dist/{config-validation-DXggMTZf.d.mts → config-validation-B9uJhjX7.d.mts} +2 -2
- package/dist/{config-validation-DXggMTZf.d.mts.map → config-validation-B9uJhjX7.d.mts.map} +1 -1
- package/dist/config.d.mts +3 -3
- package/dist/config__config-types.d.mts +2 -2
- package/dist/config__config-validation.d.mts +1 -1
- package/dist/contract-authoring.d.mts +3 -3
- package/dist/{control-DTouE89s.mjs → control-Clpi3725.mjs} +41 -2
- package/dist/control-Clpi3725.mjs.map +1 -0
- package/dist/{control-CBvTj7Ia.d.mts → control-DavL9i47.d.mts} +12 -8
- package/dist/{control-CBvTj7Ia.d.mts.map → control-DavL9i47.d.mts.map} +1 -1
- package/dist/dist-DFakQfiQ.mjs +252 -0
- package/dist/dist-DFakQfiQ.mjs.map +1 -0
- package/dist/emission-PUUc-DK4.d.mts +2 -0
- package/dist/{emission-types-hfRVB_Yw-DpQ3hISB.d.mts → emission-types-6jLF1pS8-BZlRi3Ma.d.mts} +9 -4
- package/dist/emission-types-6jLF1pS8-BZlRi3Ma.d.mts.map +1 -0
- package/dist/errors.d.mts +1 -1
- package/dist/errors__execution.d.mts +1 -1
- package/dist/{execution-MOde1lmD.d.mts → execution-4sAWQx8X.d.mts} +2 -2
- package/dist/{execution-MOde1lmD.d.mts.map → execution-4sAWQx8X.d.mts.map} +1 -1
- package/dist/{execution-Bo5Bu2Ys.d.mts → execution-BZIwXeq-.d.mts} +2 -2
- package/dist/{execution-Bo5Bu2Ys.d.mts.map → execution-BZIwXeq-.d.mts.map} +1 -1
- package/dist/{framework-authoring-7YMP9TwM-C9P-N6_a.d.mts → framework-authoring--R1ZGWs1-C5F11Vhx.d.mts} +3 -3
- package/dist/{framework-authoring-7YMP9TwM-C9P-N6_a.d.mts.map → framework-authoring--R1ZGWs1-C5F11Vhx.d.mts.map} +1 -1
- package/dist/{framework-components-MFoo0sYx-G_6k9jt4.d.mts → framework-components-BQ_fYHtC-Co52pfO-.d.mts} +9 -5
- package/dist/framework-components-BQ_fYHtC-Co52pfO-.d.mts.map +1 -0
- package/dist/ids.d.mts +1 -1
- package/dist/{index-GY2oGH9L.d.mts → index-CDk9yEbw.d.mts} +17 -2
- package/dist/{index-GY2oGH9L.d.mts.map → index-CDk9yEbw.d.mts.map} +1 -1
- package/dist/{parse-0ZJjj_2N-WZZ1nlrv.d.mts → parse-0ZJjj_2N-CGZMQABI.d.mts} +3 -3
- package/dist/{parse-0ZJjj_2N-WZZ1nlrv.d.mts.map → parse-0ZJjj_2N-CGZMQABI.d.mts.map} +1 -1
- package/dist/{psl-ast-Chgi8e4o-rSlBk1UV.d.mts → psl-ast-C4IAv2T_-CO0jh_VK.d.mts} +4 -4
- package/dist/{psl-ast-Chgi8e4o-rSlBk1UV.d.mts.map → psl-ast-C4IAv2T_-CO0jh_VK.d.mts.map} +1 -1
- package/dist/{psl-ast-BEwO80EH.d.mts → psl-ast-DAMpjVOP.d.mts} +4 -4
- package/dist/{psl-ast-BEwO80EH.d.mts.map → psl-ast-DAMpjVOP.d.mts.map} +1 -1
- package/dist/psl-parser.d.mts +8 -8
- package/dist/psl-parser__interpret.d.mts +4 -4
- package/dist/psl-parser__syntax.d.mts +1 -1
- package/dist/psl-printer.d.mts +6 -6
- package/dist/{runtime--RZXG1zP.d.mts → runtime-Cne6hBaG.d.mts} +2 -2
- package/dist/{runtime--RZXG1zP.d.mts.map → runtime-Cne6hBaG.d.mts.map} +1 -1
- package/dist/{symbol-table-CZ7EVCTL-oYQtrmzq.d.mts → symbol-table-CZ7EVCTL-CqkpG3a_.d.mts} +5 -5
- package/dist/{symbol-table-CZ7EVCTL-oYQtrmzq.d.mts.map → symbol-table-CZ7EVCTL-CqkpG3a_.d.mts.map} +1 -1
- package/dist/ts-render.d.mts +2 -2
- package/dist/ts-render.mjs +2 -240
- package/dist/types-import-spec-B4hKOPE9-BwQGG38j.d.mts +104 -0
- package/dist/types-import-spec-B4hKOPE9-BwQGG38j.d.mts.map +1 -0
- package/package.json +15 -15
- package/dist/authoring-Dd7p6pTS.d.mts +0 -1
- package/dist/capabilities-CPj7MfXO-GRkp0Q_D.mjs +0 -64
- package/dist/capabilities-CPj7MfXO-GRkp0Q_D.mjs.map +0 -1
- package/dist/codec-Cly9VPoA.mjs.map +0 -1
- package/dist/components-CawuxTia.d.mts +0 -1
- package/dist/config-types-zrHI32Om.d.mts +0 -1
- package/dist/control-DTouE89s.mjs.map +0 -1
- package/dist/emission-DeoQufVd.d.mts +0 -1
- package/dist/emission-types-hfRVB_Yw-DpQ3hISB.d.mts.map +0 -1
- package/dist/framework-components-MFoo0sYx-G_6k9jt4.d.mts.map +0 -1
- package/dist/ts-render.mjs.map +0 -1
- package/dist/types-import-spec-DRKzrJ20-WYwyCtil.d.mts +0 -14
- package/dist/types-import-spec-DRKzrJ20-WYwyCtil.d.mts.map +0 -1
package/dist/psl-parser.d.mts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { c as CodecLookup } from "./codec-types-
|
|
2
|
-
import { B as PslExtensionBlockParamList, F as PslDiagnosticCode, G as PslPosition, H as PslExtensionBlockParamRef, I as PslExtensionBlock, K as PslSpan, L as PslExtensionBlockAttribute, R as PslExtensionBlockAttributeArg, U as PslExtensionBlockParamScalarValue, V as PslExtensionBlockParamOption, W as PslExtensionBlockParamValue, b as AuthoringPslBlockDescriptorNamespace, y as AuthoringPslBlockDescriptor, z as PslExtensionBlockParamBare } from "./framework-authoring-
|
|
3
|
-
import "./authoring-
|
|
4
|
-
import "./codec-
|
|
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, p as PslDiagnostic, s as PslAttributePositionalArgument, u as PslDefaultFunctionValue, v as PslModel, w as PslTypeConstructorCall, x as PslNamespace, y as PslModelAttribute } from "./psl-ast-
|
|
1
|
+
import { c as CodecLookup } from "./codec-types-720XoDZ0-Br-QaYK3.mjs";
|
|
2
|
+
import { B as PslExtensionBlockParamList, F as PslDiagnosticCode, G as PslPosition, H as PslExtensionBlockParamRef, I as PslExtensionBlock, K as PslSpan, L as PslExtensionBlockAttribute, R as PslExtensionBlockAttributeArg, U as PslExtensionBlockParamScalarValue, V as PslExtensionBlockParamOption, W as PslExtensionBlockParamValue, b as AuthoringPslBlockDescriptorNamespace, y as AuthoringPslBlockDescriptor, z as PslExtensionBlockParamBare } from "./framework-authoring--R1ZGWs1-C5F11Vhx.mjs";
|
|
3
|
+
import "./authoring-ljy8m56O.mjs";
|
|
4
|
+
import "./codec-LWTqo1GG.mjs";
|
|
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, p as PslDiagnostic, s as PslAttributePositionalArgument, u as PslDefaultFunctionValue, v as PslModel, w as PslTypeConstructorCall, x as PslNamespace, y as PslModelAttribute } from "./psl-ast-C4IAv2T_-CO0jh_VK.mjs";
|
|
6
6
|
import { r as Result } from "./result-Bpupv5vO.mjs";
|
|
7
|
-
import "./psl-ast-
|
|
8
|
-
import { C as ModelAttributeAst, I as SourceFile, f as ExpressionAst, n as AstNode, p as FieldAttributeAst, r as AttributeArgAst } from "./parse-0ZJjj_2N-
|
|
9
|
-
import { _ as nodePslSpan, a as ModelSymbol, b as readResolvedAttributes, c as ResolvedAttribute, d as ResolvedTypeConstructorCall, f as SymbolTable, g as keywordPslSpan, h as buildSymbolTable, i as FieldSymbol, l as ResolvedAttributeArg, m as TopLevelScope, n as BuildSymbolTableOptions, o as NamedTypeSymbol, p as SymbolTableResult, r as CompositeTypeSymbol, s as NamespaceSymbol, t as BlockSymbol, u as ResolvedNamedTypeBinding, v as rangeToPslSpan, x as readResolvedConstructorCall, y as readResolvedAttribute } from "./symbol-table-CZ7EVCTL-
|
|
7
|
+
import "./psl-ast-DAMpjVOP.mjs";
|
|
8
|
+
import { C as ModelAttributeAst, I as SourceFile, f as ExpressionAst, n as AstNode, p as FieldAttributeAst, r as AttributeArgAst } from "./parse-0ZJjj_2N-CGZMQABI.mjs";
|
|
9
|
+
import { _ as nodePslSpan, a as ModelSymbol, b as readResolvedAttributes, c as ResolvedAttribute, d as ResolvedTypeConstructorCall, f as SymbolTable, g as keywordPslSpan, h as buildSymbolTable, i as FieldSymbol, l as ResolvedAttributeArg, m as TopLevelScope, n as BuildSymbolTableOptions, o as NamedTypeSymbol, p as SymbolTableResult, r as CompositeTypeSymbol, s as NamespaceSymbol, t as BlockSymbol, u as ResolvedNamedTypeBinding, v as rangeToPslSpan, x as readResolvedConstructorCall, y as readResolvedAttribute } from "./symbol-table-CZ7EVCTL-CqkpG3a_.mjs";
|
|
10
10
|
import { n as UnionToIntersection, t as Simplify } from "./types-DGxlljKG.mjs";
|
|
11
11
|
//#region ../../../1-framework/2-authoring/psl-parser/dist/index.d.mts
|
|
12
12
|
//#region src/attribute-helpers.d.ts
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { t as Contract } from "./contract-types-CkdMH7F7-9EHXSwbH.mjs";
|
|
2
2
|
import { r as Result } from "./result-Bpupv5vO.mjs";
|
|
3
|
-
import { c as ContractSourceProvider, m as PslContractSourceProvider, n as ContractSourceContext, o as ContractSourceDiagnostics, r as ContractSourceDiagnostic } from "./config-types-W-87vhZ4-
|
|
4
|
-
import "./config-types-
|
|
5
|
-
import { I as SourceFile, d as DocumentAst } from "./parse-0ZJjj_2N-
|
|
6
|
-
import { f as SymbolTable } from "./symbol-table-CZ7EVCTL-
|
|
3
|
+
import { c as ContractSourceProvider, m as PslContractSourceProvider, n as ContractSourceContext, o as ContractSourceDiagnostics, r as ContractSourceDiagnostic } from "./config-types-W-87vhZ4-xE_-BXZD.mjs";
|
|
4
|
+
import "./config-types-DzIlP4Ue.mjs";
|
|
5
|
+
import { I as SourceFile, d as DocumentAst } from "./parse-0ZJjj_2N-CGZMQABI.mjs";
|
|
6
|
+
import { f as SymbolTable } from "./symbol-table-CZ7EVCTL-CqkpG3a_.mjs";
|
|
7
7
|
//#region ../../../1-framework/2-authoring/psl-parser/dist/interpret.d.mts
|
|
8
8
|
//#region src/interpret.d.ts
|
|
9
9
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { n as TokenKind } from "./tokenizer-DcYI0Xrq-C-nNE9mE.mjs";
|
|
2
|
-
import { $ as parse, A as ObjectLiteralExprAst, B as SyntaxNode, C as ModelAttributeAst, D as NamespaceMemberAst, E as NamespaceDeclarationAst, F as Range, G as any, H as TokenAtOffset, I as SourceFile, J as filterChildren, K as castExpression, L as StringLiteralExprAst, M as ParseResult, N as Position, O as NumberLiteralExprAst, P as QualifiedNameAst, Q as greenToken, R as SyntaxElement, S as KeyValuePairAst, T as NamedTypeDeclarationAst, U as TypeAnnotationAst, V as SyntaxToken, W as TypesBlockAst, X as findFirstChild, Y as findChildToken, Z as greenNode, _ as GenericBlockMemberAst, a as AttributeAst, b as GreenToken, c as BracedBlock, d as DocumentAst, et as printSyntax, f as ExpressionAst, g as GenericBlockDeclarationAst, h as FunctionCallAst, i as AttributeArgListAst, j as ParseDiagnostic, k as ObjectFieldAst, l as CompositeTypeDeclarationAst, m as FieldDeclarationAst, n as AstNode, o as BlockMemberAst, p as FieldAttributeAst, q as createSyntaxTree, r as AttributeArgAst, s as BooleanLiteralExprAst, t as ArrayLiteralAst, u as DeclarationAst, v as GreenElement, w as ModelDeclarationAst, x as IdentifierAst, y as GreenNode, z as SyntaxKind } from "./parse-0ZJjj_2N-
|
|
2
|
+
import { $ as parse, A as ObjectLiteralExprAst, B as SyntaxNode, C as ModelAttributeAst, D as NamespaceMemberAst, E as NamespaceDeclarationAst, F as Range, G as any, H as TokenAtOffset, I as SourceFile, J as filterChildren, K as castExpression, L as StringLiteralExprAst, M as ParseResult, N as Position, O as NumberLiteralExprAst, P as QualifiedNameAst, Q as greenToken, R as SyntaxElement, S as KeyValuePairAst, T as NamedTypeDeclarationAst, U as TypeAnnotationAst, V as SyntaxToken, W as TypesBlockAst, X as findFirstChild, Y as findChildToken, Z as greenNode, _ as GenericBlockMemberAst, a as AttributeAst, b as GreenToken, c as BracedBlock, d as DocumentAst, et as printSyntax, f as ExpressionAst, g as GenericBlockDeclarationAst, h as FunctionCallAst, i as AttributeArgListAst, j as ParseDiagnostic, k as ObjectFieldAst, l as CompositeTypeDeclarationAst, m as FieldDeclarationAst, n as AstNode, o as BlockMemberAst, p as FieldAttributeAst, q as createSyntaxTree, r as AttributeArgAst, s as BooleanLiteralExprAst, t as ArrayLiteralAst, u as DeclarationAst, v as GreenElement, w as ModelDeclarationAst, x as IdentifierAst, y as GreenNode, z as SyntaxKind } from "./parse-0ZJjj_2N-CGZMQABI.mjs";
|
|
3
3
|
//#region ../../../1-framework/2-authoring/psl-parser/dist/syntax.d.mts
|
|
4
4
|
//#region src/syntax/green-builder.d.ts
|
|
5
5
|
declare class GreenNodeBuilder {
|
package/dist/psl-printer.d.mts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { c as CodecLookup } from "./codec-types-
|
|
2
|
-
import { b as AuthoringPslBlockDescriptorNamespace } from "./framework-authoring-
|
|
3
|
-
import "./authoring-
|
|
4
|
-
import "./codec-
|
|
5
|
-
import { m as PslDocumentAst } from "./psl-ast-
|
|
6
|
-
import "./psl-ast-
|
|
1
|
+
import { c as CodecLookup } from "./codec-types-720XoDZ0-Br-QaYK3.mjs";
|
|
2
|
+
import { b as AuthoringPslBlockDescriptorNamespace } from "./framework-authoring--R1ZGWs1-C5F11Vhx.mjs";
|
|
3
|
+
import "./authoring-ljy8m56O.mjs";
|
|
4
|
+
import "./codec-LWTqo1GG.mjs";
|
|
5
|
+
import { m as PslDocumentAst } from "./psl-ast-C4IAv2T_-CO0jh_VK.mjs";
|
|
6
|
+
import "./psl-ast-DAMpjVOP.mjs";
|
|
7
7
|
//#region ../../../1-framework/2-authoring/psl-printer/dist/index.d.mts
|
|
8
8
|
//#region src/print-psl.d.ts
|
|
9
9
|
type PslBlockDescriptorsNamespace = AuthoringPslBlockDescriptorNamespace;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { U as PlanMeta } from "./domain-envelope-D6Wn9AmZ-BqZKTT9U.mjs";
|
|
2
|
-
import { r as CodecCallContext } from "./codec-types-
|
|
2
|
+
import { r as CodecCallContext } from "./codec-types-720XoDZ0-Br-QaYK3.mjs";
|
|
3
3
|
//#region ../../../1-framework/1-core/framework-components/dist/runtime.d.mts
|
|
4
4
|
//#region src/annotations.d.ts
|
|
5
5
|
/**
|
|
@@ -898,4 +898,4 @@ interface LaneMetaBuilder<K extends OperationKind> extends MetaBuilder<K> {
|
|
|
898
898
|
declare function createMetaBuilder<K extends OperationKind>(kind: K, terminalName: string): LaneMetaBuilder<K>;
|
|
899
899
|
//#endregion
|
|
900
900
|
export { defineAnnotation as A, RuntimeMiddleware as C, checkAborted as D, assertAnnotationsApplicable as E, runtimeAborted as F, runtimeError as I, raceAgainstAbort as M, runBeforeExecuteChain as N, checkMiddlewareCompatibility as O, runWithMiddleware as P, RuntimeLog as S, ValidAnnotations as T, RuntimeCore as _, CrossFamilyMiddleware as a, RuntimeExecuteOptions as b, InterceptResult as c, OperationKind as d, ParamRefMutator as f, RuntimeAbortedPhase as g, ResultType as h, AsyncIterableResult as i, isRuntimeError as j, createMetaBuilder as k, LaneMetaBuilder as l, RUNTIME_ABORTED as m, AnnotationHandle as n, DefineAnnotationOptions as o, QueryPlan as p, AnnotationValue as r, ExecutionPlan as s, AfterExecuteResult as t, MetaBuilder as u, RuntimeCoreOptions as v, RuntimeMiddlewareContext as w, RuntimeExecutor as x, RuntimeErrorEnvelope as y };
|
|
901
|
-
//# sourceMappingURL=runtime
|
|
901
|
+
//# sourceMappingURL=runtime-Cne6hBaG.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runtime
|
|
1
|
+
{"version":3,"file":"runtime-Cne6hBaG.d.mts","names":[],"sources":["../../../../1-framework/1-core/framework-components/dist/runtime.d.mts"],"mappings":";;;;;;;;;;;;;;;;;;;;;KAoBK;;;;;;;;;;;;UAYK,gBAAgB,SAAS,cAAc;WACtC;WACA;WACA,OAAO;WACP,cAAc,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;UA2C3B,iBAAiB,SAAS,cAAc;GAC/C,OAAO,UAAU,gBAAgB,SAAS;WAClC;WACA,cAAc,YAAY;EACnC,KAAK;aACM;eACE,cAAc;;MAEvB;;;;;;;;;;;;;;;;;;;;;;;;UAwBI,wBAAwB,cAAc;WACrC;WACA,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAuCjB,iBAAiB,mBAAmB,cAAc,eAAe,SAAS,wBAAwB,WAAW,iBAAiB,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAsDnJ,iBAAiB,UAAU,eAAe,oBAAoB,yBAAyB,gCAAgC,WAAW,KAAK,GAAG,WAAW,sBAAsB,SAAS,SAAS,UAAU,QAAQ,gBAAgB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;iBAwBtN,4BAA4B,sBAAsB,yBAAyB,kBAAkB,MAAM,eAAe;;;cAGrH,oBAAoB,gBAAgB,cAAc,MAAM,YAAY;mBAC/D;UACT;UACA;UACA;EACR,YAAY,WAAW,eAAe;GACrC,OAAO,kBAAkB,cAAc;EACxC,WAAW,QAAQ;EACnB,SAAS,QAAQ;EACjB,gBAAgB,QAAQ;EACxB,KAAK,WAAW,OAAO,kBAAkB,gBAAgB,OAAO,UAAU,WAAW,YAAY,+BAA+B,eAAe,oBAAoB,WAAW,YAAY,gCAAgC,YAAY,WAAW;;;;;;;;;;;;;;;;UAgBzO,UAAU;WACT,MAAM;;;;;WAKN,OAAO;;;;;;;;;;;UAWR,cAAc,uBAAuB,UAAU;;;;;;;;;;;;;;;KAepD,WAAW,0BAA0B,IAAI;WACnC,aAAa;IACpB;;;UAGM;EACR,KAAK;EACL,KAAK;EACL,MAAM;EACN,OAAO;;;;;;;;;;;;;;;;;;;;;UAqBC;WACC;WACA;WACA;WACA,KAAK;;;;;;;;;;;;;;;;;;EAkBd,YAAY,MAAM,gBAAgB;;;;;;;WAOzB,SAAS;;;;;;;;;;;;;;;;;;;;;WAqBT;;;;;;;;;;;WAWA;;UAED;WACC;WACA;WACA;;;;;;;;;;;;;WAaA;;;;;;;;;;;;;;;;;;;;;;;UAuBD;WACC,MAAM,cAAc,2BAA2B,SAAS;;;;;;;;;;;;;cAarD;KACT;YACO;;;;;;;;;;;;;;;;UAgBF,kBAAkB,cAAc,YAAY,WAAW,iBAAiB,kBAAkB;WACzF;WACA;WACA;;;;;;;;;;;;;;;;;;;;;;;EAuBT,WAAW,MAAM,OAAO,KAAK,2BAA2B,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;EA2BhE,eAAe,MAAM,OAAO,KAAK,0BAA0B,SAAS,kBAAkB;EACtF,OAAO,KAAK,yBAAyB,MAAM,OAAO,KAAK,2BAA2B;EAClF,cAAc,MAAM,OAAO,QAAQ,oBAAoB,KAAK,2BAA2B;;;;;;;;;;;;;;;;;;;;;;;KAuBpF,sBAAsB,cAAc,YAAY,aAAa,kBAAkB;WACzE;WACA;;;;;;;;;;;UAWD;WACC,SAAS;WACT;;;;;;;;;;UAUD,gBAAgB,cAAc;EACtC,QAAQ,KAAK,MAAM;aACR,OAAO;KACf,UAAU,wBAAwB,oBAAoB;EACzD,SAAS;;iBAEM,6BAA6B,YAAY,mBAAmB,yBAAyB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAoDrF,sBAAsB,cAAc,eAAe,iBAAiB,kBAAkB,iBAAiB,MAAM,OAAO,YAAY,cAAc,kBAAkB,OAAO,YAAY,KAAK,0BAA0B,gBAAgB,WAAW;;;UAGpP,6BAA6B;WAC5B;WACA;WACA;WACA,UAAU;;;;;;;;iBAQJ,eAAe,iBAAiB,SAAS;iBACzC,aAAa,cAAc,iBAAiB,UAAU,0BAA0B;;;;;;;;;;;;;;;;;cAiBnF;;KAET;;;;;;;;;;iBAUY,eAAe,OAAO,qBAAqB,kBAAkB;;;;;;;;;;;iBAW7D,aAAa;WACnB,SAAS;GACjB,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAiCO,iBAAiB,GAAG,MAAM,QAAQ,IAAI,QAAQ,yBAAyB,OAAO,sBAAsB,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBA8C5G,kBAAkB,cAAc,eAAe,KAAK,MAAM,OAAO,YAAY,cAAc,kBAAkB,SAAS,KAAK,0BAA0B,iBAAiB,cAAc,OAAO,oBAAoB;;;;;;;;;;UAUtN,mBAAmB,oBAAoB,kBAAkB;WACxD,YAAY,cAAc;WAC1B,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;uBAkCO,YAAY,cAAc,WAAW,cAAc,eAAe,oBAAoB,kBAAkB,mBAAmB,gBAAgB;qBAC7I,YAAY,cAAc;qBAC1B,KAAK;EACxB,YAAY,SAAS,mBAAmB;;;;;;YAM9B,iBAAiB,MAAM,QAAQ,QAAQ,QAAQ;;;;;;;;;;;;;;qBActC,MAAM,MAAM,OAAO,KAAK,mBAAmB,QAAQ,QAAQ;;;;;;;;;;;qBAW3D,UAAU,MAAM,QAAQ,cAAc;WAChD,SAAS;EAClB,QAAQ,KAAK,MAAM;aACR,OAAO;KACf,UAAU,wBAAwB,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;UAkCjD,YAAY,UAAU;EAC9B,SAAS,GAAG,cAAc,eAAe,YAAY,UAAU,QAAQ,gBAAgB,GAAG;;;;;;;;;;;;UAYlF,gBAAgB,UAAU,uBAAuB,YAAY;WAC5D,aAAa,oBAAoB,yBAAyB;;;;;;;;;;;iBAWpD,kBAAkB,UAAU,eAAe,MAAM,GAAG,uBAAuB,gBAAgB"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { I as PslExtensionBlock, K as PslSpan, b as AuthoringPslBlockDescriptorNamespace } from "./framework-authoring-
|
|
2
|
-
import "./authoring-
|
|
3
|
-
import "./psl-ast-
|
|
4
|
-
import { B as SyntaxNode, C as ModelAttributeAst, E as NamespaceDeclarationAst, F as Range, I as SourceFile, T as NamedTypeDeclarationAst, U as TypeAnnotationAst, d as DocumentAst, f as ExpressionAst, g as GenericBlockDeclarationAst, j as ParseDiagnostic, l as CompositeTypeDeclarationAst, m as FieldDeclarationAst, p as FieldAttributeAst, w as ModelDeclarationAst } from "./parse-0ZJjj_2N-
|
|
1
|
+
import { I as PslExtensionBlock, K as PslSpan, b as AuthoringPslBlockDescriptorNamespace } from "./framework-authoring--R1ZGWs1-C5F11Vhx.mjs";
|
|
2
|
+
import "./authoring-ljy8m56O.mjs";
|
|
3
|
+
import "./psl-ast-DAMpjVOP.mjs";
|
|
4
|
+
import { B as SyntaxNode, C as ModelAttributeAst, E as NamespaceDeclarationAst, F as Range, I as SourceFile, T as NamedTypeDeclarationAst, U as TypeAnnotationAst, d as DocumentAst, f as ExpressionAst, g as GenericBlockDeclarationAst, j as ParseDiagnostic, l as CompositeTypeDeclarationAst, m as FieldDeclarationAst, p as FieldAttributeAst, w as ModelDeclarationAst } from "./parse-0ZJjj_2N-CGZMQABI.mjs";
|
|
5
5
|
//#region ../../../1-framework/2-authoring/psl-parser/dist/symbol-table-CZ7EVCTL.d.mts
|
|
6
6
|
//#region src/resolve.d.ts
|
|
7
7
|
interface ResolvedAttributeArg {
|
|
@@ -122,4 +122,4 @@ interface SymbolTableResult {
|
|
|
122
122
|
declare function buildSymbolTable(options: BuildSymbolTableOptions): SymbolTableResult;
|
|
123
123
|
//#endregion
|
|
124
124
|
export { nodePslSpan as _, ModelSymbol as a, readResolvedAttributes 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, rangeToPslSpan as v, readResolvedConstructorCall as x, readResolvedAttribute as y };
|
|
125
|
-
//# sourceMappingURL=symbol-table-CZ7EVCTL-
|
|
125
|
+
//# sourceMappingURL=symbol-table-CZ7EVCTL-CqkpG3a_.d.mts.map
|
package/dist/{symbol-table-CZ7EVCTL-oYQtrmzq.d.mts.map → symbol-table-CZ7EVCTL-CqkpG3a_.d.mts.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"symbol-table-CZ7EVCTL-
|
|
1
|
+
{"version":3,"file":"symbol-table-CZ7EVCTL-CqkpG3a_.d.mts","names":[],"sources":["../../../../1-framework/2-authoring/psl-parser/dist/symbol-table-CZ7EVCTL.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,YAAY,aAAa;iBACjG,uBAAuB,YAAY,SAAS,oBAAoB,oBAAoB,YAAY,sBAAsB;iBACtH,4BAA4B,YAAY,+BAA+B,YAAY,aAAa;iBAChG,YAAY,MAAM,YAAY,YAAY,aAAa;;iBAEvD,eAAe,MAAM,YAAY,iBAAiB,YAAY,aAAa;iBAC3E,eAAe,OAAO,OAAO,YAAY,aAAa;;;UAG7D;WACC,UAAU;;UAEX;WACC,YAAY,eAAe;WAC3B,YAAY,eAAe;WAC3B,QAAQ,eAAe;WACvB,QAAQ,eAAe;WACvB,gBAAgB,eAAe;;UAEhC;WACC;WACA;WACA,MAAM;WACN,MAAM;WACN,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,UAAU;WACV,YAAY;WACZ,qBAAqB;;UAEtB;WACC,OAAO;WACP,sBAAsB;;;;;;iBAMhB,iBAAiB,SAAS,0BAA0B"}
|
package/dist/ts-render.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as jsonToTsSource, i as TsExpression, n as JsonObject, o as renderImports, r as JsonValue, t as ImportRequirement } from "./index-
|
|
2
|
-
export { type ImportRequirement, type JsonObject, type JsonValue, TsExpression, jsonToTsSource, renderImports };
|
|
1
|
+
import { a as jsonToTsSource, i as TsExpression, n as JsonObject, o as renderImports, r as JsonValue, s as tsStringLiteral, t as ImportRequirement } from "./index-CDk9yEbw.mjs";
|
|
2
|
+
export { type ImportRequirement, type JsonObject, type JsonValue, TsExpression, jsonToTsSource, renderImports, tsStringLiteral };
|
package/dist/ts-render.mjs
CHANGED
|
@@ -1,240 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
//#region ../../../1-framework/1-core/ts-render/dist/index.mjs
|
|
4
|
-
/**
|
|
5
|
-
* Pure JSON-to-TypeScript-source printer.
|
|
6
|
-
*
|
|
7
|
-
* This module is the second stage of the codec → TS pipeline:
|
|
8
|
-
*
|
|
9
|
-
* jsValue → codec.encodeJson → JsonValue → jsonToTsSource → TS source text
|
|
10
|
-
*
|
|
11
|
-
* Stage 1 (`codec.encodeJson`) is a codec responsibility — date serialization,
|
|
12
|
-
* opaque domain types (vector, bigint, uuid), JSON canonicalization. Stage 2
|
|
13
|
-
* (this module) is a pure JSON-to-TS printer that must never grow type-specific
|
|
14
|
-
* branches.
|
|
15
|
-
*
|
|
16
|
-
* To render a non-JSON JS value (Date, Vector, BigInt, Buffer, …), encode it
|
|
17
|
-
* through the relevant codec's `encodeJson` first. Adding special cases to
|
|
18
|
-
* this file is not the answer — that's what codecs are for.
|
|
19
|
-
*/
|
|
20
|
-
/**
|
|
21
|
-
* Render a JSON-compatible value as a TypeScript source-text literal.
|
|
22
|
-
*
|
|
23
|
-
* Accepts `unknown` for ergonomics with structural types (e.g. `ColumnSpec`,
|
|
24
|
-
* `ForeignKeySpec`) whose fields are all JSON-compatible but whose interfaces
|
|
25
|
-
* lack the index signature TypeScript requires for `JsonObject` assignability.
|
|
26
|
-
* Non-JSON values (Date, Symbol, Function, etc.) throw at runtime.
|
|
27
|
-
*/
|
|
28
|
-
function jsonToTsSource(value) {
|
|
29
|
-
if (value === void 0) return "undefined";
|
|
30
|
-
if (value === null) return "null";
|
|
31
|
-
if (typeof value === "string") return stringifyLiteral(value);
|
|
32
|
-
if (typeof value === "number" || typeof value === "boolean") return String(value);
|
|
33
|
-
if (Array.isArray(value)) {
|
|
34
|
-
if (value.length === 0) return "[]";
|
|
35
|
-
const items = value.map((v) => jsonToTsSource(v));
|
|
36
|
-
const singleLine = `[${items.join(", ")}]`;
|
|
37
|
-
if (singleLine.length <= 80) return singleLine;
|
|
38
|
-
return `[\n${items.map((i) => ` ${i}`).join(",\n")},\n]`;
|
|
39
|
-
}
|
|
40
|
-
if (typeof value === "object") {
|
|
41
|
-
const entries = Object.entries(value).filter(([, v]) => v !== void 0);
|
|
42
|
-
if (entries.length === 0) return "{}";
|
|
43
|
-
const items = entries.map(([k, v]) => `${renderKey(k)}: ${jsonToTsSource(v)}`);
|
|
44
|
-
const singleLine = `{ ${items.join(", ")} }`;
|
|
45
|
-
if (singleLine.length <= 80) return singleLine;
|
|
46
|
-
return `{\n${items.map((i) => ` ${i}`).join(",\n")},\n}`;
|
|
47
|
-
}
|
|
48
|
-
throw new InternalError(`jsonToTsSource: unsupported value type "${typeof value}"`);
|
|
49
|
-
}
|
|
50
|
-
function renderKey(key) {
|
|
51
|
-
if (key === "__proto__") return stringifyLiteral(key);
|
|
52
|
-
return /^[a-zA-Z_$][a-zA-Z0-9_$]*$/.test(key) ? key : stringifyLiteral(key);
|
|
53
|
-
}
|
|
54
|
-
function stringifyLiteral(value) {
|
|
55
|
-
return JSON.stringify(value).replace(/\u2028/g, "\\u2028").replace(/\u2029/g, "\\u2029");
|
|
56
|
-
}
|
|
57
|
-
function contractError(code, message, options) {
|
|
58
|
-
return structuredError(code, message, options);
|
|
59
|
-
}
|
|
60
|
-
/**
|
|
61
|
-
* Render an aggregated `import` block from a flat list of
|
|
62
|
-
* `ImportRequirement`s. Each target's migration renderer collects
|
|
63
|
-
* requirements polymorphically from its call nodes and pipes them here.
|
|
64
|
-
*
|
|
65
|
-
* The emitter invariants:
|
|
66
|
-
*
|
|
67
|
-
* - **Usually one line per module specifier.** Named imports are aggregated
|
|
68
|
-
* and emitted sorted; a single default symbol is combined onto the same
|
|
69
|
-
* line when attributes agree (`import def, { a, b } from "m";`). Aliased
|
|
70
|
-
* symbols render `symbol as alias`. When every symbol for a module is
|
|
71
|
-
* `typeOnly`, the statement collapses to `import type { … }`; a module
|
|
72
|
-
* mixing value and type symbols prefixes the type-only ones
|
|
73
|
-
* (`import { type T, v }`). Exceptions that split into multiple lines: a
|
|
74
|
-
* fully type-only statement with both a default and one or more named
|
|
75
|
-
* bindings (`import type D from "m";` then `import type { N } from "m";`,
|
|
76
|
-
* because TypeScript rejects `import type D, { N } from "m"` — TS1363),
|
|
77
|
-
* and multiple distinct default symbols (see below).
|
|
78
|
-
* - **Multiple distinct default symbols per module are allowed.** JS permits
|
|
79
|
-
* re-importing the same specifier under different default-binding names
|
|
80
|
-
* (`import a from 'm'; import b from 'm';`), so each distinct default
|
|
81
|
-
* symbol renders its own `import` line, sorted alphabetically; a repeated
|
|
82
|
-
* requirement for the same symbol still collapses into one binding,
|
|
83
|
-
* merging `typeOnly` by AND.
|
|
84
|
-
* - **Attribute unanimity per module.** All requirements for the same
|
|
85
|
-
* module specifier must carry the same (or no) `attributes` map.
|
|
86
|
-
* Divergent attribute maps throw — they can't collapse to one line
|
|
87
|
-
* and there's no user-resolvable recovery at this layer.
|
|
88
|
-
* - **Distinct (symbol, alias) pairs are distinct bindings.** TypeScript
|
|
89
|
-
* permits importing the same export under multiple local names, so
|
|
90
|
-
* `{ A }` + `{ A as B }` renders as `import { A, A as B } from "m"` and
|
|
91
|
-
* `{ A as B }` + `{ A as C }` renders as `import { A as B, A as C } from "m"`.
|
|
92
|
-
* Truly identical `(symbol, alias)` pairs still collapse to one binding,
|
|
93
|
-
* merging `typeOnly` by AND.
|
|
94
|
-
* - **Deterministic ordering.** Modules are emitted sorted by specifier;
|
|
95
|
-
* within a module, named bindings are emitted sorted by `(symbol, alias)`
|
|
96
|
-
* using JavaScript code-unit comparison, with the un-aliased form (no
|
|
97
|
-
* alias) treated as alias `""` so it sorts before any aliased form of the
|
|
98
|
-
* same symbol.
|
|
99
|
-
*
|
|
100
|
-
* Returns a string containing one or more import lines per module (see the
|
|
101
|
-
* splitting exceptions above), joined by `\n` (no trailing newline). An
|
|
102
|
-
* empty requirement list returns `""`.
|
|
103
|
-
*/
|
|
104
|
-
function renderImports(requirements) {
|
|
105
|
-
return [...aggregateByModule(requirements).entries()].sort(([a], [b]) => a.localeCompare(b)).map(([moduleSpecifier, group]) => renderModuleImport(moduleSpecifier, group)).join("\n");
|
|
106
|
-
}
|
|
107
|
-
function aggregateByModule(requirements) {
|
|
108
|
-
const byModule = /* @__PURE__ */ new Map();
|
|
109
|
-
for (const req of requirements) {
|
|
110
|
-
let group = byModule.get(req.moduleSpecifier);
|
|
111
|
-
if (!group) {
|
|
112
|
-
group = {
|
|
113
|
-
named: /* @__PURE__ */ new Map(),
|
|
114
|
-
defaults: /* @__PURE__ */ new Map(),
|
|
115
|
-
attributes: null,
|
|
116
|
-
attributesSet: false
|
|
117
|
-
};
|
|
118
|
-
byModule.set(req.moduleSpecifier, group);
|
|
119
|
-
}
|
|
120
|
-
mergeRequirementIntoGroup(req, group);
|
|
121
|
-
}
|
|
122
|
-
return byModule;
|
|
123
|
-
}
|
|
124
|
-
function mergeRequirementIntoGroup(req, group) {
|
|
125
|
-
const kind = req.kind ?? "named";
|
|
126
|
-
const typeOnly = req.typeOnly === true;
|
|
127
|
-
if (kind === "default") {
|
|
128
|
-
const existingTypeOnly = group.defaults.get(req.symbol);
|
|
129
|
-
group.defaults.set(req.symbol, existingTypeOnly === void 0 ? typeOnly : existingTypeOnly && typeOnly);
|
|
130
|
-
} else {
|
|
131
|
-
const alias = req.alias && req.alias !== req.symbol ? req.alias : null;
|
|
132
|
-
const key = namedBindingKey(req.symbol, alias);
|
|
133
|
-
const existing = group.named.get(key);
|
|
134
|
-
if (existing) existing.typeOnly = existing.typeOnly && typeOnly;
|
|
135
|
-
else group.named.set(key, {
|
|
136
|
-
symbol: req.symbol,
|
|
137
|
-
alias,
|
|
138
|
-
typeOnly
|
|
139
|
-
});
|
|
140
|
-
}
|
|
141
|
-
mergeAttributes(req, group);
|
|
142
|
-
}
|
|
143
|
-
function mergeAttributes(req, group) {
|
|
144
|
-
const incoming = req.attributes ?? null;
|
|
145
|
-
if (!group.attributesSet) {
|
|
146
|
-
group.attributes = incoming;
|
|
147
|
-
group.attributesSet = true;
|
|
148
|
-
return;
|
|
149
|
-
}
|
|
150
|
-
if (!attributesEqual(group.attributes, incoming)) throw contractError("CONTRACT.PACK_CONTRIBUTION_INVALID", `Conflicting import attributes for module "${req.moduleSpecifier}": ${stringifyAttributes(group.attributes)} vs ${stringifyAttributes(incoming)}.`, { meta: { moduleSpecifier: req.moduleSpecifier } });
|
|
151
|
-
}
|
|
152
|
-
function attributesEqual(a, b) {
|
|
153
|
-
if (a === b) return true;
|
|
154
|
-
if (a === null || b === null) return false;
|
|
155
|
-
const aKeys = Object.keys(a).sort();
|
|
156
|
-
const bKeys = Object.keys(b).sort();
|
|
157
|
-
if (aKeys.length !== bKeys.length) return false;
|
|
158
|
-
for (let i = 0; i < aKeys.length; i++) {
|
|
159
|
-
const key = aKeys[i];
|
|
160
|
-
if (key !== bKeys[i]) return false;
|
|
161
|
-
if (a[key] !== b[key]) return false;
|
|
162
|
-
}
|
|
163
|
-
return true;
|
|
164
|
-
}
|
|
165
|
-
function stringifyAttributes(attrs) {
|
|
166
|
-
if (attrs === null) return "(none)";
|
|
167
|
-
return `{ ${Object.entries(attrs).sort(([a], [b]) => a.localeCompare(b)).map(([k, v]) => `${k}: ${JSON.stringify(v)}`).join(", ")} }`;
|
|
168
|
-
}
|
|
169
|
-
function renderModuleImport(moduleSpecifier, group) {
|
|
170
|
-
const attrs = buildAttributesClause(group.attributes);
|
|
171
|
-
const defaultEntries = [...group.defaults.entries()].sort(([a], [b]) => a.localeCompare(b));
|
|
172
|
-
const hasNamed = group.named.size > 0;
|
|
173
|
-
if (defaultEntries.length > 1) {
|
|
174
|
-
const defaultLines = defaultEntries.map(([symbol, typeOnly]) => `import ${typeOnly ? "type " : ""}${symbol} from '${moduleSpecifier}'${attrs};`);
|
|
175
|
-
if (!hasNamed) return defaultLines.join("\n");
|
|
176
|
-
return [...defaultLines, renderNamedOnlyStatement(moduleSpecifier, group, attrs)].join("\n");
|
|
177
|
-
}
|
|
178
|
-
const defaultEntry = defaultEntries[0];
|
|
179
|
-
const hasDefault = defaultEntry !== void 0;
|
|
180
|
-
const [defaultSymbol, defaultTypeOnly] = defaultEntry ?? [null, true];
|
|
181
|
-
const typeOnlyStatement = isStatementTypeOnly(hasDefault, defaultTypeOnly, group);
|
|
182
|
-
if (typeOnlyStatement && hasDefault && hasNamed) return `${`import type ${defaultSymbol} from '${moduleSpecifier}'${attrs};`}\n${`import type { ${renderNamedBindingsList(group, true)} } from '${moduleSpecifier}'${attrs};`}`;
|
|
183
|
-
return `${typeOnlyStatement ? "import type" : "import"} ${buildImportClause(defaultSymbol, group, typeOnlyStatement)} from '${moduleSpecifier}'${attrs};`;
|
|
184
|
-
}
|
|
185
|
-
function renderNamedOnlyStatement(moduleSpecifier, group, attrs) {
|
|
186
|
-
const typeOnlyStatement = [...group.named.values()].every((binding) => binding.typeOnly);
|
|
187
|
-
return `${typeOnlyStatement ? "import type" : "import"} { ${renderNamedBindingsList(group, typeOnlyStatement)} } from '${moduleSpecifier}'${attrs};`;
|
|
188
|
-
}
|
|
189
|
-
function isStatementTypeOnly(hasDefault, defaultTypeOnly, group) {
|
|
190
|
-
const hasNamed = group.named.size > 0;
|
|
191
|
-
if (!hasDefault && !hasNamed) return false;
|
|
192
|
-
if (hasDefault && !defaultTypeOnly) return false;
|
|
193
|
-
for (const binding of group.named.values()) if (!binding.typeOnly) return false;
|
|
194
|
-
return true;
|
|
195
|
-
}
|
|
196
|
-
function buildImportClause(defaultSymbol, group, statementTypeOnly) {
|
|
197
|
-
const hasNamed = group.named.size > 0;
|
|
198
|
-
const hasDefault = defaultSymbol !== null;
|
|
199
|
-
const namedClause = hasNamed ? renderNamedBindingsList(group, statementTypeOnly) : "";
|
|
200
|
-
if (hasDefault && hasNamed) return `${defaultSymbol}, { ${namedClause} }`;
|
|
201
|
-
if (hasDefault) return defaultSymbol;
|
|
202
|
-
return `{ ${namedClause} }`;
|
|
203
|
-
}
|
|
204
|
-
function renderNamedBindingsList(group, statementTypeOnly) {
|
|
205
|
-
return [...group.named.values()].sort(compareNamedBindings).map((binding) => renderNamedBinding(binding, statementTypeOnly)).join(", ");
|
|
206
|
-
}
|
|
207
|
-
function compareNamedBindings(a, b) {
|
|
208
|
-
if (a.symbol !== b.symbol) return a.symbol < b.symbol ? -1 : 1;
|
|
209
|
-
const aAlias = a.alias ?? "";
|
|
210
|
-
const bAlias = b.alias ?? "";
|
|
211
|
-
if (aAlias === bAlias) return 0;
|
|
212
|
-
return aAlias < bAlias ? -1 : 1;
|
|
213
|
-
}
|
|
214
|
-
function namedBindingKey(symbol, alias) {
|
|
215
|
-
return `${symbol}\x00${alias ?? ""}`;
|
|
216
|
-
}
|
|
217
|
-
function renderNamedBinding(binding, statementTypeOnly) {
|
|
218
|
-
const prefix = !statementTypeOnly && binding.typeOnly ? "type " : "";
|
|
219
|
-
const aliasClause = binding.alias !== null ? ` as ${binding.alias}` : "";
|
|
220
|
-
return `${prefix}${binding.symbol}${aliasClause}`;
|
|
221
|
-
}
|
|
222
|
-
function buildAttributesClause(attrs) {
|
|
223
|
-
if (attrs === null) return "";
|
|
224
|
-
const entries = Object.entries(attrs).sort(([a], [b]) => a.localeCompare(b)).map(([k, v]) => `${k}: ${JSON.stringify(v)}`);
|
|
225
|
-
if (entries.length === 0) return "";
|
|
226
|
-
return ` with { ${entries.join(", ")} }`;
|
|
227
|
-
}
|
|
228
|
-
/**
|
|
229
|
-
* Abstract base class for any IR node that can be emitted as a TypeScript
|
|
230
|
-
* expression and declare its own import requirements.
|
|
231
|
-
*
|
|
232
|
-
* A top-level renderer walks an array of these polymorphically, concatenates
|
|
233
|
-
* `renderTypeScript()` results, and aggregates `importRequirements()` into a
|
|
234
|
-
* deduplicated import block.
|
|
235
|
-
*/
|
|
236
|
-
var TsExpression = class {};
|
|
237
|
-
//#endregion
|
|
238
|
-
export { TsExpression, jsonToTsSource, renderImports };
|
|
239
|
-
|
|
240
|
-
//# sourceMappingURL=ts-render.mjs.map
|
|
1
|
+
import { i as tsStringLiteral, n as jsonToTsSource, r as renderImports, t as TsExpression } from "./dist-DFakQfiQ.mjs";
|
|
2
|
+
export { TsExpression, jsonToTsSource, renderImports, tsStringLiteral };
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
import { z as JsonValue } from "./domain-envelope-D6Wn9AmZ-BqZKTT9U.mjs";
|
|
2
|
+
import { d as CodecTrait, l as CodecRef } from "./codec-types-720XoDZ0-Br-QaYK3.mjs";
|
|
3
|
+
//#region ../../../1-framework/1-core/framework-components/dist/types-import-spec-B4hKOPE9.d.mts
|
|
4
|
+
//#region src/shared/aggregate-descriptor.d.ts
|
|
5
|
+
/**
|
|
6
|
+
* How a descriptor matches the value an aggregate consumes.
|
|
7
|
+
*
|
|
8
|
+
* - `none` — the operation consumes no value (counting entries).
|
|
9
|
+
* - `codec` — the value's codec id matches exactly.
|
|
10
|
+
* - `trait` — the value's codec advertises the trait.
|
|
11
|
+
* - `any` — the operation's result does not depend on its input, so the descriptor answers calls with and without one (counting entries or non-null values).
|
|
12
|
+
*
|
|
13
|
+
* Resolution consults exact codec matches first, then traits, then input-agnostic matches; a `none` match answers only a call that carries no input.
|
|
14
|
+
*/
|
|
15
|
+
type AggregateInputMatch = {
|
|
16
|
+
readonly kind: 'none';
|
|
17
|
+
} | {
|
|
18
|
+
readonly kind: 'codec';
|
|
19
|
+
readonly codecId: string;
|
|
20
|
+
} | {
|
|
21
|
+
readonly kind: 'trait';
|
|
22
|
+
readonly trait: CodecTrait;
|
|
23
|
+
} | {
|
|
24
|
+
readonly kind: 'any';
|
|
25
|
+
};
|
|
26
|
+
/**
|
|
27
|
+
* Result identity that names its codec outright. The optional `typeParams` resolver derives the result's type parameters from the input reference; it cannot change which codec id the result carries.
|
|
28
|
+
*
|
|
29
|
+
* The resolved parameters refine which codec instance decodes the result. The emitted aggregate rows select the result's application type from the codec id alone — the same granularity every emitted codec type has — so the parameters never widen or narrow the static result type.
|
|
30
|
+
*/
|
|
31
|
+
interface NamedAggregateOutput {
|
|
32
|
+
readonly kind: 'codec';
|
|
33
|
+
readonly codecId: string;
|
|
34
|
+
readonly typeParams?: (input: CodecRef | undefined) => JsonValue | undefined;
|
|
35
|
+
}
|
|
36
|
+
/** Result identity that reuses the matched input codec, type parameters included. */
|
|
37
|
+
interface SelfAggregateOutput {
|
|
38
|
+
readonly kind: 'self';
|
|
39
|
+
}
|
|
40
|
+
/** Declarative identity of the codec an aggregate's result carries. */
|
|
41
|
+
type AggregateOutputCodec = SelfAggregateOutput | NamedAggregateOutput;
|
|
42
|
+
interface AggregateDescriptorBase {
|
|
43
|
+
/** The aggregate operation this descriptor resolves (e.g. `count`, `sum`). */
|
|
44
|
+
readonly operation: string;
|
|
45
|
+
/** Whether the result can be null — declared, never inferred from the input's nullability. */
|
|
46
|
+
readonly nullable: boolean;
|
|
47
|
+
}
|
|
48
|
+
/** Overload of an operation that consumes no value. Its result names a codec outright, there being no input codec to reuse. */
|
|
49
|
+
interface NoInputAggregateDescriptor extends AggregateDescriptorBase {
|
|
50
|
+
readonly input: {
|
|
51
|
+
readonly kind: 'none';
|
|
52
|
+
};
|
|
53
|
+
readonly output: NamedAggregateOutput;
|
|
54
|
+
}
|
|
55
|
+
/** Overload of an operation whose result does not depend on its input. It answers calls with and without an input, so — like a no-input overload — it names its result codec outright. */
|
|
56
|
+
interface AnyInputAggregateDescriptor extends AggregateDescriptorBase {
|
|
57
|
+
readonly input: {
|
|
58
|
+
readonly kind: 'any';
|
|
59
|
+
};
|
|
60
|
+
readonly output: NamedAggregateOutput;
|
|
61
|
+
}
|
|
62
|
+
/** Overload of an operation over values whose codec matches by id or by trait. */
|
|
63
|
+
interface ValueInputAggregateDescriptor extends AggregateDescriptorBase {
|
|
64
|
+
readonly input: {
|
|
65
|
+
readonly kind: 'codec';
|
|
66
|
+
readonly codecId: string;
|
|
67
|
+
} | {
|
|
68
|
+
readonly kind: 'trait';
|
|
69
|
+
readonly trait: CodecTrait;
|
|
70
|
+
};
|
|
71
|
+
readonly output: AggregateOutputCodec;
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* One `(operation, input)` overload of an aggregate operation.
|
|
75
|
+
*
|
|
76
|
+
* Each pair has exactly one contributor across a composed stack, so `count` over entries, `sum` over a numeric trait, and `sum` over one exact codec id are three independent descriptors that may come from three different components.
|
|
77
|
+
*/
|
|
78
|
+
type AggregateDescriptor = NoInputAggregateDescriptor | AnyInputAggregateDescriptor | ValueInputAggregateDescriptor;
|
|
79
|
+
/**
|
|
80
|
+
* Ownership key of an `(operation, input)` pair. Two descriptors sharing a key are two contributors claiming one overload, which is a composition error.
|
|
81
|
+
*/
|
|
82
|
+
declare function aggregateDescriptorKey(descriptor: AggregateDescriptor): string;
|
|
83
|
+
/** Whether `descriptor` is the overload of an operation that consumes no value — the case whose result always names a codec outright. */
|
|
84
|
+
declare function isNoInputAggregateDescriptor(descriptor: AggregateDescriptor): descriptor is NoInputAggregateDescriptor;
|
|
85
|
+
/** Whether `descriptor` answers regardless of input — the fallback rung of resolution. */
|
|
86
|
+
declare function isAnyInputAggregateDescriptor(descriptor: AggregateDescriptor): descriptor is AnyInputAggregateDescriptor;
|
|
87
|
+
/**
|
|
88
|
+
* Structural validation of a contributed descriptor. Components assembled from JavaScript reach the contribution slot unchecked, so composition validates the shape once and every later read is a plain lookup.
|
|
89
|
+
*/
|
|
90
|
+
declare function isAggregateDescriptor(value: unknown): value is AggregateDescriptor;
|
|
91
|
+
//#endregion
|
|
92
|
+
//#region src/shared/types-import-spec.d.ts
|
|
93
|
+
/**
|
|
94
|
+
* Specifies how to import TypeScript types from a package.
|
|
95
|
+
* Used in extension pack manifests to declare codec and operation type imports.
|
|
96
|
+
*/
|
|
97
|
+
interface TypesImportSpec {
|
|
98
|
+
readonly package: string;
|
|
99
|
+
readonly named: string;
|
|
100
|
+
readonly alias: string;
|
|
101
|
+
}
|
|
102
|
+
//#endregion
|
|
103
|
+
export { NamedAggregateOutput as a, TypesImportSpec as c, isAggregateDescriptor as d, isAnyInputAggregateDescriptor as f, AnyInputAggregateDescriptor as i, ValueInputAggregateDescriptor as l, AggregateInputMatch as n, NoInputAggregateDescriptor as o, isNoInputAggregateDescriptor as p, AggregateOutputCodec as r, SelfAggregateOutput as s, AggregateDescriptor as t, aggregateDescriptorKey as u };
|
|
104
|
+
//# sourceMappingURL=types-import-spec-B4hKOPE9-BwQGG38j.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types-import-spec-B4hKOPE9-BwQGG38j.d.mts","names":[],"sources":["../../../../1-framework/1-core/framework-components/dist/types-import-spec-B4hKOPE9.d.mts"],"mappings":";;;;;;;;;;;;;;KAaK;WACM;;WAEA;WACA;;WAEA;WACA,OAAO;;WAEP;;;;;;;UAOD;WACC;WACA;WACA,cAAc,OAAO,yBAAyB;;;UAG/C;WACC;;;KAGN,uBAAuB,sBAAsB;UACxC;;WAEC;;WAEA;;;UAGD,mCAAmC;WAClC;aACE;;WAEF,QAAQ;;;UAGT,oCAAoC;WACnC;aACE;;WAEF,QAAQ;;;UAGT,sCAAsC;WACrC;aACE;aACA;;aAEA;aACA,OAAO;;WAET,QAAQ;;;;;;;KAOd,sBAAsB,6BAA6B,8BAA8B;;;;iBAIrE,uBAAuB,YAAY;;iBAEnC,6BAA6B,YAAY,sBAAsB,cAAc;;iBAE7E,8BAA8B,YAAY,sBAAsB,cAAc;;;;iBAI9E,sBAAsB,iBAAiB,SAAS;;;;;;;UAOvD;WACC;WACA;WACA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@prisma/orm-framework",
|
|
3
|
-
"version": "0.17.0-dev.
|
|
3
|
+
"version": "0.17.0-dev.11",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -15,20 +15,20 @@
|
|
|
15
15
|
"uniku": "^0.4.3"
|
|
16
16
|
},
|
|
17
17
|
"devDependencies": {
|
|
18
|
-
"@internal/config": "0.17.0-dev.
|
|
19
|
-
"@internal/contract": "0.17.0-dev.
|
|
20
|
-
"@internal/contract-authoring": "0.17.0-dev.
|
|
21
|
-
"@internal/errors": "0.17.0-dev.
|
|
22
|
-
"@internal/framework-components": "0.17.0-dev.
|
|
23
|
-
"@internal/ids": "0.17.0-dev.
|
|
24
|
-
"@internal/operations": "0.17.0-dev.
|
|
25
|
-
"@internal/psl-parser": "0.17.0-dev.
|
|
26
|
-
"@internal/psl-printer": "0.17.0-dev.
|
|
27
|
-
"@internal/ts-render": "0.17.0-dev.
|
|
28
|
-
"@repo/tsconfig": "0.17.0-dev.
|
|
29
|
-
"@internal/publish-surface": "0.17.0-dev.
|
|
30
|
-
"@repo/tsdown": "0.17.0-dev.
|
|
31
|
-
"@internal/utils": "0.17.0-dev.
|
|
18
|
+
"@internal/config": "0.17.0-dev.11",
|
|
19
|
+
"@internal/contract": "0.17.0-dev.11",
|
|
20
|
+
"@internal/contract-authoring": "0.17.0-dev.11",
|
|
21
|
+
"@internal/errors": "0.17.0-dev.11",
|
|
22
|
+
"@internal/framework-components": "0.17.0-dev.11",
|
|
23
|
+
"@internal/ids": "0.17.0-dev.11",
|
|
24
|
+
"@internal/operations": "0.17.0-dev.11",
|
|
25
|
+
"@internal/psl-parser": "0.17.0-dev.11",
|
|
26
|
+
"@internal/psl-printer": "0.17.0-dev.11",
|
|
27
|
+
"@internal/ts-render": "0.17.0-dev.11",
|
|
28
|
+
"@repo/tsconfig": "0.17.0-dev.11",
|
|
29
|
+
"@internal/publish-surface": "0.17.0-dev.11",
|
|
30
|
+
"@repo/tsdown": "0.17.0-dev.11",
|
|
31
|
+
"@internal/utils": "0.17.0-dev.11",
|
|
32
32
|
"tsdown": "0.22.14",
|
|
33
33
|
"typescript": "5.9.3",
|
|
34
34
|
"vitest": "4.1.10"
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import "./framework-authoring-7YMP9TwM-C9P-N6_a.mjs";
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
import { t as blindCast } from "./casts-DpaahrlC-Bd5n2coI.mjs";
|
|
2
|
-
//#region ../../../1-framework/1-core/framework-components/dist/capabilities-CPj7MfXO.mjs
|
|
3
|
-
/**
|
|
4
|
-
* Capability matrix merge primitive shared by emit-time and runtime stack composition.
|
|
5
|
-
*
|
|
6
|
-
* The CLI's `enrichContract` and the SQL runtime's `createExecutionContext` both need
|
|
7
|
-
* to fold a stack of component descriptors' `capabilities` declarations into a single
|
|
8
|
-
* matrix keyed by namespace. Keeping the primitive here lets both call sites stay
|
|
9
|
-
* byte-for-byte consistent without one depending on the other.
|
|
10
|
-
*/
|
|
11
|
-
function isPlainObject(value) {
|
|
12
|
-
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
13
|
-
}
|
|
14
|
-
function sortDeep(value) {
|
|
15
|
-
if (Array.isArray(value)) return value.map(sortDeep);
|
|
16
|
-
if (!isPlainObject(value)) return value;
|
|
17
|
-
const entries = Object.entries(value).sort(([a], [b]) => a.localeCompare(b));
|
|
18
|
-
const next = {};
|
|
19
|
-
for (const [key, child] of entries) next[key] = sortDeep(child);
|
|
20
|
-
return next;
|
|
21
|
-
}
|
|
22
|
-
function extractCapabilityMatrix(value) {
|
|
23
|
-
if (!isPlainObject(value)) return {};
|
|
24
|
-
const out = {};
|
|
25
|
-
for (const [namespace, maybeCaps] of Object.entries(value)) {
|
|
26
|
-
if (!isPlainObject(maybeCaps)) continue;
|
|
27
|
-
const caps = {};
|
|
28
|
-
for (const [key, flag] of Object.entries(maybeCaps)) if (typeof flag === "boolean") caps[key] = flag;
|
|
29
|
-
if (Object.keys(caps).length > 0) out[namespace] = caps;
|
|
30
|
-
}
|
|
31
|
-
return out;
|
|
32
|
-
}
|
|
33
|
-
/**
|
|
34
|
-
* Merge an ordered list of contributor capability declarations into a base matrix.
|
|
35
|
-
*
|
|
36
|
-
* Behaviour:
|
|
37
|
-
* - `base` and each contributor's `capabilities` are filtered through the same
|
|
38
|
-
* structural extraction: non-plain-object namespace blocks are dropped,
|
|
39
|
-
* non-boolean leaves inside a namespace block are dropped, and a namespace
|
|
40
|
-
* block that ends up with zero boolean leaves is omitted entirely (so a
|
|
41
|
-
* later contributor with a malformed namespace cannot erase a namespace
|
|
42
|
-
* already present in `base`).
|
|
43
|
-
* - Non-plain-object `capabilities` on a contributor (including `undefined`,
|
|
44
|
-
* `null`, arrays, primitives) are skipped silently — the contributor
|
|
45
|
-
* contributes nothing.
|
|
46
|
-
* - Later contributors win on `(namespace, key)` collisions.
|
|
47
|
-
* - The returned object is fresh — neither `base` nor any contributor is mutated.
|
|
48
|
-
* - Output keys are sorted lexicographically at every plain-object level.
|
|
49
|
-
*/
|
|
50
|
-
function mergeCapabilityMatrices(base, contributors) {
|
|
51
|
-
const merged = extractCapabilityMatrix(base);
|
|
52
|
-
for (const contributor of contributors) {
|
|
53
|
-
const extracted = extractCapabilityMatrix(contributor.capabilities);
|
|
54
|
-
for (const [namespace, capabilities] of Object.entries(extracted)) merged[namespace] = {
|
|
55
|
-
...merged[namespace] ?? {},
|
|
56
|
-
...capabilities
|
|
57
|
-
};
|
|
58
|
-
}
|
|
59
|
-
return blindCast(sortDeep(merged));
|
|
60
|
-
}
|
|
61
|
-
//#endregion
|
|
62
|
-
export { mergeCapabilityMatrices as t };
|
|
63
|
-
|
|
64
|
-
//# sourceMappingURL=capabilities-CPj7MfXO-GRkp0Q_D.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"capabilities-CPj7MfXO-GRkp0Q_D.mjs","names":[],"sources":["../../../../1-framework/1-core/framework-components/dist/capabilities-CPj7MfXO.mjs"],"sourcesContent":["import { blindCast } from \"@internal/utils/casts\";\n//#region src/shared/capabilities.ts\n/**\n* Capability matrix merge primitive shared by emit-time and runtime stack composition.\n*\n* The CLI's `enrichContract` and the SQL runtime's `createExecutionContext` both need\n* to fold a stack of component descriptors' `capabilities` declarations into a single\n* matrix keyed by namespace. Keeping the primitive here lets both call sites stay\n* byte-for-byte consistent without one depending on the other.\n*/\nfunction isPlainObject(value) {\n\treturn typeof value === \"object\" && value !== null && !Array.isArray(value);\n}\nfunction sortDeep(value) {\n\tif (Array.isArray(value)) return value.map(sortDeep);\n\tif (!isPlainObject(value)) return value;\n\tconst entries = Object.entries(value).sort(([a], [b]) => a.localeCompare(b));\n\tconst next = {};\n\tfor (const [key, child] of entries) next[key] = sortDeep(child);\n\treturn next;\n}\nfunction extractCapabilityMatrix(value) {\n\tif (!isPlainObject(value)) return {};\n\tconst out = {};\n\tfor (const [namespace, maybeCaps] of Object.entries(value)) {\n\t\tif (!isPlainObject(maybeCaps)) continue;\n\t\tconst caps = {};\n\t\tfor (const [key, flag] of Object.entries(maybeCaps)) if (typeof flag === \"boolean\") caps[key] = flag;\n\t\tif (Object.keys(caps).length > 0) out[namespace] = caps;\n\t}\n\treturn out;\n}\n/**\n* Merge an ordered list of contributor capability declarations into a base matrix.\n*\n* Behaviour:\n* - `base` and each contributor's `capabilities` are filtered through the same\n* structural extraction: non-plain-object namespace blocks are dropped,\n* non-boolean leaves inside a namespace block are dropped, and a namespace\n* block that ends up with zero boolean leaves is omitted entirely (so a\n* later contributor with a malformed namespace cannot erase a namespace\n* already present in `base`).\n* - Non-plain-object `capabilities` on a contributor (including `undefined`,\n* `null`, arrays, primitives) are skipped silently — the contributor\n* contributes nothing.\n* - Later contributors win on `(namespace, key)` collisions.\n* - The returned object is fresh — neither `base` nor any contributor is mutated.\n* - Output keys are sorted lexicographically at every plain-object level.\n*/\nfunction mergeCapabilityMatrices(base, contributors) {\n\tconst merged = extractCapabilityMatrix(base);\n\tfor (const contributor of contributors) {\n\t\tconst extracted = extractCapabilityMatrix(contributor.capabilities);\n\t\tfor (const [namespace, capabilities] of Object.entries(extracted)) merged[namespace] = {\n\t\t\t...merged[namespace] ?? {},\n\t\t\t...capabilities\n\t\t};\n\t}\n\treturn blindCast(sortDeep(merged));\n}\n//#endregion\nexport { mergeCapabilityMatrices as t };\n\n//# sourceMappingURL=capabilities-CPj7MfXO.mjs.map"],"mappings":";;;;;;;;;;AAUA,SAAS,cAAc,OAAO;CAC7B,OAAO,OAAO,UAAU,YAAY,UAAU,QAAQ,CAAC,MAAM,QAAQ,KAAK;AAC3E;AACA,SAAS,SAAS,OAAO;CACxB,IAAI,MAAM,QAAQ,KAAK,GAAG,OAAO,MAAM,IAAI,QAAQ;CACnD,IAAI,CAAC,cAAc,KAAK,GAAG,OAAO;CAClC,MAAM,UAAU,OAAO,QAAQ,KAAK,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,EAAE,cAAc,CAAC,CAAC;CAC3E,MAAM,OAAO,CAAC;CACd,KAAK,MAAM,CAAC,KAAK,UAAU,SAAS,KAAK,OAAO,SAAS,KAAK;CAC9D,OAAO;AACR;AACA,SAAS,wBAAwB,OAAO;CACvC,IAAI,CAAC,cAAc,KAAK,GAAG,OAAO,CAAC;CACnC,MAAM,MAAM,CAAC;CACb,KAAK,MAAM,CAAC,WAAW,cAAc,OAAO,QAAQ,KAAK,GAAG;EAC3D,IAAI,CAAC,cAAc,SAAS,GAAG;EAC/B,MAAM,OAAO,CAAC;EACd,KAAK,MAAM,CAAC,KAAK,SAAS,OAAO,QAAQ,SAAS,GAAG,IAAI,OAAO,SAAS,WAAW,KAAK,OAAO;EAChG,IAAI,OAAO,KAAK,IAAI,CAAC,CAAC,SAAS,GAAG,IAAI,aAAa;CACpD;CACA,OAAO;AACR;;;;;;;;;;;;;;;;;;AAkBA,SAAS,wBAAwB,MAAM,cAAc;CACpD,MAAM,SAAS,wBAAwB,IAAI;CAC3C,KAAK,MAAM,eAAe,cAAc;EACvC,MAAM,YAAY,wBAAwB,YAAY,YAAY;EAClE,KAAK,MAAM,CAAC,WAAW,iBAAiB,OAAO,QAAQ,SAAS,GAAG,OAAO,aAAa;GACtF,GAAG,OAAO,cAAc,CAAC;GACzB,GAAG;EACJ;CACD;CACA,OAAO,UAAU,SAAS,MAAM,CAAC;AAClC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"codec-Cly9VPoA.mjs","names":[],"sources":["../../../../1-framework/1-core/framework-components/dist/codec.mjs"],"sourcesContent":["import { i as validateCodecTypeParams, n as materializeCodec, r as resolveCodecDescriptorOrThrow, t as CONTRACT_CODEC_DESCRIPTOR_MISSING } from \"./resolve-codec-BZF8TZh_.mjs\";\n//#region src/shared/codec.ts\n/**\n* Abstract base class for concrete codec implementations.\n*\n* Codec authors extend this class with their typed `Id`, `TTraits`, `TWire`, `TInput` and override all four abstract conversion methods: `encode`, `decode`, `encodeJson`, and `decodeJson`. The runtime instance carries only its `id` (proxied through the descriptor so alias subclasses inherit the descriptor's id automatically) and the conversion methods — static metadata lives on the {@link CodecDescriptor}.\n*/\nvar CodecImpl = class {\n\tdescriptor;\n\t/**\n\t* Variance-erased descriptor reference. Concrete codec subclasses receive the typed descriptor in their own constructors and forward it via `super(descriptor)`; the variance erasure lives at this base because the abstract surface can't carry the concrete `TParams`.\n\t*/\n\tconstructor(descriptor) {\n\t\tthis.descriptor = descriptor;\n\t}\n\tget id() {\n\t\treturn this.descriptor.codecId;\n\t}\n};\n//#endregion\n//#region src/shared/codec-types.ts\nconst emptyCodecLookup = {\n\tget: () => void 0,\n\ttargetTypesFor: () => void 0,\n\trenderOutputTypeFor: () => void 0\n};\n/**\n* Standard Schema validator for `void` params. Accepts only `undefined` (or absent input); rejects any other value so a contract that tries to thread `typeParams` through a non-parameterized codec id fails fast at the JSON boundary instead of silently coercing the value away. Used by the framework-supplied non-parameterized descriptor synthesizer.\n*/\nconst voidParamsSchema = { \"~standard\": {\n\tversion: 1,\n\tvendor: \"prisma-next\",\n\tvalidate: (input) => input === void 0 ? { value: void 0 } : { issues: [{ message: \"unexpected typeParams for non-parameterized codec (void params expected)\" }] }\n} };\n//#endregion\n//#region src/shared/codec-descriptor.ts\n/**\n* Abstract base class for concrete codec descriptors.\n*\n* Codec authors extend this class with their typed `TParams` and declare `codecId`, `traits`, `targetTypes`, `paramsSchema`, the curried `factory(params)`, and (optionally) `renderOutputType`.\n*\n* Implements the {@link CodecDescriptor} interface so a concrete subclass instance is directly usable wherever the framework expects a `CodecDescriptor<P>`.\n*/\nvar CodecDescriptorImpl = class {\n\t/** Boolean derived from `paramsSchema`: `true` whenever the schema is not the singleton `voidParamsSchema`. */\n\tget isParameterized() {\n\t\treturn this.paramsSchema !== voidParamsSchema;\n\t}\n};\n//#endregion\n//#region src/shared/column-spec.ts\n/**\n* Trivial column packager. Per-codec helpers call this directly with the result of `descriptor.factory(params)` — direct method invocation binds the descriptor's method-level generic at the call site and the literal flows through `R`.\n*\n* `nativeType` is the column's database-native type spelling — the value the postgres adapter's migration planner, the SQL renderer's cast policy, and the emitted contract's column `nativeType` slot read. Per-codec helpers pass the literal native-type string for their codec (e.g. `'text'`, `'int4'`, `'character varying'`); for codecs whose native-type spelling depends on parameters (none today; reserved for future shapes), the helper computes the rendered string before calling `column`. The framework does not derive the value from `codecId` — that mapping is target-specific and lives at the helper.\n*/\nfunction column(codecFactory, codecId, typeParams, nativeType) {\n\treturn {\n\t\tcodecFactory,\n\t\tcodecId,\n\t\ttypeParams,\n\t\tnativeType\n\t};\n}\n//#endregion\n//#region src/shared/render-ts-literal.ts\n/**\n* Renders a codec-encoded value as a TypeScript literal (e.g. `'low'`, `1`, `true`), or `undefined`\n* when the value isn't literal-expressible (objects, arrays, null).\n*\n* Valid **only for identity codecs** whose `encodeJson` output equals their decoded output type\n* (text, int, float, bool). A non-identity codec (e.g. one that encodes to an int but decodes to a\n* string literal) must NOT use this: it has to `decodeJson` first, then render, in its own\n* `renderValueLiteral`.\n*\n* String values are fully escaped for a single-quoted `.d.ts` literal: backslash, single quote, and\n* every character a raw single-quoted TS literal cannot contain — newline, carriage return, and the\n* U+2028/U+2029 line/paragraph separators (which JS also treats as line terminators).\n*/\nfunction renderTsLiteral(value) {\n\tif (typeof value === \"string\") return `'${value.replace(/\\\\/g, \"\\\\\\\\\").replace(/'/g, \"\\\\'\").replace(/\\n/g, \"\\\\n\").replace(/\\r/g, \"\\\\r\").replace(/\\u2028/g, \"\\\\u2028\").replace(/\\u2029/g, \"\\\\u2029\")}'`;\n\tif (typeof value === \"number\" || typeof value === \"boolean\") return String(value);\n}\n//#endregion\nexport { CONTRACT_CODEC_DESCRIPTOR_MISSING, CodecDescriptorImpl, CodecImpl, column, emptyCodecLookup, materializeCodec, renderTsLiteral, resolveCodecDescriptorOrThrow, validateCodecTypeParams, voidParamsSchema };\n\n//# sourceMappingURL=codec.mjs.map"],"mappings":";;;;;;AAOA,IAAI,YAAY,MAAM;CACrB;;;;CAIA,YAAY,YAAY;EACvB,KAAK,aAAa;CACnB;CACA,IAAI,KAAK;EACR,OAAO,KAAK,WAAW;CACxB;AACD;AAGA,MAAM,mBAAmB;CACxB,WAAW,KAAK;CAChB,sBAAsB,KAAK;CAC3B,2BAA2B,KAAK;AACjC;;;;AAIA,MAAM,mBAAmB,EAAE,aAAa;CACvC,SAAS;CACT,QAAQ;CACR,WAAW,UAAU,UAAU,KAAK,IAAI,EAAE,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,CAAC,EAAE,SAAS,2EAA2E,CAAC,EAAE;AACjK,EAAE;;;;;;;;AAUF,IAAI,sBAAsB,MAAM;;CAE/B,IAAI,kBAAkB;EACrB,OAAO,KAAK,iBAAiB;CAC9B;AACD;;;;;;AAQA,SAAS,OAAO,cAAc,SAAS,YAAY,YAAY;CAC9D,OAAO;EACN;EACA;EACA;EACA;CACD;AACD;;;;;;;;;;;;;;AAgBA,SAAS,gBAAgB,OAAO;CAC/B,IAAI,OAAO,UAAU,UAAU,OAAO,IAAI,MAAM,QAAQ,OAAO,MAAM,CAAC,CAAC,QAAQ,MAAM,KAAK,CAAC,CAAC,QAAQ,OAAO,KAAK,CAAC,CAAC,QAAQ,OAAO,KAAK,CAAC,CAAC,QAAQ,WAAW,SAAS,CAAC,CAAC,QAAQ,WAAW,SAAS,EAAE;CACpM,IAAI,OAAO,UAAU,YAAY,OAAO,UAAU,WAAW,OAAO,OAAO,KAAK;AACjF"}
|