@pisell/common 0.0.48 → 0.0.50
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.
|
@@ -100,7 +100,7 @@ function init() {
|
|
|
100
100
|
*/
|
|
101
101
|
function _init() {
|
|
102
102
|
_init = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
103
|
-
var res, uploadCode, version, currentUserName, result, _fileName,
|
|
103
|
+
var res, uploadCode, version, currentUserName, result, _fileName, ossRes, conn, releaseInstance;
|
|
104
104
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
105
105
|
while (1) switch (_context.prev = _context.next) {
|
|
106
106
|
case 0:
|
|
@@ -179,19 +179,19 @@ function _init() {
|
|
|
179
179
|
case 34:
|
|
180
180
|
console.log('使用本地/dist');
|
|
181
181
|
case 35:
|
|
182
|
-
if (!(res.env === 'prod'
|
|
182
|
+
if (!(res.env === 'prod')) {
|
|
183
183
|
_context.next = 44;
|
|
184
184
|
break;
|
|
185
185
|
}
|
|
186
|
-
_fileName =
|
|
186
|
+
_fileName = res.project.fileName; // 上传oss
|
|
187
187
|
_context.next = 39;
|
|
188
188
|
return uploadStaticToOSS(_fileName);
|
|
189
189
|
case 39:
|
|
190
190
|
_context.next = 41;
|
|
191
191
|
return inquirerOss();
|
|
192
192
|
case 41:
|
|
193
|
-
|
|
194
|
-
if (
|
|
193
|
+
ossRes = _context.sent;
|
|
194
|
+
if (ossRes.is_upload_completed_OSS) {
|
|
195
195
|
_context.next = 44;
|
|
196
196
|
break;
|
|
197
197
|
}
|
|
@@ -155,11 +155,11 @@ async function init() {
|
|
|
155
155
|
} else {
|
|
156
156
|
console.log("使用本地/dist");
|
|
157
157
|
}
|
|
158
|
-
if (res.env === "prod"
|
|
159
|
-
let _fileName =
|
|
158
|
+
if (res.env === "prod") {
|
|
159
|
+
let _fileName = res.project.fileName;
|
|
160
160
|
await (0, import_aws.uploadStaticToOSS)(_fileName);
|
|
161
|
-
const
|
|
162
|
-
if (!
|
|
161
|
+
const ossRes = await inquirerOss();
|
|
162
|
+
if (!ossRes.is_upload_completed_OSS) {
|
|
163
163
|
return;
|
|
164
164
|
}
|
|
165
165
|
}
|