fix(cli): address Gemini test report — local mode, validate bug, offline flag
A. acr init --local: new local mode, no Cloudflare account required;
config defaults to mode:local when ~/.arcrun/config.yaml missing
B. validate node-count bug: removed faulty input/output node heuristic
that dropped start/end nodes from config check; now all nodes except
reserved 'input' keyword must have config entries
C. acr validate --offline: skip remote component-existence and credentials
checks; local mode also auto-skips these checks
D. parts.ts: replace require('node:fs') with static import (ES module fix)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
+5
-3
@@ -27,8 +27,9 @@ program
|
||||
program
|
||||
.command('init')
|
||||
.description('互動式初始化設定(建立 ~/.arcrun/config.yaml)')
|
||||
.option('--self-hosted', '使用 Self-hosted 模式(自行部署所有 Worker)')
|
||||
.action((options: { selfHosted?: boolean }) => cmdInit(options));
|
||||
.option('--local', '本機模式:不需要 Cloudflare 帳號,直接在本機測試 workflow')
|
||||
.option('--self-hosted', '完全 Self-hosted 模式:自行部署所有 Cloudflare Worker')
|
||||
.action((options: { local?: boolean; selfHosted?: boolean }) => cmdInit(options));
|
||||
|
||||
// acr creds push [credentials.yaml]
|
||||
const credsCmd = program.command('creds').description('Credential 管理');
|
||||
@@ -54,7 +55,8 @@ program
|
||||
program
|
||||
.command('validate <file>')
|
||||
.description('執行前驗證 workflow.yaml(格式、關係詞、零件存在性、credentials)')
|
||||
.action((file: string) => cmdValidate(file));
|
||||
.option('--offline', '離線模式:跳過零件存在性與 credentials 的遠端檢查')
|
||||
.action((file: string, options: { offline?: boolean }) => cmdValidate(file, options));
|
||||
|
||||
// acr parts
|
||||
// acr parts scaffold <component>
|
||||
|
||||
Reference in New Issue
Block a user