Skip to content

Commit 00b0428

Browse files
committed
v0.0.7 file generation
1 parent 57861c6 commit 00b0428

File tree

5 files changed

+124
-607
lines changed

5 files changed

+124
-607
lines changed

dist/nosql-ts.js

Lines changed: 22 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -8300,7 +8300,7 @@ module.exports = __toCommonJS(typescript_exports);
83008300

83018301
// src/compiler/corePublic.ts
83028302
var versionMajorMinor = "5.5";
8303-
var version = "5.5.2";
8303+
var version = "5.5.3";
83048304
var Comparison = /* @__PURE__ */ ((Comparison3) => {
83058305
Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
83068306
Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
@@ -58746,7 +58746,7 @@ function createTypeChecker(host) {
5874658746
}
5874758747
if (moduleResolutionKind === 3 /* Node16 */ || moduleResolutionKind === 99 /* NodeNext */) {
5874858748
const isSyncImport = currentSourceFile.impliedNodeFormat === 1 /* CommonJS */ && !findAncestor(location, isImportCall) || !!findAncestor(location, isImportEqualsDeclaration);
58749-
const overrideHost = findAncestor(location, (l) => isImportTypeNode(l) || isExportDeclaration(l) || isImportDeclaration(l));
58749+
const overrideHost = findAncestor(location, (l) => isImportTypeNode(l) || isExportDeclaration(l) || isImportDeclaration(l) || isJSDocImportTag(l));
5875058750
if (isSyncImport && sourceFile.impliedNodeFormat === 99 /* ESNext */ && !hasResolutionModeOverride(overrideHost)) {
5875158751
if (findAncestor(location, isImportEqualsDeclaration)) {
5875258752
error2(errorNode, Diagnostics.Module_0_cannot_be_imported_using_this_construct_The_specifier_only_resolves_to_an_ES_module_which_cannot_be_imported_with_require_Use_an_ECMAScript_import_instead, moduleReference);
@@ -129534,7 +129534,7 @@ function getModeForUsageLocation(file, usage, compilerOptions) {
129534129534
}
129535129535
function getModeForUsageLocationWorker(file, usage, compilerOptions) {
129536129536
var _a;
129537-
if (isImportDeclaration(usage.parent) || isExportDeclaration(usage.parent)) {
129537+
if (isImportDeclaration(usage.parent) || isExportDeclaration(usage.parent) || isJSDocImportTag(usage.parent)) {
129538129538
const isTypeOnly = isExclusivelyTypeOnlyImportOrExport(usage.parent);
129539129539
if (isTypeOnly) {
129540129540
const override = getResolutionModeOverride(usage.parent.attributes);
@@ -200856,7 +200856,7 @@ const nosqlUtils_1 = require("./utils/nosqlUtils");
200856200856
const constants_nosql_1 = require("./utils/constants-nosql");
200857200857
/**
200858200858
* SQL Tools Plugin for importing and exporting typescript interfaces.
200859-
* Version: 0.0.6
200859+
* Version: 0.0.7
200860200860
*/
200861200861
Draw.loadPlugin(function (ui) {
200862200862
//Create Base div
@@ -201187,7 +201187,7 @@ exports.validJSONSchemaTypes = JSONSchemaTypes;
201187201187
Object.defineProperty(exports, "__esModule", { value: true });
201188201188
exports.objectKeyword = exports.arrayKeyword = exports.nullableKeyword = exports.enumKeyword = exports.formatKeyword = exports.commentColumnQuantifiers = exports.pluginVersion = void 0;
201189201189
// export sql methods
201190-
exports.pluginVersion = "0.0.6";
201190+
exports.pluginVersion = "0.0.7";
201191201191
exports.commentColumnQuantifiers = {
201192201192
Start: "/**",
201193201193
End: "*/",
@@ -201675,7 +201675,7 @@ function dbTypeEnds(label) {
201675201675
* @returns
201676201676
*/
201677201677
function RemoveNameQuantifiers(name) {
201678-
return name.replace(/\[|\]|\(|\"|\'|\`/g, "").trim();
201678+
return name.replace(/\[|\]|\(|\)|\"|\'|\`/g, "").trim();
201679201679
}
201680201680
/**
201681201681
* extract row column attributes
@@ -201691,11 +201691,18 @@ function getDbLabel(label, columnQuantifiers) {
201691201691
result.indexOf(columnQuantifiers.End + " ") !== -1
201692201692
? result.indexOf(columnQuantifiers.End + " ")
201693201693
: result.indexOf(" ");
201694-
const attributeType = result.substring(firstSpaceIndex + 1).trim();
201694+
let attributeType = result.substring(firstSpaceIndex + 1).trim();
201695201695
const attributeName = RemoveNameQuantifiers(result.substring(0, firstSpaceIndex + 1));
201696+
const attributesTypes = attributeType.split(" ");
201697+
let attributeComment = null;
201698+
if (attributesTypes.length > 1) {
201699+
attributeComment = attributesTypes.slice(1).join(' ');
201700+
attributeType = attributesTypes[0];
201701+
}
201696201702
const attribute = {
201697201703
attributeName,
201698201704
attributeType,
201705+
attributeComment,
201699201706
};
201700201707
return attribute;
201701201708
}
@@ -202099,18 +202106,18 @@ function CreateTableUI(ui, wndFromInput, tableList, cells, rowCell, tableCell, f
202099202106
// add foreign key edges
202100202107
const model = graph.getModel();
202101202108
const columnQuantifiers = GetColumnQuantifiers(type);
202109+
const insertEdge = mxUtils.bind(this, function (targetCell, sourceCell, edge) {
202110+
const label = "";
202111+
const edgeStyle = "edgeStyle=entityRelationEdgeStyle;html=1;endArrow=ERzeroToMany;startArrow=ERzeroToOne;labelBackgroundColor=none;fontFamily=Verdana;fontSize=14;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=-0.018;entryY=0.608;entryDx=0;entryDy=0;entryPerimeter=0;";
202112+
const edgeCell = graph.insertEdge(null, null, label || "", edge.invert ? sourceCell : targetCell, edge.invert ? targetCell : sourceCell, edgeStyle);
202113+
});
202102202114
// const pt = graph.getFreeInsertPoint();
202103202115
foreignKeyList.forEach(function (fk) {
202104202116
if (fk.IsDestination &&
202105202117
fk.PrimaryKeyName &&
202106202118
fk.ReferencesPropertyName &&
202107202119
fk.PrimaryKeyTableName &&
202108202120
fk.ReferencesTableName) {
202109-
const insertEdge = mxUtils.bind(this, function (targetCell, sourceCell, edge) {
202110-
const label = "";
202111-
const edgeStyle = "edgeStyle=entityRelationEdgeStyle;html=1;endArrow=ERzeroToMany;startArrow=ERzeroToOne;labelBackgroundColor=none;fontFamily=Verdana;fontSize=14;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=-0.018;entryY=0.608;entryDx=0;entryDy=0;entryPerimeter=0;";
202112-
const edgeCell = graph.insertEdge(null, null, label || "", edge.invert ? sourceCell : targetCell, edge.invert ? targetCell : sourceCell, edgeStyle);
202113-
});
202114202121
const edge = {
202115202122
invert: true,
202116202123
};
@@ -202139,13 +202146,13 @@ function CreateTableUI(ui, wndFromInput, tableList, cells, rowCell, tableCell, f
202139202146
col.style.trim().startsWith("shape=partialRectangle")) {
202140202147
const attribute = getDbLabel(col.value, columnQuantifiers);
202141202148
if (isPrimaryTable &&
202142-
dbTypeEnds(attribute.attributeName) == fk.PrimaryKeyName) {
202149+
RemoveNameQuantifiers(attribute.attributeName) == RemoveNameQuantifiers(fk.PrimaryKeyName)) {
202143202150
targetCell = col;
202144202151
// allow recursion
202145202152
}
202146202153
if (isForeignTable &&
202147-
dbTypeEnds(attribute.attributeName) ==
202148-
fk.ReferencesPropertyName) {
202154+
RemoveNameQuantifiers(attribute.attributeName) ==
202155+
RemoveNameQuantifiers(fk.ReferencesPropertyName)) {
202149202156
sourceCell = col;
202150202157
}
202151202158
if (targetCell && sourceCell)

dist/nosql-ts.min.js

Lines changed: 18 additions & 446 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/nosql.js

Lines changed: 19 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4607,7 +4607,7 @@ const nosqlUtils_1 = require("./utils/nosqlUtils");
46074607
const constants_nosql_1 = require("./utils/constants-nosql");
46084608
/**
46094609
* SQL Tools Plugin for importing and exporting typescript interfaces.
4610-
* Version: 0.0.6
4610+
* Version: 0.0.7
46114611
*/
46124612
Draw.loadPlugin(function (ui) {
46134613
//Create Base div
@@ -4911,7 +4911,7 @@ exports.validJSONSchemaTypes = JSONSchemaTypes;
49114911
Object.defineProperty(exports, "__esModule", { value: true });
49124912
exports.objectKeyword = exports.arrayKeyword = exports.nullableKeyword = exports.enumKeyword = exports.formatKeyword = exports.commentColumnQuantifiers = exports.pluginVersion = void 0;
49134913
// export sql methods
4914-
exports.pluginVersion = "0.0.6";
4914+
exports.pluginVersion = "0.0.7";
49154915
exports.commentColumnQuantifiers = {
49164916
Start: "/**",
49174917
End: "*/",
@@ -5399,7 +5399,7 @@ function dbTypeEnds(label) {
53995399
* @returns
54005400
*/
54015401
function RemoveNameQuantifiers(name) {
5402-
return name.replace(/\[|\]|\(|\"|\'|\`/g, "").trim();
5402+
return name.replace(/\[|\]|\(|\)|\"|\'|\`/g, "").trim();
54035403
}
54045404
/**
54055405
* extract row column attributes
@@ -5415,11 +5415,18 @@ function getDbLabel(label, columnQuantifiers) {
54155415
result.indexOf(columnQuantifiers.End + " ") !== -1
54165416
? result.indexOf(columnQuantifiers.End + " ")
54175417
: result.indexOf(" ");
5418-
const attributeType = result.substring(firstSpaceIndex + 1).trim();
5418+
let attributeType = result.substring(firstSpaceIndex + 1).trim();
54195419
const attributeName = RemoveNameQuantifiers(result.substring(0, firstSpaceIndex + 1));
5420+
const attributesTypes = attributeType.split(" ");
5421+
let attributeComment = null;
5422+
if (attributesTypes.length > 1) {
5423+
attributeComment = attributesTypes.slice(1).join(' ');
5424+
attributeType = attributesTypes[0];
5425+
}
54205426
const attribute = {
54215427
attributeName,
54225428
attributeType,
5429+
attributeComment,
54235430
};
54245431
return attribute;
54255432
}
@@ -5823,18 +5830,18 @@ function CreateTableUI(ui, wndFromInput, tableList, cells, rowCell, tableCell, f
58235830
// add foreign key edges
58245831
const model = graph.getModel();
58255832
const columnQuantifiers = GetColumnQuantifiers(type);
5833+
const insertEdge = mxUtils.bind(this, function (targetCell, sourceCell, edge) {
5834+
const label = "";
5835+
const edgeStyle = "edgeStyle=entityRelationEdgeStyle;html=1;endArrow=ERzeroToMany;startArrow=ERzeroToOne;labelBackgroundColor=none;fontFamily=Verdana;fontSize=14;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=-0.018;entryY=0.608;entryDx=0;entryDy=0;entryPerimeter=0;";
5836+
const edgeCell = graph.insertEdge(null, null, label || "", edge.invert ? sourceCell : targetCell, edge.invert ? targetCell : sourceCell, edgeStyle);
5837+
});
58265838
// const pt = graph.getFreeInsertPoint();
58275839
foreignKeyList.forEach(function (fk) {
58285840
if (fk.IsDestination &&
58295841
fk.PrimaryKeyName &&
58305842
fk.ReferencesPropertyName &&
58315843
fk.PrimaryKeyTableName &&
58325844
fk.ReferencesTableName) {
5833-
const insertEdge = mxUtils.bind(this, function (targetCell, sourceCell, edge) {
5834-
const label = "";
5835-
const edgeStyle = "edgeStyle=entityRelationEdgeStyle;html=1;endArrow=ERzeroToMany;startArrow=ERzeroToOne;labelBackgroundColor=none;fontFamily=Verdana;fontSize=14;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=-0.018;entryY=0.608;entryDx=0;entryDy=0;entryPerimeter=0;";
5836-
const edgeCell = graph.insertEdge(null, null, label || "", edge.invert ? sourceCell : targetCell, edge.invert ? targetCell : sourceCell, edgeStyle);
5837-
});
58385845
const edge = {
58395846
invert: true,
58405847
};
@@ -5863,13 +5870,13 @@ function CreateTableUI(ui, wndFromInput, tableList, cells, rowCell, tableCell, f
58635870
col.style.trim().startsWith("shape=partialRectangle")) {
58645871
const attribute = getDbLabel(col.value, columnQuantifiers);
58655872
if (isPrimaryTable &&
5866-
dbTypeEnds(attribute.attributeName) == fk.PrimaryKeyName) {
5873+
RemoveNameQuantifiers(attribute.attributeName) == RemoveNameQuantifiers(fk.PrimaryKeyName)) {
58675874
targetCell = col;
58685875
// allow recursion
58695876
}
58705877
if (isForeignTable &&
5871-
dbTypeEnds(attribute.attributeName) ==
5872-
fk.ReferencesPropertyName) {
5878+
RemoveNameQuantifiers(attribute.attributeName) ==
5879+
RemoveNameQuantifiers(fk.ReferencesPropertyName)) {
58735880
sourceCell = col;
58745881
}
58755882
if (targetCell && sourceCell)

dist/nosql.min.js

Lines changed: 1 addition & 93 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)