@dbml/core 3.13.0-alpha.0 → 3.13.0-alpha.1
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.
|
@@ -170,6 +170,11 @@ var Table = /*#__PURE__*/function (_Element) {
|
|
|
170
170
|
var sortedPartials = this.partials.sort(function (a, b) {
|
|
171
171
|
return b.order - a.order;
|
|
172
172
|
});
|
|
173
|
+
|
|
174
|
+
// insert placeholder into table.fields
|
|
175
|
+
sortedPartials.toReversed().forEach(function (partial) {
|
|
176
|
+
_this5.fields.splice(partial.order, 0, 'dummy');
|
|
177
|
+
});
|
|
173
178
|
sortedPartials.forEach(function (partial) {
|
|
174
179
|
var tablePartial = _this5.schema.database.findTablePartial(partial.name);
|
|
175
180
|
if (!tablePartial) _this5.error("Table partial ".concat(partial.name, " not found"), partial.token);
|
|
@@ -207,7 +212,9 @@ var Table = /*#__PURE__*/function (_Element) {
|
|
|
207
212
|
injectedPartial: tablePartial
|
|
208
213
|
}));
|
|
209
214
|
});
|
|
210
|
-
(_this5$fields = _this5.fields).splice.apply(_this5$fields, [partial.order,
|
|
215
|
+
(_this5$fields = _this5.fields).splice.apply(_this5$fields, [partial.order, 1].concat(_toConsumableArray(fields)));
|
|
216
|
+
} else {
|
|
217
|
+
_this5.fields.splice(partial.order, 1); // still need to remove the dummy element, even when there's no field in the partial
|
|
211
218
|
}
|
|
212
219
|
|
|
213
220
|
// merge settings
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dbml/core",
|
|
3
|
-
"version": "3.13.0-alpha.
|
|
3
|
+
"version": "3.13.0-alpha.1",
|
|
4
4
|
"description": "> TODO: description",
|
|
5
5
|
"author": "Holistics <dev@holistics.io>",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"prepublish": "npm run build"
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@dbml/parse": "^3.13.0-alpha.
|
|
35
|
+
"@dbml/parse": "^3.13.0-alpha.1",
|
|
36
36
|
"antlr4": "^4.13.1",
|
|
37
37
|
"lodash": "^4.17.15",
|
|
38
38
|
"parsimmon": "^1.13.0",
|
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
"\\.(?!json$)[^.]*$": "@glen/jest-raw-loader"
|
|
60
60
|
}
|
|
61
61
|
},
|
|
62
|
-
"gitHead": "
|
|
62
|
+
"gitHead": "f695a53584ead08c4349f5824744d868bd350313",
|
|
63
63
|
"engines": {
|
|
64
64
|
"node": ">=16"
|
|
65
65
|
}
|