@wwkit/cft 1.0.14 → 1.0.16
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/bin/index.js +4 -0
- package/package.json +2 -2
package/bin/index.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
+
import { execSync } from 'node:child_process'
|
|
3
4
|
import { install, status, clear, showConfig, showEnv } from '../src/index.js'
|
|
4
5
|
|
|
5
6
|
const command = process.argv[2]
|
|
@@ -25,6 +26,8 @@ if (command === 'install') {
|
|
|
25
26
|
showConfig()
|
|
26
27
|
} else if (command === 'env') {
|
|
27
28
|
showEnv()
|
|
29
|
+
} else if (command === 'upgrade') {
|
|
30
|
+
execSync('npm install -g @wwkit/cft@latest', { stdio: 'inherit' })
|
|
28
31
|
} else if (command === 'help' || command === undefined) {
|
|
29
32
|
console.log(`cft - Chrome for Testing 安装器
|
|
30
33
|
|
|
@@ -34,6 +37,7 @@ if (command === 'install') {
|
|
|
34
37
|
cft config 显示用户配置(~/.config/cft/config.json5)
|
|
35
38
|
cft env 显示 cft 创建的全局环境变量
|
|
36
39
|
cft clear 删除安装产物(~/.config/cft/)
|
|
40
|
+
cft upgrade 升级 cft 自身(npm install -g @wwkit/cft@latest)
|
|
37
41
|
cft help 显示本帮助
|
|
38
42
|
|
|
39
43
|
安装目录: ~/.config/cft/`)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wwkit/cft",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.16",
|
|
4
4
|
"author": "bluesliu <langcai163@163.com>",
|
|
5
5
|
"description": "Chrome for Testing (CFT) installer — download, extract, chmod, dep-check",
|
|
6
6
|
"type": "module",
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
38
|
"extract-zip": "^2.0.1",
|
|
39
|
-
"@wwkit/shared": "1.0.
|
|
39
|
+
"@wwkit/shared": "1.0.16"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
42
|
"jest": "^29.7.0"
|