zenstack 0.1.46 → 0.1.47

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 (36) hide show
  1. package/out/generator/prisma/expression-writer.js +2 -2
  2. package/out/generator/prisma/expression-writer.js.map +1 -1
  3. package/out/generator/prisma/prisma-builder.js +2 -2
  4. package/out/generator/prisma/prisma-builder.js.map +1 -1
  5. package/out/generator/prisma/query-gard-generator.js +1 -1
  6. package/out/generator/prisma/query-gard-generator.js.map +1 -1
  7. package/out/generator/prisma/schema-generator.js +4 -16
  8. package/out/generator/prisma/schema-generator.js.map +1 -1
  9. package/out/generator/utils.js +1 -1
  10. package/out/generator/utils.js.map +1 -1
  11. package/out/langium-ext.js +3 -0
  12. package/out/langium-ext.js.map +1 -0
  13. package/out/language-server/generated/ast.js +4 -1
  14. package/out/language-server/generated/ast.js.map +1 -1
  15. package/out/language-server/generated/grammar.js +259 -76
  16. package/out/language-server/generated/grammar.js.map +1 -1
  17. package/out/language-server/langium-ext.js +3 -0
  18. package/out/language-server/langium-ext.js.map +1 -0
  19. package/out/language-server/stdlib.zmodel +17 -19
  20. package/out/language-server/validator/attribute-validator copy.js +12 -0
  21. package/out/language-server/validator/attribute-validator copy.js.map +1 -0
  22. package/out/language-server/validator/attribute-validator.js +7 -0
  23. package/out/language-server/validator/attribute-validator.js.map +1 -0
  24. package/out/language-server/validator/datamodel-validator.js +159 -1
  25. package/out/language-server/validator/datamodel-validator.js.map +1 -1
  26. package/out/language-server/validator/enum-validator.js +10 -0
  27. package/out/language-server/validator/enum-validator.js.map +1 -0
  28. package/out/language-server/validator/utils.js +77 -1
  29. package/out/language-server/validator/utils.js.map +1 -1
  30. package/out/language-server/validator/zmodel-validator.js +10 -0
  31. package/out/language-server/validator/zmodel-validator.js.map +1 -1
  32. package/out/language-server/zmodel-linker.js +15 -7
  33. package/out/language-server/zmodel-linker.js.map +1 -1
  34. package/out/language-server/zmodel-module.js +0 -4
  35. package/out/language-server/zmodel-module.js.map +1 -1
  36. package/package.json +4 -2
@@ -1269,11 +1269,16 @@ const ZModelGrammar = () => loadedZModelGrammar !== null && loadedZModelGrammar
1269
1269
  "$type": "Alternatives",
1270
1270
  "elements": [
1271
1271
  {
1272
- "$type": "RuleCall",
1273
- "rule": {
1274
- "$refText": "BuiltinType"
1275
- },
1276
- "arguments": []
1272
+ "$type": "Assignment",
1273
+ "feature": "type",
1274
+ "operator": "=",
1275
+ "terminal": {
1276
+ "$type": "RuleCall",
1277
+ "rule": {
1278
+ "$refText": "BuiltinType"
1279
+ },
1280
+ "arguments": []
1281
+ }
1277
1282
  },
1278
1283
  {
1279
1284
  "$type": "Assignment",
@@ -1469,6 +1474,10 @@ const ZModelGrammar = () => loadedZModelGrammar !== null && loadedZModelGrammar
1469
1474
  "$type": "Keyword",
1470
1475
  "value": ")"
1471
1476
  },
1477
+ {
1478
+ "$type": "Keyword",
1479
+ "value": ":"
1480
+ },
1472
1481
  {
1473
1482
  "$type": "Assignment",
1474
1483
  "feature": "returnType",
@@ -1529,6 +1538,10 @@ const ZModelGrammar = () => loadedZModelGrammar !== null && loadedZModelGrammar
1529
1538
  "arguments": []
1530
1539
  }
1531
1540
  },
1541
+ {
1542
+ "$type": "Keyword",
1543
+ "value": ":"
1544
+ },
1532
1545
  {
1533
1546
  "$type": "Assignment",
1534
1547
  "feature": "type",
@@ -1560,11 +1573,16 @@ const ZModelGrammar = () => loadedZModelGrammar !== null && loadedZModelGrammar
1560
1573
  "$type": "Alternatives",
1561
1574
  "elements": [
1562
1575
  {
1563
- "$type": "RuleCall",
1564
- "rule": {
1565
- "$refText": "BuiltinType"
1566
- },
1567
- "arguments": []
1576
+ "$type": "Assignment",
1577
+ "feature": "type",
1578
+ "operator": "=",
1579
+ "terminal": {
1580
+ "$type": "RuleCall",
1581
+ "rule": {
1582
+ "$refText": "ExpressionType"
1583
+ },
1584
+ "arguments": []
1585
+ }
1568
1586
  },
1569
1587
  {
1570
1588
  "$type": "Assignment",
@@ -1599,6 +1617,90 @@ const ZModelGrammar = () => loadedZModelGrammar !== null && loadedZModelGrammar
1599
1617
  "parameters": [],
1600
1618
  "wildcard": false
1601
1619
  },
1620
+ {
1621
+ "$type": "ParserRule",
1622
+ "name": "DataModelAttributeName",
1623
+ "dataType": "string",
1624
+ "definition": {
1625
+ "$type": "Group",
1626
+ "elements": [
1627
+ {
1628
+ "$type": "Keyword",
1629
+ "value": "@@"
1630
+ },
1631
+ {
1632
+ "$type": "RuleCall",
1633
+ "rule": {
1634
+ "$refText": "ID"
1635
+ },
1636
+ "arguments": []
1637
+ }
1638
+ ]
1639
+ },
1640
+ "definesHiddenTokens": false,
1641
+ "entry": false,
1642
+ "fragment": false,
1643
+ "hiddenTokens": [],
1644
+ "parameters": [],
1645
+ "wildcard": false
1646
+ },
1647
+ {
1648
+ "$type": "ParserRule",
1649
+ "name": "DataModelFieldAttributeName",
1650
+ "dataType": "string",
1651
+ "definition": {
1652
+ "$type": "Group",
1653
+ "elements": [
1654
+ {
1655
+ "$type": "Keyword",
1656
+ "value": "@"
1657
+ },
1658
+ {
1659
+ "$type": "RuleCall",
1660
+ "rule": {
1661
+ "$refText": "ID"
1662
+ },
1663
+ "arguments": []
1664
+ }
1665
+ ]
1666
+ },
1667
+ "definesHiddenTokens": false,
1668
+ "entry": false,
1669
+ "fragment": false,
1670
+ "hiddenTokens": [],
1671
+ "parameters": [],
1672
+ "wildcard": false
1673
+ },
1674
+ {
1675
+ "$type": "ParserRule",
1676
+ "name": "AttributeName",
1677
+ "dataType": "string",
1678
+ "definition": {
1679
+ "$type": "Alternatives",
1680
+ "elements": [
1681
+ {
1682
+ "$type": "RuleCall",
1683
+ "rule": {
1684
+ "$refText": "DataModelAttributeName"
1685
+ },
1686
+ "arguments": []
1687
+ },
1688
+ {
1689
+ "$type": "RuleCall",
1690
+ "rule": {
1691
+ "$refText": "DataModelFieldAttributeName"
1692
+ },
1693
+ "arguments": []
1694
+ }
1695
+ ]
1696
+ },
1697
+ "definesHiddenTokens": false,
1698
+ "entry": false,
1699
+ "fragment": false,
1700
+ "hiddenTokens": [],
1701
+ "parameters": [],
1702
+ "wildcard": false
1703
+ },
1602
1704
  {
1603
1705
  "$type": "ParserRule",
1604
1706
  "name": "Attribute",
@@ -1616,7 +1718,7 @@ const ZModelGrammar = () => loadedZModelGrammar !== null && loadedZModelGrammar
1616
1718
  "terminal": {
1617
1719
  "$type": "RuleCall",
1618
1720
  "rule": {
1619
- "$refText": "ID"
1721
+ "$refText": "AttributeName"
1620
1722
  },
1621
1723
  "arguments": []
1622
1724
  }
@@ -1686,12 +1788,13 @@ const ZModelGrammar = () => loadedZModelGrammar !== null && loadedZModelGrammar
1686
1788
  "elements": [
1687
1789
  {
1688
1790
  "$type": "Assignment",
1689
- "feature": "positional",
1791
+ "feature": "default",
1690
1792
  "operator": "?=",
1691
1793
  "terminal": {
1692
1794
  "$type": "Keyword",
1693
1795
  "value": "_"
1694
- }
1796
+ },
1797
+ "cardinality": "?"
1695
1798
  },
1696
1799
  {
1697
1800
  "$type": "Assignment",
@@ -1705,6 +1808,10 @@ const ZModelGrammar = () => loadedZModelGrammar !== null && loadedZModelGrammar
1705
1808
  "arguments": []
1706
1809
  }
1707
1810
  },
1811
+ {
1812
+ "$type": "Keyword",
1813
+ "value": ":"
1814
+ },
1708
1815
  {
1709
1816
  "$type": "Assignment",
1710
1817
  "feature": "type",
@@ -1736,19 +1843,47 @@ const ZModelGrammar = () => loadedZModelGrammar !== null && loadedZModelGrammar
1736
1843
  "$type": "Alternatives",
1737
1844
  "elements": [
1738
1845
  {
1739
- "$type": "RuleCall",
1740
- "rule": {
1741
- "$refText": "BuiltinType"
1742
- },
1743
- "arguments": []
1846
+ "$type": "Assignment",
1847
+ "feature": "type",
1848
+ "operator": "=",
1849
+ "terminal": {
1850
+ "$type": "Alternatives",
1851
+ "elements": [
1852
+ {
1853
+ "$type": "RuleCall",
1854
+ "rule": {
1855
+ "$refText": "ExpressionType"
1856
+ },
1857
+ "arguments": []
1858
+ },
1859
+ {
1860
+ "$type": "Keyword",
1861
+ "value": "FieldReference"
1862
+ },
1863
+ {
1864
+ "$type": "Keyword",
1865
+ "value": "ContextType"
1866
+ }
1867
+ ]
1868
+ }
1744
1869
  },
1745
1870
  {
1746
1871
  "$type": "Assignment",
1747
- "feature": "type",
1872
+ "feature": "reference",
1748
1873
  "operator": "=",
1749
1874
  "terminal": {
1750
- "$type": "Keyword",
1751
- "value": "FieldReference"
1875
+ "$type": "CrossReference",
1876
+ "type": {
1877
+ "$refText": "TypeDeclaration"
1878
+ },
1879
+ "terminal": {
1880
+ "$type": "RuleCall",
1881
+ "rule": {
1882
+ "$refText": "ID"
1883
+ },
1884
+ "arguments": []
1885
+ },
1886
+ "deprecatedSyntax": false
1752
1887
  }
1753
1888
  }
1754
1889
  ]
@@ -1760,7 +1895,8 @@ const ZModelGrammar = () => loadedZModelGrammar !== null && loadedZModelGrammar
1760
1895
  "terminal": {
1761
1896
  "$type": "Keyword",
1762
1897
  "value": "[]"
1763
- }
1898
+ },
1899
+ "cardinality": "?"
1764
1900
  },
1765
1901
  {
1766
1902
  "$type": "Assignment",
@@ -1769,7 +1905,8 @@ const ZModelGrammar = () => loadedZModelGrammar !== null && loadedZModelGrammar
1769
1905
  "terminal": {
1770
1906
  "$type": "Keyword",
1771
1907
  "value": "?"
1772
- }
1908
+ },
1909
+ "cardinality": "?"
1773
1910
  }
1774
1911
  ]
1775
1912
  },
@@ -1786,10 +1923,6 @@ const ZModelGrammar = () => loadedZModelGrammar !== null && loadedZModelGrammar
1786
1923
  "definition": {
1787
1924
  "$type": "Group",
1788
1925
  "elements": [
1789
- {
1790
- "$type": "Keyword",
1791
- "value": "@"
1792
- },
1793
1926
  {
1794
1927
  "$type": "Assignment",
1795
1928
  "feature": "decl",
@@ -1799,6 +1932,13 @@ const ZModelGrammar = () => loadedZModelGrammar !== null && loadedZModelGrammar
1799
1932
  "type": {
1800
1933
  "$refText": "Attribute"
1801
1934
  },
1935
+ "terminal": {
1936
+ "$type": "RuleCall",
1937
+ "rule": {
1938
+ "$refText": "DataModelFieldAttributeName"
1939
+ },
1940
+ "arguments": []
1941
+ },
1802
1942
  "deprecatedSyntax": false
1803
1943
  }
1804
1944
  },
@@ -1839,10 +1979,6 @@ const ZModelGrammar = () => loadedZModelGrammar !== null && loadedZModelGrammar
1839
1979
  "definition": {
1840
1980
  "$type": "Group",
1841
1981
  "elements": [
1842
- {
1843
- "$type": "Keyword",
1844
- "value": "@@"
1845
- },
1846
1982
  {
1847
1983
  "$type": "Assignment",
1848
1984
  "feature": "decl",
@@ -1852,6 +1988,13 @@ const ZModelGrammar = () => loadedZModelGrammar !== null && loadedZModelGrammar
1852
1988
  "type": {
1853
1989
  "$refText": "Attribute"
1854
1990
  },
1991
+ "terminal": {
1992
+ "$type": "RuleCall",
1993
+ "rule": {
1994
+ "$refText": "DataModelAttributeName"
1995
+ },
1996
+ "arguments": []
1997
+ },
1855
1998
  "deprecatedSyntax": false
1856
1999
  }
1857
2000
  },
@@ -1984,58 +2127,98 @@ const ZModelGrammar = () => loadedZModelGrammar !== null && loadedZModelGrammar
1984
2127
  "parameters": [],
1985
2128
  "wildcard": false
1986
2129
  },
2130
+ {
2131
+ "$type": "ParserRule",
2132
+ "name": "ExpressionType",
2133
+ "dataType": "string",
2134
+ "definition": {
2135
+ "$type": "Alternatives",
2136
+ "elements": [
2137
+ {
2138
+ "$type": "Keyword",
2139
+ "value": "String"
2140
+ },
2141
+ {
2142
+ "$type": "Keyword",
2143
+ "value": "Int"
2144
+ },
2145
+ {
2146
+ "$type": "Keyword",
2147
+ "value": "Float"
2148
+ },
2149
+ {
2150
+ "$type": "Keyword",
2151
+ "value": "Boolean"
2152
+ },
2153
+ {
2154
+ "$type": "Keyword",
2155
+ "value": "DateTime"
2156
+ },
2157
+ {
2158
+ "$type": "Keyword",
2159
+ "value": "Null"
2160
+ },
2161
+ {
2162
+ "$type": "Keyword",
2163
+ "value": "Any"
2164
+ }
2165
+ ]
2166
+ },
2167
+ "definesHiddenTokens": false,
2168
+ "entry": false,
2169
+ "fragment": false,
2170
+ "hiddenTokens": [],
2171
+ "parameters": [],
2172
+ "wildcard": false
2173
+ },
1987
2174
  {
1988
2175
  "$type": "ParserRule",
1989
2176
  "name": "BuiltinType",
1990
- "fragment": true,
2177
+ "dataType": "string",
1991
2178
  "definition": {
1992
- "$type": "Assignment",
1993
- "feature": "type",
1994
- "operator": "=",
1995
- "terminal": {
1996
- "$type": "Alternatives",
1997
- "elements": [
1998
- {
1999
- "$type": "Keyword",
2000
- "value": "String"
2001
- },
2002
- {
2003
- "$type": "Keyword",
2004
- "value": "Boolean"
2005
- },
2006
- {
2007
- "$type": "Keyword",
2008
- "value": "Int"
2009
- },
2010
- {
2011
- "$type": "Keyword",
2012
- "value": "BigInt"
2013
- },
2014
- {
2015
- "$type": "Keyword",
2016
- "value": "Float"
2017
- },
2018
- {
2019
- "$type": "Keyword",
2020
- "value": "Decimal"
2021
- },
2022
- {
2023
- "$type": "Keyword",
2024
- "value": "DateTime"
2025
- },
2026
- {
2027
- "$type": "Keyword",
2028
- "value": "Json"
2029
- },
2030
- {
2031
- "$type": "Keyword",
2032
- "value": "Bytes"
2033
- }
2034
- ]
2035
- }
2179
+ "$type": "Alternatives",
2180
+ "elements": [
2181
+ {
2182
+ "$type": "Keyword",
2183
+ "value": "String"
2184
+ },
2185
+ {
2186
+ "$type": "Keyword",
2187
+ "value": "Boolean"
2188
+ },
2189
+ {
2190
+ "$type": "Keyword",
2191
+ "value": "Int"
2192
+ },
2193
+ {
2194
+ "$type": "Keyword",
2195
+ "value": "BigInt"
2196
+ },
2197
+ {
2198
+ "$type": "Keyword",
2199
+ "value": "Float"
2200
+ },
2201
+ {
2202
+ "$type": "Keyword",
2203
+ "value": "Decimal"
2204
+ },
2205
+ {
2206
+ "$type": "Keyword",
2207
+ "value": "DateTime"
2208
+ },
2209
+ {
2210
+ "$type": "Keyword",
2211
+ "value": "Json"
2212
+ },
2213
+ {
2214
+ "$type": "Keyword",
2215
+ "value": "Bytes"
2216
+ }
2217
+ ]
2036
2218
  },
2037
2219
  "definesHiddenTokens": false,
2038
2220
  "entry": false,
2221
+ "fragment": false,
2039
2222
  "hiddenTokens": [],
2040
2223
  "parameters": [],
2041
2224
  "wildcard": false
@@ -1 +1 @@
1
- {"version":3,"file":"grammar.js","sourceRoot":"","sources":["../../../src/language-server/generated/grammar.ts"],"names":[],"mappings":";AAAA;;;gFAGgF;;;AAEhF,qCAAuD;AAEvD,IAAI,mBAAwC,CAAC;AACtC,MAAM,aAAa,GAAG,GAAY,EAAE,CAAC,mBAAmB,aAAnB,mBAAmB,cAAnB,mBAAmB,GAAI,CAAC,mBAAmB,GAAG,IAAA,6BAAmB,EAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA40E5G,CAAC,CAAC,CAAC;AA50EQ,QAAA,aAAa,iBA40ErB"}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=langium-ext.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"langium-ext.js","sourceRoot":"","sources":["../../src/language-server/langium-ext.ts"],"names":[],"mappings":""}
@@ -1,25 +1,23 @@
1
- enum ReferentialIntegrity {
1
+ enum ReferentialAction {
2
2
  Cascade
3
3
  }
4
4
 
5
- function env() String {}
6
- function auth() User {}
7
- function now() DateTime {}
8
- function uuid() String {}
9
- function cuid() String {}
5
+ function env(): String {}
6
+ function auth(): User {}
7
+ function now(): DateTime {}
8
+ function uuid(): String {}
9
+ function cuid(): String {}
10
10
  function autoincrement() Int {}
11
11
 
12
- attribute id()
13
- attribute index()
14
- attribute relation()
15
- attribute default()
16
- attribute updatedAt()
17
- attribute unique()
18
- attribute map()
12
+ attribute @id(map: String?)
13
+ attribute @default(_ value: ContextType)
14
+ attribute @unique(map: String?)
15
+ attribute @@unique(_ fields: FieldReference[], name: String?, map: String?)
16
+ attribute @@index(_ fields: FieldReference[], map: String?)
17
+ attribute @relation(_ name: String?, fields: FieldReference[]?, references: FieldReference[]?, onDelete: ReferentialAction?, onUpdate: ReferentialAction?, map: String?)
18
+ attribute @map(_ name: String)
19
+ attribute @@map(_ name: String)
20
+ attribute @updatedAt()
19
21
 
20
- attribute allow()
21
- attribute deny()
22
-
23
- attribute email()
24
- attribute url()
25
- attribute length()
22
+ attribute @@allow(_ operation: String, _ condition: Boolean)
23
+ attribute @@deny(_ operation: String, _ condition: Boolean)
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ class AttributeValidator {
4
+ validate(attr, accept) {
5
+ const defaultParams = attr.params.filter((p) => p.default);
6
+ if (defaultParams.length > 1) {
7
+ accept('error', 'Attribute can declare at most one default parameter', { node: defaultParams[1] });
8
+ }
9
+ }
10
+ }
11
+ exports.default = AttributeValidator;
12
+ //# sourceMappingURL=attribute-validator%20copy.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"attribute-validator copy.js","sourceRoot":"","sources":["../../../src/language-server/validator/attribute-validator copy.ts"],"names":[],"mappings":";;AAIA,MAAqB,kBAAkB;IACnC,QAAQ,CAAC,IAAe,EAAE,MAA0B;QAChD,MAAM,aAAa,GAAG,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC;QAC3D,IAAI,aAAa,CAAC,MAAM,GAAG,CAAC,EAAE;YAC1B,MAAM,CACF,OAAO,EACP,qDAAqD,EACrD,EAAE,IAAI,EAAE,aAAa,CAAC,CAAC,CAAC,EAAE,CAC7B,CAAC;SACL;IACL,CAAC;CACJ;AAXD,qCAWC"}
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ class AttributeValidator {
4
+ validate(attr, accept) { }
5
+ }
6
+ exports.default = AttributeValidator;
7
+ //# sourceMappingURL=attribute-validator.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"attribute-validator.js","sourceRoot":"","sources":["../../../src/language-server/validator/attribute-validator.ts"],"names":[],"mappings":";;AAIA,MAAqB,kBAAkB;IACnC,QAAQ,CAAC,IAAe,EAAE,MAA0B,IAAG,CAAC;CAC3D;AAFD,qCAEC"}