@liuli-util/cli 3.16.0 → 3.18.0
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +8 -0
- package/LICENSE +21 -0
- package/README.md +30 -42
- package/README.zh-CN.md +86 -0
- package/dist/bin.js +72 -72
- package/dist/bin.js.map +3 -3
- package/dist/commands/deploy/DeployService.d.ts +26 -7
- package/dist/commands/deploy/DeployService.d.ts.map +1 -1
- package/dist/commands/deploy/index.d.ts.map +1 -1
- package/dist/commands/deploy/util/validate.d.ts +8 -0
- package/dist/commands/deploy/util/validate.d.ts.map +1 -0
- package/package.json +74 -72
- package/src/commands/deploy/DeployService.ts +103 -46
- package/src/commands/deploy/__tests__/DeployService.test.ts +52 -19
- package/src/commands/deploy/__tests__/simpleGit.test.ts +26 -1
- package/src/commands/deploy/index.ts +2 -1
- package/src/commands/deploy/util/validate.ts +18 -0
- package/src/commands/sync/__tests__/.temp/package.json +16 -0
- package/templates/cli/package.json +1 -5
- package/templates/cli/src/bin.ts +1 -1
- package/templates/cli/tsconfig.json +28 -28
- package/templates/lib/package.json +3 -10
- package/templates/lib/tsconfig.json +28 -28
- package/tsconfig.json +34 -34
- package/src/commands/esbuild/__tests__/.temp/getDeps/package.json +0 -1
- package/src/commands/generate/__tests__/.temp/test-cli/CHANGELOG.md +0 -1
- package/src/commands/generate/__tests__/.temp/test-cli/README.md +0 -1
- package/src/commands/generate/__tests__/.temp/test-cli/bin.js +0 -3
- package/src/commands/generate/__tests__/.temp/test-cli/package.json +0 -44
- package/src/commands/generate/__tests__/.temp/test-cli/src/bin.ts +0 -13
- package/src/commands/generate/__tests__/.temp/test-cli/src/index.ts +0 -1
- package/src/commands/generate/__tests__/.temp/test-cli/tsconfig.json +0 -28
@@ -13,18 +13,14 @@
|
|
13
13
|
"bin": {
|
14
14
|
"cli-name": "./bin.js"
|
15
15
|
},
|
16
|
-
"jest": {
|
17
|
-
"preset": "ts-jest"
|
18
|
-
},
|
19
16
|
"dependencies": {
|
20
17
|
"commander": "^8.2.0",
|
21
18
|
"enquirer": "^2.3.6",
|
22
19
|
"fs-extra": "^10.0.0"
|
23
20
|
},
|
24
21
|
"devDependencies": {
|
25
|
-
"@liuli-util/cli": "
|
22
|
+
"@liuli-util/cli": "^3.18.0",
|
26
23
|
"@types/fs-extra": "^9.0.13",
|
27
|
-
"@types/inquirer": "^8.1.2",
|
28
24
|
"@types/jest": "^27.0.2",
|
29
25
|
"@types/lodash": "^4.14.173",
|
30
26
|
"@types/node": "^16.9.6",
|
package/templates/cli/src/bin.ts
CHANGED
@@ -1,28 +1,28 @@
|
|
1
|
-
{
|
2
|
-
"compilerOptions": {
|
3
|
-
"target": "ESNext",
|
4
|
-
"lib": [
|
5
|
-
"ESNext"
|
6
|
-
],
|
7
|
-
"outDir": "./dist",
|
8
|
-
"skipLibCheck": true,
|
9
|
-
"esModuleInterop": true,
|
10
|
-
"strict": true,
|
11
|
-
"module": "ESNext",
|
12
|
-
"moduleResolution": "node",
|
13
|
-
"sourceMap": true,
|
14
|
-
"declaration": true,
|
15
|
-
"declarationMap": true
|
16
|
-
},
|
17
|
-
"include": [
|
18
|
-
"src"
|
19
|
-
],
|
20
|
-
"typedocOptions": {
|
21
|
-
"entryPoints": [
|
22
|
-
"src/index.ts"
|
23
|
-
],
|
24
|
-
"out": "docs",
|
25
|
-
"readme": "README.md",
|
26
|
-
"gitRemote": "origin"
|
27
|
-
}
|
28
|
-
}
|
1
|
+
{
|
2
|
+
"compilerOptions": {
|
3
|
+
"target": "ESNext",
|
4
|
+
"lib": [
|
5
|
+
"ESNext"
|
6
|
+
],
|
7
|
+
"outDir": "./dist",
|
8
|
+
"skipLibCheck": true,
|
9
|
+
"esModuleInterop": true,
|
10
|
+
"strict": true,
|
11
|
+
"module": "ESNext",
|
12
|
+
"moduleResolution": "node",
|
13
|
+
"sourceMap": true,
|
14
|
+
"declaration": true,
|
15
|
+
"declarationMap": true
|
16
|
+
},
|
17
|
+
"include": [
|
18
|
+
"src"
|
19
|
+
],
|
20
|
+
"typedocOptions": {
|
21
|
+
"entryPoints": [
|
22
|
+
"src/index.ts"
|
23
|
+
],
|
24
|
+
"out": "docs",
|
25
|
+
"readme": "README.md",
|
26
|
+
"gitRemote": "origin"
|
27
|
+
}
|
28
|
+
}
|
@@ -7,19 +7,12 @@
|
|
7
7
|
"types": "dist/index.d.ts",
|
8
8
|
"license": "MIT",
|
9
9
|
"scripts": {
|
10
|
-
"build": "rimraf dist && liuli-cli build
|
11
|
-
"dev": "liuli-cli build
|
12
|
-
},
|
13
|
-
"jest": {
|
14
|
-
"preset": "ts-jest"
|
10
|
+
"build": "rimraf dist && liuli-cli build lib",
|
11
|
+
"dev": "liuli-cli build lib -w"
|
15
12
|
},
|
16
13
|
"devDependencies": {
|
17
|
-
"@liuli-util/cli": "
|
18
|
-
"@types/jest": "^27.0.2",
|
19
|
-
"esno": "^0.9.1",
|
20
|
-
"jest": "^27.2.1",
|
14
|
+
"@liuli-util/cli": "^3.18.0",
|
21
15
|
"rimraf": "^3.0.2",
|
22
|
-
"ts-jest": "^27.0.5",
|
23
16
|
"type-fest": "^2.3.4",
|
24
17
|
"typescript": "^4.4.3"
|
25
18
|
}
|
@@ -1,28 +1,28 @@
|
|
1
|
-
{
|
2
|
-
"compilerOptions": {
|
3
|
-
"target": "ESNext",
|
4
|
-
"lib": [
|
5
|
-
"ESNext"
|
6
|
-
],
|
7
|
-
"outDir": "./dist",
|
8
|
-
"skipLibCheck": true,
|
9
|
-
"esModuleInterop": true,
|
10
|
-
"strict": true,
|
11
|
-
"module": "ESNext",
|
12
|
-
"moduleResolution": "node",
|
13
|
-
"sourceMap": true,
|
14
|
-
"declaration": true,
|
15
|
-
"declarationMap": true
|
16
|
-
},
|
17
|
-
"include": [
|
18
|
-
"src"
|
19
|
-
],
|
20
|
-
"typedocOptions": {
|
21
|
-
"entryPoints": [
|
22
|
-
"src/index.ts"
|
23
|
-
],
|
24
|
-
"out": "docs",
|
25
|
-
"readme": "README.md",
|
26
|
-
"gitRemote": "origin"
|
27
|
-
}
|
28
|
-
}
|
1
|
+
{
|
2
|
+
"compilerOptions": {
|
3
|
+
"target": "ESNext",
|
4
|
+
"lib": [
|
5
|
+
"ESNext"
|
6
|
+
],
|
7
|
+
"outDir": "./dist",
|
8
|
+
"skipLibCheck": true,
|
9
|
+
"esModuleInterop": true,
|
10
|
+
"strict": true,
|
11
|
+
"module": "ESNext",
|
12
|
+
"moduleResolution": "node",
|
13
|
+
"sourceMap": true,
|
14
|
+
"declaration": true,
|
15
|
+
"declarationMap": true
|
16
|
+
},
|
17
|
+
"include": [
|
18
|
+
"src"
|
19
|
+
],
|
20
|
+
"typedocOptions": {
|
21
|
+
"entryPoints": [
|
22
|
+
"src/index.ts"
|
23
|
+
],
|
24
|
+
"out": "docs",
|
25
|
+
"readme": "README.md",
|
26
|
+
"gitRemote": "origin"
|
27
|
+
}
|
28
|
+
}
|
package/tsconfig.json
CHANGED
@@ -1,34 +1,34 @@
|
|
1
|
-
{
|
2
|
-
"compilerOptions": {
|
3
|
-
"target": "ESNext",
|
4
|
-
"lib": [
|
5
|
-
"ESNext"
|
6
|
-
],
|
7
|
-
"outDir": "./dist",
|
8
|
-
"skipLibCheck": true,
|
9
|
-
"esModuleInterop": true,
|
10
|
-
"strict": true,
|
11
|
-
"module": "ESNext",
|
12
|
-
"moduleResolution": "node",
|
13
|
-
"sourceMap": true,
|
14
|
-
"declaration": true,
|
15
|
-
"declarationMap": true,
|
16
|
-
"resolveJsonModule": true
|
17
|
-
},
|
18
|
-
"include": [
|
19
|
-
"src"
|
20
|
-
],
|
21
|
-
"typedocOptions": {
|
22
|
-
"entryPoints": [
|
23
|
-
"src/index.ts"
|
24
|
-
],
|
25
|
-
"out": "docs",
|
26
|
-
"readme": "README.md",
|
27
|
-
"gitRemote": "origin"
|
28
|
-
},
|
29
|
-
"ts-node": {
|
30
|
-
"compilerOptions": {
|
31
|
-
"module": "CommonJS"
|
32
|
-
}
|
33
|
-
}
|
34
|
-
}
|
1
|
+
{
|
2
|
+
"compilerOptions": {
|
3
|
+
"target": "ESNext",
|
4
|
+
"lib": [
|
5
|
+
"ESNext"
|
6
|
+
],
|
7
|
+
"outDir": "./dist",
|
8
|
+
"skipLibCheck": true,
|
9
|
+
"esModuleInterop": true,
|
10
|
+
"strict": true,
|
11
|
+
"module": "ESNext",
|
12
|
+
"moduleResolution": "node",
|
13
|
+
"sourceMap": true,
|
14
|
+
"declaration": true,
|
15
|
+
"declarationMap": true,
|
16
|
+
"resolveJsonModule": true
|
17
|
+
},
|
18
|
+
"include": [
|
19
|
+
"src"
|
20
|
+
],
|
21
|
+
"typedocOptions": {
|
22
|
+
"entryPoints": [
|
23
|
+
"src/index.ts"
|
24
|
+
],
|
25
|
+
"out": "docs",
|
26
|
+
"readme": "README.md",
|
27
|
+
"gitRemote": "origin"
|
28
|
+
},
|
29
|
+
"ts-node": {
|
30
|
+
"compilerOptions": {
|
31
|
+
"module": "CommonJS"
|
32
|
+
}
|
33
|
+
}
|
34
|
+
}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"devDependencies":{"@types/node":"16"},"dependencies":{"ora":"^6"},"peerDependencies":{"typescript":"^4"}}
|
@@ -1 +0,0 @@
|
|
1
|
-
# CHANGELOG
|
@@ -1 +0,0 @@
|
|
1
|
-
# @liuli-util/cli-test-cli
|
@@ -1,44 +0,0 @@
|
|
1
|
-
{
|
2
|
-
"name": "test-cli",
|
3
|
-
"version": "0.1.0",
|
4
|
-
"main": "dist/index.js",
|
5
|
-
"module": "dist/index.esm.js",
|
6
|
-
"types": "dist/index.d.ts",
|
7
|
-
"license": "MIT",
|
8
|
-
"scripts": {
|
9
|
-
"build": "rimraf dist && liuli-cli build cli",
|
10
|
-
"dev": "liuli-cli build cli -w",
|
11
|
-
"start": "esno src/bin.ts",
|
12
|
-
"docs:server": "live-server docs",
|
13
|
-
"docs:dev": "typedoc --watch",
|
14
|
-
"docs:build": "rimraf docs && typedoc",
|
15
|
-
"docs:deploy": "yarn docs:build && gh-pages -d docs/ -e / -a"
|
16
|
-
},
|
17
|
-
"bin": {
|
18
|
-
"cli-name": "./bin.js"
|
19
|
-
},
|
20
|
-
"jest": {
|
21
|
-
"preset": "ts-jest"
|
22
|
-
},
|
23
|
-
"dependencies": {
|
24
|
-
"commander": "^8.2.0",
|
25
|
-
"fs-extra": "^10.0.0",
|
26
|
-
"inquirer": "^8.1.5"
|
27
|
-
},
|
28
|
-
"devDependencies": {
|
29
|
-
"@liuli-util/cli": "^3.11.1",
|
30
|
-
"@types/fs-extra": "^9.0.13",
|
31
|
-
"@types/inquirer": "^8.1.2",
|
32
|
-
"@types/jest": "^27.0.2",
|
33
|
-
"@types/lodash": "^4.14.173",
|
34
|
-
"@types/node": "^16.9.6",
|
35
|
-
"esno": "^0.9.1",
|
36
|
-
"gh-pages": "^3.2.3",
|
37
|
-
"jest": "^27.2.1",
|
38
|
-
"rimraf": "^3.0.2",
|
39
|
-
"ts-jest": "^27.0.5",
|
40
|
-
"type-fest": "^2.3.4",
|
41
|
-
"typedoc": "^0.22.4",
|
42
|
-
"typescript": "^4.4.3"
|
43
|
-
}
|
44
|
-
}
|
@@ -1,13 +0,0 @@
|
|
1
|
-
import { Command } from 'commander'
|
2
|
-
import { prompt } from 'inquirer'
|
3
|
-
|
4
|
-
new Command()
|
5
|
-
.action(async () => {
|
6
|
-
const { name } = await prompt<{ name: string }>({
|
7
|
-
type: 'input',
|
8
|
-
name: 'name',
|
9
|
-
message: '请输入名字',
|
10
|
-
})
|
11
|
-
console.log(`hello ${name}`)
|
12
|
-
})
|
13
|
-
.parse()
|
@@ -1 +0,0 @@
|
|
1
|
-
export {}
|
@@ -1,28 +0,0 @@
|
|
1
|
-
{
|
2
|
-
"compilerOptions": {
|
3
|
-
"target": "ESNext",
|
4
|
-
"lib": [
|
5
|
-
"ESNext"
|
6
|
-
],
|
7
|
-
"outDir": "./dist",
|
8
|
-
"skipLibCheck": true,
|
9
|
-
"esModuleInterop": true,
|
10
|
-
"strict": true,
|
11
|
-
"module": "ESNext",
|
12
|
-
"moduleResolution": "node",
|
13
|
-
"sourceMap": true,
|
14
|
-
"declaration": true,
|
15
|
-
"declarationMap": true
|
16
|
-
},
|
17
|
-
"include": [
|
18
|
-
"src"
|
19
|
-
],
|
20
|
-
"typedocOptions": {
|
21
|
-
"entryPoints": [
|
22
|
-
"src/index.ts"
|
23
|
-
],
|
24
|
-
"out": "docs",
|
25
|
-
"readme": "README.md",
|
26
|
-
"gitRemote": "origin"
|
27
|
-
}
|
28
|
-
}
|