@teams-max/mwsp 1.0.2 → 2.0.1
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 +2 -31
- package/es/cli/build.d.ts +0 -1
- package/es/cli/build.js +69 -61
- package/es/cli/cli.js +4 -12
- package/es/cli/start.d.ts +0 -1
- package/es/cli/start.js +48 -26
- package/es/index.d.ts +2 -0
- package/es/index.js +3 -1
- package/es/utils/chalk/LICENSE +9 -0
- package/es/utils/chalk/index.d.ts +416 -0
- package/es/utils/chalk/index.js +1719 -0
- package/es/utils/chalk/package.json +6 -0
- package/es/{cli/update.js → utils/changelog.js} +41 -34
- package/es/utils/cross-spawn/package.json +7 -0
- package/es/{internal → utils}/datetimeFormat.js +1 -3
- package/es/utils/defineConfig.js +20 -0
- package/es/{internal → utils}/exec.js +3 -2
- package/{lib/internal → es/utils}/execa/index.d.ts +41 -11
- package/es/utils/execa/package.json +11 -0
- package/es/utils/getPackages.js +9 -0
- package/es/{cli/dev.js → utils/git.js} +88 -36
- package/es/{internal/utils.js → utils/index.js} +270 -70
- package/es/utils/isNextVersion.js +3 -0
- package/{lib/internal → es/utils}/merge-stream/index.d.ts +3 -1
- package/es/utils/merge-stream/package.json +7 -0
- package/es/utils/parseDoc.js +33 -0
- package/es/utils/yargs-parser/index.d.ts +114 -0
- package/es/utils/yargs-parser/index.js +919 -0
- package/es/utils/yargs-parser/package.json +7 -0
- package/lib/cli/build.d.ts +0 -1
- package/lib/cli/build.js +54 -50
- package/lib/cli/cli.js +0 -8
- package/lib/cli/start.d.ts +0 -1
- package/lib/cli/start.js +25 -30
- package/lib/index.d.ts +2 -0
- package/lib/index.js +3 -0
- package/lib/utils/chalk/LICENSE +9 -0
- package/lib/utils/chalk/index.d.ts +416 -0
- package/lib/utils/chalk/index.js +1538 -0
- package/lib/utils/chalk/package.json +6 -0
- package/lib/utils/changelog.js +21 -0
- package/lib/{internal → utils}/cross-spawn/index.js +9 -3
- package/lib/utils/cross-spawn/package.json +7 -0
- package/lib/{internal → utils}/datetimeFormat.js +14 -30
- package/lib/utils/defineConfig.js +26 -0
- package/lib/utils/exec.js +23 -0
- package/{es/internal → lib/utils}/execa/index.d.ts +41 -11
- package/lib/{internal → utils}/execa/index.js +76 -18
- package/lib/utils/execa/package.json +11 -0
- package/lib/utils/getPackages.js +8 -0
- package/lib/utils/git.js +31 -0
- package/lib/utils/index.js +183 -0
- package/lib/utils/isNextVersion.js +4 -0
- package/{es/internal → lib/utils}/merge-stream/index.d.ts +3 -1
- package/lib/{internal → utils}/merge-stream/index.js +1 -1
- package/lib/utils/merge-stream/package.json +7 -0
- package/lib/utils/parseDoc.js +30 -0
- package/lib/utils/yargs-parser/index.d.ts +114 -0
- package/lib/utils/yargs-parser/index.js +919 -0
- package/lib/utils/yargs-parser/package.json +7 -0
- package/package.json +7 -14
- package/es/cli/dev.d.ts +0 -1
- package/es/cli/update.d.ts +0 -2
- package/es/internal/buildNotify.d.ts +0 -10
- package/es/internal/buildNotify.js +0 -123
- package/es/internal/cross-spawn/package.json +0 -1
- package/es/internal/datetimeFormat.d.ts +0 -9
- package/es/internal/exec.d.ts +0 -1
- package/es/internal/execa/package.json +0 -1
- package/es/internal/merge-stream/package.json +0 -1
- package/es/internal/utils.d.ts +0 -14
- package/lib/cli/dev.d.ts +0 -1
- package/lib/cli/dev.js +0 -62
- package/lib/cli/update.d.ts +0 -2
- package/lib/cli/update.js +0 -50
- package/lib/internal/buildNotify.d.ts +0 -10
- package/lib/internal/buildNotify.js +0 -112
- package/lib/internal/cross-spawn/package.json +0 -1
- package/lib/internal/datetimeFormat.d.ts +0 -9
- package/lib/internal/exec.d.ts +0 -1
- package/lib/internal/exec.js +0 -60
- package/lib/internal/execa/package.json +0 -1
- package/lib/internal/merge-stream/package.json +0 -1
- package/lib/internal/utils.d.ts +0 -14
- package/lib/internal/utils.js +0 -100
- /package/es/{internal → utils}/cross-spawn/LICENSE +0 -0
- /package/es/{internal → utils}/cross-spawn/index.d.ts +0 -0
- /package/es/{internal → utils}/cross-spawn/index.js +0 -0
- /package/es/{internal → utils}/execa/LICENSE +0 -0
- /package/es/{internal → utils}/execa/index.js +0 -0
- /package/es/{internal → utils}/merge-stream/LICENSE +0 -0
- /package/es/{internal → utils}/merge-stream/index.js +0 -0
- /package/lib/{internal → utils}/cross-spawn/LICENSE +0 -0
- /package/lib/{internal → utils}/cross-spawn/index.d.ts +0 -0
- /package/lib/{internal → utils}/execa/LICENSE +0 -0
- /package/lib/{internal → utils}/merge-stream/LICENSE +0 -0
package/lib/internal/utils.js
DELETED
|
@@ -1,100 +0,0 @@
|
|
|
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/utils.ts
|
|
30
|
-
var utils_exports = {};
|
|
31
|
-
__export(utils_exports, {
|
|
32
|
-
assert: () => assert,
|
|
33
|
-
gitHeadReset: () => gitHeadReset,
|
|
34
|
-
setExcludeFolder: () => setExcludeFolder,
|
|
35
|
-
spawnSync: () => spawnSync,
|
|
36
|
-
toArray: () => toArray
|
|
37
|
-
});
|
|
38
|
-
module.exports = __toCommonJS(utils_exports);
|
|
39
|
-
var import_cross_spawn = __toESM(require("@umijs/utils/compiled/cross-spawn"));
|
|
40
|
-
var logger = __toESM(require("@umijs/utils/dist/logger"));
|
|
41
|
-
var import_fs = require("fs");
|
|
42
|
-
var import_path = require("path");
|
|
43
|
-
var import_globals = require("zx/globals");
|
|
44
|
-
function assert(v, message) {
|
|
45
|
-
if (!v) {
|
|
46
|
-
logger.error(message);
|
|
47
|
-
process.exit(1);
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
function setExcludeFolder(opts) {
|
|
51
|
-
const dirName = opts.dirName || "packages";
|
|
52
|
-
const folders = opts.folders || ["dist", "compiled"];
|
|
53
|
-
if (!(0, import_fs.existsSync)((0, import_path.join)(opts.cwd, ".idea")))
|
|
54
|
-
return;
|
|
55
|
-
const configPath = (0, import_path.join)(opts.cwd, ".idea", "umi-next.iml");
|
|
56
|
-
let content = (0, import_fs.readFileSync)(configPath, "utf-8");
|
|
57
|
-
for (const folder of folders) {
|
|
58
|
-
const excludeContent = `<excludeFolder url='file://$MODULE_DIR$/${dirName}/${opts.pkg}/${folder}' />`;
|
|
59
|
-
const replaceMatcher = `<content url="file://$MODULE_DIR$">`;
|
|
60
|
-
if (!content.includes(excludeContent)) {
|
|
61
|
-
content = content.replace(
|
|
62
|
-
replaceMatcher,
|
|
63
|
-
`${replaceMatcher}
|
|
64
|
-
${excludeContent}`
|
|
65
|
-
);
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
(0, import_fs.writeFileSync)(configPath, content, "utf-8");
|
|
69
|
-
}
|
|
70
|
-
function spawnSync(cmd, opts, status) {
|
|
71
|
-
const result = import_cross_spawn.default.sync(cmd, {
|
|
72
|
-
shell: true,
|
|
73
|
-
stdio: "inherit",
|
|
74
|
-
...opts
|
|
75
|
-
});
|
|
76
|
-
if (result.status !== 0 && status !== "continue") {
|
|
77
|
-
logger.error(`Execute command error (${cmd})`);
|
|
78
|
-
process.exit(1);
|
|
79
|
-
}
|
|
80
|
-
return result;
|
|
81
|
-
}
|
|
82
|
-
function toArray(v) {
|
|
83
|
-
if (Array.isArray(v)) {
|
|
84
|
-
return v;
|
|
85
|
-
}
|
|
86
|
-
return [v];
|
|
87
|
-
}
|
|
88
|
-
async function gitHeadReset() {
|
|
89
|
-
$.verbose = false;
|
|
90
|
-
await $`git reset HEAD -- packages/app-* .gitmodules`;
|
|
91
|
-
$.verbose = true;
|
|
92
|
-
}
|
|
93
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
94
|
-
0 && (module.exports = {
|
|
95
|
-
assert,
|
|
96
|
-
gitHeadReset,
|
|
97
|
-
setExcludeFolder,
|
|
98
|
-
spawnSync,
|
|
99
|
-
toArray
|
|
100
|
-
});
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|