@dbcube/schema-builder 5.0.9 → 5.0.10

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 CHANGED
Binary file
package/dist/index.cjs CHANGED
@@ -1095,8 +1095,10 @@ var Schema = class {
1095
1095
  }
1096
1096
  const dbResult = FileUtils_default.extractDatabaseNameFromCube(filePath);
1097
1097
  const cubeDbName = dbResult.status === 200 ? dbResult.message : this.name;
1098
- const fileEngine = new import_core.Engine(cubeDbName);
1099
- const dml = await fileEngine.run("schema_engine", [
1098
+ if (cubeDbName !== this.name) {
1099
+ continue;
1100
+ }
1101
+ const dml = await this.engine.run("schema_engine", [
1100
1102
  "--action",
1101
1103
  "parse_table",
1102
1104
  "--mode",
@@ -1109,7 +1111,7 @@ var Schema = class {
1109
1111
  break;
1110
1112
  }
1111
1113
  const parseJson = JSON.stringify(dml.data.actions).replace(/[\r\n\t]/g, "").replace(/\\[rnt]/g, "").replace(/\s{2,}/g, " ");
1112
- const queries = await fileEngine.run("schema_engine", [
1114
+ const queries = await this.engine.run("schema_engine", [
1113
1115
  "--action",
1114
1116
  "generate",
1115
1117
  "--mode",
@@ -1123,7 +1125,7 @@ var Schema = class {
1123
1125
  }
1124
1126
  delete queries.data.database_type;
1125
1127
  const parseJsonQueries = JSON.stringify(queries.data);
1126
- const response = await fileEngine.run("schema_engine", [
1128
+ const response = await this.engine.run("schema_engine", [
1127
1129
  "--action",
1128
1130
  "execute",
1129
1131
  "--mode",
@@ -1220,8 +1222,10 @@ var Schema = class {
1220
1222
  }
1221
1223
  const dbResult = FileUtils_default.extractDatabaseNameFromCube(filePath);
1222
1224
  const cubeDbName = dbResult.status === 200 ? dbResult.message : this.name;
1223
- const fileEngine = new import_core.Engine(cubeDbName);
1224
- const dml = await fileEngine.run("schema_engine", [
1225
+ if (cubeDbName !== this.name) {
1226
+ continue;
1227
+ }
1228
+ const dml = await this.engine.run("schema_engine", [
1225
1229
  "--action",
1226
1230
  "parse_table",
1227
1231
  "--schema-path",
@@ -1234,7 +1238,7 @@ var Schema = class {
1234
1238
  break;
1235
1239
  }
1236
1240
  const parseJson = JSON.stringify(dml.data.actions).replace(/[\r\n\t]/g, "").replace(/\\[rnt]/g, "").replace(/\s{2,}/g, " ");
1237
- const queries = await fileEngine.run("schema_engine", [
1241
+ const queries = await this.engine.run("schema_engine", [
1238
1242
  "--action",
1239
1243
  "generate",
1240
1244
  "--dml",
@@ -1247,7 +1251,7 @@ var Schema = class {
1247
1251
  delete queries.data._type;
1248
1252
  const createQuery = queries.data.regular_queries.filter((q) => q.includes("CREATE"))[0];
1249
1253
  const parseJsonQueries = JSON.stringify(queries.data);
1250
- const response = await fileEngine.run("schema_engine", [
1254
+ const response = await this.engine.run("schema_engine", [
1251
1255
  "--action",
1252
1256
  "execute",
1253
1257
  "--mode",
@@ -1325,8 +1329,10 @@ var Schema = class {
1325
1329
  }
1326
1330
  const dbResult = FileUtils_default.extractDatabaseNameFromCube(filePath);
1327
1331
  const cubeDbName = dbResult.status === 200 ? dbResult.message : this.name;
1328
- const fileEngine = new import_core.Engine(cubeDbName);
1329
- const response = await fileEngine.run("schema_engine", [
1332
+ if (cubeDbName !== this.name) {
1333
+ continue;
1334
+ }
1335
+ const response = await this.engine.run("schema_engine", [
1330
1336
  "--action",
1331
1337
  "seeder",
1332
1338
  "--schema-path",
@@ -1400,8 +1406,10 @@ var Schema = class {
1400
1406
  }
1401
1407
  const dbResult = FileUtils_default.extractDatabaseNameFromCube(filePath);
1402
1408
  const cubeDbName = dbResult.status === 200 ? dbResult.message : this.name;
1403
- const fileEngine = new import_core.Engine(cubeDbName);
1404
- const response = await fileEngine.run("schema_engine", [
1409
+ if (cubeDbName !== this.name) {
1410
+ continue;
1411
+ }
1412
+ const response = await this.engine.run("schema_engine", [
1405
1413
  "--action",
1406
1414
  "trigger",
1407
1415
  "--path-exit",