@teams-max/mwsp 1.0.0

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.
Files changed (67) hide show
  1. package/README.md +3 -0
  2. package/bin/mwsp.js +36 -0
  3. package/es/cli/build.d.ts +2 -0
  4. package/es/cli/build.js +82 -0
  5. package/es/cli/cli.d.ts +1 -0
  6. package/es/cli/cli.js +42 -0
  7. package/es/cli/dev.d.ts +1 -0
  8. package/es/cli/dev.js +44 -0
  9. package/es/cli/start.d.ts +2 -0
  10. package/es/cli/start.js +46 -0
  11. package/es/cli/update.d.ts +2 -0
  12. package/es/cli/update.js +38 -0
  13. package/es/index.d.ts +1 -0
  14. package/es/index.js +1 -0
  15. package/es/internal/buildNotify.d.ts +10 -0
  16. package/es/internal/buildNotify.js +123 -0
  17. package/es/internal/cross-spawn/LICENSE +21 -0
  18. package/es/internal/cross-spawn/index.d.ts +39 -0
  19. package/es/internal/cross-spawn/index.js +512 -0
  20. package/es/internal/cross-spawn/package.json +1 -0
  21. package/es/internal/datetimeFormat.d.ts +9 -0
  22. package/es/internal/datetimeFormat.js +96 -0
  23. package/es/internal/exec.d.ts +1 -0
  24. package/es/internal/exec.js +27 -0
  25. package/es/internal/execa/LICENSE +9 -0
  26. package/es/internal/execa/index.d.ts +534 -0
  27. package/es/internal/execa/index.js +1870 -0
  28. package/es/internal/execa/package.json +1 -0
  29. package/es/internal/merge-stream/LICENSE +21 -0
  30. package/es/internal/merge-stream/index.d.ts +19 -0
  31. package/es/internal/merge-stream/index.js +68 -0
  32. package/es/internal/merge-stream/package.json +1 -0
  33. package/es/internal/utils.d.ts +14 -0
  34. package/es/internal/utils.js +90 -0
  35. package/lib/cli/build.d.ts +2 -0
  36. package/lib/cli/build.js +84 -0
  37. package/lib/cli/cli.d.ts +1 -0
  38. package/lib/cli/cli.js +60 -0
  39. package/lib/cli/dev.d.ts +1 -0
  40. package/lib/cli/dev.js +62 -0
  41. package/lib/cli/start.d.ts +2 -0
  42. package/lib/cli/start.js +59 -0
  43. package/lib/cli/update.d.ts +2 -0
  44. package/lib/cli/update.js +50 -0
  45. package/lib/index.d.ts +1 -0
  46. package/lib/index.js +29 -0
  47. package/lib/internal/buildNotify.d.ts +10 -0
  48. package/lib/internal/buildNotify.js +112 -0
  49. package/lib/internal/cross-spawn/LICENSE +21 -0
  50. package/lib/internal/cross-spawn/index.d.ts +39 -0
  51. package/lib/internal/cross-spawn/index.js +465 -0
  52. package/lib/internal/cross-spawn/package.json +1 -0
  53. package/lib/internal/datetimeFormat.d.ts +9 -0
  54. package/lib/internal/datetimeFormat.js +106 -0
  55. package/lib/internal/exec.d.ts +1 -0
  56. package/lib/internal/exec.js +60 -0
  57. package/lib/internal/execa/LICENSE +9 -0
  58. package/lib/internal/execa/index.d.ts +534 -0
  59. package/lib/internal/execa/index.js +1579 -0
  60. package/lib/internal/execa/package.json +1 -0
  61. package/lib/internal/merge-stream/LICENSE +21 -0
  62. package/lib/internal/merge-stream/index.d.ts +19 -0
  63. package/lib/internal/merge-stream/index.js +62 -0
  64. package/lib/internal/merge-stream/package.json +1 -0
  65. package/lib/internal/utils.d.ts +14 -0
  66. package/lib/internal/utils.js +100 -0
  67. package/package.json +44 -0
@@ -0,0 +1 @@
1
+ {"name":"execa","main":"index.js","author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"https://sindresorhus.com"},"license":"MIT","types":"index.d.ts"}
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) Stephen Sugden <me@stephensugden.com> (stephensugden.com)
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
@@ -0,0 +1,19 @@
1
+ // Type definitions for merge-stream 1.1
2
+ // Project: https://github.com/grncdr/merge-stream
3
+ // Definitions by: Keita Kagurazaka <https://github.com/k-kagurazaka>
4
+ // Tom X. Tobin <https://github.com/tomxtobin>
5
+ // Daniel Zazula <https://github.com/daniel-zazula>
6
+ // Daniel Cassidy <https://github.com/djcsdy>
7
+ // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
8
+
9
+ /// <reference types="node"/>
10
+
11
+ interface MergedStream extends NodeJS.ReadWriteStream {
12
+ add(source: NodeJS.ReadableStream | ReadonlyArray<NodeJS.ReadableStream>): MergedStream;
13
+ isEmpty(): boolean;
14
+ }
15
+
16
+ declare function merge<T extends NodeJS.ReadableStream>(
17
+ ...streams: Array<T | ReadonlyArray<T>>
18
+ ): MergedStream;
19
+ export = merge;
@@ -0,0 +1,68 @@
1
+ module.exports = function () {
2
+ 'use strict';
3
+
4
+ var e = {
5
+ 621: function _(e, r, t) {
6
+ var _t = t(413),
7
+ n = _t.PassThrough;
8
+ e.exports = function () {
9
+ var e = [];
10
+ var r = new n({
11
+ objectMode: true
12
+ });
13
+ r.setMaxListeners(0);
14
+ r.add = add;
15
+ r.isEmpty = isEmpty;
16
+ r.on('unpipe', remove);
17
+ Array.prototype.slice.call(arguments).forEach(add);
18
+ return r;
19
+ function add(t) {
20
+ if (Array.isArray(t)) {
21
+ t.forEach(add);
22
+ return this;
23
+ }
24
+ e.push(t);
25
+ t.once('end', remove.bind(null, t));
26
+ t.once('error', r.emit.bind(r, 'error'));
27
+ t.pipe(r, {
28
+ end: false
29
+ });
30
+ return this;
31
+ }
32
+ function isEmpty() {
33
+ return e.length == 0;
34
+ }
35
+ function remove(t) {
36
+ e = e.filter(function (e) {
37
+ return e !== t;
38
+ });
39
+ if (!e.length && r.readable) {
40
+ r.end();
41
+ }
42
+ }
43
+ };
44
+ },
45
+ 413: function _(e) {
46
+ e.exports = require('stream');
47
+ }
48
+ };
49
+ var r = {};
50
+ function __nccwpck_require__(t) {
51
+ if (r[t]) {
52
+ return r[t].exports;
53
+ }
54
+ var n = r[t] = {
55
+ exports: {}
56
+ };
57
+ var i = true;
58
+ try {
59
+ e[t](n, n.exports, __nccwpck_require__);
60
+ i = false;
61
+ } finally {
62
+ if (i) delete r[t];
63
+ }
64
+ return n.exports;
65
+ }
66
+ __nccwpck_require__.ab = __dirname + '/';
67
+ return __nccwpck_require__(621);
68
+ }();
@@ -0,0 +1 @@
1
+ {"name":"merge-stream","main":"index.js","author":"Stephen Sugden <me@stephensugden.com>","license":"MIT","types":"index.d.ts"}
@@ -0,0 +1,14 @@
1
+ /// <reference types="node" />
2
+ /// <reference types="node" />
3
+ import type { SpawnSyncOptions } from 'child_process';
4
+ import 'zx/globals';
5
+ export declare function assert(v: unknown, message: string): void;
6
+ export declare function setExcludeFolder(opts: {
7
+ cwd: string;
8
+ pkg: string;
9
+ dirName?: string;
10
+ folders?: string[];
11
+ }): void;
12
+ export declare function spawnSync(cmd: string, opts: SpawnSyncOptions, status?: string): import("child_process").SpawnSyncReturns<string | Buffer>;
13
+ export declare function toArray(v: unknown): any[];
14
+ export declare function gitHeadReset(): Promise<void>;
@@ -0,0 +1,90 @@
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
+ var _templateObject;
3
+ 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; }
4
+ function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
5
+ 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); } }
6
+ 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); }); }; }
7
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
8
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
9
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
10
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
11
+ function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
12
+ function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
13
+ 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); }
14
+ 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; }
15
+ import spawn from '@umijs/utils/compiled/cross-spawn';
16
+ import * as logger from '@umijs/utils/dist/logger';
17
+ import { existsSync, readFileSync, writeFileSync } from 'fs';
18
+ import { join } from 'path';
19
+ import 'zx/globals';
20
+ export function assert(v, message) {
21
+ if (!v) {
22
+ logger.error(message);
23
+ process.exit(1);
24
+ }
25
+ }
26
+ export function setExcludeFolder(opts) {
27
+ var dirName = opts.dirName || 'packages';
28
+ var folders = opts.folders || ['dist', 'compiled'];
29
+ if (!existsSync(join(opts.cwd, '.idea'))) return;
30
+ var configPath = join(opts.cwd, '.idea', 'umi-next.iml');
31
+ var content = readFileSync(configPath, 'utf-8');
32
+ var _iterator = _createForOfIteratorHelper(folders),
33
+ _step;
34
+ try {
35
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
36
+ var folder = _step.value;
37
+ var excludeContent = "<excludeFolder url='file://$MODULE_DIR$/".concat(dirName, "/").concat(opts.pkg, "/").concat(folder, "' />");
38
+ var replaceMatcher = "<content url=\"file://$MODULE_DIR$\">";
39
+ if (!content.includes(excludeContent)) {
40
+ content = content.replace(replaceMatcher, "".concat(replaceMatcher, "\n ").concat(excludeContent));
41
+ }
42
+ }
43
+ } catch (err) {
44
+ _iterator.e(err);
45
+ } finally {
46
+ _iterator.f();
47
+ }
48
+ writeFileSync(configPath, content, 'utf-8');
49
+ }
50
+ export function spawnSync(cmd, opts, status) {
51
+ var result = spawn.sync(cmd, _objectSpread({
52
+ shell: true,
53
+ stdio: 'inherit'
54
+ }, opts));
55
+ if (result.status !== 0 && status !== 'continue') {
56
+ logger.error("Execute command error (".concat(cmd, ")"));
57
+ process.exit(1);
58
+ }
59
+ return result;
60
+ }
61
+ export function toArray(v) {
62
+ if (Array.isArray(v)) {
63
+ return v;
64
+ }
65
+ return [v];
66
+ }
67
+ export function gitHeadReset() {
68
+ return _gitHeadReset.apply(this, arguments);
69
+ }
70
+ function _gitHeadReset() {
71
+ _gitHeadReset = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
72
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
73
+ while (1) switch (_context.prev = _context.next) {
74
+ case 0:
75
+ $.verbose = false;
76
+ _context.next = 3;
77
+ return $(_templateObject || (_templateObject = _taggedTemplateLiteral(["git reset HEAD -- packages/app-* .gitmodules"])));
78
+ case 3:
79
+ $.verbose = true;
80
+ // spawnSync(`git reset HEAD -- packages/app-* .gitmodules`, {
81
+ // cwd: PATHS.ROOT,
82
+ // });
83
+ case 4:
84
+ case "end":
85
+ return _context.stop();
86
+ }
87
+ }, _callee);
88
+ }));
89
+ return _gitHeadReset.apply(this, arguments);
90
+ }
@@ -0,0 +1,2 @@
1
+ import 'zx/globals';
2
+ export default function build(): Promise<void>;
@@ -0,0 +1,84 @@
1
+ var __create = Object.create;
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __getProtoOf = Object.getPrototypeOf;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __export = (target, all) => {
8
+ for (var name in all)
9
+ __defProp(target, name, { get: all[name], enumerable: true });
10
+ };
11
+ var __copyProps = (to, from, except, desc) => {
12
+ if (from && typeof from === "object" || typeof from === "function") {
13
+ for (let key of __getOwnPropNames(from))
14
+ if (!__hasOwnProp.call(to, key) && key !== except)
15
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
+ }
17
+ return to;
18
+ };
19
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
20
+ // If the importer is in node compatibility mode or this is not an ESM
21
+ // file that has been converted to a CommonJS file using a Babel-
22
+ // compatible transform (i.e. "__esModule" has not been set), then set
23
+ // "default" to the CommonJS "module.exports" for node compatibility.
24
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
25
+ mod
26
+ ));
27
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
28
+
29
+ // src/cli/build.ts
30
+ var build_exports = {};
31
+ __export(build_exports, {
32
+ default: () => build
33
+ });
34
+ module.exports = __toCommonJS(build_exports);
35
+ var logger = __toESM(require("@umijs/utils/dist/logger"));
36
+ var import_utils = require("../internal/utils");
37
+ var import_globals = require("zx/globals");
38
+ var import_buildNotify = __toESM(require("../internal/buildNotify"));
39
+ var import_yargs_parser = __toESM(require("@umijs/utils/compiled/yargs-parser"));
40
+ var import_path = require("path");
41
+ var args = (0, import_yargs_parser.default)(process.argv.slice(2));
42
+ var cwd = process.cwd();
43
+ async function build() {
44
+ logger.event("check pnpm version");
45
+ const pnpmVersion = (await $`pnpm --version`).stdout.trim();
46
+ (0, import_utils.assert)(
47
+ !pnpmVersion.includes("not found"),
48
+ "pnpm: command not found please use npm install -g pnpm"
49
+ );
50
+ const pkg = require((0, import_path.join)(cwd, "package.json"));
51
+ let entryApp = args.app || args.App || args.APP || pkg.name;
52
+ let entryEnv = args.env || args.ENV || "";
53
+ let entryJenkinsBuild = args.jenkinsBuild || args.JENKINSBUILD || args.jenkins_build || args.JENKINS_BUILD;
54
+ entryApp = entryApp;
55
+ entryEnv = entryEnv;
56
+ (0, import_utils.assert)(
57
+ entryApp,
58
+ `Build failed, please select the application first.`
59
+ );
60
+ (0, import_utils.assert)(
61
+ entryEnv,
62
+ `Build failed, A build environment is a must.`
63
+ );
64
+ logger.info(`Start: APP:${entryApp} ENV:${entryEnv}`);
65
+ process.env.MAX_APP_ENV = entryEnv;
66
+ process.env.BABEL_ENV = entryEnv !== "production" ? "development" : "production";
67
+ process.env.MAX_APP_TYPE = "max", process.env.MAX_APP_KEY = pkg.appKey || "";
68
+ entryJenkinsBuild && (0, import_buildNotify.default)({ args, appList: [entryApp], environment: [entryEnv] });
69
+ logger.event("max build");
70
+ if (entryEnv === "development") {
71
+ await $`max build`;
72
+ } else {
73
+ await $`max build && rm -fr ./dist/*.map`;
74
+ }
75
+ logger.info(`Success: APP:${entryApp} ENV:${entryEnv}`);
76
+ entryJenkinsBuild && (0, import_buildNotify.default)({
77
+ args,
78
+ appList: [entryApp],
79
+ environment: [entryEnv],
80
+ buildStatus: "success"
81
+ });
82
+ }
83
+ // Annotate the CommonJS export names for ESM import in node:
84
+ 0 && (module.exports = {});
@@ -0,0 +1 @@
1
+ export declare function run(): Promise<void>;
package/lib/cli/cli.js ADDED
@@ -0,0 +1,60 @@
1
+ var __create = Object.create;
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __getProtoOf = Object.getPrototypeOf;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __export = (target, all) => {
8
+ for (var name in all)
9
+ __defProp(target, name, { get: all[name], enumerable: true });
10
+ };
11
+ var __copyProps = (to, from, except, desc) => {
12
+ if (from && typeof from === "object" || typeof from === "function") {
13
+ for (let key of __getOwnPropNames(from))
14
+ if (!__hasOwnProp.call(to, key) && key !== except)
15
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
+ }
17
+ return to;
18
+ };
19
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
20
+ // If the importer is in node compatibility mode or this is not an ESM
21
+ // file that has been converted to a CommonJS file using a Babel-
22
+ // compatible transform (i.e. "__esModule" has not been set), then set
23
+ // "default" to the CommonJS "module.exports" for node compatibility.
24
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
25
+ mod
26
+ ));
27
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
28
+
29
+ // src/cli/cli.ts
30
+ var cli_exports = {};
31
+ __export(cli_exports, {
32
+ run: () => run
33
+ });
34
+ module.exports = __toCommonJS(cli_exports);
35
+ var import_build = __toESM(require("./build"));
36
+ var import_start = __toESM(require("./start"));
37
+ var import_dev = __toESM(require("./dev"));
38
+ var import_update = __toESM(require("./update"));
39
+ async function run() {
40
+ const argv = process.argv.slice(2);
41
+ const name = argv[0];
42
+ switch (name) {
43
+ case "start":
44
+ (0, import_start.default)();
45
+ break;
46
+ case "dev":
47
+ (0, import_dev.default)();
48
+ break;
49
+ case "build":
50
+ (0, import_build.default)();
51
+ break;
52
+ case "update":
53
+ (0, import_update.default)();
54
+ break;
55
+ }
56
+ }
57
+ // Annotate the CommonJS export names for ESM import in node:
58
+ 0 && (module.exports = {
59
+ run
60
+ });
@@ -0,0 +1 @@
1
+ export default function start(): Promise<void>;
package/lib/cli/dev.js ADDED
@@ -0,0 +1,62 @@
1
+ var __create = Object.create;
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __getProtoOf = Object.getPrototypeOf;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __export = (target, all) => {
8
+ for (var name in all)
9
+ __defProp(target, name, { get: all[name], enumerable: true });
10
+ };
11
+ var __copyProps = (to, from, except, desc) => {
12
+ if (from && typeof from === "object" || typeof from === "function") {
13
+ for (let key of __getOwnPropNames(from))
14
+ if (!__hasOwnProp.call(to, key) && key !== except)
15
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
+ }
17
+ return to;
18
+ };
19
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
20
+ // If the importer is in node compatibility mode or this is not an ESM
21
+ // file that has been converted to a CommonJS file using a Babel-
22
+ // compatible transform (i.e. "__esModule" has not been set), then set
23
+ // "default" to the CommonJS "module.exports" for node compatibility.
24
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
25
+ mod
26
+ ));
27
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
28
+
29
+ // src/cli/dev.ts
30
+ var dev_exports = {};
31
+ __export(dev_exports, {
32
+ default: () => start
33
+ });
34
+ module.exports = __toCommonJS(dev_exports);
35
+ var logger = __toESM(require("@umijs/utils/dist/logger"));
36
+ var import_utils = require("../internal/utils");
37
+ var import_path = require("path");
38
+ var import_exec = require("../internal/exec");
39
+ var execa = require("../internal/execa");
40
+ var cwd = process.cwd();
41
+ async function start() {
42
+ const pkg = require((0, import_path.join)(cwd, "package.json"));
43
+ process.env.MAX_APP_ENV = "development";
44
+ process.env.BABEL_ENV = "development";
45
+ process.env.MAX_APP_TYPE = "max";
46
+ process.env.MAX_APP_KEY = pkg.appKey || "";
47
+ const env = Object.create(process.env);
48
+ logger.event("check pnpm version");
49
+ const pnpmVersion = execa.sync("pnpm", ["--version"]).stdout;
50
+ (0, import_utils.assert)(
51
+ !pnpmVersion.includes("not found"),
52
+ "pnpm: command not found please use npm install -g pnpm"
53
+ );
54
+ logger.info(`MAX_APP_ENV: ${env.MAX_APP_ENV} MAX_APP_KEY: ${env.MAX_APP_KEY} MAX_APP_TYPE: ${env.MAX_APP_TYPE}`);
55
+ logger.event("max dev");
56
+ await (0, import_exec.exec)("max", ["dev"], {
57
+ env
58
+ });
59
+ logger.info(`Success MAX_APP_ENV: ${env.MAX_APP_ENV} MAX_APP_KEY: ${env.MAX_APP_KEY} MAX_APP_TYPE: ${env.MAX_APP_TYPE}`);
60
+ }
61
+ // Annotate the CommonJS export names for ESM import in node:
62
+ 0 && (module.exports = {});
@@ -0,0 +1,2 @@
1
+ import 'zx/globals';
2
+ export default function start(): Promise<void>;
@@ -0,0 +1,59 @@
1
+ var __create = Object.create;
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __getProtoOf = Object.getPrototypeOf;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __export = (target, all) => {
8
+ for (var name in all)
9
+ __defProp(target, name, { get: all[name], enumerable: true });
10
+ };
11
+ var __copyProps = (to, from, except, desc) => {
12
+ if (from && typeof from === "object" || typeof from === "function") {
13
+ for (let key of __getOwnPropNames(from))
14
+ if (!__hasOwnProp.call(to, key) && key !== except)
15
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
+ }
17
+ return to;
18
+ };
19
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
20
+ // If the importer is in node compatibility mode or this is not an ESM
21
+ // file that has been converted to a CommonJS file using a Babel-
22
+ // compatible transform (i.e. "__esModule" has not been set), then set
23
+ // "default" to the CommonJS "module.exports" for node compatibility.
24
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
25
+ mod
26
+ ));
27
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
28
+
29
+ // src/cli/start.ts
30
+ var start_exports = {};
31
+ __export(start_exports, {
32
+ default: () => start
33
+ });
34
+ module.exports = __toCommonJS(start_exports);
35
+ var logger = __toESM(require("@umijs/utils/dist/logger"));
36
+ var import_utils = require("../internal/utils");
37
+ var import_globals = require("zx/globals");
38
+ var import_path = require("path");
39
+ var cwd = process.cwd();
40
+ async function start() {
41
+ const pkg = require((0, import_path.join)(cwd, "package.json"));
42
+ process.env.MAX_APP_ENV = "development";
43
+ process.env.BABEL_ENV = "development";
44
+ process.env.MAX_APP_TYPE = "max";
45
+ process.env.MAX_APP_KEY = pkg.appKey || "";
46
+ const env = Object.create(process.env);
47
+ logger.event("check pnpm version");
48
+ const pnpmVersion = (await $`pnpm --version`).stdout.trim();
49
+ (0, import_utils.assert)(
50
+ !pnpmVersion.includes("not found"),
51
+ "pnpm: command not found please use npm install -g pnpm"
52
+ );
53
+ logger.info(`MAX_APP_ENV: ${env.MAX_APP_ENV} MAX_APP_KEY: ${env.MAX_APP_KEY} MAX_APP_TYPE: ${env.MAX_APP_TYPE}`);
54
+ logger.event("max dev");
55
+ await $`max dev`;
56
+ logger.info(`Success MAX_APP_ENV: ${env.MAX_APP_ENV} MAX_APP_KEY: ${env.MAX_APP_KEY} MAX_APP_TYPE: ${env.MAX_APP_TYPE}`);
57
+ }
58
+ // Annotate the CommonJS export names for ESM import in node:
59
+ 0 && (module.exports = {});
@@ -0,0 +1,2 @@
1
+ import 'zx/globals';
2
+ export default function update(): Promise<void>;
@@ -0,0 +1,50 @@
1
+ var __create = Object.create;
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __getProtoOf = Object.getPrototypeOf;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __export = (target, all) => {
8
+ for (var name in all)
9
+ __defProp(target, name, { get: all[name], enumerable: true });
10
+ };
11
+ var __copyProps = (to, from, except, desc) => {
12
+ if (from && typeof from === "object" || typeof from === "function") {
13
+ for (let key of __getOwnPropNames(from))
14
+ if (!__hasOwnProp.call(to, key) && key !== except)
15
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
+ }
17
+ return to;
18
+ };
19
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
20
+ // If the importer is in node compatibility mode or this is not an ESM
21
+ // file that has been converted to a CommonJS file using a Babel-
22
+ // compatible transform (i.e. "__esModule" has not been set), then set
23
+ // "default" to the CommonJS "module.exports" for node compatibility.
24
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
25
+ mod
26
+ ));
27
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
28
+
29
+ // src/cli/update.ts
30
+ var update_exports = {};
31
+ __export(update_exports, {
32
+ default: () => update
33
+ });
34
+ module.exports = __toCommonJS(update_exports);
35
+ var logger = __toESM(require("@umijs/utils/dist/logger"));
36
+ var import_utils = require("../internal/utils");
37
+ var import_globals = require("zx/globals");
38
+ async function update() {
39
+ logger.event("check pnpm version");
40
+ const pnpmVersion = (await $`pnpm --version`).stdout.trim();
41
+ (0, import_utils.assert)(
42
+ !pnpmVersion.includes("not found"),
43
+ "pnpm: command not found please use npm install -g pnpm"
44
+ );
45
+ logger.event("update @teams-max/*");
46
+ await $`pnpm up "@teams-max/*"`;
47
+ logger.info(`Success update @teams-max/*`);
48
+ }
49
+ // Annotate the CommonJS export names for ESM import in node:
50
+ 0 && (module.exports = {});
package/lib/index.d.ts ADDED
@@ -0,0 +1 @@
1
+ export { run } from './cli/cli';
package/lib/index.js ADDED
@@ -0,0 +1,29 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __export = (target, all) => {
6
+ for (var name in all)
7
+ __defProp(target, name, { get: all[name], enumerable: true });
8
+ };
9
+ var __copyProps = (to, from, except, desc) => {
10
+ if (from && typeof from === "object" || typeof from === "function") {
11
+ for (let key of __getOwnPropNames(from))
12
+ if (!__hasOwnProp.call(to, key) && key !== except)
13
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
+ }
15
+ return to;
16
+ };
17
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
+
19
+ // src/index.ts
20
+ var src_exports = {};
21
+ __export(src_exports, {
22
+ run: () => import_cli.run
23
+ });
24
+ module.exports = __toCommonJS(src_exports);
25
+ var import_cli = require("./cli/cli");
26
+ // Annotate the CommonJS export names for ESM import in node:
27
+ 0 && (module.exports = {
28
+ run
29
+ });
@@ -0,0 +1,10 @@
1
+ import 'zx/globals';
2
+ declare type EnvType = 'production' | 'UAT' | 'TEST' | 'development' | 'stage';
3
+ declare type StatusType = 'doing' | 'success' | 'fail';
4
+ export default function ({ args, appList, environment, buildStatus }: {
5
+ args: Record<string, string>;
6
+ appList: string[];
7
+ environment: EnvType[];
8
+ buildStatus?: StatusType;
9
+ }): Promise<void>;
10
+ export {};