@zenstackhq/language 3.3.2 → 3.4.0-beta.1
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/dist/factory.cjs +2087 -0
- package/dist/factory.cjs.map +1 -0
- package/dist/factory.d.cts +284 -0
- package/dist/factory.d.ts +284 -0
- package/dist/factory.js +2020 -0
- package/dist/factory.js.map +1 -0
- package/dist/index.cjs +47 -14
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +22 -18
- package/dist/index.d.ts +22 -18
- package/dist/index.js +47 -14
- package/dist/index.js.map +1 -1
- package/package.json +15 -5
- package/res/stdlib.zmodel +24 -3
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zenstackhq/language",
|
|
3
3
|
"description": "ZenStack ZModel language specification",
|
|
4
|
-
"version": "3.
|
|
4
|
+
"version": "3.4.0-beta.1",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "ZenStack Team",
|
|
7
7
|
"files": [
|
|
@@ -40,6 +40,16 @@
|
|
|
40
40
|
"default": "./dist/utils.cjs"
|
|
41
41
|
}
|
|
42
42
|
},
|
|
43
|
+
"./factory": {
|
|
44
|
+
"import": {
|
|
45
|
+
"types": "./dist/factory.d.ts",
|
|
46
|
+
"default": "./dist/factory.js"
|
|
47
|
+
},
|
|
48
|
+
"require": {
|
|
49
|
+
"types": "./dist/factory.d.cts",
|
|
50
|
+
"default": "./dist/factory.cjs"
|
|
51
|
+
}
|
|
52
|
+
},
|
|
43
53
|
"./package.json": {
|
|
44
54
|
"import": "./package.json",
|
|
45
55
|
"require": "./package.json"
|
|
@@ -50,7 +60,7 @@
|
|
|
50
60
|
"pluralize": "^8.0.0",
|
|
51
61
|
"ts-pattern": "^5.7.1",
|
|
52
62
|
"vscode-languageserver": "^9.0.1",
|
|
53
|
-
"@zenstackhq/common-helpers": "3.
|
|
63
|
+
"@zenstackhq/common-helpers": "3.4.0-beta.1"
|
|
54
64
|
},
|
|
55
65
|
"devDependencies": {
|
|
56
66
|
"@types/pluralize": "^0.0.33",
|
|
@@ -58,9 +68,9 @@
|
|
|
58
68
|
"glob": "^11.1.0",
|
|
59
69
|
"langium-cli": "3.5.0",
|
|
60
70
|
"tmp": "^0.2.3",
|
|
61
|
-
"@zenstackhq/
|
|
62
|
-
"@zenstackhq/typescript-config": "3.
|
|
63
|
-
"@zenstackhq/
|
|
71
|
+
"@zenstackhq/vitest-config": "3.4.0-beta.1",
|
|
72
|
+
"@zenstackhq/typescript-config": "3.4.0-beta.1",
|
|
73
|
+
"@zenstackhq/eslint-config": "3.4.0-beta.1"
|
|
64
74
|
},
|
|
65
75
|
"scripts": {
|
|
66
76
|
"build": "pnpm langium:generate && tsc --noEmit && tsup-node",
|
package/res/stdlib.zmodel
CHANGED
|
@@ -120,7 +120,7 @@ function dbgenerated(expr: String?): Any {
|
|
|
120
120
|
/**
|
|
121
121
|
* Checks if the field value contains the search string. By default, the search is case-sensitive, and
|
|
122
122
|
* "LIKE" operator is used to match. If `caseInSensitive` is true, "ILIKE" operator is used if
|
|
123
|
-
* supported, otherwise it still falls back to "LIKE" and delivers whatever the database's
|
|
123
|
+
* supported, otherwise it still falls back to "LIKE" and delivers whatever the database's
|
|
124
124
|
* behavior is.
|
|
125
125
|
*/
|
|
126
126
|
function contains(field: String, search: String, caseInSensitive: Boolean?): Boolean {
|
|
@@ -135,7 +135,7 @@ function contains(field: String, search: String, caseInSensitive: Boolean?): Boo
|
|
|
135
135
|
/**
|
|
136
136
|
* Checks the field value starts with the search string. By default, the search is case-sensitive, and
|
|
137
137
|
* "LIKE" operator is used to match. If `caseInSensitive` is true, "ILIKE" operator is used if
|
|
138
|
-
* supported, otherwise it still falls back to "LIKE" and delivers whatever the database's
|
|
138
|
+
* supported, otherwise it still falls back to "LIKE" and delivers whatever the database's
|
|
139
139
|
* behavior is.
|
|
140
140
|
*/
|
|
141
141
|
function startsWith(field: String, search: String, caseInSensitive: Boolean?): Boolean {
|
|
@@ -144,7 +144,7 @@ function startsWith(field: String, search: String, caseInSensitive: Boolean?): B
|
|
|
144
144
|
/**
|
|
145
145
|
* Checks if the field value ends with the search string. By default, the search is case-sensitive, and
|
|
146
146
|
* "LIKE" operator is used to match. If `caseInSensitive` is true, "ILIKE" operator is used if
|
|
147
|
-
* supported, otherwise it still falls back to "LIKE" and delivers whatever the database's
|
|
147
|
+
* supported, otherwise it still falls back to "LIKE" and delivers whatever the database's
|
|
148
148
|
* behavior is.
|
|
149
149
|
*/
|
|
150
150
|
function endsWith(field: String, search: String, caseInSensitive: Boolean?): Boolean {
|
|
@@ -426,6 +426,9 @@ attribute @db.Uuid() @@@targetField([StringField]) @@@prisma
|
|
|
426
426
|
attribute @db.Xml() @@@targetField([StringField]) @@@prisma
|
|
427
427
|
attribute @db.Inet() @@@targetField([StringField]) @@@prisma
|
|
428
428
|
attribute @db.Citext() @@@targetField([StringField]) @@@prisma
|
|
429
|
+
attribute @db.TinyText() @@@targetField([StringField]) @@@prisma
|
|
430
|
+
attribute @db.MediumText() @@@targetField([StringField]) @@@prisma
|
|
431
|
+
attribute @db.LongText() @@@targetField([StringField]) @@@prisma
|
|
429
432
|
|
|
430
433
|
// Boolean type modifiers
|
|
431
434
|
|
|
@@ -437,16 +440,26 @@ attribute @db.Int() @@@targetField([IntField]) @@@prisma
|
|
|
437
440
|
attribute @db.Integer() @@@targetField([IntField]) @@@prisma
|
|
438
441
|
attribute @db.SmallInt() @@@targetField([IntField]) @@@prisma
|
|
439
442
|
attribute @db.Oid() @@@targetField([IntField]) @@@prisma
|
|
443
|
+
attribute @db.UnsignedInt() @@@targetField([IntField]) @@@prisma
|
|
444
|
+
attribute @db.UnsignedSmallInt() @@@targetField([IntField]) @@@prisma
|
|
445
|
+
attribute @db.MediumInt() @@@targetField([IntField]) @@@prisma
|
|
446
|
+
attribute @db.UnsignedMediumInt() @@@targetField([IntField]) @@@prisma
|
|
447
|
+
attribute @db.TinyInt(_ length: Int?) @@@targetField([IntField]) @@@prisma
|
|
448
|
+
attribute @db.UnsignedTinyInt(_ length: Int?) @@@targetField([IntField]) @@@prisma
|
|
449
|
+
attribute @db.Year() @@@targetField([IntField]) @@@prisma
|
|
440
450
|
|
|
441
451
|
// BigInt type modifiers
|
|
442
452
|
|
|
443
453
|
attribute @db.BigInt() @@@targetField([BigIntField]) @@@prisma
|
|
454
|
+
attribute @db.UnsignedBigInt() @@@targetField([BigIntField]) @@@prisma
|
|
444
455
|
|
|
445
456
|
// Float/Decimal type modifiers
|
|
446
457
|
attribute @db.DoublePrecision() @@@targetField([FloatField, DecimalField]) @@@prisma
|
|
447
458
|
attribute @db.Real() @@@targetField([FloatField, DecimalField]) @@@prisma
|
|
448
459
|
attribute @db.Decimal(_ p: Int?, _ s: Int?) @@@targetField([FloatField, DecimalField]) @@@prisma
|
|
449
460
|
attribute @db.Money() @@@targetField([FloatField, DecimalField]) @@@prisma
|
|
461
|
+
attribute @db.Float() @@@targetField([FloatField]) @@@prisma
|
|
462
|
+
attribute @db.Double() @@@targetField([FloatField]) @@@prisma
|
|
450
463
|
|
|
451
464
|
// DateTime type modifiers
|
|
452
465
|
|
|
@@ -455,6 +468,8 @@ attribute @db.Timestamptz(_ x: Int?) @@@targetField([DateTimeField]) @@@prisma
|
|
|
455
468
|
attribute @db.Date() @@@targetField([DateTimeField]) @@@prisma
|
|
456
469
|
attribute @db.Time(_ x: Int?) @@@targetField([DateTimeField]) @@@prisma
|
|
457
470
|
attribute @db.Timetz(_ x: Int?) @@@targetField([DateTimeField]) @@@prisma
|
|
471
|
+
attribute @db.DateTime(_ x: Int?) @@@targetField([DateTimeField]) @@@prisma
|
|
472
|
+
|
|
458
473
|
|
|
459
474
|
// Json type modifiers
|
|
460
475
|
|
|
@@ -464,6 +479,12 @@ attribute @db.JsonB() @@@targetField([JsonField]) @@@prisma
|
|
|
464
479
|
// Bytes type modifiers
|
|
465
480
|
|
|
466
481
|
attribute @db.ByteA() @@@targetField([BytesField]) @@@prisma
|
|
482
|
+
attribute @db.LongBlob() @@@targetField([BytesField]) @@@prisma
|
|
483
|
+
attribute @db.Binary(_ n: Int?) @@@targetField([BytesField]) @@@prisma
|
|
484
|
+
attribute @db.VarBinary(_ n: Int?) @@@targetField([BytesField]) @@@prisma
|
|
485
|
+
attribute @db.TinyBlob() @@@targetField([BytesField]) @@@prisma
|
|
486
|
+
attribute @db.Blob() @@@targetField([BytesField]) @@@prisma
|
|
487
|
+
attribute @db.MediumBlob() @@@targetField([BytesField]) @@@prisma
|
|
467
488
|
|
|
468
489
|
/**
|
|
469
490
|
* Specifies the schema to use in a multi-schema PostgreSQL database.
|