UNPKG

alwaysai

Version:

The alwaysAI command-line interface (CLI)

22 lines 902 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.appInstallModelsComponent = void 0; const logSymbols = require("log-symbols"); const app_1 = require("../../../core/app"); const util_1 = require("../../../util"); async function appInstallModelsComponent(spawner) { const appJsonFile = (0, app_1.AppJsonFile)(); const appJson = appJsonFile.read(); let hasModels = false; if (appJson.models) { for (const [id, version] of Object.entries(appJson.models)) { hasModels = true; await (0, util_1.runWithSpinner)(app_1.appInstallModel, [spawner, id, version], `Install model ${id}`); } } if (!hasModels) { (0, util_1.echo)(`${logSymbols.warning} Application has no models`); } } exports.appInstallModelsComponent = appInstallModelsComponent; //# sourceMappingURL=app-install-models-component.js.map