@dbcube/schema-builder 5.0.7 → 5.0.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/bun.lockb +0 -0
- package/dist/index.cjs +20 -8
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +20 -8
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -1053,7 +1053,10 @@ var Schema = class {
|
|
|
1053
1053
|
errorCount++;
|
|
1054
1054
|
continue;
|
|
1055
1055
|
}
|
|
1056
|
-
const
|
|
1056
|
+
const dbResult = FileUtils_default.extractDatabaseNameFromCube(filePath);
|
|
1057
|
+
const cubeDbName = dbResult.status === 200 ? dbResult.message : this.name;
|
|
1058
|
+
const fileEngine = new Engine(cubeDbName);
|
|
1059
|
+
const dml = await fileEngine.run("schema_engine", [
|
|
1057
1060
|
"--action",
|
|
1058
1061
|
"parse_table",
|
|
1059
1062
|
"--mode",
|
|
@@ -1066,7 +1069,7 @@ var Schema = class {
|
|
|
1066
1069
|
break;
|
|
1067
1070
|
}
|
|
1068
1071
|
const parseJson = JSON.stringify(dml.data.actions).replace(/[\r\n\t]/g, "").replace(/\\[rnt]/g, "").replace(/\s{2,}/g, " ");
|
|
1069
|
-
const queries = await
|
|
1072
|
+
const queries = await fileEngine.run("schema_engine", [
|
|
1070
1073
|
"--action",
|
|
1071
1074
|
"generate",
|
|
1072
1075
|
"--mode",
|
|
@@ -1080,7 +1083,7 @@ var Schema = class {
|
|
|
1080
1083
|
}
|
|
1081
1084
|
delete queries.data.database_type;
|
|
1082
1085
|
const parseJsonQueries = JSON.stringify(queries.data);
|
|
1083
|
-
const response = await
|
|
1086
|
+
const response = await fileEngine.run("schema_engine", [
|
|
1084
1087
|
"--action",
|
|
1085
1088
|
"execute",
|
|
1086
1089
|
"--mode",
|
|
@@ -1175,7 +1178,10 @@ var Schema = class {
|
|
|
1175
1178
|
errorCount++;
|
|
1176
1179
|
continue;
|
|
1177
1180
|
}
|
|
1178
|
-
const
|
|
1181
|
+
const dbResult = FileUtils_default.extractDatabaseNameFromCube(filePath);
|
|
1182
|
+
const cubeDbName = dbResult.status === 200 ? dbResult.message : this.name;
|
|
1183
|
+
const fileEngine = new Engine(cubeDbName);
|
|
1184
|
+
const dml = await fileEngine.run("schema_engine", [
|
|
1179
1185
|
"--action",
|
|
1180
1186
|
"parse_table",
|
|
1181
1187
|
"--schema-path",
|
|
@@ -1188,7 +1194,7 @@ var Schema = class {
|
|
|
1188
1194
|
break;
|
|
1189
1195
|
}
|
|
1190
1196
|
const parseJson = JSON.stringify(dml.data.actions).replace(/[\r\n\t]/g, "").replace(/\\[rnt]/g, "").replace(/\s{2,}/g, " ");
|
|
1191
|
-
const queries = await
|
|
1197
|
+
const queries = await fileEngine.run("schema_engine", [
|
|
1192
1198
|
"--action",
|
|
1193
1199
|
"generate",
|
|
1194
1200
|
"--dml",
|
|
@@ -1201,7 +1207,7 @@ var Schema = class {
|
|
|
1201
1207
|
delete queries.data._type;
|
|
1202
1208
|
const createQuery = queries.data.regular_queries.filter((q) => q.includes("CREATE"))[0];
|
|
1203
1209
|
const parseJsonQueries = JSON.stringify(queries.data);
|
|
1204
|
-
const response = await
|
|
1210
|
+
const response = await fileEngine.run("schema_engine", [
|
|
1205
1211
|
"--action",
|
|
1206
1212
|
"execute",
|
|
1207
1213
|
"--mode",
|
|
@@ -1277,7 +1283,10 @@ var Schema = class {
|
|
|
1277
1283
|
errorCount++;
|
|
1278
1284
|
continue;
|
|
1279
1285
|
}
|
|
1280
|
-
const
|
|
1286
|
+
const dbResult = FileUtils_default.extractDatabaseNameFromCube(filePath);
|
|
1287
|
+
const cubeDbName = dbResult.status === 200 ? dbResult.message : this.name;
|
|
1288
|
+
const fileEngine = new Engine(cubeDbName);
|
|
1289
|
+
const response = await fileEngine.run("schema_engine", [
|
|
1281
1290
|
"--action",
|
|
1282
1291
|
"seeder",
|
|
1283
1292
|
"--schema-path",
|
|
@@ -1349,7 +1358,10 @@ var Schema = class {
|
|
|
1349
1358
|
errorCount++;
|
|
1350
1359
|
continue;
|
|
1351
1360
|
}
|
|
1352
|
-
const
|
|
1361
|
+
const dbResult = FileUtils_default.extractDatabaseNameFromCube(filePath);
|
|
1362
|
+
const cubeDbName = dbResult.status === 200 ? dbResult.message : this.name;
|
|
1363
|
+
const fileEngine = new Engine(cubeDbName);
|
|
1364
|
+
const response = await fileEngine.run("schema_engine", [
|
|
1353
1365
|
"--action",
|
|
1354
1366
|
"trigger",
|
|
1355
1367
|
"--path-exit",
|