@yizhuan-cli/cli 0.1.7 → 0.1.9

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.
package/README.md CHANGED
@@ -7,13 +7,13 @@
7
7
  需要 Node.js 22 或更高版本。
8
8
 
9
9
  ```bash
10
- npm install -g @yizhuan-cli/cli@0.1.7
10
+ npm install -g @yizhuan-cli/cli@0.1.9
11
11
  ```
12
12
 
13
13
  如果发布在私有 npm registry,请加上对应 registry:
14
14
 
15
15
  ```bash
16
- npm install -g @yizhuan-cli/cli@0.1.7 --registry=https://your-private-registry.example
16
+ npm install -g @yizhuan-cli/cli@0.1.9 --registry=https://your-private-registry.example
17
17
  ```
18
18
 
19
19
  ## 配置
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yizhuan-cli/cli",
3
- "version": "0.1.7",
3
+ "version": "0.1.9",
4
4
  "description": "易撰命令行工具,用于通过 API Key 查询易撰真实数据。",
5
5
  "private": false,
6
6
  "type": "module",
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "schemaVersion": 1,
3
3
  "name": "yizhuan-cli",
4
- "version": "0.1.7",
5
- "compatibleCliVersion": "0.1.7",
6
- "source": "npm:@yizhuan-cli/cli@0.1.7",
4
+ "version": "0.1.9",
5
+ "compatibleCliVersion": "0.1.9",
6
+ "source": "npm:@yizhuan-cli/cli@0.1.9",
7
7
  "digestAlgorithm": "sha256",
8
8
  "files": [
9
9
  {
package/src/config.js CHANGED
@@ -158,7 +158,7 @@ Options:
158
158
  --api-base-url <url> API 地址,默认 ${DEFAULT_API_BASE_URL}
159
159
  --api-key-stdin 从标准输入读取 API Key(推荐用于自动化)
160
160
  --api-key <key> 从参数读取 API Key(可能保留在 Shell 历史中)
161
- --force 覆盖已有配置
161
+ --force 覆盖已有配置;未指定地址时重置为正式 API 地址
162
162
  --help 显示本帮助
163
163
 
164
164
  未持有 API Key:${CLI_TOOLS_URL}`)
@@ -187,9 +187,7 @@ export async function runConfigInit(
187
187
  }
188
188
 
189
189
  const apiKey = validateApiKey(await readApiKey(args))
190
- const apiBaseUrl = validateApiBaseUrl(
191
- args.apiBaseUrl || existingConfig?.apiBaseUrl || DEFAULT_API_BASE_URL
192
- )
190
+ const apiBaseUrl = validateApiBaseUrl(args.apiBaseUrl || DEFAULT_API_BASE_URL)
193
191
  const config = {
194
192
  ...(existingConfig || {}),
195
193
  apiBaseUrl,
package/src/doctor.js CHANGED
@@ -52,9 +52,9 @@ export function inspectLocalEnvironment(
52
52
  ? check('pass', 'node', `Node.js ${nodeVersion} 满足 >=${minimumNode}`)
53
53
  : check('fail', 'node', `Node.js ${nodeVersion} 不满足 ${packageJson.engines?.node || '版本要求'}`, `安装 Node.js ${minimumNode || 22} 或更高版本。`))
54
54
 
55
- checks.push(packageJson.version === '0.1.7'
55
+ checks.push(packageJson.version === '0.1.9'
56
56
  ? check('pass', 'cli_version', `CLI ${packageJson.version}`)
57
- : check('fail', 'cli_version', `CLI 版本为 ${packageJson.version},预期 0.1.7`, '安装 @yizhuan-cli/cli@0.1.7。'))
57
+ : check('fail', 'cli_version', `CLI 版本为 ${packageJson.version},预期 0.1.9`, '安装 @yizhuan-cli/cli@0.1.9。'))
58
58
 
59
59
  if (!exists(configPath)) {
60
60
  checks.push(check('fail', 'config', `配置不存在:${configPath}`, '运行 yizhuan config init。'))