@dbml/parse 10.1.1 → 10.2.0
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/dbml-parse.js +17 -17
- package/dist/dbml-parse.mjs +666 -635
- package/dist/src/core/local_modules/records/validate.d.ts +4 -1
- package/dist/src/core/types/errors.d.ts +10 -7
- package/dist/src/core/types/keywords.d.ts +2 -1
- package/dist/src/core/types/schemaJson/types.d.ts +1 -0
- package/dist/src/core/types/symbol/metadata.d.ts +1 -0
- package/dist/src/index.d.ts +1 -1
- package/package.json +2 -2
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { default as Compiler } from '../../../compiler';
|
|
2
2
|
import { CompileError } from '../../types/errors';
|
|
3
|
-
import { BlockExpressionNode, ElementDeclarationNode, FunctionApplicationNode } from '../../types/nodes';
|
|
3
|
+
import { BlockExpressionNode, ElementDeclarationNode, FunctionApplicationNode, ListExpressionNode } from '../../types/nodes';
|
|
4
|
+
import { default as Report } from '../../types/report';
|
|
5
|
+
import { Settings } from '../../utils/validate';
|
|
4
6
|
export default class RecordsValidator {
|
|
5
7
|
private declarationNode;
|
|
6
8
|
private compiler;
|
|
@@ -18,3 +20,4 @@ export default class RecordsValidator {
|
|
|
18
20
|
private isValidRecordValue;
|
|
19
21
|
private validateSubElements;
|
|
20
22
|
}
|
|
23
|
+
export declare function validateRecordsSettings(settingList?: ListExpressionNode): Report<Settings>;
|
|
@@ -102,13 +102,16 @@ export declare enum CompileErrorCode {
|
|
|
102
102
|
INVALID_RECORDS_FIELD = 3084,
|
|
103
103
|
DUPLICATE_COLUMN_REFERENCES_IN_RECORDS = 3085,
|
|
104
104
|
DUPLICATE_RECORDS_FOR_TABLE = 3086,
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
105
|
+
UNKNOWN_RECORDS_SETTING = 3087,
|
|
106
|
+
DUPLICATE_RECORDS_SETTING = 3088,
|
|
107
|
+
INVALID_RECORDS_SETTING_VALUE = 3089,
|
|
108
|
+
INVALID_USE_CONTEXT = 3090,
|
|
109
|
+
INVALID_USE_SPECIFIER_KIND = 3091,
|
|
110
|
+
INVALID_USE_SPECIFIER_NAME = 3092,
|
|
111
|
+
INVALID_DIAGRAMVIEW_CONTEXT = 3093,
|
|
112
|
+
DUPLICATE_DIAGRAMVIEW_NAME = 3094,
|
|
113
|
+
INVALID_DIAGRAMVIEW_FIELD = 3095,
|
|
114
|
+
DUPLICATE_DIAGRAMVIEW_FIELD = 3096,
|
|
112
115
|
BINDING_ERROR = 4000,
|
|
113
116
|
NONEXISTENT_MODULE = 4001,
|
|
114
117
|
UNSUPPORTED = 5000,
|
|
@@ -105,6 +105,7 @@ export declare class RecordsMetadata extends NodeMetadata {
|
|
|
105
105
|
readonly kind = MetadataKind.Records;
|
|
106
106
|
constructor(declaration: SyntaxNode);
|
|
107
107
|
table(compiler: Compiler): TableSymbol | undefined;
|
|
108
|
+
example(compiler: Compiler): boolean;
|
|
108
109
|
owners(compiler: Compiler): NodeSymbol[];
|
|
109
110
|
}
|
|
110
111
|
export declare class MetadataElementMetadata extends NodeMetadata {
|
package/dist/src/index.d.ts
CHANGED
|
@@ -15,7 +15,7 @@ export { type Database, type MasterDatabase, type Table, type Note, type Column,
|
|
|
15
15
|
export { type RelationCardinality, type RelationshipOp, getRelationshipOp, getMultiplicities, parseCardinality, makeCardinalityRequired, makeCardinalityOptional, makeRelationshipRequired, isEndpointOneSide, isEndpointManySide, isEndpointOptional, isEndpointRequired, CARDINALITY_ONE, CARDINALITY_MAYBE, CARDINALITY_SOME, CARDINALITY_MANY, } from './core/types/relation';
|
|
16
16
|
export type { DiagramViewSyncOperation, DiagramViewBlock, TextEdit, } from './compiler/queries/transform';
|
|
17
17
|
export { findDiagramViewBlocks } from './compiler/queries/transform';
|
|
18
|
-
export type { DepSyncOperation, DepSyncEdge, DepEndpointRef
|
|
18
|
+
export type { DepSyncOperation, DepSyncEdge, DepEndpointRef } from './compiler/queries/transform';
|
|
19
19
|
export type { ElementIdentifier, SchemaIdentifier, TableIdentifier, ColumnIdentifier, EnumIdentifier, EndpointRef, RefIdentifier, DepIdentifier, NoteIdentifier, TableGroupIdentifier, } from './compiler/queries/transform';
|
|
20
20
|
export { dbmlLanguageConfig, dbmlMonarchTokensProvider, } from './services/monarch';
|
|
21
21
|
export * from './compiler/projectLayout/layout';
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json.schemastore.org/package",
|
|
3
3
|
"name": "@dbml/parse",
|
|
4
|
-
"version": "10.
|
|
4
|
+
"version": "10.2.0",
|
|
5
5
|
"description": "DBML parser v2",
|
|
6
6
|
"author": "Holistics <dev@holistics.io>",
|
|
7
7
|
"license": "Apache-2.0",
|
|
@@ -51,5 +51,5 @@
|
|
|
51
51
|
"engines": {
|
|
52
52
|
"node": ">=18"
|
|
53
53
|
},
|
|
54
|
-
"gitHead": "
|
|
54
|
+
"gitHead": "c0844906edf50438efe35207712d1c06eac53ef0"
|
|
55
55
|
}
|