@prisma/orm-framework 8.0.0-rc.24-dev.27 → 8.0.0-rc.24-dev.29
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/README.md +2 -0
- package/dist/{authoring-DnYn5EZT.mjs → authoring-BoRTq-7r.mjs} +2 -2
- package/dist/{authoring-DnYn5EZT.mjs.map → authoring-BoRTq-7r.mjs.map} +1 -1
- package/dist/{binder-CMy3WM5A-gjYNJqla.d.mts → binder-CMy3WM5A-BjkRdpH6.d.mts} +4 -4
- package/dist/{binder-CMy3WM5A-gjYNJqla.d.mts.map → binder-CMy3WM5A-BjkRdpH6.d.mts.map} +1 -1
- package/dist/boolean-C37kSXDF.mjs +14 -0
- package/dist/boolean-C37kSXDF.mjs.map +1 -0
- package/dist/boolean-CcUSuhCU.d.mts +9 -0
- package/dist/boolean-CcUSuhCU.d.mts.map +1 -0
- package/dist/{codec-yFwW7XRh.mjs → codec-CBJNOQS4.mjs} +2 -2
- package/dist/{codec-yFwW7XRh.mjs.map → codec-CBJNOQS4.mjs.map} +1 -1
- package/dist/{components-BaV9iCkq.mjs → components-Bx7dm2HO.mjs} +2 -2
- package/dist/{components-BaV9iCkq.mjs.map → components-Bx7dm2HO.mjs.map} +1 -1
- package/dist/components.d.mts +5 -5
- package/dist/components.mjs +7 -8
- package/dist/components__authoring.mjs +2 -2
- package/dist/components__codec.mjs +1 -1
- package/dist/components__components.mjs +2 -2
- package/dist/components__control.d.mts +1 -1
- package/dist/components__control.mjs +2 -2
- package/dist/components__emission.d.mts +3 -3
- package/dist/components__emission.mjs +1 -2
- package/dist/{config-types-D0mYyP62.mjs → config-types-DlaG0ylV.mjs} +4 -2
- package/dist/config-types-DlaG0ylV.mjs.map +1 -0
- package/dist/{config-types-Ck3UXVIU.d.mts → config-types-DvM9eXG7.d.mts} +6 -2
- package/dist/{config-types-Ck3UXVIU.d.mts.map → config-types-DvM9eXG7.d.mts.map} +1 -1
- package/dist/config.d.mts +1 -1
- package/dist/config.mjs +1 -1
- package/dist/config__config-types.d.mts +1 -1
- package/dist/config__config-types.mjs +1 -1
- package/dist/contract-authoring.mjs +3 -3
- package/dist/{control-BeXOxtXA-CoPQgVyR.d.mts → control-BeXOxtXA-D1DDBvDL.d.mts} +2 -2
- package/dist/{control-BeXOxtXA-CoPQgVyR.d.mts.map → control-BeXOxtXA-D1DDBvDL.d.mts.map} +1 -1
- package/dist/control-DI1fnOUO.d.mts +1 -0
- package/dist/{control-B0KO727Y.mjs → control-DNwP6V2m.mjs} +3 -3
- package/dist/{control-B0KO727Y.mjs.map → control-DNwP6V2m.mjs.map} +1 -1
- package/dist/{control-MllEQmML-IlhSvGbE.mjs → control-MllEQmML-aKdJLwRB.mjs} +2 -2
- package/dist/{control-MllEQmML-IlhSvGbE.mjs.map → control-MllEQmML-aKdJLwRB.mjs.map} +1 -1
- package/dist/{control-B3QHYJcv.d.mts → control-rzZBO0wp.d.mts} +116 -121
- package/dist/control-rzZBO0wp.d.mts.map +1 -0
- package/dist/decimal-CetFpCr5.mjs +49 -0
- package/dist/decimal-CetFpCr5.mjs.map +1 -0
- package/dist/decimal-DpMh1SwW.d.mts +15 -0
- package/dist/decimal-DpMh1SwW.d.mts.map +1 -0
- package/dist/{declarations-8CRDqUTt-B0YG2lqY.mjs → declarations-8CRDqUTt-BZ6aspIz.mjs} +2 -2
- package/dist/{declarations-8CRDqUTt-B0YG2lqY.mjs.map → declarations-8CRDqUTt-BZ6aspIz.mjs.map} +1 -1
- package/dist/{dist-D1f6xr7F.mjs → dist-s8Mn2iIF.mjs} +7 -10
- package/dist/dist-s8Mn2iIF.mjs.map +1 -0
- package/dist/{emission-DGYCaKjl.d.mts → emission-ZgkI1aFl.d.mts} +1 -1
- package/dist/{emission-types-bX2HmNSC-vaRddb1_.d.mts → emission-types-BuZVDb1i-BnSb9rsQ.d.mts} +6 -42
- package/dist/emission-types-BuZVDb1i-BnSb9rsQ.d.mts.map +1 -0
- package/dist/errors.d.mts +4 -4
- package/dist/errors.mjs +3 -3
- package/dist/errors__control.d.mts +2 -2
- package/dist/errors__control.mjs +1 -1
- package/dist/errors__execution.d.mts +1 -1
- package/dist/errors__execution.mjs +1 -1
- package/dist/errors__migration.d.mts +1 -1
- package/dist/errors__migration.mjs +1 -1
- package/dist/{execution-DLAnWNAh.d.mts → execution-Bbc4v1Vn.d.mts} +2 -2
- package/dist/{execution-DLAnWNAh.d.mts.map → execution-Bbc4v1Vn.d.mts.map} +1 -1
- package/dist/{execution-DE_55Rj3.mjs → execution-DMqI5fFP.mjs} +2 -2
- package/dist/{execution-DE_55Rj3.mjs.map → execution-DMqI5fFP.mjs.map} +1 -1
- package/dist/{expressions-BlhT51Ib-CQCMuQD8.mjs → expressions-BlhT51Ib-DfkeWOwr.mjs} +2 -2
- package/dist/{expressions-BlhT51Ib-CQCMuQD8.mjs.map → expressions-BlhT51Ib-DfkeWOwr.mjs.map} +1 -1
- package/dist/{generator-functions-CXbQfvYu-BIFU1Ryx.mjs → generator-functions-VMolCOGa-xY11fV0Q.mjs} +4 -3
- package/dist/generator-functions-VMolCOGa-xY11fV0Q.mjs.map +1 -0
- package/dist/json-Cjj5_v0y.mjs +67 -0
- package/dist/json-Cjj5_v0y.mjs.map +1 -0
- package/dist/json-oOHvzn6v.d.mts +18 -0
- package/dist/json-oOHvzn6v.d.mts.map +1 -0
- package/dist/{migration-rWN1KSXH.mjs → migration-BfPqhbjG.mjs} +2 -2
- package/dist/{migration-rWN1KSXH.mjs.map → migration-BfPqhbjG.mjs.map} +1 -1
- package/dist/{migration-KEyQBpKF.d.mts → migration-BiqyI92H.d.mts} +2 -2
- package/dist/{migration-KEyQBpKF.d.mts.map → migration-BiqyI92H.d.mts.map} +1 -1
- package/dist/{parse-D-B_nrfC-FsqZwLif.mjs → parse-D-B_nrfC-agY84gQk.mjs} +3 -3
- package/dist/{parse-D-B_nrfC-FsqZwLif.mjs.map → parse-D-B_nrfC-agY84gQk.mjs.map} +1 -1
- package/dist/{parse-djL5wker-Bx0JH2c_.d.mts → parse-djL5wker-DNAOL0Cj.d.mts} +2 -2
- package/dist/{parse-djL5wker-Bx0JH2c_.d.mts.map → parse-djL5wker-DNAOL0Cj.d.mts.map} +1 -1
- package/dist/psl-parser.d.mts +3 -3
- package/dist/psl-parser.mjs +5 -5
- package/dist/psl-parser__format.d.mts +1 -1
- package/dist/psl-parser__format.mjs +3 -3
- package/dist/psl-parser__interpret.d.mts +3 -3
- package/dist/psl-parser__interpret.mjs +2 -2
- package/dist/psl-parser__syntax.d.mts +1 -1
- package/dist/psl-parser__syntax.mjs +3 -3
- package/dist/psl-printer.mjs +5 -2
- package/dist/psl-printer.mjs.map +1 -1
- package/dist/target-package-config.d.mts +2 -0
- package/dist/target-package-config.mjs +2 -0
- package/dist/target-package-config__type-declarations.d.mts +2 -0
- package/dist/target-package-config__type-declarations.mjs +2 -0
- package/dist/{temporal-type-aliases-CFh3BW2a-DOlmiuQn.mjs → temporal-type-aliases-CFh3BW2a-CeZV7A5h.mjs} +2 -2
- package/dist/{temporal-type-aliases-CFh3BW2a-DOlmiuQn.mjs.map → temporal-type-aliases-CFh3BW2a-CeZV7A5h.mjs.map} +1 -1
- package/dist/ts-render.mjs +1 -1
- package/dist/{type-constructor-calls-Bfg5ojed-Ld7LE20u.mjs → type-constructor-calls-Bfg5ojed-DlLeoRYW.mjs} +4 -4
- package/dist/{type-constructor-calls-Bfg5ojed-Ld7LE20u.mjs.map → type-constructor-calls-Bfg5ojed-DlLeoRYW.mjs.map} +1 -1
- package/dist/type-declarations-CPPGpPSj.mjs +58 -0
- package/dist/type-declarations-CPPGpPSj.mjs.map +1 -0
- package/dist/type-declarations-C_77eFnt.d.mts +11 -0
- package/dist/type-declarations-C_77eFnt.d.mts.map +1 -0
- package/dist/type-implementations.d.mts +4 -1
- package/dist/type-implementations.mjs +4 -1
- package/dist/type-implementations__boolean.d.mts +2 -0
- package/dist/type-implementations__boolean.mjs +2 -0
- package/dist/type-implementations__decimal.d.mts +2 -0
- package/dist/type-implementations__decimal.mjs +2 -0
- package/dist/type-implementations__json.d.mts +2 -0
- package/dist/type-implementations__json.mjs +2 -0
- package/package.json +22 -16
- package/dist/config-types-D0mYyP62.mjs.map +0 -1
- package/dist/control-B0WmeKXX.d.mts +0 -1
- package/dist/control-B3QHYJcv.d.mts.map +0 -1
- package/dist/dist-D1f6xr7F.mjs.map +0 -1
- package/dist/emission-CeoAV9mj.mjs +0 -26
- package/dist/emission-CeoAV9mj.mjs.map +0 -1
- package/dist/emission-types-bX2HmNSC-vaRddb1_.d.mts.map +0 -1
- package/dist/generator-functions-CXbQfvYu-BIFU1Ryx.mjs.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"type-constructor-calls-Bfg5ojed-Ld7LE20u.mjs","names":[],"sources":["../../../../1-framework/2-authoring/psl-parser/dist/contributed-type-scope-CUwinsgb.mjs","../../../../1-framework/2-authoring/psl-parser/dist/type-constructor-calls-Bfg5ojed.mjs"],"sourcesContent":["import { a as NumberLiteralExprAst, i as FunctionCallAst, l as StringLiteralExprAst, m as IdentifierAst, r as BooleanLiteralExprAst, s as ObjectLiteralExprAst, t as ArrayLiteralAst, u as TaggedLiteralExprAst, y as printSyntax } from \"./expressions-BlhT51Ib.mjs\";\nimport { admittedForms, describeExpected, readWrittenValueAs, resolveAuthoringTypeChoice, typeConstructorLookup } from \"@internal/framework-components/authoring\";\nimport { InternalError, isInternalError } from \"@internal/utils/internal-error\";\nimport { notOk, ok } from \"@internal/utils/result\";\nimport { describeTaggedLiteralFailure } from \"@internal/framework-components/control\";\nimport { createDataTypeLookup, dataTypeId } from \"@internal/framework-components/codec\";\n//#region src/diagnostic.ts\nfunction diagnosticSource(sources, node) {\n\treturn {\n\t\tsources,\n\t\tnode,\n\t\tat(span) {\n\t\t\tconst sourceFile = sources.sourceFileFor(node);\n\t\t\tconst range = span === void 0 ? {\n\t\t\t\tstart: sourceFile.positionAt(node.offset),\n\t\t\t\tend: sourceFile.positionAt(node.endOffset)\n\t\t\t} : sourceFile.pslSpanToRange(span);\n\t\t\treturn {\n\t\t\t\tfilename: sourceFile.filename,\n\t\t\t\trange\n\t\t\t};\n\t\t}\n\t};\n}\nfunction diagnosticFromSpan(diagnostic, source) {\n\tif (diagnostic.span === void 0) throw new InternalError(\"Owned PSL diagnostic has no span\");\n\treturn {\n\t\tcode: diagnostic.code,\n\t\tmessage: diagnostic.message,\n\t\t...source.at(diagnostic.span),\n\t\t...diagnostic.data === void 0 ? {} : { data: diagnostic.data }\n\t};\n}\nfunction mapPslDiagnostics(diagnostics, sources) {\n\treturn diagnostics.map(({ filename, code, message, range, data }) => ({\n\t\tcode,\n\t\tmessage,\n\t\tsourceId: filename,\n\t\tspan: sources.sourceFileNamed(filename).rangeToPslSpan(range),\n\t\t...data === void 0 ? {} : { data }\n\t}));\n}\nfunction createPslDiagnosticCollector(sources) {\n\tconst entries = [];\n\treturn {\n\t\tget length() {\n\t\t\treturn entries.length;\n\t\t},\n\t\tpush(...diagnostics) {\n\t\t\tfor (const diagnostic of diagnostics) entries.push({\n\t\t\t\tkind: \"psl\",\n\t\t\t\tdiagnostic\n\t\t\t});\n\t\t},\n\t\tpushUnlocated(...diagnostics) {\n\t\t\tfor (const diagnostic of diagnostics) entries.push({\n\t\t\t\tkind: \"psl\",\n\t\t\t\tdiagnostic,\n\t\t\t\tomitSpan: true\n\t\t\t});\n\t\t},\n\t\tpushExternal(...diagnostics) {\n\t\t\tfor (const diagnostic of diagnostics) entries.push({\n\t\t\t\tkind: \"external\",\n\t\t\t\tdiagnostic\n\t\t\t});\n\t\t},\n\t\ttoExternal() {\n\t\t\treturn entries.flatMap((entry) => {\n\t\t\t\tif (entry.kind === \"external\") return [entry.diagnostic];\n\t\t\t\tif (entry.omitSpan) {\n\t\t\t\t\tconst { code, message, filename, data } = entry.diagnostic;\n\t\t\t\t\treturn [{\n\t\t\t\t\t\tcode,\n\t\t\t\t\t\tmessage,\n\t\t\t\t\t\tsourceId: filename,\n\t\t\t\t\t\t...data === void 0 ? {} : { data }\n\t\t\t\t\t}];\n\t\t\t\t}\n\t\t\t\treturn mapPslDiagnostics([entry.diagnostic], sources);\n\t\t\t});\n\t\t}\n\t};\n}\n//#endregion\n//#region src/resolve.ts\nfunction readResolvedAttribute(attribute, sources) {\n\treturn {\n\t\tname: attributeName(attribute.name()),\n\t\targs: readResolvedArgList(attribute.argList(), sources),\n\t\tspan: nodePslSpan(attribute.syntax, sources),\n\t\tnode: attribute\n\t};\n}\nfunction readResolvedAttributes(attributes, sources) {\n\treturn Array.from(attributes, (attribute) => readResolvedAttribute(attribute, sources));\n}\nfunction readResolvedConstructorCall(annotation, sources) {\n\tconst argList = annotation?.argList();\n\tif (annotation === void 0 || argList === void 0) return void 0;\n\treturn {\n\t\tpath: annotation.name()?.path() ?? [],\n\t\targs: readResolvedArgList(argList, sources),\n\t\tspan: nodePslSpan(annotation.syntax, sources)\n\t};\n}\nfunction readResolvedArgList(argList, sources) {\n\tif (argList === void 0) return [];\n\tconst args = [];\n\tfor (const arg of argList.args()) {\n\t\tconst name = arg.name()?.name();\n\t\tconst expression = arg.value();\n\t\targs.push({\n\t\t\tkind: name !== void 0 ? \"named\" : \"positional\",\n\t\t\t...name !== void 0 ? { name } : {},\n\t\t\tvalue: renderExpression(expression),\n\t\t\t...expression !== void 0 ? { expression } : {},\n\t\t\tspan: nodePslSpan(arg.syntax, sources),\n\t\t\tnode: arg\n\t\t});\n\t}\n\treturn args;\n}\nfunction attributeName(name) {\n\treturn name?.path().join(\".\") ?? \"\";\n}\nfunction renderExpression(expression) {\n\tif (expression === void 0) return \"\";\n\treturn printSyntax(expression.syntax).trim();\n}\nfunction nodePslSpan(node, sources) {\n\tconst sourceFile = sources.sourceFileFor(node);\n\tconst start = node.offset;\n\tconst end = start + node.green.textLength;\n\treturn {\n\t\tstart: sourceFile.offsetToPslPosition(start),\n\t\tend: sourceFile.offsetToPslPosition(end)\n\t};\n}\n/** Unsupported-top-level-block diagnostics are anchored to the keyword token. */\nfunction keywordPslSpan(node, keyword, sources) {\n\tconst sourceFile = sources.sourceFileFor(node);\n\tconst start = node.offset;\n\tconst end = start + keyword.length;\n\treturn {\n\t\tstart: sourceFile.offsetToPslPosition(start),\n\t\tend: sourceFile.offsetToPslPosition(end)\n\t};\n}\n//#endregion\n//#region src/written-scalar.ts\nconst AN_EXPRESSION = {\n\tok: false,\n\treason: \"not-a-literal\",\n\tfound: \"an expression\"\n};\nfunction written(value) {\n\treturn {\n\t\tok: true,\n\t\twritten: value\n\t};\n}\n/** Reads a PSL literal expression as a `WrittenScalar`, for a position that takes a value of a data type. ADR 254. */\nfunction readWrittenScalar(expression) {\n\tconst syntax = expression.syntax;\n\tconst string = StringLiteralExprAst.cast(syntax)?.value();\n\tif (string !== void 0) return written({\n\t\tkind: \"string\",\n\t\ttext: string\n\t});\n\tconst number = NumberLiteralExprAst.cast(syntax);\n\tif (number !== void 0) {\n\t\tconst text = number.token()?.text;\n\t\treturn text === void 0 ? AN_EXPRESSION : written({\n\t\t\tkind: \"number\",\n\t\t\ttext\n\t\t});\n\t}\n\tconst boolean = BooleanLiteralExprAst.cast(syntax)?.value();\n\tif (boolean !== void 0) return written({\n\t\tkind: \"boolean\",\n\t\tvalue: boolean\n\t});\n\tconst tagged = TaggedLiteralExprAst.cast(syntax);\n\tif (tagged !== void 0) {\n\t\tconst canonicalization = tagged.canonicalization();\n\t\treturn canonicalization.ok ? written({\n\t\t\tkind: \"tag\",\n\t\t\ttag: tagged.tagName(),\n\t\t\ttext: canonicalization.text\n\t\t}) : {\n\t\t\tok: false,\n\t\t\treason: canonicalization.reason\n\t\t};\n\t}\n\tif (IdentifierAst.cast(syntax) !== void 0) return {\n\t\tok: false,\n\t\treason: \"not-a-literal\",\n\t\tfound: \"an identifier\"\n\t};\n\tif (FunctionCallAst.cast(syntax) !== void 0) return {\n\t\tok: false,\n\t\treason: \"not-a-literal\",\n\t\tfound: \"a function call\"\n\t};\n\tif (ArrayLiteralAst.cast(syntax) !== void 0) return {\n\t\tok: false,\n\t\treason: \"not-a-literal\",\n\t\tfound: \"a list\"\n\t};\n\tif (ObjectLiteralExprAst.cast(syntax) !== void 0) return {\n\t\tok: false,\n\t\treason: \"not-a-literal\",\n\t\tfound: \"an object\"\n\t};\n\treturn AN_EXPRESSION;\n}\n//#endregion\n//#region src/read-expression-as.ts\nconst TAGGED_LITERAL_FAILURE_CODES = {\n\tnul: \"PSL_TAGGED_LITERAL_NUL\",\n\t\"too-large\": \"PSL_TAGGED_LITERAL_TOO_LARGE\"\n};\n/**\n* Reads `expression` as a value of `dataType`: the literal is read through the authoring entry for its syntax, then taken into `dataType` directly or through a cast it declares. The read every argument typed by a data type takes, in an attribute or a type constructor. ADR 254.\n*/\nfunction readExpressionAs(support, dataType, expression) {\n\tif (!support.lookup.has(dataType)) throw new InternalError(`An argument receives data type \"${dataType}\", which this stack does not register.`);\n\tconst forms = admittedForms(support, [dataType]);\n\tif (forms.length === 0) throw new InternalError(`An argument receives data type \"${dataType}\", which nothing in this stack writes.`);\n\tconst literal = readWrittenScalar(expression);\n\tif (!literal.ok) return literal.reason === \"not-a-literal\" ? notOk({\n\t\tcode: \"PSL_INVALID_ATTRIBUTE_SYNTAX\",\n\t\tmessage: `${describeExpected(forms)}; got ${literal.found}`\n\t}) : notOk({\n\t\tcode: TAGGED_LITERAL_FAILURE_CODES[literal.reason],\n\t\tmessage: describeTaggedLiteralFailure(literal.reason)\n\t});\n\treturn readWrittenValueAs(support, dataType, literal.written);\n}\n//#endregion\n//#region src/attribute-spec/spec-context.ts\n/** The data types of a stack that registers none. */\nconst EMPTY_DATA_TYPES = {\n\tentries: {},\n\tlookup: createDataTypeLookup([]),\n\tdataTypeOfCodec: () => void 0\n};\n/** How a diagnostic names a subject, as in `Field \"Post.slug\"` or `Type alias \"Slug\"`. */\nfunction typeAttributeSubjectLabel(subject) {\n\treturn `${subject.kind === \"field\" ? \"Field\" : \"Type alias\"} \"${subject.name}\"`;\n}\nfunction typeAttributeSpecContextOfField(ctx) {\n\treturn {\n\t\tsymbols: ctx.symbols,\n\t\tdefaultFunctionRegistry: ctx.defaultFunctionRegistry,\n\t\tgeneratorFunctions: ctx.generatorFunctions,\n\t\tdataTypes: ctx.dataTypes,\n\t\tsubject: {\n\t\t\tkind: \"field\",\n\t\t\tname: `${ctx.model.name}.${ctx.field.name}`\n\t\t},\n\t\tlist: ctx.field.list,\n\t\ttypeName: ctx.field.typeName,\n\t\ttypeResolution: ctx.typeResolution,\n\t\tcontributedType: ctx.contributedType\n\t};\n}\n//#endregion\n//#region src/call-arguments.ts\n/** The call as the schema writes it, with its arguments separated by `, `. */\nfunction printTypeConstructorCall(call) {\n\tconst args = call.args.map((arg) => arg.kind === \"named\" ? `${arg.name}: ${arg.value}` : arg.value);\n\treturn `${call.path.join(\".\")}(${args.join(\", \")})`;\n}\n/**\n* Binds a call's arguments to its parameters, as PSL reads every call: the positional arguments fill the parameters in order, wherever named ones sit among them, and a named argument fills the parameter it names, which no other argument may fill. The bound arguments come positional ones first, then named ones, each in the order written.\n*/\nfunction bindCallArguments(args, parameters) {\n\tconst positional = args.filter((arg) => arg.kind === \"positional\");\n\tif (positional.length > parameters.length) return notOk({\n\t\tkind: \"tooManyPositional\",\n\t\treceived: positional.length,\n\t\tbound: []\n\t});\n\tconst bound = positional.map((argument, index) => ({\n\t\targument,\n\t\tindex\n\t}));\n\tconst filled = new Set(bound.map(({ index }) => index));\n\tfor (const argument of args.filter((arg) => arg.kind === \"named\")) {\n\t\tconst index = argument.name === void 0 ? -1 : parameters.indexOf(argument.name);\n\t\tif (index < 0) return notOk({\n\t\t\tkind: \"unknownName\",\n\t\t\targument,\n\t\t\tbound\n\t\t});\n\t\tif (filled.has(index)) return notOk({\n\t\t\tkind: \"filledTwice\",\n\t\t\targument,\n\t\t\tbound\n\t\t});\n\t\tfilled.add(index);\n\t\tbound.push({\n\t\t\targument,\n\t\t\tindex\n\t\t});\n\t}\n\treturn ok(bound);\n}\n/** Each argument's value, keyed by the parameter it fills, as {@link bindCallArguments} binds them; `undefined` when they do not bind. */\nfunction argumentsByParameter(args, parameters) {\n\tconst bound = bindCallArguments(args, parameters);\n\tif (!bound.ok) return void 0;\n\tconst values = /* @__PURE__ */ new Map();\n\tfor (const { argument, index } of bound.value) {\n\t\tconst parameter = parameters[index];\n\t\tif (parameter === void 0) return void 0;\n\t\tvalues.set(parameter, argument.value);\n\t}\n\treturn values;\n}\n//#endregion\n//#region src/authoring-arguments.ts\nconst INVALID_AUTHORING_ARGUMENT = Symbol(\"invalidAuthoringArgument\");\n/** Why a written value is not one of the names an option takes, and, for a number that only one value argument takes, that argument. */\nfunction misplacedOptionMessage(descriptors, dataTypes, option, written, argumentLabel) {\n\tconst refused = `${argumentLabel} is ${written}, but argument \"${option.name}\" takes one of these names, written without quotes: ${option.values.join(\", \")}.`;\n\tif (!/^[+-]?\\d/.test(written)) return refused;\n\tconst takers = descriptors.flatMap((descriptor) => descriptor.kind === \"value\" && descriptor.name !== void 0 && readWrittenValueAs(dataTypes, dataTypeId(descriptor.dataType), {\n\t\tkind: \"number\",\n\t\ttext: written\n\t}).ok ? [descriptor.name] : []);\n\tconst [taker] = takers;\n\treturn takers.length === 1 && taker !== void 0 ? `${refused} Write ${taker} by name, as in ${taker}: ${written}.` : refused;\n}\nconst SILENT_REFUSALS = {\n\tcall: () => {},\n\targument: () => {},\n\tvalue: () => {}\n};\n/**\n* The value of one argument as `descriptor` reads it: a `value` argument as a value of its data type, read from its expression as attribute arguments are, and a type choice's option as a bare name. A refusal is reported at the argument.\n*/\nfunction readPslHelperArgument(input, refusals, descriptor, argument, argumentLabel) {\n\tconst refuse = (message) => {\n\t\trefusals.argument(argument.span, message);\n\t\treturn INVALID_AUTHORING_ARGUMENT;\n\t};\n\tif (descriptor.kind === \"option\") {\n\t\tconst written = argument.value.trim();\n\t\tif (/^[A-Za-z_][A-Za-z0-9_]*$/.test(written)) return written;\n\t\treturn refuse(misplacedOptionMessage(input.descriptors, input.dataTypes, descriptor, written, argumentLabel));\n\t}\n\tconst { expression } = argument;\n\tif (expression === void 0 && argument.node !== void 0) return refuse(`${argumentLabel} has no value.`);\n\tif (expression === void 0) throw new InternalError(`A call received ${argumentLabel} with no expression. A value argument is read from the expression a schema writes; a reader that builds a call must pass the arguments it parsed, or instantiate the constructor with values.`);\n\tconst read = readExpressionAs(input.dataTypes, dataTypeId(descriptor.dataType), expression);\n\tif (read.ok) return read.value.value;\n\trefusals.value(expression.syntax, read.failure);\n\treturn INVALID_AUTHORING_ARGUMENT;\n}\nfunction readPslHelperArgsReporting(input, refusals) {\n\tconst bound = bindCallArguments(input.args, input.descriptors.map((descriptor) => descriptor?.name));\n\tconst mappedArgs = input.descriptors.map(() => void 0);\n\tfor (const { argument, index } of bound.ok ? bound.value : bound.failure.bound) {\n\t\tconst descriptor = input.descriptors[index];\n\t\tif (!descriptor) {\n\t\t\trefusals.argument(argument.span, `does not define positional argument #${index + 1}.`);\n\t\t\treturn;\n\t\t}\n\t\tconst value = readPslHelperArgument(input, refusals, descriptor, argument, argument.kind === \"named\" ? `named argument \"${argument.name}\"` : `argument #${index + 1}`);\n\t\tif (value === INVALID_AUTHORING_ARGUMENT) return void 0;\n\t\tmappedArgs[index] = value;\n\t}\n\tif (bound.ok) return mappedArgs;\n\tconst failure = bound.failure;\n\tswitch (failure.kind) {\n\t\tcase \"tooManyPositional\":\n\t\t\trefusals.call(`accepts at most ${input.descriptors.length} argument(s), received ${failure.received}.`);\n\t\t\treturn;\n\t\tcase \"unknownName\":\n\t\t\trefusals.argument(failure.argument.span, `received unknown named argument \"${failure.argument.name}\".`);\n\t\t\treturn;\n\t\tcase \"filledTwice\":\n\t\t\trefusals.argument(failure.argument.span, `received duplicate value for argument \"${failure.argument.name}\".`);\n\t\t\treturn;\n\t}\n}\n/**\n* The arguments of a type constructor or type choice call, positional and named, each read as its descriptor says. `undefined`, with a diagnostic pushed, when one cannot be read or does not match a descriptor.\n*/\nfunction mapPslHelperArgs(input) {\n\tconst refused = (span, message) => input.diagnostics.push({\n\t\tcode: \"PSL_INVALID_ATTRIBUTE_ARGUMENT\",\n\t\tmessage: `${input.entityLabel} ${input.helperLabel} ${message}`,\n\t\t...input.source.at(span)\n\t});\n\treturn readPslHelperArgsReporting(input, {\n\t\tcall: (message) => refused(input.span, message),\n\t\targument: refused,\n\t\tvalue: (node, failure) => input.diagnostics.push({\n\t\t\tcode: failure.code,\n\t\t\tmessage: failure.message,\n\t\t\t...input.source.at(nodePslSpan(node, input.source.sources))\n\t\t})\n\t});\n}\n/**\n* The arguments of a call read as {@link mapPslHelperArgs} reads them, without reporting what it refuses: `undefined` when the call does not read, which the reader that resolves the column reports.\n*/\nfunction readPslHelperArgs(input) {\n\treturn readPslHelperArgsReporting(input, SILENT_REFUSALS);\n}\n//#endregion\n//#region src/contributed-type-scope.ts\nfunction isContributedTypeChoice(symbol) {\n\treturn symbol.descriptor.kind === \"typeChoice\";\n}\nfunction isContributedTypeDescriptor(value) {\n\treturn \"kind\" in value && (value.kind === \"typeConstructor\" || value.kind === \"typeAlias\" || value.kind === \"typeChoice\");\n}\n/** The explicit type a call of the type choice `symbol` chooses and the arguments it is built with, reading the call as the column does, or why it chooses none. */\nfunction chosenTypeConstructor(symbol, call, dataTypes) {\n\tconst helperPath = symbol.path.join(\".\");\n\tconst args = readPslHelperArgs({\n\t\targs: call?.args ?? [],\n\t\tdescriptors: symbol.descriptor.args,\n\t\tdataTypes\n\t});\n\tif (args === void 0) return notOk(`The arguments of ${helperPath} do not read.`);\n\ttry {\n\t\treturn ok(resolveAuthoringTypeChoice({\n\t\t\thelperPath,\n\t\t\tdescriptor: symbol.descriptor,\n\t\t\targs,\n\t\t\tconstructorNamed: (name) => symbol.choiceTypes.get(name)\n\t\t}));\n\t} catch (error) {\n\t\tif (isInternalError(error) || !(error instanceof Error)) throw error;\n\t\treturn notOk(error.message);\n\t}\n}\n/** The codec a column typed by `use` is stored with; `undefined` for a type choice whose call chooses no type, which the column's resolution reports. */\nfunction contributedTypeCodecId(use, dataTypes) {\n\tconst { symbol } = use;\n\tif (isContributedTypeChoice(symbol)) {\n\t\tconst chosen = chosenTypeConstructor(symbol, use.call, dataTypes);\n\t\treturn chosen.ok ? chosen.value.descriptor.output.codecId : void 0;\n\t}\n\tconst { descriptor } = symbol;\n\treturn descriptor.kind === \"typeAlias\" ? descriptor.output.type.codecId : descriptor.output.codecId;\n}\n/** The descriptor at `path` in `namespace`, or `undefined` when none is contributed there. */\nfunction contributedTypeAt(namespace, path) {\n\tconst [name, ...rest] = path;\n\tif (name === void 0 || !Object.hasOwn(namespace, name)) return void 0;\n\tconst value = namespace[name];\n\tif (value === void 0) return void 0;\n\tif (isContributedTypeDescriptor(value)) return rest.length === 0 ? value : void 0;\n\treturn contributedTypeAt(value, rest);\n}\n/** The codec a column typed by `call` is stored with, reading the call's arguments as the column does, or `undefined` when no type is contributed at its path or it is a type choice whose arguments choose no type. */\nfunction writtenContributedTypeCodecId(namespace, call) {\n\treturn codecIdAtPath(namespace, call.path, [], call);\n}\nfunction codecIdAtPath(namespace, path, prefix, call) {\n\tconst [name, ...rest] = path;\n\tif (name === void 0 || !Object.hasOwn(namespace, name)) return void 0;\n\tconst value = namespace[name];\n\tif (value === void 0) return void 0;\n\tconst at = [...prefix, name];\n\tif (!isContributedTypeDescriptor(value)) return codecIdAtPath(value, rest, at, call);\n\tif (rest.length > 0) return void 0;\n\treturn contributedTypeCodecId({\n\t\tsymbol: contributedTypeSymbol(name, at, value, namespace),\n\t\tcall\n\t}, EMPTY_DATA_TYPES);\n}\nfunction contributedTypeScope(contributedTypes) {\n\tconst members = collect(contributedTypes, []);\n\treturn {\n\t\tlookup(name) {\n\t\t\treturn members.get(name);\n\t\t},\n\t\tentries() {\n\t\t\treturn members.entries();\n\t\t}\n\t};\n}\nfunction collect(namespace, prefix) {\n\tconst members = /* @__PURE__ */ new Map();\n\tfor (const [name, value] of Object.entries(namespace)) {\n\t\tconst path = [...prefix, name];\n\t\tmembers.set(name, isContributedTypeDescriptor(value) ? contributedTypeSymbol(name, path, value, namespace) : {\n\t\t\tkind: \"contributedNamespace\",\n\t\t\tname,\n\t\t\tpath,\n\t\t\tmembers: collect(value, path)\n\t\t});\n\t}\n\treturn members;\n}\nfunction contributedTypeSymbol(name, path, descriptor, namespace) {\n\tif (descriptor.kind !== \"typeChoice\") return {\n\t\tkind: \"contributedType\",\n\t\tname,\n\t\tpath,\n\t\tdescriptor\n\t};\n\tconst constructorNamed = typeConstructorLookup(namespace);\n\tconst choiceTypes = /* @__PURE__ */ new Map();\n\tfor (const { type } of descriptor.choices) {\n\t\tconst chosen = constructorNamed(type);\n\t\tif (chosen !== void 0) choiceTypes.set(type, chosen);\n\t}\n\treturn {\n\t\tkind: \"contributedType\",\n\t\tname,\n\t\tpath,\n\t\tdescriptor,\n\t\tchoiceTypes\n\t};\n}\n//#endregion\nexport { mapPslDiagnostics as C, diagnosticSource as S, readResolvedAttribute as _, isContributedTypeChoice as a, createPslDiagnosticCollector as b, argumentsByParameter as c, typeAttributeSpecContextOfField as d, typeAttributeSubjectLabel as f, nodePslSpan as g, keywordPslSpan as h, contributedTypeScope as i, printTypeConstructorCall as l, readWrittenScalar as m, contributedTypeAt as n, writtenContributedTypeCodecId as o, readExpressionAs as p, contributedTypeCodecId as r, mapPslHelperArgs as s, chosenTypeConstructor as t, EMPTY_DATA_TYPES as u, readResolvedAttributes as v, diagnosticFromSpan as x, readResolvedConstructorCall as y };\n\n//# sourceMappingURL=contributed-type-scope-CUwinsgb.mjs.map","//#region src/type-constructor-calls.ts\nfunction isBareTypeConstructor(descriptor) {\n\treturn descriptor.entityRefArg === void 0 && (descriptor.args ?? []).every((arg) => arg.optional === true);\n}\nfunction argumentSpelling(descriptor) {\n\tconst args = descriptor.args ?? [];\n\tconst reference = descriptor.entityRefArg;\n\tconst count = Math.max(args.length, (reference?.index ?? -1) + 1);\n\tconst names = [];\n\tfor (let index = 0; index < count; index++) {\n\t\tconst arg = args[index];\n\t\tif (index === reference?.index) names.push(reference.entityKind);\n\t\telse if (arg !== void 0 && arg.optional !== true) names.push(arg.name ?? `argument${index + 1}`);\n\t}\n\treturn names.join(\", \");\n}\nfunction reportTypeConstructorNotCalled(input) {\n\tinput.diagnostics.push({\n\t\tcode: \"PSL_TYPE_CONSTRUCTOR_NOT_CALLED\",\n\t\tmessage: `${input.entityLabel} uses type constructor \"${input.path}\" without arguments. Write ${input.path}(${argumentSpelling(input.descriptor)}).`,\n\t\t...input.source.at(input.span)\n\t});\n}\n//#endregion\nexport { reportTypeConstructorNotCalled as n, isBareTypeConstructor as t };\n\n//# sourceMappingURL=type-constructor-calls-Bfg5ojed.mjs.map"],"mappings":";;;;;;;AAOA,SAAS,iBAAiB,SAAS,MAAM;CACxC,OAAO;EACN;EACA;EACA,GAAG,MAAM;GACR,MAAM,aAAa,QAAQ,cAAc,IAAI;GAC7C,MAAM,QAAQ,SAAS,KAAK,IAAI;IAC/B,OAAO,WAAW,WAAW,KAAK,MAAM;IACxC,KAAK,WAAW,WAAW,KAAK,SAAS;GAC1C,IAAI,WAAW,eAAe,IAAI;GAClC,OAAO;IACN,UAAU,WAAW;IACrB;GACD;EACD;CACD;AACD;AACA,SAAS,mBAAmB,YAAY,QAAQ;CAC/C,IAAI,WAAW,SAAS,KAAK,GAAG,MAAM,IAAI,cAAc,kCAAkC;CAC1F,OAAO;EACN,MAAM,WAAW;EACjB,SAAS,WAAW;EACpB,GAAG,OAAO,GAAG,WAAW,IAAI;EAC5B,GAAG,WAAW,SAAS,KAAK,IAAI,CAAC,IAAI,EAAE,MAAM,WAAW,KAAK;CAC9D;AACD;AACA,SAAS,kBAAkB,aAAa,SAAS;CAChD,OAAO,YAAY,KAAK,EAAE,UAAU,MAAM,SAAS,OAAO,YAAY;EACrE;EACA;EACA,UAAU;EACV,MAAM,QAAQ,gBAAgB,QAAQ,CAAC,CAAC,eAAe,KAAK;EAC5D,GAAG,SAAS,KAAK,IAAI,CAAC,IAAI,EAAE,KAAK;CAClC,EAAE;AACH;AACA,SAAS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AAG,MAAM,YAAY,0BAA0B,MAAM,KAAK,6BAA6B,MAAM,KAAK,GAAG,iBAAiB,MAAM,UAAU,EAAE;EACjJ,GAAG,MAAM,OAAO,GAAG,MAAM,IAAI;CAC9B,CAAC;AACF"}
|
|
1
|
+
{"version":3,"file":"type-constructor-calls-Bfg5ojed-DlLeoRYW.mjs","names":[],"sources":["../../../../1-framework/2-authoring/psl-parser/dist/contributed-type-scope-CUwinsgb.mjs","../../../../1-framework/2-authoring/psl-parser/dist/type-constructor-calls-Bfg5ojed.mjs"],"sourcesContent":["import { a as NumberLiteralExprAst, i as FunctionCallAst, l as StringLiteralExprAst, m as IdentifierAst, r as BooleanLiteralExprAst, s as ObjectLiteralExprAst, t as ArrayLiteralAst, u as TaggedLiteralExprAst, y as printSyntax } from \"./expressions-BlhT51Ib.mjs\";\nimport { admittedForms, describeExpected, readWrittenValueAs, resolveAuthoringTypeChoice, typeConstructorLookup } from \"@internal/framework-components/authoring\";\nimport { InternalError, isInternalError } from \"@internal/utils/internal-error\";\nimport { notOk, ok } from \"@internal/utils/result\";\nimport { describeTaggedLiteralFailure } from \"@internal/framework-components/control\";\nimport { createDataTypeLookup, dataTypeId } from \"@internal/framework-components/codec\";\n//#region src/diagnostic.ts\nfunction diagnosticSource(sources, node) {\n\treturn {\n\t\tsources,\n\t\tnode,\n\t\tat(span) {\n\t\t\tconst sourceFile = sources.sourceFileFor(node);\n\t\t\tconst range = span === void 0 ? {\n\t\t\t\tstart: sourceFile.positionAt(node.offset),\n\t\t\t\tend: sourceFile.positionAt(node.endOffset)\n\t\t\t} : sourceFile.pslSpanToRange(span);\n\t\t\treturn {\n\t\t\t\tfilename: sourceFile.filename,\n\t\t\t\trange\n\t\t\t};\n\t\t}\n\t};\n}\nfunction diagnosticFromSpan(diagnostic, source) {\n\tif (diagnostic.span === void 0) throw new InternalError(\"Owned PSL diagnostic has no span\");\n\treturn {\n\t\tcode: diagnostic.code,\n\t\tmessage: diagnostic.message,\n\t\t...source.at(diagnostic.span),\n\t\t...diagnostic.data === void 0 ? {} : { data: diagnostic.data }\n\t};\n}\nfunction mapPslDiagnostics(diagnostics, sources) {\n\treturn diagnostics.map(({ filename, code, message, range, data }) => ({\n\t\tcode,\n\t\tmessage,\n\t\tsourceId: filename,\n\t\tspan: sources.sourceFileNamed(filename).rangeToPslSpan(range),\n\t\t...data === void 0 ? {} : { data }\n\t}));\n}\nfunction createPslDiagnosticCollector(sources) {\n\tconst entries = [];\n\treturn {\n\t\tget length() {\n\t\t\treturn entries.length;\n\t\t},\n\t\tpush(...diagnostics) {\n\t\t\tfor (const diagnostic of diagnostics) entries.push({\n\t\t\t\tkind: \"psl\",\n\t\t\t\tdiagnostic\n\t\t\t});\n\t\t},\n\t\tpushUnlocated(...diagnostics) {\n\t\t\tfor (const diagnostic of diagnostics) entries.push({\n\t\t\t\tkind: \"psl\",\n\t\t\t\tdiagnostic,\n\t\t\t\tomitSpan: true\n\t\t\t});\n\t\t},\n\t\tpushExternal(...diagnostics) {\n\t\t\tfor (const diagnostic of diagnostics) entries.push({\n\t\t\t\tkind: \"external\",\n\t\t\t\tdiagnostic\n\t\t\t});\n\t\t},\n\t\ttoExternal() {\n\t\t\treturn entries.flatMap((entry) => {\n\t\t\t\tif (entry.kind === \"external\") return [entry.diagnostic];\n\t\t\t\tif (entry.omitSpan) {\n\t\t\t\t\tconst { code, message, filename, data } = entry.diagnostic;\n\t\t\t\t\treturn [{\n\t\t\t\t\t\tcode,\n\t\t\t\t\t\tmessage,\n\t\t\t\t\t\tsourceId: filename,\n\t\t\t\t\t\t...data === void 0 ? {} : { data }\n\t\t\t\t\t}];\n\t\t\t\t}\n\t\t\t\treturn mapPslDiagnostics([entry.diagnostic], sources);\n\t\t\t});\n\t\t}\n\t};\n}\n//#endregion\n//#region src/resolve.ts\nfunction readResolvedAttribute(attribute, sources) {\n\treturn {\n\t\tname: attributeName(attribute.name()),\n\t\targs: readResolvedArgList(attribute.argList(), sources),\n\t\tspan: nodePslSpan(attribute.syntax, sources),\n\t\tnode: attribute\n\t};\n}\nfunction readResolvedAttributes(attributes, sources) {\n\treturn Array.from(attributes, (attribute) => readResolvedAttribute(attribute, sources));\n}\nfunction readResolvedConstructorCall(annotation, sources) {\n\tconst argList = annotation?.argList();\n\tif (annotation === void 0 || argList === void 0) return void 0;\n\treturn {\n\t\tpath: annotation.name()?.path() ?? [],\n\t\targs: readResolvedArgList(argList, sources),\n\t\tspan: nodePslSpan(annotation.syntax, sources)\n\t};\n}\nfunction readResolvedArgList(argList, sources) {\n\tif (argList === void 0) return [];\n\tconst args = [];\n\tfor (const arg of argList.args()) {\n\t\tconst name = arg.name()?.name();\n\t\tconst expression = arg.value();\n\t\targs.push({\n\t\t\tkind: name !== void 0 ? \"named\" : \"positional\",\n\t\t\t...name !== void 0 ? { name } : {},\n\t\t\tvalue: renderExpression(expression),\n\t\t\t...expression !== void 0 ? { expression } : {},\n\t\t\tspan: nodePslSpan(arg.syntax, sources),\n\t\t\tnode: arg\n\t\t});\n\t}\n\treturn args;\n}\nfunction attributeName(name) {\n\treturn name?.path().join(\".\") ?? \"\";\n}\nfunction renderExpression(expression) {\n\tif (expression === void 0) return \"\";\n\treturn printSyntax(expression.syntax).trim();\n}\nfunction nodePslSpan(node, sources) {\n\tconst sourceFile = sources.sourceFileFor(node);\n\tconst start = node.offset;\n\tconst end = start + node.green.textLength;\n\treturn {\n\t\tstart: sourceFile.offsetToPslPosition(start),\n\t\tend: sourceFile.offsetToPslPosition(end)\n\t};\n}\n/** Unsupported-top-level-block diagnostics are anchored to the keyword token. */\nfunction keywordPslSpan(node, keyword, sources) {\n\tconst sourceFile = sources.sourceFileFor(node);\n\tconst start = node.offset;\n\tconst end = start + keyword.length;\n\treturn {\n\t\tstart: sourceFile.offsetToPslPosition(start),\n\t\tend: sourceFile.offsetToPslPosition(end)\n\t};\n}\n//#endregion\n//#region src/written-scalar.ts\nconst AN_EXPRESSION = {\n\tok: false,\n\treason: \"not-a-literal\",\n\tfound: \"an expression\"\n};\nfunction written(value) {\n\treturn {\n\t\tok: true,\n\t\twritten: value\n\t};\n}\n/** Reads a PSL literal expression as a `WrittenScalar`, for a position that takes a value of a data type. ADR 254. */\nfunction readWrittenScalar(expression) {\n\tconst syntax = expression.syntax;\n\tconst string = StringLiteralExprAst.cast(syntax)?.value();\n\tif (string !== void 0) return written({\n\t\tkind: \"string\",\n\t\ttext: string\n\t});\n\tconst number = NumberLiteralExprAst.cast(syntax);\n\tif (number !== void 0) {\n\t\tconst text = number.token()?.text;\n\t\treturn text === void 0 ? AN_EXPRESSION : written({\n\t\t\tkind: \"number\",\n\t\t\ttext\n\t\t});\n\t}\n\tconst boolean = BooleanLiteralExprAst.cast(syntax)?.value();\n\tif (boolean !== void 0) return written({\n\t\tkind: \"boolean\",\n\t\tvalue: boolean\n\t});\n\tconst tagged = TaggedLiteralExprAst.cast(syntax);\n\tif (tagged !== void 0) {\n\t\tconst canonicalization = tagged.canonicalization();\n\t\treturn canonicalization.ok ? written({\n\t\t\tkind: \"tag\",\n\t\t\ttag: tagged.tagName(),\n\t\t\ttext: canonicalization.text\n\t\t}) : {\n\t\t\tok: false,\n\t\t\treason: canonicalization.reason\n\t\t};\n\t}\n\tif (IdentifierAst.cast(syntax) !== void 0) return {\n\t\tok: false,\n\t\treason: \"not-a-literal\",\n\t\tfound: \"an identifier\"\n\t};\n\tif (FunctionCallAst.cast(syntax) !== void 0) return {\n\t\tok: false,\n\t\treason: \"not-a-literal\",\n\t\tfound: \"a function call\"\n\t};\n\tif (ArrayLiteralAst.cast(syntax) !== void 0) return {\n\t\tok: false,\n\t\treason: \"not-a-literal\",\n\t\tfound: \"a list\"\n\t};\n\tif (ObjectLiteralExprAst.cast(syntax) !== void 0) return {\n\t\tok: false,\n\t\treason: \"not-a-literal\",\n\t\tfound: \"an object\"\n\t};\n\treturn AN_EXPRESSION;\n}\n//#endregion\n//#region src/read-expression-as.ts\nconst TAGGED_LITERAL_FAILURE_CODES = {\n\tnul: \"PSL_TAGGED_LITERAL_NUL\",\n\t\"too-large\": \"PSL_TAGGED_LITERAL_TOO_LARGE\"\n};\n/**\n* Reads `expression` as a value of `dataType`: the literal is read through the authoring entry for its syntax, then taken into `dataType` directly or through a cast it declares. The read every argument typed by a data type takes, in an attribute or a type constructor. ADR 254.\n*/\nfunction readExpressionAs(support, dataType, expression) {\n\tif (!support.lookup.has(dataType)) throw new InternalError(`An argument receives data type \"${dataType}\", which this stack does not register.`);\n\tconst forms = admittedForms(support, [dataType]);\n\tif (forms.length === 0) throw new InternalError(`An argument receives data type \"${dataType}\", which nothing in this stack writes.`);\n\tconst literal = readWrittenScalar(expression);\n\tif (!literal.ok) return literal.reason === \"not-a-literal\" ? notOk({\n\t\tcode: \"PSL_INVALID_ATTRIBUTE_SYNTAX\",\n\t\tmessage: `${describeExpected(forms)}; got ${literal.found}`\n\t}) : notOk({\n\t\tcode: TAGGED_LITERAL_FAILURE_CODES[literal.reason],\n\t\tmessage: describeTaggedLiteralFailure(literal.reason)\n\t});\n\treturn readWrittenValueAs(support, dataType, literal.written);\n}\n//#endregion\n//#region src/attribute-spec/spec-context.ts\n/** The data types of a stack that registers none. */\nconst EMPTY_DATA_TYPES = {\n\tentries: {},\n\tlookup: createDataTypeLookup([]),\n\tdataTypeOfCodec: () => void 0\n};\n/** How a diagnostic names a subject, as in `Field \"Post.slug\"` or `Type alias \"Slug\"`. */\nfunction typeAttributeSubjectLabel(subject) {\n\treturn `${subject.kind === \"field\" ? \"Field\" : \"Type alias\"} \"${subject.name}\"`;\n}\nfunction typeAttributeSpecContextOfField(ctx) {\n\treturn {\n\t\tsymbols: ctx.symbols,\n\t\tdefaultFunctionRegistry: ctx.defaultFunctionRegistry,\n\t\tgeneratorFunctions: ctx.generatorFunctions,\n\t\tdataTypes: ctx.dataTypes,\n\t\tsubject: {\n\t\t\tkind: \"field\",\n\t\t\tname: `${ctx.model.name}.${ctx.field.name}`\n\t\t},\n\t\tlist: ctx.field.list,\n\t\ttypeName: ctx.field.typeName,\n\t\ttypeResolution: ctx.typeResolution,\n\t\tcontributedType: ctx.contributedType\n\t};\n}\n//#endregion\n//#region src/call-arguments.ts\n/** The call as the schema writes it, with its arguments separated by `, `. */\nfunction printTypeConstructorCall(call) {\n\tconst args = call.args.map((arg) => arg.kind === \"named\" ? `${arg.name}: ${arg.value}` : arg.value);\n\treturn `${call.path.join(\".\")}(${args.join(\", \")})`;\n}\n/**\n* Binds a call's arguments to its parameters, as PSL reads every call: the positional arguments fill the parameters in order, wherever named ones sit among them, and a named argument fills the parameter it names, which no other argument may fill. The bound arguments come positional ones first, then named ones, each in the order written.\n*/\nfunction bindCallArguments(args, parameters) {\n\tconst positional = args.filter((arg) => arg.kind === \"positional\");\n\tif (positional.length > parameters.length) return notOk({\n\t\tkind: \"tooManyPositional\",\n\t\treceived: positional.length,\n\t\tbound: []\n\t});\n\tconst bound = positional.map((argument, index) => ({\n\t\targument,\n\t\tindex\n\t}));\n\tconst filled = new Set(bound.map(({ index }) => index));\n\tfor (const argument of args.filter((arg) => arg.kind === \"named\")) {\n\t\tconst index = argument.name === void 0 ? -1 : parameters.indexOf(argument.name);\n\t\tif (index < 0) return notOk({\n\t\t\tkind: \"unknownName\",\n\t\t\targument,\n\t\t\tbound\n\t\t});\n\t\tif (filled.has(index)) return notOk({\n\t\t\tkind: \"filledTwice\",\n\t\t\targument,\n\t\t\tbound\n\t\t});\n\t\tfilled.add(index);\n\t\tbound.push({\n\t\t\targument,\n\t\t\tindex\n\t\t});\n\t}\n\treturn ok(bound);\n}\n/** Each argument's value, keyed by the parameter it fills, as {@link bindCallArguments} binds them; `undefined` when they do not bind. */\nfunction argumentsByParameter(args, parameters) {\n\tconst bound = bindCallArguments(args, parameters);\n\tif (!bound.ok) return void 0;\n\tconst values = /* @__PURE__ */ new Map();\n\tfor (const { argument, index } of bound.value) {\n\t\tconst parameter = parameters[index];\n\t\tif (parameter === void 0) return void 0;\n\t\tvalues.set(parameter, argument.value);\n\t}\n\treturn values;\n}\n//#endregion\n//#region src/authoring-arguments.ts\nconst INVALID_AUTHORING_ARGUMENT = Symbol(\"invalidAuthoringArgument\");\n/** Why a written value is not one of the names an option takes, and, for a number that only one value argument takes, that argument. */\nfunction misplacedOptionMessage(descriptors, dataTypes, option, written, argumentLabel) {\n\tconst refused = `${argumentLabel} is ${written}, but argument \"${option.name}\" takes one of these names, written without quotes: ${option.values.join(\", \")}.`;\n\tif (!/^[+-]?\\d/.test(written)) return refused;\n\tconst takers = descriptors.flatMap((descriptor) => descriptor.kind === \"value\" && descriptor.name !== void 0 && readWrittenValueAs(dataTypes, dataTypeId(descriptor.dataType), {\n\t\tkind: \"number\",\n\t\ttext: written\n\t}).ok ? [descriptor.name] : []);\n\tconst [taker] = takers;\n\treturn takers.length === 1 && taker !== void 0 ? `${refused} Write ${taker} by name, as in ${taker}: ${written}.` : refused;\n}\nconst SILENT_REFUSALS = {\n\tcall: () => {},\n\targument: () => {},\n\tvalue: () => {}\n};\n/**\n* The value of one argument as `descriptor` reads it: a `value` argument as a value of its data type, read from its expression as attribute arguments are, and a type choice's option as a bare name. A refusal is reported at the argument.\n*/\nfunction readPslHelperArgument(input, refusals, descriptor, argument, argumentLabel) {\n\tconst refuse = (message) => {\n\t\trefusals.argument(argument.span, message);\n\t\treturn INVALID_AUTHORING_ARGUMENT;\n\t};\n\tif (descriptor.kind === \"option\") {\n\t\tconst written = argument.value.trim();\n\t\tif (/^[A-Za-z_][A-Za-z0-9_]*$/.test(written)) return written;\n\t\treturn refuse(misplacedOptionMessage(input.descriptors, input.dataTypes, descriptor, written, argumentLabel));\n\t}\n\tconst { expression } = argument;\n\tif (expression === void 0 && argument.node !== void 0) return refuse(`${argumentLabel} has no value.`);\n\tif (expression === void 0) throw new InternalError(`A call received ${argumentLabel} with no expression. A value argument is read from the expression a schema writes; a reader that builds a call must pass the arguments it parsed, or instantiate the constructor with values.`);\n\tconst read = readExpressionAs(input.dataTypes, dataTypeId(descriptor.dataType), expression);\n\tif (read.ok) return read.value.value;\n\trefusals.value(expression.syntax, read.failure);\n\treturn INVALID_AUTHORING_ARGUMENT;\n}\nfunction readPslHelperArgsReporting(input, refusals) {\n\tconst bound = bindCallArguments(input.args, input.descriptors.map((descriptor) => descriptor?.name));\n\tconst mappedArgs = input.descriptors.map(() => void 0);\n\tfor (const { argument, index } of bound.ok ? bound.value : bound.failure.bound) {\n\t\tconst descriptor = input.descriptors[index];\n\t\tif (!descriptor) {\n\t\t\trefusals.argument(argument.span, `does not define positional argument #${index + 1}.`);\n\t\t\treturn;\n\t\t}\n\t\tconst value = readPslHelperArgument(input, refusals, descriptor, argument, argument.kind === \"named\" ? `named argument \"${argument.name}\"` : `argument #${index + 1}`);\n\t\tif (value === INVALID_AUTHORING_ARGUMENT) return void 0;\n\t\tmappedArgs[index] = value;\n\t}\n\tif (bound.ok) return mappedArgs;\n\tconst failure = bound.failure;\n\tswitch (failure.kind) {\n\t\tcase \"tooManyPositional\":\n\t\t\trefusals.call(`accepts at most ${input.descriptors.length} argument(s), received ${failure.received}.`);\n\t\t\treturn;\n\t\tcase \"unknownName\":\n\t\t\trefusals.argument(failure.argument.span, `received unknown named argument \"${failure.argument.name}\".`);\n\t\t\treturn;\n\t\tcase \"filledTwice\":\n\t\t\trefusals.argument(failure.argument.span, `received duplicate value for argument \"${failure.argument.name}\".`);\n\t\t\treturn;\n\t}\n}\n/**\n* The arguments of a type constructor or type choice call, positional and named, each read as its descriptor says. `undefined`, with a diagnostic pushed, when one cannot be read or does not match a descriptor.\n*/\nfunction mapPslHelperArgs(input) {\n\tconst refused = (span, message) => input.diagnostics.push({\n\t\tcode: \"PSL_INVALID_ATTRIBUTE_ARGUMENT\",\n\t\tmessage: `${input.entityLabel} ${input.helperLabel} ${message}`,\n\t\t...input.source.at(span)\n\t});\n\treturn readPslHelperArgsReporting(input, {\n\t\tcall: (message) => refused(input.span, message),\n\t\targument: refused,\n\t\tvalue: (node, failure) => input.diagnostics.push({\n\t\t\tcode: failure.code,\n\t\t\tmessage: failure.message,\n\t\t\t...input.source.at(nodePslSpan(node, input.source.sources))\n\t\t})\n\t});\n}\n/**\n* The arguments of a call read as {@link mapPslHelperArgs} reads them, without reporting what it refuses: `undefined` when the call does not read, which the reader that resolves the column reports.\n*/\nfunction readPslHelperArgs(input) {\n\treturn readPslHelperArgsReporting(input, SILENT_REFUSALS);\n}\n//#endregion\n//#region src/contributed-type-scope.ts\nfunction isContributedTypeChoice(symbol) {\n\treturn symbol.descriptor.kind === \"typeChoice\";\n}\nfunction isContributedTypeDescriptor(value) {\n\treturn \"kind\" in value && (value.kind === \"typeConstructor\" || value.kind === \"typeAlias\" || value.kind === \"typeChoice\");\n}\n/** The explicit type a call of the type choice `symbol` chooses and the arguments it is built with, reading the call as the column does, or why it chooses none. */\nfunction chosenTypeConstructor(symbol, call, dataTypes) {\n\tconst helperPath = symbol.path.join(\".\");\n\tconst args = readPslHelperArgs({\n\t\targs: call?.args ?? [],\n\t\tdescriptors: symbol.descriptor.args,\n\t\tdataTypes\n\t});\n\tif (args === void 0) return notOk(`The arguments of ${helperPath} do not read.`);\n\ttry {\n\t\treturn ok(resolveAuthoringTypeChoice({\n\t\t\thelperPath,\n\t\t\tdescriptor: symbol.descriptor,\n\t\t\targs,\n\t\t\tconstructorNamed: (name) => symbol.choiceTypes.get(name)\n\t\t}));\n\t} catch (error) {\n\t\tif (isInternalError(error) || !(error instanceof Error)) throw error;\n\t\treturn notOk(error.message);\n\t}\n}\n/** The codec a column typed by `use` is stored with; `undefined` for a type choice whose call chooses no type, which the column's resolution reports. */\nfunction contributedTypeCodecId(use, dataTypes) {\n\tconst { symbol } = use;\n\tif (isContributedTypeChoice(symbol)) {\n\t\tconst chosen = chosenTypeConstructor(symbol, use.call, dataTypes);\n\t\treturn chosen.ok ? chosen.value.descriptor.output.codecId : void 0;\n\t}\n\tconst { descriptor } = symbol;\n\treturn descriptor.kind === \"typeAlias\" ? descriptor.output.type.codecId : descriptor.output.codecId;\n}\n/** The descriptor at `path` in `namespace`, or `undefined` when none is contributed there. */\nfunction contributedTypeAt(namespace, path) {\n\tconst [name, ...rest] = path;\n\tif (name === void 0 || !Object.hasOwn(namespace, name)) return void 0;\n\tconst value = namespace[name];\n\tif (value === void 0) return void 0;\n\tif (isContributedTypeDescriptor(value)) return rest.length === 0 ? value : void 0;\n\treturn contributedTypeAt(value, rest);\n}\n/** The codec a column typed by `call` is stored with, reading the call's arguments as the column does, or `undefined` when no type is contributed at its path or it is a type choice whose arguments choose no type. */\nfunction writtenContributedTypeCodecId(namespace, call) {\n\treturn codecIdAtPath(namespace, call.path, [], call);\n}\nfunction codecIdAtPath(namespace, path, prefix, call) {\n\tconst [name, ...rest] = path;\n\tif (name === void 0 || !Object.hasOwn(namespace, name)) return void 0;\n\tconst value = namespace[name];\n\tif (value === void 0) return void 0;\n\tconst at = [...prefix, name];\n\tif (!isContributedTypeDescriptor(value)) return codecIdAtPath(value, rest, at, call);\n\tif (rest.length > 0) return void 0;\n\treturn contributedTypeCodecId({\n\t\tsymbol: contributedTypeSymbol(name, at, value, namespace),\n\t\tcall\n\t}, EMPTY_DATA_TYPES);\n}\nfunction contributedTypeScope(contributedTypes) {\n\tconst members = collect(contributedTypes, []);\n\treturn {\n\t\tlookup(name) {\n\t\t\treturn members.get(name);\n\t\t},\n\t\tentries() {\n\t\t\treturn members.entries();\n\t\t}\n\t};\n}\nfunction collect(namespace, prefix) {\n\tconst members = /* @__PURE__ */ new Map();\n\tfor (const [name, value] of Object.entries(namespace)) {\n\t\tconst path = [...prefix, name];\n\t\tmembers.set(name, isContributedTypeDescriptor(value) ? contributedTypeSymbol(name, path, value, namespace) : {\n\t\t\tkind: \"contributedNamespace\",\n\t\t\tname,\n\t\t\tpath,\n\t\t\tmembers: collect(value, path)\n\t\t});\n\t}\n\treturn members;\n}\nfunction contributedTypeSymbol(name, path, descriptor, namespace) {\n\tif (descriptor.kind !== \"typeChoice\") return {\n\t\tkind: \"contributedType\",\n\t\tname,\n\t\tpath,\n\t\tdescriptor\n\t};\n\tconst constructorNamed = typeConstructorLookup(namespace);\n\tconst choiceTypes = /* @__PURE__ */ new Map();\n\tfor (const { type } of descriptor.choices) {\n\t\tconst chosen = constructorNamed(type);\n\t\tif (chosen !== void 0) choiceTypes.set(type, chosen);\n\t}\n\treturn {\n\t\tkind: \"contributedType\",\n\t\tname,\n\t\tpath,\n\t\tdescriptor,\n\t\tchoiceTypes\n\t};\n}\n//#endregion\nexport { mapPslDiagnostics as C, diagnosticSource as S, readResolvedAttribute as _, isContributedTypeChoice as a, createPslDiagnosticCollector as b, argumentsByParameter as c, typeAttributeSpecContextOfField as d, typeAttributeSubjectLabel as f, nodePslSpan as g, keywordPslSpan as h, contributedTypeScope as i, printTypeConstructorCall as l, readWrittenScalar as m, contributedTypeAt as n, writtenContributedTypeCodecId as o, readExpressionAs as p, contributedTypeCodecId as r, mapPslHelperArgs as s, chosenTypeConstructor as t, EMPTY_DATA_TYPES as u, readResolvedAttributes as v, diagnosticFromSpan as x, readResolvedConstructorCall as y };\n\n//# sourceMappingURL=contributed-type-scope-CUwinsgb.mjs.map","//#region src/type-constructor-calls.ts\nfunction isBareTypeConstructor(descriptor) {\n\treturn descriptor.entityRefArg === void 0 && (descriptor.args ?? []).every((arg) => arg.optional === true);\n}\nfunction argumentSpelling(descriptor) {\n\tconst args = descriptor.args ?? [];\n\tconst reference = descriptor.entityRefArg;\n\tconst count = Math.max(args.length, (reference?.index ?? -1) + 1);\n\tconst names = [];\n\tfor (let index = 0; index < count; index++) {\n\t\tconst arg = args[index];\n\t\tif (index === reference?.index) names.push(reference.entityKind);\n\t\telse if (arg !== void 0 && arg.optional !== true) names.push(arg.name ?? `argument${index + 1}`);\n\t}\n\treturn names.join(\", \");\n}\nfunction reportTypeConstructorNotCalled(input) {\n\tinput.diagnostics.push({\n\t\tcode: \"PSL_TYPE_CONSTRUCTOR_NOT_CALLED\",\n\t\tmessage: `${input.entityLabel} uses type constructor \"${input.path}\" without arguments. Write ${input.path}(${argumentSpelling(input.descriptor)}).`,\n\t\t...input.source.at(input.span)\n\t});\n}\n//#endregion\nexport { reportTypeConstructorNotCalled as n, isBareTypeConstructor as t };\n\n//# sourceMappingURL=type-constructor-calls-Bfg5ojed.mjs.map"],"mappings":";;;;;;;AAOA,SAAS,iBAAiB,SAAS,MAAM;CACxC,OAAO;EACN;EACA;EACA,GAAG,MAAM;GACR,MAAM,aAAa,QAAQ,cAAc,IAAI;GAC7C,MAAM,QAAQ,SAAS,KAAK,IAAI;IAC/B,OAAO,WAAW,WAAW,KAAK,MAAM;IACxC,KAAK,WAAW,WAAW,KAAK,SAAS;GAC1C,IAAI,WAAW,eAAe,IAAI;GAClC,OAAO;IACN,UAAU,WAAW;IACrB;GACD;EACD;CACD;AACD;AACA,SAAS,mBAAmB,YAAY,QAAQ;CAC/C,IAAI,WAAW,SAAS,KAAK,GAAG,MAAM,IAAI,cAAc,kCAAkC;CAC1F,OAAO;EACN,MAAM,WAAW;EACjB,SAAS,WAAW;EACpB,GAAG,OAAO,GAAG,WAAW,IAAI;EAC5B,GAAG,WAAW,SAAS,KAAK,IAAI,CAAC,IAAI,EAAE,MAAM,WAAW,KAAK;CAC9D;AACD;AACA,SAAS,kBAAkB,aAAa,SAAS;CAChD,OAAO,YAAY,KAAK,EAAE,UAAU,MAAM,SAAS,OAAO,YAAY;EACrE;EACA;EACA,UAAU;EACV,MAAM,QAAQ,gBAAgB,QAAQ,CAAC,CAAC,eAAe,KAAK;EAC5D,GAAG,SAAS,KAAK,IAAI,CAAC,IAAI,EAAE,KAAK;CAClC,EAAE;AACH;AACA,SAAS,6BAA6B,SAAS;CAC9C,MAAM,UAAU,CAAC;CACjB,OAAO;EACN,IAAI,SAAS;GACZ,OAAO,QAAQ;EAChB;EACA,KAAK,GAAG,aAAa;GACpB,KAAK,MAAM,cAAc,aAAa,QAAQ,KAAK;IAClD,MAAM;IACN;GACD,CAAC;EACF;EACA,cAAc,GAAG,aAAa;GAC7B,KAAK,MAAM,cAAc,aAAa,QAAQ,KAAK;IAClD,MAAM;I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QH-BRSBMULx.mjs";
|
|
3
|
+
import { o as structuredError } from "./structured-error-BXbihKQ-.mjs";
|
|
4
|
+
//#region ../../../3-targets/0-shared/target-package-config/dist/type-declarations.mjs
|
|
5
|
+
function restatedCodecTypes(codecTypes, module) {
|
|
6
|
+
const named = (spec) => ({
|
|
7
|
+
...spec,
|
|
8
|
+
package: module
|
|
9
|
+
});
|
|
10
|
+
return {
|
|
11
|
+
...codecTypes,
|
|
12
|
+
...ifDefined("import", codecTypes.import && named(codecTypes.import)),
|
|
13
|
+
...ifDefined("typeImports", codecTypes.typeImports?.map(named)),
|
|
14
|
+
...ifDefined("parameterizedOutputTypes", codecTypes.parameterizedOutputTypes && named(codecTypes.parameterizedOutputTypes))
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
function typeImports(types) {
|
|
18
|
+
const { codecTypes, queryOperationTypes } = types;
|
|
19
|
+
return [
|
|
20
|
+
codecTypes?.import,
|
|
21
|
+
...codecTypes?.typeImports ?? [],
|
|
22
|
+
codecTypes?.parameterizedOutputTypes,
|
|
23
|
+
queryOperationTypes?.import
|
|
24
|
+
].filter((spec) => spec !== void 0);
|
|
25
|
+
}
|
|
26
|
+
function refuseNamesFromTwoModules(specs, module) {
|
|
27
|
+
const moduleByName = /* @__PURE__ */ new Map();
|
|
28
|
+
for (const spec of specs) {
|
|
29
|
+
const earlier = moduleByName.get(spec.named);
|
|
30
|
+
if (earlier !== void 0 && earlier !== spec.package) throw structuredError("CONFIG.VALIDATION_FAILED", `Two type declarations import ${spec.named}, from '${earlier}' and from '${spec.package}'; restated to name '${module}', both would import the same type`, { fix: `Export the two types from '${module}' under different names, and name each declaration's type by its own name.` });
|
|
31
|
+
moduleByName.set(spec.named, spec.package);
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* A copy of `descriptor` whose type declarations all name `module`, each keeping its name and alias. A target package's `defineConfig` uses it to state that its target's and adapter's types come from its own `contract-types` module. A descriptor that declares no types is returned as it is. Two declarations of one name from different modules are refused, since both would import the same type.
|
|
36
|
+
*/
|
|
37
|
+
function restateTypeDeclarations(descriptor, module) {
|
|
38
|
+
const { types } = descriptor;
|
|
39
|
+
const specs = types === void 0 ? [] : typeImports(types);
|
|
40
|
+
if (types === void 0 || specs.length === 0) return descriptor;
|
|
41
|
+
refuseNamesFromTwoModules(specs, module);
|
|
42
|
+
const { codecTypes, queryOperationTypes } = types;
|
|
43
|
+
return blindCast({
|
|
44
|
+
...descriptor,
|
|
45
|
+
types: {
|
|
46
|
+
...types,
|
|
47
|
+
...ifDefined("codecTypes", codecTypes && restatedCodecTypes(codecTypes, module)),
|
|
48
|
+
...ifDefined("queryOperationTypes", queryOperationTypes && { import: {
|
|
49
|
+
...queryOperationTypes.import,
|
|
50
|
+
package: module
|
|
51
|
+
} })
|
|
52
|
+
}
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
//#endregion
|
|
56
|
+
export { restateTypeDeclarations as t };
|
|
57
|
+
|
|
58
|
+
//# sourceMappingURL=type-declarations-CPPGpPSj.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"type-declarations-CPPGpPSj.mjs","names":[],"sources":["../../../../3-targets/0-shared/target-package-config/dist/type-declarations.mjs"],"sourcesContent":["import { blindCast } from \"@internal/utils/casts\";\nimport { ifDefined } from \"@internal/utils/defined\";\nimport { structuredError } from \"@internal/utils/structured-error\";\n//#region src/restate-type-declarations.ts\nfunction restatedCodecTypes(codecTypes, module) {\n\tconst named = (spec) => ({\n\t\t...spec,\n\t\tpackage: module\n\t});\n\treturn {\n\t\t...codecTypes,\n\t\t...ifDefined(\"import\", codecTypes.import && named(codecTypes.import)),\n\t\t...ifDefined(\"typeImports\", codecTypes.typeImports?.map(named)),\n\t\t...ifDefined(\"parameterizedOutputTypes\", codecTypes.parameterizedOutputTypes && named(codecTypes.parameterizedOutputTypes))\n\t};\n}\nfunction typeImports(types) {\n\tconst { codecTypes, queryOperationTypes } = types;\n\treturn [\n\t\tcodecTypes?.import,\n\t\t...codecTypes?.typeImports ?? [],\n\t\tcodecTypes?.parameterizedOutputTypes,\n\t\tqueryOperationTypes?.import\n\t].filter((spec) => spec !== void 0);\n}\nfunction refuseNamesFromTwoModules(specs, module) {\n\tconst moduleByName = /* @__PURE__ */ new Map();\n\tfor (const spec of specs) {\n\t\tconst earlier = moduleByName.get(spec.named);\n\t\tif (earlier !== void 0 && earlier !== spec.package) throw structuredError(\"CONFIG.VALIDATION_FAILED\", `Two type declarations import ${spec.named}, from '${earlier}' and from '${spec.package}'; restated to name '${module}', both would import the same type`, { fix: `Export the two types from '${module}' under different names, and name each declaration's type by its own name.` });\n\t\tmoduleByName.set(spec.named, spec.package);\n\t}\n}\n/**\n* A copy of `descriptor` whose type declarations all name `module`, each keeping its name and alias. A target package's `defineConfig` uses it to state that its target's and adapter's types come from its own `contract-types` module. A descriptor that declares no types is returned as it is. Two declarations of one name from different modules are refused, since both would import the same type.\n*/\nfunction restateTypeDeclarations(descriptor, module) {\n\tconst { types } = descriptor;\n\tconst specs = types === void 0 ? [] : typeImports(types);\n\tif (types === void 0 || specs.length === 0) return descriptor;\n\trefuseNamesFromTwoModules(specs, module);\n\tconst { codecTypes, queryOperationTypes } = types;\n\treturn blindCast({\n\t\t...descriptor,\n\t\ttypes: {\n\t\t\t...types,\n\t\t\t...ifDefined(\"codecTypes\", codecTypes && restatedCodecTypes(codecTypes, module)),\n\t\t\t...ifDefined(\"queryOperationTypes\", queryOperationTypes && { import: {\n\t\t\t\t...queryOperationTypes.import,\n\t\t\t\tpackage: module\n\t\t\t} })\n\t\t}\n\t});\n}\n//#endregion\nexport { restateTypeDeclarations };\n\n//# sourceMappingURL=type-declarations.mjs.map"],"mappings":";;;;AAIA,SAAS,mBAAmB,YAAY,QAAQ;CAC/C,MAAM,SAAS,UAAU;EACxB,GAAG;EACH,SAAS;CACV;CACA,OAAO;EACN,GAAG;EACH,GAAG,UAAU,UAAU,WAAW,UAAU,MAAM,W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+
import { a as ComponentMetadata } from "./framework-components-GBAmsfWO-DUJQpMpU.mjs";
|
|
2
|
+
import "./components-BvnVHOK3.mjs";
|
|
3
|
+
//#region ../../../3-targets/0-shared/target-package-config/dist/type-declarations.d.mts
|
|
4
|
+
//#region src/restate-type-declarations.d.ts
|
|
5
|
+
/**
|
|
6
|
+
* A copy of `descriptor` whose type declarations all name `module`, each keeping its name and alias. A target package's `defineConfig` uses it to state that its target's and adapter's types come from its own `contract-types` module. A descriptor that declares no types is returned as it is. Two declarations of one name from different modules are refused, since both would import the same type.
|
|
7
|
+
*/
|
|
8
|
+
declare function restateTypeDeclarations<Descriptor extends Pick<ComponentMetadata, 'types'>>(descriptor: Descriptor, module: string): Descriptor;
|
|
9
|
+
//#endregion
|
|
10
|
+
export { restateTypeDeclarations as t };
|
|
11
|
+
//# sourceMappingURL=type-declarations-C_77eFnt.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"type-declarations-C_77eFnt.d.mts","names":[],"sources":["../../../../3-targets/0-shared/target-package-config/dist/type-declarations.d.mts"],"mappings":";;;;;;;iBAKiB,wBAAwB,mBAAmB,KAAK,6BAA6B,YAAY,YAAY,iBAAiB"}
|
|
@@ -1,7 +1,10 @@
|
|
|
1
|
+
import { n as integerFromBoolean, t as booleanFromInteger } from "./boolean-CcUSuhCU.mjs";
|
|
1
2
|
import { a as isValidDate, c as withoutZerosBelowAMillisecond, i as isDate, n as hasDigitsBelow, o as utcIsoTextOf, r as hasDigitsBelowAMillisecond, s as withThreeFractionDigits, t as dateOfThisRealm } from "./date-Cq0RCxit.mjs";
|
|
3
|
+
import { i as printedDecimalText, n as decimalTextWithoutLeadingZeros, r as isDecimalText, t as decimalTextWithoutExponent } from "./decimal-DpMh1SwW.mjs";
|
|
2
4
|
import { n as ISO_DURATION_AS_WRITTEN, t as ISO_DURATION } from "./duration-cFUtCY2y.mjs";
|
|
5
|
+
import { n as NonJsonValue, r as findNonJsonValue, t as FindNonJsonValueOptions } from "./json-oOHvzn6v.mjs";
|
|
3
6
|
import { n as findTemporal, r as setFallbackTemporal, t as TemporalImplementation } from "./temporal-ByipDkUQ-BSRSKsqk.mjs";
|
|
4
7
|
import { _ as timeStringNow, a as PLAIN_DATE_NOW_GENERATOR_ID, c as TIME_STRING_NOW_GENERATOR_ID, d as fractionDigitsOf, f as instantNow, g as plainTimeNow, h as plainDateTimeNow, i as INSTANT_STRING_NOW_GENERATOR_ID, l as dateStringNow, m as plainDateNow, n as GeneratorParams, o as PLAIN_DATE_TIME_NOW_GENERATOR_ID, p as instantStringNow, r as INSTANT_NOW_GENERATOR_ID, s as PLAIN_TIME_NOW_GENERATOR_ID, t as DATE_STRING_NOW_GENERATOR_ID, u as dateTimeStringNow } from "./now-BAgn1BJy.mjs";
|
|
5
8
|
import "./temporal-DIeQx56W.mjs";
|
|
6
9
|
import { a as temporalToText, i as temporalFromText, n as TemporalValue, o as withoutUtcDesignator, r as describeValue, t as TemporalTag } from "./temporal-text-CRbkPKoz.mjs";
|
|
7
|
-
export { DATE_STRING_NOW_GENERATOR_ID, type GeneratorParams, INSTANT_NOW_GENERATOR_ID, INSTANT_STRING_NOW_GENERATOR_ID, ISO_DURATION, ISO_DURATION_AS_WRITTEN, PLAIN_DATE_NOW_GENERATOR_ID, PLAIN_DATE_TIME_NOW_GENERATOR_ID, PLAIN_TIME_NOW_GENERATOR_ID, TIME_STRING_NOW_GENERATOR_ID, type TemporalImplementation, type TemporalTag, type TemporalValue, dateOfThisRealm, dateStringNow, dateTimeStringNow, describeValue, findTemporal, fractionDigitsOf, hasDigitsBelow, hasDigitsBelowAMillisecond, instantNow, instantStringNow, isDate, isValidDate, plainDateNow, plainDateTimeNow, plainTimeNow, setFallbackTemporal, temporalFromText, temporalToText, timeStringNow, utcIsoTextOf, withThreeFractionDigits, withoutUtcDesignator, withoutZerosBelowAMillisecond };
|
|
10
|
+
export { DATE_STRING_NOW_GENERATOR_ID, type FindNonJsonValueOptions, type GeneratorParams, INSTANT_NOW_GENERATOR_ID, INSTANT_STRING_NOW_GENERATOR_ID, ISO_DURATION, ISO_DURATION_AS_WRITTEN, type NonJsonValue, PLAIN_DATE_NOW_GENERATOR_ID, PLAIN_DATE_TIME_NOW_GENERATOR_ID, PLAIN_TIME_NOW_GENERATOR_ID, TIME_STRING_NOW_GENERATOR_ID, type TemporalImplementation, type TemporalTag, type TemporalValue, booleanFromInteger, dateOfThisRealm, dateStringNow, dateTimeStringNow, decimalTextWithoutExponent, decimalTextWithoutLeadingZeros, describeValue, findNonJsonValue, findTemporal, fractionDigitsOf, hasDigitsBelow, hasDigitsBelowAMillisecond, instantNow, instantStringNow, integerFromBoolean, isDate, isDecimalText, isValidDate, plainDateNow, plainDateTimeNow, plainTimeNow, printedDecimalText, setFallbackTemporal, temporalFromText, temporalToText, timeStringNow, utcIsoTextOf, withThreeFractionDigits, withoutUtcDesignator, withoutZerosBelowAMillisecond };
|
|
@@ -1,6 +1,9 @@
|
|
|
1
|
+
import { n as integerFromBoolean, t as booleanFromInteger } from "./boolean-C37kSXDF.mjs";
|
|
1
2
|
import { a as isValidDate, c as withoutZerosBelowAMillisecond, i as isDate, n as hasDigitsBelow, o as utcIsoTextOf, r as hasDigitsBelowAMillisecond, s as withThreeFractionDigits, t as dateOfThisRealm } from "./date-dUDzrveD-dXiNEmPK.mjs";
|
|
3
|
+
import { i as printedDecimalText, n as decimalTextWithoutLeadingZeros, r as isDecimalText, t as decimalTextWithoutExponent } from "./decimal-CetFpCr5.mjs";
|
|
2
4
|
import { n as ISO_DURATION_AS_WRITTEN, t as ISO_DURATION } from "./duration-BqxS5qWq.mjs";
|
|
5
|
+
import { t as findNonJsonValue } from "./json-Cjj5_v0y.mjs";
|
|
3
6
|
import { a as PLAIN_DATE_TIME_NOW_GENERATOR_ID, c as dateStringNow, d as instantNow, f as instantStringNow, g as timeStringNow, h as plainTimeNow, i as PLAIN_DATE_NOW_GENERATOR_ID, l as dateTimeStringNow, m as plainDateTimeNow, n as INSTANT_NOW_GENERATOR_ID, o as PLAIN_TIME_NOW_GENERATOR_ID, p as plainDateNow, r as INSTANT_STRING_NOW_GENERATOR_ID, s as TIME_STRING_NOW_GENERATOR_ID, t as DATE_STRING_NOW_GENERATOR_ID, u as fractionDigitsOf } from "./now-rRujKrwj.mjs";
|
|
4
7
|
import { n as setFallbackTemporal, t as findTemporal } from "./temporal-BlPzxzji.mjs";
|
|
5
8
|
import { i as withoutUtcDesignator, n as temporalFromText, r as temporalToText, t as describeValue } from "./temporal-text-7FpwYovY.mjs";
|
|
6
|
-
export { DATE_STRING_NOW_GENERATOR_ID, INSTANT_NOW_GENERATOR_ID, INSTANT_STRING_NOW_GENERATOR_ID, ISO_DURATION, ISO_DURATION_AS_WRITTEN, PLAIN_DATE_NOW_GENERATOR_ID, PLAIN_DATE_TIME_NOW_GENERATOR_ID, PLAIN_TIME_NOW_GENERATOR_ID, TIME_STRING_NOW_GENERATOR_ID, dateOfThisRealm, dateStringNow, dateTimeStringNow, describeValue, findTemporal, fractionDigitsOf, hasDigitsBelow, hasDigitsBelowAMillisecond, instantNow, instantStringNow, isDate, isValidDate, plainDateNow, plainDateTimeNow, plainTimeNow, setFallbackTemporal, temporalFromText, temporalToText, timeStringNow, utcIsoTextOf, withThreeFractionDigits, withoutUtcDesignator, withoutZerosBelowAMillisecond };
|
|
9
|
+
export { DATE_STRING_NOW_GENERATOR_ID, INSTANT_NOW_GENERATOR_ID, INSTANT_STRING_NOW_GENERATOR_ID, ISO_DURATION, ISO_DURATION_AS_WRITTEN, PLAIN_DATE_NOW_GENERATOR_ID, PLAIN_DATE_TIME_NOW_GENERATOR_ID, PLAIN_TIME_NOW_GENERATOR_ID, TIME_STRING_NOW_GENERATOR_ID, booleanFromInteger, dateOfThisRealm, dateStringNow, dateTimeStringNow, decimalTextWithoutExponent, decimalTextWithoutLeadingZeros, describeValue, findNonJsonValue, findTemporal, fractionDigitsOf, hasDigitsBelow, hasDigitsBelowAMillisecond, instantNow, instantStringNow, integerFromBoolean, isDate, isDecimalText, isValidDate, plainDateNow, plainDateTimeNow, plainTimeNow, printedDecimalText, setFallbackTemporal, temporalFromText, temporalToText, timeStringNow, utcIsoTextOf, withThreeFractionDigits, withoutUtcDesignator, withoutZerosBelowAMillisecond };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@prisma/orm-framework",
|
|
3
|
-
"version": "8.0.0-rc.24-dev.
|
|
3
|
+
"version": "8.0.0-rc.24-dev.29",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -17,21 +17,22 @@
|
|
|
17
17
|
"uniku": "^0.5.0"
|
|
18
18
|
},
|
|
19
19
|
"devDependencies": {
|
|
20
|
-
"@internal/config": "8.0.0-rc.24-dev.
|
|
21
|
-
"@internal/contract": "8.0.0-rc.24-dev.
|
|
22
|
-
"@internal/contract-authoring": "8.0.0-rc.24-dev.
|
|
23
|
-
"@internal/errors": "8.0.0-rc.24-dev.
|
|
24
|
-
"@internal/framework-components": "8.0.0-rc.24-dev.
|
|
25
|
-
"@internal/ids": "8.0.0-rc.24-dev.
|
|
26
|
-
"@internal/operations": "8.0.0-rc.24-dev.
|
|
27
|
-
"@internal/psl-parser": "8.0.0-rc.24-dev.
|
|
28
|
-
"@internal/psl-printer": "8.0.0-rc.24-dev.
|
|
29
|
-
"@internal/
|
|
30
|
-
"@internal/
|
|
31
|
-
"@
|
|
32
|
-
"@internal/
|
|
33
|
-
"@
|
|
34
|
-
"@
|
|
20
|
+
"@internal/config": "8.0.0-rc.24-dev.29",
|
|
21
|
+
"@internal/contract": "8.0.0-rc.24-dev.29",
|
|
22
|
+
"@internal/contract-authoring": "8.0.0-rc.24-dev.29",
|
|
23
|
+
"@internal/errors": "8.0.0-rc.24-dev.29",
|
|
24
|
+
"@internal/framework-components": "8.0.0-rc.24-dev.29",
|
|
25
|
+
"@internal/ids": "8.0.0-rc.24-dev.29",
|
|
26
|
+
"@internal/operations": "8.0.0-rc.24-dev.29",
|
|
27
|
+
"@internal/psl-parser": "8.0.0-rc.24-dev.29",
|
|
28
|
+
"@internal/psl-printer": "8.0.0-rc.24-dev.29",
|
|
29
|
+
"@internal/publish-surface": "8.0.0-rc.24-dev.29",
|
|
30
|
+
"@internal/target-package-config": "8.0.0-rc.24-dev.29",
|
|
31
|
+
"@internal/ts-render": "8.0.0-rc.24-dev.29",
|
|
32
|
+
"@internal/type-implementations": "8.0.0-rc.24-dev.29",
|
|
33
|
+
"@internal/utils": "8.0.0-rc.24-dev.29",
|
|
34
|
+
"@repo/tsconfig": "8.0.0-rc.24-dev.29",
|
|
35
|
+
"@repo/tsdown": "8.0.0-rc.24-dev.29",
|
|
35
36
|
"tsdown": "0.22.14",
|
|
36
37
|
"typescript": "5.9.3",
|
|
37
38
|
"vitest": "5.0.0-rc.2"
|
|
@@ -85,10 +86,15 @@
|
|
|
85
86
|
"./psl-parser/syntax": "./dist/psl-parser__syntax.mjs",
|
|
86
87
|
"./psl-parser/tokenizer": "./dist/psl-parser__tokenizer.mjs",
|
|
87
88
|
"./psl-printer": "./dist/psl-printer.mjs",
|
|
89
|
+
"./target-package-config": "./dist/target-package-config.mjs",
|
|
90
|
+
"./target-package-config/type-declarations": "./dist/target-package-config__type-declarations.mjs",
|
|
88
91
|
"./ts-render": "./dist/ts-render.mjs",
|
|
89
92
|
"./type-implementations": "./dist/type-implementations.mjs",
|
|
93
|
+
"./type-implementations/boolean": "./dist/type-implementations__boolean.mjs",
|
|
90
94
|
"./type-implementations/date": "./dist/type-implementations__date.mjs",
|
|
95
|
+
"./type-implementations/decimal": "./dist/type-implementations__decimal.mjs",
|
|
91
96
|
"./type-implementations/duration": "./dist/type-implementations__duration.mjs",
|
|
97
|
+
"./type-implementations/json": "./dist/type-implementations__json.mjs",
|
|
92
98
|
"./type-implementations/now": "./dist/type-implementations__now.mjs",
|
|
93
99
|
"./type-implementations/temporal": "./dist/type-implementations__temporal.mjs",
|
|
94
100
|
"./type-implementations/temporal-text": "./dist/type-implementations__temporal-text.mjs",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"config-types-D0mYyP62.mjs","names":[],"sources":["../../../../1-framework/1-core/config/dist/config-types.mjs"],"sourcesContent":["import { extname } from \"pathe\";\nimport { isDynamicPattern } from \"tinyglobby\";\n//#region src/config-types.ts\n/**\n* Default *source* directory for the contract file the user authors at `init`\n* time. Output artefacts colocate with source per the same rule path-bearing\n* providers apply.\n*/\nconst DEFAULT_CONTRACT_SOURCE_DIR = \"src/prisma\";\nfunction normalizeContractConfig(contract) {\n\tconst inMemoryFallbackOutput = `${DEFAULT_CONTRACT_SOURCE_DIR}/contract.json`;\n\treturn {\n\t\tsource: contract.source,\n\t\toutput: contract.output ?? inMemoryFallbackOutput\n\t};\n}\n/**\n* Builds the ORM section of `prisma.config.ts`. The result nests under the\n* `orm` key of the engine's `definePrismaConfig` — the marker lives on the envelope,\n* not here. Structural validation happens in the config loader, which reports\n* per-section diagnostics instead of failing the whole load.\n*\n* Normalization:\n* - contract.output defaults to a path colocated with DEFAULT_CONTRACT_SOURCE_DIR\n* when missing (in-memory-only providers)\n*\n* @param config - Raw config input from user\n* @returns Normalized config IR with defaults applied\n*/\nfunction defineConfig(config) {\n\tif (config.contract) return {\n\t\t...config,\n\t\tcontract: normalizeContractConfig(config.contract)\n\t};\n\treturn config;\n}\n//#endregion\n//#region src/default-contract-output-path.ts\nfunction staticPrefixDirectory(pattern) {\n\tconst staticSegments = [];\n\tfor (const segment of pattern.replaceAll(\"\\\\\", \"/\").split(\"/\")) {\n\t\tif (isDynamicPattern(segment)) break;\n\t\tstaticSegments.push(segment);\n\t}\n\treturn staticSegments.join(\"/\");\n}\n/**\n* Where `contract emit` writes the contract JSON for a config that names\n* `contractPath` and sets no output: beside the contract file and named after\n* it, or `contract.json` in the static prefix directory of a glob.\n*/\nfunction defaultContractOutputPath(contractPath) {\n\tif (isDynamicPattern(contractPath)) {\n\t\tconst prefix = staticPrefixDirectory(contractPath);\n\t\treturn prefix.length === 0 ? \"contract.json\" : `${prefix}/contract.json`;\n\t}\n\tconst extension = extname(contractPath);\n\treturn `${extension.length === 0 ? contractPath : contractPath.slice(0, -extension.length)}.json`;\n}\n//#endregion\nexport { DEFAULT_CONTRACT_SOURCE_DIR, defaultContractOutputPath, defineConfig, normalizeContractConfig };\n\n//# sourceMappingURL=config-types.mjs.map"],"mappings":";;;;;;;;AAQA,MAAM,8BAA8B;AACpC,SAAS,wBAAwB,UAAU;CAC1C,MAAM,yBAAyB,GAAG,4BAA4B;CAC9D,OAAO;EACN,QAAQ,SAAS;EACjB,QAAQ,SAAS,UAAU;CAC5B;AACD;;;;;;;;;;;;;;AAcA,SAAS,aAAa,QAAQ;CAC7B,IAAI,OAAO,UAAU,OAAO;EAC3B,GAAG;EACH,UAAU,wBAAwB,OAAO,QAAQ;CAClD;CACA,OAAO;AACR;AAGA,SAAS,sBAAsB,SAAS;CACvC,MAAM,iBAAiB,CAAC;CACxB,KAAK,MAAM,WAAW,QAAQ,WAAW,MAAM,GAAG,CAAC,CAAC,MAAM,GAAG,GAAG;EAC/D,IAAI,iBAAiB,OAAO,GAAG;EAC/B,eAAe,KAAK,OAAO;CAC5B;CACA,OAAO,eAAe,KAAK,GAAG;AAC/B;;;;;;AAMA,SAAS,0BAA0B,cAAc;CAChD,IAAI,iBAAiB,YAAY,GAAG;EACnC,MAAM,SAAS,sBAAsB,YAAY;EACjD,OAAO,OAAO,WAAW,IAAI,kBAAkB,GAAG,OAAO;CAC1D;CACA,MAAM,YAAY,QAAQ,YAAY;CACtC,OAAO,GAAG,UAAU,WAAW,IAAI,eAAe,aAAa,MAAM,GAAG,CAAC,UAAU,MAAM,EAAE;AAC5F"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import "./control-BeXOxtXA-CoPQgVyR.mjs";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"control-B3QHYJcv.d.mts","names":[],"sources":["../../../../1-framework/1-core/framework-components/dist/control.d.mts"],"mappings":";;;;;;;;;;;;;;;;;;cAec;cACA;cACA;;KAET,yBAAyB;KACzB,wBAAwB;KACxB,8BAA8B;;UAEzB;WACC,iBAAiB;WACjB;aACE,UAAU;aACV,gBAAgB;;;;UAInB;WACC,kBAAkB;WAClB;aACE,WAAW;aACX,iBAAiB;;;;cAIhB;;cAEA;;cAEA;cACA,2BAA2B;;iBAExB,6BAA6B,SAAS,kBAAkB,UAAU,2BAA2B;;UAEpG;WACC;WACA;;;iBAGM,8BAA8B,iBAAiB,OAAO,mCAAmC;;UAEhG;WACC;;;;;;iBAMM,mBAAmB,QAAQ,0CAA0C,OAAO,kBAAkB;;KAE1G;WACM;WACA,mBAAmB;WACnB,kBAAkB;;WAElB;WACA,UAAU;WACV,SAAS;;WAET;WACA,UAAU;WACV,SAAS;;;iBAGH,0BAA0B,UAAU,0BAA0B,SAAS,4BAA4B;;KAE/G;WACM;;WAEA;WACA,OAAO;;WAEP;WACA;;;;;;iBAMM,8BAA8B,QAAQ,yCAAyC,SAAS,mBAAmB;;iBAE3G,wBAAwB,OAAO;;iBAE/B,yBAAyB,eAAe,SAAS,kBAAkB,OAAO;;;;;iBAK1E,6BAA6B,SAAS,kBAAkB,OAAO,mBAAmB;WACxF;;;UAGD;WACC,QAAQ;WACR;aACE,UAAU;aACV,gBAAgB;;;iBAGZ,uBAAuB,UAAU,mBAAmB;;;;;;;;;;KAUhE;WACM;WACA;;UAED,gBAAgB,cAAc,eAAe;;WAE5C;;WAEA,WAAW;;WAEX,SAAS;;;;;;;;WAQT;;WAEA,cAAc;;;;;;;KAOpB;UACK;;WAEC;WACA,OAAO;;;;;;;;;;;;;;;;KAgBb;;;;;;;iBAOY,aAAa,OAAO,kBAAkB;;;;;;;;;;;;;;;UAe7C;WACC;WACA;;;;;;;WAOA,qBAAqB;EAC9B,UAAU,OAAO;;;;;;EAMjB,iBAAiB,QAAQ,2BAA2B;EACpD,qBAAqB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,eAAe,eAAe,UAAU,wBAAwB"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"dist-D1f6xr7F.mjs","names":[],"sources":["../../../../1-framework/1-core/ts-render/dist/index.mjs"],"sourcesContent":["import { InternalError } from \"@internal/utils/internal-error\";\nimport { structuredError } from \"@internal/utils/structured-error\";\n//#region src/ts-string-literal.ts\n/**\n* Renders a string as a TypeScript source-text literal.\n*\n* `JSON.stringify` already escapes quotes, backslashes, and control characters\n* exactly as TypeScript needs; it leaves U+2028/U+2029 unescaped, which legacy\n* parsers treat as line terminators, and DEL (U+007F), which is invisible, so\n* those are escaped explicitly.\n*\n* Used for both value literals (`jsonToTsSource`) and type-level literals /\n* property keys (the contract emitter), so a physical name that a store admits\n* as a quoted identifier but TypeScript does not admit bare renders the same\n* way everywhere.\n*/\nfunction tsStringLiteral(value) {\n\treturn JSON.stringify(value).replace(/\\u2028/g, \"\\\\u2028\").replace(/\\u2029/g, \"\\\\u2029\").replace(/\\u007f/g, \"\\\\x7f\");\n}\n/**\n* TypeScript source for a string: an untagged template literal when the text holds both quote kinds, so neither quote\n* is escaped; otherwise `tsStringLiteral(text)`. Text holding a control character (below U+0020, or U+007F), U+2028,\n* U+2029 or a lone surrogate is always `tsStringLiteral(text)`.\n*/\nfunction tsQuotedTextSource(text) {\n\tif (!(text.includes(\"'\") && text.includes(\"\\\"\")) || needsEscapeSequence(text)) return tsStringLiteral(text);\n\treturn `\\`${tsTemplateText(text)}\\``;\n}\n/** `text` escaped for the inside of a TypeScript template literal: `\\`, a backtick and `${` are escaped; nothing else is. */\nfunction tsTemplateText(text) {\n\treturn text.replace(/\\\\/g, \"\\\\\\\\\").replace(/`/g, \"\\\\`\").replace(/\\$\\{/g, \"\\\\${\");\n}\nfunction needsEscapeSequence(text) {\n\tfor (const char of text) {\n\t\tconst code = char.codePointAt(0) ?? 0;\n\t\tif (code < 32 || code === 127 || code === 8232 || code === 8233 || code >= 55296 && code <= 57343) return true;\n\t}\n\treturn false;\n}\n//#endregion\n//#region src/json-to-ts-source.ts\n/**\n* Pure JSON-to-TypeScript-source printer.\n*\n* This module is the second stage of the codec → TS pipeline:\n*\n* jsValue → codec.toDataTypeValue → JsonValue → jsonToTsSource → TS source text\n*\n* Stage 1 (`codec.toDataTypeValue`, whose value holds the stored JSON) is a codec and data type responsibility — date serialization,\n* opaque domain types (vector, bigint, uuid), JSON canonicalization. Stage 2\n* (this module) is a pure JSON-to-TS printer that must never grow type-specific\n* branches.\n*\n* To render a non-JSON JS value (Date, Vector, BigInt, Buffer, …), encode it\n* through the relevant codec's `toDataTypeValue` first. Adding special cases to\n* this file is not the answer — that's what codecs are for.\n*\n* The file also exports `tsObjectSource` and `tsArraySource`, the object and\n* array layouts `jsonToTsSource` uses, for callers that render some values\n* themselves.\n*/\n/**\n* Render a JSON-compatible value as a TypeScript source-text literal.\n*\n* Accepts `unknown` for ergonomics with structural types (e.g. `ColumnSpec`,\n* `ForeignKeySpec`) whose fields are all JSON-compatible but whose interfaces\n* lack the index signature TypeScript requires for `JsonObject` assignability.\n* Non-JSON values (Date, Symbol, Function, etc.) throw at runtime.\n*/\nfunction jsonToTsSource(value) {\n\tif (value === void 0) return \"undefined\";\n\tif (value === null) return \"null\";\n\tif (typeof value === \"string\") return tsStringLiteral(value);\n\tif (typeof value === \"number\" || typeof value === \"boolean\") return String(value);\n\tif (Array.isArray(value)) return tsArraySource(value.map((v) => jsonToTsSource(v)));\n\tif (typeof value === \"object\") return tsObjectSource(Object.entries(value).filter(([, v]) => v !== void 0).map(([k, v]) => [k, jsonToTsSource(v)]));\n\tthrow new InternalError(`jsonToTsSource: unsupported value type \"${typeof value}\"`);\n}\n/** An object literal from entries whose values are already TypeScript source, laid out as `jsonToTsSource` lays out objects. */\nfunction tsObjectSource(entries) {\n\tif (entries.length === 0) return \"{}\";\n\tconst items = entries.map(([key, source]) => `${renderKey(key)}: ${source}`);\n\tconst singleLine = `{ ${items.join(\", \")} }`;\n\tif (singleLine.length <= 80 && !singleLine.includes(\"\\n\")) return singleLine;\n\treturn `{\\n${items.map((i) => ` ${i}`).join(\",\\n\")},\\n}`;\n}\n/** An array literal from items that are already TypeScript source, laid out as `jsonToTsSource` lays out arrays. */\nfunction tsArraySource(items) {\n\tif (items.length === 0) return \"[]\";\n\tconst singleLine = `[${items.join(\", \")}]`;\n\tif (singleLine.length <= 80 && !singleLine.includes(\"\\n\")) return singleLine;\n\treturn `[\\n${items.map((i) => ` ${i}`).join(\",\\n\")},\\n]`;\n}\nfunction renderKey(key) {\n\tif (key === \"__proto__\") return tsStringLiteral(key);\n\treturn /^[a-zA-Z_$][a-zA-Z0-9_$]*$/.test(key) ? key : tsStringLiteral(key);\n}\n//#endregion\n//#region src/contract-errors.ts\nfunction contractError(code, message, options) {\n\treturn structuredError(code, message, options);\n}\n//#endregion\n//#region src/render-imports.ts\n/**\n* Render an aggregated `import` block from a flat list of\n* `ImportRequirement`s. Each target's migration renderer collects\n* requirements polymorphically from its call nodes and pipes them here.\n*\n* The emitter invariants:\n*\n* - **Usually one line per module specifier.** Named imports are aggregated\n* and emitted sorted; a single default symbol is combined onto the same\n* line when attributes agree (`import def, { a, b } from \"m\";`). Aliased\n* symbols render `symbol as alias`. When every symbol for a module is\n* `typeOnly`, the statement collapses to `import type { … }`; a module\n* mixing value and type symbols prefixes the type-only ones\n* (`import { type T, v }`). Exceptions that split into multiple lines: a\n* fully type-only statement with both a default and one or more named\n* bindings (`import type D from \"m\";` then `import type { N } from \"m\";`,\n* because TypeScript rejects `import type D, { N } from \"m\"` — TS1363),\n* and multiple distinct default symbols (see below).\n* - **Multiple distinct default symbols per module are allowed.** JS permits\n* re-importing the same specifier under different default-binding names\n* (`import a from 'm'; import b from 'm';`), so each distinct default\n* symbol renders its own `import` line, sorted alphabetically; a repeated\n* requirement for the same symbol still collapses into one binding,\n* merging `typeOnly` by AND.\n* - **Attribute unanimity per module.** All requirements for the same\n* module specifier must carry the same (or no) `attributes` map.\n* Divergent attribute maps throw — they can't collapse to one line\n* and there's no user-resolvable recovery at this layer.\n* - **Distinct (symbol, alias) pairs are distinct bindings.** TypeScript\n* permits importing the same export under multiple local names, so\n* `{ A }` + `{ A as B }` renders as `import { A, A as B } from \"m\"` and\n* `{ A as B }` + `{ A as C }` renders as `import { A as B, A as C } from \"m\"`.\n* Truly identical `(symbol, alias)` pairs still collapse to one binding,\n* merging `typeOnly` by AND.\n* - **Deterministic ordering.** Modules are emitted sorted by specifier;\n* within a module, named bindings are emitted sorted by `(symbol, alias)`\n* using JavaScript code-unit comparison, with the un-aliased form (no\n* alias) treated as alias `\"\"` so it sorts before any aliased form of the\n* same symbol.\n*\n* Returns a string containing one or more import lines per module (see the\n* splitting exceptions above), joined by `\\n` (no trailing newline). An\n* empty requirement list returns `\"\"`.\n*/\nfunction renderImports(requirements) {\n\treturn [...aggregateByModule(requirements).entries()].sort(([a], [b]) => a.localeCompare(b)).map(([moduleSpecifier, group]) => renderModuleImport(moduleSpecifier, group)).join(\"\\n\");\n}\nfunction aggregateByModule(requirements) {\n\tconst byModule = /* @__PURE__ */ new Map();\n\tfor (const req of requirements) {\n\t\tlet group = byModule.get(req.moduleSpecifier);\n\t\tif (!group) {\n\t\t\tgroup = {\n\t\t\t\tnamed: /* @__PURE__ */ new Map(),\n\t\t\t\tdefaults: /* @__PURE__ */ new Map(),\n\t\t\t\tattributes: null,\n\t\t\t\tattributesSet: false\n\t\t\t};\n\t\t\tbyModule.set(req.moduleSpecifier, group);\n\t\t}\n\t\tmergeRequirementIntoGroup(req, group);\n\t}\n\treturn byModule;\n}\nfunction mergeRequirementIntoGroup(req, group) {\n\tconst kind = req.kind ?? \"named\";\n\tconst typeOnly = req.typeOnly === true;\n\tif (kind === \"default\") {\n\t\tconst existingTypeOnly = group.defaults.get(req.symbol);\n\t\tgroup.defaults.set(req.symbol, existingTypeOnly === void 0 ? typeOnly : existingTypeOnly && typeOnly);\n\t} else {\n\t\tconst alias = req.alias && req.alias !== req.symbol ? req.alias : null;\n\t\tconst key = namedBindingKey(req.symbol, alias);\n\t\tconst existing = group.named.get(key);\n\t\tif (existing) existing.typeOnly = existing.typeOnly && typeOnly;\n\t\telse group.named.set(key, {\n\t\t\tsymbol: req.symbol,\n\t\t\talias,\n\t\t\ttypeOnly\n\t\t});\n\t}\n\tmergeAttributes(req, group);\n}\nfunction mergeAttributes(req, group) {\n\tconst incoming = req.attributes ?? null;\n\tif (!group.attributesSet) {\n\t\tgroup.attributes = incoming;\n\t\tgroup.attributesSet = true;\n\t\treturn;\n\t}\n\tif (!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 } });\n}\nfunction attributesEqual(a, b) {\n\tif (a === b) return true;\n\tif (a === null || b === null) return false;\n\tconst aKeys = Object.keys(a).sort();\n\tconst bKeys = Object.keys(b).sort();\n\tif (aKeys.length !== bKeys.length) return false;\n\tfor (let i = 0; i < aKeys.length; i++) {\n\t\tconst key = aKeys[i];\n\t\tif (key !== bKeys[i]) return false;\n\t\tif (a[key] !== b[key]) return false;\n\t}\n\treturn true;\n}\nfunction stringifyAttributes(attrs) {\n\tif (attrs === null) return \"(none)\";\n\treturn `{ ${Object.entries(attrs).sort(([a], [b]) => a.localeCompare(b)).map(([k, v]) => `${k}: ${JSON.stringify(v)}`).join(\", \")} }`;\n}\nfunction renderModuleImport(moduleSpecifier, group) {\n\tconst attrs = buildAttributesClause(group.attributes);\n\tconst defaultEntries = [...group.defaults.entries()].sort(([a], [b]) => a.localeCompare(b));\n\tconst hasNamed = group.named.size > 0;\n\tif (defaultEntries.length > 1) {\n\t\tconst defaultLines = defaultEntries.map(([symbol, typeOnly]) => `import ${typeOnly ? \"type \" : \"\"}${symbol} from '${moduleSpecifier}'${attrs};`);\n\t\tif (!hasNamed) return defaultLines.join(\"\\n\");\n\t\treturn [...defaultLines, renderNamedOnlyStatement(moduleSpecifier, group, attrs)].join(\"\\n\");\n\t}\n\tconst defaultEntry = defaultEntries[0];\n\tconst hasDefault = defaultEntry !== void 0;\n\tconst [defaultSymbol, defaultTypeOnly] = defaultEntry ?? [null, true];\n\tconst typeOnlyStatement = isStatementTypeOnly(hasDefault, defaultTypeOnly, group);\n\tif (typeOnlyStatement && hasDefault && hasNamed) return `${`import type ${defaultSymbol} from '${moduleSpecifier}'${attrs};`}\\n${`import type { ${renderNamedBindingsList(group, true)} } from '${moduleSpecifier}'${attrs};`}`;\n\treturn `${typeOnlyStatement ? \"import type\" : \"import\"} ${buildImportClause(defaultSymbol, group, typeOnlyStatement)} from '${moduleSpecifier}'${attrs};`;\n}\nfunction renderNamedOnlyStatement(moduleSpecifier, group, attrs) {\n\tconst typeOnlyStatement = [...group.named.values()].every((binding) => binding.typeOnly);\n\treturn `${typeOnlyStatement ? \"import type\" : \"import\"} { ${renderNamedBindingsList(group, typeOnlyStatement)} } from '${moduleSpecifier}'${attrs};`;\n}\nfunction isStatementTypeOnly(hasDefault, defaultTypeOnly, group) {\n\tconst hasNamed = group.named.size > 0;\n\tif (!hasDefault && !hasNamed) return false;\n\tif (hasDefault && !defaultTypeOnly) return false;\n\tfor (const binding of group.named.values()) if (!binding.typeOnly) return false;\n\treturn true;\n}\nfunction buildImportClause(defaultSymbol, group, statementTypeOnly) {\n\tconst hasNamed = group.named.size > 0;\n\tconst hasDefault = defaultSymbol !== null;\n\tconst namedClause = hasNamed ? renderNamedBindingsList(group, statementTypeOnly) : \"\";\n\tif (hasDefault && hasNamed) return `${defaultSymbol}, { ${namedClause} }`;\n\tif (hasDefault) return defaultSymbol;\n\treturn `{ ${namedClause} }`;\n}\nfunction renderNamedBindingsList(group, statementTypeOnly) {\n\treturn [...group.named.values()].sort(compareNamedBindings).map((binding) => renderNamedBinding(binding, statementTypeOnly)).join(\", \");\n}\nfunction compareNamedBindings(a, b) {\n\tif (a.symbol !== b.symbol) return a.symbol < b.symbol ? -1 : 1;\n\tconst aAlias = a.alias ?? \"\";\n\tconst bAlias = b.alias ?? \"\";\n\tif (aAlias === bAlias) return 0;\n\treturn aAlias < bAlias ? -1 : 1;\n}\nfunction namedBindingKey(symbol, alias) {\n\treturn `${symbol}\\x00${alias ?? \"\"}`;\n}\nfunction renderNamedBinding(binding, statementTypeOnly) {\n\tconst prefix = !statementTypeOnly && binding.typeOnly ? \"type \" : \"\";\n\tconst aliasClause = binding.alias !== null ? ` as ${binding.alias}` : \"\";\n\treturn `${prefix}${binding.symbol}${aliasClause}`;\n}\nfunction buildAttributesClause(attrs) {\n\tif (attrs === null) return \"\";\n\tconst entries = Object.entries(attrs).sort(([a], [b]) => a.localeCompare(b)).map(([k, v]) => `${k}: ${JSON.stringify(v)}`);\n\tif (entries.length === 0) return \"\";\n\treturn ` with { ${entries.join(\", \")} }`;\n}\n//#endregion\n//#region src/ts-expression.ts\n/**\n* Abstract base class for any IR node that can be emitted as a TypeScript\n* expression and declare its own import requirements.\n*\n* A top-level renderer walks an array of these polymorphically, concatenates\n* `renderTypeScript()` results, and aggregates `importRequirements()` into a\n* deduplicated import block.\n*/\nvar TsExpression = class {};\n//#endregion\nexport { TsExpression, jsonToTsSource, renderImports, tsArraySource, tsObjectSource, tsQuotedTextSource, tsStringLiteral, tsTemplateText };\n\n//# sourceMappingURL=index.mjs.map"],"mappings":";;;;;;;;;;;;;;;;AAgBA,SAAS,gBAAgB,OAAO;CAC/B,OAAO,KAAK,UAAU,KAAK,CAAC,CAAC,QAAQ,WAAW,SAAS,CAAC,CAAC,QAAQ,WAAW,SAAS,CAAC,CAAC,QAAQ,WAAW,OAAO;AACpH;;;;;;AAMA,SAAS,mBAAmB,MAAM;CACjC,IAAI,EAAE,KAAK,SAAS,GAAG,KAAK,KAAK,SAAS,IAAI,MAAM,oBAAoB,IAAI,GAAG,OAAO,gBAAgB,IAAI;CAC1G,OAAO,KAAK,eAAe,IAAI,EAAE;AAClC;;AAEA,SAAS,eA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C9B,OAAO,SAAS,SAAS,KAAK;AAC/B;AACA,SAAS,gBAAgB,QAAQ,OAAO;CACvC,OAAO,GAAG,OAAO,MAAM,SAAS;AACjC;AACA,SAAS,mBAAmB,SAAS,mBAAmB;CACvD,MAAM,SAAS,CAAC,qBAAqB,QAAQ,WAAW,UAAU;CAClE,MAAM,cAAc,QAAQ,UAAU,OAAO,OAAO,QAAQ,UAAU;CACtE,OAAO,GAAG,SAAS,QAAQ,SAAS;AACrC;AACA,SAAS,sBAAsB,OAAO;CACrC,IAAI,UAAU,MAAM,OAAO;CAC3B,MAAM,UAAU,OAAO,QAAQ,KAAK,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,EAAE,cAAc,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,GAAG,OAAO,GAAG,EAAE,IAAI,KAAK,UAAU,CAAC,GAAG;CACzH,IAAI,QAAQ,WAAW,GAAG,OAAO;CACjC,OAAO,WAAW,QAAQ,KAAK,IAAI,EAAE;AACtC;;;;;;;;;AAWA,IAAI,eAAe,MAAM,CAAC"}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
//#region ../../../1-framework/1-core/framework-components/dist/emission.mjs
|
|
2
|
-
/**
|
|
3
|
-
* Emits every specifier exactly as authored. This is the default everywhere:
|
|
4
|
-
* generated files keep naming workspace packages until every consumer in the
|
|
5
|
-
* repository imports published names instead.
|
|
6
|
-
*/
|
|
7
|
-
const keepInternalSpecifiers = (specifier) => specifier;
|
|
8
|
-
/**
|
|
9
|
-
* Applies a resolver to an assembled import-requirement list, once, after
|
|
10
|
-
* every contributor has added its requirements.
|
|
11
|
-
*
|
|
12
|
-
* Each target's migration renderer does exactly this, and doing it here rather
|
|
13
|
-
* than per renderer is what makes "applied once to the whole list" a property
|
|
14
|
-
* of the emission surface instead of three coincidences. Omitting the resolver
|
|
15
|
-
* means {@link keepInternalSpecifiers}.
|
|
16
|
-
*/
|
|
17
|
-
function resolveRequirementSpecifiers(requirements, resolve = keepInternalSpecifiers) {
|
|
18
|
-
return requirements.map((requirement) => ({
|
|
19
|
-
...requirement,
|
|
20
|
-
moduleSpecifier: resolve(requirement.moduleSpecifier)
|
|
21
|
-
}));
|
|
22
|
-
}
|
|
23
|
-
//#endregion
|
|
24
|
-
export { resolveRequirementSpecifiers as n, keepInternalSpecifiers as t };
|
|
25
|
-
|
|
26
|
-
//# sourceMappingURL=emission-CeoAV9mj.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"emission-CeoAV9mj.mjs","names":[],"sources":["../../../../1-framework/1-core/framework-components/dist/emission.mjs"],"sourcesContent":["//#region src/shared/import-specifier-resolver.ts\n/**\n* Emits every specifier exactly as authored. This is the default everywhere:\n* generated files keep naming workspace packages until every consumer in the\n* repository imports published names instead.\n*/\nconst keepInternalSpecifiers = (specifier) => specifier;\n/**\n* Applies a resolver to an assembled import-requirement list, once, after\n* every contributor has added its requirements.\n*\n* Each target's migration renderer does exactly this, and doing it here rather\n* than per renderer is what makes \"applied once to the whole list\" a property\n* of the emission surface instead of three coincidences. Omitting the resolver\n* means {@link keepInternalSpecifiers}.\n*/\nfunction resolveRequirementSpecifiers(requirements, resolve = keepInternalSpecifiers) {\n\treturn requirements.map((requirement) => ({\n\t\t...requirement,\n\t\tmoduleSpecifier: resolve(requirement.moduleSpecifier)\n\t}));\n}\n//#endregion\nexport { keepInternalSpecifiers, resolveRequirementSpecifiers };\n\n//# sourceMappingURL=emission.mjs.map"],"mappings":";;;;;;AAMA,MAAM,0BAA0B,cAAc;;;;;;;;;;AAU9C,SAAS,6BAA6B,cAAc,UAAU,wBAAwB;CACrF,OAAO,aAAa,KAAK,iBAAiB;EACzC,GAAG;EACH,iBAAiB,QAAQ,YAAY,eAAe;CACrD,EAAE;AACH"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"emission-types-bX2HmNSC-vaRddb1_.d.mts","names":[],"sources":["../../../../1-framework/1-core/framework-components/dist/emission-types-bX2HmNSC.d.mts"],"mappings":";;;;;;;;;;;;;;;;;KAcK,2BAA2B;;;;;;cAMlB,wBAAwB;;;;;;;;;;iBAUrB,6BAA6B;WACnC;GACR,uBAAuB,KAAK,UAAU,0BAA0B,MAAM,KAAK;WACnE;;;;UAID;WACC,4BAA4B,cAAc;;WAE1C,iCAAiC,cAAc;;;;WAI/C,uBAAuB,cAAc;WACrC,mBAAmB,cAAc;;;;WAIjC;;UAED;WACC;EACT,oBAAoB,UAAU,UAAU;EACxC,yBAAyB,mBAAmB,OAAO;;;;;;EAMnD,iBAAiB,wBAAwB;EACzC,qBAAqB,UAAU;EAC/B;EACA,mBAAmB,0BAA0B;;;;;;;EAO7C,wBAAwB,mBAAmB,mBAAmB,OAAO,mBAAmB,UAAU;aACvF,wBAAwB;aACxB;;EAEX,uBAAuB,UAAU,UAAU,cAAc"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"generator-functions-CXbQfvYu-BIFU1Ryx.mjs","names":[],"sources":["../../../../1-framework/1-core/framework-components/dist/generator-functions-CXbQfvYu.mjs"],"sourcesContent":["import { n as runtimeError } from \"./runtime-error-BA9d7XjZ.mjs\";\nimport { n as isCodecTrait } from \"./codec-types-BXLUbk-Y.mjs\";\nimport { InternalError } from \"@internal/utils/internal-error\";\nimport { blindCast } from \"@internal/utils/casts\";\n//#region src/shared/aggregate-descriptor.ts\n/**\n* Ownership key of an `(operation, input)` pair. Two descriptors sharing a key are two contributors claiming one overload, which is a composition error.\n*/\nfunction aggregateDescriptorKey(descriptor) {\n\tswitch (descriptor.input.kind) {\n\t\tcase \"none\": return `${descriptor.operation}:none`;\n\t\tcase \"any\": return `${descriptor.operation}:any`;\n\t\tcase \"codec\": return `${descriptor.operation}:codec:${descriptor.input.codecId}`;\n\t\tcase \"trait\": return `${descriptor.operation}:trait:${descriptor.input.trait}`;\n\t}\n}\n/** Whether `descriptor` is the overload of an operation that consumes no value — the case whose result always names a codec outright. */\nfunction isNoInputAggregateDescriptor(descriptor) {\n\treturn descriptor.input.kind === \"none\";\n}\n/** Whether `descriptor` answers regardless of input — the fallback rung of resolution. */\nfunction isAnyInputAggregateDescriptor(descriptor) {\n\treturn descriptor.input.kind === \"any\";\n}\nfunction isObjectLike(value) {\n\treturn typeof value === \"object\" && value !== null;\n}\nfunction isNonEmptyString(value) {\n\treturn typeof value === \"string\" && value.length > 0;\n}\nfunction isAggregateInputMatch(value) {\n\tif (!isObjectLike(value) || !(\"kind\" in value)) return false;\n\tswitch (value.kind) {\n\t\tcase \"none\":\n\t\tcase \"any\": return true;\n\t\tcase \"codec\": return \"codecId\" in value && isNonEmptyString(value.codecId);\n\t\tcase \"trait\": return \"trait\" in value && isCodecTrait(value.trait);\n\t\tdefault: return false;\n\t}\n}\nfunction isAggregateOutputCodec(value) {\n\tif (!isObjectLike(value) || !(\"kind\" in value)) return false;\n\tswitch (value.kind) {\n\t\tcase \"self\": return true;\n\t\tcase \"codec\": return \"codecId\" in value && isNonEmptyString(value.codecId) && (!(\"typeParams\" in value) || value.typeParams === void 0 || typeof value.typeParams === \"function\");\n\t\tdefault: return false;\n\t}\n}\n/**\n* 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.\n*/\nfunction isAggregateDescriptor(value) {\n\tif (!isObjectLike(value)) return false;\n\tif (!(\"operation\" in value) || !isNonEmptyString(value.operation)) return false;\n\tif (!(\"nullable\" in value) || typeof value.nullable !== \"boolean\") return false;\n\tif (value.nullable === false && (!(\"emptyResultWire\" in value) || value.emptyResultWire === void 0)) return false;\n\tif (!(\"input\" in value) || !isAggregateInputMatch(value.input)) return false;\n\tif (!(\"output\" in value) || !isAggregateOutputCodec(value.output)) return false;\n\treturn value.input.kind === \"codec\" || value.input.kind === \"trait\" || value.output.kind === \"codec\";\n}\n//#endregion\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\n//#region src/shared/generator-functions.ts\nfunction namedParametersOf(signature) {\n\tif (typeof signature !== \"object\" || signature === null || !(\"named\" in signature)) return [];\n\tconst named = signature.named;\n\treturn typeof named === \"object\" && named !== null ? Object.keys(named) : [];\n}\nfunction invalidContribution(message) {\n\treturn runtimeError(\"CONTRACT.PACK_CONTRIBUTION_INVALID\", message);\n}\n/**\n* The generators the components register, by id. A generator registered by two components is refused: the component that defines a generator registers it, once.\n*/\nfunction assembleGeneratorRegistrations(descriptors) {\n\tconst registered = /* @__PURE__ */ new Map();\n\tfor (const component of descriptors) for (const descriptor of component.controlMutationDefaults?.generatorDescriptors ?? []) {\n\t\tconst existing = registered.get(descriptor.id);\n\t\tif (existing !== void 0) throw invalidContribution(`Generator \"${descriptor.id}\" is registered by both \"${existing.componentId ?? \"<unknown>\"}\" and \"${component.id ?? \"<unknown>\"}\". Register each generator once, in the component that defines it.`);\n\t\tregistered.set(descriptor.id, {\n\t\t\tdescriptor,\n\t\t\tcomponentId: component.id\n\t\t});\n\t}\n\treturn registered;\n}\n/**\n* Assemble the generator functions of a composed stack: the control stack's components, or the pack refs of a TypeScript contract. Every generator a binding produces must be registered by a generator descriptor of one of the components.\n*/\nfunction assembleGeneratorFunctions(descriptors) {\n\tconst registered = assembleGeneratorRegistrations(descriptors);\n\tconst declared = /* @__PURE__ */ new Map();\n\tconst bindingsByCodec = /* @__PURE__ */ new Map();\n\tconst printersByCodecAndGenerator = /* @__PURE__ */ new Map();\n\tconst contributed = [];\n\tfor (const descriptor of descriptors) {\n\t\tconst contributedBy = descriptor.id ?? \"<unknown>\";\n\t\tfor (const contribution of descriptor.generatorFunctions ?? []) {\n\t\t\tif (contribution.signature !== void 0) {\n\t\t\t\tconst [namedParameter] = namedParametersOf(contribution.signature);\n\t\t\t\tif (namedParameter !== void 0) throw invalidContribution(`Generator function \"${contribution.name}\" from \"${contributedBy}\" declares the named parameter \"${namedParameter}\". A generator function takes positional parameters only, because a TypeScript gen call passes its arguments by position; declare it in positional.`);\n\t\t\t\tconst existing = declared.get(contribution.name);\n\t\t\t\tif (existing !== void 0) throw invalidContribution(`Generator function \"${contribution.name}\" is declared by both \"${existing.declaredBy}\" and \"${contributedBy}\".`);\n\t\t\t\tdeclared.set(contribution.name, {\n\t\t\t\t\tsignature: contribution.signature,\n\t\t\t\t\tdeclaredBy: contributedBy\n\t\t\t\t});\n\t\t\t}\n\t\t\tfor (const binding of contribution.bindings) contributed.push({\n\t\t\t\tname: contribution.name,\n\t\t\t\tbinding,\n\t\t\t\tcontributedBy\n\t\t\t});\n\t\t}\n\t}\n\tfor (const owned of contributed) {\n\t\tif (!declared.has(owned.name)) throw invalidContribution(`\"${owned.contributedBy}\" binds generator function \"${owned.name}\", which no component declares.`);\n\t\tfor (const codecId of owned.binding.codecIds) {\n\t\t\tconst forCodec = bindingsByCodec.get(codecId) ?? /* @__PURE__ */ new Map();\n\t\t\tconst existing = forCodec.get(owned.name);\n\t\t\tif (existing !== void 0) throw invalidContribution(`Generator function \"${owned.name}\" is bound to codec \"${codecId}\" by both \"${existing.contributedBy}\" and \"${owned.contributedBy}\".`);\n\t\t\tforCodec.set(owned.name, owned);\n\t\t\tbindingsByCodec.set(codecId, forCodec);\n\t\t\tfor (const generatorId of owned.binding.generatorIds) {\n\t\t\t\tconst key = `${codecId}\\u0000${generatorId}`;\n\t\t\t\tconst printer = printersByCodecAndGenerator.get(key);\n\t\t\t\tif (printer !== void 0 && printer.name !== owned.name) throw invalidContribution(`Generator \"${generatorId}\" on codec \"${codecId}\" is written by both function \"${printer.name}\" from \"${printer.contributedBy}\" and function \"${owned.name}\" from \"${owned.contributedBy}\".`);\n\t\t\t\tprintersByCodecAndGenerator.set(key, owned);\n\t\t\t}\n\t\t}\n\t\tfor (const generatorId of owned.binding.generatorIds) if (!registered.has(generatorId)) throw invalidContribution(`Generator function \"${owned.name}\" from \"${owned.contributedBy}\" produces generator \"${generatorId}\", which no generator descriptor in the stack registers.`);\n\t}\n\tfunction boundCodecIdsOf(name) {\n\t\treturn [...bindingsByCodec.entries()].filter(([, forCodec]) => forCodec.has(name)).map(([codecId]) => codecId).sort();\n\t}\n\treturn {\n\t\tfunctionsFor(codecId) {\n\t\t\treturn [...bindingsByCodec.get(codecId)?.keys() ?? []].sort().map((name) => ({\n\t\t\t\tname,\n\t\t\t\tsignature: declared.get(name)?.signature\n\t\t\t}));\n\t\t},\n\t\thas(name) {\n\t\t\treturn declared.has(name);\n\t\t},\n\t\tresolve({ name, args }, field) {\n\t\t\tif (!declared.has(name)) return {\n\t\t\t\tok: false,\n\t\t\t\treason: \"unknown-function\",\n\t\t\t\tboundCodecIds: []\n\t\t\t};\n\t\t\tconst owned = bindingsByCodec.get(field.codecId)?.get(name);\n\t\t\tif (owned === void 0) return {\n\t\t\t\tok: false,\n\t\t\t\treason: \"not-bound\",\n\t\t\t\tboundCodecIds: boundCodecIdsOf(name)\n\t\t\t};\n\t\t\tconst resolution = owned.binding.resolve({\n\t\t\t\targs,\n\t\t\t\tfield\n\t\t\t});\n\t\t\tif (!resolution.ok) return {\n\t\t\t\tok: false,\n\t\t\t\treason: \"refused\",\n\t\t\t\tmessage: resolution.message\n\t\t\t};\n\t\t\tif (!owned.binding.generatorIds.includes(resolution.generator.id)) throw new InternalError(`Generator function \"${name}\" from \"${owned.contributedBy}\" resolved to generator \"${resolution.generator.id}\", which its binding does not declare in generatorIds.`);\n\t\t\treturn resolution;\n\t\t},\n\t\tcallFor(generator, field) {\n\t\t\tconst owned = printersByCodecAndGenerator.get(`${field.codecId}\\u0000${generator.id}`);\n\t\t\tif (owned === void 0) return void 0;\n\t\t\tconst printed = owned.binding.printArguments(generator, field);\n\t\t\treturn printed === void 0 ? void 0 : {\n\t\t\t\tcall: {\n\t\t\t\t\tname: owned.name,\n\t\t\t\t\targs: printed.args\n\t\t\t\t},\n\t\t\t\ttext: `${owned.name}(${printed.text})`\n\t\t\t};\n\t\t}\n\t};\n}\n/**\n* A binding of a function that takes no arguments to one generator, with params read from the field's type params when `paramsFromField` gives any.\n*/\nfunction singleGeneratorBinding(input) {\n\treturn {\n\t\tcodecIds: input.codecIds,\n\t\tgeneratorIds: [input.generatorId],\n\t\tresolve: ({ field }) => {\n\t\t\tconst params = input.paramsFromField?.(field);\n\t\t\treturn {\n\t\t\t\tok: true,\n\t\t\t\tgenerator: params === void 0 ? {\n\t\t\t\t\tkind: \"generator\",\n\t\t\t\t\tid: input.generatorId\n\t\t\t\t} : {\n\t\t\t\t\tkind: \"generator\",\n\t\t\t\t\tid: input.generatorId,\n\t\t\t\t\tparams\n\t\t\t\t}\n\t\t\t};\n\t\t},\n\t\tprintArguments: (generator) => generator.id === input.generatorId ? {\n\t\t\targs: {},\n\t\t\ttext: \"\"\n\t\t} : void 0\n\t};\n}\n/** The generator functions of a stack that contributes none. */\nconst EMPTY_GENERATOR_FUNCTIONS = assembleGeneratorFunctions([]);\n//#endregion\nexport { mergeCapabilityMatrices as a, isAnyInputAggregateDescriptor as c, singleGeneratorBinding as i, isNoInputAggregateDescriptor as l, assembleGeneratorFunctions as n, aggregateDescriptorKey as o, assembleGeneratorRegistrations as r, isAggregateDescriptor as s, EMPTY_GENERATOR_FUNCTIONS as t };\n\n//# sourceMappingURL=generator-functions-CXbQfvYu.mjs.map"],"mappings":";;;;;;;;AAQA,SAAS,uBAAuB,YAAY;CAC3C,QAAQ,WAAW,MAAM,MAAzB;EACC,KAAK,QAAQ,OAAO,GAAG,WAAW,UAAU;EAC5C,KAAK,OAAO,OAAO,GAAG,WAAW,UAAU;EAC3C,KAAK,SAAS,OAAO,GAAG,WAAW,UAAU,SAAS,WAAW,MAAM;EACvE,KAAK,SAAS,OAAO,GAAG,WAAW,UAAU,SAAS,WAAW,MAAM;CACxE;AACD;;AAEA,SAAS,6BAA6B,YAAY;CACjD,OAAO,WAAW,MAAM,SAAS;AAClC;;AAEA,SAAS,8BAA8B,YAAY;CAClD,OAAO,WAAW,MAAM,SAAS;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