@prisma/orm-framework 8.0.0-rc.18-dev.41 → 8.0.0-rc.18-dev.43

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.
Files changed (102) hide show
  1. package/dist/{authoring-BKO7sRLw.d.mts → authoring-C8sYYHu7.d.mts} +3 -3
  2. package/dist/{authoring-BKO7sRLw.d.mts.map → authoring-C8sYYHu7.d.mts.map} +1 -1
  3. package/dist/{authoring-so3aBYD8.mjs → authoring-qO6idK5H.mjs} +24 -3
  4. package/dist/authoring-qO6idK5H.mjs.map +1 -0
  5. package/dist/{binder-WS9-1Mu9-MJi8x3Gm.d.mts → binder-63ozT0D8-BixamO0l.d.mts} +12 -10
  6. package/dist/binder-63ozT0D8-BixamO0l.d.mts.map +1 -0
  7. package/dist/{components-D-8GZwNo.d.mts → components-B3SnaxMU.d.mts} +2 -2
  8. package/dist/{components-D-8GZwNo.d.mts.map → components-B3SnaxMU.d.mts.map} +1 -1
  9. package/dist/components.d.mts +10 -10
  10. package/dist/components.mjs +4 -4
  11. package/dist/components__authoring.d.mts +4 -4
  12. package/dist/components__authoring.mjs +3 -3
  13. package/dist/components__components.d.mts +2 -2
  14. package/dist/components__control.d.mts +3 -3
  15. package/dist/components__control.mjs +3 -3
  16. package/dist/components__execution.d.mts +1 -1
  17. package/dist/components__psl-ast.d.mts +3 -3
  18. package/dist/{config-types-CfdMN7t-.d.mts → config-types-0fY7fbd7.d.mts} +6 -6
  19. package/dist/{config-types-CfdMN7t-.d.mts.map → config-types-0fY7fbd7.d.mts.map} +1 -1
  20. package/dist/config.d.mts +1 -1
  21. package/dist/config__config-types.d.mts +1 -1
  22. package/dist/contract-authoring.d.mts +34 -14
  23. package/dist/contract-authoring.d.mts.map +1 -1
  24. package/dist/contract-authoring.mjs +3 -3
  25. package/dist/{control-B5ezUWD2-BgUEggvd.d.mts → control-B5ezUWD2-D6knyncN.d.mts} +2 -2
  26. package/dist/{control-B5ezUWD2-BgUEggvd.d.mts.map → control-B5ezUWD2-D6knyncN.d.mts.map} +1 -1
  27. package/dist/control-D2ZpYj6i.d.mts +1 -0
  28. package/dist/{control-7DsPHRLi.d.mts → control-D9rb0OBR.d.mts} +18 -48
  29. package/dist/{control-7DsPHRLi.d.mts.map → control-D9rb0OBR.d.mts.map} +1 -1
  30. package/dist/{control-AlBtrJUn.mjs → control-DPasGnOD.mjs} +23 -124
  31. package/dist/control-DPasGnOD.mjs.map +1 -0
  32. package/dist/{control-KsXr4fYD-DJm_48Db.mjs → control-KsXr4fYD-B23ri5vh.mjs} +2 -2
  33. package/dist/{control-KsXr4fYD-DJm_48Db.mjs.map → control-KsXr4fYD-B23ri5vh.mjs.map} +1 -1
  34. package/dist/declarations-BgUAq1RG-ShewcVdd.mjs +459 -0
  35. package/dist/declarations-BgUAq1RG-ShewcVdd.mjs.map +1 -0
  36. package/dist/errors.d.mts +4 -4
  37. package/dist/errors.mjs +3 -3
  38. package/dist/errors__control.d.mts +2 -2
  39. package/dist/errors__control.mjs +1 -1
  40. package/dist/errors__execution.d.mts +1 -1
  41. package/dist/errors__execution.mjs +1 -1
  42. package/dist/errors__migration.d.mts +1 -1
  43. package/dist/errors__migration.mjs +1 -1
  44. package/dist/{execution-BkcXd7Tn.d.mts → execution-C00_IFA7.d.mts} +3 -3
  45. package/dist/{execution-BkcXd7Tn.d.mts.map → execution-C00_IFA7.d.mts.map} +1 -1
  46. package/dist/{execution-KLhn9sSn.mjs → execution-C_4ICly-.mjs} +2 -2
  47. package/dist/{execution-KLhn9sSn.mjs.map → execution-C_4ICly-.mjs.map} +1 -1
  48. package/dist/{execution-DXQQRCfR.d.mts → execution-CktUHYP0.d.mts} +2 -2
  49. package/dist/{execution-DXQQRCfR.d.mts.map → execution-CktUHYP0.d.mts.map} +1 -1
  50. package/dist/expressions-CMQzbnHk-fqYn-D3z.mjs +895 -0
  51. package/dist/expressions-CMQzbnHk-fqYn-D3z.mjs.map +1 -0
  52. package/dist/{framework-authoring-hZgq-M2K-Daz3kgWL.d.mts → framework-authoring-Du7xSUmg-D85Toszi.d.mts} +27 -10
  53. package/dist/framework-authoring-Du7xSUmg-D85Toszi.d.mts.map +1 -0
  54. package/dist/{framework-components-B-yaLbst-nZJUGMuf.d.mts → framework-components-DQFte83L-CIIcH8Bj.d.mts} +3 -3
  55. package/dist/{framework-components-B-yaLbst-nZJUGMuf.d.mts.map → framework-components-DQFte83L-CIIcH8Bj.d.mts.map} +1 -1
  56. package/dist/{migration-CZik9OxU.mjs → migration-Dy-tXHxh.mjs} +2 -2
  57. package/dist/{migration-CZik9OxU.mjs.map → migration-Dy-tXHxh.mjs.map} +1 -1
  58. package/dist/{migration-BVDJBmyi.d.mts → migration-K3Co0dba.d.mts} +2 -2
  59. package/dist/{migration-BVDJBmyi.d.mts.map → migration-K3Co0dba.d.mts.map} +1 -1
  60. package/dist/{parse-BxcaGLV1-BxEIfxh3.mjs → parse-bZgfjovA-Bd80h0ox.mjs} +4 -4
  61. package/dist/{parse-BxcaGLV1-BxEIfxh3.mjs.map → parse-bZgfjovA-Bd80h0ox.mjs.map} +1 -1
  62. package/dist/{parse-CJtBvEYy-BCae0181.d.mts → parse-djL5wker-DYTP4HGq.d.mts} +7 -7
  63. package/dist/{parse-CJtBvEYy-BCae0181.d.mts.map → parse-djL5wker-DYTP4HGq.d.mts.map} +1 -1
  64. package/dist/{psl-ast-BIJIW24G-B8ptjyuO.d.mts → psl-ast-B6X_rlhZ-DCrq7Zie.d.mts} +3 -3
  65. package/dist/{psl-ast-BIJIW24G-B8ptjyuO.d.mts.map → psl-ast-B6X_rlhZ-DCrq7Zie.d.mts.map} +1 -1
  66. package/dist/psl-ast-DlmFfwfZ.d.mts +2 -0
  67. package/dist/psl-parser.d.mts +22 -11
  68. package/dist/psl-parser.d.mts.map +1 -1
  69. package/dist/psl-parser.mjs +14 -110
  70. package/dist/psl-parser.mjs.map +1 -1
  71. package/dist/psl-parser__format.d.mts +1 -1
  72. package/dist/psl-parser__format.mjs +3 -3
  73. package/dist/psl-parser__format.mjs.map +1 -1
  74. package/dist/psl-parser__interpret.d.mts +16 -13
  75. package/dist/psl-parser__interpret.d.mts.map +1 -1
  76. package/dist/psl-parser__interpret.mjs +52 -48
  77. package/dist/psl-parser__interpret.mjs.map +1 -1
  78. package/dist/psl-parser__syntax.d.mts +1 -1
  79. package/dist/psl-parser__syntax.mjs +3 -3
  80. package/dist/psl-printer.d.mts +4 -4
  81. package/dist/psl-printer.mjs +1 -1
  82. package/dist/read-expression-as-Dhyvx51C-Bpn_1X05.mjs +239 -0
  83. package/dist/read-expression-as-Dhyvx51C-Bpn_1X05.mjs.map +1 -0
  84. package/dist/{temporal-presets-Cumws2z--DcYWooYJ.d.mts → temporal-presets-D_TQBbXU-DLIsE1k-.d.mts} +42 -4
  85. package/dist/temporal-presets-D_TQBbXU-DLIsE1k-.d.mts.map +1 -0
  86. package/dist/{temporal-presets-BcDyr_hK-CFplJNGz.mjs → temporal-presets-DmZDnaZV-aUZPt1LX.mjs} +189 -22
  87. package/dist/temporal-presets-DmZDnaZV-aUZPt1LX.mjs.map +1 -0
  88. package/package.json +15 -15
  89. package/dist/ast-helpers-CzydMPdh-Mi0SrZRa.mjs +0 -424
  90. package/dist/ast-helpers-CzydMPdh-Mi0SrZRa.mjs.map +0 -1
  91. package/dist/authoring-so3aBYD8.mjs.map +0 -1
  92. package/dist/binder-WS9-1Mu9-MJi8x3Gm.d.mts.map +0 -1
  93. package/dist/control-AlBtrJUn.mjs.map +0 -1
  94. package/dist/control-CIEbQ0bK.d.mts +0 -1
  95. package/dist/declarations-DuSbyF44-D-Q7-GRi.mjs +0 -930
  96. package/dist/declarations-DuSbyF44-D-Q7-GRi.mjs.map +0 -1
  97. package/dist/framework-authoring-hZgq-M2K-Daz3kgWL.d.mts.map +0 -1
  98. package/dist/psl-ast-rf0UoVty.d.mts +0 -2
  99. package/dist/resolve-C8PUf8zv-QAvnPhCt.mjs +0 -146
  100. package/dist/resolve-C8PUf8zv-QAvnPhCt.mjs.map +0 -1
  101. package/dist/temporal-presets-BcDyr_hK-CFplJNGz.mjs.map +0 -1
  102. package/dist/temporal-presets-Cumws2z--DcYWooYJ.d.mts.map +0 -1
@@ -2,15 +2,15 @@ import { t as blindCast } from "./casts-DpaahrlC-Bd5n2coI.mjs";
2
2
  import { t as InternalError } from "./internal-error-ChGYPVpq-DhUD05u0.mjs";
3
3
  import { a as or, i as okVoid, n as notOk, r as ok, t as and } from "./result-8OXF26MN.mjs";
4
4
  import { c as createDataTypeLookup } from "./data-type-CVNHtd6y-BFa_VnCb.mjs";
5
- import { b as isAuthoringModelAttributeDescriptor, d as describeTaggedLiteralFailure, x as isAuthoringPslBlockDescriptor } from "./temporal-presets-BcDyr_hK-CFplJNGz.mjs";
5
+ import { T as isAuthoringPslBlockDescriptor, m as describeTaggedLiteralFailure, w as isAuthoringModelAttributeDescriptor } from "./temporal-presets-DmZDnaZV-aUZPt1LX.mjs";
6
6
  import { r as UNBOUND_NAMESPACE_ID } from "./namespace-VUH2dgnS-By5y75h9.mjs";
7
- import { S as tagForm, a as castTypedValue, c as describeRefusal, h as exactRewrite, n as admittedTags, o as describeAdmittedForms, s as describeExpected, t as admittedForms, x as readWrittenValue } from "./authoring-so3aBYD8.mjs";
7
+ import { C as tagForm, n as admittedTags, o as describeAdmittedForms } from "./authoring-qO6idK5H.mjs";
8
8
  import { a as flatPslModels, c as namespacePslExtensionBlocks, n as UNBOUND_PSL_NAMESPACE_NAME } from "./psl-ast-CyvE6CR-.mjs";
9
- import { l as printSyntax } from "./ast-helpers-CzydMPdh-Mi0SrZRa.mjs";
10
9
  import { n as isPslIdentifier } from "./tokenizer-C-GTKKjR-B1vOzJy0.mjs";
11
- import { D as TypesBlockAst, S as PathExprAst, T as TaggedLiteralExprAst, a as CompositeTypeDeclarationAst, c as FieldDeclarationAst, d as IdentifierAst, f as KeyValuePairAst, g as ModelDeclarationAst, h as ModelAttributeAst, i as BooleanLiteralExprAst, l as FunctionCallAst, p as MixinDeclarationAst, t as ArrayLiteralAst, u as GenericBlockDeclarationAst, v as NamespaceDeclarationAst, w as StringLiteralExprAst, x as ObjectLiteralExprAst, y as NumberLiteralExprAst } from "./declarations-DuSbyF44-D-Q7-GRi.mjs";
12
- import { a as mapPslDiagnostics, c as readResolvedAttributes, i as keywordPslSpan, l as readResolvedConstructorCall, n as diagnosticFromSpan, o as nodePslSpan, r as diagnosticSource, s as readResolvedAttribute, t as createPslDiagnosticCollector } from "./resolve-C8PUf8zv-QAvnPhCt.mjs";
13
- //#region ../../../1-framework/2-authoring/psl-parser/dist/binder-CzIVWo8K.mjs
10
+ import { C as printSyntax, a as IdentifierAst, c as ObjectLiteralExprAst, d as StringLiteralExprAst, i as FunctionCallAst, l as PathExprAst, m as TaggedLiteralExprAst, o as NumberLiteralExprAst, r as BooleanLiteralExprAst, t as ArrayLiteralAst } from "./expressions-CMQzbnHk-fqYn-D3z.mjs";
11
+ import { a as keywordPslSpan, c as readResolvedAttribute, d as readWrittenScalar, i as diagnosticSource, l as readResolvedAttributes, n as createPslDiagnosticCollector, o as mapPslDiagnostics, r as diagnosticFromSpan, s as nodePslSpan, t as readExpressionAs, u as readResolvedConstructorCall } from "./read-expression-as-Dhyvx51C-Bpn_1X05.mjs";
12
+ import { a as FieldDeclarationAst, c as MixinDeclarationAst, d as ModelDeclarationAst, h as TypesBlockAst, n as CompositeTypeDeclarationAst, o as GenericBlockDeclarationAst, p as NamespaceDeclarationAst, s as KeyValuePairAst, u as ModelAttributeAst } from "./declarations-BgUAq1RG-ShewcVdd.mjs";
13
+ //#region ../../../1-framework/2-authoring/psl-parser/dist/binder-Cl92Fnz3.mjs
14
14
  function* modelAttributeDescriptors(namespace) {
15
15
  for (const value of Object.values(namespace)) {
16
16
  if (isAuthoringModelAttributeDescriptor(value)) {
@@ -41,72 +41,6 @@ function resolveDescribeUnresolvedType(pslDiagnostics) {
41
41
  if (pslDiagnostics?.describeUnresolvedType === void 0) return;
42
42
  return blindCast(pslDiagnostics.describeUnresolvedType);
43
43
  }
44
- const AN_EXPRESSION = {
45
- ok: false,
46
- reason: "not-a-literal",
47
- found: "an expression"
48
- };
49
- function written(value) {
50
- return {
51
- ok: true,
52
- written: value
53
- };
54
- }
55
- /** Reads a PSL literal expression as a `WrittenScalar`, for a position that takes a value of a data type. ADR 254. */
56
- function readWrittenScalar(expression) {
57
- const syntax = expression.syntax;
58
- const string = StringLiteralExprAst.cast(syntax)?.value();
59
- if (string !== void 0) return written({
60
- kind: "string",
61
- text: string
62
- });
63
- const number = NumberLiteralExprAst.cast(syntax);
64
- if (number !== void 0) {
65
- const text = number.token()?.text;
66
- return text === void 0 ? AN_EXPRESSION : written({
67
- kind: "number",
68
- text
69
- });
70
- }
71
- const boolean = BooleanLiteralExprAst.cast(syntax)?.value();
72
- if (boolean !== void 0) return written({
73
- kind: "boolean",
74
- value: boolean
75
- });
76
- const tagged = TaggedLiteralExprAst.cast(syntax);
77
- if (tagged !== void 0) {
78
- const canonicalization = tagged.canonicalization();
79
- return canonicalization.ok ? written({
80
- kind: "tag",
81
- tag: tagged.tagName(),
82
- text: canonicalization.text
83
- }) : {
84
- ok: false,
85
- reason: canonicalization.reason
86
- };
87
- }
88
- if (IdentifierAst.cast(syntax) !== void 0) return {
89
- ok: false,
90
- reason: "not-a-literal",
91
- found: "an identifier"
92
- };
93
- if (FunctionCallAst.cast(syntax) !== void 0) return {
94
- ok: false,
95
- reason: "not-a-literal",
96
- found: "a function call"
97
- };
98
- if (ArrayLiteralAst.cast(syntax) !== void 0) return {
99
- ok: false,
100
- reason: "not-a-literal",
101
- found: "a list"
102
- };
103
- if (ObjectLiteralExprAst.cast(syntax) !== void 0) return {
104
- ok: false,
105
- reason: "not-a-literal",
106
- found: "an object"
107
- };
108
- return AN_EXPRESSION;
109
- }
110
44
  function writtenEntityReference(node) {
111
45
  const name = IdentifierAst.cast(node)?.name();
112
46
  if (name !== void 0) return {
@@ -1588,15 +1522,10 @@ function bool() {
1588
1522
  }
1589
1523
  };
1590
1524
  }
1591
- const TAGGED_LITERAL_FAILURE_CODES$1 = {
1592
- nul: "PSL_TAGGED_LITERAL_NUL",
1593
- "too-large": "PSL_TAGGED_LITERAL_TOO_LARGE"
1594
- };
1595
1525
  /** An argument typed by a data type: any literal, admitted by the ADR 254 cast rule. Used as a parameter of an attribute, a block or a `funcCall`; `oneOf` refuses it as an arm. ADR 231, ADR 254, ADR 268. */
1596
1526
  function dataTypeValue(dataType, support, options = {}) {
1597
1527
  const tags = admittedTags(support, dataType);
1598
1528
  const [firstTag] = tags;
1599
- const forms = admittedForms(support, [dataType]);
1600
1529
  return {
1601
1530
  kind: "dataTypeValue",
1602
1531
  label: options.label ?? (firstTag === void 0 ? describeAdmittedForms(support, dataType) : tagForm(firstTag).phrase),
@@ -1604,39 +1533,14 @@ function dataTypeValue(dataType, support, options = {}) {
1604
1533
  tags,
1605
1534
  documentation: support.entries[dataType]?.documentation ?? "",
1606
1535
  suggestions: options.suggestions ?? [],
1607
- parse: (arg, ctx) => parseDataTypeValue(arg, ctx, dataType, support, forms)
1608
- };
1609
- }
1610
- function parseDataTypeValue(arg, ctx, dataType, support, forms) {
1611
- if (!support.lookup.has(dataType)) throw new InternalError(`An argument receives data type "${dataType}", which this stack does not register.`);
1612
- if (forms.length === 0) throw new InternalError(`An argument receives data type "${dataType}", which nothing in this stack writes.`);
1613
- const refuse = ({ code, message }) => notOk([leafDiagnostic(ctx, arg, message, code)]);
1614
- const literal = readWrittenScalar(arg);
1615
- if (!literal.ok) return literal.reason === "not-a-literal" ? refuse({
1616
- code: "PSL_INVALID_ATTRIBUTE_SYNTAX",
1617
- message: `${describeExpected(forms)}; got ${literal.found}`
1618
- }) : refuse({
1619
- code: TAGGED_LITERAL_FAILURE_CODES$1[literal.reason],
1620
- message: describeTaggedLiteralFailure(literal.reason)
1621
- });
1622
- const read = readWrittenValue(support, literal.written);
1623
- if (!read.ok) return refuse(describeRefusal(read.failure, support, {
1624
- forms,
1625
- rewrite: void 0
1626
- }));
1627
- const cast = castTypedValue(support, dataType, {}, read.value);
1628
- if (!cast.ok) {
1629
- const rewrite = exactRewrite(support, {
1630
- receivingType: dataType,
1631
- receivingParams: {}
1632
- }, literal.written);
1633
- return refuse(describeRefusal(cast.failure, support, {
1634
- forms,
1635
- rewrite
1636
- }));
1637
- }
1536
+ parse: (arg, ctx) => parseDataTypeValue(arg, ctx, dataType, support)
1537
+ };
1538
+ }
1539
+ function parseDataTypeValue(arg, ctx, dataType, support) {
1540
+ const read = readExpressionAs(support, dataType, arg);
1541
+ if (!read.ok) return notOk([leafDiagnostic(ctx, arg, read.failure.message, read.failure.code)]);
1638
1542
  return ok({
1639
- value: cast.value,
1543
+ value: read.value,
1640
1544
  span: nodePslSpan(arg.syntax, ctx.sources)
1641
1545
  });
1642
1546
  }
@@ -2539,6 +2443,6 @@ function renameLegacyDirective(text) {
2539
2443
  return text.replace(DIRECTIVE, (whole, lead, name, trail) => name === LEGACY_NAME ? `${lead}prisma-8${trail}` : whole);
2540
2444
  }
2541
2445
  //#endregion
2542
- export { EMPTY_DATA_TYPES, NAME_THE_PSL_SOURCE_LOSES, PSL_UNRESOLVED_REFERENCE, assembleAttributeSpecs, blockAttribute, blockSpecContext, blockSpecFactoryOf, bool, buildSymbolTable, contributedTypeOf, createBinder, createPslDiagnosticCollector, dataTypeValue, diagnosticFromSpan, diagnosticSource, entityRef, entityReference, enumMemberValue, fieldAttribute, fieldRef, findBlockDescriptor, flatPslModels, funcCall, generatorAttributeSpec, generatorFunctionCall, getPositionalArgument, identifier, int, interpretArgs, interpretAttribute, interpretExtensionBlock, interpretExtensionBlockAttributes, interpretExtensionBlocks, isNamespaceLike, isPrismaNextSchema, isPslIdentifier, json, jsonValue, keywordPslSpan, leafDiagnostic, list, mapArg, mapBlock, mapPslDiagnostics, matchesSelector, memberEntries, modelAttribute, namespacePslExtensionBlocks, nodePslSpan, nodeSourceText, num, numLiteral, oneOf, optional, parseQuotedStringLiteral, readResolvedAttribute, readResolvedAttributes, readResolvedConstructorCall, readWrittenScalar, record, referencedFieldRef, refineArg, renameLegacyDirective, str, structBlock, taggedLiteral, typeReferenceNode, writtenList, writtenScalar };
2446
+ export { EMPTY_DATA_TYPES, NAME_THE_PSL_SOURCE_LOSES, PSL_UNRESOLVED_REFERENCE, assembleAttributeSpecs, blockAttribute, blockSpecContext, blockSpecFactoryOf, bool, buildSymbolTable, contributedTypeOf, createBinder, createPslDiagnosticCollector, dataTypeValue, diagnosticFromSpan, diagnosticSource, entityRef, entityReference, enumMemberValue, fieldAttribute, fieldRef, findBlockDescriptor, flatPslModels, funcCall, generatorAttributeSpec, generatorFunctionCall, getPositionalArgument, identifier, int, interpretArgs, interpretAttribute, interpretExtensionBlock, interpretExtensionBlockAttributes, interpretExtensionBlocks, isNamespaceLike, isPrismaNextSchema, isPslIdentifier, json, jsonValue, keywordPslSpan, leafDiagnostic, list, mapArg, mapBlock, mapPslDiagnostics, matchesSelector, memberEntries, modelAttribute, namespacePslExtensionBlocks, nodePslSpan, nodeSourceText, num, numLiteral, oneOf, optional, parseQuotedStringLiteral, readExpressionAs, readResolvedAttribute, readResolvedAttributes, readResolvedConstructorCall, readWrittenScalar, record, referencedFieldRef, refineArg, renameLegacyDirective, str, structBlock, taggedLiteral, typeReferenceNode, writtenList, writtenScalar };
2543
2447
 
2544
2448
  //# sourceMappingURL=psl-parser.mjs.map