@zeppos/zeus-cli 1.6.0 → 1.6.7-beta1
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,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zeppos/zeus-cli",
|
|
3
|
-
"version": "1.6.
|
|
3
|
+
"version": "1.6.7-beta1",
|
|
4
4
|
"description": "zeus mini-program tools",
|
|
5
5
|
"main": "index.ts",
|
|
6
6
|
"author": "zepp",
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"vorpal": "^1.12.0",
|
|
23
23
|
"yargs": "^17.5.1",
|
|
24
24
|
"@zeppos/form-data": "^4.0.0",
|
|
25
|
-
"@zeppos/zpm": "^3.1.
|
|
25
|
+
"@zeppos/zpm": "^3.1.13-beta1",
|
|
26
26
|
"axios": "^0.27.2",
|
|
27
27
|
"chalk": "^4.1.2",
|
|
28
28
|
"chokidar": "^3.5.3",
|
|
@@ -1,4 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __assign = (this && this.__assign) || function () {
|
|
3
|
+
__assign = Object.assign || function(t) {
|
|
4
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
+
s = arguments[i];
|
|
6
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
+
t[p] = s[p];
|
|
8
|
+
}
|
|
9
|
+
return t;
|
|
10
|
+
};
|
|
11
|
+
return __assign.apply(this, arguments);
|
|
12
|
+
};
|
|
2
13
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
14
|
if (k2 === undefined) k2 = k;
|
|
4
15
|
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
@@ -111,11 +122,15 @@ var buildSupportV3Config = function (workspace, mode, buildConfigOption) {
|
|
|
111
122
|
if (mode === void 0) { mode = BuildMode.PROD; }
|
|
112
123
|
if (buildConfigOption === void 0) { buildConfigOption = {}; }
|
|
113
124
|
return __awaiter(void 0, void 0, void 0, function () {
|
|
114
|
-
var _a,
|
|
115
|
-
return __generator(this, function (
|
|
116
|
-
switch (
|
|
125
|
+
var _a, sources_1, _b, targets, _c, sources, buildOptions, _d, js2c, _e, js2bin, _f, png2vg, _g, prune, _h, compress, _j, ip, zabName_1, distDir_1, name_1, newName_1, error_1;
|
|
126
|
+
return __generator(this, function (_k) {
|
|
127
|
+
switch (_k.label) {
|
|
117
128
|
case 0:
|
|
118
|
-
|
|
129
|
+
if (buildConfigOption.sources) {
|
|
130
|
+
_a = buildConfigOption.sources, sources_1 = _a === void 0 ? [] : _a;
|
|
131
|
+
buildConfigOption = __assign(__assign({}, buildConfigOption), { sources: Array.isArray(sources_1) ? sources_1 : [sources_1] });
|
|
132
|
+
}
|
|
133
|
+
_b = buildConfigOption.targets, targets = _b === void 0 ? [] : _b, _c = buildConfigOption.sources, sources = _c === void 0 ? [] : _c;
|
|
119
134
|
buildOptions = {
|
|
120
135
|
path: workspace,
|
|
121
136
|
buildMode: mode,
|
|
@@ -124,7 +139,7 @@ var buildSupportV3Config = function (workspace, mode, buildConfigOption) {
|
|
|
124
139
|
jsc: TransformType.Default
|
|
125
140
|
};
|
|
126
141
|
if ([BuildMode.PROD, BuildMode.PREVIEW].includes(mode)) {
|
|
127
|
-
|
|
142
|
+
_d = buildConfigOption || {}, js2c = _d.js2c, _e = _d.js2bin, js2bin = _e === void 0 ? true : _e, _f = _d.png2vg, png2vg = _f === void 0 ? true : _f, _g = _d.prune, prune = _g === void 0 ? true : _g, _h = _d.compress, compress = _h === void 0 ? true : _h, _j = _d.ip, ip = _j === void 0 ? BuildMode.PROD === mode : _j;
|
|
128
143
|
js2c = (0, tools_1.booleanString)(js2c);
|
|
129
144
|
js2bin = (0, tools_1.booleanString)(js2bin);
|
|
130
145
|
js2c && Object.assign(buildOptions, { jsc: TransformType.C });
|
|
@@ -136,9 +151,9 @@ var buildSupportV3Config = function (workspace, mode, buildConfigOption) {
|
|
|
136
151
|
ip: (0, tools_1.booleanString)(ip)
|
|
137
152
|
});
|
|
138
153
|
}
|
|
139
|
-
|
|
154
|
+
_k.label = 1;
|
|
140
155
|
case 1:
|
|
141
|
-
|
|
156
|
+
_k.trys.push([1, 6, , 7]);
|
|
142
157
|
if (targets.length) {
|
|
143
158
|
index_1.logger.info("Start building package, targets: ".concat(targets.join(', '), "."));
|
|
144
159
|
}
|
|
@@ -147,10 +162,10 @@ var buildSupportV3Config = function (workspace, mode, buildConfigOption) {
|
|
|
147
162
|
}
|
|
148
163
|
if (!(mode === BuildMode.DEV && (0, lodash_1.get)(buildConfigOption, '_[0]') !== 'install')) return [3, 3];
|
|
149
164
|
return [4, (0, zpm_1.startWithoutDist)(buildOptions)];
|
|
150
|
-
case 2: return [2,
|
|
165
|
+
case 2: return [2, _k.sent()];
|
|
151
166
|
case 3: return [4, (0, zpm_1.start)(buildOptions)];
|
|
152
167
|
case 4:
|
|
153
|
-
zabName_1 =
|
|
168
|
+
zabName_1 = _k.sent();
|
|
154
169
|
if (!zabName_1) {
|
|
155
170
|
index_1.logger.error("Build package error, the package name is ".concat(zabName_1));
|
|
156
171
|
process.exit(1);
|
|
@@ -174,7 +189,7 @@ var buildSupportV3Config = function (workspace, mode, buildConfigOption) {
|
|
|
174
189
|
return [2, zabName_1];
|
|
175
190
|
case 5: return [3, 7];
|
|
176
191
|
case 6:
|
|
177
|
-
error_1 =
|
|
192
|
+
error_1 = _k.sent();
|
|
178
193
|
index_1.logger.error(error_1);
|
|
179
194
|
return [3, 7];
|
|
180
195
|
case 7: return [2];
|
|
@@ -72,8 +72,8 @@ var lodash_1 = require("lodash");
|
|
|
72
72
|
var config_1 = require("../config");
|
|
73
73
|
var accountEnv = (0, config_1.getLocalConfig)().account_env;
|
|
74
74
|
var LOCAL_CACHE_DEVICE_PATH = path.resolve(os.homedir(), ".zepp/.zeus_devices");
|
|
75
|
-
var serverPath =
|
|
76
|
-
var serverPathBeta = 'https://upload-cdn.zepp.com/zeppos/devkit/zeus/devices.
|
|
75
|
+
var serverPath = 'https://upload-cdn.zepp.com/zeppos/devkit/zeus/devices.json';
|
|
76
|
+
var serverPathBeta = 'https://upload-cdn.zepp.com/zeppos/devkit/zeus/devices.beta1.json';
|
|
77
77
|
var DeviceScreenType;
|
|
78
78
|
(function (DeviceScreenType) {
|
|
79
79
|
DeviceScreenType["R"] = "r";
|