@pisell/common 1.0.58 → 1.0.60
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/.fatherrc.ts +7 -7
- package/CHANGELOG.md +16 -1
- package/README.md +2 -2
- package/es/bin/pisell.js +1 -5
- package/es/index.d.ts +2 -4
- package/es/index.js +1 -5
- package/es/script/aws/index.js +212 -129
- package/es/script/constants/index.js +75 -84
- package/es/script/deploy.js +44 -33
- package/es/script/index.js +37 -43
- package/es/script/package.json +4 -4
- package/es/script/release/index.js +152 -85
- package/es/script/release/release.js +168 -83
- package/es/script/uploadCode/index.js +309 -239
- package/es/script/uploadCode/uploadCode.js +433 -220
- package/es/script/utils/index.js +381 -265
- package/lib/bin/pisell.js +24 -4
- package/lib/index.d.ts +2 -3
- package/lib/index.js +23 -4
- package/lib/script/aws/index.js +124 -139
- package/lib/script/constants/index.js +110 -85
- package/lib/script/deploy.js +55 -34
- package/lib/script/index.js +56 -41
- package/lib/script/package.json +4 -4
- package/lib/script/release/index.js +108 -90
- package/lib/script/release/release.js +85 -82
- package/lib/script/uploadCode/index.js +230 -244
- package/lib/script/uploadCode/uploadCode.js +225 -222
- package/lib/script/utils/index.js +264 -270
- package/package.json +2 -2
- package/src/bin/pisell.js +3 -3
- package/src/script/aws/index.js +138 -138
- package/src/script/constants/index.js +86 -86
- package/src/script/deploy.js +29 -29
- package/src/script/index.js +45 -45
- package/src/script/package.json +4 -4
- package/src/script/release/index.js +119 -119
- package/src/script/release/release.js +87 -87
- package/src/script/uploadCode/index.js +284 -284
- package/src/script/uploadCode/uploadCode.js +255 -255
- package/src/script/utils/index.js +331 -331
- package/tsconfig.json +14 -14
- package/tsdown.config.ts +93 -93
- package/es/_virtual/_@oxc-project_runtime@0.108.0/helpers/asyncToGenerator.js +0 -28
- package/es/_virtual/_@oxc-project_runtime@0.108.0/helpers/defineProperty.js +0 -14
- package/es/_virtual/_@oxc-project_runtime@0.108.0/helpers/objectSpread2.js +0 -27
- package/es/_virtual/_@oxc-project_runtime@0.108.0/helpers/toPrimitive.js +0 -16
- package/es/_virtual/_@oxc-project_runtime@0.108.0/helpers/toPropertyKey.js +0 -11
- package/es/_virtual/_@oxc-project_runtime@0.108.0/helpers/typeof.js +0 -12
- package/lib/_virtual/_@oxc-project_runtime@0.108.0/helpers/asyncToGenerator.js +0 -29
- package/lib/_virtual/_@oxc-project_runtime@0.108.0/helpers/defineProperty.js +0 -14
- package/lib/_virtual/_@oxc-project_runtime@0.108.0/helpers/objectSpread2.js +0 -27
- package/lib/_virtual/_@oxc-project_runtime@0.108.0/helpers/toPrimitive.js +0 -16
- package/lib/_virtual/_@oxc-project_runtime@0.108.0/helpers/toPropertyKey.js +0 -11
- package/lib/_virtual/_@oxc-project_runtime@0.108.0/helpers/typeof.js +0 -18
- package/lib/_virtual/rolldown_runtime.js +0 -29
|
@@ -1,86 +1,171 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
+
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == _typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw new Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(_typeof(e) + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw new Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, catch: function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }
|
|
3
|
+
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
|
4
|
+
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
|
5
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
6
|
+
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
|
|
7
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
8
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
9
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
3
10
|
import { isSsrMap, outPathMap } from "../constants/index.js";
|
|
11
|
+
import { connectServer as _connectServer, getServerConfig, releaseProject } from "../utils/index.js";
|
|
4
12
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
* @
|
|
8
|
-
* @
|
|
9
|
-
|
|
10
|
-
*/
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
*/
|
|
26
|
-
setConfig() {
|
|
27
|
-
var _this = this;
|
|
28
|
-
return _asyncToGenerator(function* () {
|
|
29
|
-
const serverConfigMap = yield getServerConfig(_this.projectName);
|
|
30
|
-
let serverConfig = serverConfigMap[_this.env];
|
|
31
|
-
if (_this.env === "release") serverConfig = serverConfigMap.cn[_this.env];
|
|
32
|
-
if (_this.env === "prod") {
|
|
33
|
-
serverConfig = serverConfigMap.aws.service[_this.env];
|
|
34
|
-
serverConfig.privateKey = fs.readFileSync("../../../pem/pisell-pro.pem");
|
|
35
|
-
}
|
|
36
|
-
_this.serverConfig = serverConfig;
|
|
37
|
-
})();
|
|
38
|
-
}
|
|
39
|
-
/**
|
|
40
|
-
* @Title: 连接服务器
|
|
41
|
-
* @Describe:
|
|
42
|
-
* @Author: Zsj
|
|
43
|
-
*/
|
|
44
|
-
connectServer() {
|
|
45
|
-
var _this2 = this;
|
|
46
|
-
return _asyncToGenerator(function* () {
|
|
47
|
-
if (!_this2.serverConfig) {
|
|
48
|
-
console.log("未找到发布配置!");
|
|
49
|
-
return null;
|
|
50
|
-
}
|
|
51
|
-
_this2.conn = yield connectServer(_this2.serverConfig);
|
|
52
|
-
return _this2.conn;
|
|
53
|
-
})();
|
|
54
|
-
}
|
|
55
|
-
/**
|
|
56
|
-
* @Title: 执行发布操作
|
|
57
|
-
* @Describe:
|
|
58
|
-
* @Author: Zsj
|
|
59
|
-
*/
|
|
60
|
-
release() {
|
|
61
|
-
var _this3 = this;
|
|
62
|
-
return _asyncToGenerator(function* () {
|
|
63
|
-
return yield releaseProject(_this3.conn, {
|
|
64
|
-
path: _this3.outPath,
|
|
65
|
-
fileName: `${_this3.version}`,
|
|
66
|
-
isSSR: _this3.isSSR,
|
|
67
|
-
env: _this3.env
|
|
68
|
-
});
|
|
69
|
-
})();
|
|
70
|
-
}
|
|
71
|
-
/**
|
|
72
|
-
* @Title: 断开服务连接
|
|
73
|
-
* @Describe:
|
|
74
|
-
* @Author: Zsj
|
|
75
|
-
*/
|
|
76
|
-
disconnectServer() {
|
|
77
|
-
var _this4 = this;
|
|
78
|
-
return _asyncToGenerator(function* () {
|
|
79
|
-
return yield _this4.conn.end();
|
|
80
|
-
})();
|
|
81
|
-
}
|
|
82
|
-
};
|
|
83
|
-
var release_default = Release;
|
|
13
|
+
/**
|
|
14
|
+
* @Title: 执行发布类
|
|
15
|
+
* @Describe:
|
|
16
|
+
* @Author: Zsj
|
|
17
|
+
*/
|
|
18
|
+
var Release = /*#__PURE__*/function () {
|
|
19
|
+
function Release(props) {
|
|
20
|
+
_classCallCheck(this, Release);
|
|
21
|
+
var project = props.project,
|
|
22
|
+
env = props.env,
|
|
23
|
+
version = props.version,
|
|
24
|
+
conn = props.conn;
|
|
25
|
+
this.projectName = project.fileName;
|
|
26
|
+
this.env = env;
|
|
27
|
+
this.version = version;
|
|
28
|
+
this.conn = conn;
|
|
29
|
+
this.outPath = outPathMap[this.projectName][this.env];
|
|
30
|
+
// 是否是ssr项目
|
|
31
|
+
this.isSSR = isSsrMap[this.projectName];
|
|
32
|
+
}
|
|
84
33
|
|
|
85
|
-
|
|
86
|
-
|
|
34
|
+
/**
|
|
35
|
+
* @Title: 设置连接服务器配置
|
|
36
|
+
* @Describe:
|
|
37
|
+
* @Author: Zsj
|
|
38
|
+
*/
|
|
39
|
+
_createClass(Release, [{
|
|
40
|
+
key: "setConfig",
|
|
41
|
+
value: (function () {
|
|
42
|
+
var _setConfig = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
43
|
+
var serverConfigMap, serverConfig;
|
|
44
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
45
|
+
while (1) switch (_context.prev = _context.next) {
|
|
46
|
+
case 0:
|
|
47
|
+
_context.next = 2;
|
|
48
|
+
return getServerConfig(this.projectName);
|
|
49
|
+
case 2:
|
|
50
|
+
serverConfigMap = _context.sent;
|
|
51
|
+
serverConfig = serverConfigMap[this.env]; // 选择release默认用国内cn服务器
|
|
52
|
+
if (this.env === 'release') {
|
|
53
|
+
serverConfig = serverConfigMap.cn[this.env];
|
|
54
|
+
}
|
|
55
|
+
if (this.env === 'prod') {
|
|
56
|
+
serverConfig = serverConfigMap.aws.service[this.env];
|
|
57
|
+
serverConfig.privateKey = fs.readFileSync("../../../pem/pisell-pro.pem");
|
|
58
|
+
}
|
|
59
|
+
this.serverConfig = serverConfig;
|
|
60
|
+
case 7:
|
|
61
|
+
case "end":
|
|
62
|
+
return _context.stop();
|
|
63
|
+
}
|
|
64
|
+
}, _callee, this);
|
|
65
|
+
}));
|
|
66
|
+
function setConfig() {
|
|
67
|
+
return _setConfig.apply(this, arguments);
|
|
68
|
+
}
|
|
69
|
+
return setConfig;
|
|
70
|
+
}()
|
|
71
|
+
/**
|
|
72
|
+
* @Title: 连接服务器
|
|
73
|
+
* @Describe:
|
|
74
|
+
* @Author: Zsj
|
|
75
|
+
*/
|
|
76
|
+
)
|
|
77
|
+
}, {
|
|
78
|
+
key: "connectServer",
|
|
79
|
+
value: (function () {
|
|
80
|
+
var _connectServer2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
|
|
81
|
+
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
82
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
83
|
+
case 0:
|
|
84
|
+
if (this.serverConfig) {
|
|
85
|
+
_context2.next = 3;
|
|
86
|
+
break;
|
|
87
|
+
}
|
|
88
|
+
console.log('未找到发布配置!');
|
|
89
|
+
return _context2.abrupt("return", null);
|
|
90
|
+
case 3:
|
|
91
|
+
_context2.next = 5;
|
|
92
|
+
return _connectServer(this.serverConfig);
|
|
93
|
+
case 5:
|
|
94
|
+
this.conn = _context2.sent;
|
|
95
|
+
return _context2.abrupt("return", this.conn);
|
|
96
|
+
case 7:
|
|
97
|
+
case "end":
|
|
98
|
+
return _context2.stop();
|
|
99
|
+
}
|
|
100
|
+
}, _callee2, this);
|
|
101
|
+
}));
|
|
102
|
+
function connectServer() {
|
|
103
|
+
return _connectServer2.apply(this, arguments);
|
|
104
|
+
}
|
|
105
|
+
return connectServer;
|
|
106
|
+
}()
|
|
107
|
+
/**
|
|
108
|
+
* @Title: 执行发布操作
|
|
109
|
+
* @Describe:
|
|
110
|
+
* @Author: Zsj
|
|
111
|
+
*/
|
|
112
|
+
)
|
|
113
|
+
}, {
|
|
114
|
+
key: "release",
|
|
115
|
+
value: (function () {
|
|
116
|
+
var _release = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3() {
|
|
117
|
+
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
|
118
|
+
while (1) switch (_context3.prev = _context3.next) {
|
|
119
|
+
case 0:
|
|
120
|
+
_context3.next = 2;
|
|
121
|
+
return releaseProject(this.conn, {
|
|
122
|
+
path: this.outPath,
|
|
123
|
+
fileName: "".concat(this.version),
|
|
124
|
+
isSSR: this.isSSR,
|
|
125
|
+
env: this.env
|
|
126
|
+
});
|
|
127
|
+
case 2:
|
|
128
|
+
return _context3.abrupt("return", _context3.sent);
|
|
129
|
+
case 3:
|
|
130
|
+
case "end":
|
|
131
|
+
return _context3.stop();
|
|
132
|
+
}
|
|
133
|
+
}, _callee3, this);
|
|
134
|
+
}));
|
|
135
|
+
function release() {
|
|
136
|
+
return _release.apply(this, arguments);
|
|
137
|
+
}
|
|
138
|
+
return release;
|
|
139
|
+
}()
|
|
140
|
+
/**
|
|
141
|
+
* @Title: 断开服务连接
|
|
142
|
+
* @Describe:
|
|
143
|
+
* @Author: Zsj
|
|
144
|
+
*/
|
|
145
|
+
)
|
|
146
|
+
}, {
|
|
147
|
+
key: "disconnectServer",
|
|
148
|
+
value: (function () {
|
|
149
|
+
var _disconnectServer = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4() {
|
|
150
|
+
return _regeneratorRuntime().wrap(function _callee4$(_context4) {
|
|
151
|
+
while (1) switch (_context4.prev = _context4.next) {
|
|
152
|
+
case 0:
|
|
153
|
+
_context4.next = 2;
|
|
154
|
+
return this.conn.end();
|
|
155
|
+
case 2:
|
|
156
|
+
return _context4.abrupt("return", _context4.sent);
|
|
157
|
+
case 3:
|
|
158
|
+
case "end":
|
|
159
|
+
return _context4.stop();
|
|
160
|
+
}
|
|
161
|
+
}, _callee4, this);
|
|
162
|
+
}));
|
|
163
|
+
function disconnectServer() {
|
|
164
|
+
return _disconnectServer.apply(this, arguments);
|
|
165
|
+
}
|
|
166
|
+
return disconnectServer;
|
|
167
|
+
}())
|
|
168
|
+
}]);
|
|
169
|
+
return Release;
|
|
170
|
+
}();
|
|
171
|
+
export default Release;
|