@dbcube/schema-builder 1.0.19 → 1.0.20

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/dist/index.js CHANGED
@@ -627,7 +627,7 @@ var DependencyResolver = class {
627
627
  } else if (fs4.existsSync(file)) {
628
628
  filePath = path3.resolve(file);
629
629
  } else {
630
- filePath = path3.join(process.cwd(), "dbcube", "cubes", file);
630
+ filePath = path3.join(process.cwd(), "dbcube", file);
631
631
  }
632
632
  try {
633
633
  const tableNameResult = FileUtils_default.extracTableNameFromCube(filePath);
@@ -777,7 +777,7 @@ var DependencyResolver = class {
777
777
  const orderedFiles = [];
778
778
  const fileMap = /* @__PURE__ */ new Map();
779
779
  for (const file of cubeFiles) {
780
- const filePath = path3.isAbsolute(file) ? file : path3.join(process.cwd(), "dbcube", "cubes", file);
780
+ const filePath = path3.isAbsolute(file) ? file : path3.join(process.cwd(), "dbcube", file);
781
781
  const tableNameResult = FileUtils_default.extracTableNameFromCube(filePath);
782
782
  const tableName = tableNameResult.status === 200 ? tableNameResult.message : path3.basename(file, `.${cubeType}.cube`);
783
783
  fileMap.set(tableName, file);
@@ -999,11 +999,11 @@ var Schema = class {
999
999
  }
1000
1000
  async refreshTables() {
1001
1001
  const startTime = Date.now();
1002
- const cubesDir = path4.join(process.cwd(), "dbcube", "cubes");
1002
+ const cubesDir = path4.join(process.cwd(), "dbcube");
1003
1003
  if (!fs5.existsSync(cubesDir)) {
1004
1004
  throw new Error("\u274C The cubes folder does not exist");
1005
1005
  }
1006
- const cubeFiles = FileUtils_default.getCubeFilesRecursively("dbcube", "table.cube");
1006
+ const cubeFiles = FileUtils_default.getCubeFilesRecursively("dbcube", ".table.cube");
1007
1007
  if (cubeFiles.length === 0) {
1008
1008
  throw new Error("\u274C There are no cubes to execute");
1009
1009
  }
@@ -1121,11 +1121,11 @@ var Schema = class {
1121
1121
  }
1122
1122
  async freshTables() {
1123
1123
  const startTime = Date.now();
1124
- const cubesDir = path4.join(process.cwd(), "dbcube", "cubes");
1124
+ const cubesDir = path4.join(process.cwd(), "dbcube");
1125
1125
  if (!fs5.existsSync(cubesDir)) {
1126
1126
  throw new Error("\u274C The cubes folder does not exist");
1127
1127
  }
1128
- const cubeFiles = FileUtils_default.getCubeFilesRecursively("dbcube", "table.cube");
1128
+ const cubeFiles = FileUtils_default.getCubeFilesRecursively("dbcube", ".table.cube");
1129
1129
  if (cubeFiles.length === 0) {
1130
1130
  throw new Error("\u274C There are no cubes to execute");
1131
1131
  }
@@ -1241,11 +1241,11 @@ var Schema = class {
1241
1241
  }
1242
1242
  async executeSeeders() {
1243
1243
  const startTime = Date.now();
1244
- const cubesDir = path4.join(process.cwd(), "dbcube", "cubes");
1244
+ const cubesDir = path4.join(process.cwd(), "dbcube");
1245
1245
  if (!fs5.existsSync(cubesDir)) {
1246
1246
  throw new Error("\u274C The cubes folder does not exist");
1247
1247
  }
1248
- const cubeFiles = FileUtils_default.getCubeFilesRecursively("dbcube", "seeder.cube");
1248
+ const cubeFiles = FileUtils_default.getCubeFilesRecursively("dbcube", ".seeder.cube");
1249
1249
  if (cubeFiles.length === 0) {
1250
1250
  throw new Error("\u274C There are no cubes to execute");
1251
1251
  }
@@ -1313,12 +1313,12 @@ var Schema = class {
1313
1313
  }
1314
1314
  async executeTriggers() {
1315
1315
  const startTime = Date.now();
1316
- const cubesDir = path4.join(process.cwd(), "dbcube", "cubes");
1316
+ const cubesDir = path4.join(process.cwd(), "dbcube");
1317
1317
  const triggersDirExit = path4.join(process.cwd(), "dbcube", "triggers");
1318
1318
  if (!fs5.existsSync(cubesDir)) {
1319
1319
  throw new Error("\u274C The cubes folder does not exist");
1320
1320
  }
1321
- const cubeFiles = FileUtils_default.getCubeFilesRecursively("dbcube", "trigger.cube");
1321
+ const cubeFiles = FileUtils_default.getCubeFilesRecursively("dbcube", ".trigger.cube");
1322
1322
  if (cubeFiles.length === 0) {
1323
1323
  throw new Error("\u274C There are no cubes to execute");
1324
1324
  }