@teams-max/mwsp 2.0.0 → 2.0.2

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/bin/mwsp.js CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  require('v8-compile-cache');
3
- const { run } = require('../lib/index')
3
+ const { run } = require('../lib/index');
4
4
  run().catch((err) => {
5
5
  console.error(err);
6
6
  process.exit(1);
7
- });
7
+ });
package/es/cli/build.js CHANGED
@@ -55,7 +55,7 @@ function _build() {
55
55
  env.VUE_JENKINS_BUILD = JENKINS_BUILD;
56
56
  env.VUE_APP_KEY = appKey;
57
57
  _context.next = 21;
58
- return exec('vue-cli-service', ['serve'], {
58
+ return exec('vue-cli-service', ['build'], {
59
59
  env: env
60
60
  });
61
61
  case 21:
@@ -1 +1,6 @@
1
- {"name":"chalk","main":"index.js","license":"MIT","types":"index.d.ts"}
1
+ {
2
+ "name": "chalk",
3
+ "license": "MIT",
4
+ "main": "index.js",
5
+ "types": "index.d.ts"
6
+ }
@@ -1 +1,7 @@
1
- {"name":"cross-spawn","main":"index.js","author":"André Cruz <andre@moxy.studio>","license":"MIT","types":"index.d.ts"}
1
+ {
2
+ "name": "cross-spawn",
3
+ "license": "MIT",
4
+ "author": "André Cruz <andre@moxy.studio>",
5
+ "main": "index.js",
6
+ "types": "index.d.ts"
7
+ }
@@ -1,8 +1,13 @@
1
1
  var path = require('path');
2
2
  var _require = require("./index"),
3
3
  logStep = _require.logStep,
4
- printErrorAndExit = _require.printErrorAndExit;
4
+ printErrorAndExit = _require.printErrorAndExit,
5
+ getCfg = _require.getCfg;
5
6
  function defineConfig(config) {
7
+ var cfg = getCfg();
8
+ var ASG_DIR = cfg.ASG_DIR;
9
+ var env = Object.create(process.env);
10
+ env.ASG_DIR = ASG_DIR;
6
11
  if (!process.env.ASG_DIR) {
7
12
  logStep('The Asgard directory does not exist, using default config...');
8
13
  return config;
@@ -1,9 +1,16 @@
1
1
  /// <reference types="node"/>
2
2
  import { ChildProcess } from 'child_process';
3
- import { Stream, Readable as ReadableStream } from 'stream';
3
+ import { Readable as ReadableStream, Stream } from 'stream';
4
4
 
5
5
  declare namespace execa {
6
- type StdioOption = 'pipe' | 'ipc' | 'ignore' | 'inherit' | Stream | number | undefined;
6
+ type StdioOption =
7
+ | 'pipe'
8
+ | 'ipc'
9
+ | 'ignore'
10
+ | 'inherit'
11
+ | Stream
12
+ | number
13
+ | undefined;
7
14
 
8
15
  interface CommonOptions<EncodingType> {
9
16
  /**
@@ -220,7 +227,8 @@ declare namespace execa {
220
227
  readonly input?: string | Buffer | ReadableStream;
221
228
  }
222
229
 
223
- interface SyncOptions<EncodingType = string> extends CommonOptions<EncodingType> {
230
+ interface SyncOptions<EncodingType = string>
231
+ extends CommonOptions<EncodingType> {
224
232
  /**
225
233
  Write some input to the `stdin` of your binary.
226
234
  */
@@ -347,7 +355,8 @@ declare namespace execa {
347
355
  originalMessage?: string;
348
356
  }
349
357
 
350
- interface ExecaError<StdoutErrorType = string> extends ExecaSyncError<StdoutErrorType> {
358
+ interface ExecaError<StdoutErrorType = string>
359
+ extends ExecaSyncError<StdoutErrorType> {
351
360
  /**
352
361
  The output of the process with `stdout` and `stderr` interleaved.
353
362
 
@@ -376,7 +385,9 @@ declare namespace execa {
376
385
 
377
386
  interface ExecaChildPromise<StdoutErrorType> {
378
387
  catch<ResultType = never>(
379
- onRejected?: (reason: ExecaError<StdoutErrorType>) => ResultType | PromiseLike<ResultType>,
388
+ onRejected?: (
389
+ reason: ExecaError<StdoutErrorType>,
390
+ ) => ResultType | PromiseLike<ResultType>,
380
391
  ): Promise<ExecaReturnValue<StdoutErrorType> | ResultType>;
381
392
 
382
393
  /**
@@ -438,14 +449,21 @@ declare const execa: {
438
449
  execa('echo', ['unicorns']).stdout.pipe(process.stdout);
439
450
  ```
440
451
  */
441
- (file: string, arguments?: readonly string[], options?: execa.Options): execa.ExecaChildProcess;
452
+ (
453
+ file: string,
454
+ arguments?: readonly string[],
455
+ options?: execa.Options,
456
+ ): execa.ExecaChildProcess;
442
457
  (
443
458
  file: string,
444
459
  arguments?: readonly string[],
445
460
  options?: execa.Options<null>,
446
461
  ): execa.ExecaChildProcess<Buffer>;
447
462
  (file: string, options?: execa.Options): execa.ExecaChildProcess;
448
- (file: string, options?: execa.Options<null>): execa.ExecaChildProcess<Buffer>;
463
+ (
464
+ file: string,
465
+ options?: execa.Options<null>,
466
+ ): execa.ExecaChildProcess<Buffer>;
449
467
 
450
468
  /**
451
469
  Execute a file synchronously.
@@ -467,7 +485,10 @@ declare const execa: {
467
485
  options?: execa.SyncOptions<null>,
468
486
  ): execa.ExecaSyncReturnValue<Buffer>;
469
487
  sync(file: string, options?: execa.SyncOptions): execa.ExecaSyncReturnValue;
470
- sync(file: string, options?: execa.SyncOptions<null>): execa.ExecaSyncReturnValue<Buffer>;
488
+ sync(
489
+ file: string,
490
+ options?: execa.SyncOptions<null>,
491
+ ): execa.ExecaSyncReturnValue<Buffer>;
471
492
 
472
493
  /**
473
494
  Same as `execa()` except both file and arguments are specified in a single `command` string. For example, `execa('echo', ['unicorns'])` is the same as `execa.command('echo unicorns')`.
@@ -491,7 +512,10 @@ declare const execa: {
491
512
  ```
492
513
  */
493
514
  command(command: string, options?: execa.Options): execa.ExecaChildProcess;
494
- command(command: string, options?: execa.Options<null>): execa.ExecaChildProcess<Buffer>;
515
+ command(
516
+ command: string,
517
+ options?: execa.Options<null>,
518
+ ): execa.ExecaChildProcess<Buffer>;
495
519
 
496
520
  /**
497
521
  Same as `execa.command()` but synchronous.
@@ -499,7 +523,10 @@ declare const execa: {
499
523
  @param command - The program/script to execute and its arguments.
500
524
  @returns A result `Object` with `stdout` and `stderr` properties.
501
525
  */
502
- commandSync(command: string, options?: execa.SyncOptions): execa.ExecaSyncReturnValue;
526
+ commandSync(
527
+ command: string,
528
+ options?: execa.SyncOptions,
529
+ ): execa.ExecaSyncReturnValue;
503
530
  commandSync(
504
531
  command: string,
505
532
  options?: execa.SyncOptions<null>,
@@ -528,7 +555,10 @@ declare const execa: {
528
555
  options?: execa.Options<null>,
529
556
  ): execa.ExecaChildProcess<Buffer>;
530
557
  node(scriptPath: string, options?: execa.Options): execa.ExecaChildProcess;
531
- node(scriptPath: string, options?: execa.Options<null>): execa.ExecaChildProcess<Buffer>;
558
+ node(
559
+ scriptPath: string,
560
+ options?: execa.Options<null>,
561
+ ): execa.ExecaChildProcess<Buffer>;
532
562
  };
533
563
 
534
564
  export = execa;
@@ -1 +1,11 @@
1
- {"name":"execa","main":"index.js","author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"https://sindresorhus.com"},"license":"MIT","types":"index.d.ts"}
1
+ {
2
+ "name": "execa",
3
+ "license": "MIT",
4
+ "author": {
5
+ "name": "Sindre Sorhus",
6
+ "email": "sindresorhus@gmail.com",
7
+ "url": "https://sindresorhus.com"
8
+ },
9
+ "main": "index.js",
10
+ "types": "index.d.ts"
11
+ }
package/es/utils/index.js CHANGED
@@ -1,5 +1,11 @@
1
1
  function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
2
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 exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, defineProperty = Object.defineProperty || function (obj, key, desc) { obj[key] = desc.value; }, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return defineProperty(generator, "_invoke", { value: makeInvokeMethod(innerFn, self, context) }), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; defineProperty(this, "_invoke", { value: function value(method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; } function maybeInvokeDelegate(delegate, context) { var methodName = context.method, method = delegate.iterator[methodName]; if (undefined === method) return context.delegate = null, "throw" === methodName && delegate.iterator.return && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method) || "return" !== methodName && (context.method = "throw", context.arg = new TypeError("The iterator does not provide a '" + methodName + "' method")), ContinueSentinel; var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), defineProperty(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (val) { var object = Object(val), keys = []; for (var key in object) keys.push(key); return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, catch: function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; }
3
+ function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
4
+ function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
5
+ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
6
+ function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
7
+ function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
8
+ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
3
9
  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
10
  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
11
  var fs = require('fs');
@@ -35,6 +41,16 @@ function printErrorAndExit() {
35
41
  printError(args);
36
42
  process.exit(1);
37
43
  }
44
+ function pickDependencies(dependencies, isDev) {
45
+ var pkgs = require(join(cwd, 'package.json'));
46
+ return dependencies.filter(function (p) {
47
+ if (isDev) {
48
+ return !pkgs.devDependencies[p];
49
+ } else {
50
+ return !pkgs.dependencies[p];
51
+ }
52
+ });
53
+ }
38
54
  function getCfg() {
39
55
  var pkgs = require(join(cwd, 'package.json'));
40
56
  var _pkgs$infra = pkgs.infra,
@@ -92,7 +108,7 @@ function fetchRemoteRepository() {
92
108
  }
93
109
  function _fetchRemoteRepository() {
94
110
  _fetchRemoteRepository = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
95
- var cfg, infra, directory, ASG_BRAHCH, JENKINS_BUILD, remoteUrl, doesExist, _yield$inquirer$promp, syncUp, infraBranchsOutput, infraBranchArray, filteredBranches, defaultBrancheIdx, questions;
111
+ var cfg, infra, directory, ASG_BRAHCH, JENKINS_BUILD, remoteUrl, doesExist, proDevDeps, proDeps, maxDevDeps, maxDeps, _yield$inquirer$promp, syncUp, infraBranchsOutput, infraBranchArray, filteredBranches, defaultBrancheIdx, questions;
96
112
  return _regeneratorRuntime().wrap(function _callee$(_context) {
97
113
  while (1) switch (_context.prev = _context.next) {
98
114
  case 0:
@@ -101,7 +117,7 @@ function _fetchRemoteRepository() {
101
117
  remoteUrl = infra.url;
102
118
  doesExist = checkDirectoryExistsSync(directory);
103
119
  if (doesExist) {
104
- _context.next = 24;
120
+ _context.next = 36;
105
121
  break;
106
122
  }
107
123
  logStep('Cloning the repository from GitHub...');
@@ -109,75 +125,103 @@ function _fetchRemoteRepository() {
109
125
  logStep('Cloning completed.');
110
126
  logStep('Installing dependencies...');
111
127
  if (!((infra === null || infra === void 0 ? void 0 : infra.arch) === 'PRO')) {
112
- _context.next = 16;
128
+ _context.next = 22;
129
+ break;
130
+ }
131
+ proDevDeps = pickDependencies(['snb-mock-middleware', 'lodash-webpack-plugin'], true);
132
+ _context.t0 = !!proDevDeps.length;
133
+ if (!_context.t0) {
134
+ _context.next = 15;
135
+ break;
136
+ }
137
+ _context.next = 15;
138
+ return exec('yarn', ['add'].concat(_toConsumableArray(proDevDeps), ['-D']));
139
+ case 15:
140
+ proDeps = pickDependencies(['@teams-max/skynet', 'history']);
141
+ _context.t1 = !!proDeps.length;
142
+ if (!_context.t1) {
143
+ _context.next = 20;
113
144
  break;
114
145
  }
115
- _context.next = 12;
116
- return exec('yarn', ['add', 'snb-mock-middleware', 'lodash-webpack-plugin', '-D']);
117
- case 12:
118
- _context.next = 14;
119
- return exec('yarn', ['add', '@teams-max/skynet', 'history']);
120
- case 14:
121
- _context.next = 21;
146
+ _context.next = 20;
147
+ return exec('yarn', ['add'].concat(_toConsumableArray(proDeps)));
148
+ case 20:
149
+ _context.next = 33;
122
150
  break;
123
- case 16:
151
+ case 22:
124
152
  if (!((infra === null || infra === void 0 ? void 0 : infra.arch) === 'MAX')) {
125
- _context.next = 21;
153
+ _context.next = 33;
154
+ break;
155
+ }
156
+ maxDevDeps = pickDependencies(['axios'], true);
157
+ _context.t2 = !!maxDevDeps.length;
158
+ if (!_context.t2) {
159
+ _context.next = 28;
126
160
  break;
127
161
  }
128
- _context.next = 19;
129
- return exec('pnpm', ['add', 'axios', '-D']);
130
- case 19:
131
- _context.next = 21;
132
- return exec('pnpm', ['add', '@teams-max/skynet', 'classnames', 'qs', 'uuid', 'react-draggable']);
133
- case 21:
162
+ _context.next = 28;
163
+ return exec('pnpm', ['add'].concat(_toConsumableArray(maxDevDeps), ['-D']));
164
+ case 28:
165
+ maxDeps = pickDependencies(['@teams-max/skynet', 'classnames', 'qs', 'uuid', 'react-draggable', 'lodash', 'moment', 'dayjs']);
166
+ _context.t3 = !!maxDeps.length;
167
+ if (!_context.t3) {
168
+ _context.next = 33;
169
+ break;
170
+ }
171
+ _context.next = 33;
172
+ return exec('pnpm', ['add'].concat(_toConsumableArray(maxDeps)));
173
+ case 33:
134
174
  logStep('Installation completed.');
135
- _context.next = 35;
175
+ _context.next = 48;
136
176
  break;
137
- case 24:
177
+ case 36:
138
178
  if (!(JENKINS_BUILD && !ASG_BRAHCH)) {
139
- _context.next = 29;
179
+ _context.next = 41;
140
180
  break;
141
181
  }
142
182
  logStep('Jenkins build detected. Skipping sync up.');
143
183
  return _context.abrupt("return");
144
- case 29:
145
- _context.next = 31;
184
+ case 41:
185
+ if (JENKINS_BUILD) {
186
+ _context.next = 48;
187
+ break;
188
+ }
189
+ _context.next = 44;
146
190
  return inquirer.prompt([{
147
191
  type: 'confirm',
148
192
  name: 'syncUp',
149
193
  message: '同步远端仓库',
150
194
  default: 'Y'
151
195
  }]);
152
- case 31:
196
+ case 44:
153
197
  _yield$inquirer$promp = _context.sent;
154
198
  syncUp = _yield$inquirer$promp.syncUp;
155
199
  if (syncUp) {
156
- _context.next = 35;
200
+ _context.next = 48;
157
201
  break;
158
202
  }
159
203
  return _context.abrupt("return");
160
- case 35:
204
+ case 48:
161
205
  if (!(!doesExist && JENKINS_BUILD && !ASG_BRAHCH)) {
162
- _context.next = 38;
206
+ _context.next = 51;
163
207
  break;
164
208
  }
165
209
  printErrorAndExit('Jenkins build detected. The branch parameter is missing!');
166
210
  return _context.abrupt("return");
167
- case 38:
211
+ case 51:
168
212
  logStep('Synchronizing with the remote repository...');
169
213
  process.chdir(directory);
170
- _context.prev = 40;
171
- execa.sync('git', ['pull', 'origin', 'master']);
214
+ _context.prev = 53;
215
+ execa.sync('git', ['fetch', 'origin', '--prune']);
172
216
  if (!(JENKINS_BUILD && ASG_BRAHCH)) {
173
- _context.next = 47;
217
+ _context.next = 60;
174
218
  break;
175
219
  }
176
220
  execa.sync('git', ['checkout', ASG_BRAHCH]);
177
221
  logStep("Anto switched to branch:", ASG_BRAHCH);
178
- _context.next = 57;
222
+ _context.next = 70;
179
223
  break;
180
- case 47:
224
+ case 60:
181
225
  // 获取远程分支列表
182
226
  infraBranchsOutput = execa.sync('git', ['branch', '-r']).stdout; // 处理分支列表
183
227
  infraBranchArray = infraBranchsOutput.trim().split('\n');
@@ -197,7 +241,7 @@ function _fetchRemoteRepository() {
197
241
  }
198
242
 
199
243
  // 提示用户选择分支
200
- _context.next = 55;
244
+ _context.next = 68;
201
245
  return inquirer.prompt([{
202
246
  type: 'list',
203
247
  name: 'branch',
@@ -210,7 +254,7 @@ function _fetchRemoteRepository() {
210
254
  return true;
211
255
  }
212
256
  }]);
213
- case 55:
257
+ case 68:
214
258
  questions = _context.sent;
215
259
  // 切换分支,增加错误处理
216
260
  try {
@@ -219,21 +263,21 @@ function _fetchRemoteRepository() {
219
263
  } catch (error) {
220
264
  printErrorAndExit("Failed to switch to branch '".concat(questions.branch, "'. Reason: ").concat(error.message));
221
265
  }
222
- case 57:
223
- _context.next = 62;
266
+ case 70:
267
+ _context.next = 75;
224
268
  break;
225
- case 59:
226
- _context.prev = 59;
227
- _context.t0 = _context["catch"](40);
269
+ case 72:
270
+ _context.prev = 72;
271
+ _context.t4 = _context["catch"](53);
228
272
  // 获取分支列表时的错误处理
229
- printErrorAndExit("An error occurred while fetching remote branches: ".concat(_context.t0.message));
230
- case 62:
273
+ printErrorAndExit("An error occurred while fetching remote branches: ".concat(_context.t4.message));
274
+ case 75:
231
275
  process.chdir(cwd);
232
- case 63:
276
+ case 76:
233
277
  case "end":
234
278
  return _context.stop();
235
279
  }
236
- }, _callee, null, [[40, 59]]);
280
+ }, _callee, null, [[53, 72]]);
237
281
  }));
238
282
  return _fetchRemoteRepository.apply(this, arguments);
239
283
  }
@@ -9,7 +9,9 @@
9
9
  /// <reference types="node"/>
10
10
 
11
11
  interface MergedStream extends NodeJS.ReadWriteStream {
12
- add(source: NodeJS.ReadableStream | ReadonlyArray<NodeJS.ReadableStream>): MergedStream;
12
+ add(
13
+ source: NodeJS.ReadableStream | ReadonlyArray<NodeJS.ReadableStream>,
14
+ ): MergedStream;
13
15
  isEmpty(): boolean;
14
16
  }
15
17
 
@@ -1 +1,7 @@
1
- {"name":"merge-stream","main":"index.js","author":"Stephen Sugden <me@stephensugden.com>","license":"MIT","types":"index.d.ts"}
1
+ {
2
+ "name": "merge-stream",
3
+ "license": "MIT",
4
+ "author": "Stephen Sugden <me@stephensugden.com>",
5
+ "main": "index.js",
6
+ "types": "index.d.ts"
7
+ }
@@ -74,7 +74,9 @@ declare namespace yargsParser {
74
74
  * Indicate that keys should be parsed as an array and coerced to booleans / numbers:
75
75
  * { array: [ { key: 'foo', boolean: true }, {key: 'bar', number: true} ] }`.
76
76
  */
77
- array?: string[] | Array<{ key: string; boolean?: boolean; number?: boolean }>;
77
+ array?:
78
+ | string[]
79
+ | Array<{ key: string; boolean?: boolean; number?: boolean }>;
78
80
  /** Arguments should be parsed as booleans: `{ boolean: ['x', 'y'] }`. */
79
81
  boolean?: string[];
80
82
  /** Indicate a key that represents a path to a configuration file (this file will be loaded and parsed). */
@@ -1 +1,7 @@
1
- {"name":"yargs-parser","main":"index.js","author":"Ben Coe <ben@npmjs.com>","license":"ISC","types":"index.d.ts"}
1
+ {
2
+ "name": "yargs-parser",
3
+ "license": "ISC",
4
+ "author": "Ben Coe <ben@npmjs.com>",
5
+ "main": "index.js",
6
+ "types": "index.d.ts"
7
+ }
package/lib/cli/build.js CHANGED
@@ -61,7 +61,7 @@ async function build() {
61
61
  env.VUE_APP_TYPE = "pro";
62
62
  env.VUE_JENKINS_BUILD = JENKINS_BUILD;
63
63
  env.VUE_APP_KEY = appKey;
64
- await exec("vue-cli-service", ["serve"], {
64
+ await exec("vue-cli-service", ["build"], {
65
65
  env
66
66
  });
67
67
  } else if ((infra == null ? void 0 : infra.arch) === "MAX") {
@@ -22,7 +22,11 @@ module.exports = (() => {
22
22
  Object.defineProperty(e3, t3, {
23
23
  get: () => {
24
24
  const r2 = n2();
25
- Object.defineProperty(e3, t3, { value: r2, enumerable: true, configurable: true });
25
+ Object.defineProperty(e3, t3, {
26
+ value: r2,
27
+ enumerable: true,
28
+ configurable: true
29
+ });
26
30
  return r2;
27
31
  },
28
32
  enumerable: true,
@@ -119,7 +123,10 @@ module.exports = (() => {
119
123
  i(t3.bgColor, "ansi16m", () => u(s, "rgb", c, true));
120
124
  return t3;
121
125
  }
122
- Object.defineProperty(e2, "exports", { enumerable: true, get: assembleStyles });
126
+ Object.defineProperty(e2, "exports", {
127
+ enumerable: true,
128
+ get: assembleStyles
129
+ });
123
130
  },
124
131
  294: (e2, t2, n) => {
125
132
  const r = n(510);
@@ -706,7 +713,11 @@ module.exports = (() => {
706
713
  o2[2] = c;
707
714
  }
708
715
  i = (1 - n2) * r2;
709
- return [(n2 * o2[0] + i) * 255, (n2 * o2[1] + i) * 255, (n2 * o2[2] + i) * 255];
716
+ return [
717
+ (n2 * o2[0] + i) * 255,
718
+ (n2 * o2[1] + i) * 255,
719
+ (n2 * o2[2] + i) * 255
720
+ ];
710
721
  };
711
722
  s.hcg.hsv = function(e3) {
712
723
  const t3 = e3[1] / 100;
@@ -748,10 +759,18 @@ module.exports = (() => {
748
759
  return [e3[0], o2 * 100, s2 * 100];
749
760
  };
750
761
  s.apple.rgb = function(e3) {
751
- return [e3[0] / 65535 * 255, e3[1] / 65535 * 255, e3[2] / 65535 * 255];
762
+ return [
763
+ e3[0] / 65535 * 255,
764
+ e3[1] / 65535 * 255,
765
+ e3[2] / 65535 * 255
766
+ ];
752
767
  };
753
768
  s.rgb.apple = function(e3) {
754
- return [e3[0] / 255 * 65535, e3[1] / 255 * 65535, e3[2] / 255 * 65535];
769
+ return [
770
+ e3[0] / 255 * 65535,
771
+ e3[1] / 255 * 65535,
772
+ e3[2] / 255 * 65535
773
+ ];
755
774
  };
756
775
  s.gray.rgb = function(e3) {
757
776
  return [e3[0] / 100 * 255, e3[0] / 100 * 255, e3[0] / 100 * 255];
@@ -959,9 +978,14 @@ module.exports = (() => {
959
978
  return 1;
960
979
  }
961
980
  if ("CI" in l) {
962
- if (["TRAVIS", "CIRCLECI", "APPVEYOR", "GITLAB_CI", "GITHUB_ACTIONS", "BUILDKITE"].some(
963
- (e4) => e4 in l
964
- ) || l.CI_NAME === "codeship") {
981
+ if ([
982
+ "TRAVIS",
983
+ "CIRCLECI",
984
+ "APPVEYOR",
985
+ "GITLAB_CI",
986
+ "GITHUB_ACTIONS",
987
+ "BUILDKITE"
988
+ ].some((e4) => e4 in l) || l.CI_NAME === "codeship") {
965
989
  return 1;
966
990
  }
967
991
  return n2;
@@ -984,7 +1008,9 @@ module.exports = (() => {
984
1008
  if (/-256(color)?$/i.test(l.TERM)) {
985
1009
  return 2;
986
1010
  }
987
- if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(l.TERM)) {
1011
+ if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(
1012
+ l.TERM
1013
+ )) {
988
1014
  return 1;
989
1015
  }
990
1016
  if ("COLORTERM" in l) {
@@ -1012,7 +1038,9 @@ module.exports = (() => {
1012
1038
  const u = /* @__PURE__ */ Object.create(null);
1013
1039
  const f = (e3, t3 = {}) => {
1014
1040
  if (t3.level && !(Number.isInteger(t3.level) && t3.level >= 0 && t3.level <= 3)) {
1015
- throw new Error("The `level` option should be an integer from 0 to 3");
1041
+ throw new Error(
1042
+ "The `level` option should be an integer from 0 to 3"
1043
+ );
1016
1044
  }
1017
1045
  const n2 = o ? o.level : 0;
1018
1046
  e3.level = t3.level === void 0 ? n2 : t3.level;
@@ -1055,7 +1083,16 @@ module.exports = (() => {
1055
1083
  return e3;
1056
1084
  }
1057
1085
  };
1058
- const g = ["rgb", "hex", "keyword", "hsl", "hsv", "hwb", "ansi", "ansi256"];
1086
+ const g = [
1087
+ "rgb",
1088
+ "hex",
1089
+ "keyword",
1090
+ "hsl",
1091
+ "hsv",
1092
+ "hwb",
1093
+ "ansi",
1094
+ "ansi256"
1095
+ ];
1059
1096
  for (const e3 of g) {
1060
1097
  u[e3] = {
1061
1098
  get() {
@@ -1073,7 +1110,11 @@ module.exports = (() => {
1073
1110
  get() {
1074
1111
  const { level: t4 } = this;
1075
1112
  return function(...n2) {
1076
- const o2 = p(r.bgColor[a[t4]][e3](...n2), r.bgColor.close, this._styler);
1113
+ const o2 = p(
1114
+ r.bgColor[a[t4]][e3](...n2),
1115
+ r.bgColor.close,
1116
+ this._styler
1117
+ );
1077
1118
  return d(this, o2, this._isEmpty);
1078
1119
  };
1079
1120
  }
@@ -1201,7 +1242,9 @@ module.exports = (() => {
1201
1242
  } else if (l = t4.match(r)) {
1202
1243
  n2.push(l[2].replace(o, (e4, t5, n3) => t5 ? unescape(t5) : n3));
1203
1244
  } else {
1204
- throw new Error(`Invalid Chalk template style argument: ${t4} (in style '${e3}')`);
1245
+ throw new Error(
1246
+ `Invalid Chalk template style argument: ${t4} (in style '${e3}')`
1247
+ );
1205
1248
  }
1206
1249
  }
1207
1250
  return n2;
@@ -1 +1,6 @@
1
- {"name":"chalk","main":"index.js","license":"MIT","types":"index.d.ts"}
1
+ {
2
+ "name": "chalk",
3
+ "license": "MIT",
4
+ "main": "index.js",
5
+ "types": "index.d.ts"
6
+ }