@interopio/desktop-cli
Version:
CLI tool for setting up, building and packaging io.Connect Desktop projects
27 lines • 1.11 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.ensureIOCDComponentExists = ensureIOCDComponentExists;
const fs_1 = require("fs");
const error_handler_1 = require("./error.handler");
const path_1 = require("./path");
function ensureIOCDComponentExists() {
// Check if components are installed
const componentsDir = path_1.PathUtils.getComponentsDir();
if (!((0, fs_1.existsSync)(componentsDir))) {
throw new error_handler_1.CLIError('Components directory not found.', {
suggestions: [
'Run "npm run setup" to download components.'
]
});
}
const iocdDir = path_1.PathUtils.getComponentDir("iocd");
if (!(0, fs_1.existsSync)(iocdDir)) {
throw new error_handler_1.CLIError('Required iocd component not found.', {
suggestions: [
'Run "npm run setup" to download components',
'Make sure you have iocd component listed in iocd.cli.config.json under "components.list"',
]
});
}
}
//# sourceMappingURL=ensure.iocd.exists.js.map