@modern-js/monorepo-tools 1.3.2 → 1.3.3-beta.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/js/modern/commands/deploy.js +4 -1
- package/dist/js/modern/features/deploy/index.js +2 -2
- package/dist/js/modern/index.js +12 -2
- package/dist/js/node/commands/deploy.js +3 -0
- package/dist/js/node/features/deploy/index.js +2 -2
- package/dist/js/node/index.js +12 -1
- package/package.json +8 -7
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { useAppContext } from '@modern-js/core';
|
|
1
|
+
import { useAppContext, mountHook } from '@modern-js/core';
|
|
2
2
|
import { logger } from '@modern-js/utils';
|
|
3
3
|
import { initDAG } from "../dag";
|
|
4
4
|
import { getMonorepoBaseData } from "../parse-config/monorepo";
|
|
@@ -28,4 +28,7 @@ export const deploy = async (deployProjectNames, option) => {
|
|
|
28
28
|
packageManager,
|
|
29
29
|
deployPath
|
|
30
30
|
});
|
|
31
|
+
mountHook().afterMonorepoDeploy({
|
|
32
|
+
operator
|
|
33
|
+
});
|
|
31
34
|
};
|
|
@@ -172,7 +172,7 @@ export const deploy = async (deployProjectNames, operator, config) => {
|
|
|
172
172
|
}
|
|
173
173
|
}
|
|
174
174
|
|
|
175
|
-
generatorAndCopyRequiredFiles(rootPath, realDeployPath);
|
|
176
|
-
|
|
175
|
+
generatorAndCopyRequiredFiles(rootPath, realDeployPath); // await installDependency(realDeployPath, packageManager);
|
|
176
|
+
|
|
177
177
|
success(`Deploy success. The deploy dir is in '${rootPath}/output'`);
|
|
178
178
|
};
|
package/dist/js/modern/index.js
CHANGED
|
@@ -1,11 +1,21 @@
|
|
|
1
|
-
import { createPlugin, usePlugins, defineConfig } from '@modern-js/core';
|
|
1
|
+
import { createPlugin, usePlugins, defineConfig, registerHook } from '@modern-js/core';
|
|
2
|
+
import { createAsyncWorkflow } from '@modern-js/plugin';
|
|
2
3
|
import { i18n } from "./locale";
|
|
3
4
|
import { newCli, deployCli, clearCli } from "./cli";
|
|
4
5
|
import { getLocaleLanguage } from "./utils/language";
|
|
5
|
-
export { defineConfig };
|
|
6
|
+
export { defineConfig };
|
|
7
|
+
const afterMonorepoDeploy = createAsyncWorkflow();
|
|
8
|
+
|
|
9
|
+
const lifecycle = () => {
|
|
10
|
+
registerHook({
|
|
11
|
+
afterMonorepoDeploy
|
|
12
|
+
});
|
|
13
|
+
}; // eslint-disable-next-line react-hooks/rules-of-hooks
|
|
14
|
+
|
|
6
15
|
|
|
7
16
|
usePlugins([require.resolve('@modern-js/plugin-changeset/cli')]);
|
|
8
17
|
export default createPlugin(() => {
|
|
18
|
+
lifecycle();
|
|
9
19
|
const locale = getLocaleLanguage();
|
|
10
20
|
i18n.changeLanguage({
|
|
11
21
|
locale
|
|
@@ -202,8 +202,8 @@ const deploy = async (deployProjectNames, operator, config) => {
|
|
|
202
202
|
}
|
|
203
203
|
}
|
|
204
204
|
|
|
205
|
-
generatorAndCopyRequiredFiles(rootPath, realDeployPath);
|
|
206
|
-
|
|
205
|
+
generatorAndCopyRequiredFiles(rootPath, realDeployPath); // await installDependency(realDeployPath, packageManager);
|
|
206
|
+
|
|
207
207
|
(0, _signale.success)(`Deploy success. The deploy dir is in '${rootPath}/output'`);
|
|
208
208
|
};
|
|
209
209
|
|
package/dist/js/node/index.js
CHANGED
|
@@ -13,16 +13,27 @@ Object.defineProperty(exports, "defineConfig", {
|
|
|
13
13
|
|
|
14
14
|
var _core = require("@modern-js/core");
|
|
15
15
|
|
|
16
|
+
var _plugin = require("@modern-js/plugin");
|
|
17
|
+
|
|
16
18
|
var _locale = require("./locale");
|
|
17
19
|
|
|
18
20
|
var _cli = require("./cli");
|
|
19
21
|
|
|
20
22
|
var _language = require("./utils/language");
|
|
21
23
|
|
|
22
|
-
|
|
24
|
+
const afterMonorepoDeploy = (0, _plugin.createAsyncWorkflow)();
|
|
25
|
+
|
|
26
|
+
const lifecycle = () => {
|
|
27
|
+
(0, _core.registerHook)({
|
|
28
|
+
afterMonorepoDeploy
|
|
29
|
+
});
|
|
30
|
+
}; // eslint-disable-next-line react-hooks/rules-of-hooks
|
|
31
|
+
|
|
32
|
+
|
|
23
33
|
(0, _core.usePlugins)([require.resolve('@modern-js/plugin-changeset/cli')]);
|
|
24
34
|
|
|
25
35
|
var _default = (0, _core.createPlugin)(() => {
|
|
36
|
+
lifecycle();
|
|
26
37
|
const locale = (0, _language.getLocaleLanguage)();
|
|
27
38
|
|
|
28
39
|
_locale.i18n.changeLanguage({
|
package/package.json
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"modern",
|
|
12
12
|
"modern.js"
|
|
13
13
|
],
|
|
14
|
-
"version": "1.3.
|
|
14
|
+
"version": "1.3.3-beta.0",
|
|
15
15
|
"jsnext:source": "./src/index.ts",
|
|
16
16
|
"types": "./dist/types/index.d.ts",
|
|
17
17
|
"main": "./dist/js/node/index.js",
|
|
@@ -38,16 +38,16 @@
|
|
|
38
38
|
"@babel/runtime": "^7",
|
|
39
39
|
"@modern-js/i18n-cli-language-detector": "^1.2.1",
|
|
40
40
|
"@modern-js/new-action": "^1.3.2",
|
|
41
|
+
"@modern-js/plugin": "^1.2.1",
|
|
41
42
|
"@modern-js/plugin-changeset": "^1.2.2",
|
|
42
43
|
"@modern-js/plugin-i18n": "^1.2.1",
|
|
43
|
-
"commander": "^8.1.0",
|
|
44
44
|
"@modern-js/utils": "^1.3.2",
|
|
45
45
|
"@rushstack/node-core-library": "^3.39.1",
|
|
46
46
|
"@rushstack/package-deps-hash": "^3.0.54",
|
|
47
47
|
"anymatch": "^3.1.2",
|
|
48
48
|
"chalk": "^4.1.1",
|
|
49
49
|
"chokidar": "^3.5.2",
|
|
50
|
-
"
|
|
50
|
+
"commander": "^8.1.0",
|
|
51
51
|
"globby": "^11.0.0",
|
|
52
52
|
"js-yaml": "^4.1.0",
|
|
53
53
|
"md5": "^2.3.0",
|
|
@@ -59,6 +59,8 @@
|
|
|
59
59
|
},
|
|
60
60
|
"devDependencies": {
|
|
61
61
|
"@modern-js/core": "^1.4.3",
|
|
62
|
+
"@scripts/build": "0.0.0",
|
|
63
|
+
"@scripts/jest-config": "0.0.0",
|
|
62
64
|
"@types/jest": "^26",
|
|
63
65
|
"@types/js-yaml": "^4.0.2",
|
|
64
66
|
"@types/md5": "^2.3.1",
|
|
@@ -67,10 +69,8 @@
|
|
|
67
69
|
"@types/react-dom": "^17",
|
|
68
70
|
"@types/signale": "^1.4.2",
|
|
69
71
|
"execa": "^5.1.1",
|
|
70
|
-
"typescript": "^4",
|
|
71
|
-
"@scripts/build": "0.0.0",
|
|
72
72
|
"jest": "^27",
|
|
73
|
-
"
|
|
73
|
+
"typescript": "^4"
|
|
74
74
|
},
|
|
75
75
|
"sideEffects": false,
|
|
76
76
|
"modernConfig": {
|
|
@@ -80,7 +80,8 @@
|
|
|
80
80
|
},
|
|
81
81
|
"publishConfig": {
|
|
82
82
|
"registry": "https://registry.npmjs.org/",
|
|
83
|
-
"access": "public"
|
|
83
|
+
"access": "public",
|
|
84
|
+
"types": "./dist/types/index.d.ts"
|
|
84
85
|
},
|
|
85
86
|
"scripts": {
|
|
86
87
|
"new": "modern new",
|