@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.
Files changed (32) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/LICENSE +21 -0
  3. package/README.md +30 -42
  4. package/README.zh-CN.md +86 -0
  5. package/dist/bin.js +72 -72
  6. package/dist/bin.js.map +3 -3
  7. package/dist/commands/deploy/DeployService.d.ts +26 -7
  8. package/dist/commands/deploy/DeployService.d.ts.map +1 -1
  9. package/dist/commands/deploy/index.d.ts.map +1 -1
  10. package/dist/commands/deploy/util/validate.d.ts +8 -0
  11. package/dist/commands/deploy/util/validate.d.ts.map +1 -0
  12. package/package.json +74 -72
  13. package/src/commands/deploy/DeployService.ts +103 -46
  14. package/src/commands/deploy/__tests__/DeployService.test.ts +52 -19
  15. package/src/commands/deploy/__tests__/simpleGit.test.ts +26 -1
  16. package/src/commands/deploy/index.ts +2 -1
  17. package/src/commands/deploy/util/validate.ts +18 -0
  18. package/src/commands/sync/__tests__/.temp/package.json +16 -0
  19. package/templates/cli/package.json +1 -5
  20. package/templates/cli/src/bin.ts +1 -1
  21. package/templates/cli/tsconfig.json +28 -28
  22. package/templates/lib/package.json +3 -10
  23. package/templates/lib/tsconfig.json +28 -28
  24. package/tsconfig.json +34 -34
  25. package/src/commands/esbuild/__tests__/.temp/getDeps/package.json +0 -1
  26. package/src/commands/generate/__tests__/.temp/test-cli/CHANGELOG.md +0 -1
  27. package/src/commands/generate/__tests__/.temp/test-cli/README.md +0 -1
  28. package/src/commands/generate/__tests__/.temp/test-cli/bin.js +0 -3
  29. package/src/commands/generate/__tests__/.temp/test-cli/package.json +0 -44
  30. package/src/commands/generate/__tests__/.temp/test-cli/src/bin.ts +0 -13
  31. package/src/commands/generate/__tests__/.temp/test-cli/src/index.ts +0 -1
  32. 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": "workspace:*",
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",
@@ -1,5 +1,5 @@
1
1
  import { Command } from 'commander'
2
- import { prompt } from 'inquirer'
2
+ import { prompt } from 'enquirer'
3
3
 
4
4
  new Command()
5
5
  .action(async () => {
@@ -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 pkg",
11
- "dev": "liuli-cli build pkg -w"
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": "workspace:*",
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
- # @liuli-util/cli-test-cli
@@ -1,3 +0,0 @@
1
- #!/usr/bin/env node
2
- // eslint-disable-next-line no-undef
3
- require('./dist/bin.js')
@@ -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,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
- }