@iola_adm/iola-cli 0.1.90 → 0.1.91

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/cli.js +5 -5
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@iola_adm/iola-cli",
3
- "version": "0.1.90",
3
+ "version": "0.1.91",
4
4
  "description": "CLI и AI-агент городского округа Йошкар-Ола.",
5
5
  "license": "MIT",
6
6
  "homepage": "https://github.com/adm-iola/iola-cli#readme",
package/src/cli.js CHANGED
@@ -390,7 +390,6 @@ const COMMANDS = new Map([
390
390
  ["alias", handleAlias],
391
391
  ["run", runNaturalLanguage],
392
392
  ["config", handleConfig],
393
- ["purge", handleUninstall],
394
393
  ["delete", handleUninstall],
395
394
  ["banner", showBanner],
396
395
  ["agent", startAgent],
@@ -1261,7 +1260,6 @@ async function handleAgentLine(line, state) {
1261
1260
  diff: ["diff", args],
1262
1261
  config: ["config", args],
1263
1262
  delete: ["delete", args],
1264
- purge: ["purge", args],
1265
1263
  layers: ["layers", args],
1266
1264
  data: ["data", args],
1267
1265
  schools: ["schools", args],
@@ -1286,7 +1284,8 @@ async function handleAgentLine(line, state) {
1286
1284
  }
1287
1285
 
1288
1286
  const [cliCommand, cliArgs] = mapped;
1289
- await COMMANDS.get(cliCommand)(cliArgs);
1287
+ const result = await COMMANDS.get(cliCommand)(cliArgs);
1288
+ if (cliCommand === "delete" && result?.deleted) return true;
1290
1289
  return false;
1291
1290
  }
1292
1291
 
@@ -2166,7 +2165,7 @@ async function handleUninstall(args = []) {
2166
2165
  };
2167
2166
  if (options.json) printJson(payload);
2168
2167
  else printKeyValue(Object.fromEntries(payload.willDelete.map((item) => [item.label, `${item.path} (${item.exists ? "exists" : "missing"})`])));
2169
- return;
2168
+ return { deleted: false };
2170
2169
  }
2171
2170
 
2172
2171
  if (!options.yes) {
@@ -2180,7 +2179,7 @@ async function handleUninstall(args = []) {
2180
2179
  const confirmed = await confirm("Удалить локальные данные iola-cli? [y/N] ");
2181
2180
  if (!confirmed) {
2182
2181
  console.log("Удаление отменено.");
2183
- return;
2182
+ return { deleted: false };
2184
2183
  }
2185
2184
  }
2186
2185
 
@@ -2193,6 +2192,7 @@ async function handleUninstall(args = []) {
2193
2192
  console.log("Для полной переустановки npm-пакета:");
2194
2193
  console.log(" npm remove -g @iola_adm/iola-cli");
2195
2194
  console.log(" npm install -g @iola_adm/iola-cli@latest");
2195
+ return { deleted: true };
2196
2196
  }
2197
2197
 
2198
2198
  async function handleDb(args) {