@prisma-next/psl-parser 0.3.0-dev.55 → 0.3.0-dev.57
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -0
- package/dist/index.d.mts +2 -2
- package/dist/{parser-WO_S8bEb.d.mts → parser-CUqO9VeG.d.mts} +2 -2
- package/dist/parser-CUqO9VeG.d.mts.map +1 -0
- package/dist/parser.d.mts +1 -1
- package/dist/{types-a_KkjvGB.d.mts → types-QqDFOzNR.d.mts} +13 -2
- package/dist/types-QqDFOzNR.d.mts.map +1 -0
- package/dist/types.d.mts +2 -2
- package/package.json +2 -2
- package/src/exports/types.ts +3 -0
- package/dist/parser-WO_S8bEb.d.mts.map +0 -1
- package/dist/types-a_KkjvGB.d.mts.map +0 -1
package/README.md
CHANGED
|
@@ -26,6 +26,7 @@ In the provider-based authoring model, PSL providers call this parser and then r
|
|
|
26
26
|
- Attributes may include an **optional argument list**.
|
|
27
27
|
- Arguments are parsed into positional/named entries with preserved raw values and source spans.
|
|
28
28
|
- The parser owns **syntax + structure + spans**, not semantics.
|
|
29
|
+
- Example: `@default(uuid(7))` is preserved as a positional argument value `uuid(7)`; semantic lowering is handled downstream.
|
|
29
30
|
|
|
30
31
|
Interpretation/validation (for example `@prisma-next/sql-contract-psl`) is responsible for:
|
|
31
32
|
|
package/dist/index.d.mts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { t as parsePslDocument } from "./parser-
|
|
1
|
+
import { S as PslPosition, T as PslTypesBlock, _ as PslFieldAttribute, a as PslAttributeNamedArgument, b as PslModelAttribute, c as PslDefaultFunctionValue, d as PslDiagnostic, f as PslDiagnosticCode, g as PslField, h as PslEnumValue, i as PslAttributeArgument, l as PslDefaultLiteralValue, m as PslEnum, n as ParsePslDocumentResult, o as PslAttributePositionalArgument, p as PslDocumentAst, r as PslAttribute, s as PslAttributeTarget, t as ParsePslDocumentInput, u as PslDefaultValue, w as PslSpan, x as PslNamedTypeDeclaration, y as PslModel } from "./types-QqDFOzNR.mjs";
|
|
2
|
+
import { t as parsePslDocument } from "./parser-CUqO9VeG.mjs";
|
|
3
3
|
export { type ParsePslDocumentInput, type ParsePslDocumentResult, type PslAttribute, type PslAttributeArgument, type PslAttributeNamedArgument, type PslAttributePositionalArgument, type PslAttributeTarget, type PslDefaultFunctionValue, type PslDefaultLiteralValue, type PslDefaultValue, type PslDiagnostic, type PslDiagnosticCode, type PslDocumentAst, type PslEnum, type PslEnumValue, type PslField, type PslFieldAttribute, type PslModel, type PslModelAttribute, type PslNamedTypeDeclaration, type PslPosition, type PslSpan, type PslTypesBlock, parsePslDocument };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { n as ParsePslDocumentResult, t as ParsePslDocumentInput } from "./types-
|
|
1
|
+
import { n as ParsePslDocumentResult, t as ParsePslDocumentInput } from "./types-QqDFOzNR.mjs";
|
|
2
2
|
|
|
3
3
|
//#region src/parser.d.ts
|
|
4
4
|
declare function parsePslDocument(input: ParsePslDocumentInput): ParsePslDocumentResult;
|
|
5
5
|
//#endregion
|
|
6
6
|
export { parsePslDocument as t };
|
|
7
|
-
//# sourceMappingURL=parser-
|
|
7
|
+
//# sourceMappingURL=parser-CUqO9VeG.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"parser-CUqO9VeG.d.mts","names":[],"sources":["../src/parser.ts"],"sourcesContent":[],"mappings":";;;iBAgDgB,gBAAA,QAAwB,wBAAwB"}
|
package/dist/parser.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as parsePslDocument } from "./parser-
|
|
1
|
+
import { t as parsePslDocument } from "./parser-CUqO9VeG.mjs";
|
|
2
2
|
export { parsePslDocument };
|
|
@@ -44,6 +44,7 @@ interface PslAttribute {
|
|
|
44
44
|
readonly args: readonly PslAttributeArgument[];
|
|
45
45
|
readonly span: PslSpan;
|
|
46
46
|
}
|
|
47
|
+
type PslReferentialAction = string;
|
|
47
48
|
type PslFieldAttribute = PslAttribute;
|
|
48
49
|
interface PslField {
|
|
49
50
|
readonly kind: 'field';
|
|
@@ -55,6 +56,16 @@ interface PslField {
|
|
|
55
56
|
readonly attributes: readonly PslFieldAttribute[];
|
|
56
57
|
readonly span: PslSpan;
|
|
57
58
|
}
|
|
59
|
+
interface PslUniqueConstraint {
|
|
60
|
+
readonly kind: 'unique';
|
|
61
|
+
readonly fields: readonly string[];
|
|
62
|
+
readonly span: PslSpan;
|
|
63
|
+
}
|
|
64
|
+
interface PslIndexConstraint {
|
|
65
|
+
readonly kind: 'index';
|
|
66
|
+
readonly fields: readonly string[];
|
|
67
|
+
readonly span: PslSpan;
|
|
68
|
+
}
|
|
58
69
|
type PslModelAttribute = PslAttribute;
|
|
59
70
|
interface PslModel {
|
|
60
71
|
readonly kind: 'model';
|
|
@@ -104,5 +115,5 @@ interface ParsePslDocumentResult {
|
|
|
104
115
|
readonly ok: boolean;
|
|
105
116
|
}
|
|
106
117
|
//#endregion
|
|
107
|
-
export {
|
|
108
|
-
//# sourceMappingURL=types-
|
|
118
|
+
export { PslReferentialAction as C, PslUniqueConstraint as E, PslPosition as S, PslTypesBlock as T, PslFieldAttribute as _, PslAttributeNamedArgument as a, PslModelAttribute as b, PslDefaultFunctionValue as c, PslDiagnostic as d, PslDiagnosticCode as f, PslField as g, PslEnumValue as h, PslAttributeArgument as i, PslDefaultLiteralValue as l, PslEnum as m, ParsePslDocumentResult as n, PslAttributePositionalArgument as o, PslDocumentAst as p, PslAttribute as r, PslAttributeTarget as s, ParsePslDocumentInput as t, PslDefaultValue as u, PslIndexConstraint as v, PslSpan as w, PslNamedTypeDeclaration as x, PslModel as y };
|
|
119
|
+
//# sourceMappingURL=types-QqDFOzNR.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types-QqDFOzNR.d.mts","names":[],"sources":["../src/types.ts"],"sourcesContent":[],"mappings":";UAAiB,WAAA;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EAKrB,SAAA,IAAA,EAAA,WAAsB;mBApFpB;;0BAEO;iBACT;;KAGL,oBAAA;KAEA,iBAAA,GAAoB;UAEf,QAAA;;;;;;;gCAOe;iBACf;;UAGA,mBAAA;;;iBAGA;;UAGA,kBAAA;;;iBAGA;;KAGL,iBAAA,GAAoB;UAEf,QAAA;;;4BAGW;gCACI;iBACf;;UAGA,YAAA;;;iBAGA;;UAGA,OAAA;;;4BAGW;iBACX;;UAGA,uBAAA;;;;gCAIe;iBACf;;UAGA,aAAA;;kCAEiB;iBACjB;;UAGA,cAAA;;;4BAGW;2BACD;mBACR;iBACF;;UAGA,qBAAA;;;;UAKA,sBAAA;gBACD;iCACiB"}
|
package/dist/types.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { C as
|
|
2
|
-
export { type ParsePslDocumentInput, type ParsePslDocumentResult, type PslAttribute, type PslAttributeArgument, type PslAttributeNamedArgument, type PslAttributePositionalArgument, type PslAttributeTarget, type PslDefaultFunctionValue, type PslDefaultLiteralValue, type PslDefaultValue, type PslDiagnostic, type PslDiagnosticCode, type PslDocumentAst, type PslEnum, type PslEnumValue, type PslField, type PslFieldAttribute, type PslModel, type PslModelAttribute, type PslNamedTypeDeclaration, type PslPosition, type PslSpan, type PslTypesBlock };
|
|
1
|
+
import { C as PslReferentialAction, E as PslUniqueConstraint, S as PslPosition, T as PslTypesBlock, _ as PslFieldAttribute, a as PslAttributeNamedArgument, b as PslModelAttribute, c as PslDefaultFunctionValue, d as PslDiagnostic, f as PslDiagnosticCode, g as PslField, h as PslEnumValue, i as PslAttributeArgument, l as PslDefaultLiteralValue, m as PslEnum, n as ParsePslDocumentResult, o as PslAttributePositionalArgument, p as PslDocumentAst, r as PslAttribute, s as PslAttributeTarget, t as ParsePslDocumentInput, u as PslDefaultValue, v as PslIndexConstraint, w as PslSpan, x as PslNamedTypeDeclaration, y as PslModel } from "./types-QqDFOzNR.mjs";
|
|
2
|
+
export { type ParsePslDocumentInput, type ParsePslDocumentResult, type PslAttribute, type PslAttributeArgument, type PslAttributeNamedArgument, type PslAttributePositionalArgument, type PslAttributeTarget, type PslDefaultFunctionValue, type PslDefaultLiteralValue, type PslDefaultValue, type PslDiagnostic, type PslDiagnosticCode, type PslDocumentAst, type PslEnum, type PslEnumValue, type PslField, type PslFieldAttribute, type PslIndexConstraint, type PslModel, type PslModelAttribute, type PslNamedTypeDeclaration, type PslPosition, type PslReferentialAction, type PslSpan, type PslTypesBlock, type PslUniqueConstraint };
|
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@prisma-next/psl-parser",
|
|
3
|
-
"version": "0.3.0-dev.
|
|
3
|
+
"version": "0.3.0-dev.57",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"description": "Reusable parser for Prisma Schema Language (PSL)",
|
|
7
7
|
"dependencies": {
|
|
8
|
-
"@prisma-next/utils": "0.3.0-dev.
|
|
8
|
+
"@prisma-next/utils": "0.3.0-dev.57"
|
|
9
9
|
},
|
|
10
10
|
"devDependencies": {
|
|
11
11
|
"tsdown": "0.18.4",
|
package/src/exports/types.ts
CHANGED
|
@@ -16,10 +16,13 @@ export type {
|
|
|
16
16
|
PslEnumValue,
|
|
17
17
|
PslField,
|
|
18
18
|
PslFieldAttribute,
|
|
19
|
+
PslIndexConstraint,
|
|
19
20
|
PslModel,
|
|
20
21
|
PslModelAttribute,
|
|
21
22
|
PslNamedTypeDeclaration,
|
|
22
23
|
PslPosition,
|
|
24
|
+
PslReferentialAction,
|
|
23
25
|
PslSpan,
|
|
24
26
|
PslTypesBlock,
|
|
27
|
+
PslUniqueConstraint,
|
|
25
28
|
} from '../types';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"parser-WO_S8bEb.d.mts","names":[],"sources":["../src/parser.ts"],"sourcesContent":[],"mappings":";;;iBAgDgB,gBAAA,QAAwB,wBAAwB"}
|
|
@@ -1 +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