zenstack 0.1.47 → 0.1.50
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/LICENSE.md +9 -0
- package/bin/cli +1 -1
- package/bundle/asset/logo-dark-256.png +0 -0
- package/bundle/asset/logo-dark.png +0 -0
- package/bundle/asset/logo-light-256.png +0 -0
- package/bundle/asset/logo-light.png +0 -0
- package/bundle/cli/index.js +6849 -0
- package/bundle/cli/index.js.map +7 -0
- package/bundle/extension.js +39 -0
- package/bundle/extension.js.map +7 -0
- package/bundle/language-server/main.js +6105 -0
- package/bundle/language-server/main.js.map +7 -0
- package/{out/generator → bundle/res}/package.template.json +0 -0
- package/bundle/res/stdlib.zmodel +101 -0
- package/{out/generator → bundle/res}/tsconfig.template.json +0 -0
- package/package.json +38 -14
- package/src/cli/cli-util.ts +71 -0
- package/src/cli/index.ts +182 -0
- package/src/extension.ts +76 -0
- package/src/generator/constants.ts +5 -0
- package/src/generator/index.ts +102 -0
- package/{out/generator/next-auth/index.js → src/generator/next-auth/index.ts} +49 -58
- package/src/generator/prisma/expression-writer.ts +360 -0
- package/src/generator/prisma/index.ts +35 -0
- package/src/generator/prisma/prisma-builder.ts +370 -0
- package/src/generator/prisma/query-gard-generator.ts +213 -0
- package/src/generator/prisma/schema-generator.ts +305 -0
- package/src/generator/prisma/typescript-expression-transformer.ts +108 -0
- package/src/generator/react-hooks/index.ts +184 -0
- package/src/generator/service/index.ts +110 -0
- package/src/generator/types.ts +17 -0
- package/src/generator/utils.ts +18 -0
- package/src/language-server/constants.ts +28 -0
- package/src/language-server/generated/ast.ts +616 -0
- package/{out/language-server/generated/grammar.js → src/language-server/generated/grammar.ts} +5 -8
- package/src/language-server/generated/module.ts +24 -0
- package/src/language-server/langium-ext.d.ts +10 -0
- package/src/language-server/lsp/zmodel-definition-provider.ts +87 -0
- package/src/language-server/main.ts +13 -0
- package/src/language-server/types.ts +25 -0
- package/src/language-server/validator/attribute-validator.ts +11 -0
- package/src/language-server/validator/datamodel-validator.ts +311 -0
- package/src/language-server/validator/datasource-validator.ts +102 -0
- package/src/language-server/validator/enum-validator.ts +14 -0
- package/src/language-server/validator/schema-validator.ts +31 -0
- package/src/language-server/validator/utils.ts +158 -0
- package/src/language-server/validator/zmodel-validator.ts +84 -0
- package/src/language-server/zmodel-linker.ts +446 -0
- package/src/language-server/zmodel-module.ts +136 -0
- package/src/language-server/zmodel-scope.ts +45 -0
- package/src/language-server/zmodel-workspace-manager.ts +23 -0
- package/src/language-server/zmodel.langium +197 -0
- package/{out/cli → src/res}/package.template.json +2 -3
- package/src/res/stdlib.zmodel +101 -0
- package/{out/cli → src/res}/tsconfig.template.json +1 -1
- package/src/utils/exec-utils.ts +8 -0
- package/src/utils/indent-string.ts +9 -0
- package/LICENSE +0 -21
- package/out/cli/cli-util.js +0 -64
- package/out/cli/cli-util.js.map +0 -1
- package/out/cli/generator.js +0 -1
- package/out/cli/generator.js.map +0 -1
- package/out/cli/index.js +0 -124
- package/out/cli/index.js.map +0 -1
- package/out/extension.js +0 -81
- package/out/extension.js.map +0 -1
- package/out/generator/constants.js +0 -9
- package/out/generator/constants.js.map +0 -1
- package/out/generator/data-server/index.js +0 -1
- package/out/generator/data-server/index.js.map +0 -1
- package/out/generator/index.js +0 -98
- package/out/generator/index.js.map +0 -1
- package/out/generator/next-auth/index.js.map +0 -1
- package/out/generator/prisma/expression-writer.js +0 -287
- package/out/generator/prisma/expression-writer.js.map +0 -1
- package/out/generator/prisma/index.js +0 -44
- package/out/generator/prisma/index.js.map +0 -1
- package/out/generator/prisma/plain-expression-builder.js +0 -69
- package/out/generator/prisma/plain-expression-builder.js.map +0 -1
- package/out/generator/prisma/prisma-builder.js +0 -307
- package/out/generator/prisma/prisma-builder.js.map +0 -1
- package/out/generator/prisma/query-gard-generator.js +0 -159
- package/out/generator/prisma/query-gard-generator.js.map +0 -1
- package/out/generator/prisma/schema-generator.js +0 -193
- package/out/generator/prisma/schema-generator.js.map +0 -1
- package/out/generator/query-guard/index.js +0 -2
- package/out/generator/query-guard/index.js.map +0 -1
- package/out/generator/react-hooks/index.js +0 -179
- package/out/generator/react-hooks/index.js.map +0 -1
- package/out/generator/server/data/data-generator.js +0 -376
- package/out/generator/server/data/data-generator.js.map +0 -1
- package/out/generator/server/data/expression-writer.js +0 -287
- package/out/generator/server/data/expression-writer.js.map +0 -1
- package/out/generator/server/data/plain-expression-builder.js +0 -69
- package/out/generator/server/data/plain-expression-builder.js.map +0 -1
- package/out/generator/server/data-generator.js +0 -82
- package/out/generator/server/data-generator.js.map +0 -1
- package/out/generator/server/expression-writer.js +0 -1
- package/out/generator/server/expression-writer.js.map +0 -1
- package/out/generator/server/function/function-generator.js +0 -50
- package/out/generator/server/function/function-generator.js.map +0 -1
- package/out/generator/server/function-generator.js +0 -13
- package/out/generator/server/function-generator.js.map +0 -1
- package/out/generator/server/index.js +0 -88
- package/out/generator/server/index.js.map +0 -1
- package/out/generator/server/js-expression-builder.js +0 -1
- package/out/generator/server/js-expression-builder.js.map +0 -1
- package/out/generator/server/plain-expression-builder.js +0 -1
- package/out/generator/server/plain-expression-builder.js.map +0 -1
- package/out/generator/server/server-code-generator.js +0 -3
- package/out/generator/server/server-code-generator.js.map +0 -1
- package/out/generator/server/server-code-writer.js +0 -1
- package/out/generator/server/server-code-writer.js.map +0 -1
- package/out/generator/service/index.js +0 -133
- package/out/generator/service/index.js.map +0 -1
- package/out/generator/types.js +0 -10
- package/out/generator/types.js.map +0 -1
- package/out/generator/utils.js +0 -10
- package/out/generator/utils.js.map +0 -1
- package/out/langium-ext.js +0 -3
- package/out/langium-ext.js.map +0 -1
- package/out/language-server/constants.js +0 -20
- package/out/language-server/constants.js.map +0 -1
- package/out/language-server/generated/ast.js +0 -390
- package/out/language-server/generated/ast.js.map +0 -1
- package/out/language-server/generated/grammar.js.map +0 -1
- package/out/language-server/generated/module.js +0 -23
- package/out/language-server/generated/module.js.map +0 -1
- package/out/language-server/langium-ext.js +0 -3
- package/out/language-server/langium-ext.js.map +0 -1
- package/out/language-server/main.js +0 -13
- package/out/language-server/main.js.map +0 -1
- package/out/language-server/stdlib.zmodel +0 -23
- package/out/language-server/types.js +0 -3
- package/out/language-server/types.js.map +0 -1
- package/out/language-server/validator/attribute-validator copy.js +0 -12
- package/out/language-server/validator/attribute-validator copy.js.map +0 -1
- package/out/language-server/validator/attribute-validator.js +0 -7
- package/out/language-server/validator/attribute-validator.js.map +0 -1
- package/out/language-server/validator/datamodel-validator.js +0 -199
- package/out/language-server/validator/datamodel-validator.js.map +0 -1
- package/out/language-server/validator/datasource-validator copy.js +0 -77
- package/out/language-server/validator/datasource-validator copy.js.map +0 -1
- package/out/language-server/validator/datasource-validator.js +0 -77
- package/out/language-server/validator/datasource-validator.js.map +0 -1
- package/out/language-server/validator/enum-validator.js +0 -10
- package/out/language-server/validator/enum-validator.js.map +0 -1
- package/out/language-server/validator/model-validator.js +0 -21
- package/out/language-server/validator/model-validator.js.map +0 -1
- package/out/language-server/validator/schema-validator.js +0 -21
- package/out/language-server/validator/schema-validator.js.map +0 -1
- package/out/language-server/validator/utils.js +0 -106
- package/out/language-server/validator/utils.js.map +0 -1
- package/out/language-server/validator/zmodel-validator.js +0 -52
- package/out/language-server/validator/zmodel-validator.js.map +0 -1
- package/out/language-server/zmodel-index.js +0 -11
- package/out/language-server/zmodel-index.js.map +0 -1
- package/out/language-server/zmodel-linker.js +0 -249
- package/out/language-server/zmodel-linker.js.map +0 -1
- package/out/language-server/zmodel-module.js +0 -46
- package/out/language-server/zmodel-module.js.map +0 -1
- package/out/language-server/zmodel-scope.js +0 -41
- package/out/language-server/zmodel-scope.js.map +0 -1
- package/out/language-server/zmodel-validator.js +0 -35
- package/out/language-server/zmodel-validator.js.map +0 -1
- package/out/utils/exec-utils.js +0 -9
- package/out/utils/exec-utils.js.map +0 -1
- package/out/utils/indent-string.js +0 -9
- package/out/utils/indent-string.js.map +0 -1
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
import {
|
|
2
|
+
createDefaultModule,
|
|
3
|
+
DefaultConfigurationProvider,
|
|
4
|
+
DefaultDocumentBuilder,
|
|
5
|
+
DefaultIndexManager,
|
|
6
|
+
DefaultLangiumDocumentFactory,
|
|
7
|
+
DefaultLangiumDocuments,
|
|
8
|
+
DefaultLanguageServer,
|
|
9
|
+
DefaultServiceRegistry,
|
|
10
|
+
DefaultSharedModuleContext,
|
|
11
|
+
DefaultTextDocumentFactory,
|
|
12
|
+
inject,
|
|
13
|
+
LangiumDefaultSharedServices,
|
|
14
|
+
LangiumServices,
|
|
15
|
+
LangiumSharedServices,
|
|
16
|
+
Module,
|
|
17
|
+
MutexLock,
|
|
18
|
+
PartialLangiumServices,
|
|
19
|
+
} from 'langium';
|
|
20
|
+
import {
|
|
21
|
+
ZModelGeneratedModule,
|
|
22
|
+
ZModelGeneratedSharedModule,
|
|
23
|
+
} from './generated/module';
|
|
24
|
+
import { ZModelLinker } from './zmodel-linker';
|
|
25
|
+
import { ZModelScopeComputation } from './zmodel-scope';
|
|
26
|
+
import {
|
|
27
|
+
ZModelValidationRegistry,
|
|
28
|
+
ZModelValidator,
|
|
29
|
+
} from './validator/zmodel-validator';
|
|
30
|
+
import { TextDocuments } from 'vscode-languageserver';
|
|
31
|
+
import { TextDocument } from 'vscode-languageserver-textdocument';
|
|
32
|
+
import ZModelWorkspaceManager from './zmodel-workspace-manager';
|
|
33
|
+
import ZModelDefinitionProvider from './lsp/zmodel-definition-provider';
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* Declaration of custom services - add your own service classes here.
|
|
37
|
+
*/
|
|
38
|
+
export type ZModelAddedServices = {
|
|
39
|
+
validation: {
|
|
40
|
+
ZModelValidator: ZModelValidator;
|
|
41
|
+
};
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* Union of Langium default services and your custom services - use this as constructor parameter
|
|
46
|
+
* of custom service classes.
|
|
47
|
+
*/
|
|
48
|
+
export type ZModelServices = LangiumServices & ZModelAddedServices;
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* Dependency injection module that overrides Langium default services and contributes the
|
|
52
|
+
* declared custom services. The Langium defaults can be partially specified to override only
|
|
53
|
+
* selected services, while the custom services must be fully specified.
|
|
54
|
+
*/
|
|
55
|
+
export const ZModelModule: Module<
|
|
56
|
+
ZModelServices,
|
|
57
|
+
PartialLangiumServices & ZModelAddedServices
|
|
58
|
+
> = {
|
|
59
|
+
references: {
|
|
60
|
+
ScopeComputation: (services) => new ZModelScopeComputation(services),
|
|
61
|
+
Linker: (services) => new ZModelLinker(services),
|
|
62
|
+
},
|
|
63
|
+
validation: {
|
|
64
|
+
ValidationRegistry: (services) =>
|
|
65
|
+
new ZModelValidationRegistry(services),
|
|
66
|
+
ZModelValidator: () => new ZModelValidator(),
|
|
67
|
+
},
|
|
68
|
+
lsp: {
|
|
69
|
+
DefinitionProvider: (services) =>
|
|
70
|
+
new ZModelDefinitionProvider(services),
|
|
71
|
+
},
|
|
72
|
+
};
|
|
73
|
+
|
|
74
|
+
// this duplicates createDefaultSharedModule except that a custom WorkspaceManager is used
|
|
75
|
+
export function createSharedModule(
|
|
76
|
+
context: DefaultSharedModuleContext
|
|
77
|
+
): Module<LangiumSharedServices, LangiumDefaultSharedServices> {
|
|
78
|
+
return {
|
|
79
|
+
ServiceRegistry: () => new DefaultServiceRegistry(),
|
|
80
|
+
lsp: {
|
|
81
|
+
Connection: () => context.connection,
|
|
82
|
+
LanguageServer: (services) => new DefaultLanguageServer(services),
|
|
83
|
+
},
|
|
84
|
+
workspace: {
|
|
85
|
+
LangiumDocuments: (services) =>
|
|
86
|
+
new DefaultLangiumDocuments(services),
|
|
87
|
+
LangiumDocumentFactory: (services) =>
|
|
88
|
+
new DefaultLangiumDocumentFactory(services),
|
|
89
|
+
DocumentBuilder: (services) => new DefaultDocumentBuilder(services),
|
|
90
|
+
TextDocuments: () => new TextDocuments(TextDocument),
|
|
91
|
+
TextDocumentFactory: (services) =>
|
|
92
|
+
new DefaultTextDocumentFactory(services),
|
|
93
|
+
IndexManager: (services) => new DefaultIndexManager(services),
|
|
94
|
+
WorkspaceManager: (services) =>
|
|
95
|
+
new ZModelWorkspaceManager(services),
|
|
96
|
+
FileSystemProvider: (services) =>
|
|
97
|
+
context.fileSystemProvider(services),
|
|
98
|
+
MutexLock: () => new MutexLock(),
|
|
99
|
+
ConfigurationProvider: (services) =>
|
|
100
|
+
new DefaultConfigurationProvider(services),
|
|
101
|
+
},
|
|
102
|
+
};
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
/**
|
|
106
|
+
* Create the full set of services required by Langium.
|
|
107
|
+
*
|
|
108
|
+
* First inject the shared services by merging two modules:
|
|
109
|
+
* - Langium default shared services
|
|
110
|
+
* - Services generated by langium-cli
|
|
111
|
+
*
|
|
112
|
+
* Then inject the language-specific services by merging three modules:
|
|
113
|
+
* - Langium default language-specific services
|
|
114
|
+
* - Services generated by langium-cli
|
|
115
|
+
* - Services specified in this file
|
|
116
|
+
*
|
|
117
|
+
* @param context Optional module context with the LSP connection
|
|
118
|
+
* @returns An object wrapping the shared services and the language-specific services
|
|
119
|
+
*/
|
|
120
|
+
export function createZModelServices(context: DefaultSharedModuleContext): {
|
|
121
|
+
shared: LangiumSharedServices;
|
|
122
|
+
ZModel: ZModelServices;
|
|
123
|
+
} {
|
|
124
|
+
const shared = inject(
|
|
125
|
+
createSharedModule(context),
|
|
126
|
+
ZModelGeneratedSharedModule
|
|
127
|
+
);
|
|
128
|
+
|
|
129
|
+
const ZModel = inject(
|
|
130
|
+
createDefaultModule({ shared }),
|
|
131
|
+
ZModelGeneratedModule,
|
|
132
|
+
ZModelModule
|
|
133
|
+
);
|
|
134
|
+
shared.ServiceRegistry.register(ZModel);
|
|
135
|
+
return { shared, ZModel };
|
|
136
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import {
|
|
2
|
+
AstNode,
|
|
3
|
+
AstNodeDescription,
|
|
4
|
+
DefaultScopeComputation,
|
|
5
|
+
interruptAndCheck,
|
|
6
|
+
LangiumDocument,
|
|
7
|
+
LangiumServices,
|
|
8
|
+
streamAllContents,
|
|
9
|
+
} from 'langium';
|
|
10
|
+
import { CancellationToken } from 'vscode-jsonrpc';
|
|
11
|
+
import { isEnumField } from './generated/ast';
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Custom Langium ScopeComputation implementation which adds enum fields into global scope
|
|
15
|
+
*/
|
|
16
|
+
export class ZModelScopeComputation extends DefaultScopeComputation {
|
|
17
|
+
constructor(private readonly services: LangiumServices) {
|
|
18
|
+
super(services);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
async computeExports(
|
|
22
|
+
document: LangiumDocument<AstNode>,
|
|
23
|
+
cancelToken?: CancellationToken | undefined
|
|
24
|
+
): Promise<AstNodeDescription[]> {
|
|
25
|
+
const result = await super.computeExports(document, cancelToken);
|
|
26
|
+
|
|
27
|
+
// add enum fields so they can be globally resolved across modules
|
|
28
|
+
for (const node of streamAllContents(document.parseResult.value)) {
|
|
29
|
+
if (cancelToken) {
|
|
30
|
+
await interruptAndCheck(cancelToken);
|
|
31
|
+
}
|
|
32
|
+
if (isEnumField(node)) {
|
|
33
|
+
const desc =
|
|
34
|
+
this.services.workspace.AstNodeDescriptionProvider.createDescription(
|
|
35
|
+
node,
|
|
36
|
+
node.name,
|
|
37
|
+
document
|
|
38
|
+
);
|
|
39
|
+
result.push(desc);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
return result;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { DefaultWorkspaceManager, LangiumDocument } from 'langium';
|
|
2
|
+
import path from 'path';
|
|
3
|
+
import { WorkspaceFolder } from 'vscode-languageserver';
|
|
4
|
+
import { URI } from 'vscode-uri';
|
|
5
|
+
import { STD_LIB_MODULE_NAME } from './constants';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Custom Langium WorkspaceManager implementation which automatically loads stdlib.zmodel
|
|
9
|
+
*/
|
|
10
|
+
export default class ZModelWorkspaceManager extends DefaultWorkspaceManager {
|
|
11
|
+
protected async loadAdditionalDocuments(
|
|
12
|
+
_folders: WorkspaceFolder[],
|
|
13
|
+
_collector: (document: LangiumDocument) => void
|
|
14
|
+
): Promise<void> {
|
|
15
|
+
await super.loadAdditionalDocuments(_folders, _collector);
|
|
16
|
+
const stdLibUri = URI.file(
|
|
17
|
+
path.join(__dirname, '../res', STD_LIB_MODULE_NAME)
|
|
18
|
+
);
|
|
19
|
+
console.log(`Adding stdlib document from ${stdLibUri}`);
|
|
20
|
+
const stdlib = this.langiumDocuments.getOrCreateDocument(stdLibUri);
|
|
21
|
+
_collector(stdlib);
|
|
22
|
+
}
|
|
23
|
+
}
|
|
@@ -0,0 +1,197 @@
|
|
|
1
|
+
grammar ZModel
|
|
2
|
+
|
|
3
|
+
entry Model:
|
|
4
|
+
(
|
|
5
|
+
declarations+=AbstractDeclaration
|
|
6
|
+
)*;
|
|
7
|
+
|
|
8
|
+
AbstractDeclaration:
|
|
9
|
+
DataSource | DataModel | Enum | Function | Attribute;
|
|
10
|
+
|
|
11
|
+
// datasource
|
|
12
|
+
DataSource:
|
|
13
|
+
'datasource' name=ID '{' (fields+=DataSourceField)* '}';
|
|
14
|
+
|
|
15
|
+
DataSourceField:
|
|
16
|
+
(name=ID '=' value=(LiteralExpr|InvocationExpr));
|
|
17
|
+
|
|
18
|
+
// expression
|
|
19
|
+
Expression:
|
|
20
|
+
LogicalExpr;
|
|
21
|
+
|
|
22
|
+
LiteralExpr:
|
|
23
|
+
value=(BOOLEAN | NUMBER | STRING);
|
|
24
|
+
|
|
25
|
+
ArrayExpr:
|
|
26
|
+
'[' (items+=Expression (',' items+=Expression)*)? ']';
|
|
27
|
+
|
|
28
|
+
type ReferenceTarget = FunctionParam | DataModelField | EnumField;
|
|
29
|
+
|
|
30
|
+
ThisExpr:
|
|
31
|
+
value=THIS;
|
|
32
|
+
|
|
33
|
+
NullExpr:
|
|
34
|
+
value=NULL;
|
|
35
|
+
|
|
36
|
+
ReferenceExpr:
|
|
37
|
+
target=[ReferenceTarget:ID] ('(' ReferenceArgList ')')?;
|
|
38
|
+
|
|
39
|
+
fragment ReferenceArgList:
|
|
40
|
+
args+=ReferenceArg (',' args+=ReferenceArg)*;
|
|
41
|
+
|
|
42
|
+
ReferenceArg:
|
|
43
|
+
name=('sort') ':' value=('Asc'| 'Desc');
|
|
44
|
+
|
|
45
|
+
InvocationExpr:
|
|
46
|
+
function=[Function] '(' ArgumentList? ')';
|
|
47
|
+
|
|
48
|
+
UnaryExpr:
|
|
49
|
+
operator=('!') operand=Expression;
|
|
50
|
+
|
|
51
|
+
// binary operator precedence follow Javascript's rules:
|
|
52
|
+
// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Operator_Precedence#table
|
|
53
|
+
|
|
54
|
+
MemberAccessExpr infers Expression:
|
|
55
|
+
PrimaryExpr (
|
|
56
|
+
{infer MemberAccessExpr.operand=current}
|
|
57
|
+
('.' member=[DataModelField])
|
|
58
|
+
)*;
|
|
59
|
+
|
|
60
|
+
CollectionPredicateExpr infers Expression:
|
|
61
|
+
MemberAccessExpr (
|
|
62
|
+
{infer BinaryExpr.left=current}
|
|
63
|
+
operator=('?'|'!'|'^')
|
|
64
|
+
'[' right=Expression ']'
|
|
65
|
+
)*;
|
|
66
|
+
|
|
67
|
+
// TODO: support arithmetics?
|
|
68
|
+
//
|
|
69
|
+
// MultDivExpr infers Expression:
|
|
70
|
+
// CollectionPredicateExpr (
|
|
71
|
+
// {infer BinaryExpr.left=current}
|
|
72
|
+
// operator=('*'|'/')
|
|
73
|
+
// right=CollectionPredicateExpr
|
|
74
|
+
// )*;
|
|
75
|
+
|
|
76
|
+
// AddSubExpr infers Expression:
|
|
77
|
+
// MultDivExpr (
|
|
78
|
+
// {infer BinaryExpr.left=current}
|
|
79
|
+
// operator=('+'|'-')
|
|
80
|
+
// right=MultDivExpr
|
|
81
|
+
// )*;
|
|
82
|
+
|
|
83
|
+
ComparisonExpr infers Expression:
|
|
84
|
+
CollectionPredicateExpr (
|
|
85
|
+
{infer BinaryExpr.left=current}
|
|
86
|
+
operator=('>'|'<'|'>='|'<=')
|
|
87
|
+
right=CollectionPredicateExpr
|
|
88
|
+
)*;
|
|
89
|
+
|
|
90
|
+
EqualityExpr infers Expression:
|
|
91
|
+
ComparisonExpr (
|
|
92
|
+
{infer BinaryExpr.left=current}
|
|
93
|
+
operator=('=='|'!=')
|
|
94
|
+
right=ComparisonExpr
|
|
95
|
+
)*;
|
|
96
|
+
|
|
97
|
+
LogicalExpr infers Expression:
|
|
98
|
+
EqualityExpr (
|
|
99
|
+
{infer BinaryExpr.left=current}
|
|
100
|
+
operator=('&&'|'||')
|
|
101
|
+
right=EqualityExpr
|
|
102
|
+
)*;
|
|
103
|
+
|
|
104
|
+
PrimaryExpr infers Expression:
|
|
105
|
+
'(' Expression ')' |
|
|
106
|
+
ThisExpr |
|
|
107
|
+
NullExpr |
|
|
108
|
+
LiteralExpr |
|
|
109
|
+
InvocationExpr |
|
|
110
|
+
ArrayExpr|
|
|
111
|
+
ReferenceExpr |
|
|
112
|
+
UnaryExpr;
|
|
113
|
+
|
|
114
|
+
fragment ArgumentList:
|
|
115
|
+
args+=Argument (',' args+=Argument)*;
|
|
116
|
+
|
|
117
|
+
Argument:
|
|
118
|
+
(name=ID ':')? value=Expression;
|
|
119
|
+
|
|
120
|
+
// model
|
|
121
|
+
DataModel:
|
|
122
|
+
'model' name=ID '{' (
|
|
123
|
+
fields+=DataModelField
|
|
124
|
+
| attributes+=DataModelAttribute
|
|
125
|
+
)+
|
|
126
|
+
'}';
|
|
127
|
+
|
|
128
|
+
DataModelField:
|
|
129
|
+
name=ID type=DataModelFieldType (attributes+=DataModelFieldAttribute)*;
|
|
130
|
+
|
|
131
|
+
DataModelFieldType:
|
|
132
|
+
(type=BuiltinType | reference=[TypeDeclaration:ID]) (array?='[]')? (optional?='?')?;
|
|
133
|
+
|
|
134
|
+
// enum
|
|
135
|
+
Enum:
|
|
136
|
+
'enum' name=ID '{' (fields+=EnumField)+ '}';
|
|
137
|
+
|
|
138
|
+
EnumField:
|
|
139
|
+
name=ID;
|
|
140
|
+
|
|
141
|
+
// function
|
|
142
|
+
Function:
|
|
143
|
+
'function' name=ID '(' (params+=FunctionParam (',' params+=FunctionParam)*)? ')' ':' returnType=FunctionParamType '{' (expression=Expression)? '}';
|
|
144
|
+
|
|
145
|
+
FunctionParam:
|
|
146
|
+
name=ID ':' type=FunctionParamType;
|
|
147
|
+
|
|
148
|
+
FunctionParamType:
|
|
149
|
+
(type=ExpressionType | reference=[TypeDeclaration]) (array?='[]')?;
|
|
150
|
+
|
|
151
|
+
DataModelAttributeName returns string:
|
|
152
|
+
'@@' ID;
|
|
153
|
+
DataModelFieldAttributeName returns string:
|
|
154
|
+
'@' ID;
|
|
155
|
+
|
|
156
|
+
AttributeName returns string:
|
|
157
|
+
DataModelAttributeName | DataModelFieldAttributeName;
|
|
158
|
+
|
|
159
|
+
// attribute
|
|
160
|
+
Attribute:
|
|
161
|
+
'attribute' name=AttributeName '(' (params+=AttributeParam (',' params+=AttributeParam)*)? ')';
|
|
162
|
+
|
|
163
|
+
AttributeParam:
|
|
164
|
+
(default?='_')? name=ID ':' type=AttributeParamType;
|
|
165
|
+
|
|
166
|
+
AttributeParamType:
|
|
167
|
+
(type=(ExpressionType | 'FieldReference' | 'ContextType') | reference=[TypeDeclaration:ID]) (array?='[]')? (optional?='?')?;
|
|
168
|
+
|
|
169
|
+
type TypeDeclaration = DataModel | Enum;
|
|
170
|
+
|
|
171
|
+
DataModelFieldAttribute:
|
|
172
|
+
decl=[Attribute:DataModelFieldAttributeName] ('(' AttributeArgList? ')')?;
|
|
173
|
+
|
|
174
|
+
DataModelAttribute:
|
|
175
|
+
decl=[Attribute:DataModelAttributeName] ('(' AttributeArgList? ')')?;
|
|
176
|
+
|
|
177
|
+
fragment AttributeArgList:
|
|
178
|
+
args+=AttributeArg (',' args+=AttributeArg)*;
|
|
179
|
+
|
|
180
|
+
AttributeArg:
|
|
181
|
+
(name=ID ':')? value=Expression;
|
|
182
|
+
|
|
183
|
+
ExpressionType returns string:
|
|
184
|
+
'String' | 'Int' | 'Float' | 'Boolean' | 'DateTime' | 'Null' | 'Any';
|
|
185
|
+
|
|
186
|
+
BuiltinType returns string:
|
|
187
|
+
'String'|'Boolean'|'Int'|'BigInt'|'Float'|'Decimal'|'DateTime'|'Json'|'Bytes';
|
|
188
|
+
|
|
189
|
+
hidden terminal WS: /\s+/;
|
|
190
|
+
terminal BOOLEAN returns boolean: /true|false/;
|
|
191
|
+
terminal NULL: 'null';
|
|
192
|
+
terminal THIS: 'this';
|
|
193
|
+
terminal ID: /[_a-zA-Z][\w_]*/;
|
|
194
|
+
terminal STRING: /"[^"]*"|'[^']*'/;
|
|
195
|
+
terminal NUMBER returns number: /[+-]?[0-9]+(\.[0-9]+)?/;
|
|
196
|
+
hidden terminal ML_COMMENT: /\/\*[\s\S]*?\*\//;
|
|
197
|
+
hidden terminal SL_COMMENT: /\/\/[^\n\r]*/;
|
|
@@ -2,9 +2,8 @@
|
|
|
2
2
|
"name": ".zenstack",
|
|
3
3
|
"version": "1.0.0",
|
|
4
4
|
"description": "ZenStack generated code",
|
|
5
|
-
"main": "
|
|
6
|
-
"types": "
|
|
7
|
-
"files": ["lib"],
|
|
5
|
+
"main": "lib/index.js",
|
|
6
|
+
"types": "lib/index.d.ts",
|
|
8
7
|
"author": "ZenStack",
|
|
9
8
|
"license": "MIT"
|
|
10
9
|
}
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Enum representing referential integrity related actions
|
|
3
|
+
*/
|
|
4
|
+
enum ReferentialAction {
|
|
5
|
+
/*
|
|
6
|
+
* Used with "onDelete": deleting a referenced record will trigger the deletion of referencing record.
|
|
7
|
+
* Used with "onUpdate": updates the relation scalar fields if the referenced scalar fields of the dependent record are updated.
|
|
8
|
+
*/
|
|
9
|
+
Cascade
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
/*
|
|
13
|
+
* Reads value from an environment variable
|
|
14
|
+
*/
|
|
15
|
+
function env(name: String): String {}
|
|
16
|
+
|
|
17
|
+
/*
|
|
18
|
+
* Gets thec current login user
|
|
19
|
+
*/
|
|
20
|
+
function auth(): Any {}
|
|
21
|
+
|
|
22
|
+
/*
|
|
23
|
+
* Gets current date-time (as DateTime type)
|
|
24
|
+
*/
|
|
25
|
+
function now(): DateTime {}
|
|
26
|
+
|
|
27
|
+
/*
|
|
28
|
+
* Generate a globally unique identifier based on the UUID spec
|
|
29
|
+
*/
|
|
30
|
+
function uuid(): String {}
|
|
31
|
+
|
|
32
|
+
/*
|
|
33
|
+
* Generate a globally unique identifier based on the CUID spec
|
|
34
|
+
*/
|
|
35
|
+
function cuid(): String {}
|
|
36
|
+
|
|
37
|
+
/*
|
|
38
|
+
* Create a sequence of integers in the underlying database and assign the incremented
|
|
39
|
+
* values to the ID values of the created records based on the sequence
|
|
40
|
+
*/
|
|
41
|
+
function autoincrement(): Int {}
|
|
42
|
+
|
|
43
|
+
/*
|
|
44
|
+
* Represents default values that cannot be expressed in the Prisma schema (such as random()).
|
|
45
|
+
*/
|
|
46
|
+
function dbgenerated(expr: String): Any {}
|
|
47
|
+
|
|
48
|
+
/*
|
|
49
|
+
* Defines an ID on the model
|
|
50
|
+
*/
|
|
51
|
+
attribute @id(map: String?)
|
|
52
|
+
|
|
53
|
+
/*
|
|
54
|
+
* Defines a default value for a field
|
|
55
|
+
*/
|
|
56
|
+
attribute @default(_ value: ContextType)
|
|
57
|
+
|
|
58
|
+
/*
|
|
59
|
+
* Defines a unique constraint for this field
|
|
60
|
+
*/
|
|
61
|
+
attribute @unique(map: String?)
|
|
62
|
+
|
|
63
|
+
/*
|
|
64
|
+
* Defines a compound unique constraint for the specified fields
|
|
65
|
+
*/
|
|
66
|
+
attribute @@unique(_ fields: FieldReference[], name: String?, map: String?)
|
|
67
|
+
|
|
68
|
+
/*
|
|
69
|
+
* Defines an index in the database
|
|
70
|
+
*/
|
|
71
|
+
attribute @@index(_ fields: FieldReference[], map: String?)
|
|
72
|
+
|
|
73
|
+
/*
|
|
74
|
+
* Defines meta information about the relation
|
|
75
|
+
*/
|
|
76
|
+
attribute @relation(_ name: String?, fields: FieldReference[]?, references: FieldReference[]?, onDelete: ReferentialAction?, onUpdate: ReferentialAction?, map: String?)
|
|
77
|
+
|
|
78
|
+
/*
|
|
79
|
+
* Maps a field name or enum value from the schema to a column with a different name in the database
|
|
80
|
+
*/
|
|
81
|
+
attribute @map(_ name: String)
|
|
82
|
+
|
|
83
|
+
/*
|
|
84
|
+
* Maps the schema model name to a table with a different name, or an enum name to a different underlying enum in the database
|
|
85
|
+
*/
|
|
86
|
+
attribute @@map(_ name: String)
|
|
87
|
+
|
|
88
|
+
/*
|
|
89
|
+
* Automatically stores the time when a record was last updated
|
|
90
|
+
*/
|
|
91
|
+
attribute @updatedAt()
|
|
92
|
+
|
|
93
|
+
/*
|
|
94
|
+
* Defines an access policy that allows a set of operations when the given condition is true
|
|
95
|
+
*/
|
|
96
|
+
attribute @@allow(_ operation: String, _ condition: Boolean)
|
|
97
|
+
|
|
98
|
+
/*
|
|
99
|
+
* Defines an access policy that denies a set of operations when the given condition is true
|
|
100
|
+
*/
|
|
101
|
+
attribute @@deny(_ operation: String, _ condition: Boolean)
|
package/LICENSE
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2022 zenstack-hq
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|
package/out/cli/cli-util.js
DELETED
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
|
-
};
|
|
14
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
-
exports.extractDestinationAndName = exports.extractAstNode = exports.extractDocument = void 0;
|
|
16
|
-
const colors_1 = __importDefault(require("colors"));
|
|
17
|
-
const path_1 = __importDefault(require("path"));
|
|
18
|
-
const fs_1 = __importDefault(require("fs"));
|
|
19
|
-
const vscode_uri_1 = require("vscode-uri");
|
|
20
|
-
function extractDocument(fileName, services) {
|
|
21
|
-
var _a;
|
|
22
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
23
|
-
const extensions = services.LanguageMetaData.fileExtensions;
|
|
24
|
-
if (!extensions.includes(path_1.default.extname(fileName))) {
|
|
25
|
-
console.error(colors_1.default.yellow(`Please choose a file with extension: ${extensions}.`));
|
|
26
|
-
process.exit(1);
|
|
27
|
-
}
|
|
28
|
-
if (!fs_1.default.existsSync(fileName)) {
|
|
29
|
-
console.error(colors_1.default.red(`File ${fileName} does not exist.`));
|
|
30
|
-
process.exit(1);
|
|
31
|
-
}
|
|
32
|
-
const stdLib = services.shared.workspace.LangiumDocuments.getOrCreateDocument(vscode_uri_1.URI.file(path_1.default.join(__dirname, '../language-server/stdlib.zmodel')));
|
|
33
|
-
const document = services.shared.workspace.LangiumDocuments.getOrCreateDocument(vscode_uri_1.URI.file(path_1.default.resolve(fileName)));
|
|
34
|
-
yield services.shared.workspace.DocumentBuilder.build([stdLib, document], {
|
|
35
|
-
validationChecks: 'all',
|
|
36
|
-
});
|
|
37
|
-
const validationErrors = ((_a = document.diagnostics) !== null && _a !== void 0 ? _a : []).filter((e) => e.severity === 1);
|
|
38
|
-
if (validationErrors.length > 0) {
|
|
39
|
-
console.error(colors_1.default.red('There are validation errors:'));
|
|
40
|
-
for (const validationError of validationErrors) {
|
|
41
|
-
console.error(colors_1.default.red(`line ${validationError.range.start.line + 1}: ${validationError.message} [${document.textDocument.getText(validationError.range)}]`));
|
|
42
|
-
}
|
|
43
|
-
process.exit(1);
|
|
44
|
-
}
|
|
45
|
-
return document;
|
|
46
|
-
});
|
|
47
|
-
}
|
|
48
|
-
exports.extractDocument = extractDocument;
|
|
49
|
-
function extractAstNode(fileName, services) {
|
|
50
|
-
var _a;
|
|
51
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
52
|
-
return (_a = (yield extractDocument(fileName, services)).parseResult) === null || _a === void 0 ? void 0 : _a.value;
|
|
53
|
-
});
|
|
54
|
-
}
|
|
55
|
-
exports.extractAstNode = extractAstNode;
|
|
56
|
-
function extractDestinationAndName(filePath, destination) {
|
|
57
|
-
filePath = filePath.replace(/\..*$/, '').replace(/[.-]/g, '');
|
|
58
|
-
return {
|
|
59
|
-
destination: destination !== null && destination !== void 0 ? destination : path_1.default.join(path_1.default.dirname(filePath), 'generated'),
|
|
60
|
-
name: path_1.default.basename(filePath),
|
|
61
|
-
};
|
|
62
|
-
}
|
|
63
|
-
exports.extractDestinationAndName = extractDestinationAndName;
|
|
64
|
-
//# sourceMappingURL=cli-util.js.map
|
package/out/cli/cli-util.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"cli-util.js","sourceRoot":"","sources":["../../src/cli/cli-util.ts"],"names":[],"mappings":"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"}
|
package/out/cli/generator.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
'use strict';var __importDefault=this&&this.__importDefault||function(mod){return mod&&mod.__esModule?mod:{'default':mod};};Object.defineProperty(exports,'__esModule',{value:true});exports.generateJavaScript=void 0;const fs_1=__importDefault(require('fs'));const langium_1=require('langium');const path_1=__importDefault(require('path'));const cli_util_1=require('./cli-util');function generateJavaScript(model,filePath,destination){const data=(0,cli_util_1.extractDestinationAndName)(filePath,destination);const generatedFilePath=`${path_1.default.join(data.destination,data.name)}.js`;const fileNode=new langium_1.CompositeGeneratorNode();fileNode.append('"use strict";',langium_1.NL,langium_1.NL);if(!fs_1.default.existsSync(data.destination)){fs_1.default.mkdirSync(data.destination,{recursive:true});}fs_1.default.writeFileSync(generatedFilePath,(0,langium_1.processGeneratorNode)(fileNode));return generatedFilePath;}exports.generateJavaScript=generateJavaScript;
|
package/out/cli/generator.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"generator.js","sourceRoot":"","sources":["../../src/cli/generator.ts"],"names":[],"mappings":";;;;;;AAAA,4CAAoB;AACpB,qCAA2E;AAC3E,gDAAwB;AAExB,yCAAuD;AAEvD,SAAgB,kBAAkB,CAC9B,KAAY,EACZ,QAAgB,EAChB,WAA+B;IAE/B,MAAM,IAAI,GAAG,IAAA,oCAAyB,EAAC,QAAQ,EAAE,WAAW,CAAC,CAAC;IAC9D,MAAM,iBAAiB,GAAG,GAAG,cAAI,CAAC,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC;IAEzE,MAAM,QAAQ,GAAG,IAAI,gCAAsB,EAAE,CAAC;IAC9C,QAAQ,CAAC,MAAM,CAAC,eAAe,EAAE,YAAE,EAAE,YAAE,CAAC,CAAC;IACzC,oHAAoH;IAEpH,IAAI,CAAC,YAAE,CAAC,UAAU,CAAC,IAAI,CAAC,WAAW,CAAC,EAAE;QAClC,YAAE,CAAC,SAAS,CAAC,IAAI,CAAC,WAAW,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;KACvD;IACD,YAAE,CAAC,aAAa,CAAC,iBAAiB,EAAE,IAAA,8BAAoB,EAAC,QAAQ,CAAC,CAAC,CAAC;IACpE,OAAO,iBAAiB,CAAC;AAC7B,CAAC;AAjBD,gDAiBC"}
|