@modern-js/monorepo-tools 2.4.1-beta.0 → 2.6.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 (119) hide show
  1. package/CHANGELOG.md +35 -8
  2. package/cli.js +1 -1
  3. package/dist/{js/node → cjs}/cli/build-watch.js +3 -23
  4. package/dist/{js/node → cjs}/cli/build.js +3 -23
  5. package/dist/{js/node → cjs}/cli/clear.js +3 -23
  6. package/dist/{js/node → cjs}/cli/deploy.js +3 -23
  7. package/dist/cjs/cli/install.js +34 -0
  8. package/dist/{js/node → cjs}/cli/new.js +3 -40
  9. package/dist/{js/node → cjs}/commands/build-watch.js +4 -24
  10. package/dist/{js/node → cjs}/commands/build.js +9 -41
  11. package/dist/{js/node → cjs}/commands/clear.js +3 -23
  12. package/dist/{js/node → cjs}/commands/deploy.js +4 -24
  13. package/dist/{js/node → cjs}/commands/install.js +4 -24
  14. package/dist/{js/node → cjs}/dag/create.js +9 -16
  15. package/dist/cjs/dag/operator.js +269 -0
  16. package/dist/{js/node → cjs}/dag/task.js +33 -53
  17. package/dist/{js/node → cjs}/features/build/index.js +17 -33
  18. package/dist/{js/node → cjs}/features/clear/index.js +4 -0
  19. package/dist/{js/node → cjs}/features/deploy/index.js +15 -30
  20. package/dist/{js/node → cjs}/features/dev/create-task.js +10 -26
  21. package/dist/{js/node → cjs}/features/dev/index.js +18 -34
  22. package/dist/{js/node → cjs}/features/dev/watch-projects-state.js +7 -19
  23. package/dist/{js/node → cjs}/features/install/index.js +7 -23
  24. package/dist/{js/node → cjs}/index.js +4 -0
  25. package/dist/{js/node → cjs}/log/time.js +1 -15
  26. package/dist/{js/node → cjs}/parse-config/index.js +13 -39
  27. package/dist/{js/node → cjs}/parse-config/monorepo.js +4 -0
  28. package/dist/{js/node → cjs}/projects/check-project-change.js +16 -32
  29. package/dist/{js/node → cjs}/projects/clear-memory-files.js +4 -0
  30. package/dist/{js/node → cjs}/projects/get-projects-by-packages-config.js +17 -45
  31. package/dist/{js/node → cjs}/projects/get-projects-by-workspace-file.js +8 -24
  32. package/dist/{js/node → cjs}/projects/get-projects.js +18 -47
  33. package/dist/{js/node → cjs}/utils/install.js +8 -24
  34. package/dist/esm/cli/build-watch.js +11 -0
  35. package/dist/esm/cli/build.js +12 -0
  36. package/dist/esm/cli/clear.js +11 -0
  37. package/dist/esm/cli/deploy.js +16 -0
  38. package/dist/esm/cli/install.js +11 -0
  39. package/dist/esm/cli/new.js +18 -0
  40. package/dist/esm/commands/build-watch.js +24 -0
  41. package/dist/esm/commands/build.js +56 -0
  42. package/dist/esm/commands/clear.js +19 -0
  43. package/dist/{js/modern → esm}/commands/deploy.js +4 -24
  44. package/dist/esm/commands/install.js +23 -0
  45. package/dist/{js/modern → esm}/dag/create.js +9 -18
  46. package/dist/esm/dag/operator.js +236 -0
  47. package/dist/esm/dag/task.js +55 -0
  48. package/dist/{js/modern → esm}/features/build/index.js +13 -33
  49. package/dist/{js/modern → esm}/features/deploy/index.js +11 -30
  50. package/dist/{js/modern → esm}/features/dev/create-task.js +6 -26
  51. package/dist/{js/modern → esm}/features/dev/index.js +14 -34
  52. package/dist/{js/modern → esm}/features/dev/watch-projects-state.js +3 -21
  53. package/dist/{js/modern → esm}/features/install/index.js +3 -23
  54. package/dist/esm/log/time.js +13 -0
  55. package/dist/esm/parse-config/index.js +19 -0
  56. package/dist/{js/modern → esm}/projects/check-project-change.js +12 -32
  57. package/dist/{js/modern → esm}/projects/get-projects-by-packages-config.js +13 -47
  58. package/dist/{js/modern → esm}/projects/get-projects-by-workspace-file.js +4 -24
  59. package/dist/{js/modern → esm}/projects/get-projects.js +18 -49
  60. package/dist/esm/utils/install.js +27 -0
  61. package/dist/types/package/index.d.ts +1 -1
  62. package/package.json +16 -16
  63. package/dist/js/modern/cli/build-watch.js +0 -31
  64. package/dist/js/modern/cli/build.js +0 -32
  65. package/dist/js/modern/cli/clear.js +0 -31
  66. package/dist/js/modern/cli/deploy.js +0 -36
  67. package/dist/js/modern/cli/install.js +0 -31
  68. package/dist/js/modern/cli/new.js +0 -57
  69. package/dist/js/modern/commands/build-watch.js +0 -44
  70. package/dist/js/modern/commands/build.js +0 -90
  71. package/dist/js/modern/commands/clear.js +0 -39
  72. package/dist/js/modern/commands/install.js +0 -43
  73. package/dist/js/modern/dag/operator.js +0 -251
  74. package/dist/js/modern/dag/task.js +0 -79
  75. package/dist/js/modern/log/time.js +0 -29
  76. package/dist/js/modern/parse-config/index.js +0 -51
  77. package/dist/js/modern/utils/install.js +0 -47
  78. package/dist/js/node/cli/install.js +0 -54
  79. package/dist/js/node/dag/operator.js +0 -278
  80. /package/dist/{js/node → cjs}/cli/index.js +0 -0
  81. /package/dist/{js/node → cjs}/commands/index.js +0 -0
  82. /package/dist/{js/node → cjs}/constants.js +0 -0
  83. /package/dist/{js/node → cjs}/dag/edge-manager.js +0 -0
  84. /package/dist/{js/node → cjs}/dag/index.js +0 -0
  85. /package/dist/{js/node → cjs}/dag/utils.js +0 -0
  86. /package/dist/{js/node → cjs}/features/dev/cmds.js +0 -0
  87. /package/dist/{js/node → cjs}/hooks/index.js +0 -0
  88. /package/dist/{js/node → cjs}/locale/en.js +0 -0
  89. /package/dist/{js/node → cjs}/locale/index.js +0 -0
  90. /package/dist/{js/node → cjs}/locale/zh.js +0 -0
  91. /package/dist/{js/node → cjs}/log/error.js +0 -0
  92. /package/dist/{js/node → cjs}/log/multi-tasks-log.js +0 -0
  93. /package/dist/{js/node → cjs}/log/utils.js +0 -0
  94. /package/dist/{js/node → cjs}/package/index.js +0 -0
  95. /package/dist/{js/node → cjs}/type.js +0 -0
  96. /package/dist/{js/node → cjs}/utils/language.js +0 -0
  97. /package/dist/{js/node → cjs}/utils/types.js +0 -0
  98. /package/dist/{js/modern → esm}/cli/index.js +0 -0
  99. /package/dist/{js/modern → esm}/commands/index.js +0 -0
  100. /package/dist/{js/modern → esm}/constants.js +0 -0
  101. /package/dist/{js/modern → esm}/dag/edge-manager.js +0 -0
  102. /package/dist/{js/modern → esm}/dag/index.js +0 -0
  103. /package/dist/{js/modern → esm}/dag/utils.js +0 -0
  104. /package/dist/{js/modern → esm}/features/clear/index.js +0 -0
  105. /package/dist/{js/modern → esm}/features/dev/cmds.js +0 -0
  106. /package/dist/{js/modern → esm}/hooks/index.js +0 -0
  107. /package/dist/{js/modern → esm}/index.js +0 -0
  108. /package/dist/{js/modern → esm}/locale/en.js +0 -0
  109. /package/dist/{js/modern → esm}/locale/index.js +0 -0
  110. /package/dist/{js/modern → esm}/locale/zh.js +0 -0
  111. /package/dist/{js/modern → esm}/log/error.js +0 -0
  112. /package/dist/{js/modern → esm}/log/multi-tasks-log.js +0 -0
  113. /package/dist/{js/modern → esm}/log/utils.js +0 -0
  114. /package/dist/{js/modern → esm}/package/index.js +0 -0
  115. /package/dist/{js/modern → esm}/parse-config/monorepo.js +0 -0
  116. /package/dist/{js/modern → esm}/projects/clear-memory-files.js +0 -0
  117. /package/dist/{js/modern → esm}/type.js +0 -0
  118. /package/dist/{js/modern → esm}/utils/language.js +0 -0
  119. /package/dist/{js/modern → esm}/utils/types.js +0 -0
package/CHANGELOG.md CHANGED
@@ -1,17 +1,44 @@
1
1
  # @modern-js/monorepo-tools
2
2
 
3
- ## 2.4.1-beta.0
3
+ ## 2.6.0
4
4
 
5
5
  ### Patch Changes
6
6
 
7
+ - Updated dependencies [e1f799e]
8
+ - Updated dependencies [7915ab3]
9
+ - Updated dependencies [0fe658a]
10
+ - @modern-js/utils@2.6.0
11
+ - @modern-js/core@2.6.0
12
+ - @modern-js/plugin-changeset@2.6.0
13
+ - @modern-js/plugin-i18n@2.6.0
14
+ - @modern-js/plugin-lint@2.6.0
15
+ - @modern-js/new-action@2.6.0
16
+ - @modern-js/upgrade@2.6.0
17
+ - @modern-js/plugin@2.6.0
18
+
19
+ ## 2.5.0
20
+
21
+ ### Patch Changes
22
+
23
+ - 89ca6cc: refactor: merge build-config into scripts/build
24
+
25
+ refactor: 把 build-config 合并进 scripts/build
26
+
27
+ - 30614fa: chore: modify package.json entry fields and build config
28
+ chore: 更改 package.json entry 字段以及构建配置
29
+ - Updated dependencies [89ca6cc]
30
+ - Updated dependencies [30614fa]
31
+ - Updated dependencies [1b0ce87]
7
32
  - Updated dependencies [11c053b]
8
- - @modern-js/utils@2.4.1-beta.0
9
- - @modern-js/core@2.4.1-beta.0
10
- - @modern-js/plugin-changeset@2.4.1-beta.0
11
- - @modern-js/plugin-i18n@2.4.1-beta.0
12
- - @modern-js/plugin-lint@2.4.1-beta.0
13
- - @modern-js/new-action@2.4.1-beta.0
14
- - @modern-js/upgrade@2.4.1-beta.0
33
+ - Updated dependencies [577084d]
34
+ - @modern-js/plugin-changeset@2.5.0
35
+ - @modern-js/plugin-i18n@2.5.0
36
+ - @modern-js/plugin-lint@2.5.0
37
+ - @modern-js/new-action@2.5.0
38
+ - @modern-js/plugin@2.5.0
39
+ - @modern-js/core@2.5.0
40
+ - @modern-js/utils@2.5.0
41
+ - @modern-js/upgrade@2.5.0
15
42
 
16
43
  ## 2.4.0
17
44
 
package/cli.js CHANGED
@@ -1 +1 @@
1
- module.exports = require('./dist/js/node/index.js');
1
+ module.exports = require('./dist/cjs/index.js');
@@ -15,26 +15,6 @@ var __copyProps = (to, from, except, desc) => {
15
15
  return to;
16
16
  };
17
17
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
- var __async = (__this, __arguments, generator) => {
19
- return new Promise((resolve, reject) => {
20
- var fulfilled = (value) => {
21
- try {
22
- step(generator.next(value));
23
- } catch (e) {
24
- reject(e);
25
- }
26
- };
27
- var rejected = (value) => {
28
- try {
29
- step(generator.throw(value));
30
- } catch (e) {
31
- reject(e);
32
- }
33
- };
34
- var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
35
- step((generator = generator.apply(__this, __arguments)).next());
36
- });
37
- };
38
18
  var build_watch_exports = {};
39
19
  __export(build_watch_exports, {
40
20
  buildWatchCli: () => buildWatchCli
@@ -43,9 +23,9 @@ module.exports = __toCommonJS(build_watch_exports);
43
23
  var import_commands = require("../commands");
44
24
  const buildWatchCli = (program, api) => {
45
25
  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(
46
- (targetProjectName, option) => __async(void 0, null, function* () {
47
- yield (0, import_commands.buildWatch)(targetProjectName, option, api);
48
- })
26
+ async (targetProjectName, option) => {
27
+ await (0, import_commands.buildWatch)(targetProjectName, option, api);
28
+ }
49
29
  );
50
30
  };
51
31
  // Annotate the CommonJS export names for ESM import in node:
@@ -15,26 +15,6 @@ var __copyProps = (to, from, except, desc) => {
15
15
  return to;
16
16
  };
17
17
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
- var __async = (__this, __arguments, generator) => {
19
- return new Promise((resolve, reject) => {
20
- var fulfilled = (value) => {
21
- try {
22
- step(generator.next(value));
23
- } catch (e) {
24
- reject(e);
25
- }
26
- };
27
- var rejected = (value) => {
28
- try {
29
- step(generator.throw(value));
30
- } catch (e) {
31
- reject(e);
32
- }
33
- };
34
- var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
35
- step((generator = generator.apply(__this, __arguments)).next());
36
- });
37
- };
38
18
  var build_exports = {};
39
19
  __export(build_exports, {
40
20
  buildCli: () => buildCli
@@ -45,9 +25,9 @@ const buildCli = (program, api) => {
45
25
  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(
46
26
  "-a, --all",
47
27
  "build target project with project’s dependencies and dependent"
48
- ).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((targetProjectName, option) => __async(void 0, null, function* () {
49
- yield (0, import_commands.build)(targetProjectName, option, api);
50
- }));
28
+ ).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) => {
29
+ await (0, import_commands.build)(targetProjectName, option, api);
30
+ });
51
31
  };
52
32
  // Annotate the CommonJS export names for ESM import in node:
53
33
  0 && (module.exports = {
@@ -15,26 +15,6 @@ var __copyProps = (to, from, except, desc) => {
15
15
  return to;
16
16
  };
17
17
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
- var __async = (__this, __arguments, generator) => {
19
- return new Promise((resolve, reject) => {
20
- var fulfilled = (value) => {
21
- try {
22
- step(generator.next(value));
23
- } catch (e) {
24
- reject(e);
25
- }
26
- };
27
- var rejected = (value) => {
28
- try {
29
- step(generator.throw(value));
30
- } catch (e) {
31
- reject(e);
32
- }
33
- };
34
- var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
35
- step((generator = generator.apply(__this, __arguments)).next());
36
- });
37
- };
38
18
  var clear_exports = {};
39
19
  __export(clear_exports, {
40
20
  clearCli: () => clearCli
@@ -43,9 +23,9 @@ module.exports = __toCommonJS(clear_exports);
43
23
  var import_commands = require("../commands");
44
24
  const clearCli = (program, api) => {
45
25
  program.command("clear [projects...]").usage("[options]").option("--remove-dirs [dirs...]", "remove dirs, default is node_modules").description("clear project dirs").action(
46
- (targetProjectNames, option) => __async(void 0, null, function* () {
47
- yield (0, import_commands.clear)(targetProjectNames, option, api);
48
- })
26
+ async (targetProjectNames, option) => {
27
+ await (0, import_commands.clear)(targetProjectNames, option, api);
28
+ }
49
29
  );
50
30
  };
51
31
  // Annotate the CommonJS export names for ESM import in node:
@@ -15,26 +15,6 @@ var __copyProps = (to, from, except, desc) => {
15
15
  return to;
16
16
  };
17
17
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
- var __async = (__this, __arguments, generator) => {
19
- return new Promise((resolve, reject) => {
20
- var fulfilled = (value) => {
21
- try {
22
- step(generator.next(value));
23
- } catch (e) {
24
- reject(e);
25
- }
26
- };
27
- var rejected = (value) => {
28
- try {
29
- step(generator.throw(value));
30
- } catch (e) {
31
- reject(e);
32
- }
33
- };
34
- var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
35
- step((generator = generator.apply(__this, __arguments)).next());
36
- });
37
- };
38
18
  var deploy_exports = {};
39
19
  __export(deploy_exports, {
40
20
  deployCli: () => deployCli
@@ -47,10 +27,10 @@ const deployCli = (program, api) => {
47
27
  "Specify the path of the product output",
48
28
  "output"
49
29
  ).description("deploy project").action(
50
- (deployProjectNames, option) => __async(void 0, null, function* () {
30
+ async (deployProjectNames, option) => {
51
31
  const ignoreMatchs = ["**/output/**"];
52
- yield (0, import_commands.deploy)(api, deployProjectNames, option, ignoreMatchs);
53
- })
32
+ await (0, import_commands.deploy)(api, deployProjectNames, option, ignoreMatchs);
33
+ }
54
34
  );
55
35
  };
56
36
  // Annotate the CommonJS export names for ESM import in node:
@@ -0,0 +1,34 @@
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
+ var install_exports = {};
19
+ __export(install_exports, {
20
+ installCli: () => installCli
21
+ });
22
+ module.exports = __toCommonJS(install_exports);
23
+ var import_commands = require("../commands");
24
+ const installCli = (program, api) => {
25
+ program.command("install [project...]").usage("[options]").description("install deps for some projects").action(
26
+ async (installProjectNames, option) => {
27
+ await (0, import_commands.install)(installProjectNames, option, api);
28
+ }
29
+ );
30
+ };
31
+ // Annotate the CommonJS export names for ESM import in node:
32
+ 0 && (module.exports = {
33
+ installCli
34
+ });
@@ -1,24 +1,7 @@
1
1
  var __defProp = Object.defineProperty;
2
- var __defProps = Object.defineProperties;
3
2
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
5
3
  var __getOwnPropNames = Object.getOwnPropertyNames;
6
- var __getOwnPropSymbols = Object.getOwnPropertySymbols;
7
4
  var __hasOwnProp = Object.prototype.hasOwnProperty;
8
- var __propIsEnum = Object.prototype.propertyIsEnumerable;
9
- var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
10
- var __spreadValues = (a, b) => {
11
- for (var prop in b || (b = {}))
12
- if (__hasOwnProp.call(b, prop))
13
- __defNormalProp(a, prop, b[prop]);
14
- if (__getOwnPropSymbols)
15
- for (var prop of __getOwnPropSymbols(b)) {
16
- if (__propIsEnum.call(b, prop))
17
- __defNormalProp(a, prop, b[prop]);
18
- }
19
- return a;
20
- };
21
- var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
22
5
  var __export = (target, all) => {
23
6
  for (var name in all)
24
7
  __defProp(target, name, { get: all[name], enumerable: true });
@@ -32,26 +15,6 @@ var __copyProps = (to, from, except, desc) => {
32
15
  return to;
33
16
  };
34
17
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
35
- var __async = (__this, __arguments, generator) => {
36
- return new Promise((resolve, reject) => {
37
- var fulfilled = (value) => {
38
- try {
39
- step(generator.next(value));
40
- } catch (e) {
41
- reject(e);
42
- }
43
- };
44
- var rejected = (value) => {
45
- try {
46
- step(generator.throw(value));
47
- } catch (e) {
48
- reject(e);
49
- }
50
- };
51
- var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
52
- step((generator = generator.apply(__this, __arguments)).next());
53
- });
54
- };
55
18
  var new_exports = {};
56
19
  __export(new_exports, {
57
20
  newCli: () => newCli
@@ -68,9 +31,9 @@ const newCli = (program, locale) => {
68
31
  return memo;
69
32
  },
70
33
  []
71
- ).option("--lang <lang>", import_locale.i18n.t(import_locale.localeKeys.command.new.lang)).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)).action((options) => __async(void 0, null, function* () {
72
- yield (0, import_new_action.MonorepoNewAction)(__spreadProps(__spreadValues({}, options), { locale: options.lang || locale }));
73
- }));
34
+ ).option("--lang <lang>", import_locale.i18n.t(import_locale.localeKeys.command.new.lang)).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)).action(async (options) => {
35
+ await (0, import_new_action.MonorepoNewAction)({ ...options, locale: options.lang || locale });
36
+ });
74
37
  };
75
38
  // Annotate the CommonJS export names for ESM import in node:
76
39
  0 && (module.exports = {
@@ -15,26 +15,6 @@ var __copyProps = (to, from, except, desc) => {
15
15
  return to;
16
16
  };
17
17
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
- var __async = (__this, __arguments, generator) => {
19
- return new Promise((resolve, reject) => {
20
- var fulfilled = (value) => {
21
- try {
22
- step(generator.next(value));
23
- } catch (e) {
24
- reject(e);
25
- }
26
- };
27
- var rejected = (value) => {
28
- try {
29
- step(generator.throw(value));
30
- } catch (e) {
31
- reject(e);
32
- }
33
- };
34
- var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
35
- step((generator = generator.apply(__this, __arguments)).next());
36
- });
37
- };
38
18
  var build_watch_exports = {};
39
19
  __export(build_watch_exports, {
40
20
  buildWatch: () => buildWatch
@@ -44,23 +24,23 @@ var import_monorepo = require("../parse-config/monorepo");
44
24
  var import_dev = require("../features/dev");
45
25
  var import_get_projects = require("../projects/get-projects");
46
26
  var import_dag = require("../dag");
47
- const buildWatch = (targetProjectName, option, api) => __async(void 0, null, function* () {
27
+ const buildWatch = async (targetProjectName, option, api) => {
48
28
  const { appDirectory } = api.useAppContext();
49
29
  const { onlySelf = false, init = false } = option;
50
- const projects = yield (0, import_get_projects.getProjects)(
30
+ const projects = await (0, import_get_projects.getProjects)(
51
31
  { packagesMatchs: { enableAutoFinder: true } },
52
32
  appDirectory
53
33
  );
54
34
  const operator = (0, import_dag.initDAG)(projects);
55
35
  operator.checkCircle();
56
36
  const { rootPath, packageManager } = (0, import_monorepo.getMonorepoBaseData)(process.cwd());
57
- yield (0, import_dev.runBuildWatchTask)(targetProjectName, operator, {
37
+ await (0, import_dev.runBuildWatchTask)(targetProjectName, operator, {
58
38
  rootPath,
59
39
  packageManager,
60
40
  onlySelf,
61
41
  needInit: init
62
42
  });
63
- });
43
+ };
64
44
  // Annotate the CommonJS export names for ESM import in node:
65
45
  0 && (module.exports = {
66
46
  buildWatch
@@ -1,21 +1,7 @@
1
1
  var __defProp = Object.defineProperty;
2
2
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
3
  var __getOwnPropNames = Object.getOwnPropertyNames;
4
- var __getOwnPropSymbols = Object.getOwnPropertySymbols;
5
4
  var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __propIsEnum = Object.prototype.propertyIsEnumerable;
7
- var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
8
- var __spreadValues = (a, b) => {
9
- for (var prop in b || (b = {}))
10
- if (__hasOwnProp.call(b, prop))
11
- __defNormalProp(a, prop, b[prop]);
12
- if (__getOwnPropSymbols)
13
- for (var prop of __getOwnPropSymbols(b)) {
14
- if (__propIsEnum.call(b, prop))
15
- __defNormalProp(a, prop, b[prop]);
16
- }
17
- return a;
18
- };
19
5
  var __export = (target, all) => {
20
6
  for (var name in all)
21
7
  __defProp(target, name, { get: all[name], enumerable: true });
@@ -29,26 +15,6 @@ var __copyProps = (to, from, except, desc) => {
29
15
  return to;
30
16
  };
31
17
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
32
- var __async = (__this, __arguments, generator) => {
33
- return new Promise((resolve, reject) => {
34
- var fulfilled = (value) => {
35
- try {
36
- step(generator.next(value));
37
- } catch (e) {
38
- reject(e);
39
- }
40
- };
41
- var rejected = (value) => {
42
- try {
43
- step(generator.throw(value));
44
- } catch (e) {
45
- reject(e);
46
- }
47
- };
48
- var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
49
- step((generator = generator.apply(__this, __arguments)).next());
50
- });
51
- };
52
18
  var build_exports = {};
53
19
  __export(build_exports, {
54
20
  build: () => build
@@ -58,7 +24,7 @@ var import_monorepo = require("../parse-config/monorepo");
58
24
  var import_build = require("../features/build");
59
25
  var import_get_projects = require("../projects/get-projects");
60
26
  var import_dag = require("../dag");
61
- const build = (targetProjectName, option, api) => __async(void 0, null, function* () {
27
+ const build = async (targetProjectName, option, api) => {
62
28
  const { appDirectory } = api.useAppContext();
63
29
  const {
64
30
  self = true,
@@ -69,7 +35,7 @@ const build = (targetProjectName, option, api) => __async(void 0, null, function
69
35
  contentHash = false,
70
36
  gitHash = false
71
37
  } = option;
72
- const projects = yield (0, import_get_projects.getProjects)(
38
+ const projects = await (0, import_get_projects.getProjects)(
73
39
  { packagesMatchs: { enableAutoFinder: true } },
74
40
  appDirectory
75
41
  );
@@ -83,20 +49,22 @@ const build = (targetProjectName, option, api) => __async(void 0, null, function
83
49
  overrideConfig.withDept = true;
84
50
  }
85
51
  if (targetProjectName) {
86
- (0, import_build.runBuildTask)(targetProjectName, operator, __spreadValues({
52
+ (0, import_build.runBuildTask)(targetProjectName, operator, {
87
53
  rootPath,
88
54
  packageManager,
89
55
  withSelf: self,
90
56
  withDept: dept,
91
57
  onlySelf,
92
58
  disableWithDeps: !deps,
59
+ // The CI/CD phase is recommended to be switched on
93
60
  disableContentHash: !contentHash,
94
- enableGitHash: gitHash
95
- }, overrideConfig));
61
+ enableGitHash: gitHash,
62
+ ...overrideConfig
63
+ });
96
64
  } else {
97
65
  const currentDir = process.cwd();
98
66
  if (currentDir === appDirectory) {
99
- yield (0, import_build.runAllBuildTask)(operator, {
67
+ await (0, import_build.runAllBuildTask)(operator, {
100
68
  rootPath: currentDir,
101
69
  packageManager,
102
70
  disableContentHash: !contentHash,
@@ -104,7 +72,7 @@ const build = (targetProjectName, option, api) => __async(void 0, null, function
104
72
  });
105
73
  }
106
74
  }
107
- });
75
+ };
108
76
  // Annotate the CommonJS export names for ESM import in node:
109
77
  0 && (module.exports = {
110
78
  build
@@ -15,26 +15,6 @@ var __copyProps = (to, from, except, desc) => {
15
15
  return to;
16
16
  };
17
17
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
- var __async = (__this, __arguments, generator) => {
19
- return new Promise((resolve, reject) => {
20
- var fulfilled = (value) => {
21
- try {
22
- step(generator.next(value));
23
- } catch (e) {
24
- reject(e);
25
- }
26
- };
27
- var rejected = (value) => {
28
- try {
29
- step(generator.throw(value));
30
- } catch (e) {
31
- reject(e);
32
- }
33
- };
34
- var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
35
- step((generator = generator.apply(__this, __arguments)).next());
36
- });
37
- };
38
18
  var clear_exports = {};
39
19
  __export(clear_exports, {
40
20
  clear: () => clear
@@ -43,10 +23,10 @@ module.exports = __toCommonJS(clear_exports);
43
23
  var import_get_projects = require("../projects/get-projects");
44
24
  var import_monorepo = require("../parse-config/monorepo");
45
25
  var import_clear = require("../features/clear");
46
- const clear = (projectNames, option, api) => __async(void 0, null, function* () {
26
+ const clear = async (projectNames, option, api) => {
47
27
  const { removeDirs } = option;
48
28
  const { appDirectory } = api.useAppContext();
49
- const projects = yield (0, import_get_projects.getProjects)(
29
+ const projects = await (0, import_get_projects.getProjects)(
50
30
  { packagesMatchs: { enableAutoFinder: true } },
51
31
  appDirectory
52
32
  );
@@ -55,7 +35,7 @@ const clear = (projectNames, option, api) => __async(void 0, null, function* ()
55
35
  rootPath,
56
36
  removeDirs
57
37
  });
58
- });
38
+ };
59
39
  // Annotate the CommonJS export names for ESM import in node:
60
40
  0 && (module.exports = {
61
41
  clear
@@ -15,26 +15,6 @@ var __copyProps = (to, from, except, desc) => {
15
15
  return to;
16
16
  };
17
17
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
- var __async = (__this, __arguments, generator) => {
19
- return new Promise((resolve, reject) => {
20
- var fulfilled = (value) => {
21
- try {
22
- step(generator.next(value));
23
- } catch (e) {
24
- reject(e);
25
- }
26
- };
27
- var rejected = (value) => {
28
- try {
29
- step(generator.throw(value));
30
- } catch (e) {
31
- reject(e);
32
- }
33
- };
34
- var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
35
- step((generator = generator.apply(__this, __arguments)).next());
36
- });
37
- };
38
18
  var deploy_exports = {};
39
19
  __export(deploy_exports, {
40
20
  deploy: () => deploy
@@ -45,11 +25,11 @@ var import_dag = require("../dag");
45
25
  var import_monorepo = require("../parse-config/monorepo");
46
26
  var import_get_projects = require("../projects/get-projects");
47
27
  var import_deploy = require("../features/deploy");
48
- const deploy = (_0, _1, _2, ..._3) => __async(void 0, [_0, _1, _2, ..._3], function* (api, deployProjectNames, option, ignoreMatchs = []) {
28
+ const deploy = async (api, deployProjectNames, option, ignoreMatchs = []) => {
49
29
  const { deployPath = "output" } = option;
50
30
  const { appDirectory } = api.useAppContext();
51
31
  import_utils.logger.info(`start deploy ${deployProjectNames.join(",")}`);
52
- const projects = yield (0, import_get_projects.getProjects)(
32
+ const projects = await (0, import_get_projects.getProjects)(
53
33
  {
54
34
  packagesMatchs: { enableAutoFinder: true },
55
35
  packagesIgnoreMatchs: ignoreMatchs
@@ -58,14 +38,14 @@ const deploy = (_0, _1, _2, ..._3) => __async(void 0, [_0, _1, _2, ..._3], funct
58
38
  );
59
39
  const { rootPath, packageManager } = (0, import_monorepo.getMonorepoBaseData)(process.cwd());
60
40
  const operator = (0, import_dag.initDAG)(projects);
61
- yield (0, import_deploy.deploy)(deployProjectNames, operator, {
41
+ await (0, import_deploy.deploy)(deployProjectNames, operator, {
62
42
  rootPath,
63
43
  packageManager,
64
44
  deployPath
65
45
  });
66
46
  const runners = api.useHookRunners();
67
47
  runners.afterMonorepoDeploy({ operator, deployProjectNames });
68
- });
48
+ };
69
49
  // Annotate the CommonJS export names for ESM import in node:
70
50
  0 && (module.exports = {
71
51
  deploy
@@ -15,26 +15,6 @@ var __copyProps = (to, from, except, desc) => {
15
15
  return to;
16
16
  };
17
17
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
- var __async = (__this, __arguments, generator) => {
19
- return new Promise((resolve, reject) => {
20
- var fulfilled = (value) => {
21
- try {
22
- step(generator.next(value));
23
- } catch (e) {
24
- reject(e);
25
- }
26
- };
27
- var rejected = (value) => {
28
- try {
29
- step(generator.throw(value));
30
- } catch (e) {
31
- reject(e);
32
- }
33
- };
34
- var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
35
- step((generator = generator.apply(__this, __arguments)).next());
36
- });
37
- };
38
18
  var install_exports = {};
39
19
  __export(install_exports, {
40
20
  install: () => install
@@ -44,22 +24,22 @@ var import_install = require("../features/install");
44
24
  var import_monorepo = require("../parse-config/monorepo");
45
25
  var import_get_projects = require("../projects/get-projects");
46
26
  var import_dag = require("../dag");
47
- const install = (..._0) => __async(void 0, [..._0], function* (projectNames = [], option, api) {
27
+ const install = async (projectNames = [], option, api) => {
48
28
  const { appDirectory } = api.useAppContext();
49
29
  const { auto } = option;
50
- const projects = yield (0, import_get_projects.getProjects)(
30
+ const projects = await (0, import_get_projects.getProjects)(
51
31
  { packagesMatchs: { enableAutoFinder: true } },
52
32
  appDirectory
53
33
  );
54
34
  const operator = (0, import_dag.initDAG)(projects);
55
35
  operator.checkCircle();
56
36
  const { rootPath, packageManager } = (0, import_monorepo.getMonorepoBaseData)(appDirectory);
57
- yield (0, import_install.runInstallTask)(projectNames, operator, {
37
+ await (0, import_install.runInstallTask)(projectNames, operator, {
58
38
  packageManager,
59
39
  rootPath,
60
40
  auto
61
41
  });
62
- });
42
+ };
63
43
  // Annotate the CommonJS export names for ESM import in node:
64
44
  0 && (module.exports = {
65
45
  install