@dbml/parse 8.0.0-alpha.13 → 8.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 +2 -2
- package/dist/dbml-parse.mjs +10 -7
- package/package.json +2 -2
package/dist/dbml-parse.mjs
CHANGED
|
@@ -2750,8 +2750,7 @@ function alternateLists(r, j) {
|
|
|
2750
2750
|
return M.push(...r.slice(N), ...j.slice(N)), M;
|
|
2751
2751
|
}
|
|
2752
2752
|
function shouldInterpretNode(r, j) {
|
|
2753
|
-
|
|
2754
|
-
return !M && !N && !P;
|
|
2753
|
+
return r.reachableFiles(j.filepath).every((j) => r.bindFile(j).getErrors().length === 0);
|
|
2755
2754
|
}
|
|
2756
2755
|
function scanNonListNodeForBinding(r) {
|
|
2757
2756
|
if (!r) return [];
|
|
@@ -7589,7 +7588,13 @@ const programModule$1 = {
|
|
|
7589
7588
|
return isProgramNode(N) ? new Binder(N, j).resolve() : Report.create(PASS_THROUGH);
|
|
7590
7589
|
},
|
|
7591
7590
|
interpretSymbol(j, N, P) {
|
|
7592
|
-
|
|
7591
|
+
if (!(N instanceof ProgramSymbol)) return Report.create(PASS_THROUGH);
|
|
7592
|
+
if (!(N.declaration instanceof ProgramNode)) return Report.create(void 0);
|
|
7593
|
+
if (!shouldInterpretNode(j, N.declaration)) {
|
|
7594
|
+
let r = j.reachableFiles(P).flatMap((r) => j.bindFile(r).getErrors());
|
|
7595
|
+
return Report.create(void 0, r);
|
|
7596
|
+
}
|
|
7597
|
+
return new ProgramInterpreter(j, N, P).interpret();
|
|
7593
7598
|
}
|
|
7594
7599
|
};
|
|
7595
7600
|
var ProjectBinder = class {
|
|
@@ -13380,10 +13385,8 @@ function bindProject() {
|
|
|
13380
13385
|
return j;
|
|
13381
13386
|
}
|
|
13382
13387
|
function interpretFile(r) {
|
|
13383
|
-
let N = this.
|
|
13384
|
-
|
|
13385
|
-
let { ast: P } = this.parseFile(r).getValue(), F = this.nodeSymbol(P).getFiltered(UNHANDLED);
|
|
13386
|
-
return F ? this.interpretSymbol(F, r).map((r) => r === UNHANDLED || !r ? void 0 : r) : Report.create(void 0);
|
|
13388
|
+
let { ast: N } = this.parseFile(r).getValue(), P = this.nodeSymbol(N).getFiltered(UNHANDLED);
|
|
13389
|
+
return P ? this.interpretSymbol(P, r).map((r) => r === UNHANDLED || !r ? void 0 : r) : Report.create(void 0);
|
|
13387
13390
|
}
|
|
13388
13391
|
function interpretProject() {
|
|
13389
13392
|
let r = [], N = [], P = /* @__PURE__ */ new Set(), F = [];
|
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": "8.0.0-alpha.
|
|
4
|
+
"version": "8.0.0-alpha.15",
|
|
5
5
|
"description": "DBML parser v2",
|
|
6
6
|
"author": "Holistics <dev@holistics.io>",
|
|
7
7
|
"license": "Apache-2.0",
|
|
@@ -46,5 +46,5 @@
|
|
|
46
46
|
"engines": {
|
|
47
47
|
"node": ">=18"
|
|
48
48
|
},
|
|
49
|
-
"gitHead": "
|
|
49
|
+
"gitHead": "a28fb18cf7ea979a81ef65774ef5271f285766d2"
|
|
50
50
|
}
|