@dbml/parse 9.0.0-alpha.13 → 9.0.0-alpha.15
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 +18 -18
- package/dist/dbml-parse.mjs +975 -945
- package/dist/src/core/global_modules/dep/interpret.d.ts +0 -16
- package/dist/src/core/global_modules/program/interpret.d.ts +0 -2
- package/dist/src/core/global_modules/program/utils/dep.d.ts +4 -0
- package/dist/src/core/global_modules/program/utils/external.d.ts +3 -0
- package/dist/src/core/global_modules/program/utils/index.d.ts +3 -0
- package/dist/src/core/global_modules/program/utils/records.d.ts +6 -0
- package/dist/src/core/types/errors.d.ts +5 -3
- package/package.json +2 -2
- package/dist/src/core/global_modules/program/utils.d.ts +0 -3
|
@@ -12,22 +12,6 @@ export declare class DepInterpreter {
|
|
|
12
12
|
interpret(): Report<Dep>;
|
|
13
13
|
private interpretName;
|
|
14
14
|
private interpretEdges;
|
|
15
|
-
/**
|
|
16
|
-
* Read settings into `dep.note` and `dep.metadata`.
|
|
17
|
-
*
|
|
18
|
-
* Settings come from THREE sources, in this order:
|
|
19
|
-
* 1. The top-level attribute list on the Dep header
|
|
20
|
-
* (e.g. `Dep my_block [color: 'blue'] { ... }`).
|
|
21
|
-
* 2. Per-field setting lists inside the body
|
|
22
|
-
* (e.g. `Dep { a -> b [note: 'x'] }`).
|
|
23
|
-
* 3. Sub-element declarations inside the body
|
|
24
|
-
* (e.g. `Dep { a -> b; note: 'x'; materialized: 'view' }`).
|
|
25
|
-
*
|
|
26
|
-
* All three sources write into the same `metadata` object (with `note`
|
|
27
|
-
* routed to the typed slot instead). Precedence is last-write-wins by
|
|
28
|
-
* virtue of plain object assignment — settings later in the source
|
|
29
|
-
* file overwrite earlier ones with the same key.
|
|
30
|
-
*/
|
|
31
15
|
private interpretSettings;
|
|
32
16
|
private consumeSettings;
|
|
33
17
|
private extractAttrValue;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { CompileError } from '../../../types/errors';
|
|
2
|
+
import { Dep } from '../../../types/schemaJson';
|
|
3
|
+
import { NodeMetadata } from '../../../types/symbol/metadata';
|
|
4
|
+
export declare function validateDepBlocks(dep: Dep, meta: NodeMetadata, seenDownstream: Map<string, boolean>): CompileError[];
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { default as Compiler } from '../../../../compiler/index';
|
|
2
|
+
import { CompileWarning } from '../../../types/errors';
|
|
3
|
+
import { Filepath } from '../../../types/filepath';
|
|
4
|
+
import { Ref } from '../../../types/schemaJson';
|
|
5
|
+
import { ProgramSymbol } from '../../../types/symbol';
|
|
6
|
+
export declare function validateRecords(compiler: Compiler, programSymbol: ProgramSymbol, refs: Ref[], filepath: Filepath): CompileWarning[];
|
|
@@ -114,9 +114,11 @@ export declare enum CompileErrorCode {
|
|
|
114
114
|
CIRCULAR_REF = 5001,
|
|
115
115
|
SAME_ENDPOINT = 5002,
|
|
116
116
|
DEP_SELF_LOOP = 5003,
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
117
|
+
DEP_MIXED_DOWNSTREAM_TABLES = 5004,
|
|
118
|
+
DEP_DUPLICATE_DOWNSTREAM_TABLE = 5005,
|
|
119
|
+
UNEQUAL_FIELDS_BINARY_REF = 5006,
|
|
120
|
+
CONFLICTING_SETTING = 5007,
|
|
121
|
+
TABLE_REAPPEAR_IN_TABLEGROUP = 5008
|
|
120
122
|
}
|
|
121
123
|
export declare class CompileError extends Error {
|
|
122
124
|
code: Readonly<CompileErrorCode>;
|
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": "9.0.0-alpha.
|
|
4
|
+
"version": "9.0.0-alpha.15",
|
|
5
5
|
"description": "DBML parser v2",
|
|
6
6
|
"author": "Holistics <dev@holistics.io>",
|
|
7
7
|
"license": "Apache-2.0",
|
|
@@ -50,5 +50,5 @@
|
|
|
50
50
|
"engines": {
|
|
51
51
|
"node": ">=18"
|
|
52
52
|
},
|
|
53
|
-
"gitHead": "
|
|
53
|
+
"gitHead": "6b55b7c469c1f577c3e27fa699d107ecbd4c47d2"
|
|
54
54
|
}
|