@modern-js/monorepo-tools 2.35.0 → 2.36.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.
- package/dist/cjs/cli/build.js +26 -9
- package/dist/cjs/cli/buildWatch.js +26 -9
- package/dist/cjs/cli/clear.js +26 -9
- package/dist/cjs/cli/deploy.js +26 -9
- package/dist/cjs/cli/index.js +30 -9
- package/dist/cjs/cli/install.js +26 -9
- package/dist/cjs/cli/new.js +29 -12
- package/dist/cjs/commands/build.js +33 -16
- package/dist/cjs/commands/buildWatch.js +32 -15
- package/dist/cjs/commands/clear.js +30 -13
- package/dist/cjs/commands/deploy.js +34 -17
- package/dist/cjs/commands/index.js +28 -8
- package/dist/cjs/commands/install.js +32 -15
- package/dist/cjs/constants.js +25 -15
- package/dist/cjs/dag/create.js +25 -9
- package/dist/cjs/dag/edgeManager.js +26 -9
- package/dist/cjs/dag/index.js +28 -11
- package/dist/cjs/dag/operator.js +59 -34
- package/dist/cjs/dag/task.js +46 -20
- package/dist/cjs/dag/utils.js +33 -25
- package/dist/cjs/features/build/index.js +51 -32
- package/dist/cjs/features/clear/index.js +47 -28
- package/dist/cjs/features/deploy/index.js +66 -41
- package/dist/cjs/features/dev/cmds.js +24 -7
- package/dist/cjs/features/dev/createTask.js +50 -31
- package/dist/cjs/features/dev/index.js +47 -21
- package/dist/cjs/features/dev/watchProjectsState.js +43 -17
- package/dist/cjs/features/install/index.js +55 -29
- package/dist/cjs/hooks/index.js +26 -9
- package/dist/cjs/index.js +45 -35
- package/dist/cjs/locale/en.js +24 -7
- package/dist/cjs/locale/index.js +31 -21
- package/dist/cjs/locale/zh.js +24 -7
- package/dist/cjs/log/error.js +24 -7
- package/dist/cjs/log/multiTasksLog.js +33 -16
- package/dist/cjs/log/time.js +29 -20
- package/dist/cjs/log/utils.js +24 -7
- package/dist/cjs/package/index.js +28 -11
- package/dist/cjs/parse-config/index.js +39 -13
- package/dist/cjs/parse-config/monorepo.js +55 -39
- package/dist/cjs/projects/checkProjectChange.js +65 -50
- package/dist/cjs/projects/clearMemoryFiles.js +39 -13
- package/dist/cjs/projects/getProjects.js +37 -27
- package/dist/cjs/projects/getProjectsByPackagesConfig.js +51 -33
- package/dist/cjs/projects/getProjectsByWorkspaceFile.js +63 -44
- package/dist/cjs/type.js +15 -3
- package/dist/cjs/utils/install.js +43 -24
- package/dist/cjs/utils/types.js +15 -3
- package/dist/esm/cli/build.js +4 -1
- package/dist/esm/cli/buildWatch.js +4 -1
- package/dist/esm/cli/clear.js +4 -1
- package/dist/esm/cli/deploy.js +4 -1
- package/dist/esm/cli/install.js +4 -1
- package/dist/esm/cli/new.js +4 -1
- package/dist/esm/commands/build.js +4 -1
- package/dist/esm/commands/buildWatch.js +4 -1
- package/dist/esm/commands/clear.js +4 -1
- package/dist/esm/commands/deploy.js +4 -1
- package/dist/esm/commands/install.js +4 -1
- package/dist/esm/constants.js +6 -2
- package/dist/esm/dag/create.js +5 -3
- package/dist/esm/dag/edgeManager.js +4 -1
- package/dist/esm/dag/index.js +4 -1
- package/dist/esm/dag/operator.js +5 -3
- package/dist/esm/dag/task.js +4 -1
- package/dist/esm/dag/utils.js +10 -4
- package/dist/esm/features/build/index.js +6 -2
- package/dist/esm/features/clear/index.js +6 -2
- package/dist/esm/features/deploy/index.js +5 -3
- package/dist/esm/features/dev/cmds.js +4 -1
- package/dist/esm/features/dev/createTask.js +6 -2
- package/dist/esm/features/dev/index.js +4 -1
- package/dist/esm/features/dev/watchProjectsState.js +4 -1
- package/dist/esm/features/install/index.js +6 -3
- package/dist/esm/hooks/index.js +4 -1
- package/dist/esm/index.js +6 -2
- package/dist/esm/locale/en.js +4 -1
- package/dist/esm/locale/index.js +4 -1
- package/dist/esm/locale/zh.js +4 -1
- package/dist/esm/log/error.js +4 -1
- package/dist/esm/log/multiTasksLog.js +4 -1
- package/dist/esm/log/time.js +8 -3
- package/dist/esm/log/utils.js +4 -1
- package/dist/esm/package/index.js +4 -1
- package/dist/esm/parse-config/index.js +4 -1
- package/dist/esm/parse-config/monorepo.js +12 -5
- package/dist/esm/projects/checkProjectChange.js +12 -5
- package/dist/esm/projects/clearMemoryFiles.js +4 -1
- package/dist/esm/projects/getProjects.js +6 -2
- package/dist/esm/projects/getProjectsByPackagesConfig.js +6 -2
- package/dist/esm/projects/getProjectsByWorkspaceFile.js +10 -6
- package/dist/esm/type.js +0 -1
- package/dist/esm/utils/install.js +6 -2
- package/dist/esm/utils/types.js +0 -1
- package/package.json +11 -11
package/dist/cjs/cli/build.js
CHANGED
|
@@ -1,16 +1,33 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
Object.defineProperty
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
Object.
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
9
15
|
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var build_exports = {};
|
|
20
|
+
__export(build_exports, {
|
|
21
|
+
buildCli: () => buildCli
|
|
10
22
|
});
|
|
11
|
-
|
|
23
|
+
module.exports = __toCommonJS(build_exports);
|
|
24
|
+
var import_commands = require("../commands");
|
|
12
25
|
const buildCli = (program, api) => {
|
|
13
26
|
program.command("build [project]").usage("[options]").option("--no-self", "build without target project").option("-t, --dept", "build target project with project’s dependent").option("--no-deps", "build target project without project’s dependencies").option("--only-self", "build target project with nothing").option("-a, --all", "build target project with project’s dependencies and dependent").option("--content-hash", "build target project use content hash cache").option("--git-hash", "build target project use git hash cache").description("build target project").action(async (targetProjectName, option) => {
|
|
14
|
-
await (0,
|
|
27
|
+
await (0, import_commands.build)(targetProjectName, option, api);
|
|
15
28
|
});
|
|
16
29
|
};
|
|
30
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
31
|
+
0 && (module.exports = {
|
|
32
|
+
buildCli
|
|
33
|
+
});
|
|
@@ -1,16 +1,33 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
Object.defineProperty
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
Object.
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
9
15
|
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var buildWatch_exports = {};
|
|
20
|
+
__export(buildWatch_exports, {
|
|
21
|
+
buildWatchCli: () => buildWatchCli
|
|
10
22
|
});
|
|
11
|
-
|
|
23
|
+
module.exports = __toCommonJS(buildWatch_exports);
|
|
24
|
+
var import_commands = require("../commands");
|
|
12
25
|
const buildWatchCli = (program, api) => {
|
|
13
26
|
program.command("build-watch [project]").usage("[options]").option("--only-self", "build target project with nothing").option("-i, --init", "init build beforebuild watch ").description("watch target project and target project’s dependencies").action(async (targetProjectName, option) => {
|
|
14
|
-
await (0,
|
|
27
|
+
await (0, import_commands.buildWatch)(targetProjectName, option, api);
|
|
15
28
|
});
|
|
16
29
|
};
|
|
30
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
31
|
+
0 && (module.exports = {
|
|
32
|
+
buildWatchCli
|
|
33
|
+
});
|
package/dist/cjs/cli/clear.js
CHANGED
|
@@ -1,16 +1,33 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
Object.defineProperty
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
Object.
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
9
15
|
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var clear_exports = {};
|
|
20
|
+
__export(clear_exports, {
|
|
21
|
+
clearCli: () => clearCli
|
|
10
22
|
});
|
|
11
|
-
|
|
23
|
+
module.exports = __toCommonJS(clear_exports);
|
|
24
|
+
var import_commands = require("../commands");
|
|
12
25
|
const clearCli = (program, api) => {
|
|
13
26
|
program.command("clear [projects...]").usage("[options]").option("--remove-dirs [dirs...]", "remove dirs, default is node_modules").description("clear project dirs").action(async (targetProjectNames, option) => {
|
|
14
|
-
await (0,
|
|
27
|
+
await (0, import_commands.clear)(targetProjectNames, option, api);
|
|
15
28
|
});
|
|
16
29
|
};
|
|
30
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
31
|
+
0 && (module.exports = {
|
|
32
|
+
clearCli
|
|
33
|
+
});
|
package/dist/cjs/cli/deploy.js
CHANGED
|
@@ -1,19 +1,36 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
Object.defineProperty
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
Object.
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
9
15
|
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var deploy_exports = {};
|
|
20
|
+
__export(deploy_exports, {
|
|
21
|
+
deployCli: () => deployCli
|
|
10
22
|
});
|
|
11
|
-
|
|
23
|
+
module.exports = __toCommonJS(deploy_exports);
|
|
24
|
+
var import_commands = require("../commands");
|
|
12
25
|
const deployCli = (program, api) => {
|
|
13
26
|
program.command("deploy [project...]").usage("[options]").option("-p, --path [path]", "Specify the path of the output files", "output").description("deploy project").action(async (deployProjectNames, option) => {
|
|
14
27
|
const ignoreMatchs = [
|
|
15
28
|
"**/output/**"
|
|
16
29
|
];
|
|
17
|
-
await (0,
|
|
30
|
+
await (0, import_commands.deploy)(api, deployProjectNames, option, ignoreMatchs);
|
|
18
31
|
});
|
|
19
32
|
};
|
|
33
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
34
|
+
0 && (module.exports = {
|
|
35
|
+
deployCli
|
|
36
|
+
});
|
package/dist/cjs/cli/index.js
CHANGED
|
@@ -1,11 +1,32 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
Object.defineProperty
|
|
3
|
-
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __copyProps = (to, from, except, desc) => {
|
|
7
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
8
|
+
for (let key of __getOwnPropNames(from))
|
|
9
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
10
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
11
|
+
}
|
|
12
|
+
return to;
|
|
13
|
+
};
|
|
14
|
+
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
15
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
16
|
+
var cli_exports = {};
|
|
17
|
+
module.exports = __toCommonJS(cli_exports);
|
|
18
|
+
__reExport(cli_exports, require("./new"), module.exports);
|
|
19
|
+
__reExport(cli_exports, require("./deploy"), module.exports);
|
|
20
|
+
__reExport(cli_exports, require("./build"), module.exports);
|
|
21
|
+
__reExport(cli_exports, require("./buildWatch"), module.exports);
|
|
22
|
+
__reExport(cli_exports, require("./clear"), module.exports);
|
|
23
|
+
__reExport(cli_exports, require("./install"), module.exports);
|
|
24
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
25
|
+
0 && (module.exports = {
|
|
26
|
+
...require("./new"),
|
|
27
|
+
...require("./deploy"),
|
|
28
|
+
...require("./build"),
|
|
29
|
+
...require("./buildWatch"),
|
|
30
|
+
...require("./clear"),
|
|
31
|
+
...require("./install")
|
|
4
32
|
});
|
|
5
|
-
const _export_star = require("@swc/helpers/_/_export_star");
|
|
6
|
-
_export_star._(require("./new"), exports);
|
|
7
|
-
_export_star._(require("./deploy"), exports);
|
|
8
|
-
_export_star._(require("./build"), exports);
|
|
9
|
-
_export_star._(require("./buildWatch"), exports);
|
|
10
|
-
_export_star._(require("./clear"), exports);
|
|
11
|
-
_export_star._(require("./install"), exports);
|
package/dist/cjs/cli/install.js
CHANGED
|
@@ -1,16 +1,33 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
Object.defineProperty
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
Object.
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
9
15
|
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var install_exports = {};
|
|
20
|
+
__export(install_exports, {
|
|
21
|
+
installCli: () => installCli
|
|
10
22
|
});
|
|
11
|
-
|
|
23
|
+
module.exports = __toCommonJS(install_exports);
|
|
24
|
+
var import_commands = require("../commands");
|
|
12
25
|
const installCli = (program, api) => {
|
|
13
26
|
program.command("install [project...]").usage("[options]").description("install deps for some projects").action(async (installProjectNames, option) => {
|
|
14
|
-
await (0,
|
|
27
|
+
await (0, import_commands.install)(installProjectNames, option, api);
|
|
15
28
|
});
|
|
16
29
|
};
|
|
30
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
31
|
+
0 && (module.exports = {
|
|
32
|
+
installCli
|
|
33
|
+
});
|
package/dist/cjs/cli/new.js
CHANGED
|
@@ -1,23 +1,40 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
Object.defineProperty
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
Object.
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
9
15
|
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var new_exports = {};
|
|
20
|
+
__export(new_exports, {
|
|
21
|
+
newCli: () => newCli
|
|
10
22
|
});
|
|
11
|
-
|
|
12
|
-
|
|
23
|
+
module.exports = __toCommonJS(new_exports);
|
|
24
|
+
var import_new_action = require("@modern-js/new-action");
|
|
25
|
+
var import_locale = require("../locale");
|
|
13
26
|
const newCli = (program, locale) => {
|
|
14
|
-
program.command("new").usage("[options]").description(
|
|
27
|
+
program.command("new").usage("[options]").description(import_locale.i18n.t(import_locale.localeKeys.command.new.describe)).option("--config-file <configFile>", import_locale.i18n.t(import_locale.localeKeys.command.shared.config)).option("--lang <lang>", import_locale.i18n.t(import_locale.localeKeys.command.new.lang)).option("-c, --config <config>", import_locale.i18n.t(import_locale.localeKeys.command.new.config)).option("-p, --plugin <plugin>", import_locale.i18n.t(import_locale.localeKeys.command.new.plugin), (val, memo) => {
|
|
15
28
|
memo.push(val);
|
|
16
29
|
return memo;
|
|
17
|
-
}, []).option("-d, --debug",
|
|
18
|
-
await (0,
|
|
30
|
+
}, []).option("-d, --debug", import_locale.i18n.t(import_locale.localeKeys.command.new.debug), false).option("--dist-tag <tag>", import_locale.i18n.t(import_locale.localeKeys.command.new.distTag)).option("--registry", import_locale.i18n.t(import_locale.localeKeys.command.new.registry)).option("--no-need-install", import_locale.i18n.t(import_locale.localeKeys.command.shared.noNeedInstall)).action(async (options) => {
|
|
31
|
+
await (0, import_new_action.MonorepoNewAction)({
|
|
19
32
|
...options,
|
|
20
33
|
locale: options.lang || locale
|
|
21
34
|
});
|
|
22
35
|
});
|
|
23
36
|
};
|
|
37
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
38
|
+
0 && (module.exports = {
|
|
39
|
+
newCli
|
|
40
|
+
});
|
|
@@ -1,28 +1,41 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
Object.defineProperty
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
Object.
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
9
15
|
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var build_exports = {};
|
|
20
|
+
__export(build_exports, {
|
|
21
|
+
build: () => build
|
|
10
22
|
});
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
23
|
+
module.exports = __toCommonJS(build_exports);
|
|
24
|
+
var import_monorepo = require("../parse-config/monorepo");
|
|
25
|
+
var import_build = require("../features/build");
|
|
26
|
+
var import_getProjects = require("../projects/getProjects");
|
|
27
|
+
var import_dag = require("../dag");
|
|
15
28
|
const build = async (targetProjectName, option, api) => {
|
|
16
29
|
const { appDirectory } = api.useAppContext();
|
|
17
30
|
const { self = true, dept = false, deps = true, onlySelf = false, all = false, contentHash = false, gitHash = false } = option;
|
|
18
|
-
const projects = await (0,
|
|
31
|
+
const projects = await (0, import_getProjects.getProjects)({
|
|
19
32
|
packagesMatchs: {
|
|
20
33
|
enableAutoFinder: true
|
|
21
34
|
}
|
|
22
35
|
}, appDirectory);
|
|
23
|
-
const operator = (0,
|
|
36
|
+
const operator = (0, import_dag.initDAG)(projects);
|
|
24
37
|
operator.checkCircle();
|
|
25
|
-
const { rootPath, packageManager } = (0,
|
|
38
|
+
const { rootPath, packageManager } = (0, import_monorepo.getMonorepoBaseData)(appDirectory);
|
|
26
39
|
const overrideConfig = {};
|
|
27
40
|
if (all) {
|
|
28
41
|
overrideConfig.disableWithDeps = false;
|
|
@@ -30,7 +43,7 @@ const build = async (targetProjectName, option, api) => {
|
|
|
30
43
|
overrideConfig.withDept = true;
|
|
31
44
|
}
|
|
32
45
|
if (targetProjectName) {
|
|
33
|
-
(0,
|
|
46
|
+
(0, import_build.runBuildTask)(targetProjectName, operator, {
|
|
34
47
|
rootPath,
|
|
35
48
|
packageManager,
|
|
36
49
|
withSelf: self,
|
|
@@ -45,7 +58,7 @@ const build = async (targetProjectName, option, api) => {
|
|
|
45
58
|
} else {
|
|
46
59
|
const currentDir = process.cwd();
|
|
47
60
|
if (currentDir === appDirectory) {
|
|
48
|
-
await (0,
|
|
61
|
+
await (0, import_build.runAllBuildTask)(operator, {
|
|
49
62
|
rootPath: currentDir,
|
|
50
63
|
packageManager,
|
|
51
64
|
disableContentHash: !contentHash,
|
|
@@ -54,3 +67,7 @@ const build = async (targetProjectName, option, api) => {
|
|
|
54
67
|
}
|
|
55
68
|
}
|
|
56
69
|
};
|
|
70
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
71
|
+
0 && (module.exports = {
|
|
72
|
+
build
|
|
73
|
+
});
|
|
@@ -1,32 +1,49 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
Object.defineProperty
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
Object.
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
9
15
|
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var buildWatch_exports = {};
|
|
20
|
+
__export(buildWatch_exports, {
|
|
21
|
+
buildWatch: () => buildWatch
|
|
10
22
|
});
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
23
|
+
module.exports = __toCommonJS(buildWatch_exports);
|
|
24
|
+
var import_monorepo = require("../parse-config/monorepo");
|
|
25
|
+
var import_dev = require("../features/dev");
|
|
26
|
+
var import_getProjects = require("../projects/getProjects");
|
|
27
|
+
var import_dag = require("../dag");
|
|
15
28
|
const buildWatch = async (targetProjectName, option, api) => {
|
|
16
29
|
const { appDirectory } = api.useAppContext();
|
|
17
30
|
const { onlySelf = false, init = false } = option;
|
|
18
|
-
const projects = await (0,
|
|
31
|
+
const projects = await (0, import_getProjects.getProjects)({
|
|
19
32
|
packagesMatchs: {
|
|
20
33
|
enableAutoFinder: true
|
|
21
34
|
}
|
|
22
35
|
}, appDirectory);
|
|
23
|
-
const operator = (0,
|
|
36
|
+
const operator = (0, import_dag.initDAG)(projects);
|
|
24
37
|
operator.checkCircle();
|
|
25
|
-
const { rootPath, packageManager } = (0,
|
|
26
|
-
await (0,
|
|
38
|
+
const { rootPath, packageManager } = (0, import_monorepo.getMonorepoBaseData)(process.cwd());
|
|
39
|
+
await (0, import_dev.runBuildWatchTask)(targetProjectName, operator, {
|
|
27
40
|
rootPath,
|
|
28
41
|
packageManager,
|
|
29
42
|
onlySelf,
|
|
30
43
|
needInit: init
|
|
31
44
|
});
|
|
32
45
|
};
|
|
46
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
47
|
+
0 && (module.exports = {
|
|
48
|
+
buildWatch
|
|
49
|
+
});
|
|
@@ -1,27 +1,44 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
Object.defineProperty
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
Object.
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
9
15
|
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var clear_exports = {};
|
|
20
|
+
__export(clear_exports, {
|
|
21
|
+
clear: () => clear
|
|
10
22
|
});
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
23
|
+
module.exports = __toCommonJS(clear_exports);
|
|
24
|
+
var import_getProjects = require("../projects/getProjects");
|
|
25
|
+
var import_monorepo = require("../parse-config/monorepo");
|
|
26
|
+
var import_clear = require("../features/clear");
|
|
14
27
|
const clear = async (projectNames, option, api) => {
|
|
15
28
|
const { removeDirs } = option;
|
|
16
29
|
const { appDirectory } = api.useAppContext();
|
|
17
|
-
const projects = await (0,
|
|
30
|
+
const projects = await (0, import_getProjects.getProjects)({
|
|
18
31
|
packagesMatchs: {
|
|
19
32
|
enableAutoFinder: true
|
|
20
33
|
}
|
|
21
34
|
}, appDirectory);
|
|
22
|
-
const { rootPath } = (0,
|
|
23
|
-
(0,
|
|
35
|
+
const { rootPath } = (0, import_monorepo.getMonorepoBaseData)(appDirectory);
|
|
36
|
+
(0, import_clear.runClearTask)(projectNames, projects, {
|
|
24
37
|
rootPath,
|
|
25
38
|
removeDirs
|
|
26
39
|
});
|
|
27
40
|
};
|
|
41
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
42
|
+
0 && (module.exports = {
|
|
43
|
+
clear
|
|
44
|
+
});
|
|
@@ -1,31 +1,44 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
Object.defineProperty
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
Object.
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
9
15
|
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var deploy_exports = {};
|
|
20
|
+
__export(deploy_exports, {
|
|
21
|
+
deploy: () => deploy
|
|
10
22
|
});
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
23
|
+
module.exports = __toCommonJS(deploy_exports);
|
|
24
|
+
var import_utils = require("@modern-js/utils");
|
|
25
|
+
var import_dag = require("../dag");
|
|
26
|
+
var import_monorepo = require("../parse-config/monorepo");
|
|
27
|
+
var import_getProjects = require("../projects/getProjects");
|
|
28
|
+
var import_deploy = require("../features/deploy");
|
|
16
29
|
const deploy = async (api, deployProjectNames, option, ignoreMatchs = []) => {
|
|
17
30
|
const { deployPath = "output" } = option;
|
|
18
31
|
const { appDirectory } = api.useAppContext();
|
|
19
|
-
|
|
20
|
-
const projects = await (0,
|
|
32
|
+
import_utils.logger.info(`start deploy ${deployProjectNames.join(",")}`);
|
|
33
|
+
const projects = await (0, import_getProjects.getProjects)({
|
|
21
34
|
packagesMatchs: {
|
|
22
35
|
enableAutoFinder: true
|
|
23
36
|
},
|
|
24
37
|
packagesIgnoreMatchs: ignoreMatchs
|
|
25
38
|
}, appDirectory);
|
|
26
|
-
const { rootPath, packageManager } = (0,
|
|
27
|
-
const operator = (0,
|
|
28
|
-
await (0,
|
|
39
|
+
const { rootPath, packageManager } = (0, import_monorepo.getMonorepoBaseData)(process.cwd());
|
|
40
|
+
const operator = (0, import_dag.initDAG)(projects);
|
|
41
|
+
await (0, import_deploy.deploy)(deployProjectNames, operator, {
|
|
29
42
|
rootPath,
|
|
30
43
|
packageManager,
|
|
31
44
|
deployPath
|
|
@@ -36,3 +49,7 @@ const deploy = async (api, deployProjectNames, option, ignoreMatchs = []) => {
|
|
|
36
49
|
deployProjectNames
|
|
37
50
|
});
|
|
38
51
|
};
|
|
52
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
53
|
+
0 && (module.exports = {
|
|
54
|
+
deploy
|
|
55
|
+
});
|
|
@@ -1,10 +1,30 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
Object.defineProperty
|
|
3
|
-
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __copyProps = (to, from, except, desc) => {
|
|
7
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
8
|
+
for (let key of __getOwnPropNames(from))
|
|
9
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
10
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
11
|
+
}
|
|
12
|
+
return to;
|
|
13
|
+
};
|
|
14
|
+
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
15
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
16
|
+
var commands_exports = {};
|
|
17
|
+
module.exports = __toCommonJS(commands_exports);
|
|
18
|
+
__reExport(commands_exports, require("./deploy"), module.exports);
|
|
19
|
+
__reExport(commands_exports, require("./build"), module.exports);
|
|
20
|
+
__reExport(commands_exports, require("./buildWatch"), module.exports);
|
|
21
|
+
__reExport(commands_exports, require("./clear"), module.exports);
|
|
22
|
+
__reExport(commands_exports, require("./install"), module.exports);
|
|
23
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
24
|
+
0 && (module.exports = {
|
|
25
|
+
...require("./deploy"),
|
|
26
|
+
...require("./build"),
|
|
27
|
+
...require("./buildWatch"),
|
|
28
|
+
...require("./clear"),
|
|
29
|
+
...require("./install")
|
|
4
30
|
});
|
|
5
|
-
const _export_star = require("@swc/helpers/_/_export_star");
|
|
6
|
-
_export_star._(require("./deploy"), exports);
|
|
7
|
-
_export_star._(require("./build"), exports);
|
|
8
|
-
_export_star._(require("./buildWatch"), exports);
|
|
9
|
-
_export_star._(require("./clear"), exports);
|
|
10
|
-
_export_star._(require("./install"), exports);
|