diff --git a/.eslintrc.yml b/.eslintrc.yml index d0c2e98..20414b4 100644 --- a/.eslintrc.yml +++ b/.eslintrc.yml @@ -25,7 +25,7 @@ rules: unicorn/prefer-ternary: off dot-notation: off max-depth: ['warn', 10] - complexity: ['warn', 40] + complexity: ['warn', 80] unicorn/escape-case: off import/no-named-as-default-member: off unicorn/catch-error-name: off diff --git a/README.md b/README.md index a365be2..ede7d88 100644 --- a/README.md +++ b/README.md @@ -75,7 +75,7 @@ $ npm install -g @offline-ai/cli $ ai COMMAND running command... $ ai (--version) -@offline-ai/cli/0.0.10 linux-x64 node-v20.14.0 +@offline-ai/cli/0.0.11 linux-x64 node-v20.14.0 $ ai --help [COMMAND] USAGE $ ai COMMAND @@ -302,7 +302,7 @@ EXAMPLES $ ai agent publish ``` -_See code: [src/commands/agent/index.ts](https://github.com/offline-ai/cli/blob/v0.0.10/src/commands/agent/index.ts)_ +_See code: [src/commands/agent/index.ts](https://github.com/offline-ai/cli/blob/v0.0.11/src/commands/agent/index.ts)_ ## `ai autocomplete [SHELL]` @@ -375,7 +375,7 @@ EXAMPLES $ ai brain download ``` -_See code: [src/commands/brain/index.ts](https://github.com/offline-ai/cli/blob/v0.0.10/src/commands/brain/index.ts)_ +_See code: [src/commands/brain/index.ts](https://github.com/offline-ai/cli/blob/v0.0.11/src/commands/brain/index.ts)_ ## `ai brain dn [NAME]` @@ -503,7 +503,7 @@ EXAMPLES $ ai brain download [-q ] ``` -_See code: [src/commands/brain/download.ts](https://github.com/offline-ai/cli/blob/v0.0.10/src/commands/brain/download.ts)_ +_See code: [src/commands/brain/download.ts](https://github.com/offline-ai/cli/blob/v0.0.11/src/commands/brain/download.ts)_ ## `ai brain list [NAME]` @@ -532,7 +532,7 @@ GLOBAL FLAGS --json Format output as json. ``` -_See code: [src/commands/brain/list.ts](https://github.com/offline-ai/cli/blob/v0.0.10/src/commands/brain/list.ts)_ +_See code: [src/commands/brain/list.ts](https://github.com/offline-ai/cli/blob/v0.0.11/src/commands/brain/list.ts)_ ## `ai config [ITEM_NAME]` @@ -569,7 +569,7 @@ EXAMPLES } ``` -_See code: [src/commands/config/index.ts](https://github.com/offline-ai/cli/blob/v0.0.10/src/commands/config/index.ts)_ +_See code: [src/commands/config/index.ts](https://github.com/offline-ai/cli/blob/v0.0.11/src/commands/config/index.ts)_ ## `ai config save [DATA]` @@ -609,7 +609,7 @@ GLOBAL FLAGS --json Format output as json. ``` -_See code: [src/commands/config/save.ts](https://github.com/offline-ai/cli/blob/v0.0.10/src/commands/config/save.ts)_ +_See code: [src/commands/config/save.ts](https://github.com/offline-ai/cli/blob/v0.0.11/src/commands/config/save.ts)_ ## `ai help [COMMAND]` @@ -969,7 +969,7 @@ EXAMPLES │[info]:Start Script: ... ``` -_See code: [src/commands/run/index.ts](https://github.com/offline-ai/cli/blob/v0.0.10/src/commands/run/index.ts)_ +_See code: [src/commands/run/index.ts](https://github.com/offline-ai/cli/blob/v0.0.11/src/commands/run/index.ts)_ ## `ai version` diff --git a/src/lib/run-script.ts b/src/lib/run-script.ts index a165b7e..b6318b7 100644 --- a/src/lib/run-script.ts +++ b/src/lib/run-script.ts @@ -156,6 +156,8 @@ export async function runScript(filename: string, options: IRunScriptOptions) { try { await runtime.run(options.data) + } catch(error: any) { + if (error.name !== 'AbortError') {throw error} } finally { if (!isSilence && !options.noConsoleClear) {logUpdate.clear()} }