@modern-js/app-tools 1.6.7 → 1.6.8
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/CHANGELOG.md +27 -0
- package/dist/js/modern/index.js +10 -4
- package/dist/js/node/index.js +15 -11
- package/package.json +6 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,32 @@
|
|
|
1
1
|
# @modern-js/app-tools
|
|
2
2
|
|
|
3
|
+
## 1.6.8
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- e0e708f83: perf(app-tools): speed up modern start command
|
|
8
|
+
- Updated dependencies [06b411dc3]
|
|
9
|
+
- Updated dependencies [5d4806f86]
|
|
10
|
+
- Updated dependencies [b255072f2]
|
|
11
|
+
- Updated dependencies [63c354ad5]
|
|
12
|
+
- Updated dependencies [4165e50c7]
|
|
13
|
+
- Updated dependencies [073e9ad78]
|
|
14
|
+
- Updated dependencies [cda99c441]
|
|
15
|
+
- Updated dependencies [7975bfa68]
|
|
16
|
+
- Updated dependencies [b7302f781]
|
|
17
|
+
- Updated dependencies [b96dcf364]
|
|
18
|
+
- Updated dependencies [f4a7d49e1]
|
|
19
|
+
- Updated dependencies [9e36d3a01]
|
|
20
|
+
- Updated dependencies [3172e1ee1]
|
|
21
|
+
- Updated dependencies [e0e708f83]
|
|
22
|
+
- @modern-js/webpack@1.11.1
|
|
23
|
+
- @modern-js/core@1.12.1
|
|
24
|
+
- @modern-js/utils@1.7.8
|
|
25
|
+
- @modern-js/plugin@1.3.8
|
|
26
|
+
- @modern-js/server@1.4.21
|
|
27
|
+
- @modern-js/plugin-analyze@1.4.6
|
|
28
|
+
- @modern-js/prod-server@1.1.8
|
|
29
|
+
|
|
3
30
|
## 1.6.7
|
|
4
31
|
|
|
5
32
|
### Patch Changes
|
package/dist/js/modern/index.js
CHANGED
|
@@ -4,16 +4,13 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
|
|
|
4
4
|
|
|
5
5
|
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
6
6
|
|
|
7
|
-
import
|
|
7
|
+
import path from 'path';
|
|
8
8
|
import { defineConfig, cli } from '@modern-js/core';
|
|
9
9
|
import AnalyzePlugin from '@modern-js/plugin-analyze';
|
|
10
10
|
import { cleanRequireCache } from '@modern-js/utils';
|
|
11
11
|
import { hooks } from "./hooks";
|
|
12
12
|
import { i18n, localeKeys } from "./locale";
|
|
13
13
|
import { getLocaleLanguage } from "./utils/language";
|
|
14
|
-
import { start } from "./commands/start";
|
|
15
|
-
import { dev } from "./commands/dev";
|
|
16
|
-
import { closeServer } from "./utils/createServer";
|
|
17
14
|
export { defineConfig };
|
|
18
15
|
export default (() => ({
|
|
19
16
|
name: '@modern-js/app-tools',
|
|
@@ -30,6 +27,9 @@ export default (() => ({
|
|
|
30
27
|
program
|
|
31
28
|
}) {
|
|
32
29
|
program.command('dev').usage('[options]').description(i18n.t(localeKeys.command.dev.describe)).option('-c --config <config>', i18n.t(localeKeys.command.shared.config)).option('-e --entry [entry...]', i18n.t(localeKeys.command.dev.entry)).option('--analyze', i18n.t(localeKeys.command.shared.analyze)).option('--api-only', i18n.t(localeKeys.command.dev.apiOnly)).action(async options => {
|
|
30
|
+
const {
|
|
31
|
+
dev
|
|
32
|
+
} = await import("./commands/dev");
|
|
33
33
|
await dev(api, options);
|
|
34
34
|
});
|
|
35
35
|
program.command('build').usage('[options]').description(i18n.t(localeKeys.command.build.describe)).option('-c --config <config>', i18n.t(localeKeys.command.shared.config)).option('--analyze', i18n.t(localeKeys.command.shared.analyze)).action(async options => {
|
|
@@ -42,6 +42,9 @@ export default (() => ({
|
|
|
42
42
|
process.exit(0);
|
|
43
43
|
});
|
|
44
44
|
program.command('start').usage('[options]').description(i18n.t(localeKeys.command.start.describe)).option('--api-only', i18n.t(localeKeys.command.dev.apiOnly)).action(async () => {
|
|
45
|
+
const {
|
|
46
|
+
start
|
|
47
|
+
} = await import("./commands/start");
|
|
45
48
|
await start(api);
|
|
46
49
|
});
|
|
47
50
|
program.command('deploy').usage('[options]').option('-c --config <config>', i18n.t(localeKeys.command.shared.config)).description(i18n.t(localeKeys.command.deploy.describe)).action(async options => {
|
|
@@ -86,6 +89,9 @@ export default (() => ({
|
|
|
86
89
|
const absolutePath = path.resolve(appDirectory, filename);
|
|
87
90
|
|
|
88
91
|
if (!absolutePath.includes(srcDirectory) && (eventType === 'change' || eventType === 'unlink')) {
|
|
92
|
+
const {
|
|
93
|
+
closeServer
|
|
94
|
+
} = await import("./utils/createServer");
|
|
89
95
|
await closeServer();
|
|
90
96
|
await cli.restart();
|
|
91
97
|
}
|
package/dist/js/node/index.js
CHANGED
|
@@ -11,7 +11,7 @@ Object.defineProperty(exports, "defineConfig", {
|
|
|
11
11
|
}
|
|
12
12
|
});
|
|
13
13
|
|
|
14
|
-
var
|
|
14
|
+
var _path = _interopRequireDefault(require("path"));
|
|
15
15
|
|
|
16
16
|
var _core = require("@modern-js/core");
|
|
17
17
|
|
|
@@ -25,12 +25,6 @@ var _locale = require("./locale");
|
|
|
25
25
|
|
|
26
26
|
var _language = require("./utils/language");
|
|
27
27
|
|
|
28
|
-
var _start = require("./commands/start");
|
|
29
|
-
|
|
30
|
-
var _dev = require("./commands/dev");
|
|
31
|
-
|
|
32
|
-
var _createServer = require("./utils/createServer");
|
|
33
|
-
|
|
34
28
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
35
29
|
|
|
36
30
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
@@ -60,7 +54,10 @@ var _default = () => ({
|
|
|
60
54
|
program
|
|
61
55
|
}) {
|
|
62
56
|
program.command('dev').usage('[options]').description(_locale.i18n.t(_locale.localeKeys.command.dev.describe)).option('-c --config <config>', _locale.i18n.t(_locale.localeKeys.command.shared.config)).option('-e --entry [entry...]', _locale.i18n.t(_locale.localeKeys.command.dev.entry)).option('--analyze', _locale.i18n.t(_locale.localeKeys.command.shared.analyze)).option('--api-only', _locale.i18n.t(_locale.localeKeys.command.dev.apiOnly)).action(async options => {
|
|
63
|
-
|
|
57
|
+
const {
|
|
58
|
+
dev
|
|
59
|
+
} = await Promise.resolve().then(() => _interopRequireWildcard(require("./commands/dev")));
|
|
60
|
+
await dev(api, options);
|
|
64
61
|
});
|
|
65
62
|
program.command('build').usage('[options]').description(_locale.i18n.t(_locale.localeKeys.command.build.describe)).option('-c --config <config>', _locale.i18n.t(_locale.localeKeys.command.shared.config)).option('--analyze', _locale.i18n.t(_locale.localeKeys.command.shared.analyze)).action(async options => {
|
|
66
63
|
const {
|
|
@@ -72,7 +69,10 @@ var _default = () => ({
|
|
|
72
69
|
process.exit(0);
|
|
73
70
|
});
|
|
74
71
|
program.command('start').usage('[options]').description(_locale.i18n.t(_locale.localeKeys.command.start.describe)).option('--api-only', _locale.i18n.t(_locale.localeKeys.command.dev.apiOnly)).action(async () => {
|
|
75
|
-
|
|
72
|
+
const {
|
|
73
|
+
start
|
|
74
|
+
} = await Promise.resolve().then(() => _interopRequireWildcard(require("./commands/start")));
|
|
75
|
+
await start(api);
|
|
76
76
|
});
|
|
77
77
|
program.command('deploy').usage('[options]').option('-c --config <config>', _locale.i18n.t(_locale.localeKeys.command.shared.config)).description(_locale.i18n.t(_locale.localeKeys.command.deploy.describe)).action(async options => {
|
|
78
78
|
const {
|
|
@@ -113,10 +113,14 @@ var _default = () => ({
|
|
|
113
113
|
appDirectory,
|
|
114
114
|
srcDirectory
|
|
115
115
|
} = appContext;
|
|
116
|
-
|
|
116
|
+
|
|
117
|
+
const absolutePath = _path.default.resolve(appDirectory, filename);
|
|
117
118
|
|
|
118
119
|
if (!absolutePath.includes(srcDirectory) && (eventType === 'change' || eventType === 'unlink')) {
|
|
119
|
-
|
|
120
|
+
const {
|
|
121
|
+
closeServer
|
|
122
|
+
} = await Promise.resolve().then(() => _interopRequireWildcard(require("./utils/createServer")));
|
|
123
|
+
await closeServer();
|
|
120
124
|
await _core.cli.restart();
|
|
121
125
|
}
|
|
122
126
|
},
|
package/package.json
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"modern",
|
|
12
12
|
"modern.js"
|
|
13
13
|
],
|
|
14
|
-
"version": "1.6.
|
|
14
|
+
"version": "1.6.8",
|
|
15
15
|
"jsnext:source": "./src/index.ts",
|
|
16
16
|
"types": "./dist/types/index.d.ts",
|
|
17
17
|
"main": "./dist/js/node/index.js",
|
|
@@ -57,18 +57,18 @@
|
|
|
57
57
|
},
|
|
58
58
|
"dependencies": {
|
|
59
59
|
"@babel/runtime": "^7.18.0",
|
|
60
|
-
"@modern-js/core": "^1.12.
|
|
60
|
+
"@modern-js/core": "^1.12.1",
|
|
61
61
|
"@modern-js/i18n-cli-language-detector": "^1.2.4",
|
|
62
62
|
"@modern-js/new-action": "^1.3.10",
|
|
63
63
|
"@modern-js/node-bundle-require": "^1.3.5",
|
|
64
|
-
"@modern-js/plugin": "^1.3.
|
|
64
|
+
"@modern-js/plugin": "^1.3.8",
|
|
65
65
|
"@modern-js/plugin-analyze": "^1.4.6",
|
|
66
66
|
"@modern-js/plugin-i18n": "^1.2.7",
|
|
67
67
|
"@modern-js/prod-server": "^1.1.8",
|
|
68
|
-
"@modern-js/server": "^1.4.
|
|
68
|
+
"@modern-js/server": "^1.4.21",
|
|
69
69
|
"@modern-js/types": "^1.5.4",
|
|
70
|
-
"@modern-js/utils": "^1.7.
|
|
71
|
-
"@modern-js/webpack": "^1.11.
|
|
70
|
+
"@modern-js/utils": "^1.7.8",
|
|
71
|
+
"@modern-js/webpack": "^1.11.1"
|
|
72
72
|
},
|
|
73
73
|
"devDependencies": {
|
|
74
74
|
"@modern-js/server-core": "1.3.5",
|