@yizhuan-cli/cli 0.1.14 → 0.1.16-beta.0
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/package.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schemaVersion": 1,
|
|
3
3
|
"name": "yizhuan-cli",
|
|
4
|
-
"version": "0.1.
|
|
5
|
-
"compatibleCliVersion": "0.1.
|
|
6
|
-
"source": "npm:@yizhuan-cli/cli@0.1.
|
|
4
|
+
"version": "0.1.16-beta.0",
|
|
5
|
+
"compatibleCliVersion": "0.1.16-beta.0",
|
|
6
|
+
"source": "npm:@yizhuan-cli/cli@0.1.16-beta.0",
|
|
7
7
|
"digestAlgorithm": "sha256",
|
|
8
8
|
"files": [
|
|
9
9
|
{
|
package/src/doctor.js
CHANGED
|
@@ -40,6 +40,7 @@ export function inspectLocalEnvironment(
|
|
|
40
40
|
} = {},
|
|
41
41
|
{
|
|
42
42
|
packageJson = JSON.parse(fs.readFileSync(PACKAGE_PATH, 'utf8')),
|
|
43
|
+
officialManifest = loadOfficialSkill().manifest,
|
|
43
44
|
exists = fs.existsSync,
|
|
44
45
|
readFile = fs.readFileSync,
|
|
45
46
|
stat = fs.statSync,
|
|
@@ -53,9 +54,15 @@ export function inspectLocalEnvironment(
|
|
|
53
54
|
? check('pass', 'node', `Node.js ${nodeVersion} 满足 >=${minimumNode}`)
|
|
54
55
|
: check('fail', 'node', `Node.js ${nodeVersion} 不满足 ${packageJson.engines?.node || '版本要求'}`, `安装 Node.js ${minimumNode || 22} 或更高版本。`))
|
|
55
56
|
|
|
56
|
-
|
|
57
|
+
const expectedCliVersion = officialManifest.compatibleCliVersion
|
|
58
|
+
checks.push(packageJson.version === expectedCliVersion
|
|
57
59
|
? check('pass', 'cli_version', `CLI ${packageJson.version}`)
|
|
58
|
-
: check(
|
|
60
|
+
: check(
|
|
61
|
+
'fail',
|
|
62
|
+
'cli_version',
|
|
63
|
+
`CLI 版本为 ${packageJson.version},内置正式 Skill 要求 ${expectedCliVersion}`,
|
|
64
|
+
'重新安装 @yizhuan-cli/cli@latest。'
|
|
65
|
+
))
|
|
59
66
|
|
|
60
67
|
if (!exists(configPath)) {
|
|
61
68
|
checks.push(check('fail', 'config', `配置不存在:${configPath}`, '运行 yizhuan config init。'))
|