@dbcube/schema-builder 1.0.19 → 1.0.21
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.cjs +10 -10
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +10 -10
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -660,7 +660,7 @@ var DependencyResolver = class {
|
|
|
660
660
|
} else if (import_fs3.default.existsSync(file)) {
|
|
661
661
|
filePath = import_path2.default.resolve(file);
|
|
662
662
|
} else {
|
|
663
|
-
filePath = import_path2.default.join(process.cwd(), "dbcube",
|
|
663
|
+
filePath = import_path2.default.join(process.cwd(), "dbcube", file);
|
|
664
664
|
}
|
|
665
665
|
try {
|
|
666
666
|
const tableNameResult = FileUtils_default.extracTableNameFromCube(filePath);
|
|
@@ -810,7 +810,7 @@ var DependencyResolver = class {
|
|
|
810
810
|
const orderedFiles = [];
|
|
811
811
|
const fileMap = /* @__PURE__ */ new Map();
|
|
812
812
|
for (const file of cubeFiles) {
|
|
813
|
-
const filePath = import_path2.default.isAbsolute(file) ? file : import_path2.default.join(process.cwd(), "dbcube",
|
|
813
|
+
const filePath = import_path2.default.isAbsolute(file) ? file : import_path2.default.join(process.cwd(), "dbcube", file);
|
|
814
814
|
const tableNameResult = FileUtils_default.extracTableNameFromCube(filePath);
|
|
815
815
|
const tableName = tableNameResult.status === 200 ? tableNameResult.message : import_path2.default.basename(file, `.${cubeType}.cube`);
|
|
816
816
|
fileMap.set(tableName, file);
|
|
@@ -1032,11 +1032,11 @@ var Schema = class {
|
|
|
1032
1032
|
}
|
|
1033
1033
|
async refreshTables() {
|
|
1034
1034
|
const startTime = Date.now();
|
|
1035
|
-
const cubesDir = import_path3.default.join(process.cwd(), "dbcube"
|
|
1035
|
+
const cubesDir = import_path3.default.join(process.cwd(), "dbcube");
|
|
1036
1036
|
if (!import_fs4.default.existsSync(cubesDir)) {
|
|
1037
1037
|
throw new Error("\u274C The cubes folder does not exist");
|
|
1038
1038
|
}
|
|
1039
|
-
const cubeFiles = FileUtils_default.getCubeFilesRecursively("dbcube", "table.cube");
|
|
1039
|
+
const cubeFiles = FileUtils_default.getCubeFilesRecursively("dbcube", ".table.cube");
|
|
1040
1040
|
if (cubeFiles.length === 0) {
|
|
1041
1041
|
throw new Error("\u274C There are no cubes to execute");
|
|
1042
1042
|
}
|
|
@@ -1154,11 +1154,11 @@ var Schema = class {
|
|
|
1154
1154
|
}
|
|
1155
1155
|
async freshTables() {
|
|
1156
1156
|
const startTime = Date.now();
|
|
1157
|
-
const cubesDir = import_path3.default.join(process.cwd(), "dbcube"
|
|
1157
|
+
const cubesDir = import_path3.default.join(process.cwd(), "dbcube");
|
|
1158
1158
|
if (!import_fs4.default.existsSync(cubesDir)) {
|
|
1159
1159
|
throw new Error("\u274C The cubes folder does not exist");
|
|
1160
1160
|
}
|
|
1161
|
-
const cubeFiles = FileUtils_default.getCubeFilesRecursively("dbcube", "table.cube");
|
|
1161
|
+
const cubeFiles = FileUtils_default.getCubeFilesRecursively("dbcube", ".table.cube");
|
|
1162
1162
|
if (cubeFiles.length === 0) {
|
|
1163
1163
|
throw new Error("\u274C There are no cubes to execute");
|
|
1164
1164
|
}
|
|
@@ -1274,11 +1274,11 @@ var Schema = class {
|
|
|
1274
1274
|
}
|
|
1275
1275
|
async executeSeeders() {
|
|
1276
1276
|
const startTime = Date.now();
|
|
1277
|
-
const cubesDir = import_path3.default.join(process.cwd(), "dbcube"
|
|
1277
|
+
const cubesDir = import_path3.default.join(process.cwd(), "dbcube");
|
|
1278
1278
|
if (!import_fs4.default.existsSync(cubesDir)) {
|
|
1279
1279
|
throw new Error("\u274C The cubes folder does not exist");
|
|
1280
1280
|
}
|
|
1281
|
-
const cubeFiles = FileUtils_default.getCubeFilesRecursively("dbcube", "seeder.cube");
|
|
1281
|
+
const cubeFiles = FileUtils_default.getCubeFilesRecursively("dbcube", ".seeder.cube");
|
|
1282
1282
|
if (cubeFiles.length === 0) {
|
|
1283
1283
|
throw new Error("\u274C There are no cubes to execute");
|
|
1284
1284
|
}
|
|
@@ -1346,12 +1346,12 @@ var Schema = class {
|
|
|
1346
1346
|
}
|
|
1347
1347
|
async executeTriggers() {
|
|
1348
1348
|
const startTime = Date.now();
|
|
1349
|
-
const cubesDir = import_path3.default.join(process.cwd(), "dbcube"
|
|
1349
|
+
const cubesDir = import_path3.default.join(process.cwd(), "dbcube");
|
|
1350
1350
|
const triggersDirExit = import_path3.default.join(process.cwd(), "dbcube", "triggers");
|
|
1351
1351
|
if (!import_fs4.default.existsSync(cubesDir)) {
|
|
1352
1352
|
throw new Error("\u274C The cubes folder does not exist");
|
|
1353
1353
|
}
|
|
1354
|
-
const cubeFiles = FileUtils_default.getCubeFilesRecursively("dbcube", "trigger.cube");
|
|
1354
|
+
const cubeFiles = FileUtils_default.getCubeFilesRecursively("dbcube", ".trigger.cube");
|
|
1355
1355
|
if (cubeFiles.length === 0) {
|
|
1356
1356
|
throw new Error("\u274C There are no cubes to execute");
|
|
1357
1357
|
}
|