@prisma-next/framework-components 0.12.0-dev.60 → 0.12.0-dev.62
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/authoring.d.mts +2 -2
- package/dist/authoring.mjs +2 -2
- package/dist/components.d.mts +1 -1
- package/dist/control.d.mts +4 -3
- package/dist/control.d.mts.map +1 -1
- package/dist/control.mjs +8 -3
- package/dist/control.mjs.map +1 -1
- package/dist/execution.d.mts +1 -1
- package/dist/{framework-authoring-Szvddbl3.mjs → framework-authoring-CnwPJCO4.mjs} +76 -5
- package/dist/framework-authoring-CnwPJCO4.mjs.map +1 -0
- package/dist/framework-authoring-Cyde8zSN.d.mts +380 -0
- package/dist/framework-authoring-Cyde8zSN.d.mts.map +1 -0
- package/dist/{framework-components-Ce_Cdw76.d.mts → framework-components-DdqvMc8S.d.mts} +2 -2
- package/dist/{framework-components-Ce_Cdw76.d.mts.map → framework-components-DdqvMc8S.d.mts.map} +1 -1
- package/dist/{psl-ast-CTuBYLYj.d.mts → psl-ast-DRzRF9rS.d.mts} +46 -12
- package/dist/psl-ast-DRzRF9rS.d.mts.map +1 -0
- package/dist/psl-ast.d.mts +37 -2
- package/dist/psl-ast.d.mts.map +1 -0
- package/dist/psl-ast.mjs +142 -1
- package/dist/psl-ast.mjs.map +1 -1
- package/package.json +7 -7
- package/src/control/control-stack.ts +25 -1
- package/src/control/psl-ast.ts +62 -25
- package/src/control/psl-extension-block-validator.ts +340 -0
- package/src/exports/authoring.ts +16 -0
- package/src/exports/psl-ast.ts +2 -0
- package/src/shared/framework-authoring.ts +215 -2
- package/src/shared/psl-extension-block.ts +184 -0
- package/dist/framework-authoring-Cv04iZjB.d.mts +0 -183
- package/dist/framework-authoring-Cv04iZjB.d.mts.map +0 -1
- package/dist/framework-authoring-Szvddbl3.mjs.map +0 -1
- package/dist/psl-ast-CTuBYLYj.d.mts.map +0 -1
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shape-only types for the PSL source-position primitives, diagnostic
|
|
3
|
+
* codes, extension-block descriptor vocabulary, and the uniform
|
|
4
|
+
* extension-block AST node base.
|
|
5
|
+
*
|
|
6
|
+
* These live in the shared plane so an extension's authoring descriptor
|
|
7
|
+
* (`AuthoringPslBlockDescriptor` in `framework-authoring`) can reference
|
|
8
|
+
* them without crossing the shared → migration-plane boundary. The
|
|
9
|
+
* migration-plane `psl-ast.ts` re-exports everything here for consumers
|
|
10
|
+
* that import PSL AST types from the control entrypoint.
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
export interface PslPosition {
|
|
14
|
+
readonly offset: number;
|
|
15
|
+
readonly line: number;
|
|
16
|
+
readonly column: number;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export interface PslSpan {
|
|
20
|
+
readonly start: PslPosition;
|
|
21
|
+
readonly end: PslPosition;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export type PslDiagnosticCode =
|
|
25
|
+
| 'PSL_UNTERMINATED_BLOCK'
|
|
26
|
+
| 'PSL_UNSUPPORTED_TOP_LEVEL_BLOCK'
|
|
27
|
+
| 'PSL_INVALID_NAMESPACE_BLOCK'
|
|
28
|
+
| 'PSL_INVALID_ATTRIBUTE_SYNTAX'
|
|
29
|
+
| 'PSL_INVALID_MODEL_MEMBER'
|
|
30
|
+
| 'PSL_UNSUPPORTED_MODEL_ATTRIBUTE'
|
|
31
|
+
| 'PSL_UNSUPPORTED_FIELD_ATTRIBUTE'
|
|
32
|
+
| 'PSL_INVALID_RELATION_ATTRIBUTE'
|
|
33
|
+
| 'PSL_INVALID_REFERENTIAL_ACTION'
|
|
34
|
+
| 'PSL_INVALID_DEFAULT_VALUE'
|
|
35
|
+
| 'PSL_INVALID_ENUM_MEMBER'
|
|
36
|
+
| 'PSL_INVALID_TYPES_MEMBER'
|
|
37
|
+
| 'PSL_INVALID_QUALIFIED_TYPE'
|
|
38
|
+
/**
|
|
39
|
+
* A malformed line inside an extension-contributed top-level block body, or
|
|
40
|
+
* a structurally invalid element inside a `list` parameter value.
|
|
41
|
+
*
|
|
42
|
+
* Replaces the overloaded `PSL_UNSUPPORTED_TOP_LEVEL_BLOCK` code that the
|
|
43
|
+
* generic framework parser previously used for these two parse-error sites
|
|
44
|
+
* inside extension blocks — keeping `PSL_UNSUPPORTED_TOP_LEVEL_BLOCK` for
|
|
45
|
+
* its original meaning (an unknown keyword at the top level) and giving
|
|
46
|
+
* extension-block parse errors their own code.
|
|
47
|
+
*/
|
|
48
|
+
| 'PSL_INVALID_EXTENSION_BLOCK_MEMBER'
|
|
49
|
+
/**
|
|
50
|
+
* An unknown parameter key in an extension-contributed block — a key present
|
|
51
|
+
* in the source block but absent from the descriptor's `parameters` map.
|
|
52
|
+
*/
|
|
53
|
+
| 'PSL_EXTENSION_UNKNOWN_PARAMETER'
|
|
54
|
+
/**
|
|
55
|
+
* A required parameter declared in the descriptor is absent from the parsed block.
|
|
56
|
+
*/
|
|
57
|
+
| 'PSL_EXTENSION_MISSING_REQUIRED_PARAMETER'
|
|
58
|
+
/**
|
|
59
|
+
* An `option`-kind parameter value is not one of the allowed tokens listed
|
|
60
|
+
* in the descriptor's `values` array.
|
|
61
|
+
*/
|
|
62
|
+
| 'PSL_EXTENSION_OPTION_OUT_OF_SET'
|
|
63
|
+
/**
|
|
64
|
+
* A `value`-kind parameter's raw text is not a valid JSON literal, or the
|
|
65
|
+
* parsed JSON value was rejected by the codec's `decodeJson` method, or the
|
|
66
|
+
* codec id is not registered in the lookup.
|
|
67
|
+
*/
|
|
68
|
+
| 'PSL_EXTENSION_INVALID_VALUE'
|
|
69
|
+
/**
|
|
70
|
+
* A `ref`-kind parameter identifier does not resolve to a declared entity of
|
|
71
|
+
* the required `refKind` within the declared scope.
|
|
72
|
+
*/
|
|
73
|
+
| 'PSL_EXTENSION_UNRESOLVED_REF';
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* Descriptor vocabulary for a single parameter on a declared block.
|
|
77
|
+
*
|
|
78
|
+
* Four kinds:
|
|
79
|
+
* - `ref` — the parameter value is an identifier that must resolve to a
|
|
80
|
+
* declared entity of `refKind` within the declared `scope`.
|
|
81
|
+
* - `value` — the parameter value is a PSL literal parsed and printed
|
|
82
|
+
* through the codec identified by `codecId`.
|
|
83
|
+
* - `option` — the parameter value is one of the literal tokens in `values`.
|
|
84
|
+
* Not a codec; not persisted data. A closed authoring-time constraint only.
|
|
85
|
+
* - `list` — a bracketed list whose elements each match the `of` descriptor.
|
|
86
|
+
*/
|
|
87
|
+
export type PslBlockParam =
|
|
88
|
+
| PslBlockParamRef
|
|
89
|
+
| PslBlockParamValue
|
|
90
|
+
| PslBlockParamOption
|
|
91
|
+
| PslBlockParamList;
|
|
92
|
+
|
|
93
|
+
export interface PslBlockParamRef {
|
|
94
|
+
readonly kind: 'ref';
|
|
95
|
+
readonly refKind: string;
|
|
96
|
+
readonly scope: 'same-namespace' | 'same-space' | 'cross-space';
|
|
97
|
+
readonly required?: boolean;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
export interface PslBlockParamValue {
|
|
101
|
+
readonly kind: 'value';
|
|
102
|
+
readonly codecId: string;
|
|
103
|
+
readonly required?: boolean;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
export interface PslBlockParamOption {
|
|
107
|
+
readonly kind: 'option';
|
|
108
|
+
readonly values: readonly string[];
|
|
109
|
+
readonly required?: boolean;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
export interface PslBlockParamList {
|
|
113
|
+
readonly kind: 'list';
|
|
114
|
+
readonly of: PslBlockParam;
|
|
115
|
+
readonly required?: boolean;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
/**
|
|
119
|
+
* The parsed representation of a single parameter value on a uniform
|
|
120
|
+
* extension-block AST node. Mirrors the `PslBlockParam` descriptor
|
|
121
|
+
* vocabulary:
|
|
122
|
+
*
|
|
123
|
+
* - `ref` → `PslExtensionBlockParamRef` — a raw identifier string
|
|
124
|
+
* (resolution runs in the validator, not the parser).
|
|
125
|
+
* - `value` → `PslExtensionBlockParamValue` — a raw PSL literal string
|
|
126
|
+
* (codec validation runs in the validator).
|
|
127
|
+
* - `option` → `PslExtensionBlockParamOption` — the chosen token.
|
|
128
|
+
* - `list` → `PslExtensionBlockParamList` — ordered list of the above.
|
|
129
|
+
*
|
|
130
|
+
* These shapes are intentionally minimal. The validator and lowering refine
|
|
131
|
+
* and consume them; the generic framework parser produces them.
|
|
132
|
+
*/
|
|
133
|
+
export type PslExtensionBlockParamValue =
|
|
134
|
+
| PslExtensionBlockParamRef
|
|
135
|
+
| PslExtensionBlockParamScalarValue
|
|
136
|
+
| PslExtensionBlockParamOption
|
|
137
|
+
| PslExtensionBlockParamList;
|
|
138
|
+
|
|
139
|
+
export interface PslExtensionBlockParamRef {
|
|
140
|
+
readonly kind: 'ref';
|
|
141
|
+
readonly identifier: string;
|
|
142
|
+
readonly span: PslSpan;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
export interface PslExtensionBlockParamScalarValue {
|
|
146
|
+
readonly kind: 'value';
|
|
147
|
+
readonly raw: string;
|
|
148
|
+
readonly span: PslSpan;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
export interface PslExtensionBlockParamOption {
|
|
152
|
+
readonly kind: 'option';
|
|
153
|
+
readonly token: string;
|
|
154
|
+
readonly span: PslSpan;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
export interface PslExtensionBlockParamList {
|
|
158
|
+
readonly kind: 'list';
|
|
159
|
+
readonly items: readonly PslExtensionBlockParamValue[];
|
|
160
|
+
readonly span: PslSpan;
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
/**
|
|
164
|
+
* Base shape for a uniform extension-contributed top-level PSL block
|
|
165
|
+
* node, as produced by the generic framework parser and consumed by the
|
|
166
|
+
* validator and lowering factory.
|
|
167
|
+
*
|
|
168
|
+
* - `kind` is the routing discriminant, equal to the descriptor's
|
|
169
|
+
* `discriminator`. The framework parser sets this to
|
|
170
|
+
* `descriptor.discriminator` for every block it parses.
|
|
171
|
+
* - `name` is the block's declared name (the identifier after the keyword).
|
|
172
|
+
* - `parameters` is the descriptor-driven parameter map. Keys are
|
|
173
|
+
* parameter names from the descriptor; values are the parsed parameter
|
|
174
|
+
* representations. Only parameters present in the source are included
|
|
175
|
+
* — absence of a required parameter is a validator concern, not a
|
|
176
|
+
* parser concern.
|
|
177
|
+
* - `span` covers the full block from keyword to closing brace.
|
|
178
|
+
*/
|
|
179
|
+
export interface PslExtensionBlock {
|
|
180
|
+
readonly kind: string;
|
|
181
|
+
readonly name: string;
|
|
182
|
+
readonly parameters: Record<string, PslExtensionBlockParamValue>;
|
|
183
|
+
readonly span: PslSpan;
|
|
184
|
+
}
|
|
@@ -1,183 +0,0 @@
|
|
|
1
|
-
import { ColumnDefault, ExecutionMutationDefaultPhases } from "@prisma-next/contract/types";
|
|
2
|
-
import { Type } from "arktype";
|
|
3
|
-
|
|
4
|
-
//#region src/shared/framework-authoring.d.ts
|
|
5
|
-
type AuthoringArgRef = {
|
|
6
|
-
readonly kind: 'arg';
|
|
7
|
-
readonly index: number;
|
|
8
|
-
readonly path?: readonly string[];
|
|
9
|
-
readonly default?: AuthoringTemplateValue;
|
|
10
|
-
};
|
|
11
|
-
type AuthoringTemplateValue = string | number | boolean | null | AuthoringArgRef | readonly AuthoringTemplateValue[] | {
|
|
12
|
-
readonly [key: string]: AuthoringTemplateValue;
|
|
13
|
-
};
|
|
14
|
-
interface AuthoringArgumentDescriptorCommon {
|
|
15
|
-
readonly name?: string;
|
|
16
|
-
readonly optional?: boolean;
|
|
17
|
-
}
|
|
18
|
-
type AuthoringArgumentDescriptor = AuthoringArgumentDescriptorCommon & ({
|
|
19
|
-
readonly kind: 'string';
|
|
20
|
-
} | {
|
|
21
|
-
readonly kind: 'boolean';
|
|
22
|
-
} | {
|
|
23
|
-
readonly kind: 'number';
|
|
24
|
-
readonly integer?: boolean;
|
|
25
|
-
readonly minimum?: number;
|
|
26
|
-
readonly maximum?: number;
|
|
27
|
-
} | {
|
|
28
|
-
readonly kind: 'stringArray';
|
|
29
|
-
} | {
|
|
30
|
-
readonly kind: 'object';
|
|
31
|
-
readonly properties: Record<string, AuthoringArgumentDescriptor>;
|
|
32
|
-
});
|
|
33
|
-
interface AuthoringStorageTypeTemplate {
|
|
34
|
-
readonly codecId: string;
|
|
35
|
-
readonly nativeType: AuthoringTemplateValue;
|
|
36
|
-
readonly typeParams?: Record<string, AuthoringTemplateValue>;
|
|
37
|
-
}
|
|
38
|
-
interface AuthoringTypeConstructorDescriptor {
|
|
39
|
-
readonly kind: 'typeConstructor';
|
|
40
|
-
readonly args?: readonly AuthoringArgumentDescriptor[];
|
|
41
|
-
readonly output: AuthoringStorageTypeTemplate;
|
|
42
|
-
}
|
|
43
|
-
interface AuthoringColumnDefaultTemplateLiteral {
|
|
44
|
-
readonly kind: 'literal';
|
|
45
|
-
readonly value: AuthoringTemplateValue;
|
|
46
|
-
}
|
|
47
|
-
interface AuthoringColumnDefaultTemplateFunction {
|
|
48
|
-
readonly kind: 'function';
|
|
49
|
-
readonly expression: AuthoringTemplateValue;
|
|
50
|
-
}
|
|
51
|
-
type AuthoringColumnDefaultTemplate = AuthoringColumnDefaultTemplateLiteral | AuthoringColumnDefaultTemplateFunction;
|
|
52
|
-
interface AuthoringExecutionDefaultsTemplate {
|
|
53
|
-
readonly onCreate?: AuthoringTemplateValue;
|
|
54
|
-
readonly onUpdate?: AuthoringTemplateValue;
|
|
55
|
-
}
|
|
56
|
-
interface AuthoringFieldPresetOutput extends AuthoringStorageTypeTemplate {
|
|
57
|
-
readonly nullable?: boolean;
|
|
58
|
-
readonly default?: AuthoringColumnDefaultTemplate;
|
|
59
|
-
readonly executionDefaults?: AuthoringExecutionDefaultsTemplate;
|
|
60
|
-
readonly id?: boolean;
|
|
61
|
-
readonly unique?: boolean;
|
|
62
|
-
}
|
|
63
|
-
interface AuthoringFieldPresetDescriptor {
|
|
64
|
-
readonly kind: 'fieldPreset';
|
|
65
|
-
readonly args?: readonly AuthoringArgumentDescriptor[];
|
|
66
|
-
readonly output: AuthoringFieldPresetOutput;
|
|
67
|
-
}
|
|
68
|
-
type AuthoringTypeNamespace = {
|
|
69
|
-
readonly [name: string]: AuthoringTypeConstructorDescriptor | AuthoringTypeNamespace;
|
|
70
|
-
};
|
|
71
|
-
type AuthoringFieldNamespace = {
|
|
72
|
-
readonly [name: string]: AuthoringFieldPresetDescriptor | AuthoringFieldNamespace;
|
|
73
|
-
};
|
|
74
|
-
/**
|
|
75
|
-
* Context surfaced to entity-type factories at call time. Currently a
|
|
76
|
-
* placeholder — sharpened as concrete consumers (enum, namespace, …)
|
|
77
|
-
* discover what the factory actually needs to read (codec lookup,
|
|
78
|
-
* namespace registry, …).
|
|
79
|
-
*/
|
|
80
|
-
interface AuthoringEntityContext {
|
|
81
|
-
readonly family: string;
|
|
82
|
-
readonly target: string;
|
|
83
|
-
}
|
|
84
|
-
interface AuthoringEntityTypeTemplateOutput {
|
|
85
|
-
readonly template: AuthoringTemplateValue;
|
|
86
|
-
}
|
|
87
|
-
/**
|
|
88
|
-
* Default `Input = never` is load-bearing for pack-bag-driven type
|
|
89
|
-
* narrowing. Factory parameter positions are contravariant, so a pack
|
|
90
|
-
* literal declaring `factory: (input: DemoEntityInput) => DemoEntity`
|
|
91
|
-
* is only assignable to the base descriptor's factory shape if the
|
|
92
|
-
* base's input is `never` (the bottom of the contravariant position).
|
|
93
|
-
* The concrete input/output types are recovered at the helper-derivation
|
|
94
|
-
* site via `EntityHelperFunction<Descriptor>`'s conditional inference,
|
|
95
|
-
* which reads them from the pack's `as const` literal factory signature
|
|
96
|
-
* — the base widening does not erase the literal because `satisfies`
|
|
97
|
-
* does not widen the declared type.
|
|
98
|
-
*/
|
|
99
|
-
interface AuthoringEntityTypeFactoryOutput<Input = never, Output = unknown> {
|
|
100
|
-
readonly factory: (input: Input, ctx: AuthoringEntityContext) => Output;
|
|
101
|
-
}
|
|
102
|
-
interface AuthoringEntityTypeDescriptor<Input = never, Output = unknown> {
|
|
103
|
-
readonly kind: 'entity';
|
|
104
|
-
readonly discriminator: string;
|
|
105
|
-
readonly args?: readonly AuthoringArgumentDescriptor[];
|
|
106
|
-
readonly output: AuthoringEntityTypeTemplateOutput | AuthoringEntityTypeFactoryOutput<Input, Output>;
|
|
107
|
-
/**
|
|
108
|
-
* arktype schema fragment for one entry whose envelope `kind` matches
|
|
109
|
-
* this descriptor's {@link discriminator}. The family validator composes
|
|
110
|
-
* contributed fragments into the per-namespace entry schema at
|
|
111
|
-
* validator construction time so the structural check covers
|
|
112
|
-
* pack-introduced kinds without the family core hard-coding the schema.
|
|
113
|
-
*
|
|
114
|
-
* Hydration uses {@link AuthoringEntityTypeFactoryOutput.factory}
|
|
115
|
-
* directly — the wire shape conforms structurally to the factory's
|
|
116
|
-
* `Input` after `validatorSchema` validates it.
|
|
117
|
-
*/
|
|
118
|
-
readonly validatorSchema?: Type<unknown>;
|
|
119
|
-
}
|
|
120
|
-
type AuthoringEntityTypeNamespace = {
|
|
121
|
-
readonly [name: string]: AuthoringEntityTypeDescriptor | AuthoringEntityTypeNamespace;
|
|
122
|
-
};
|
|
123
|
-
interface AuthoringContributions {
|
|
124
|
-
readonly type?: AuthoringTypeNamespace;
|
|
125
|
-
readonly field?: AuthoringFieldNamespace;
|
|
126
|
-
readonly entityTypes?: AuthoringEntityTypeNamespace;
|
|
127
|
-
}
|
|
128
|
-
declare function isAuthoringArgRef(value: unknown): value is AuthoringArgRef;
|
|
129
|
-
declare function isAuthoringTypeConstructorDescriptor(value: unknown): value is AuthoringTypeConstructorDescriptor;
|
|
130
|
-
declare function isAuthoringFieldPresetDescriptor(value: unknown): value is AuthoringFieldPresetDescriptor;
|
|
131
|
-
declare function isAuthoringEntityTypeDescriptor(value: unknown): value is AuthoringEntityTypeDescriptor;
|
|
132
|
-
/**
|
|
133
|
-
* Returns true when `namespace` is a non-leaf key in `contributions.field`.
|
|
134
|
-
*
|
|
135
|
-
* `AuthoringFieldNamespace` permits a leaf descriptor at any depth — including
|
|
136
|
-
* the root — so a top-level `field: { Foo: { kind: 'fieldPreset', ... } }`
|
|
137
|
-
* registration must NOT be treated as a "namespace" with sub-paths. Callers
|
|
138
|
-
* use this predicate to gate dot-namespaced lookups (e.g. PSL `@Foo.bar`).
|
|
139
|
-
*/
|
|
140
|
-
declare function hasRegisteredFieldNamespace(contributions: AuthoringContributions | undefined, namespace: string): boolean;
|
|
141
|
-
/**
|
|
142
|
-
* Merges `source` into `target` recursively at the descriptor-namespace
|
|
143
|
-
* level. `leafGuard` decides which values are descriptors (terminal
|
|
144
|
-
* merge points; same-path registrations across components are reported
|
|
145
|
-
* as duplicates) versus sub-namespaces (recursion targets).
|
|
146
|
-
*
|
|
147
|
-
* Path segments are validated against prototype-pollution names
|
|
148
|
-
* (`__proto__`, `constructor`, `prototype`). A value that is neither a
|
|
149
|
-
* recognized leaf nor a plain object — e.g. a malformed descriptor
|
|
150
|
-
* where the canonical leaf guard rejected it for missing `output` —
|
|
151
|
-
* is reported as an invalid contribution rather than recursed into,
|
|
152
|
-
* which would either silently mangle state or infinite-loop on
|
|
153
|
-
* primitive properties.
|
|
154
|
-
*
|
|
155
|
-
* Within-registry duplicate detection is this walker's job;
|
|
156
|
-
* cross-registry detection runs separately via
|
|
157
|
-
* `assertNoCrossRegistryCollisions` after merging completes.
|
|
158
|
-
*/
|
|
159
|
-
declare function mergeAuthoringNamespaces(target: Record<string, unknown>, source: Record<string, unknown>, path: readonly string[], leafGuard: (value: unknown) => boolean, label: string): void;
|
|
160
|
-
declare function assertNoCrossRegistryCollisions(typeNamespace: AuthoringTypeNamespace, fieldNamespace: AuthoringFieldNamespace, entityTypeNamespace?: AuthoringEntityTypeNamespace): void;
|
|
161
|
-
declare function resolveAuthoringTemplateValue(template: AuthoringTemplateValue, args: readonly unknown[]): unknown;
|
|
162
|
-
declare function validateAuthoringHelperArguments(helperPath: string, descriptors: readonly AuthoringArgumentDescriptor[] | undefined, args: readonly unknown[]): void;
|
|
163
|
-
declare function instantiateAuthoringTypeConstructor(descriptor: AuthoringTypeConstructorDescriptor, args: readonly unknown[]): {
|
|
164
|
-
readonly codecId: string;
|
|
165
|
-
readonly nativeType: string;
|
|
166
|
-
readonly typeParams?: Record<string, unknown>;
|
|
167
|
-
};
|
|
168
|
-
declare function instantiateAuthoringEntityType(helperPath: string, descriptor: AuthoringEntityTypeDescriptor, args: readonly unknown[], ctx: AuthoringEntityContext): unknown;
|
|
169
|
-
declare function instantiateAuthoringFieldPreset(descriptor: AuthoringFieldPresetDescriptor, args: readonly unknown[]): {
|
|
170
|
-
readonly descriptor: {
|
|
171
|
-
readonly codecId: string;
|
|
172
|
-
readonly nativeType: string;
|
|
173
|
-
readonly typeParams?: Record<string, unknown>;
|
|
174
|
-
};
|
|
175
|
-
readonly nullable: boolean;
|
|
176
|
-
readonly default?: ColumnDefault;
|
|
177
|
-
readonly executionDefaults?: ExecutionMutationDefaultPhases;
|
|
178
|
-
readonly id: boolean;
|
|
179
|
-
readonly unique: boolean;
|
|
180
|
-
};
|
|
181
|
-
//#endregion
|
|
182
|
-
export { isAuthoringEntityTypeDescriptor as C, resolveAuthoringTemplateValue as D, mergeAuthoringNamespaces as E, validateAuthoringHelperArguments as O, isAuthoringArgRef as S, isAuthoringTypeConstructorDescriptor as T, assertNoCrossRegistryCollisions as _, AuthoringEntityContext as a, instantiateAuthoringFieldPreset as b, AuthoringEntityTypeNamespace as c, AuthoringFieldPresetDescriptor as d, AuthoringFieldPresetOutput as f, AuthoringTypeNamespace as g, AuthoringTypeConstructorDescriptor as h, AuthoringContributions as i, AuthoringEntityTypeTemplateOutput as l, AuthoringTemplateValue as m, AuthoringArgumentDescriptor as n, AuthoringEntityTypeDescriptor as o, AuthoringStorageTypeTemplate as p, AuthoringColumnDefaultTemplate as r, AuthoringEntityTypeFactoryOutput as s, AuthoringArgRef as t, AuthoringFieldNamespace as u, hasRegisteredFieldNamespace as v, isAuthoringFieldPresetDescriptor as w, instantiateAuthoringTypeConstructor as x, instantiateAuthoringEntityType as y };
|
|
183
|
-
//# sourceMappingURL=framework-authoring-Cv04iZjB.d.mts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"framework-authoring-Cv04iZjB.d.mts","names":[],"sources":["../src/shared/framework-authoring.ts"],"mappings":";;;;KAYY,eAAA;EAAA,SACD,IAAA;EAAA,SACA,KAAA;EAAA,SACA,IAAA;EAAA,SACA,OAAA,GAAU,sBAAsB;AAAA;AAAA,KAG/B,sBAAA,sCAKR,eAAA,YACS,sBAAA;EAAA,UACG,GAAA,WAAc,sBAAA;AAAA;AAAA,UAEpB,iCAAA;EAAA,SACC,IAAA;EAAA,SACA,QAAQ;AAAA;AAAA,KAGP,2BAAA,GAA8B,iCAAA;EAAA,SAEzB,IAAA;AAAA;EAAA,SACA,IAAA;AAAA;EAAA,SAEA,IAAA;EAAA,SACA,OAAA;EAAA,SACA,OAAA;EAAA,SACA,OAAA;AAAA;EAAA,SAEA,IAAA;AAAA;EAAA,SAEA,IAAA;EAAA,SACA,UAAA,EAAY,MAAA,SAAe,2BAAA;AAAA;AAAA,UAI3B,4BAAA;EAAA,SACN,OAAA;EAAA,SACA,UAAA,EAAY,sBAAA;EAAA,SACZ,UAAA,GAAa,MAAA,SAAe,sBAAA;AAAA;AAAA,UAGtB,kCAAA;EAAA,SACN,IAAA;EAAA,SACA,IAAA,YAAgB,2BAAA;EAAA,SAChB,MAAA,EAAQ,4BAA4B;AAAA;AAAA,UAG9B,qCAAA;EAAA,SACN,IAAA;EAAA,SACA,KAAA,EAAO,sBAAsB;AAAA;AAAA,UAGvB,sCAAA;EAAA,SACN,IAAA;EAAA,SACA,UAAA,EAAY,sBAAsB;AAAA;AAAA,KAGjC,8BAAA,GACR,qCAAA,GACA,sCAAsC;AAAA,UAEzB,kCAAA;EAAA,SACN,QAAA,GAAW,sBAAA;EAAA,SACX,QAAA,GAAW,sBAAsB;AAAA;AAAA,UAG3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KAAA,IAAS,8BAA8B;AAAA,iBAU1B,+BAAA,CACd,KAAA,YACC,KAAA,IAAS,6BAA6B;;;;;AA3HxB;AAGjB;;;iBAqJgB,2BAAA,CACd,aAAA,EAAe,sBAAsB,cACrC,SAAA;;;;;;;AApJ2C;AAG7C;;;;;;;;AACsF;AAGtF;;iBA2KgB,wBAAA,CACd,MAAA,EAAQ,MAAA,mBACR,MAAA,EAAQ,MAAM,mBACd,IAAA,qBACA,SAAA,GAAY,KAAA,uBACZ,KAAA;AAAA,iBAoEc,+BAAA,CACd,aAAA,EAAe,sBAAA,EACf,cAAA,EAAgB,uBAAA,EAChB,mBAAA,GAAqB,4BAAA;AAAA,iBAgCP,6BAAA,CACd,QAAA,EAAU,sBAAsB,EAChC,IAAA;AAAA,iBAiHc,gCAAA,CACd,UAAA,UACA,WAAA,WAAsB,2BAA2B,gBACjD,IAAA;AAAA,iBAmHc,mCAAA,CACd,UAAA,EAAY,kCAAA,EACZ,IAAA;EAAA,SAES,OAAA;EAAA,SACA,UAAA;EAAA,SACA,UAAA,GAAa,MAAM;AAAA;AAAA,iBAKd,8BAAA,CACd,UAAA,UACA,UAAA,EAAY,6BAAA,EACZ,IAAA,sBACA,GAAA,EAAK,sBAAsB;AAAA,iBA0Bb,+BAAA,CACd,UAAA,EAAY,8BAAA,EACZ,IAAA;EAAA,SAES,UAAA;IAAA,SACE,OAAA;IAAA,SACA,UAAA;IAAA,SACA,UAAA,GAAa,MAAA;EAAA;EAAA,SAEf,QAAA;EAAA,SACA,OAAA,GAAU,aAAA;EAAA,SACV,iBAAA,GAAoB,8BAAA;EAAA,SACpB,EAAA;EAAA,SACA,MAAA;AAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"framework-authoring-Szvddbl3.mjs","names":[],"sources":["../src/shared/framework-authoring.ts"],"sourcesContent":["import type {\n ColumnDefault,\n ExecutionMutationDefaultPhases,\n ExecutionMutationDefaultValue,\n} from '@prisma-next/contract/types';\nimport {\n isColumnDefaultLiteralInputValue,\n isExecutionMutationDefaultValue,\n} from '@prisma-next/contract/types';\nimport { ifDefined } from '@prisma-next/utils/defined';\nimport type { Type } from 'arktype';\n\nexport type AuthoringArgRef = {\n readonly kind: 'arg';\n readonly index: number;\n readonly path?: readonly string[];\n readonly default?: AuthoringTemplateValue;\n};\n\nexport type AuthoringTemplateValue =\n | string\n | number\n | boolean\n | null\n | AuthoringArgRef\n | readonly AuthoringTemplateValue[]\n | { readonly [key: string]: AuthoringTemplateValue };\n\ninterface AuthoringArgumentDescriptorCommon {\n readonly name?: string;\n readonly optional?: boolean;\n}\n\nexport type AuthoringArgumentDescriptor = AuthoringArgumentDescriptorCommon &\n (\n | { readonly kind: 'string' }\n | { readonly kind: 'boolean' }\n | {\n readonly kind: 'number';\n readonly integer?: boolean;\n readonly minimum?: number;\n readonly maximum?: number;\n }\n | { readonly kind: 'stringArray' }\n | {\n readonly kind: 'object';\n readonly properties: Record<string, AuthoringArgumentDescriptor>;\n }\n );\n\nexport interface AuthoringStorageTypeTemplate {\n readonly codecId: string;\n readonly nativeType: AuthoringTemplateValue;\n readonly typeParams?: Record<string, AuthoringTemplateValue>;\n}\n\nexport interface AuthoringTypeConstructorDescriptor {\n readonly kind: 'typeConstructor';\n readonly args?: readonly AuthoringArgumentDescriptor[];\n readonly output: AuthoringStorageTypeTemplate;\n}\n\nexport interface AuthoringColumnDefaultTemplateLiteral {\n readonly kind: 'literal';\n readonly value: AuthoringTemplateValue;\n}\n\nexport interface AuthoringColumnDefaultTemplateFunction {\n readonly kind: 'function';\n readonly expression: AuthoringTemplateValue;\n}\n\nexport type AuthoringColumnDefaultTemplate =\n | AuthoringColumnDefaultTemplateLiteral\n | AuthoringColumnDefaultTemplateFunction;\n\nexport interface AuthoringExecutionDefaultsTemplate {\n readonly onCreate?: AuthoringTemplateValue;\n readonly onUpdate?: AuthoringTemplateValue;\n}\n\nexport interface AuthoringFieldPresetOutput extends AuthoringStorageTypeTemplate {\n readonly nullable?: boolean;\n readonly default?: AuthoringColumnDefaultTemplate;\n readonly executionDefaults?: AuthoringExecutionDefaultsTemplate;\n readonly id?: boolean;\n readonly unique?: boolean;\n}\n\nexport interface AuthoringFieldPresetDescriptor {\n readonly kind: 'fieldPreset';\n readonly args?: readonly AuthoringArgumentDescriptor[];\n readonly output: AuthoringFieldPresetOutput;\n}\n\nexport type AuthoringTypeNamespace = {\n readonly [name: string]: AuthoringTypeConstructorDescriptor | AuthoringTypeNamespace;\n};\n\nexport type AuthoringFieldNamespace = {\n readonly [name: string]: AuthoringFieldPresetDescriptor | AuthoringFieldNamespace;\n};\n\n/**\n * Context surfaced to entity-type factories at call time. Currently a\n * placeholder — sharpened as concrete consumers (enum, namespace, …)\n * discover what the factory actually needs to read (codec lookup,\n * namespace registry, …).\n */\nexport interface AuthoringEntityContext {\n readonly family: string;\n readonly target: string;\n}\n\nexport interface AuthoringEntityTypeTemplateOutput {\n readonly template: AuthoringTemplateValue;\n}\n\n/**\n * Default `Input = never` is load-bearing for pack-bag-driven type\n * narrowing. Factory parameter positions are contravariant, so a pack\n * literal declaring `factory: (input: DemoEntityInput) => DemoEntity`\n * is only assignable to the base descriptor's factory shape if the\n * base's input is `never` (the bottom of the contravariant position).\n * The concrete input/output types are recovered at the helper-derivation\n * site via `EntityHelperFunction<Descriptor>`'s conditional inference,\n * which reads them from the pack's `as const` literal factory signature\n * — the base widening does not erase the literal because `satisfies`\n * does not widen the declared type.\n */\nexport interface AuthoringEntityTypeFactoryOutput<Input = never, Output = unknown> {\n readonly factory: (input: Input, ctx: AuthoringEntityContext) => Output;\n}\n\nexport interface AuthoringEntityTypeDescriptor<Input = never, Output = unknown> {\n readonly kind: 'entity';\n readonly discriminator: string;\n readonly args?: readonly AuthoringArgumentDescriptor[];\n readonly output:\n | AuthoringEntityTypeTemplateOutput\n | AuthoringEntityTypeFactoryOutput<Input, Output>;\n /**\n * arktype schema fragment for one entry whose envelope `kind` matches\n * this descriptor's {@link discriminator}. The family validator composes\n * contributed fragments into the per-namespace entry schema at\n * validator construction time so the structural check covers\n * pack-introduced kinds without the family core hard-coding the schema.\n *\n * Hydration uses {@link AuthoringEntityTypeFactoryOutput.factory}\n * directly — the wire shape conforms structurally to the factory's\n * `Input` after `validatorSchema` validates it.\n */\n readonly validatorSchema?: Type<unknown>;\n}\n\nexport type AuthoringEntityTypeNamespace = {\n readonly [name: string]: AuthoringEntityTypeDescriptor | AuthoringEntityTypeNamespace;\n};\n\nexport interface AuthoringContributions {\n readonly type?: AuthoringTypeNamespace;\n readonly field?: AuthoringFieldNamespace;\n readonly entityTypes?: AuthoringEntityTypeNamespace;\n}\n\nexport function isAuthoringArgRef(value: unknown): value is AuthoringArgRef {\n if (typeof value !== 'object' || value === null || (value as { kind?: unknown }).kind !== 'arg') {\n return false;\n }\n const { index, path } = value as { index?: unknown; path?: unknown };\n if (typeof index !== 'number' || !Number.isInteger(index) || index < 0) {\n return false;\n }\n if (path !== undefined && (!Array.isArray(path) || path.some((s) => typeof s !== 'string'))) {\n return false;\n }\n return true;\n}\n\nfunction isAuthoringTemplateRecord(value: unknown): value is Record<string, unknown> {\n return typeof value === 'object' && value !== null && !Array.isArray(value);\n}\n\nexport function isAuthoringTypeConstructorDescriptor(\n value: unknown,\n): value is AuthoringTypeConstructorDescriptor {\n return (\n typeof value === 'object' &&\n value !== null &&\n (value as { kind?: unknown }).kind === 'typeConstructor' &&\n typeof (value as { output?: unknown }).output === 'object' &&\n (value as { output?: unknown }).output !== null\n );\n}\n\nexport function isAuthoringFieldPresetDescriptor(\n value: unknown,\n): value is AuthoringFieldPresetDescriptor {\n return (\n typeof value === 'object' &&\n value !== null &&\n (value as { kind?: unknown }).kind === 'fieldPreset' &&\n typeof (value as { output?: unknown }).output === 'object' &&\n (value as { output?: unknown }).output !== null\n );\n}\n\nexport function isAuthoringEntityTypeDescriptor(\n value: unknown,\n): value is AuthoringEntityTypeDescriptor {\n if (\n typeof value !== 'object' ||\n value === null ||\n (value as { kind?: unknown }).kind !== 'entity'\n ) {\n return false;\n }\n const discriminator = (value as { discriminator?: unknown }).discriminator;\n if (typeof discriminator !== 'string' || discriminator.length === 0) {\n return false;\n }\n const output = (value as { output?: unknown }).output;\n if (typeof output !== 'object' || output === null) {\n return false;\n }\n const factory = (output as { factory?: unknown }).factory;\n const template = (output as { template?: unknown }).template;\n return typeof factory === 'function' || template !== undefined;\n}\n\n/**\n * Returns true when `namespace` is a non-leaf key in `contributions.field`.\n *\n * `AuthoringFieldNamespace` permits a leaf descriptor at any depth — including\n * the root — so a top-level `field: { Foo: { kind: 'fieldPreset', ... } }`\n * registration must NOT be treated as a \"namespace\" with sub-paths. Callers\n * use this predicate to gate dot-namespaced lookups (e.g. PSL `@Foo.bar`).\n */\nexport function hasRegisteredFieldNamespace(\n contributions: AuthoringContributions | undefined,\n namespace: string,\n): boolean {\n if (contributions?.field === undefined || !Object.hasOwn(contributions.field, namespace)) {\n return false;\n }\n return !isAuthoringFieldPresetDescriptor(contributions.field[namespace]);\n}\n\nfunction isPlainNamespaceObject(value: unknown): value is Record<string, unknown> {\n return typeof value === 'object' && value !== null && !Array.isArray(value);\n}\n\n/**\n * Merges `source` into `target` recursively at the descriptor-namespace\n * level. `leafGuard` decides which values are descriptors (terminal\n * merge points; same-path registrations across components are reported\n * as duplicates) versus sub-namespaces (recursion targets).\n *\n * Path segments are validated against prototype-pollution names\n * (`__proto__`, `constructor`, `prototype`). A value that is neither a\n * recognized leaf nor a plain object — e.g. a malformed descriptor\n * where the canonical leaf guard rejected it for missing `output` —\n * is reported as an invalid contribution rather than recursed into,\n * which would either silently mangle state or infinite-loop on\n * primitive properties.\n *\n * Within-registry duplicate detection is this walker's job;\n * cross-registry detection runs separately via\n * `assertNoCrossRegistryCollisions` after merging completes.\n */\nexport function mergeAuthoringNamespaces(\n target: Record<string, unknown>,\n source: Record<string, unknown>,\n path: readonly string[],\n leafGuard: (value: unknown) => boolean,\n label: string,\n): void {\n const assertSafePath = (currentPath: readonly string[]) => {\n const blockedSegment = currentPath.find(\n (segment) => segment === '__proto__' || segment === 'constructor' || segment === 'prototype',\n );\n if (blockedSegment) {\n throw new Error(\n `Invalid authoring ${label} helper \"${currentPath.join('.')}\". Helper path segments must not use \"${blockedSegment}\".`,\n );\n }\n };\n\n for (const [key, sourceValue] of Object.entries(source)) {\n const currentPath = [...path, key];\n assertSafePath(currentPath);\n const hasExistingValue = Object.hasOwn(target, key);\n const existingValue = hasExistingValue ? target[key] : undefined;\n\n if (!hasExistingValue) {\n target[key] = sourceValue;\n continue;\n }\n\n const existingIsLeaf = leafGuard(existingValue);\n const sourceIsLeaf = leafGuard(sourceValue);\n\n if (existingIsLeaf || sourceIsLeaf) {\n throw new Error(\n `Duplicate authoring ${label} helper \"${currentPath.join('.')}\". Helper names must be unique across composed packs.`,\n );\n }\n\n if (!isPlainNamespaceObject(existingValue) || !isPlainNamespaceObject(sourceValue)) {\n throw new Error(\n `Invalid authoring ${label} helper \"${currentPath.join('.')}\". Expected a sub-namespace object or a recognized descriptor; received a malformed value.`,\n );\n }\n\n mergeAuthoringNamespaces(existingValue, sourceValue, currentPath, leafGuard, label);\n }\n}\n\nfunction collectAuthoringLeafPaths(\n namespace: Readonly<Record<string, unknown>>,\n isLeaf: (value: unknown) => boolean,\n path: readonly string[] = [],\n): string[] {\n const paths: string[] = [];\n for (const [key, value] of Object.entries(namespace)) {\n const currentPath = [...path, key];\n if (isLeaf(value)) {\n paths.push(currentPath.join('.'));\n continue;\n }\n if (typeof value === 'object' && value !== null && !Array.isArray(value)) {\n paths.push(\n ...collectAuthoringLeafPaths(\n value as Readonly<Record<string, unknown>>,\n isLeaf,\n currentPath,\n ),\n );\n }\n }\n return paths;\n}\n\nexport function assertNoCrossRegistryCollisions(\n typeNamespace: AuthoringTypeNamespace,\n fieldNamespace: AuthoringFieldNamespace,\n entityTypeNamespace: AuthoringEntityTypeNamespace = {},\n): void {\n const typePaths = new Set(\n collectAuthoringLeafPaths(typeNamespace, isAuthoringTypeConstructorDescriptor),\n );\n const fieldPaths = new Set(\n collectAuthoringLeafPaths(fieldNamespace, isAuthoringFieldPresetDescriptor),\n );\n const entityPaths = new Set(\n collectAuthoringLeafPaths(entityTypeNamespace, isAuthoringEntityTypeDescriptor),\n );\n // Within-registry duplicate detection is handled upstream by the merge\n // walker (`mergeAuthoringNamespaces` in control-stack.ts and\n // `mergeHelperNamespaces` in composed-authoring-helpers.ts), which throws\n // on same-path registrations within any single registry before this check\n // runs. This function only handles the cross-registry case.\n for (const fieldPath of fieldPaths) {\n if (typePaths.has(fieldPath)) {\n throw new Error(\n `Ambiguous authoring registry path \"${fieldPath}\". The same path is registered as both a type constructor and a field preset; PSL resolution would be ambiguous. Register each path in only one of authoringContributions.field / authoringContributions.type / authoringContributions.entityTypes.`,\n );\n }\n }\n for (const entityPath of entityPaths) {\n if (typePaths.has(entityPath) || fieldPaths.has(entityPath)) {\n throw new Error(\n `Ambiguous authoring registry path \"${entityPath}\". The same path is registered as an entity contribution AND as a type constructor or field preset; PSL resolution would be ambiguous. Register each path in only one of authoringContributions.field / authoringContributions.type / authoringContributions.entityTypes.`,\n );\n }\n }\n}\n\nexport function resolveAuthoringTemplateValue(\n template: AuthoringTemplateValue,\n args: readonly unknown[],\n): unknown {\n if (isAuthoringArgRef(template)) {\n let value = args[template.index];\n\n for (const segment of template.path ?? []) {\n if (!isAuthoringTemplateRecord(value) || !Object.hasOwn(value, segment)) {\n value = undefined;\n break;\n }\n value = (value as Record<string, unknown>)[segment];\n }\n\n if (value === undefined && template.default !== undefined) {\n return resolveAuthoringTemplateValue(template.default, args);\n }\n\n return value;\n }\n if (Array.isArray(template)) {\n return template.map((value) => resolveAuthoringTemplateValue(value, args));\n }\n if (typeof template === 'object' && template !== null) {\n const resolved: Record<string, unknown> = {};\n for (const [key, value] of Object.entries(template)) {\n const resolvedValue = resolveAuthoringTemplateValue(value, args);\n if (resolvedValue !== undefined) {\n resolved[key] = resolvedValue;\n }\n }\n return resolved;\n }\n return template;\n}\n\nfunction validateAuthoringArgument(\n descriptor: AuthoringArgumentDescriptor,\n value: unknown,\n path: string,\n): void {\n if (value === undefined) {\n if (descriptor.optional) {\n return;\n }\n throw new Error(`Missing required authoring helper argument at ${path}`);\n }\n\n if (descriptor.kind === 'string') {\n if (typeof value !== 'string') {\n throw new Error(`Authoring helper argument at ${path} must be a string`);\n }\n return;\n }\n\n if (descriptor.kind === 'boolean') {\n if (typeof value !== 'boolean') {\n throw new Error(`Authoring helper argument at ${path} must be a boolean`);\n }\n return;\n }\n\n if (descriptor.kind === 'stringArray') {\n if (!Array.isArray(value)) {\n throw new Error(`Authoring helper argument at ${path} must be an array of strings`);\n }\n for (const entry of value) {\n if (typeof entry !== 'string') {\n throw new Error(`Authoring helper argument at ${path} must be an array of strings`);\n }\n }\n return;\n }\n\n if (descriptor.kind === 'object') {\n if (typeof value !== 'object' || value === null || Array.isArray(value)) {\n throw new Error(`Authoring helper argument at ${path} must be an object`);\n }\n\n const input = value as Record<string, unknown>;\n const expectedKeys = new Set(Object.keys(descriptor.properties));\n\n for (const key of Object.keys(input)) {\n if (!expectedKeys.has(key)) {\n throw new Error(`Authoring helper argument at ${path} contains unknown property \"${key}\"`);\n }\n }\n\n for (const [key, propertyDescriptor] of Object.entries(descriptor.properties)) {\n validateAuthoringArgument(propertyDescriptor, input[key], `${path}.${key}`);\n }\n\n return;\n }\n\n if (typeof value !== 'number' || Number.isNaN(value)) {\n throw new Error(`Authoring helper argument at ${path} must be a number`);\n }\n\n if (descriptor.integer && !Number.isInteger(value)) {\n throw new Error(`Authoring helper argument at ${path} must be an integer`);\n }\n if (descriptor.minimum !== undefined && value < descriptor.minimum) {\n throw new Error(\n `Authoring helper argument at ${path} must be >= ${descriptor.minimum}, received ${value}`,\n );\n }\n if (descriptor.maximum !== undefined && value > descriptor.maximum) {\n throw new Error(\n `Authoring helper argument at ${path} must be <= ${descriptor.maximum}, received ${value}`,\n );\n }\n}\n\nexport function validateAuthoringHelperArguments(\n helperPath: string,\n descriptors: readonly AuthoringArgumentDescriptor[] | undefined,\n args: readonly unknown[],\n): void {\n const expected = descriptors ?? [];\n const minimumArgs = expected.reduce(\n (count, descriptor, index) => (descriptor.optional ? count : index + 1),\n 0,\n );\n if (args.length < minimumArgs || args.length > expected.length) {\n throw new Error(\n `${helperPath} expects ${minimumArgs === expected.length ? expected.length : `${minimumArgs}-${expected.length}`} argument(s), received ${args.length}`,\n );\n }\n\n expected.forEach((descriptor, index) => {\n validateAuthoringArgument(descriptor, args[index], `${helperPath}[${index}]`);\n });\n}\n\nfunction resolveAuthoringStorageTypeTemplate(\n template: AuthoringStorageTypeTemplate,\n args: readonly unknown[],\n): {\n readonly codecId: string;\n readonly nativeType: string;\n readonly typeParams?: Record<string, unknown>;\n} {\n const nativeType = resolveAuthoringTemplateValue(template.nativeType, args);\n if (typeof nativeType !== 'string') {\n throw new Error(\n `Resolved authoring nativeType must be a string for codec \"${template.codecId}\", received ${String(nativeType)}`,\n );\n }\n const typeParams =\n template.typeParams === undefined\n ? undefined\n : resolveAuthoringTemplateValue(template.typeParams, args);\n if (typeParams !== undefined && !isAuthoringTemplateRecord(typeParams)) {\n throw new Error(\n `Resolved authoring typeParams must be an object for codec \"${template.codecId}\", received ${String(typeParams)}`,\n );\n }\n\n return {\n codecId: template.codecId,\n nativeType,\n ...(typeParams === undefined ? {} : { typeParams }),\n };\n}\n\nfunction resolveAuthoringColumnDefaultTemplate(\n template: AuthoringColumnDefaultTemplate,\n args: readonly unknown[],\n): ColumnDefault {\n if (template.kind === 'literal') {\n const value = resolveAuthoringTemplateValue(template.value, args);\n if (value === undefined) {\n throw new Error('Resolved authoring literal default must not be undefined');\n }\n if (!isColumnDefaultLiteralInputValue(value)) {\n throw new Error(\n `Resolved authoring literal default must be a JSON-serializable value or Date, received ${String(value)}`,\n );\n }\n return {\n kind: 'literal',\n value,\n };\n }\n\n const expression = resolveAuthoringTemplateValue(template.expression, args);\n if (expression === undefined || (typeof expression === 'object' && expression !== null)) {\n throw new Error(\n `Resolved authoring function default expression must resolve to a primitive, received ${String(expression)}`,\n );\n }\n return {\n kind: 'function',\n expression: String(expression),\n };\n}\n\nfunction resolveExecutionMutationDefaultPhase(\n phase: 'onCreate' | 'onUpdate',\n template: AuthoringTemplateValue,\n args: readonly unknown[],\n): ExecutionMutationDefaultValue {\n const value = resolveAuthoringTemplateValue(template, args);\n if (!isExecutionMutationDefaultValue(value)) {\n throw new Error(\n `Authoring preset executionDefaults.${phase} did not resolve to a valid generator descriptor (kind: 'generator', id: string).`,\n );\n }\n return value;\n}\n\nfunction resolveAuthoringExecutionDefaultsTemplate(\n template: AuthoringExecutionDefaultsTemplate,\n args: readonly unknown[],\n): ExecutionMutationDefaultPhases {\n return {\n ...ifDefined(\n 'onCreate',\n template.onCreate !== undefined\n ? resolveExecutionMutationDefaultPhase('onCreate', template.onCreate, args)\n : undefined,\n ),\n ...ifDefined(\n 'onUpdate',\n template.onUpdate !== undefined\n ? resolveExecutionMutationDefaultPhase('onUpdate', template.onUpdate, args)\n : undefined,\n ),\n };\n}\n\nexport function instantiateAuthoringTypeConstructor(\n descriptor: AuthoringTypeConstructorDescriptor,\n args: readonly unknown[],\n): {\n readonly codecId: string;\n readonly nativeType: string;\n readonly typeParams?: Record<string, unknown>;\n} {\n return resolveAuthoringStorageTypeTemplate(descriptor.output, args);\n}\n\nexport function instantiateAuthoringEntityType(\n helperPath: string,\n descriptor: AuthoringEntityTypeDescriptor,\n args: readonly unknown[],\n ctx: AuthoringEntityContext,\n): unknown {\n // Factory-output entities carry their input contract on the factory\n // signature itself — TypeScript narrows callers via\n // `EntityHelperFunction`'s extracted `input` parameter, and the factory\n // is free to do its own runtime validation (e.g. arktype Type). The\n // descriptor-level `args` validator is reserved for template-output\n // entities (which mirror field/type's declarative argument shape).\n if ('factory' in descriptor.output) {\n const input = args[0];\n // The base `AuthoringEntityTypeDescriptor`'s factory is typed\n // `(input: never, ctx) => unknown` so concrete pack-literal factories\n // with narrower input types remain assignable through the\n // contravariant position (see the type's docstring). The runtime\n // delegates input validation to the pack's factory itself, so we\n // forward the supplied input here without a static input contract.\n const factory = descriptor.output.factory as (\n input: unknown,\n ctx: AuthoringEntityContext,\n ) => unknown;\n return factory(input, ctx);\n }\n validateAuthoringHelperArguments(helperPath, descriptor.args, args);\n return resolveAuthoringTemplateValue(descriptor.output.template, args);\n}\n\nexport function instantiateAuthoringFieldPreset(\n descriptor: AuthoringFieldPresetDescriptor,\n args: readonly unknown[],\n): {\n readonly descriptor: {\n readonly codecId: string;\n readonly nativeType: string;\n readonly typeParams?: Record<string, unknown>;\n };\n readonly nullable: boolean;\n readonly default?: ColumnDefault;\n readonly executionDefaults?: ExecutionMutationDefaultPhases;\n readonly id: boolean;\n readonly unique: boolean;\n} {\n return {\n descriptor: resolveAuthoringStorageTypeTemplate(descriptor.output, args),\n nullable: descriptor.output.nullable ?? false,\n ...ifDefined(\n 'default',\n descriptor.output.default !== undefined\n ? resolveAuthoringColumnDefaultTemplate(descriptor.output.default, args)\n : undefined,\n ),\n ...ifDefined(\n 'executionDefaults',\n descriptor.output.executionDefaults !== undefined\n ? resolveAuthoringExecutionDefaultsTemplate(descriptor.output.executionDefaults, args)\n : undefined,\n ),\n id: descriptor.output.id ?? false,\n unique: descriptor.output.unique ?? false,\n };\n}\n"],"mappings":";;;AAqKA,SAAgB,kBAAkB,OAA0C;CAC1E,IAAI,OAAO,UAAU,YAAY,UAAU,QAAS,MAA6B,SAAS,OACxF,OAAO;CAET,MAAM,EAAE,OAAO,SAAS;CACxB,IAAI,OAAO,UAAU,YAAY,CAAC,OAAO,UAAU,KAAK,KAAK,QAAQ,GACnE,OAAO;CAET,IAAI,SAAS,KAAA,MAAc,CAAC,MAAM,QAAQ,IAAI,KAAK,KAAK,MAAM,MAAM,OAAO,MAAM,QAAQ,IACvF,OAAO;CAET,OAAO;AACT;AAEA,SAAS,0BAA0B,OAAkD;CACnF,OAAO,OAAO,UAAU,YAAY,UAAU,QAAQ,CAAC,MAAM,QAAQ,KAAK;AAC5E;AAEA,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