@prisma/orm-framework 8.0.0-rc.11-dev.16 → 8.0.0-rc.11-dev.17

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 (47) hide show
  1. package/dist/{control-ZdvxNTVU-cVV8u7aQ.mjs → control-Dqz1O00q-CNy6vLdH.mjs} +4 -2
  2. package/dist/control-Dqz1O00q-CNy6vLdH.mjs.map +1 -0
  3. package/dist/{control-ql9N9u4f-D5sGnPR-.d.mts → control-tJzRbhcm-FZPs7pf9.d.mts} +6 -3
  4. package/dist/control-tJzRbhcm-FZPs7pf9.d.mts.map +1 -0
  5. package/dist/{declarations-DR6To8_k-BFwkCGeP.mjs → declarations-C8gJnWQp-CnufYOCF.mjs} +10 -2
  6. package/dist/{declarations-DR6To8_k-BFwkCGeP.mjs.map → declarations-C8gJnWQp-CnufYOCF.mjs.map} +1 -1
  7. package/dist/errors.d.mts +3 -3
  8. package/dist/errors.mjs +3 -3
  9. package/dist/errors__control.d.mts +1 -1
  10. package/dist/errors__control.mjs +1 -1
  11. package/dist/errors__execution.d.mts +1 -1
  12. package/dist/errors__execution.mjs +1 -1
  13. package/dist/errors__migration.d.mts +1 -1
  14. package/dist/errors__migration.mjs +1 -1
  15. package/dist/{execution-BEVehm0I.mjs → execution-BRNA-BjF.mjs} +3 -2
  16. package/dist/{execution-BEVehm0I.mjs.map → execution-BRNA-BjF.mjs.map} +1 -1
  17. package/dist/{execution-CsDRPfhQ.d.mts → execution-DDHLJAxw.d.mts} +4 -3
  18. package/dist/{execution-CsDRPfhQ.d.mts.map → execution-DDHLJAxw.d.mts.map} +1 -1
  19. package/dist/{migration-Bdp-ucGZ.d.mts → migration-BLWAkEWP.d.mts} +2 -2
  20. package/dist/{migration-Bdp-ucGZ.d.mts.map → migration-BLWAkEWP.d.mts.map} +1 -1
  21. package/dist/{migration-S40Rgr7K.mjs → migration-xidzvvbN.mjs} +2 -2
  22. package/dist/{migration-S40Rgr7K.mjs.map → migration-xidzvvbN.mjs.map} +1 -1
  23. package/dist/{parse-GbZGfMUj-C9tHGn-6.mjs → parse-BPOOpARs-COpO0wc7.mjs} +35 -16
  24. package/dist/parse-BPOOpARs-COpO0wc7.mjs.map +1 -0
  25. package/dist/{parse-B5xYL_oV-eRg5n6ha.d.mts → parse-Di31RMVM-BishytyS.d.mts} +16 -4
  26. package/dist/{parse-B5xYL_oV-eRg5n6ha.d.mts.map → parse-Di31RMVM-BishytyS.d.mts.map} +1 -1
  27. package/dist/psl-parser.d.mts +15 -4
  28. package/dist/psl-parser.d.mts.map +1 -1
  29. package/dist/psl-parser.mjs +15 -2
  30. package/dist/psl-parser.mjs.map +1 -1
  31. package/dist/psl-parser__format.mjs +30 -8
  32. package/dist/psl-parser__format.mjs.map +1 -1
  33. package/dist/psl-parser__interpret.d.mts +2 -2
  34. package/dist/psl-parser__syntax.d.mts +2 -2
  35. package/dist/psl-parser__syntax.mjs +2 -2
  36. package/dist/psl-parser__syntax.mjs.map +1 -1
  37. package/dist/{structured-error-Z4iE-fTI.d.mts → structured-error-Cc7AIRsp.d.mts} +16 -2
  38. package/dist/structured-error-Cc7AIRsp.d.mts.map +1 -0
  39. package/dist/{symbol-table-BeOQBu3C-wAie__JJ.d.mts → symbol-table-BsJpsMzi-D8DjUxrQ.d.mts} +3 -3
  40. package/dist/{symbol-table-BeOQBu3C-wAie__JJ.d.mts.map → symbol-table-BsJpsMzi-D8DjUxrQ.d.mts.map} +1 -1
  41. package/dist/utils.d.mts +2 -2
  42. package/dist/utils__structured-error.d.mts +2 -2
  43. package/package.json +15 -15
  44. package/dist/control-ZdvxNTVU-cVV8u7aQ.mjs.map +0 -1
  45. package/dist/control-ql9N9u4f-D5sGnPR-.d.mts.map +0 -1
  46. package/dist/parse-GbZGfMUj-C9tHGn-6.mjs.map +0 -1
  47. package/dist/structured-error-Z4iE-fTI.d.mts.map +0 -1
@@ -1,6 +1,6 @@
1
1
  import { $ as SchemaDiffIssue, St as VerifyDatabaseSchemaResult } from "./control-BYM5Hu_N.mjs";
2
- import { r as NextAction } from "./structured-error-Z4iE-fTI.mjs";
3
- import { r as CliStructuredError } from "./control-ql9N9u4f-D5sGnPR-.mjs";
2
+ import { i as NextAction, r as Diagnostic } from "./structured-error-Cc7AIRsp.mjs";
3
+ import { r as CliStructuredError } from "./control-tJzRbhcm-FZPs7pf9.mjs";
4
4
  //#region ../../../1-framework/1-core/errors/dist/execution.d.mts
5
5
  //#region src/execution.d.ts
6
6
  /**
@@ -107,9 +107,10 @@ declare function errorConsentPlanMismatch(options: {
107
107
  declare function errorRuntime(code: `${string}.${string}`, summary: string, options?: {
108
108
  readonly why?: string;
109
109
  readonly fix?: string;
110
+ readonly diagnostics?: readonly Diagnostic[];
110
111
  readonly meta?: Record<string, unknown>;
111
112
  readonly cause?: unknown;
112
113
  }): CliStructuredError;
113
114
  //#endregion
114
115
  export { errorHashMismatch as a, errorMarkerRequired as c, errorRuntime as d, errorSchemaVerificationFailed as f, withMarkerReadErrorHandling as g, rethrowMarkerReadError as h, errorDestructiveChanges as i, errorMarkerRowCorrupt as l, parseMarkerRowSafely as m, ERROR_CODE_DESTRUCTIVE_CHANGES as n, errorMarkerMissing as o, errorTargetMismatch as p, errorConsentPlanMismatch as r, errorMarkerReadFailed as s, ERROR_CODE_CONSENT_PLAN_MISMATCH as t, errorRunnerFailed as u };
115
- //# sourceMappingURL=execution-CsDRPfhQ.d.mts.map
116
+ //# sourceMappingURL=execution-DDHLJAxw.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"execution-CsDRPfhQ.d.mts","names":[],"sources":["../../../../1-framework/1-core/errors/dist/execution.d.mts"],"mappings":";;;;;;;;iBAOiB,mBAAmB;WACzB;IACP;;;;iBAIa,kBAAkB;WACxB;WACA;WACA;IACP;;;;iBAIa,oBAAoB,kBAAkB,gBAAgB;WAC5D;IACP;;;;iBAIa,sBAAsB;WAC5B;WACA;WACA;WACA;IACP;;;;iBAIa,sBAAsB;WAC5B;WACA;WACA;WACA;IACP;iBACa,uBAAuB,cAAc;WAC3C;WACA;;iBAEM,4BAA4B,GAAG,iBAAiB,QAAQ,IAAI;WAClE;WACA;IACP,QAAQ;iBACK,qBAAqB,GAAG,cAAc,QAAQ,mBAAmB,GAAG;WAC1E;WACA;IACP;;;;;iBAKa,oBAAoB;WAC1B;WACA;WACA,uBAAuB;IAC9B;;;;;iBAKa,8BAA8B;WACpC;WACA,oBAAoB;WACpB,kBAAkB;IACzB;;;;iBAIa,kBAAkB,iBAAiB;WACzC;WACA;WACA,uBAAuB;WACvB,OAAO;WACP;IACP;;cAEU;;;;iBAIG,wBAAwB,iBAAiB;WAC/C;WACA;WACA,OAAO;IACd;cACU;;;;;iBAKG,yBAAyB;WAC/B;WACA;WACA;IACP;;;;iBAIa,aAAa,6BAA6B,iBAAiB;WACjE;WACA;WACA,OAAO;WACP;IACP"}
1
+ {"version":3,"file":"execution-DDHLJAxw.d.mts","names":[],"sources":["../../../../1-framework/1-core/errors/dist/execution.d.mts"],"mappings":";;;;;;;;iBAOiB,mBAAmB;WACzB;IACP;;;;iBAIa,kBAAkB;WACxB;WACA;WACA;IACP;;;;iBAIa,oBAAoB,kBAAkB,gBAAgB;WAC5D;IACP;;;;iBAIa,sBAAsB;WAC5B;WACA;WACA;WACA;IACP;;;;iBAIa,sBAAsB;WAC5B;WACA;WACA;WACA;IACP;iBACa,uBAAuB,cAAc;WAC3C;WACA;;iBAEM,4BAA4B,GAAG,iBAAiB,QAAQ,IAAI;WAClE;WACA;IACP,QAAQ;iBACK,qBAAqB,GAAG,cAAc,QAAQ,mBAAmB,GAAG;WAC1E;WACA;IACP;;;;;iBAKa,oBAAoB;WAC1B;WACA;WACA,uBAAuB;IAC9B;;;;;iBAKa,8BAA8B;WACpC;WACA,oBAAoB;WACpB,kBAAkB;IACzB;;;;iBAIa,kBAAkB,iBAAiB;WACzC;WACA;WACA,uBAAuB;WACvB,OAAO;WACP;IACP;;cAEU;;;;iBAIG,wBAAwB,iBAAiB;WAC/C;WACA;WACA,OAAO;IACd;cACU;;;;;iBAKG,yBAAyB;WAC/B;WACA;WACA;IACP;;;;iBAIa,aAAa,6BAA6B,iBAAiB;WACjE;WACA;WACA,uBAAuB;WACvB,OAAO;WACP;IACP"}
@@ -1,4 +1,4 @@
1
- import { r as CliStructuredError } from "./control-ql9N9u4f-D5sGnPR-.mjs";
1
+ import { r as CliStructuredError } from "./control-tJzRbhcm-FZPs7pf9.mjs";
2
2
  //#region ../../../1-framework/1-core/errors/dist/migration.d.mts
3
3
  //#region src/migration.d.ts
4
4
  /**
@@ -71,4 +71,4 @@ declare function errorMigrationTargetMismatch(options: {
71
71
  declare function errorMigrationPlanNotArray(dir: string, actualValueDescription?: string): CliStructuredError;
72
72
  //#endregion
73
73
  export { errorMigrationTargetMismatch as a, errorMigrationPlanNotArray as i, errorMigrationFileMissing as n, errorUnfilledPlaceholder as o, errorMigrationInvalidDefaultExport as r, placeholder as s, errorDataTransformContractMismatch as t };
74
- //# sourceMappingURL=migration-Bdp-ucGZ.d.mts.map
74
+ //# sourceMappingURL=migration-BLWAkEWP.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"migration-Bdp-ucGZ.d.mts","names":[],"sources":["../../../../1-framework/1-core/errors/dist/migration.d.mts"],"mappings":";;;;;;;;;;iBASiB,yBAAyB,eAAe;;;;;;;;;;iBAUxC,YAAY;;;;;;;;;;;;;iBAaZ,mCAAmC;WACzC;WACA;WACA;IACP;;;;;;iBAMa,0BAA0B,cAAc;;;;;;;;;;iBAUxC,mCAAmC,aAAa,mCAAmC;;;;;;;;;iBASnF,6BAA6B;WACnC;WACA;IACP;;;;;iBAKa,2BAA2B,aAAa,kCAAkC"}
1
+ {"version":3,"file":"migration-BLWAkEWP.d.mts","names":[],"sources":["../../../../1-framework/1-core/errors/dist/migration.d.mts"],"mappings":";;;;;;;;;;iBASiB,yBAAyB,eAAe;;;;;;;;;;iBAUxC,YAAY;;;;;;;;;;;;;iBAaZ,mCAAmC;WACzC;WACA;WACA;IACP;;;;;;iBAMa,0BAA0B,cAAc;;;;;;;;;;iBAUxC,mCAAmC,aAAa,mCAAmC;;;;;;;;;iBASnF,6BAA6B;WACnC;WACA;IACP;;;;;iBAKa,2BAA2B,aAAa,kCAAkC"}
@@ -1,4 +1,4 @@
1
- import { t as CliStructuredError } from "./control-ZdvxNTVU-cVV8u7aQ.mjs";
1
+ import { t as CliStructuredError } from "./control-Dqz1O00q-CNy6vLdH.mjs";
2
2
  //#region ../../../1-framework/1-core/errors/dist/migration.mjs
3
3
  /**
4
4
  * A scaffolded migration contains a placeholder slot that was never filled in.
@@ -124,4 +124,4 @@ function errorMigrationPlanNotArray(dir, actualValueDescription) {
124
124
  //#endregion
125
125
  export { errorMigrationTargetMismatch as a, errorMigrationPlanNotArray as i, errorMigrationFileMissing as n, errorUnfilledPlaceholder as o, errorMigrationInvalidDefaultExport as r, placeholder as s, errorDataTransformContractMismatch as t };
126
126
 
127
- //# sourceMappingURL=migration-S40Rgr7K.mjs.map
127
+ //# sourceMappingURL=migration-xidzvvbN.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"migration-S40Rgr7K.mjs","names":[],"sources":["../../../../1-framework/1-core/errors/dist/migration.mjs"],"sourcesContent":["import { t as CliStructuredError } from \"./control-ZdvxNTVU.mjs\";\n//#region src/migration.ts\n/**\n* A scaffolded migration contains a placeholder slot that was never filled in.\n*\n* Thrown at emit time (when `check.source()` or `run()` is invoked) via the\n* `placeholder(...)` utility. The `slot` identifies the exact location the\n* author still needs to edit, e.g. `\"backfill-product-status:check.source\"`.\n*/\nfunction errorUnfilledPlaceholder(slot) {\n\treturn new CliStructuredError(\"MIGRATION.UNFILLED_PLACEHOLDER\", \"Unfilled migration placeholder\", {\n\t\twhy: `The migration contains a placeholder that has not been filled in: ${slot}`,\n\t\tfix: \"Open migration.ts and replace the `placeholder(...)` call with your actual query.\",\n\t\tmeta: { slot }\n\t});\n}\n/**\n* Scaffolded `migration.ts` files call this wherever the scaffolder couldn't\n* emit a real query and the author is expected to fill one in. Always throws\n* a structured migration error (`MIGRATION.UNFILLED_PLACEHOLDER`).\n*\n* The return type `never` makes it assignable to any expected return type, so\n* a scaffolded `() => placeholder('...')` satisfies signatures like\n* `() => MongoQueryPlan` without polluting them with a sentinel union arm.\n*/\nfunction placeholder(slot) {\n\tthrow errorUnfilledPlaceholder(slot);\n}\n/**\n* A `dataTransform(endContract, …)` factory was handed a `SqlQueryPlan` whose\n* `meta.storageHash` does not match the `endContract.storage.storageHash` it\n* was configured with. This almost always means the user's query-builder\n* (`sql({ context: createExecutionContext({ contract: endContract, … }) })`)\n* was instantiated from a different contract reference than the one passed\n* to `dataTransform(endContract, …)`.\n*\n* Distinct from `errorHashMismatch` (`CONTRACT.MARKER_MISMATCH`) which\n* rejects a plan at runtime execution; this is an authoring-time rejection\n* so it lives in the `MIGRATION` namespace.\n*/\nfunction errorDataTransformContractMismatch(options) {\n\treturn new CliStructuredError(\"MIGRATION.DATA_TRANSFORM_CONTRACT_MISMATCH\", \"dataTransform query plan built against wrong contract\", {\n\t\twhy: `Data transform \"${options.dataTransformName}\" produced a query plan whose storage hash (${options.actual}) does not match the migration's contract (${options.expected}). The query builder was configured with a different contract than the one passed to dataTransform(endContract, ...).`,\n\t\tfix: \"Ensure the `endContract` imported at module scope (used for both `dataTransform(endContract, …)` and `sql({ context: createExecutionContext({ contract: endContract, … }) })`) is the same reference.\",\n\t\tmeta: {\n\t\t\tdataTransformName: options.dataTransformName,\n\t\t\texpected: options.expected,\n\t\t\tactual: options.actual\n\t\t}\n\t});\n}\n/**\n* `migration.ts` was expected at the given package directory but could not be\n* located. Thrown when consumers attempt to read a migration package that is\n* missing its source file.\n*/\nfunction errorMigrationFileMissing(dir) {\n\treturn new CliStructuredError(\"MIGRATION.FILE_MISSING\", \"migration.ts not found\", {\n\t\twhy: `No migration.ts file was found at \"${dir}\"`,\n\t\tfix: \"Scaffold one with `{bin} migration new` or `{bin} migration plan`.\",\n\t\tnextActions: [{\n\t\t\tkind: \"run-command\",\n\t\t\tlabel: \"Scaffold an empty migration\",\n\t\t\tcommand: \"{bin} migration new\"\n\t\t}, {\n\t\t\tkind: \"run-command\",\n\t\t\tlabel: \"Scaffold a migration from a contract diff\",\n\t\t\tcommand: \"{bin} migration plan\"\n\t\t}],\n\t\tmeta: { dir }\n\t});\n}\n/**\n* The `migration.ts` at the given package directory does not default-export a\n* valid migration shape. Two shapes are accepted: a `Migration` subclass, or a\n* factory function returning a `MigrationPlan`-shaped object (with at least\n* an `operations` array, plus `targetId` and `destination`). Thrown when the\n* default export is missing, is not a constructor/function, does not extend\n* `Migration`, or (for factory functions) returns a value that is not\n* `MigrationPlan`-shaped.\n*/\nfunction errorMigrationInvalidDefaultExport(dir, actualExportDescription) {\n\treturn new CliStructuredError(\"MIGRATION.INVALID_DEFAULT_EXPORT\", \"migration.ts default export is not a valid migration\", {\n\t\twhy: actualExportDescription !== void 0 ? `migration.ts at \"${dir}\" must default-export a Migration subclass or a factory function returning a MigrationPlan-shaped object; got ${actualExportDescription}` : `migration.ts at \"${dir}\" must default-export a Migration subclass or a factory function returning a MigrationPlan-shaped object.`,\n\t\tfix: \"Use `export default class extends Migration { ... }` or `export default () => ({ targetId, destination, operations })`.\",\n\t\tmeta: {\n\t\t\tdir,\n\t\t\t...actualExportDescription !== void 0 ? { actualExport: actualExportDescription } : {}\n\t\t}\n\t});\n}\n/**\n* The migration class declares one `targetId` but the loaded\n* `prisma.config.ts` declares another. Thrown by `MigrationCLI.run`\n* when a migration script is invoked against a config whose target\n* descriptor disagrees with the migration's own `targetId`. Distinct from generic\n* config-validation errors because the mismatch is between two valid\n* artifacts (the script and the config), not a malformed input.\n*/\nfunction errorMigrationTargetMismatch(options) {\n\treturn new CliStructuredError(\"MIGRATION.TARGET_MISMATCH\", \"Migration target does not match config target\", {\n\t\twhy: `This migration is for target \"${options.migrationTargetId}\" but the loaded prisma.config.ts declares target \"${options.configTargetId}\". The migration script can only be run against a config that targets the same database.`,\n\t\tfix: \"Switch to a config whose `target` matches the migration's target, or pass `--config <path>` to point at the right config file.\",\n\t\tmeta: {\n\t\t\tmigrationTargetId: options.migrationTargetId,\n\t\t\tconfigTargetId: options.configTargetId\n\t\t}\n\t});\n}\n/**\n* A `Migration.operations` getter returned a value that is not an array. Used\n* by emit capabilities after instantiating the authored migration.\n*/\nfunction errorMigrationPlanNotArray(dir, actualValueDescription) {\n\treturn new CliStructuredError(\"MIGRATION.PLAN_NOT_ARRAY\", \"Migration.operations must be an array of operations\", {\n\t\twhy: actualValueDescription !== void 0 ? `Migration.operations for migration.ts at \"${dir}\" was ${actualValueDescription}; an array of operations is required.` : `Migration.operations for migration.ts at \"${dir}\" is not an array of operations.`,\n\t\tfix: \"Ensure your `operations` getter returns an array of operations; see the data-migrations authoring guide.\",\n\t\tmeta: {\n\t\t\tdir,\n\t\t\t...actualValueDescription !== void 0 ? { actualValue: actualValueDescription } : {}\n\t\t}\n\t});\n}\n//#endregion\nexport { errorDataTransformContractMismatch, errorMigrationFileMissing, errorMigrationInvalidDefaultExport, errorMigrationPlanNotArray, errorMigrationTargetMismatch, errorUnfilledPlaceholder, placeholder };\n\n//# sourceMappingURL=migration.mjs.map"],"mappings":";;;;;;;;;AASA,SAAS,yBAAyB,MAAM;CACvC,OAAO,IAAI,mBAAmB,kCAAkC,kCAAkC;EACjG,KAAK,qEAAqE;EAC1E,KAAK;EACL,MAAM,EAAE,KAAK;CACd,CAAC;AACF;;;;;;;;;;AAUA,SAAS,YAAY,MAAM;CAC1B,MAAM,yBAAyB,IAAI;AACpC;;;;;;;;;;;;;AAaA,SAAS,mCAAmC,SAAS;CACpD,OAAO,IAAI,mBAAmB,8CAA8C,yDAAyD;EACpI,KAAK,mBAAmB,QAAQ,kBAAkB,8CAA8C,QAAQ,OAAO,6CAA6C,QAAQ,SAAS;EAC7K,KAAK;EACL,MAAM;GACL,mBAAmB,QAAQ;GAC3B,UAAU,QAAQ;GAClB,QAAQ,QAAQ;EACjB;CACD,CAAC;AACF;;;;;;AAMA,SAAS,0BAA0B,KAAK;CACvC,OAAO,IAAI,mBAAmB,0BAA0B,0BAA0B;EACjF,KAAK,sCAAsC,IAAI;EAC/C,KAAK;EACL,aAAa,CAAC;GACb,MAAM;GACN,OAAO;GACP,SAAS;EACV,GAAG;GACF,MAAM;GACN,OAAO;GACP,SAAS;EACV,CAAC;EACD,MAAM,EAAE,IAAI;CACb,CAAC;AACF;;;;;;;;;;AAUA,SAAS,mCAAmC,KAAK,yBAAyB;CACzE,OAAO,IAAI,mBAAmB,oCAAoC,wDAAwD;EACzH,KAAK,4BAA4B,KAAK,IAAI,oBAAoB,IAAI,gHAAgH,4BAA4B,oBAAoB,IAAI;EACtO,KAAK;EACL,MAAM;GACL;GACA,GAAG,4BAA4B,KAAK,IAAI,EAAE,cAAc,wBAAwB,IAAI,CAAC;EACtF;CACD,CAAC;AACF;;;;;;;;;AASA,SAAS,6BAA6B,SAAS;CAC9C,OAAO,IAAI,mBAAmB,6BAA6B,iDAAiD;EAC3G,KAAK,iCAAiC,QAAQ,kBAAkB,qDAAqD,QAAQ,eAAe;EAC5I,KAAK;EACL,MAAM;GACL,mBAAmB,QAAQ;GAC3B,gBAAgB,QAAQ;EACzB;CACD,CAAC;AACF;;;;;AAKA,SAAS,2BAA2B,KAAK,wBAAwB;CAChE,OAAO,IAAI,mBAAmB,4BAA4B,uDAAuD;EAChH,KAAK,2BAA2B,KAAK,IAAI,6CAA6C,IAAI,QAAQ,uBAAuB,yCAAyC,6CAA6C,IAAI;EACnN,KAAK;EACL,MAAM;GACL;GACA,GAAG,2BAA2B,KAAK,IAAI,EAAE,aAAa,uBAAuB,IAAI,CAAC;EACnF;CACD,CAAC;AACF"}
1
+ {"version":3,"file":"migration-xidzvvbN.mjs","names":[],"sources":["../../../../1-framework/1-core/errors/dist/migration.mjs"],"sourcesContent":["import { t as CliStructuredError } from \"./control-Dqz1O00q.mjs\";\n//#region src/migration.ts\n/**\n* A scaffolded migration contains a placeholder slot that was never filled in.\n*\n* Thrown at emit time (when `check.source()` or `run()` is invoked) via the\n* `placeholder(...)` utility. The `slot` identifies the exact location the\n* author still needs to edit, e.g. `\"backfill-product-status:check.source\"`.\n*/\nfunction errorUnfilledPlaceholder(slot) {\n\treturn new CliStructuredError(\"MIGRATION.UNFILLED_PLACEHOLDER\", \"Unfilled migration placeholder\", {\n\t\twhy: `The migration contains a placeholder that has not been filled in: ${slot}`,\n\t\tfix: \"Open migration.ts and replace the `placeholder(...)` call with your actual query.\",\n\t\tmeta: { slot }\n\t});\n}\n/**\n* Scaffolded `migration.ts` files call this wherever the scaffolder couldn't\n* emit a real query and the author is expected to fill one in. Always throws\n* a structured migration error (`MIGRATION.UNFILLED_PLACEHOLDER`).\n*\n* The return type `never` makes it assignable to any expected return type, so\n* a scaffolded `() => placeholder('...')` satisfies signatures like\n* `() => MongoQueryPlan` without polluting them with a sentinel union arm.\n*/\nfunction placeholder(slot) {\n\tthrow errorUnfilledPlaceholder(slot);\n}\n/**\n* A `dataTransform(endContract, …)` factory was handed a `SqlQueryPlan` whose\n* `meta.storageHash` does not match the `endContract.storage.storageHash` it\n* was configured with. This almost always means the user's query-builder\n* (`sql({ context: createExecutionContext({ contract: endContract, … }) })`)\n* was instantiated from a different contract reference than the one passed\n* to `dataTransform(endContract, …)`.\n*\n* Distinct from `errorHashMismatch` (`CONTRACT.MARKER_MISMATCH`) which\n* rejects a plan at runtime execution; this is an authoring-time rejection\n* so it lives in the `MIGRATION` namespace.\n*/\nfunction errorDataTransformContractMismatch(options) {\n\treturn new CliStructuredError(\"MIGRATION.DATA_TRANSFORM_CONTRACT_MISMATCH\", \"dataTransform query plan built against wrong contract\", {\n\t\twhy: `Data transform \"${options.dataTransformName}\" produced a query plan whose storage hash (${options.actual}) does not match the migration's contract (${options.expected}). The query builder was configured with a different contract than the one passed to dataTransform(endContract, ...).`,\n\t\tfix: \"Ensure the `endContract` imported at module scope (used for both `dataTransform(endContract, …)` and `sql({ context: createExecutionContext({ contract: endContract, … }) })`) is the same reference.\",\n\t\tmeta: {\n\t\t\tdataTransformName: options.dataTransformName,\n\t\t\texpected: options.expected,\n\t\t\tactual: options.actual\n\t\t}\n\t});\n}\n/**\n* `migration.ts` was expected at the given package directory but could not be\n* located. Thrown when consumers attempt to read a migration package that is\n* missing its source file.\n*/\nfunction errorMigrationFileMissing(dir) {\n\treturn new CliStructuredError(\"MIGRATION.FILE_MISSING\", \"migration.ts not found\", {\n\t\twhy: `No migration.ts file was found at \"${dir}\"`,\n\t\tfix: \"Scaffold one with `{bin} migration new` or `{bin} migration plan`.\",\n\t\tnextActions: [{\n\t\t\tkind: \"run-command\",\n\t\t\tlabel: \"Scaffold an empty migration\",\n\t\t\tcommand: \"{bin} migration new\"\n\t\t}, {\n\t\t\tkind: \"run-command\",\n\t\t\tlabel: \"Scaffold a migration from a contract diff\",\n\t\t\tcommand: \"{bin} migration plan\"\n\t\t}],\n\t\tmeta: { dir }\n\t});\n}\n/**\n* The `migration.ts` at the given package directory does not default-export a\n* valid migration shape. Two shapes are accepted: a `Migration` subclass, or a\n* factory function returning a `MigrationPlan`-shaped object (with at least\n* an `operations` array, plus `targetId` and `destination`). Thrown when the\n* default export is missing, is not a constructor/function, does not extend\n* `Migration`, or (for factory functions) returns a value that is not\n* `MigrationPlan`-shaped.\n*/\nfunction errorMigrationInvalidDefaultExport(dir, actualExportDescription) {\n\treturn new CliStructuredError(\"MIGRATION.INVALID_DEFAULT_EXPORT\", \"migration.ts default export is not a valid migration\", {\n\t\twhy: actualExportDescription !== void 0 ? `migration.ts at \"${dir}\" must default-export a Migration subclass or a factory function returning a MigrationPlan-shaped object; got ${actualExportDescription}` : `migration.ts at \"${dir}\" must default-export a Migration subclass or a factory function returning a MigrationPlan-shaped object.`,\n\t\tfix: \"Use `export default class extends Migration { ... }` or `export default () => ({ targetId, destination, operations })`.\",\n\t\tmeta: {\n\t\t\tdir,\n\t\t\t...actualExportDescription !== void 0 ? { actualExport: actualExportDescription } : {}\n\t\t}\n\t});\n}\n/**\n* The migration class declares one `targetId` but the loaded\n* `prisma.config.ts` declares another. Thrown by `MigrationCLI.run`\n* when a migration script is invoked against a config whose target\n* descriptor disagrees with the migration's own `targetId`. Distinct from generic\n* config-validation errors because the mismatch is between two valid\n* artifacts (the script and the config), not a malformed input.\n*/\nfunction errorMigrationTargetMismatch(options) {\n\treturn new CliStructuredError(\"MIGRATION.TARGET_MISMATCH\", \"Migration target does not match config target\", {\n\t\twhy: `This migration is for target \"${options.migrationTargetId}\" but the loaded prisma.config.ts declares target \"${options.configTargetId}\". The migration script can only be run against a config that targets the same database.`,\n\t\tfix: \"Switch to a config whose `target` matches the migration's target, or pass `--config <path>` to point at the right config file.\",\n\t\tmeta: {\n\t\t\tmigrationTargetId: options.migrationTargetId,\n\t\t\tconfigTargetId: options.configTargetId\n\t\t}\n\t});\n}\n/**\n* A `Migration.operations` getter returned a value that is not an array. Used\n* by emit capabilities after instantiating the authored migration.\n*/\nfunction errorMigrationPlanNotArray(dir, actualValueDescription) {\n\treturn new CliStructuredError(\"MIGRATION.PLAN_NOT_ARRAY\", \"Migration.operations must be an array of operations\", {\n\t\twhy: actualValueDescription !== void 0 ? `Migration.operations for migration.ts at \"${dir}\" was ${actualValueDescription}; an array of operations is required.` : `Migration.operations for migration.ts at \"${dir}\" is not an array of operations.`,\n\t\tfix: \"Ensure your `operations` getter returns an array of operations; see the data-migrations authoring guide.\",\n\t\tmeta: {\n\t\t\tdir,\n\t\t\t...actualValueDescription !== void 0 ? { actualValue: actualValueDescription } : {}\n\t\t}\n\t});\n}\n//#endregion\nexport { errorDataTransformContractMismatch, errorMigrationFileMissing, errorMigrationInvalidDefaultExport, errorMigrationPlanNotArray, errorMigrationTargetMismatch, errorUnfilledPlaceholder, placeholder };\n\n//# sourceMappingURL=migration.mjs.map"],"mappings":";;;;;;;;;AASA,SAAS,yBAAyB,MAAM;CACvC,OAAO,IAAI,mBAAmB,kCAAkC,kCAAkC;EACjG,KAAK,qEAAqE;EAC1E,KAAK;EACL,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,2BAA2B,KAAK,IAAI,6CAA6C,IAAI,QAAQ,uBAAuB,yCAAyC,6CAA6C,IAAI;EACnN,KAAK;EACL,MAAM;GACL;GACA,GAAG,2BAA2B,KAAK,IAAI,EAAE,aAAa,uBAAuB,IAAI,CAAC;EACnF;CACD,CAAC;AACF"}
@@ -1,8 +1,8 @@
1
1
  import { t as InternalError } from "./internal-error-ChGYPVpq-DhUD05u0.mjs";
2
2
  import { n as UNSPECIFIED_PSL_NAMESPACE_ID } from "./psl-ast-DUCvVXbB.mjs";
3
- import { k as createSyntaxTree, o as DocumentAst } from "./declarations-DR6To8_k-BFwkCGeP.mjs";
3
+ import { k as createSyntaxTree, o as DocumentAst } from "./declarations-C8gJnWQp-CnufYOCF.mjs";
4
4
  import { n as isTerminatedStringLiteral, t as Tokenizer } from "./tokenizer-1hAHZzmp-QGPORvmA.mjs";
5
- //#region ../../../1-framework/2-authoring/psl-parser/dist/parse-GbZGfMUj.mjs
5
+ //#region ../../../1-framework/2-authoring/psl-parser/dist/parse-BPOOpARs.mjs
6
6
  const CARRIAGE_RETURN = 13;
7
7
  const LINE_FEED = 10;
8
8
  var SourceFile = class {
@@ -439,18 +439,18 @@ function parseTypeAnnotation(cursor) {
439
439
  * Parses a full PSL document. Never throws — malformed input yields diagnostics
440
440
  * and a recovered tree, not an exception.
441
441
  */
442
- function parse(source) {
442
+ function parse(source, options = {}) {
443
443
  const cursor = new Cursor(source);
444
- const root = createSyntaxTree(parseDocument(cursor));
444
+ const root = createSyntaxTree(parseDocument(cursor, options.grammar ?? "psl"));
445
445
  return {
446
446
  document: DocumentAst.cast(root) ?? new DocumentAst(root),
447
447
  diagnostics: cursor.diagnostics,
448
448
  sourceFile: cursor.sourceFile
449
449
  };
450
450
  }
451
- function parseDocument(cursor) {
451
+ function parseDocument(cursor, grammar) {
452
452
  cursor.startNode("Document");
453
- while (cursor.peekKind() !== "Eof") parseDeclaration(cursor, false);
453
+ while (cursor.peekKind() !== "Eof") parseDeclaration(cursor, false, grammar);
454
454
  cursor.flushTrivia();
455
455
  return cursor.finishNode();
456
456
  }
@@ -469,12 +469,12 @@ function keywordIs(cursor, keyword) {
469
469
  * Recovery runs via the `if (!node)` tail rather than as a `??` arm, because it
470
470
  * appends raw tokens to the open parent instead of returning a child node.
471
471
  */
472
- function parseDeclaration(cursor, insideNamespace) {
472
+ function parseDeclaration(cursor, insideNamespace, grammar) {
473
473
  const name = cursor.peekKind(1) === "Ident" ? cursor.peekToken(1).text : "";
474
474
  if (insideNamespace && keywordIs(cursor, "namespace")) cursor.diagnostic("PSL_INVALID_NAMESPACE_BLOCK", `Recursive "namespace ${name}" block is not allowed; namespace blocks may not nest`, cursor.mark());
475
475
  else if (insideNamespace && keywordIs(cursor, "types")) cursor.diagnostic("PSL_INVALID_NAMESPACE_BLOCK", "`types` blocks must be declared at the document top level, not inside a namespace block", cursor.mark());
476
476
  else if (keywordIs(cursor, "namespace") && name === "__unspecified__") cursor.diagnostic("PSL_INVALID_NAMESPACE_BLOCK", `Namespace name "${UNSPECIFIED_PSL_NAMESPACE_ID}" is reserved for the parser-synthesised bucket for top-level declarations`, cursor.mark(1));
477
- if (!(parseModel(cursor) ?? parseNamespace(cursor) ?? parseCompositeType(cursor) ?? parseTypesBlock(cursor) ?? parseGenericBlock(cursor))) parseUnsupportedTopLevel(cursor);
477
+ if (!(parseModel(cursor) ?? parseNamespace(cursor, grammar) ?? parseCompositeType(cursor) ?? parseTypesBlock(cursor) ?? parseGenericBlock(cursor, grammar))) parseUnsupportedTopLevel(cursor);
478
478
  }
479
479
  /**
480
480
  * Reports only the first missing piece — a missing name suppresses the
@@ -502,8 +502,12 @@ function parseModel(cursor) {
502
502
  * {` with no name) routed to its dedicated parser. The generic keyword set is
503
503
  * open, so a bare identifier with no brace (e.g. `oops`) is read as an unfinished
504
504
  * custom declaration rather than unsupported content.
505
+ *
506
+ * With the `prisma7` grammar, a `view` block stays a generic block (so interpreters keep rejecting
507
+ * the keyword), but its body is read like a model body, so the field lines parse as
508
+ * `FieldDeclaration` nodes with spans instead of mangled entries.
505
509
  */
506
- function parseGenericBlock(cursor) {
510
+ function parseGenericBlock(cursor, grammar = "psl") {
507
511
  if (cursor.peekKind() !== "Ident") return void 0;
508
512
  const keyword = cursor.peekToken().text;
509
513
  if (RESERVED_BLOCK_KEYWORDS.has(keyword)) return void 0;
@@ -511,16 +515,16 @@ function parseGenericBlock(cursor) {
511
515
  cursor.startNode("GenericBlockDeclaration");
512
516
  cursor.bump();
513
517
  if (hasName) parseIdentifier(cursor);
514
- if (cursor.peekKind() === "LBrace") parseBlockBody(cursor, parseKeyValueMember);
518
+ if (cursor.peekKind() === "LBrace") parseBlockBody(cursor, genericBlockMemberParser(keyword, grammar));
515
519
  else {
516
520
  cursor.diagnostic("PSL_INVALID_DECLARATION", `Expected "{" to open the "${keyword}" block`, cursor.markAfterLastToken());
517
521
  cursor.recoverToSyncPoint();
518
522
  }
519
523
  return cursor.finishNode();
520
524
  }
521
- function parseNamespace(cursor) {
525
+ function parseNamespace(cursor, grammar = "psl") {
522
526
  if (!keywordIs(cursor, "namespace")) return void 0;
523
- return parseBlock(cursor, "Namespace", true, (inner) => parseDeclaration(inner, true));
527
+ return parseBlock(cursor, "Namespace", true, (inner) => parseDeclaration(inner, true, grammar));
524
528
  }
525
529
  function parseCompositeType(cursor) {
526
530
  if (!keywordIs(cursor, "type")) return void 0;
@@ -565,6 +569,16 @@ function parseNamedTypeMember(cursor) {
565
569
  if (!parseNamedType(cursor)) invalidMember(cursor, "PSL_INVALID_TYPES_MEMBER", `Invalid types declaration "${cursor.peekToken().text}"`);
566
570
  }
567
571
  /**
572
+ * With the `prisma7` grammar, a `view` body is read like a model body and an `enum` member may
573
+ * carry `@` attributes (`USER @map("user")`). Every other generic block, and every generic block
574
+ * with the `psl` grammar, reads plain `key = value` entries.
575
+ */
576
+ function genericBlockMemberParser(keyword, grammar) {
577
+ if (grammar === "prisma7" && keyword === "view") return parseModelMember;
578
+ if (grammar === "prisma7" && keyword === "enum") return parseEnumMember;
579
+ return parseKeyValueMember;
580
+ }
581
+ /**
568
582
  * A generic-block member is either a `@@`-block attribute or a `key = value`
569
583
  * entry. The block-attribute alternative is purely syntactic — it does not judge
570
584
  * whether the attribute is valid for the block's kind.
@@ -572,6 +586,9 @@ function parseNamedTypeMember(cursor) {
572
586
  function parseKeyValueMember(cursor) {
573
587
  if (!(parseBlockAttribute(cursor) ?? parseKeyValue(cursor))) invalidMember(cursor, "PSL_INVALID_EXTENSION_BLOCK_MEMBER", "Invalid block entry");
574
588
  }
589
+ function parseEnumMember(cursor) {
590
+ if (!(parseBlockAttribute(cursor) ?? parseKeyValue(cursor, { memberAttributes: true }))) invalidMember(cursor, "PSL_INVALID_EXTENSION_BLOCK_MEMBER", "Invalid block entry");
591
+ }
575
592
  function invalidMember(cursor, code, message) {
576
593
  cursor.diagnostic(code, message, cursor.mark());
577
594
  cursor.bump();
@@ -602,10 +619,11 @@ function parseNamedType(cursor) {
602
619
  }
603
620
  /**
604
621
  * A generic-block entry is either `key = value` or a bare `key` (committing a
605
- * `KeyValuePair` carrying only the key). A `key =` with no following expression
606
- * is flagged.
622
+ * `KeyValuePair` carrying only the key). With `memberAttributes` (enum blocks parsed with the
623
+ * `prisma7` grammar) any number of `@` attributes may follow, as in `USER @map("user")`. A
624
+ * `key =` with no following expression is flagged.
607
625
  */
608
- function parseKeyValue(cursor) {
626
+ function parseKeyValue(cursor, options = { memberAttributes: false }) {
609
627
  if (cursor.peekKind() !== "Ident") return void 0;
610
628
  cursor.startNode("KeyValuePair");
611
629
  parseIdentifier(cursor);
@@ -613,9 +631,10 @@ function parseKeyValue(cursor) {
613
631
  cursor.bump();
614
632
  if (!parseExpression(cursor)) cursor.diagnostic("PSL_INVALID_EXTENSION_BLOCK_MEMBER", "Expected a value after \"=\"", cursor.mark());
615
633
  }
634
+ while (options.memberAttributes && cursor.peekKind() === "At") parseAttribute(cursor);
616
635
  return cursor.finishNode();
617
636
  }
618
637
  //#endregion
619
638
  export { parse as a, greenToken as i, SourceFile as n, greenNode as r, GreenNodeBuilder as t };
620
639
 
621
- //# sourceMappingURL=parse-GbZGfMUj-C9tHGn-6.mjs.map
640
+ //# sourceMappingURL=parse-BPOOpARs-COpO0wc7.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"parse-BPOOpARs-COpO0wc7.mjs","names":["#text","#lineStarts","#lineIndexAt","#lineStartAt","#lineEndAt","#stack","#tokenizer","#sourceFile","#diagnostics","#offset","#depth","#builder","#advance"],"sources":["../../../../1-framework/2-authoring/psl-parser/dist/parse-BPOOpARs.mjs"],"sourcesContent":["import { N as createSyntaxTree, n as DocumentAst } from \"./declarations-C8gJnWQp.mjs\";\nimport { n as isTerminatedStringLiteral, t as Tokenizer } from \"./tokenizer-1hAHZzmp.mjs\";\nimport { UNSPECIFIED_PSL_NAMESPACE_ID } from \"@internal/framework-components/psl-ast\";\nimport { InternalError } from \"@internal/utils/internal-error\";\n//#region src/source-file.ts\nconst CARRIAGE_RETURN = 13;\nconst LINE_FEED = 10;\nvar SourceFile = class {\n\t#text;\n\t#lineStarts;\n\tconstructor(text) {\n\t\tthis.#text = text;\n\t\tconst lineStarts = [0];\n\t\tfor (let offset = 0; offset < text.length; offset++) if (text.charCodeAt(offset) === LINE_FEED) lineStarts.push(offset + 1);\n\t\tthis.#lineStarts = lineStarts;\n\t}\n\tget text() {\n\t\treturn this.#text;\n\t}\n\tget length() {\n\t\treturn this.#text.length;\n\t}\n\tget lineCount() {\n\t\treturn this.#lineStarts.length;\n\t}\n\tlineStartOffsets() {\n\t\treturn this.#lineStarts;\n\t}\n\tlineStartOffset(line) {\n\t\tif (line <= 0) return 0;\n\t\treturn this.#lineStarts[line] ?? this.#text.length;\n\t}\n\tlineEndOffset(line) {\n\t\tif (line < 0) return 0;\n\t\tconst nextLineStart = this.#lineStarts[line + 1];\n\t\tif (nextLineStart === void 0) return this.#text.length;\n\t\tconst lineFeedOffset = nextLineStart - 1;\n\t\tconst carriageReturnOffset = lineFeedOffset - 1;\n\t\treturn this.#text.charCodeAt(carriageReturnOffset) === CARRIAGE_RETURN ? carriageReturnOffset : lineFeedOffset;\n\t}\n\tpositionAt(offset) {\n\t\tconst clamped = clamp(offset, 0, this.#text.length);\n\t\tconst line = this.#lineIndexAt(clamped);\n\t\treturn {\n\t\t\tline,\n\t\t\tcharacter: clamped - this.#lineStartAt(line)\n\t\t};\n\t}\n\toffsetAt(position) {\n\t\tconst line = clamp(position.line, 0, this.#lineStarts.length - 1);\n\t\tconst lineStart = this.#lineStartAt(line);\n\t\tconst lineEnd = this.#lineEndAt(line);\n\t\treturn clamp(lineStart + position.character, lineStart, lineEnd);\n\t}\n\t#lineStartAt(line) {\n\t\treturn this.#lineStarts[line] ?? 0;\n\t}\n\t#lineEndAt(line) {\n\t\treturn line + 1 < this.#lineStarts.length ? this.#lineStartAt(line + 1) - 1 : this.#text.length;\n\t}\n\t#lineIndexAt(offset) {\n\t\tconst lineStarts = this.#lineStarts;\n\t\tlet low = 0;\n\t\tlet high = lineStarts.length - 1;\n\t\twhile (low < high) {\n\t\t\tconst mid = low + high + 1 >>> 1;\n\t\t\tif ((lineStarts[mid] ?? 0) <= offset) low = mid;\n\t\t\telse high = mid - 1;\n\t\t}\n\t\treturn low;\n\t}\n};\nfunction clamp(value, min, max) {\n\tif (value < min) return min;\n\tif (value > max) return max;\n\treturn value;\n}\n//#endregion\n//#region src/syntax/green.ts\nfunction greenToken(kind, text) {\n\treturn {\n\t\ttype: \"token\",\n\t\tkind,\n\t\ttext\n\t};\n}\nfunction greenNode(kind, children) {\n\tlet textLength = 0;\n\tfor (const child of children) textLength += child.type === \"token\" ? child.text.length : child.textLength;\n\treturn {\n\t\ttype: \"node\",\n\t\tkind,\n\t\tchildren,\n\t\ttextLength\n\t};\n}\n//#endregion\n//#region src/syntax/green-builder.ts\nvar GreenNodeBuilder = class {\n\t#stack = [];\n\tstartNode(kind) {\n\t\tthis.#stack.push({\n\t\t\tkind,\n\t\t\tchildren: []\n\t\t});\n\t}\n\ttoken(kind, text) {\n\t\tconst current = this.#stack.at(-1);\n\t\tif (!current) throw new InternalError(\"GreenNodeBuilder: token() called with no open node\");\n\t\tcurrent.children.push(greenToken(kind, text));\n\t}\n\tfinishNode() {\n\t\tconst completed = this.#stack.pop();\n\t\tif (!completed) throw new InternalError(\"GreenNodeBuilder: finishNode() called with no open node\");\n\t\tconst node = greenNode(completed.kind, completed.children);\n\t\tconst parent = this.#stack.at(-1);\n\t\tif (parent) parent.children.push(node);\n\t\treturn node;\n\t}\n};\n//#endregion\n//#region src/parse.ts\nconst TRIVIA_KINDS = /* @__PURE__ */ new Set([\n\t\"Whitespace\",\n\t\"Newline\",\n\t\"Comment\"\n]);\n/**\n* The fault-tolerant parser substrate the grammars drive. Trivia is flushed\n* into the enclosing open node, so every child node spans exactly its first\n* through last significant token.\n*/\nvar Cursor = class {\n\t#tokenizer;\n\t#sourceFile;\n\t#builder = new GreenNodeBuilder();\n\t#diagnostics = [];\n\t#offset = 0;\n\t#depth = 0;\n\tconstructor(source) {\n\t\tthis.#tokenizer = new Tokenizer(source);\n\t\tthis.#sourceFile = new SourceFile(source);\n\t}\n\tget diagnostics() {\n\t\treturn this.#diagnostics;\n\t}\n\tget sourceFile() {\n\t\treturn this.#sourceFile;\n\t}\n\tpeekKind(ahead = 0) {\n\t\treturn this.peekToken(ahead).kind;\n\t}\n\tpeekToken(ahead = 0) {\n\t\tlet rawIndex = 0;\n\t\tlet remaining = ahead;\n\t\tfor (;;) {\n\t\t\tconst token = this.#tokenizer.peek(rawIndex);\n\t\t\tif (token.kind === \"Eof\") return token;\n\t\t\tif (TRIVIA_KINDS.has(token.kind)) {\n\t\t\t\trawIndex++;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif (remaining === 0) return token;\n\t\t\tremaining--;\n\t\t\trawIndex++;\n\t\t}\n\t}\n\t/** Span of the significant token `lookahead` positions ahead (`mark(0)` = the next). */\n\tmark(lookahead = 0) {\n\t\tlet rawIndex = 0;\n\t\tlet offset = this.#offset;\n\t\tlet remaining = lookahead;\n\t\tfor (;;) {\n\t\t\tconst token = this.#tokenizer.peek(rawIndex);\n\t\t\tif (token.kind === \"Eof\") return {\n\t\t\t\toffset,\n\t\t\t\tlength: token.text.length\n\t\t\t};\n\t\t\tif (!TRIVIA_KINDS.has(token.kind) && remaining === 0) return {\n\t\t\t\toffset,\n\t\t\t\tlength: token.text.length\n\t\t\t};\n\t\t\tif (!TRIVIA_KINDS.has(token.kind)) remaining--;\n\t\t\toffset += token.text.length;\n\t\t\trawIndex++;\n\t\t}\n\t}\n\t/**\n\t* Zero-width mark just past the last consumed significant token — anchors an\n\t* \"expected here\" diagnostic, e.g. the `{` missing after a declaration's name.\n\t*/\n\tmarkAfterLastToken() {\n\t\treturn {\n\t\t\toffset: this.#offset,\n\t\t\tlength: 0\n\t\t};\n\t}\n\tstartNode(kind) {\n\t\tif (this.#depth > 0) this.flushTrivia();\n\t\tthis.#builder.startNode(kind);\n\t\tthis.#depth++;\n\t}\n\tfinishNode() {\n\t\tthis.#depth--;\n\t\treturn this.#builder.finishNode();\n\t}\n\tbump() {\n\t\tthis.flushTrivia();\n\t\tconst token = this.#tokenizer.peek();\n\t\tif (token.kind === \"Eof\") return token;\n\t\tthis.#builder.token(token.kind, token.text);\n\t\tthis.#advance();\n\t\treturn token;\n\t}\n\trecoverToSyncPoint() {\n\t\tfor (;;) {\n\t\t\tconst token = this.#tokenizer.peek();\n\t\t\tif (token.kind === \"Eof\" || token.kind === \"Newline\" || token.kind === \"RBrace\") return;\n\t\t\tthis.#builder.token(token.kind, token.text);\n\t\t\tthis.#advance();\n\t\t}\n\t}\n\tflushTrivia() {\n\t\tfor (;;) {\n\t\t\tconst token = this.#tokenizer.peek();\n\t\t\tif (!TRIVIA_KINDS.has(token.kind)) return;\n\t\t\tthis.#builder.token(token.kind, token.text);\n\t\t\tthis.#advance();\n\t\t}\n\t}\n\tdiagnostic(code, message, mark) {\n\t\tconst start = mark.offset;\n\t\tconst end = start + mark.length;\n\t\tthis.#diagnostics.push({\n\t\t\tcode,\n\t\t\tmessage,\n\t\t\trange: {\n\t\t\t\tstart: this.#sourceFile.positionAt(start),\n\t\t\t\tend: this.#sourceFile.positionAt(end)\n\t\t\t}\n\t\t});\n\t}\n\t#advance() {\n\t\tthis.#offset += this.#tokenizer.next().text.length;\n\t}\n};\nfunction parseIdentifier(cursor) {\n\tcursor.startNode(\"Identifier\");\n\tcursor.bump();\n\tcursor.finishNode();\n}\n/**\n* Returns `undefined` when the next significant token does not start a\n* recognised expression, leaving recovery to the caller.\n*/\nfunction parseExpression(cursor) {\n\treturn parseStringLiteralExpr(cursor) ?? parseNumberLiteralExpr(cursor) ?? parseArrayLiteral(cursor) ?? parseObjectLiteralExpr(cursor) ?? parseFunctionCall(cursor) ?? parseBooleanLiteralExpr(cursor) ?? parseIdentifierExpr(cursor);\n}\nfunction parseStringLiteralExpr(cursor) {\n\tif (cursor.peekKind() !== \"StringLiteral\") return void 0;\n\tconst stringMark = cursor.mark();\n\tconst text = cursor.peekToken().text;\n\tcursor.startNode(\"StringLiteralExpr\");\n\tcursor.bump();\n\tif (!isTerminatedStringLiteral(text)) cursor.diagnostic(\"PSL_UNTERMINATED_STRING\", \"Unterminated string literal\", stringMark);\n\treturn cursor.finishNode();\n}\nfunction parseNumberLiteralExpr(cursor) {\n\tif (cursor.peekKind() !== \"NumberLiteral\") return void 0;\n\tcursor.startNode(\"NumberLiteralExpr\");\n\tcursor.bump();\n\treturn cursor.finishNode();\n}\n/**\n* Parses a namespace-qualified name `[space ':']? Ident ('.' Ident)*`. The\n* caller guarantees a leading `Ident`.\n*\n* Parsing the whole chain up front lets a position decide\n* constructor-vs-reference by peeking exactly one token for `(`, with no scan of\n* the dotted chain's length.\n*/\nfunction parseQualifiedName(cursor) {\n\tcursor.startNode(\"QualifiedName\");\n\tparseIdentifier(cursor);\n\tparseQualifiedSegments(cursor, \"Colon\");\n\tparseQualifiedSegments(cursor, \"Dot\");\n\tcursor.finishNode();\n}\n/**\n* A well-formed name carries at most one colon space and one dot namespace, so\n* each separator past the first of its kind reports `PSL_INVALID_QUALIFIED_NAME`.\n* The separator is consumed regardless, keeping the lossless round-trip intact.\n*/\nfunction parseQualifiedSegments(cursor, separator) {\n\tlet seen = 0;\n\twhile (cursor.peekKind() === separator) {\n\t\tseen++;\n\t\tconst separatorMark = cursor.mark();\n\t\tcursor.bump();\n\t\tif (seen > 1) cursor.diagnostic(\"PSL_INVALID_QUALIFIED_NAME\", \"Qualified name has too many segments\", separatorMark);\n\t\tif (cursor.peekKind() === \"Ident\") parseIdentifier(cursor);\n\t\telse cursor.diagnostic(\"PSL_INVALID_QUALIFIED_NAME\", \"Qualified name is missing a name after the separator\", cursor.mark());\n\t}\n}\nfunction parseBooleanLiteralExpr(cursor) {\n\tif (cursor.peekKind() !== \"Ident\") return void 0;\n\tconst text = cursor.peekToken().text;\n\tif (text !== \"true\" && text !== \"false\") return void 0;\n\tcursor.startNode(\"BooleanLiteralExpr\");\n\tcursor.bump();\n\treturn cursor.finishNode();\n}\nfunction parseIdentifierExpr(cursor) {\n\tif (cursor.peekKind() !== \"Ident\") return void 0;\n\tcursor.startNode(\"Identifier\");\n\tcursor.bump();\n\treturn cursor.finishNode();\n}\nfunction parseArrayLiteral(cursor) {\n\tif (cursor.peekKind() !== \"LBracket\") return void 0;\n\tcursor.startNode(\"ArrayLiteral\");\n\tcursor.bump();\n\twhile (cursor.peekKind() !== \"RBracket\" && cursor.peekKind() !== \"Eof\") {\n\t\tif (!parseExpression(cursor)) break;\n\t\tif (cursor.peekKind() === \"Comma\") cursor.bump();\n\t\telse break;\n\t}\n\tif (cursor.peekKind() === \"RBracket\") cursor.bump();\n\treturn cursor.finishNode();\n}\nfunction parseObjectLiteralExpr(cursor) {\n\tif (cursor.peekKind() !== \"LBrace\") return void 0;\n\tconst braceMark = cursor.mark();\n\tcursor.startNode(\"ObjectLiteralExpr\");\n\tcursor.bump();\n\twhile (cursor.peekKind() !== \"RBrace\" && cursor.peekKind() !== \"Eof\") {\n\t\tparseObjectField(cursor);\n\t\tif (cursor.peekKind() === \"Comma\") cursor.bump();\n\t\telse if (cursor.peekKind() === \"Ident\") cursor.diagnostic(\"PSL_INVALID_OBJECT_LITERAL\", \"Expected \\\",\\\" between object-literal fields\", cursor.markAfterLastToken());\n\t\telse break;\n\t}\n\tif (cursor.peekKind() === \"RBrace\") cursor.bump();\n\telse cursor.diagnostic(\"PSL_INVALID_OBJECT_LITERAL\", \"Unterminated object literal\", braceMark);\n\treturn cursor.finishNode();\n}\nfunction parseObjectField(cursor) {\n\tcursor.startNode(\"ObjectField\");\n\tconst keyMark = cursor.mark();\n\tconst keyText = cursor.peekToken().text;\n\tif (cursor.peekKind() === \"Ident\") parseIdentifier(cursor);\n\telse if (cursor.peekKind() === \"StringLiteral\") parseStringLiteralExpr(cursor);\n\tif (cursor.peekKind() === \"Colon\") {\n\t\tcursor.bump();\n\t\tif (!parseExpression(cursor)) cursor.diagnostic(\"PSL_INVALID_OBJECT_LITERAL\", \"Expected a value after \\\":\\\"\", cursor.mark());\n\t} else {\n\t\tcursor.diagnostic(\"PSL_INVALID_OBJECT_LITERAL\", `Expected \":\" after \"${keyText}\"`, keyMark);\n\t\tif (!(cursor.peekKind() === \"Ident\" && cursor.peekKind(1) === \"Colon\")) parseExpression(cursor);\n\t}\n\treturn cursor.finishNode();\n}\n/**\n* Whether the next tokens open a call: a bare `Ident(` or a namespace-qualified\n* `Ident.Ident(`. The lookahead is deliberately bounded so a bare dotted\n* reference like `a.b` is not mistaken for a call, rather than scanning an\n* unbounded dotted chain ahead to find the paren.\n*/\nfunction isCallAhead(cursor) {\n\tif (cursor.peekKind() !== \"Ident\") return false;\n\tif (cursor.peekKind(1) === \"LParen\") return true;\n\treturn cursor.peekKind(1) === \"Dot\" && cursor.peekKind(2) === \"Ident\" && cursor.peekKind(3) === \"LParen\";\n}\n/**\n* Parses a function/constructor call — bare `autoincrement()` or qualified\n* `temporal.updatedAt()`. Returns `undefined` unless {@link isCallAhead}\n* confirms a trailing `(`, so the `parseExpression` chain falls through to the\n* boolean and bare-identifier forms.\n*/\nfunction parseFunctionCall(cursor) {\n\tif (!isCallAhead(cursor)) return void 0;\n\tcursor.startNode(\"FunctionCall\");\n\tparseQualifiedName(cursor);\n\tif (cursor.peekKind() === \"LParen\") parseParenArgs(cursor);\n\treturn cursor.finishNode();\n}\n/** Parses a parenthesised, comma-separated `AttributeArg` list into the currently open node. */\nfunction parseParenArgs(cursor) {\n\tcursor.bump();\n\twhile (cursor.peekKind() !== \"RParen\" && cursor.peekKind() !== \"Eof\") {\n\t\tparseAttributeArg(cursor);\n\t\tif (cursor.peekKind() === \"Comma\") cursor.bump();\n\t\telse break;\n\t}\n\tif (cursor.peekKind() === \"RParen\") cursor.bump();\n}\nfunction parseAttributeArg(cursor) {\n\tconst kind = cursor.peekKind();\n\tif (kind !== \"Ident\" && kind !== \"StringLiteral\" && kind !== \"NumberLiteral\" && kind !== \"LBracket\" && kind !== \"LBrace\") return;\n\tcursor.startNode(\"AttributeArg\");\n\tif (cursor.peekKind() === \"Ident\" && cursor.peekKind(1) === \"Colon\") {\n\t\tparseIdentifier(cursor);\n\t\tcursor.bump();\n\t}\n\tparseArgValue(cursor);\n\tcursor.finishNode();\n}\nfunction parseArgValue(cursor) {\n\tparseExpression(cursor);\n}\nfunction parseAttributeArgList(cursor) {\n\tcursor.startNode(\"AttributeArgList\");\n\tparseParenArgs(cursor);\n\treturn cursor.finishNode();\n}\nfunction parseAttribute(cursor) {\n\tconst isBlockAttribute = cursor.peekKind() === \"DoubleAt\";\n\tconst attributeMark = cursor.mark();\n\tcursor.startNode(isBlockAttribute ? \"ModelAttribute\" : \"FieldAttribute\");\n\tcursor.bump();\n\tif (cursor.peekKind() === \"Ident\") parseQualifiedName(cursor);\n\telse cursor.diagnostic(\"PSL_INVALID_ATTRIBUTE_SYNTAX\", \"Attribute name expected\", attributeMark);\n\tif (cursor.peekKind() === \"LParen\") parseAttributeArgList(cursor);\n\treturn cursor.finishNode();\n}\n/**\n* A type annotation: `QualifiedName (argList)? ([])? (?)?`, e.g.\n* `pgvector.Vector(1536)[]?`. When the field has no type, no node is emitted —\n* a missing type is the absence of a `TypeAnnotation`, not a zero-width one.\n*/\nfunction parseTypeAnnotation(cursor) {\n\tconst kind = cursor.peekKind();\n\tif (kind !== \"Ident\" && kind !== \"LBracket\" && kind !== \"Question\") return;\n\tcursor.startNode(\"TypeAnnotation\");\n\tif (cursor.peekKind() === \"Ident\") {\n\t\tparseQualifiedName(cursor);\n\t\tif (cursor.peekKind() === \"LParen\") parseAttributeArgList(cursor);\n\t}\n\tif (cursor.peekKind() === \"LBracket\") {\n\t\tcursor.bump();\n\t\tif (cursor.peekKind() === \"RBracket\") cursor.bump();\n\t}\n\tif (cursor.peekKind() === \"Question\") cursor.bump();\n\tcursor.finishNode();\n}\n/**\n* Parses a full PSL document. Never throws — malformed input yields diagnostics\n* and a recovered tree, not an exception.\n*/\nfunction parse(source, options = {}) {\n\tconst cursor = new Cursor(source);\n\tconst root = createSyntaxTree(parseDocument(cursor, options.grammar ?? \"psl\"));\n\treturn {\n\t\tdocument: DocumentAst.cast(root) ?? new DocumentAst(root),\n\t\tdiagnostics: cursor.diagnostics,\n\t\tsourceFile: cursor.sourceFile\n\t};\n}\nfunction parseDocument(cursor, grammar) {\n\tcursor.startNode(\"Document\");\n\twhile (cursor.peekKind() !== \"Eof\") parseDeclaration(cursor, false, grammar);\n\tcursor.flushTrivia();\n\treturn cursor.finishNode();\n}\nconst RESERVED_BLOCK_KEYWORDS = /* @__PURE__ */ new Set([\n\t\"model\",\n\t\"namespace\",\n\t\"type\",\n\t\"types\"\n]);\nfunction keywordIs(cursor, keyword) {\n\treturn cursor.peekKind() === \"Ident\" && cursor.peekToken().text === keyword;\n}\n/**\n* Each alternative is a no-op on non-match, consuming nothing, so the\n* forward-only cursor is never left half-consumed by a rejected alternative.\n* Recovery runs via the `if (!node)` tail rather than as a `??` arm, because it\n* appends raw tokens to the open parent instead of returning a child node.\n*/\nfunction parseDeclaration(cursor, insideNamespace, grammar) {\n\tconst name = cursor.peekKind(1) === \"Ident\" ? cursor.peekToken(1).text : \"\";\n\tif (insideNamespace && keywordIs(cursor, \"namespace\")) cursor.diagnostic(\"PSL_INVALID_NAMESPACE_BLOCK\", `Recursive \"namespace ${name}\" block is not allowed; namespace blocks may not nest`, cursor.mark());\n\telse if (insideNamespace && keywordIs(cursor, \"types\")) cursor.diagnostic(\"PSL_INVALID_NAMESPACE_BLOCK\", \"`types` blocks must be declared at the document top level, not inside a namespace block\", cursor.mark());\n\telse if (keywordIs(cursor, \"namespace\") && name === UNSPECIFIED_PSL_NAMESPACE_ID) cursor.diagnostic(\"PSL_INVALID_NAMESPACE_BLOCK\", `Namespace name \"${UNSPECIFIED_PSL_NAMESPACE_ID}\" is reserved for the parser-synthesised bucket for top-level declarations`, cursor.mark(1));\n\tif (!(parseModel(cursor) ?? parseNamespace(cursor, grammar) ?? parseCompositeType(cursor) ?? parseTypesBlock(cursor) ?? parseGenericBlock(cursor, grammar))) parseUnsupportedTopLevel(cursor);\n}\n/**\n* Reports only the first missing piece — a missing name suppresses the\n* missing-brace diagnostic. `nameRequired` is false only for the `types` block.\n*/\nfunction parseBlock(cursor, kind, nameRequired, parseMember) {\n\tconst keyword = cursor.peekToken().text;\n\tconst keywordMark = cursor.mark();\n\tcursor.startNode(kind);\n\tcursor.bump();\n\tconst hasName = nameRequired && cursor.peekKind() === \"Ident\";\n\tif (hasName) parseIdentifier(cursor);\n\tif (nameRequired && !hasName) cursor.diagnostic(\"PSL_INVALID_DECLARATION\", `Expected a name after \"${keyword}\"`, keywordMark);\n\telse if (cursor.peekKind() !== \"LBrace\") cursor.diagnostic(\"PSL_INVALID_DECLARATION\", `Expected \"{\" to open the \"${keyword}\" block`, cursor.markAfterLastToken());\n\tif (cursor.peekKind() === \"LBrace\") parseBlockBody(cursor, parseMember);\n\telse cursor.recoverToSyncPoint();\n\treturn cursor.finishNode();\n}\nfunction parseModel(cursor) {\n\tif (!keywordIs(cursor, \"model\")) return void 0;\n\treturn parseBlock(cursor, \"ModelDeclaration\", true, parseModelMember);\n}\n/**\n* Excluding the reserved keywords keeps a malformed reserved block (e.g. `model\n* {` with no name) routed to its dedicated parser. The generic keyword set is\n* open, so a bare identifier with no brace (e.g. `oops`) is read as an unfinished\n* custom declaration rather than unsupported content.\n*\n* With the `prisma7` grammar, a `view` block stays a generic block (so interpreters keep rejecting\n* the keyword), but its body is read like a model body, so the field lines parse as\n* `FieldDeclaration` nodes with spans instead of mangled entries.\n*/\nfunction parseGenericBlock(cursor, grammar = \"psl\") {\n\tif (cursor.peekKind() !== \"Ident\") return void 0;\n\tconst keyword = cursor.peekToken().text;\n\tif (RESERVED_BLOCK_KEYWORDS.has(keyword)) return void 0;\n\tconst hasName = cursor.peekKind(1) === \"Ident\" && cursor.peekKind(2) === \"LBrace\";\n\tcursor.startNode(\"GenericBlockDeclaration\");\n\tcursor.bump();\n\tif (hasName) parseIdentifier(cursor);\n\tif (cursor.peekKind() === \"LBrace\") parseBlockBody(cursor, genericBlockMemberParser(keyword, grammar));\n\telse {\n\t\tcursor.diagnostic(\"PSL_INVALID_DECLARATION\", `Expected \"{\" to open the \"${keyword}\" block`, cursor.markAfterLastToken());\n\t\tcursor.recoverToSyncPoint();\n\t}\n\treturn cursor.finishNode();\n}\nfunction parseNamespace(cursor, grammar = \"psl\") {\n\tif (!keywordIs(cursor, \"namespace\")) return void 0;\n\treturn parseBlock(cursor, \"Namespace\", true, (inner) => parseDeclaration(inner, true, grammar));\n}\nfunction parseCompositeType(cursor) {\n\tif (!keywordIs(cursor, \"type\")) return void 0;\n\treturn parseBlock(cursor, \"CompositeTypeDeclaration\", true, parseModelMember);\n}\n/** `types` (plural) is the no-name types block; the singular `type` is the composite type above. */\nfunction parseTypesBlock(cursor) {\n\tif (!keywordIs(cursor, \"types\")) return void 0;\n\treturn parseBlock(cursor, \"TypesBlock\", false, parseNamedTypeMember);\n}\n/** Every `parseMember` consumes at least one significant token, so the loop always terminates. */\nfunction parseBlockBody(cursor, parseMember) {\n\tconst braceMark = cursor.mark();\n\tcursor.bump();\n\tfor (;;) {\n\t\tconst kind = cursor.peekKind();\n\t\tif (kind === \"RBrace\" || kind === \"Eof\") break;\n\t\tparseMember(cursor);\n\t}\n\tif (cursor.peekKind() === \"RBrace\") cursor.bump();\n\telse cursor.diagnostic(\"PSL_UNTERMINATED_BLOCK\", \"Unterminated block declaration\", braceMark);\n}\nfunction parseUnsupportedTopLevel(cursor) {\n\tconst offending = cursor.peekToken().text;\n\tconst message = cursor.peekKind(1) === \"LBrace\" ? `Unsupported top-level block \"${offending}\"` : `Unsupported top-level declaration \"${offending}\"`;\n\tcursor.diagnostic(\"PSL_UNSUPPORTED_TOP_LEVEL_BLOCK\", message, cursor.mark());\n\tcursor.bump();\n\tcursor.recoverToSyncPoint();\n}\n/**\n* Matches a leading `@@` block attribute, a no-op otherwise. Single-`@`\n* attributes belong to fields and are parsed inside `parseField`.\n*/\nfunction parseBlockAttribute(cursor) {\n\tif (cursor.peekKind() !== \"DoubleAt\") return void 0;\n\treturn parseAttribute(cursor);\n}\nfunction parseModelMember(cursor) {\n\tif (!(parseBlockAttribute(cursor) ?? parseField(cursor))) invalidMember(cursor, \"PSL_INVALID_MODEL_MEMBER\", `Invalid model member declaration \"${cursor.peekToken().text}\"`);\n}\nfunction parseNamedTypeMember(cursor) {\n\tif (!parseNamedType(cursor)) invalidMember(cursor, \"PSL_INVALID_TYPES_MEMBER\", `Invalid types declaration \"${cursor.peekToken().text}\"`);\n}\n/**\n* With the `prisma7` grammar, a `view` body is read like a model body and an `enum` member may\n* carry `@` attributes (`USER @map(\"user\")`). Every other generic block, and every generic block\n* with the `psl` grammar, reads plain `key = value` entries.\n*/\nfunction genericBlockMemberParser(keyword, grammar) {\n\tif (grammar === \"prisma7\" && keyword === \"view\") return parseModelMember;\n\tif (grammar === \"prisma7\" && keyword === \"enum\") return parseEnumMember;\n\treturn parseKeyValueMember;\n}\n/**\n* A generic-block member is either a `@@`-block attribute or a `key = value`\n* entry. The block-attribute alternative is purely syntactic — it does not judge\n* whether the attribute is valid for the block's kind.\n*/\nfunction parseKeyValueMember(cursor) {\n\tif (!(parseBlockAttribute(cursor) ?? parseKeyValue(cursor))) invalidMember(cursor, \"PSL_INVALID_EXTENSION_BLOCK_MEMBER\", \"Invalid block entry\");\n}\nfunction parseEnumMember(cursor) {\n\tif (!(parseBlockAttribute(cursor) ?? parseKeyValue(cursor, { memberAttributes: true }))) invalidMember(cursor, \"PSL_INVALID_EXTENSION_BLOCK_MEMBER\", \"Invalid block entry\");\n}\nfunction invalidMember(cursor, code, message) {\n\tcursor.diagnostic(code, message, cursor.mark());\n\tcursor.bump();\n\tcursor.recoverToSyncPoint();\n}\nfunction parseField(cursor) {\n\tif (cursor.peekKind() !== \"Ident\") return void 0;\n\tcursor.startNode(\"FieldDeclaration\");\n\tconst nameMark = cursor.mark();\n\tconst nameText = cursor.peekToken().text;\n\tparseIdentifier(cursor);\n\tif (cursor.peekKind() !== \"Ident\") cursor.diagnostic(\"PSL_INVALID_MODEL_MEMBER\", `Expected a type after field \"${nameText}\"`, nameMark);\n\tparseTypeAnnotation(cursor);\n\twhile (cursor.peekKind() === \"At\") parseAttribute(cursor);\n\treturn cursor.finishNode();\n}\nfunction parseNamedType(cursor) {\n\tif (cursor.peekKind() !== \"Ident\") return void 0;\n\tcursor.startNode(\"NamedTypeDeclaration\");\n\tconst nameMark = cursor.mark();\n\tconst nameText = cursor.peekToken().text;\n\tparseIdentifier(cursor);\n\tif (cursor.peekKind() === \"Equals\") cursor.bump();\n\telse cursor.diagnostic(\"PSL_INVALID_TYPES_MEMBER\", `Expected \"=\" after \"${nameText}\"`, nameMark);\n\tparseTypeAnnotation(cursor);\n\twhile (cursor.peekKind() === \"At\") parseAttribute(cursor);\n\treturn cursor.finishNode();\n}\n/**\n* A generic-block entry is either `key = value` or a bare `key` (committing a\n* `KeyValuePair` carrying only the key). With `memberAttributes` (enum blocks parsed with the\n* `prisma7` grammar) any number of `@` attributes may follow, as in `USER @map(\"user\")`. A\n* `key =` with no following expression is flagged.\n*/\nfunction parseKeyValue(cursor, options = { memberAttributes: false }) {\n\tif (cursor.peekKind() !== \"Ident\") return void 0;\n\tcursor.startNode(\"KeyValuePair\");\n\tparseIdentifier(cursor);\n\tif (cursor.peekKind() === \"Equals\") {\n\t\tcursor.bump();\n\t\tif (!parseExpression(cursor)) cursor.diagnostic(\"PSL_INVALID_EXTENSION_BLOCK_MEMBER\", \"Expected a value after \\\"=\\\"\", cursor.mark());\n\t}\n\twhile (options.memberAttributes && cursor.peekKind() === \"At\") parseAttribute(cursor);\n\treturn cursor.finishNode();\n}\n//#endregion\nexport { SourceFile as a, greenToken as i, GreenNodeBuilder as n, greenNode as r, parse as t };\n\n//# sourceMappingURL=parse-BPOOpARs.mjs.map"],"mappings":";;;;;AAKA,MAAM,kBAAkB;AACxB,MAAM,YAAY;AAClB,IAAI,aAAa,MAAM;CACtB;CACA;CACA,YAAY,MAAM;EACjB,KAAKA,QAAQ;EACb,MAAM,aAAa,CAAC,CAAC;EACrB,KAAK,IAAI,SAAS,GAAG,SAAS,KAAK,QAAQ,UAAU,IAAI,KAAK,WAAW,MAAM,MAAM,WAAW,WAAW,KAAK,SAAS,CAAC;EAC1H,KAAKC,cAAc;CACpB;CACA,IAAI,OAAO;EACV,OAAO,KAAKD;CACb;CACA,IAAI,SAAS;EACZ,OAAO,KAAKA,MAAM;CACnB;CACA,IAAI,YAAY;EACf,OAAO,KAAKC,YAAY;CACzB;CACA,mBAAmB;EAClB,OAAO,KAAKA;CACb;CACA,gBAAgB,MAAM;EACrB,IAAI,QAAQ,GAAG,OAAO;EACtB,OAAO,KAAKA,YAAY,SAAS,KAAKD,MAAM;CAC7C;CACA,cAAc,MAAM;EACnB,IAAI,OAAO,GAAG,OAAO;EACrB,MAAM,gBAAgB,KAAKC,YAAY,OAAO;EAC9C,IAAI,kBAAkB,KAAK,G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CAAC;CACpC,gBAAgB,MAAM;CACtB,IAAI,OAAO,SAAS,MAAM,SAAS,OAAO,WAAW,4BAA4B,gCAAgC,SAAS,IAAI,QAAQ;CACtI,oBAAoB,MAAM;CAC1B,OAAO,OAAO,SAAS,MAAM,MAAM,eAAe,MAAM;CACxD,OAAO,OAAO,WAAW;AAC1B;AACA,SAAS,eAAe,QAAQ;CAC/B,IAAI,OAAO,SAAS,MAAM,SAAS,OAAO,KAAK;CAC/C,OAAO,UAAU,sBAAsB;CACvC,MAAM,WAAW,OAAO,KAAK;CAC7B,MAAM,WAAW,OAAO,UAAU,CAAC,CAAC;CACpC,gBAAgB,MAAM;CACtB,IAAI,OAAO,SAAS,MAAM,UAAU,OAAO,KAAK;MAC3C,OAAO,WAAW,4BAA4B,uBAAuB,SAAS,IAAI,QAAQ;CAC/F,oBAAoB,MAAM;CAC1B,OAAO,OAAO,SAAS,MAAM,MAAM,eAAe,MAAM;CACxD,OAAO,OAAO,WAAW;AAC1B;;;;;;;AAOA,SAAS,cAAc,QAAQ,UAAU,EAAE,kBAAkB,MAAM,GAAG;CACrE,IAAI,OAAO,SAAS,MAAM,SAAS,OAAO,KAAK;CAC/C,OAAO,UAAU,cAAc;CAC/B,gBAAgB,MAAM;CACtB,IAAI,OAAO,SAAS,MAAM,UAAU;EACnC,OAAO,KAAK;EACZ,IAAI,CAAC,gBAAgB,MAAM,GAAG,OAAO,WAAW,sCAAsC,gCAAgC,OAAO,KAAK,CAAC;CACpI;CACA,OAAO,QAAQ,oBAAoB,OAAO,SAAS,MAAM,MAAM,eAAe,MAAM;CACpF,OAAO,OAAO,WAAW;AAC1B"}
@@ -1,7 +1,7 @@
1
1
  import { p as PslDiagnostic } from "./psl-ast-BbE51TSV-CWGx8nW5.mjs";
2
2
  import "./psl-ast-qJNIKKj4.mjs";
3
3
  import { n as TokenKind, t as Token } from "./tokenizer-DcYI0Xrq-C-nNE9mE.mjs";
4
- //#region ../../../1-framework/2-authoring/psl-parser/dist/parse-B5xYL_oV.d.mts
4
+ //#region ../../../1-framework/2-authoring/psl-parser/dist/parse-Di31RMVM.d.mts
5
5
  //#region src/source-file.d.ts
6
6
  interface Position {
7
7
  readonly line: number;
@@ -376,6 +376,8 @@ declare class GenericBlockDeclarationAst implements BracedBlock {
376
376
  lbrace(): SyntaxToken | undefined;
377
377
  rbrace(): SyntaxToken | undefined;
378
378
  entries(): Iterable<KeyValuePairAst>;
379
+ /** Field lines of a block parsed with the model-member grammar (a Prisma 7 `view`). Empty for every other generic block. */
380
+ fields(): Iterable<FieldDeclarationAst>;
379
381
  attributes(): Iterable<ModelAttributeAst>;
380
382
  members(): Iterable<GenericBlockMemberAst>;
381
383
  static cast(node: SyntaxNode): GenericBlockDeclarationAst | undefined;
@@ -386,6 +388,8 @@ declare class KeyValuePairAst implements AstNode {
386
388
  key(): IdentifierAst | undefined;
387
389
  equals(): SyntaxToken | undefined;
388
390
  value(): ExpressionAst | undefined;
391
+ /** `@` attributes after the key or value (a Prisma 7 enum member's `@map`). */
392
+ attributes(): Iterable<FieldAttributeAst>;
389
393
  static cast(node: SyntaxNode): KeyValuePairAst | undefined;
390
394
  }
391
395
  declare class FieldDeclarationAst implements AstNode {
@@ -417,11 +421,19 @@ interface ParseResult {
417
421
  readonly diagnostics: readonly ParseDiagnostic[];
418
422
  readonly sourceFile: SourceFile;
419
423
  }
424
+ type PslGrammar = 'psl' | 'prisma7';
425
+ interface ParseOptions {
426
+ /**
427
+ * `prisma7` also reads two Prisma 7 constructs: `@` attributes after an `enum` member, and field
428
+ * lines in a `view` body. Defaults to `psl`, which reads neither.
429
+ */
430
+ readonly grammar?: PslGrammar;
431
+ }
420
432
  /**
421
433
  * Parses a full PSL document. Never throws — malformed input yields diagnostics
422
434
  * and a recovered tree, not an exception.
423
435
  */
424
- declare function parse(source: string): ParseResult;
436
+ declare function parse(source: string, options?: ParseOptions): ParseResult;
425
437
  //#endregion
426
- export { parse as $, ObjectLiteralExprAst as A, SyntaxNode as B, ModelAttributeAst as C, NamespaceMemberAst as D, NamespaceDeclarationAst as E, Range as F, any as G, TokenAtOffset as H, SourceFile as I, filterChildren as J, castExpression as K, StringLiteralExprAst as L, ParseResult as M, Position as N, NumberLiteralExprAst as O, QualifiedNameAst as P, greenToken as Q, SyntaxElement as R, KeyValuePairAst as S, NamedTypeDeclarationAst as T, TypeAnnotationAst as U, SyntaxToken as V, TypesBlockAst as W, findFirstChild as X, findChildToken as Y, greenNode as Z, GenericBlockMemberAst as _, AttributeAst as a, GreenToken as b, BracedBlock as c, DocumentAst as d, printSyntax as et, ExpressionAst as f, GenericBlockDeclarationAst as g, FunctionCallAst as h, AttributeArgListAst as i, ParseDiagnostic as j, ObjectFieldAst as k, CompositeTypeDeclarationAst as l, FieldDeclarationAst as m, AstNode as n, BlockMemberAst as o, FieldAttributeAst as p, createSyntaxTree as q, AttributeArgAst as r, BooleanLiteralExprAst as s, ArrayLiteralAst as t, DeclarationAst as u, GreenElement as v, ModelDeclarationAst as w, IdentifierAst as x, GreenNode as y, SyntaxKind as z };
427
- //# sourceMappingURL=parse-B5xYL_oV-eRg5n6ha.d.mts.map
438
+ export { greenToken as $, ObjectLiteralExprAst as A, SyntaxKind as B, ModelAttributeAst as C, NamespaceMemberAst as D, NamespaceDeclarationAst as E, QualifiedNameAst as F, TypesBlockAst as G, SyntaxToken as H, Range as I, createSyntaxTree as J, any as K, SourceFile as L, ParseOptions as M, ParseResult as N, NumberLiteralExprAst as O, Position as P, greenNode as Q, StringLiteralExprAst as R, KeyValuePairAst as S, NamedTypeDeclarationAst as T, TokenAtOffset as U, SyntaxNode as V, TypeAnnotationAst as W, findChildToken as X, filterChildren as Y, findFirstChild as Z, GenericBlockMemberAst as _, AttributeAst as a, GreenToken as b, BracedBlock as c, DocumentAst as d, parse as et, ExpressionAst as f, GenericBlockDeclarationAst as g, FunctionCallAst as h, AttributeArgListAst as i, ParseDiagnostic as j, ObjectFieldAst as k, CompositeTypeDeclarationAst as l, FieldDeclarationAst as m, AstNode as n, BlockMemberAst as o, FieldAttributeAst as p, castExpression as q, AttributeArgAst as r, BooleanLiteralExprAst as s, ArrayLiteralAst as t, printSyntax as tt, DeclarationAst as u, GreenElement as v, ModelDeclarationAst as w, IdentifierAst as x, GreenNode as y, SyntaxElement as z };
439
+ //# sourceMappingURL=parse-Di31RMVM-BishytyS.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"parse-B5xYL_oV-eRg5n6ha.d.mts","names":[],"sources":["../../../../1-framework/2-authoring/psl-parser/dist/parse-B5xYL_oV.d.mts"],"mappings":";;;;;UAGU;WACC;WACA;;UAED;WACC,OAAO;WACP,KAAK;;cAEF;;EAEZ,YAAY;MACR;MACA;MACA;EACJ;EACA,gBAAgB;EAChB,cAAc;EACd,WAAW,iBAAiB;EAC5B,SAAS,UAAU;;;;KAIhB;;;UAGK;WACC;WACA,MAAM;WACN;;UAED;WACC;WACA,MAAM;WACN,UAAU,cAAc;WACxB;;KAEN,eAAe,YAAY;iBACf,WAAW,MAAM,WAAW,eAAe;iBAC3C,UAAU,MAAM,YAAY,UAAU,cAAc,gBAAgB;;;;;;;;;;cAUvE,uBAAuB;WAC1B,OAAO;WACP,MAAM;WACN;WACA;WACA,QAAQ;;WAER;EACT,YAAY,OAAO,YAAY,gBAAgB,QAAQ,YAAY;MAC/D;MACA;;EAEJ,SAAS;EACT,UAAU;;MAEN,sBAAsB;;MAEtB,sBAAsB;;MAEtB,aAAa;;MAEb,aAAa;;KAEd,gBAAgB,aAAa;cACpB;;UAEJ;SACD,QAAQ;SACR,OAAO,OAAO,cAAc;SAC5B,QAAQ,MAAM,aAAa,OAAO,cAAc;MACnD;MACA;EACJ,cAAc;EACd,eAAe;;cAEH;WACH,OAAO;WACP;WACA,QAAQ;;WAER;EACT,YAAY,OAAO,WAAW,gBAAgB,QAAQ,wBAAwB;MAC1E,QAAQ;MACR;MACA;;EAEJ,SAAS;EACT,UAAU;MACN,cAAc;MACd,aAAa;MACb,eAAe;MACf,eAAe;;MAEf,sBAA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AAM,aAAa;;;;UAIvB;WACC,MAAM;WACN;WACA,OAAO;;UAER;WACC,UAAU;WACV,sBAAsB;WACtB,YAAY;;;;;;iBAMN,MAAM,iBAAiB"}
1
+ {"version":3,"file":"parse-Di31RMVM-BishytyS.d.mts","names":[],"sources":["../../../../1-framework/2-authoring/psl-parser/dist/parse-Di31RMVM.d.mts"],"mappings":";;;;;UAGU;WACC;WACA;;UAED;WACC,OAAO;WACP,KAAK;;cAEF;;EAEZ,YAAY;MACR;MACA;MACA;EACJ;EACA,gBAAgB;EAChB,cAAc;EACd,WAAW,iBAAiB;EAC5B,SAAS,UAAU;;;;KAIhB;;;UAGK;WACC;WACA,MAAM;WACN;;UAED;WACC;WACA,MAAM;WACN,UAAU,cAAc;WACxB;;KAEN,eAAe,YAAY;iBACf,WAAW,MAAM,WAAW,eAAe;iBAC3C,UAAU,MAAM,YAAY,UAAU,cAAc,gBAAgB;;;;;;;;;;cAUvE,uBAAuB;WAC1B,OAAO;WACP,MAAM;WACN;WACA;WACA,QAAQ;;WAER;EACT,YAAY,OAAO,YAAY,gBAAgB,QAAQ,YAAY;MAC/D;MACA;;EAEJ,SAAS;EACT,UAAU;;MAEN,sBAAsB;;MAEtB,sBAAsB;;MAEtB,aAAa;;MAEb,aAAa;;KAEd,gBAAgB,aAAa;cACpB;;UAEJ;SACD,QAAQ;SACR,OAAO,OAAO,cAAc;SAC5B,QAAQ,MAAM,aAAa,OAAO,cAAc;MACnD;MACA;EACJ,cAAc;EACd,eAAe;;cAEH;WACH,OAAO;WACP;WACA,QAAQ;;WAER;EACT,YAAY,OAAO,WAAW,gBAAgB,QAAQ,wBAAwB;MAC1E,QAAQ;MACR;MACA;;EAEJ,SAAS;EACT,UAAU;MACN,cAAc;MACd,aAAa;MACb,eAAe;MACf,eAAe;;MAEf,sBAAsB;;MAEtB,sBAAsB;;MAEtB,cAAc;;MAEd,aAAa;EACjB,YAAY,SAAS;EACrB,cAAc,SAAS;EACvB,aAAa,SAAS;;EAEtB,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BAAsB;WACtB,YAAY;;KAElB;UACK;;;;;WAKC,UAAU;;;;;;iBAMJ,MAAM,gBAAgB,UAAU,eAAe"}
@@ -7,8 +7,8 @@ import { M as namespacePslExtensionBlocks, T as PslTypesBlock, a as PslAttribute
7
7
  import { r as Result } from "./result-Bpupv5vO.mjs";
8
8
  import { n as AssembledAuthoringContributions } from "./control-BYM5Hu_N.mjs";
9
9
  import "./psl-ast-qJNIKKj4.mjs";
10
- import { C as ModelAttributeAst, I as SourceFile, f as ExpressionAst, n as AstNode, p as FieldAttributeAst, r as AttributeArgAst } from "./parse-B5xYL_oV-eRg5n6ha.mjs";
11
- import { _ as nodePslSpan, a as ModelSymbol, b as readResolvedAttributes, c as ResolvedAttribute, d as ResolvedTypeConstructorCall, f as SymbolTable, g as keywordPslSpan, h as buildSymbolTable, i as FieldSymbol, l as ResolvedAttributeArg, m as TopLevelScope, n as BuildSymbolTableOptions, o as NamedTypeSymbol, p as SymbolTableResult, r as CompositeTypeSymbol, s as NamespaceSymbol, t as BlockSymbol, u as ResolvedNamedTypeBinding, v as rangeToPslSpan, x as readResolvedConstructorCall, y as readResolvedAttribute } from "./symbol-table-BeOQBu3C-wAie__JJ.mjs";
10
+ import { C as ModelAttributeAst, L as SourceFile, f as ExpressionAst, n as AstNode, p as FieldAttributeAst, r as AttributeArgAst } from "./parse-Di31RMVM-BishytyS.mjs";
11
+ import { _ as nodePslSpan, a as ModelSymbol, b as readResolvedAttributes, c as ResolvedAttribute, d as ResolvedTypeConstructorCall, f as SymbolTable, g as keywordPslSpan, h as buildSymbolTable, i as FieldSymbol, l as ResolvedAttributeArg, m as TopLevelScope, n as BuildSymbolTableOptions, o as NamedTypeSymbol, p as SymbolTableResult, r as CompositeTypeSymbol, s as NamespaceSymbol, t as BlockSymbol, u as ResolvedNamedTypeBinding, v as rangeToPslSpan, x as readResolvedConstructorCall, y as readResolvedAttribute } from "./symbol-table-BsJpsMzi-D8DjUxrQ.mjs";
12
12
  import { n as UnionToIntersection, t as Simplify } from "./types-DGxlljKG.mjs";
13
13
  //#region ../../../1-framework/2-authoring/psl-parser/dist/index.d.mts
14
14
  //#region src/attribute-helpers.d.ts
@@ -87,6 +87,13 @@ interface FixedNumArgType<T extends number = number, Ctx extends AttributeCtx =
87
87
  readonly kind: 'num';
88
88
  readonly value: T;
89
89
  }
90
+ interface NumLiteral {
91
+ readonly text: string;
92
+ }
93
+ interface NumLiteralArgType<Ctx extends AttributeCtx = AttributeCtx> extends ArgTypeOutput<NumLiteral, Ctx> {
94
+ readonly kind: 'num';
95
+ readonly value: undefined;
96
+ }
90
97
  interface OneOfArgType<Alts extends readonly [AnyArgType, ...AnyArgType[]], Ctx extends AttributeCtx = ContextForRequirement<RequiredContextFor<CtxOf<Alts[number]>>>> extends ArgTypeOutput<OutOf<Alts[number]>, Ctx> {
91
98
  readonly kind: 'oneOf';
92
99
  readonly alternatives: Alts;
@@ -114,7 +121,7 @@ type AnyArgType = ArgType<unknown, AttributeCtx> | ArgType<unknown, ModelAttribu
114
121
  type CtxOf<P> = P extends ArgTypeOutput<unknown, infer Ctx> ? Ctx : never;
115
122
  type RequiredContextFor<Ctx extends AttributeCtx> = [Extract<Ctx, FieldAttributeCtx>] extends [never] ? [Extract<Ctx, ModelAttributeCtx>] extends [never] ? 'attribute' : 'model' : 'field';
116
123
  type ContextForRequirement<Req extends ArgTypeContext> = Req extends 'field' ? FieldAttributeCtx : Req extends 'model' ? ModelAttributeCtx : AttributeCtx;
117
- type InspectableArgType<Ctx extends AttributeCtx> = BoolArgType<Ctx> | EntityRefArgType<Ctx> | FieldRefArgType<ModelAttributeCtx & Ctx> | FuncCallArgType<string, Ctx> | IdentifierArgType<string, Ctx> | IntArgType<Ctx> | JsonArgType<Ctx> | ListArgType<unknown, Ctx> | FixedNumArgType<number, Ctx> | UnrestrictedNumArgType<Ctx> | OneOfArgType<readonly [AnyArgType, ...AnyArgType[]], Ctx> | RecordArgType<unknown, Ctx> | ReferencedFieldRefArgType<FieldAttributeCtx & Ctx> | RejectingArgType<never, Ctx> | FixedStrArgType<string, Ctx> | UnrestrictedStrArgType<Ctx>;
124
+ type InspectableArgType<Ctx extends AttributeCtx> = BoolArgType<Ctx> | EntityRefArgType<Ctx> | FieldRefArgType<ModelAttributeCtx & Ctx> | FuncCallArgType<string, Ctx> | IdentifierArgType<string, Ctx> | IntArgType<Ctx> | JsonArgType<Ctx> | ListArgType<unknown, Ctx> | FixedNumArgType<number, Ctx> | UnrestrictedNumArgType<Ctx> | NumLiteralArgType<Ctx> | OneOfArgType<readonly [AnyArgType, ...AnyArgType[]], Ctx> | RecordArgType<unknown, Ctx> | ReferencedFieldRefArgType<FieldAttributeCtx & Ctx> | RejectingArgType<never, Ctx> | FixedStrArgType<string, Ctx> | UnrestrictedStrArgType<Ctx>;
118
125
  type OptionalArgType<T, Ctx extends AttributeCtx, Type extends object = ArgType<T, Ctx>, HasDefault extends boolean = boolean> = Type & {
119
126
  readonly optional: true;
120
127
  readonly hasDefault: HasDefault;
@@ -226,6 +233,10 @@ declare function list<T, Ctx extends AttributeCtx>(of: ArgType<T, Ctx>, opts?: L
226
233
  declare function num(): UnrestrictedNumArgType<AttributeCtx>;
227
234
  declare function num<const T extends number>(value: T): FixedNumArgType<T, AttributeCtx>;
228
235
  //#endregion
236
+ //#region src/attribute-spec/combinators/num-literal.d.ts
237
+ /** A number literal kept as its source text, for consumers that must not round it through a JS number. */
238
+ declare function numLiteral(): NumLiteralArgType<AttributeCtx>;
239
+ //#endregion
229
240
  //#region src/attribute-spec/combinators/one-of.d.ts
230
241
  declare function oneOf<Alts extends readonly [AnyArgType, ...AnyArgType[]]>(...alts: Alts): OneOfArgType<Alts, ContextForRequirement<RequiredContextFor<CtxOf<Alts[number]>>>>;
231
242
  //#endregion
@@ -276,5 +287,5 @@ declare function validateExtensionBlockFromSymbol(input: {
276
287
  readonly codecLookup: CodecLookup;
277
288
  }): readonly PslDiagnostic[];
278
289
  //#endregion
279
- export { type ArgBindingSpec, type ArgType, type ArgTypeKind, type AssembledAttributeSpecs, type AttributeCtx, type AttributeLevel, type AttributeOut, type AttributeSpec, type AttributeSpecContext, type AttributeSpecNamespace, type BlockAttributeSpecFactory, type BlockSymbol, type BuildSymbolTableOptions, type CompositeTypeSymbol, type FieldAttributeCtx, type FieldAttributeSpecContext, type FieldAttributeSpecFactory, type FieldSymbol, type FuncCallSig, type InferAttr, type InspectableArgType, type ListOptions, type ModelAttributeCtx, type ModelAttributeSpecFactory, type ModelSymbol, type NamedOut, type NamedTypeSymbol, type NamespaceSymbol, type OptionalArgType, type OutOf, type Param, type PosOut, type PositionalParam, type PslAttribute, type PslAttributeArgument, type PslAttributeNamedArgument, type PslAttributePositionalArgument, type PslAttributeTarget, type PslCompositeType, type PslDefaultFunctionValue, type PslDefaultLiteralValue, type PslDefaultValue, type PslDiagnostic, type PslDiagnosticCode, type PslDocumentAst, type PslExtensionBlock, type PslExtensionBlockAttribute, type PslExtensionBlockAttributeArg, type PslExtensionBlockParamBare, type PslExtensionBlockParamList, type PslExtensionBlockParamOption, type PslExtensionBlockParamRef, type PslExtensionBlockParamScalarValue, type PslExtensionBlockParamValue, type PslField, type PslFieldAttribute, type PslModel, type PslModelAttribute, type PslNamedTypeDeclaration, type PslNamespace, type PslPosition, type PslSpan, type PslTypeConstructorCall, type PslTypesBlock, type RejectingArgType, type ResolvedAttribute, type ResolvedAttributeArg, type ResolvedNamedTypeBinding, type ResolvedTypeConstructorCall, type SymbolTable, type SymbolTableResult, type TopLevelScope, type TypedFuncCall, assembleAttributeSpecs, blockAttribute, bool, buildSymbolTable, entityRef, fieldAttribute, fieldRef, findBlockDescriptor, flatPslModels, funcCall, getPositionalArgument, identifier, int, interpretArgs, interpretAttribute, json, keywordPslSpan, leafDiagnostic, list, modelAttribute, namespacePslExtensionBlocks, nodePslSpan, num, oneOf, optional, parseQuotedStringLiteral, rangeToPslSpan, readResolvedAttribute, readResolvedAttributes, readResolvedConstructorCall, record, referencedFieldRef, str, validateExtensionBlockFromSymbol };
290
+ export { type ArgBindingSpec, type ArgType, type ArgTypeKind, type AssembledAttributeSpecs, type AttributeCtx, type AttributeLevel, type AttributeOut, type AttributeSpec, type AttributeSpecContext, type AttributeSpecNamespace, type BlockAttributeSpecFactory, type BlockSymbol, type BuildSymbolTableOptions, type CompositeTypeSymbol, type FieldAttributeCtx, type FieldAttributeSpecContext, type FieldAttributeSpecFactory, type FieldSymbol, type FuncCallSig, type InferAttr, type InspectableArgType, type ListOptions, type ModelAttributeCtx, type ModelAttributeSpecFactory, type ModelSymbol, type NamedOut, type NamedTypeSymbol, type NamespaceSymbol, type NumLiteral, type OptionalArgType, type OutOf, type Param, type PosOut, type PositionalParam, type PslAttribute, type PslAttributeArgument, type PslAttributeNamedArgument, type PslAttributePositionalArgument, type PslAttributeTarget, type PslCompositeType, type PslDefaultFunctionValue, type PslDefaultLiteralValue, type PslDefaultValue, type PslDiagnostic, type PslDiagnosticCode, type PslDocumentAst, type PslExtensionBlock, type PslExtensionBlockAttribute, type PslExtensionBlockAttributeArg, type PslExtensionBlockParamBare, type PslExtensionBlockParamList, type PslExtensionBlockParamOption, type PslExtensionBlockParamRef, type PslExtensionBlockParamScalarValue, type PslExtensionBlockParamValue, type PslField, type PslFieldAttribute, type PslModel, type PslModelAttribute, type PslNamedTypeDeclaration, type PslNamespace, type PslPosition, type PslSpan, type PslTypeConstructorCall, type PslTypesBlock, type RejectingArgType, type ResolvedAttribute, type ResolvedAttributeArg, type ResolvedNamedTypeBinding, type ResolvedTypeConstructorCall, type SymbolTable, type SymbolTableResult, type TopLevelScope, type TypedFuncCall, assembleAttributeSpecs, blockAttribute, bool, buildSymbolTable, entityRef, fieldAttribute, fieldRef, findBlockDescriptor, flatPslModels, funcCall, getPositionalArgument, identifier, int, interpretArgs, interpretAttribute, json, keywordPslSpan, leafDiagnostic, list, modelAttribute, namespacePslExtensionBlocks, nodePslSpan, num, numLiteral, oneOf, optional, parseQuotedStringLiteral, rangeToPslSpan, readResolvedAttribute, readResolvedAttributes, readResolvedConstructorCall, record, referencedFieldRef, str, validateExtensionBlockFromSymbol };
280
291
  //# sourceMappingURL=psl-parser.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"psl-parser.d.mts","names":[],"sources":["../../../../1-framework/2-authoring/psl-parser/dist/index.d.mts"],"mappings":";;;;;;;;;;;;;;iBASiB,sBAAsB,WAAW,cAAgB;iBACjD,yBAAyB;;;KAGrC;UACK;WACC;WACA,YAAY;;UAEb,0BAA0B;WACzB,WAAW;;UAEZ,0BAA0B;WACzB,OAAO;EAChB,0BAA0B;;KAEvB;KACA;UACK,cAAc,GAAG,YAAY;WAC5B;WACA,OAAO;WACP,QAAQ,KAAK,eAAe,KAAK,QAAQ,OAAO,YAAY;;UAE7D,YAAY,YAAY,eAAe,sBAAsB,uBAAuB;WACnF;;UAED,iBAAiB,YAAY,eAAe,sBAAsB,sBAAsB;WACvF;;UAED,gBAAgB,YAAY,oBAAoB,2BAA2B,sBAAsB;WAChG;;UAED,0BAA0B,YAAY,oBAAoB,2BAA2B,sBAAsB;WAC1G;;UAED;WACC,sBAAsB,yBAAyB;WAC/C,QAAQ,SAAS,eAAe,eAAe;;UAEhD;WACC;WACA,MAAM;WACN,MAAM,SAAS;;UAEhB,gBAAgB,8BAA8B,YAAY,eAAe,cAAc,kBAAkB,cAAc,qBAAqB,cAAc,eAAe;WACxK;WACA,MAAM;WACN,WAAW;;UAEZ,kBAAkB,8BAA8B,YAAY,eAAe,sBAAsB,cAAc,MAAM;WACpH;WACA,MAAM;;UAEP,WAAW,YAAY,eAAe,sBAAsB,sBAAsB;WACjF;WACA;WACA;;UAED,YAAY,YAAY,eAAe,sBAAsB,cAAc,yBAAyB;WACnG;;UAED,YAAY,aAAa,YAAY,eAAe,sBAAsB,cAAc,KAAK;WAC5F;WACA,IAAI,QAAQ,GAAG;WACf;WACA;;UAED,uBAAuB,YAAY,eAAe,sBAAsB,sBAAsB;WAC7F;WACA;;UAED,gBAAgB,2BAA2B,YAAY,eAAe,sBAAs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ChGYPVpq-DhUD05u0.mjs";
3
3
  import { n as ok, t as notOk } from "./result-C0NUq1Ok.mjs";
4
4
  import { h as isAuthoringPslBlockDescriptor, m as isAuthoringModelAttributeDescriptor } from "./framework-authoring-BvxZnsPY-DlD1nwU5.mjs";
5
5
  import { a as makePslNamespace, c as validateExtensionBlock, i as flatPslModels, n as UNSPECIFIED_PSL_NAMESPACE_ID, o as makePslNamespaceEntries, s as namespacePslExtensionBlocks } from "./psl-ast-DUCvVXbB.mjs";
6
- import { E as TypesBlockAst, N as printSyntax, _ as NumberLiteralExprAst, a as CompositeTypeDeclarationAst, d as IdentifierAst, g as NamespaceDeclarationAst, i as BooleanLiteralExprAst, l as FunctionCallAst, m as ModelDeclarationAst, t as ArrayLiteralAst, u as GenericBlockDeclarationAst, x as StringLiteralExprAst, y as ObjectLiteralExprAst } from "./declarations-DR6To8_k-BFwkCGeP.mjs";
6
+ import { E as TypesBlockAst, N as printSyntax, _ as NumberLiteralExprAst, a as CompositeTypeDeclarationAst, d as IdentifierAst, g as NamespaceDeclarationAst, i as BooleanLiteralExprAst, l as FunctionCallAst, m as ModelDeclarationAst, t as ArrayLiteralAst, u as GenericBlockDeclarationAst, x as StringLiteralExprAst, y as ObjectLiteralExprAst } from "./declarations-C8gJnWQp-CnufYOCF.mjs";
7
7
  //#region ../../../1-framework/2-authoring/psl-parser/dist/index.mjs
8
8
  function getPositionalArgument(attribute, index = 0) {
9
9
  return attribute.args.filter((arg) => arg.kind === "positional")[index]?.value;
@@ -422,6 +422,19 @@ function num(value) {
422
422
  }
423
423
  };
424
424
  }
425
+ /** A number literal kept as its source text, for consumers that must not round it through a JS number. */
426
+ function numLiteral() {
427
+ return {
428
+ kind: "num",
429
+ label: "number",
430
+ value: void 0,
431
+ parse: (arg, ctx) => {
432
+ const text = NumberLiteralExprAst.cast(arg.syntax)?.token()?.text;
433
+ if (text !== void 0) return ok({ text });
434
+ return notOk([leafDiagnostic(ctx, arg, "Expected a number literal")]);
435
+ }
436
+ };
437
+ }
425
438
  function oneOf(...alts) {
426
439
  const label = alts.map((alt) => alt.label).join(" | ");
427
440
  return {
@@ -966,6 +979,6 @@ function nodeRange(node, sourceFile) {
966
979
  };
967
980
  }
968
981
  //#endregion
969
- export { assembleAttributeSpecs, blockAttribute, bool, buildSymbolTable, entityRef, fieldAttribute, fieldRef, findBlockDescriptor, flatPslModels, funcCall, getPositionalArgument, identifier, int, interpretArgs, interpretAttribute, json, keywordPslSpan, leafDiagnostic, list, modelAttribute, namespacePslExtensionBlocks, nodePslSpan, num, oneOf, optional, parseQuotedStringLiteral, rangeToPslSpan, readResolvedAttribute, readResolvedAttributes, readResolvedConstructorCall, record, referencedFieldRef, str, validateExtensionBlockFromSymbol };
982
+ export { assembleAttributeSpecs, blockAttribute, bool, buildSymbolTable, entityRef, fieldAttribute, fieldRef, findBlockDescriptor, flatPslModels, funcCall, getPositionalArgument, identifier, int, interpretArgs, interpretAttribute, json, keywordPslSpan, leafDiagnostic, list, modelAttribute, namespacePslExtensionBlocks, nodePslSpan, num, numLiteral, oneOf, optional, parseQuotedStringLiteral, rangeToPslSpan, readResolvedAttribute, readResolvedAttributes, readResolvedConstructorCall, record, referencedFieldRef, str, validateExtensionBlockFromSymbol };
970
983
 
971
984
  //# sourceMappingURL=psl-parser.mjs.map