@dbml/core 8.0.0-alpha.7 → 8.0.0-alpha.9
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/lib/index.cjs +3 -3
- package/lib/index.mjs +13 -9
- package/package.json +3 -3
package/lib/index.mjs
CHANGED
|
@@ -8553,11 +8553,15 @@ var ProgramInterpreter = class {
|
|
|
8553
8553
|
let HY = P.getValue();
|
|
8554
8554
|
HY && this.pushElement(VY, HY);
|
|
8555
8555
|
}
|
|
8556
|
-
let _ = this.compiler.symbolMembers(this.programSymbol).getFiltered(UNHANDLED) ?? [];
|
|
8557
|
-
for (let
|
|
8558
|
-
if (!(
|
|
8559
|
-
let
|
|
8560
|
-
for (let
|
|
8556
|
+
let _ = /* @__PURE__ */ new Set(), VY = this.compiler.symbolMembers(this.programSymbol).getFiltered(UNHANDLED) ?? [];
|
|
8557
|
+
for (let P of VY) {
|
|
8558
|
+
if (!(P instanceof SchemaSymbol)) continue;
|
|
8559
|
+
let VY = this.compiler.symbolMembers(P).getFiltered(UNHANDLED) ?? [];
|
|
8560
|
+
for (let P of VY) {
|
|
8561
|
+
if (!(P instanceof UseSymbol)) continue;
|
|
8562
|
+
let VY = P.originalSymbol.intern();
|
|
8563
|
+
_.has(VY) || (_.add(VY), this.interpretUseSymbol(P));
|
|
8564
|
+
}
|
|
8561
8565
|
}
|
|
8562
8566
|
}
|
|
8563
8567
|
interpretUseSymbol(_) {
|
|
@@ -9426,7 +9430,7 @@ var useUtils = { visibleName(_, VY) {
|
|
|
9426
9430
|
let GY = VY.parentOfKind(UseDeclarationNode);
|
|
9427
9431
|
if (GY?.importPath?.value === void 0) return Report.create(void 0);
|
|
9428
9432
|
let KY = resolveImportFilepath(VY.filepath, GY.importPath.value);
|
|
9429
|
-
if (!KY) return Report.create(void 0);
|
|
9433
|
+
if (!KY) return Report.create(void 0, [new CompileError(CompileErrorCode.BINDING_ERROR, `Import path must be relative, got '${GY.importPath.value}'`, VY)]);
|
|
9430
9434
|
if (!_.layout.exists(KY)) return Report.create(void 0, [new CompileError(CompileErrorCode.NONEXISTENT_MODULE, `${HY} '${UY?.join(".") ?? WY}' does not exist in file ${KY.toString()}. Does the file exist?`, VY)]);
|
|
9431
9435
|
let qY = VY.parentOfKind(InfixExpressionNode)?.leftExpression;
|
|
9432
9436
|
if (qY && qY !== VY) {
|
|
@@ -9443,7 +9447,7 @@ var useUtils = { visibleName(_, VY) {
|
|
|
9443
9447
|
let P = [];
|
|
9444
9448
|
if (VY.importPath?.value) {
|
|
9445
9449
|
let HY = resolveImportFilepath(VY.filepath, VY.importPath.value);
|
|
9446
|
-
HY
|
|
9450
|
+
HY ? _.layout.exists(HY) || P.push(new CompileError(CompileErrorCode.NONEXISTENT_MODULE, `Failed to resolve the non-existent file '${VY.importPath.value}'`, VY.importPath)) : P.push(new CompileError(CompileErrorCode.BINDING_ERROR, `Import path must be relative, got '${VY.importPath.value}'`, VY.importPath));
|
|
9447
9451
|
}
|
|
9448
9452
|
if (VY.specifiers) {
|
|
9449
9453
|
let HY = _.bindNode(VY.specifiers);
|
|
@@ -14395,7 +14399,7 @@ function containerScopeKind(_, VY) {
|
|
|
14395
14399
|
}
|
|
14396
14400
|
function canonicalName(_, VY) {
|
|
14397
14401
|
let P = VY.originalSymbol;
|
|
14398
|
-
if (P.filepath.
|
|
14402
|
+
if (P.filepath.equals(_)) return Report.create(fullnameToCanonical(this, P));
|
|
14399
14403
|
let HY = [...this.symbolUses(P).getValue(), ...this.symbolAliases(P).getValue()].filter((VY) => VY.filepath.equals(_));
|
|
14400
14404
|
for (let _ of HY) {
|
|
14401
14405
|
let VY = _.name;
|
|
@@ -1825775,5 +1825779,5 @@ function findDiagramViewBlocks(_) {
|
|
|
1825775
1825779
|
let VY = new Compiler();
|
|
1825776
1825780
|
return VY.setSource(DEFAULT_ENTRY, _), VY.findDiagramViewBlocks(DEFAULT_ENTRY);
|
|
1825777
1825781
|
}
|
|
1825778
|
-
const VERSION = "8.0.0-alpha.
|
|
1825782
|
+
const VERSION = "8.0.0-alpha.9";
|
|
1825779
1825783
|
export { CompilerError, ModelExporter_default as ModelExporter, Parser_default as Parser, VERSION, addDoubleQuoteIfNeeded, dbmlMonarchTokensProvider, export_default as exporter, findDiagramViewBlocks, formatRecordValue, import_default as importer, isBinaryType, isBooleanType, isDateTimeType, isFloatType, isIntegerType, isNumericType, isSerialType, isStringType, renameTable, syncDiagramView, tryExtractBoolean, tryExtractDateTime, tryExtractEnum, tryExtractInteger, tryExtractNumeric, tryExtractString };
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json.schemastore.org/package",
|
|
3
3
|
"name": "@dbml/core",
|
|
4
|
-
"version": "8.0.0-alpha.
|
|
4
|
+
"version": "8.0.0-alpha.9",
|
|
5
5
|
"description": "> TODO: description",
|
|
6
6
|
"author": "Holistics <dev@holistics.io>",
|
|
7
7
|
"license": "Apache-2.0",
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
"lint:fix": "eslint --fix ."
|
|
47
47
|
},
|
|
48
48
|
"dependencies": {
|
|
49
|
-
"@dbml/parse": "^8.0.0-alpha.
|
|
49
|
+
"@dbml/parse": "^8.0.0-alpha.9",
|
|
50
50
|
"antlr4": "^4.13.1",
|
|
51
51
|
"lodash": "^4.18.1",
|
|
52
52
|
"lodash-es": "^4.18.1",
|
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
"devDependencies": {
|
|
58
58
|
"bluebird": "^3.5.5"
|
|
59
59
|
},
|
|
60
|
-
"gitHead": "
|
|
60
|
+
"gitHead": "b5a159cdd4e2f0d53da79447ffacd79ce4872df5",
|
|
61
61
|
"engines": {
|
|
62
62
|
"node": ">=16"
|
|
63
63
|
}
|