@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,112 @@
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/internal/buildNotify.ts
30
+ var buildNotify_exports = {};
31
+ __export(buildNotify_exports, {
32
+ default: () => buildNotify_default
33
+ });
34
+ module.exports = __toCommonJS(buildNotify_exports);
35
+ var import_umi_request = require("umi-request");
36
+ var import_crypto_js = __toESM(require("crypto-js"));
37
+ var import_globals = require("zx/globals");
38
+ var import_datetimeFormat = __toESM(require("./datetimeFormat"));
39
+ function base64Url(str) {
40
+ return import_crypto_js.default.enc.Base64.stringify(str).replace(/\+/g, "-").replace(/\//g, "_");
41
+ }
42
+ function formatChangeLog(log) {
43
+ if (!log)
44
+ return "";
45
+ const commits = log.split("\n").map((commit) => {
46
+ const splitIndex = commit.lastIndexOf(" ");
47
+ return {
48
+ message: commit.slice(0, splitIndex),
49
+ id: commit.slice(splitIndex + 1)
50
+ };
51
+ });
52
+ return commits.map((commit) => `- ${commit.message} ${commit.id}`).join("\n");
53
+ }
54
+ var statusTextMap = { doing: "\u6B63\u5728\u6784\u5EFA\u9879\u76EE", success: "\u9879\u76EE\u6784\u5EFA\u6210\u529F", fail: "\u9879\u76EE\u6784\u5EFA\u5931\u8D25" };
55
+ var request = (0, import_umi_request.extend)({
56
+ headers: {
57
+ "Content-Type": "application/json"
58
+ }
59
+ });
60
+ var accessToken = "5ab4ff650f3c47d7a4c7feae3ce5715ae1a36c81e34c4452af25b96a8669b165";
61
+ var secret = "81d89e48be684b94ab9acd43b49657ea7f94506b23e2400894105ecc7779735e";
62
+ var url = "https://im.360teams.com/api/qfin-api/rce-app/robot/send";
63
+ async function buildNotify_default({ args, appList, environment, buildStatus = "doing" }) {
64
+ $.verbose = false;
65
+ const omitDevEnv = environment.filter((item) => item !== "development");
66
+ const changeLog = args.changeLog || args.CHANGELOG || args.change_log || args.CHANGE_LOG || "";
67
+ const branch = args.branch || args.BRANCH || "";
68
+ const serverEnv = args.opsEnv || args.OPSENV || args.ops_env || args.OPS_ENV || "";
69
+ if (!omitDevEnv.length)
70
+ return;
71
+ const timestamp = new Date().getTime();
72
+ const msgId = timestamp;
73
+ const str = timestamp + "\n" + secret;
74
+ const sign = encodeURIComponent(base64Url(import_crypto_js.default.HmacSHA256(str, secret)));
75
+ let BUILD_USER = args.buildUser || args.build_user || args.BUILD_USER || (await $`git config user.name`).stdout.trim();
76
+ const changeLogText = formatChangeLog(changeLog);
77
+ let content = `${BUILD_USER} ${statusTextMap[buildStatus]}:
78
+ `;
79
+ content += `APP: [${appList.join(", ")}]
80
+ `;
81
+ if (branch) {
82
+ content += `BRANCH: ${branch}
83
+ `;
84
+ }
85
+ content += `ENV: [${omitDevEnv.join(", ")}]
86
+ `;
87
+ if (serverEnv) {
88
+ content += `SERVER: ${serverEnv}
89
+ `;
90
+ }
91
+ content += `TIME: ${(0, import_datetimeFormat.default)(timestamp, "yyyy-MM-dd hh:mm:ss:S")}
92
+ `;
93
+ if (buildStatus === "doing") {
94
+ content += `LOG: ${changeLogText ? "\n" : ""}`;
95
+ content += `${changeLogText ? changeLogText : "no change"}
96
+ `;
97
+ }
98
+ request.post(`${url}?access_token=${accessToken}&timestamp=${timestamp}&sign=${sign}`, {
99
+ data: {
100
+ msgId,
101
+ msgtype: "text",
102
+ text: { content },
103
+ at: {
104
+ isAtAll: false,
105
+ userIds: ["zhangxiaoyang-jk", "liuxiangdong1-jk"]
106
+ }
107
+ }
108
+ });
109
+ $.verbose = true;
110
+ }
111
+ // Annotate the CommonJS export names for ESM import in node:
112
+ 0 && (module.exports = {});
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2018 Made With MOXY Lda <hello@moxy.studio>
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,39 @@
1
+ // Type definitions for cross-spawn 6.0
2
+ // Project: https://github.com/moxystudio/node-cross-spawn
3
+ // Definitions by: Alorel <https://github.com/Alorel>
4
+ // ExE Boss <https://github.com/ExE-Boss>
5
+ // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
6
+
7
+ /// <reference types="node" />
8
+
9
+ import * as child_process from 'child_process';
10
+
11
+ declare namespace spawn {
12
+ /**
13
+ * The `spawn()` method spawns a new process using the given `command`, with
14
+ * command line arguments in `args`. If omitted, `args` defaults to an empty array.
15
+ */
16
+ const spawn: typeof child_process.spawn;
17
+
18
+ /**
19
+ * The `spawn.sync()` method spawns a new process using the given `command`, with
20
+ * command line arguments in `args`. If omitted, `args` defaults to an empty array.
21
+ */
22
+ const sync: typeof child_process.spawnSync;
23
+ }
24
+
25
+ /**
26
+ * The `spawn()` method spawns a new process using the given `command`, with
27
+ * command line arguments in `args`. If omitted, `args` defaults to an empty array.
28
+ */
29
+ declare function spawn(
30
+ command: string,
31
+ options: child_process.SpawnOptions,
32
+ ): child_process.ChildProcess;
33
+ declare function spawn(
34
+ command: string,
35
+ args?: ReadonlyArray<string>,
36
+ options?: child_process.SpawnOptions,
37
+ ): child_process.ChildProcess;
38
+
39
+ export = spawn;
@@ -0,0 +1,465 @@
1
+ // src/internal/cross-spawn/index.js
2
+ module.exports = (() => {
3
+ var t = {
4
+ 746: (t2, e2, n) => {
5
+ "use strict";
6
+ const r = n(129);
7
+ const s = n(855);
8
+ const o = n(101);
9
+ function spawn(t3, e3, n2) {
10
+ const c = s(t3, e3, n2);
11
+ const i = r.spawn(c.command, c.args, c.options);
12
+ o.hookChildProcess(i, c);
13
+ return i;
14
+ }
15
+ function spawnSync(t3, e3, n2) {
16
+ const c = s(t3, e3, n2);
17
+ const i = r.spawnSync(c.command, c.args, c.options);
18
+ i.error = i.error || o.verifyENOENTSync(i.status, c);
19
+ return i;
20
+ }
21
+ t2.exports = spawn;
22
+ t2.exports.spawn = spawn;
23
+ t2.exports.sync = spawnSync;
24
+ t2.exports._parse = s;
25
+ t2.exports._enoent = o;
26
+ },
27
+ 101: (t2) => {
28
+ "use strict";
29
+ const e2 = process.platform === "win32";
30
+ function notFoundError(t3, e3) {
31
+ return Object.assign(new Error(`${e3} ${t3.command} ENOENT`), {
32
+ code: "ENOENT",
33
+ errno: "ENOENT",
34
+ syscall: `${e3} ${t3.command}`,
35
+ path: t3.command,
36
+ spawnargs: t3.args
37
+ });
38
+ }
39
+ function hookChildProcess(t3, n) {
40
+ if (!e2) {
41
+ return;
42
+ }
43
+ const r = t3.emit;
44
+ t3.emit = function(e3, s) {
45
+ if (e3 === "exit") {
46
+ const e4 = verifyENOENT(s, n, "spawn");
47
+ if (e4) {
48
+ return r.call(t3, "error", e4);
49
+ }
50
+ }
51
+ return r.apply(t3, arguments);
52
+ };
53
+ }
54
+ function verifyENOENT(t3, n) {
55
+ if (e2 && t3 === 1 && !n.file) {
56
+ return notFoundError(n.original, "spawn");
57
+ }
58
+ return null;
59
+ }
60
+ function verifyENOENTSync(t3, n) {
61
+ if (e2 && t3 === 1 && !n.file) {
62
+ return notFoundError(n.original, "spawnSync");
63
+ }
64
+ return null;
65
+ }
66
+ t2.exports = {
67
+ hookChildProcess,
68
+ verifyENOENT,
69
+ verifyENOENTSync,
70
+ notFoundError
71
+ };
72
+ },
73
+ 855: (t2, e2, n) => {
74
+ "use strict";
75
+ const r = n(622);
76
+ const s = n(274);
77
+ const o = n(48);
78
+ const c = n(252);
79
+ const i = process.platform === "win32";
80
+ const a = /\.(?:com|exe)$/i;
81
+ const u = /node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;
82
+ function detectShebang(t3) {
83
+ t3.file = s(t3);
84
+ const e3 = t3.file && c(t3.file);
85
+ if (e3) {
86
+ t3.args.unshift(t3.file);
87
+ t3.command = e3;
88
+ return s(t3);
89
+ }
90
+ return t3.file;
91
+ }
92
+ function parseNonShell(t3) {
93
+ if (!i) {
94
+ return t3;
95
+ }
96
+ const e3 = detectShebang(t3);
97
+ const n2 = !a.test(e3);
98
+ if (t3.options.forceShell || n2) {
99
+ const n3 = u.test(e3);
100
+ t3.command = r.normalize(t3.command);
101
+ t3.command = o.command(t3.command);
102
+ t3.args = t3.args.map((t4) => o.argument(t4, n3));
103
+ const s2 = [t3.command].concat(t3.args).join(" ");
104
+ t3.args = ["/d", "/s", "/c", `"${s2}"`];
105
+ t3.command = process.env.comspec || "cmd.exe";
106
+ t3.options.windowsVerbatimArguments = true;
107
+ }
108
+ return t3;
109
+ }
110
+ function parse(t3, e3, n2) {
111
+ if (e3 && !Array.isArray(e3)) {
112
+ n2 = e3;
113
+ e3 = null;
114
+ }
115
+ e3 = e3 ? e3.slice(0) : [];
116
+ n2 = Object.assign({}, n2);
117
+ const r2 = {
118
+ command: t3,
119
+ args: e3,
120
+ options: n2,
121
+ file: void 0,
122
+ original: { command: t3, args: e3 }
123
+ };
124
+ return n2.shell ? r2 : parseNonShell(r2);
125
+ }
126
+ t2.exports = parse;
127
+ },
128
+ 48: (t2) => {
129
+ "use strict";
130
+ const e2 = /([()\][%!^"`<>&|;, *?])/g;
131
+ function escapeCommand(t3) {
132
+ t3 = t3.replace(e2, "^$1");
133
+ return t3;
134
+ }
135
+ function escapeArgument(t3, n) {
136
+ t3 = `${t3}`;
137
+ t3 = t3.replace(/(\\*)"/g, '$1$1\\"');
138
+ t3 = t3.replace(/(\\*)$/, "$1$1");
139
+ t3 = `"${t3}"`;
140
+ t3 = t3.replace(e2, "^$1");
141
+ if (n) {
142
+ t3 = t3.replace(e2, "^$1");
143
+ }
144
+ return t3;
145
+ }
146
+ t2.exports.command = escapeCommand;
147
+ t2.exports.argument = escapeArgument;
148
+ },
149
+ 252: (t2, e2, n) => {
150
+ "use strict";
151
+ const r = n(747);
152
+ const s = n(32);
153
+ function readShebang(t3) {
154
+ const e3 = 150;
155
+ const n2 = Buffer.alloc(e3);
156
+ let o;
157
+ try {
158
+ o = r.openSync(t3, "r");
159
+ r.readSync(o, n2, 0, e3, 0);
160
+ r.closeSync(o);
161
+ } catch (t4) {
162
+ }
163
+ return s(n2.toString());
164
+ }
165
+ t2.exports = readShebang;
166
+ },
167
+ 274: (t2, e2, n) => {
168
+ "use strict";
169
+ const r = n(622);
170
+ const s = n(207);
171
+ const o = n(60);
172
+ function resolveCommandAttempt(t3, e3) {
173
+ const n2 = t3.options.env || process.env;
174
+ const c = process.cwd();
175
+ const i = t3.options.cwd != null;
176
+ const a = i && process.chdir !== void 0 && !process.chdir.disabled;
177
+ if (a) {
178
+ try {
179
+ process.chdir(t3.options.cwd);
180
+ } catch (t4) {
181
+ }
182
+ }
183
+ let u;
184
+ try {
185
+ u = s.sync(t3.command, { path: n2[o({ env: n2 })], pathExt: e3 ? r.delimiter : void 0 });
186
+ } catch (t4) {
187
+ } finally {
188
+ if (a) {
189
+ process.chdir(c);
190
+ }
191
+ }
192
+ if (u) {
193
+ u = r.resolve(i ? t3.options.cwd : "", u);
194
+ }
195
+ return u;
196
+ }
197
+ function resolveCommand(t3) {
198
+ return resolveCommandAttempt(t3) || resolveCommandAttempt(t3, true);
199
+ }
200
+ t2.exports = resolveCommand;
201
+ },
202
+ 60: (t2) => {
203
+ "use strict";
204
+ const e2 = (t3 = {}) => {
205
+ const e3 = t3.env || process.env;
206
+ const n = t3.platform || process.platform;
207
+ if (n !== "win32") {
208
+ return "PATH";
209
+ }
210
+ return Object.keys(e3).reverse().find((t4) => t4.toUpperCase() === "PATH") || "Path";
211
+ };
212
+ t2.exports = e2;
213
+ t2.exports.default = e2;
214
+ },
215
+ 126: (t2, e2, n) => {
216
+ var r = n(747);
217
+ var s;
218
+ if (process.platform === "win32" || global.TESTING_WINDOWS) {
219
+ s = n(1);
220
+ } else {
221
+ s = n(728);
222
+ }
223
+ t2.exports = isexe;
224
+ isexe.sync = sync;
225
+ function isexe(t3, e3, n2) {
226
+ if (typeof e3 === "function") {
227
+ n2 = e3;
228
+ e3 = {};
229
+ }
230
+ if (!n2) {
231
+ if (typeof Promise !== "function") {
232
+ throw new TypeError("callback not provided");
233
+ }
234
+ return new Promise(function(n3, r2) {
235
+ isexe(t3, e3 || {}, function(t4, e4) {
236
+ if (t4) {
237
+ r2(t4);
238
+ } else {
239
+ n3(e4);
240
+ }
241
+ });
242
+ });
243
+ }
244
+ s(t3, e3 || {}, function(t4, r2) {
245
+ if (t4) {
246
+ if (t4.code === "EACCES" || e3 && e3.ignoreErrors) {
247
+ t4 = null;
248
+ r2 = false;
249
+ }
250
+ }
251
+ n2(t4, r2);
252
+ });
253
+ }
254
+ function sync(t3, e3) {
255
+ try {
256
+ return s.sync(t3, e3 || {});
257
+ } catch (t4) {
258
+ if (e3 && e3.ignoreErrors || t4.code === "EACCES") {
259
+ return false;
260
+ } else {
261
+ throw t4;
262
+ }
263
+ }
264
+ }
265
+ },
266
+ 728: (t2, e2, n) => {
267
+ t2.exports = isexe;
268
+ isexe.sync = sync;
269
+ var r = n(747);
270
+ function isexe(t3, e3, n2) {
271
+ r.stat(t3, function(t4, r2) {
272
+ n2(t4, t4 ? false : checkStat(r2, e3));
273
+ });
274
+ }
275
+ function sync(t3, e3) {
276
+ return checkStat(r.statSync(t3), e3);
277
+ }
278
+ function checkStat(t3, e3) {
279
+ return t3.isFile() && checkMode(t3, e3);
280
+ }
281
+ function checkMode(t3, e3) {
282
+ var n2 = t3.mode;
283
+ var r2 = t3.uid;
284
+ var s = t3.gid;
285
+ var o = e3.uid !== void 0 ? e3.uid : process.getuid && process.getuid();
286
+ var c = e3.gid !== void 0 ? e3.gid : process.getgid && process.getgid();
287
+ var i = parseInt("100", 8);
288
+ var a = parseInt("010", 8);
289
+ var u = parseInt("001", 8);
290
+ var p = i | a;
291
+ var l = n2 & u || n2 & a && s === c || n2 & i && r2 === o || n2 & p && o === 0;
292
+ return l;
293
+ }
294
+ },
295
+ 1: (t2, e2, n) => {
296
+ t2.exports = isexe;
297
+ isexe.sync = sync;
298
+ var r = n(747);
299
+ function checkPathExt(t3, e3) {
300
+ var n2 = e3.pathExt !== void 0 ? e3.pathExt : process.env.PATHEXT;
301
+ if (!n2) {
302
+ return true;
303
+ }
304
+ n2 = n2.split(";");
305
+ if (n2.indexOf("") !== -1) {
306
+ return true;
307
+ }
308
+ for (var r2 = 0; r2 < n2.length; r2++) {
309
+ var s = n2[r2].toLowerCase();
310
+ if (s && t3.substr(-s.length).toLowerCase() === s) {
311
+ return true;
312
+ }
313
+ }
314
+ return false;
315
+ }
316
+ function checkStat(t3, e3, n2) {
317
+ if (!t3.isSymbolicLink() && !t3.isFile()) {
318
+ return false;
319
+ }
320
+ return checkPathExt(e3, n2);
321
+ }
322
+ function isexe(t3, e3, n2) {
323
+ r.stat(t3, function(r2, s) {
324
+ n2(r2, r2 ? false : checkStat(s, t3, e3));
325
+ });
326
+ }
327
+ function sync(t3, e3) {
328
+ return checkStat(r.statSync(t3), t3, e3);
329
+ }
330
+ },
331
+ 32: (t2, e2, n) => {
332
+ "use strict";
333
+ const r = n(638);
334
+ t2.exports = (t3 = "") => {
335
+ const e3 = t3.match(r);
336
+ if (!e3) {
337
+ return null;
338
+ }
339
+ const [n2, s] = e3[0].replace(/#! ?/, "").split(" ");
340
+ const o = n2.split("/").pop();
341
+ if (o === "env") {
342
+ return s;
343
+ }
344
+ return s ? `${o} ${s}` : o;
345
+ };
346
+ },
347
+ 638: (t2) => {
348
+ "use strict";
349
+ t2.exports = /^#!(.*)/;
350
+ },
351
+ 207: (t2, e2, n) => {
352
+ const r = process.platform === "win32" || process.env.OSTYPE === "cygwin" || process.env.OSTYPE === "msys";
353
+ const s = n(622);
354
+ const o = r ? ";" : ":";
355
+ const c = n(126);
356
+ const i = (t3) => Object.assign(new Error(`not found: ${t3}`), { code: "ENOENT" });
357
+ const a = (t3, e3) => {
358
+ const n2 = e3.colon || o;
359
+ const s2 = t3.match(/\//) || r && t3.match(/\\/) ? [""] : [...r ? [process.cwd()] : [], ...(e3.path || process.env.PATH || "").split(n2)];
360
+ const c2 = r ? e3.pathExt || process.env.PATHEXT || ".EXE;.CMD;.BAT;.COM" : "";
361
+ const i2 = r ? c2.split(n2) : [""];
362
+ if (r) {
363
+ if (t3.indexOf(".") !== -1 && i2[0] !== "")
364
+ i2.unshift("");
365
+ }
366
+ return { pathEnv: s2, pathExt: i2, pathExtExe: c2 };
367
+ };
368
+ const u = (t3, e3, n2) => {
369
+ if (typeof e3 === "function") {
370
+ n2 = e3;
371
+ e3 = {};
372
+ }
373
+ if (!e3)
374
+ e3 = {};
375
+ const { pathEnv: r2, pathExt: o2, pathExtExe: u2 } = a(t3, e3);
376
+ const p2 = [];
377
+ const l = (n3) => new Promise((o3, c2) => {
378
+ if (n3 === r2.length)
379
+ return e3.all && p2.length ? o3(p2) : c2(i(t3));
380
+ const a2 = r2[n3];
381
+ const u3 = /^".*"$/.test(a2) ? a2.slice(1, -1) : a2;
382
+ const l2 = s.join(u3, t3);
383
+ const d = !u3 && /^\.[\\\/]/.test(t3) ? t3.slice(0, 2) + l2 : l2;
384
+ o3(f(d, n3, 0));
385
+ });
386
+ const f = (t4, n3, r3) => new Promise((s2, i2) => {
387
+ if (r3 === o2.length)
388
+ return s2(l(n3 + 1));
389
+ const a2 = o2[r3];
390
+ c(t4 + a2, { pathExt: u2 }, (o3, c2) => {
391
+ if (!o3 && c2) {
392
+ if (e3.all)
393
+ p2.push(t4 + a2);
394
+ else
395
+ return s2(t4 + a2);
396
+ }
397
+ return s2(f(t4, n3, r3 + 1));
398
+ });
399
+ });
400
+ return n2 ? l(0).then((t4) => n2(null, t4), n2) : l(0);
401
+ };
402
+ const p = (t3, e3) => {
403
+ e3 = e3 || {};
404
+ const { pathEnv: n2, pathExt: r2, pathExtExe: o2 } = a(t3, e3);
405
+ const u2 = [];
406
+ for (let i2 = 0; i2 < n2.length; i2++) {
407
+ const a2 = n2[i2];
408
+ const p2 = /^".*"$/.test(a2) ? a2.slice(1, -1) : a2;
409
+ const l = s.join(p2, t3);
410
+ const f = !p2 && /^\.[\\\/]/.test(t3) ? t3.slice(0, 2) + l : l;
411
+ for (let t4 = 0; t4 < r2.length; t4++) {
412
+ const n3 = f + r2[t4];
413
+ try {
414
+ const t5 = c.sync(n3, { pathExt: o2 });
415
+ if (t5) {
416
+ if (e3.all)
417
+ u2.push(n3);
418
+ else
419
+ return n3;
420
+ }
421
+ } catch (t5) {
422
+ }
423
+ }
424
+ }
425
+ if (e3.all && u2.length)
426
+ return u2;
427
+ if (e3.nothrow)
428
+ return null;
429
+ throw i(t3);
430
+ };
431
+ t2.exports = u;
432
+ u.sync = p;
433
+ },
434
+ 129: (t2) => {
435
+ "use strict";
436
+ t2.exports = require("child_process");
437
+ },
438
+ 747: (t2) => {
439
+ "use strict";
440
+ t2.exports = require("fs");
441
+ },
442
+ 622: (t2) => {
443
+ "use strict";
444
+ t2.exports = require("path");
445
+ }
446
+ };
447
+ var e = {};
448
+ function __nccwpck_require__(n) {
449
+ if (e[n]) {
450
+ return e[n].exports;
451
+ }
452
+ var r = e[n] = { exports: {} };
453
+ var s = true;
454
+ try {
455
+ t[n](r, r.exports, __nccwpck_require__);
456
+ s = false;
457
+ } finally {
458
+ if (s)
459
+ delete e[n];
460
+ }
461
+ return r.exports;
462
+ }
463
+ __nccwpck_require__.ab = __dirname + "/";
464
+ return __nccwpck_require__(746);
465
+ })();
@@ -0,0 +1 @@
1
+ {"name":"cross-spawn","main":"index.js","author":"André Cruz <andre@moxy.studio>","license":"MIT","types":"index.d.ts"}
@@ -0,0 +1,9 @@
1
+ /**
2
+ * 日期时间格式化
3
+ * @param {Date | String | Number} value 时间、类时间对象
4
+ * @param {String} format 格式:yyyy-MM-dd hh:mm:ss:S
5
+ * @param {Boolean} isCoerce 是否对类时间格式强制转换
6
+ * @returns {String} 返回格式化后的值
7
+ */
8
+ declare function datetimeFormat(value: any, format: string, isCoerce?: boolean): string;
9
+ export default datetimeFormat;