@zeppos/zeus-cli 1.5.17 → 1.5.19

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/modules/create.js CHANGED
@@ -143,6 +143,8 @@ var inquirerFunc = function (args, _a) {
143
143
  type: 'list',
144
144
  when: function (args) {
145
145
  var isWorkoutExtension = args.appType.toLowerCase() === AppType.WORKOUT_EXTENSION;
146
+ if (!isWorkoutExtension)
147
+ return isWorkoutExtension;
146
148
  var objMap = workoutExtTemplateChoices[args.OSVersion].find(function (val) {
147
149
  var name = val.name === 'Hello World' ? 'Hello_World' : val.name;
148
150
  return name === promptTemplate;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zeppos/zeus-cli",
3
- "version": "1.5.17",
3
+ "version": "1.5.19",
4
4
  "description": "zeus mini-program tools",
5
5
  "main": "index.ts",
6
6
  "author": "zepp",
@@ -21,7 +21,7 @@
21
21
  "qrcode-terminal": "^0.12.0",
22
22
  "vorpal": "^1.12.0",
23
23
  "yargs": "^17.5.1",
24
- "@zeppos/zpm": "^3.0.27",
24
+ "@zeppos/zpm": "^3.0.28",
25
25
  "axios": "^0.27.2",
26
26
  "chalk": "^4.1.2",
27
27
  "chokidar": "^3.5.3",
@@ -57,7 +57,8 @@
57
57
  "@types/stoppable": "^1.1.1",
58
58
  "@types/update-notifier": "5.0.0",
59
59
  "@types/yargs-parser": "^21.0.0",
60
- "@types/yeoman-environment": "^2.10.7"
60
+ "@types/yeoman-environment": "^2.10.7",
61
+ "rimraf": "^3.0.2"
61
62
  },
62
63
  "_moduleAliases": {
63
64
  "zeppos-app-utils": "private-modules/zeppos-app-utils"
@@ -88,13 +88,17 @@ var AppType = index_1.config.AppType, AppSourceType = index_1.config.AppSourceTy
88
88
  var child_process_1 = require("child_process");
89
89
  var projectPreInstall = function (dir) {
90
90
  return new Promise(function (resolve) {
91
- var execInstall = (0, child_process_1.spawn)(process.platform === 'win32' ? 'npm.cmd' : 'npm', ['install'], {
92
- stdio: 'pipe',
93
- cwd: dir
94
- });
95
- execInstall.stdout.pipe(process.stdout);
96
- execInstall.on('close', function (code) {
97
- resolve(code);
91
+ if (!fs_extra_1["default"].existsSync((0, path_1.join)(dir, 'package.json'))) {
92
+ resolve(true);
93
+ return;
94
+ }
95
+ (0, child_process_1.exec)("cd ".concat(dir, " && npm install"), function (error, stdout, stderr) {
96
+ if (error) {
97
+ console.error("npm install error: ".concat(error));
98
+ process.exit(1);
99
+ }
100
+ console.log(stderr);
101
+ resolve(stdout);
98
102
  });
99
103
  });
100
104
  };
@@ -10,10 +10,10 @@
10
10
  "build": "rm -rf dist && tsc && pnpm run add",
11
11
  "add": "ts-node build.ts && pnpm -F @zeppos/zeus-cli add zeppos-app-utils && pnpm -F zeppos-dev-tools add zeppos-app-utils",
12
12
  "clean": "rm -rf node_modules && rm -rf dist",
13
- "dev": "nodemon -e ts,tsx --exec \"rm -rf dist && tsc && ts-node build.ts\" --ignore types/ --ignore dist/"
13
+ "dev": "nodemon -e ts,tsx --exec \"rimraf dist && tsc && ts-node build.ts\" --ignore types/ --ignore dist/"
14
14
  },
15
15
  "dependencies": {
16
- "@zeppos/zpm": "^3.0.27",
16
+ "@zeppos/zpm": "^3.0.28",
17
17
  "axios": "^0.27.2",
18
18
  "chalk": "^4.1.2",
19
19
  "chokidar": "^3.5.3",
@@ -39,7 +39,9 @@
39
39
  "yargs-parser": "^20.2.0",
40
40
  "yeoman-environment": "^3.9.1"
41
41
  },
42
- "files": ["dist"],
42
+ "files": [
43
+ "dist"
44
+ ],
43
45
  "devDependencies": {
44
46
  "@types/findup-sync": "^4.0.2",
45
47
  "@types/fs-extra": "^9.0.13",
@@ -47,6 +49,7 @@
47
49
  "@types/stoppable": "^1.1.1",
48
50
  "@types/update-notifier": "5.0.0",
49
51
  "@types/yargs-parser": "^21.0.0",
50
- "@types/yeoman-environment": "^2.10.7"
52
+ "@types/yeoman-environment": "^2.10.7",
53
+ "rimraf": "^3.0.2"
51
54
  }
52
55
  }