directus-template-cli 0.5.0-beta.4 → 0.5.0-beta.6
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.
|
@@ -17,6 +17,7 @@ async function installExtension(extension) {
|
|
|
17
17
|
}));
|
|
18
18
|
}
|
|
19
19
|
async function loadExtensions(dir) {
|
|
20
|
+
core_1.ux.action.start('Loading extensions');
|
|
20
21
|
const extensions = (0, read_file_1.default)('extensions', dir);
|
|
21
22
|
if (extensions && extensions.length > 0) {
|
|
22
23
|
const installedExtensions = await sdk_2.api.client.request((0, sdk_1.readExtensions)());
|
|
@@ -67,5 +68,6 @@ async function loadExtensions(dir) {
|
|
|
67
68
|
else {
|
|
68
69
|
core_1.ux.log('No extensions found or extensions file is empty. Skipping extension installation.');
|
|
69
70
|
}
|
|
71
|
+
core_1.ux.action.stop();
|
|
70
72
|
}
|
|
71
73
|
exports.default = loadExtensions;
|
|
@@ -7,13 +7,7 @@ const catch_error_1 = tslib_1.__importDefault(require("./catch-error"));
|
|
|
7
7
|
function readFile(file, dir) {
|
|
8
8
|
const filePath = node_path_1.default.join(dir, `${file}.json`); // Use path.join for proper path resolution
|
|
9
9
|
if (!node_fs_1.default.existsSync(filePath)) {
|
|
10
|
-
(0, catch_error_1.default)(`File not found: ${filePath}
|
|
11
|
-
context: {
|
|
12
|
-
dir,
|
|
13
|
-
file,
|
|
14
|
-
operation: 'readFile',
|
|
15
|
-
},
|
|
16
|
-
});
|
|
10
|
+
(0, catch_error_1.default)(`File not found: ${filePath}`);
|
|
17
11
|
}
|
|
18
12
|
const fileContents = node_fs_1.default.readFileSync(filePath, 'utf8');
|
|
19
13
|
const obj = JSON.parse(fileContents);
|
package/oclif.manifest.json
CHANGED