@modern-js/utils 2.69.5 → 3.0.0-alpha.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/alias.js +76 -70
- package/dist/cjs/cli/applyOptionsChain.js +44 -45
- package/dist/cjs/cli/babel.js +100 -119
- package/dist/cjs/cli/commands.js +61 -59
- package/dist/cjs/cli/common.js +45 -37
- package/dist/cjs/cli/config.js +36 -30
- package/dist/cjs/cli/constants.js +124 -161
- package/dist/cjs/cli/ensure.js +52 -45
- package/dist/cjs/cli/fs.js +41 -38
- package/dist/cjs/cli/get/config.js +43 -38
- package/dist/cjs/cli/get/data.js +108 -125
- package/dist/cjs/cli/get/index.js +109 -58
- package/dist/cjs/cli/index.js +202 -63
- package/dist/cjs/cli/is/config.js +75 -71
- package/dist/cjs/cli/is/env.js +49 -37
- package/dist/cjs/cli/is/index.js +76 -25
- package/dist/cjs/cli/is/project.js +139 -135
- package/dist/cjs/cli/is/type.js +65 -49
- package/dist/cjs/cli/logger.js +36 -27
- package/dist/cjs/cli/monorepo.js +100 -96
- package/dist/cjs/cli/package.js +85 -82
- package/dist/cjs/cli/path.js +101 -82
- package/dist/cjs/cli/port.js +71 -74
- package/dist/cjs/cli/prettyInstructions.js +106 -116
- package/dist/cjs/cli/require.js +116 -136
- package/dist/cjs/cli/route.js +67 -77
- package/dist/cjs/cli/runtimeExports.js +16 -70
- package/dist/cjs/cli/version.js +53 -42
- package/dist/cjs/cli/watch.js +79 -72
- package/dist/cjs/compiled.js +199 -128
- package/dist/cjs/import.js +58 -33
- package/dist/cjs/index.js +69 -23
- package/dist/cjs/universal/constants.js +77 -67
- package/dist/cjs/universal/index.js +33 -25
- package/dist/cjs/universal/path.js +33 -27
- package/dist/cjs/universal/pluginDagSort.js +69 -68
- package/dist/compiled/address/index.js +171 -1
- package/dist/compiled/browserslist/index.js +1329 -1
- package/dist/compiled/chalk/index.js +2368 -1
- package/dist/compiled/chokidar/index.js +4138 -16
- package/dist/compiled/chokidar/index.js.LICENSE.txt +41 -0
- package/dist/compiled/commander/index.js +1540 -1
- package/dist/compiled/debug/index.js +621 -1
- package/dist/compiled/dotenv/index.js +101 -1
- package/dist/compiled/dotenv-expand/index.js +54 -1
- package/dist/compiled/execa/index.js +1738 -1
- package/dist/compiled/fast-glob/index.js +4645 -17
- package/dist/compiled/fast-glob/index.js.LICENSE.txt +38 -0
- package/dist/compiled/filesize/index.js +193 -4
- package/dist/compiled/filesize/index.js.LICENSE.txt +7 -0
- package/dist/compiled/fs-extra/index.js +2222 -1
- package/dist/compiled/glob/index.js +2011 -1
- package/dist/compiled/globby/index.js +690 -1
- package/dist/compiled/gzip-size/index.js +157 -1
- package/dist/compiled/import-lazy/index.js +45 -1
- package/dist/compiled/inquirer/index.js +20162 -4
- package/dist/compiled/inquirer/index.js.LICENSE.txt +7 -0
- package/dist/compiled/js-yaml/index.js +2188 -1
- package/dist/compiled/json5/index.js +983 -1
- package/dist/compiled/lodash/index.js +0 -4
- package/dist/compiled/mime-types/index.js +108 -6
- package/dist/compiled/mime-types/index.js.LICENSE.txt +13 -0
- package/dist/compiled/minimist/index.js +202 -1
- package/dist/compiled/nanoid/index.js +83 -1
- package/dist/compiled/ora/index.js +3936 -3
- package/dist/compiled/ora/index.js.LICENSE.txt +1 -0
- package/dist/compiled/pkg-up/index.js +177 -1
- package/dist/compiled/semver/index.js +1779 -1
- package/dist/compiled/signale/index.js +1704 -1
- package/dist/compiled/slash/index.js +32 -1
- package/dist/compiled/strip-ansi/index.js +34 -1
- package/dist/compiled/tsconfig-paths/index.js +629 -1
- package/dist/compiled/upath/index.js +135 -1
- package/dist/compiled/url-join/index.js +61 -1
- package/dist/compiled/webpack-chain/index.js +1475 -1
- package/dist/esm/cli/alias.mjs +31 -0
- package/dist/esm/cli/applyOptionsChain.mjs +16 -0
- package/dist/esm/cli/babel.mjs +76 -0
- package/dist/esm/cli/commands.mjs +23 -0
- package/dist/esm/cli/common.mjs +11 -0
- package/dist/esm/cli/config.mjs +5 -0
- package/dist/esm/cli/constants.mjs +29 -0
- package/dist/esm/cli/ensure.mjs +9 -0
- package/dist/esm/cli/fs.mjs +9 -0
- package/dist/esm/cli/get/config.mjs +14 -0
- package/dist/esm/cli/get/data.mjs +57 -0
- package/dist/esm/cli/get/index.mjs +18 -0
- package/dist/{esm-node/cli/index.js → esm/cli/index.mjs} +0 -1
- package/dist/esm/cli/is/config.mjs +34 -0
- package/dist/esm/cli/is/env.mjs +6 -0
- package/dist/esm/cli/is/project.mjs +104 -0
- package/dist/esm/cli/is/type.mjs +26 -0
- package/dist/esm/cli/logger.mjs +2 -0
- package/dist/esm/cli/monorepo.mjs +50 -0
- package/dist/esm/cli/package.mjs +51 -0
- package/dist/esm/cli/path.mjs +35 -0
- package/dist/esm/cli/port.mjs +35 -0
- package/dist/esm/cli/prettyInstructions.mjs +68 -0
- package/dist/esm/cli/require.mjs +79 -0
- package/dist/esm/cli/route.mjs +36 -0
- package/dist/esm/cli/runtimeExports.mjs +0 -0
- package/dist/esm/cli/version.mjs +21 -0
- package/dist/esm/cli/watch.mjs +40 -0
- package/dist/esm/compiled.mjs +115 -0
- package/dist/esm/import.mjs +25 -0
- package/dist/esm/universal/constants.mjs +13 -0
- package/dist/{esm-node/universal/index.js → esm/universal/index.mjs} +1 -3
- package/dist/esm/universal/path.mjs +2 -0
- package/dist/esm/universal/pluginDagSort.mjs +41 -0
- package/dist/esm-node/cli/alias.mjs +31 -0
- package/dist/esm-node/cli/applyOptionsChain.mjs +16 -0
- package/dist/esm-node/cli/babel.mjs +76 -0
- package/dist/esm-node/cli/commands.mjs +23 -0
- package/dist/esm-node/cli/common.mjs +11 -0
- package/dist/esm-node/cli/config.mjs +5 -0
- package/dist/esm-node/cli/constants.mjs +29 -0
- package/dist/esm-node/cli/ensure.mjs +9 -0
- package/dist/esm-node/cli/fs.mjs +9 -0
- package/dist/esm-node/cli/get/config.mjs +14 -0
- package/dist/esm-node/cli/get/data.mjs +57 -0
- package/dist/esm-node/cli/get/index.mjs +18 -0
- package/dist/esm-node/cli/index.mjs +22 -0
- package/dist/esm-node/cli/is/config.mjs +34 -0
- package/dist/esm-node/cli/is/env.mjs +6 -0
- package/dist/esm-node/cli/is/index.mjs +4 -0
- package/dist/esm-node/cli/is/project.mjs +104 -0
- package/dist/esm-node/cli/is/type.mjs +26 -0
- package/dist/esm-node/cli/logger.mjs +2 -0
- package/dist/esm-node/cli/monorepo.mjs +50 -0
- package/dist/esm-node/cli/package.mjs +51 -0
- package/dist/esm-node/cli/path.mjs +35 -0
- package/dist/esm-node/cli/port.mjs +35 -0
- package/dist/esm-node/cli/prettyInstructions.mjs +68 -0
- package/dist/esm-node/cli/require.mjs +79 -0
- package/dist/esm-node/cli/route.mjs +36 -0
- package/dist/esm-node/cli/runtimeExports.mjs +0 -0
- package/dist/esm-node/cli/version.mjs +21 -0
- package/dist/esm-node/cli/watch.mjs +40 -0
- package/dist/esm-node/compiled.mjs +115 -0
- package/dist/esm-node/import.mjs +25 -0
- package/dist/esm-node/index.mjs +3 -0
- package/dist/esm-node/universal/constants.mjs +13 -0
- package/dist/esm-node/universal/index.mjs +2 -0
- package/dist/esm-node/universal/path.mjs +2 -0
- package/dist/esm-node/universal/pluginDagSort.mjs +41 -0
- package/dist/types/cli/constants.d.ts +2 -26
- package/dist/types/cli/get/data.d.ts +0 -1
- package/dist/types/cli/index.d.ts +0 -1
- package/dist/types/cli/is/config.d.ts +1 -1
- package/dist/types/cli/runtimeExports.d.ts +1 -4
- package/dist/types/cli/watch.d.ts +1 -1
- package/dist/types/compiled.d.ts +0 -5
- package/dist/types/universal/constants.d.ts +4 -7
- package/package.json +27 -27
- package/rslib.config.mts +140 -0
- package/dist/cjs/cli/action.js +0 -55
- package/dist/cjs/universal/formatWebpack.js +0 -127
- package/dist/esm/cli/action.js +0 -68
- package/dist/esm/cli/alias.js +0 -43
- package/dist/esm/cli/applyOptionsChain.js +0 -29
- package/dist/esm/cli/babel.js +0 -122
- package/dist/esm/cli/commands.js +0 -39
- package/dist/esm/cli/common.js +0 -20
- package/dist/esm/cli/config.js +0 -11
- package/dist/esm/cli/constants.js +0 -114
- package/dist/esm/cli/ensure.js +0 -16
- package/dist/esm/cli/fs.js +0 -65
- package/dist/esm/cli/get/config.js +0 -19
- package/dist/esm/cli/get/data.js +0 -143
- package/dist/esm/cli/get/index.js +0 -38
- package/dist/esm/cli/index.js +0 -23
- package/dist/esm/cli/is/config.js +0 -70
- package/dist/esm/cli/is/env.js +0 -22
- package/dist/esm/cli/is/index.js +0 -4
- package/dist/esm/cli/is/project.js +0 -146
- package/dist/esm/cli/is/type.js +0 -39
- package/dist/esm/cli/logger.js +0 -5
- package/dist/esm/cli/monorepo.js +0 -82
- package/dist/esm/cli/package.js +0 -203
- package/dist/esm/cli/path.js +0 -66
- package/dist/esm/cli/port.js +0 -97
- package/dist/esm/cli/prettyInstructions.js +0 -102
- package/dist/esm/cli/require.js +0 -235
- package/dist/esm/cli/route.js +0 -64
- package/dist/esm/cli/runtimeExports.js +0 -44
- package/dist/esm/cli/version.js +0 -26
- package/dist/esm/cli/watch.js +0 -112
- package/dist/esm/compiled.js +0 -66
- package/dist/esm/import.js +0 -11
- package/dist/esm/index.js +0 -3
- package/dist/esm/universal/constants.js +0 -32
- package/dist/esm/universal/formatWebpack.js +0 -95
- package/dist/esm/universal/index.js +0 -4
- package/dist/esm/universal/path.js +0 -6
- package/dist/esm/universal/pluginDagSort.js +0 -73
- package/dist/esm-node/cli/action.js +0 -30
- package/dist/esm-node/cli/alias.js +0 -40
- package/dist/esm-node/cli/applyOptionsChain.js +0 -27
- package/dist/esm-node/cli/babel.js +0 -107
- package/dist/esm-node/cli/commands.js +0 -39
- package/dist/esm-node/cli/common.js +0 -15
- package/dist/esm-node/cli/config.js +0 -9
- package/dist/esm-node/cli/constants.js +0 -114
- package/dist/esm-node/cli/ensure.js +0 -14
- package/dist/esm-node/cli/fs.js +0 -18
- package/dist/esm-node/cli/get/config.js +0 -19
- package/dist/esm-node/cli/get/data.js +0 -96
- package/dist/esm-node/cli/get/index.js +0 -22
- package/dist/esm-node/cli/is/config.js +0 -50
- package/dist/esm-node/cli/is/env.js +0 -12
- package/dist/esm-node/cli/is/project.js +0 -105
- package/dist/esm-node/cli/is/type.js +0 -36
- package/dist/esm-node/cli/logger.js +0 -5
- package/dist/esm-node/cli/monorepo.js +0 -67
- package/dist/esm-node/cli/package.js +0 -66
- package/dist/esm-node/cli/path.js +0 -48
- package/dist/esm-node/cli/port.js +0 -48
- package/dist/esm-node/cli/prettyInstructions.js +0 -90
- package/dist/esm-node/cli/require.js +0 -111
- package/dist/esm-node/cli/route.js +0 -60
- package/dist/esm-node/cli/runtimeExports.js +0 -38
- package/dist/esm-node/cli/version.js +0 -26
- package/dist/esm-node/cli/watch.js +0 -45
- package/dist/esm-node/compiled.js +0 -66
- package/dist/esm-node/import.js +0 -11
- package/dist/esm-node/universal/constants.js +0 -32
- package/dist/esm-node/universal/formatWebpack.js +0 -102
- package/dist/esm-node/universal/path.js +0 -6
- package/dist/esm-node/universal/pluginDagSort.js +0 -50
- package/dist/types/cli/action.d.ts +0 -2
- package/dist/types/universal/formatWebpack.d.ts +0 -26
- /package/dist/{esm-node/cli/is/index.js → esm/cli/is/index.mjs} +0 -0
- /package/dist/{esm-node/index.js → esm/index.mjs} +0 -0
package/dist/cjs/cli/common.js
CHANGED
|
@@ -1,41 +1,49 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
var
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
};
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
2
|
+
var __webpack_require__ = {};
|
|
3
|
+
(()=>{
|
|
4
|
+
__webpack_require__.d = (exports1, definition)=>{
|
|
5
|
+
for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: definition[key]
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
})();
|
|
11
|
+
(()=>{
|
|
12
|
+
__webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
|
|
13
|
+
})();
|
|
14
|
+
(()=>{
|
|
15
|
+
__webpack_require__.r = (exports1)=>{
|
|
16
|
+
if ("u" > typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
|
|
17
|
+
value: 'Module'
|
|
18
|
+
});
|
|
19
|
+
Object.defineProperty(exports1, '__esModule', {
|
|
20
|
+
value: true
|
|
21
|
+
});
|
|
22
|
+
};
|
|
23
|
+
})();
|
|
24
|
+
var __webpack_exports__ = {};
|
|
25
|
+
__webpack_require__.r(__webpack_exports__);
|
|
26
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
27
|
+
clearConsole: ()=>clearConsole,
|
|
28
|
+
wait: ()=>wait,
|
|
29
|
+
createDebugger: ()=>createDebugger
|
|
24
30
|
});
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
const
|
|
28
|
-
|
|
29
|
-
if (process.stdout.isTTY && !process.env.DEBUG) {
|
|
30
|
-
process.stdout.write("\x1B[H\x1B[2J");
|
|
31
|
-
}
|
|
31
|
+
const debug_namespaceObject = require("../../compiled/debug");
|
|
32
|
+
const createDebugger = (scope)=>(0, debug_namespaceObject.debug)(`modern-js:${scope}`);
|
|
33
|
+
const clearConsole = ()=>{
|
|
34
|
+
if (process.stdout.isTTY && !process.env.DEBUG) process.stdout.write('\x1B[H\x1B[2J');
|
|
32
35
|
};
|
|
33
|
-
const wait = (time = 0)
|
|
34
|
-
|
|
35
|
-
});
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
36
|
+
const wait = (time = 0)=>new Promise((resolve)=>{
|
|
37
|
+
setTimeout(resolve, time);
|
|
38
|
+
});
|
|
39
|
+
exports.clearConsole = __webpack_exports__.clearConsole;
|
|
40
|
+
exports.createDebugger = __webpack_exports__.createDebugger;
|
|
41
|
+
exports.wait = __webpack_exports__.wait;
|
|
42
|
+
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
43
|
+
"clearConsole",
|
|
44
|
+
"createDebugger",
|
|
45
|
+
"wait"
|
|
46
|
+
].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
|
|
47
|
+
Object.defineProperty(exports, '__esModule', {
|
|
48
|
+
value: true
|
|
41
49
|
});
|
package/dist/cjs/cli/config.js
CHANGED
|
@@ -1,33 +1,39 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
var
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
};
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
2
|
+
var __webpack_require__ = {};
|
|
3
|
+
(()=>{
|
|
4
|
+
__webpack_require__.d = (exports1, definition)=>{
|
|
5
|
+
for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: definition[key]
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
})();
|
|
11
|
+
(()=>{
|
|
12
|
+
__webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
|
|
13
|
+
})();
|
|
14
|
+
(()=>{
|
|
15
|
+
__webpack_require__.r = (exports1)=>{
|
|
16
|
+
if ("u" > typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
|
|
17
|
+
value: 'Module'
|
|
18
|
+
});
|
|
19
|
+
Object.defineProperty(exports1, '__esModule', {
|
|
20
|
+
value: true
|
|
21
|
+
});
|
|
22
|
+
};
|
|
23
|
+
})();
|
|
24
|
+
var __webpack_exports__ = {};
|
|
25
|
+
__webpack_require__.r(__webpack_exports__);
|
|
26
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
27
|
+
isOverriddenConfigKey: ()=>isOverriddenConfigKey
|
|
22
28
|
});
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
29
|
+
const isOverriddenConfigKey = (key)=>[
|
|
30
|
+
'removeConsole',
|
|
31
|
+
'baseUrl'
|
|
32
|
+
].includes(key);
|
|
33
|
+
exports.isOverriddenConfigKey = __webpack_exports__.isOverriddenConfigKey;
|
|
34
|
+
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
35
|
+
"isOverriddenConfigKey"
|
|
36
|
+
].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
|
|
37
|
+
Object.defineProperty(exports, '__esModule', {
|
|
38
|
+
value: true
|
|
33
39
|
});
|
|
@@ -1,169 +1,132 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
var
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
};
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
SERVER_WORKER_BUNDLE_DIRECTORY: () => SERVER_WORKER_BUNDLE_DIRECTORY,
|
|
52
|
-
SHARED_DIR: () => SHARED_DIR
|
|
2
|
+
var __webpack_require__ = {};
|
|
3
|
+
(()=>{
|
|
4
|
+
__webpack_require__.d = (exports1, definition)=>{
|
|
5
|
+
for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: definition[key]
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
})();
|
|
11
|
+
(()=>{
|
|
12
|
+
__webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
|
|
13
|
+
})();
|
|
14
|
+
(()=>{
|
|
15
|
+
__webpack_require__.r = (exports1)=>{
|
|
16
|
+
if ("u" > typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
|
|
17
|
+
value: 'Module'
|
|
18
|
+
});
|
|
19
|
+
Object.defineProperty(exports1, '__esModule', {
|
|
20
|
+
value: true
|
|
21
|
+
});
|
|
22
|
+
};
|
|
23
|
+
})();
|
|
24
|
+
var __webpack_exports__ = {};
|
|
25
|
+
__webpack_require__.r(__webpack_exports__);
|
|
26
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
27
|
+
SERVER_PLUGIN_POLYFILL: ()=>constants_js_namespaceObject.SERVER_PLUGIN_POLYFILL,
|
|
28
|
+
DEFAULT_API_PREFIX: ()=>DEFAULT_API_PREFIX,
|
|
29
|
+
INTERNAL_RUNTIME_PLUGINS: ()=>INTERNAL_RUNTIME_PLUGINS,
|
|
30
|
+
JS_EXTENSIONS: ()=>JS_EXTENSIONS,
|
|
31
|
+
SHARED_DIR: ()=>SHARED_DIR,
|
|
32
|
+
ROUTE_SPEC_FILE: ()=>constants_js_namespaceObject.ROUTE_SPEC_FILE,
|
|
33
|
+
SERVER_DIR: ()=>SERVER_DIR,
|
|
34
|
+
DEFAULT_RUNTIME_CONFIG: ()=>DEFAULT_RUNTIME_CONFIG,
|
|
35
|
+
OUTPUT_CONFIG_FILE: ()=>OUTPUT_CONFIG_FILE,
|
|
36
|
+
NESTED_ROUTE_SPEC_FILE: ()=>constants_js_namespaceObject.NESTED_ROUTE_SPEC_FILE,
|
|
37
|
+
API_DIR: ()=>API_DIR,
|
|
38
|
+
CONFIG_CACHE_DIR: ()=>CONFIG_CACHE_DIR,
|
|
39
|
+
LOADABLE_STATS_FILE: ()=>LOADABLE_STATS_FILE,
|
|
40
|
+
DEFAULT_DEV_HOST: ()=>DEFAULT_DEV_HOST,
|
|
41
|
+
MAIN_ENTRY_NAME: ()=>constants_js_namespaceObject.MAIN_ENTRY_NAME,
|
|
42
|
+
ROUTE_MANIFEST_FILE: ()=>ROUTE_MANIFEST_FILE,
|
|
43
|
+
SERVER_BUNDLE_DIRECTORY: ()=>constants_js_namespaceObject.SERVER_BUNDLE_DIRECTORY,
|
|
44
|
+
SERVER_PLUGIN_BFF: ()=>constants_js_namespaceObject.SERVER_PLUGIN_BFF,
|
|
45
|
+
SERVER_RENDER_FUNCTION_NAME: ()=>constants_js_namespaceObject.SERVER_RENDER_FUNCTION_NAME,
|
|
46
|
+
SERVER_WORKER_BUNDLE_DIRECTORY: ()=>SERVER_WORKER_BUNDLE_DIRECTORY,
|
|
47
|
+
CONFIG_FILE_EXTENSIONS: ()=>CONFIG_FILE_EXTENSIONS,
|
|
48
|
+
ENTRY_NAME_PATTERN: ()=>ENTRY_NAME_PATTERN,
|
|
49
|
+
LOADER_ROUTES_DIR: ()=>LOADER_ROUTES_DIR,
|
|
50
|
+
DEFAULT_ENTRY_NAME: ()=>constants_js_namespaceObject.DEFAULT_ENTRY_NAME
|
|
53
51
|
});
|
|
54
|
-
|
|
55
|
-
var import_constants = require("../universal/constants");
|
|
52
|
+
const constants_js_namespaceObject = require("../universal/constants.js");
|
|
56
53
|
const JS_EXTENSIONS = [
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
54
|
+
'.js',
|
|
55
|
+
'.ts',
|
|
56
|
+
'.jsx',
|
|
57
|
+
'.tsx'
|
|
61
58
|
];
|
|
62
|
-
const SERVER_WORKER_BUNDLE_DIRECTORY =
|
|
63
|
-
const ENTRY_NAME_PATTERN =
|
|
64
|
-
const LOADABLE_STATS_FILE =
|
|
65
|
-
const API_DIR =
|
|
66
|
-
const DEFAULT_API_PREFIX =
|
|
67
|
-
const SERVER_DIR =
|
|
68
|
-
const SHARED_DIR =
|
|
69
|
-
const CONFIG_CACHE_DIR =
|
|
59
|
+
const SERVER_WORKER_BUNDLE_DIRECTORY = 'worker';
|
|
60
|
+
const ENTRY_NAME_PATTERN = '^[a-zA-Z0-9_-]+$';
|
|
61
|
+
const LOADABLE_STATS_FILE = 'loadable-stats.json';
|
|
62
|
+
const API_DIR = 'api';
|
|
63
|
+
const DEFAULT_API_PREFIX = '/api';
|
|
64
|
+
const SERVER_DIR = 'server';
|
|
65
|
+
const SHARED_DIR = 'shared';
|
|
66
|
+
const CONFIG_CACHE_DIR = './node_modules/.cache/bundle-require';
|
|
70
67
|
const CONFIG_FILE_EXTENSIONS = [
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
68
|
+
'.js',
|
|
69
|
+
'.ts',
|
|
70
|
+
'.mjs'
|
|
74
71
|
];
|
|
75
|
-
const OUTPUT_CONFIG_FILE =
|
|
76
|
-
const DEFAULT_RUNTIME_CONFIG =
|
|
77
|
-
const
|
|
78
|
-
const
|
|
79
|
-
const
|
|
80
|
-
const
|
|
81
|
-
|
|
82
|
-
"@modern-js/app-tools": "@modern-js/app-tools/cli",
|
|
83
|
-
"@modern-js/plugin-proxy": "@modern-js/plugin-proxy/cli",
|
|
84
|
-
"@modern-js/plugin-ssg": "@modern-js/plugin-ssg/cli",
|
|
85
|
-
"@modern-js/plugin-bff": "@modern-js/plugin-bff/cli",
|
|
86
|
-
"@modern-js/plugin-storybook": "@modern-js/plugin-storybook/cli",
|
|
87
|
-
"@modern-js/plugin-express": "@modern-js/plugin-express/cli",
|
|
88
|
-
"@modern-js/plugin-koa": "@modern-js/plugin-koa/cli",
|
|
89
|
-
"@modern-js/plugin-server": "@modern-js/plugin-server/cli",
|
|
90
|
-
"@modern-js/plugin-garfish": "@modern-js/plugin-garfish/cli",
|
|
91
|
-
"@modern-js/plugin-tailwindcss": "@modern-js/plugin-tailwindcss/cli",
|
|
92
|
-
"@modern-js/plugin-polyfill": "@modern-js/plugin-polyfill/cli",
|
|
93
|
-
// legacy router (inner react-router-dom v5)
|
|
94
|
-
"@modern-js/plugin-router-v5": "@modern-js/plugin-router-v5/cli"
|
|
95
|
-
};
|
|
96
|
-
const INTERNAL_APP_TOOLS_RUNTIME_PLUGINS = {
|
|
97
|
-
"@modern-js/runtime": "@modern-js/runtime/cli"
|
|
98
|
-
};
|
|
99
|
-
const INTERNAL_MODULE_TOOLS_PLUGINS = {
|
|
100
|
-
"@modern-js/module-tools": "@modern-js/module-tools",
|
|
101
|
-
"@modern-js/runtime": "@modern-js/runtime/cli",
|
|
102
|
-
"@modern-js/plugin-storybook": "@modern-js/plugin-storybook/cli",
|
|
103
|
-
"@modern-js/plugin-tailwindcss": "@modern-js/plugin-tailwindcss/cli",
|
|
104
|
-
// legacy router (inner react-router-dom v5)
|
|
105
|
-
"@modern-js/plugin-router-legacy": "@modern-js/plugin-router-legacy/cli"
|
|
106
|
-
};
|
|
107
|
-
const INTERNAL_MONOREPO_TOOLS_PLUGINS = {
|
|
108
|
-
"@modern-js/monorepo-tools": "@modern-js/monorepo-tools/cli"
|
|
109
|
-
};
|
|
110
|
-
const INTERNAL_DOC_TOOLS_PLUGINS = {
|
|
111
|
-
"@modern-js/doc-tools": "@modern-js/doc-tools",
|
|
112
|
-
"@modern-js/runtime": "@modern-js/runtime/cli"
|
|
113
|
-
};
|
|
114
|
-
const INTERNAL_CLI_PLUGINS = {
|
|
115
|
-
"@modern-js/app-tools": "@modern-js/app-tools/cli",
|
|
116
|
-
"@modern-js/monorepo-tools": "@modern-js/monorepo-tools/cli",
|
|
117
|
-
"@modern-js/module-tools": "@modern-js/module-tools",
|
|
118
|
-
"@modern-js/doc-tools": "@modern-js/doc-tools",
|
|
119
|
-
"@modern-js/runtime": "@modern-js/runtime/cli",
|
|
120
|
-
"@modern-js/plugin-state": "@modern-js/plugin-state/cli",
|
|
121
|
-
"@modern-js/plugin-proxy": "@modern-js/plugin-proxy/cli",
|
|
122
|
-
"@modern-js/plugin-ssg": "@modern-js/plugin-ssg/cli",
|
|
123
|
-
"@modern-js/plugin-bff": "@modern-js/plugin-bff/cli",
|
|
124
|
-
"@modern-js/plugin-storybook": "@modern-js/plugin-storybook/cli",
|
|
125
|
-
"@modern-js/plugin-express": "@modern-js/plugin-express/cli",
|
|
126
|
-
"@modern-js/plugin-koa": "@modern-js/plugin-koa/cli",
|
|
127
|
-
"@modern-js/plugin-server": "@modern-js/plugin-server/cli",
|
|
128
|
-
"@modern-js/plugin-swc": "@modern-js/plugin-swc",
|
|
129
|
-
"@modern-js/plugin-garfish": "@modern-js/plugin-garfish/cli",
|
|
130
|
-
"@modern-js/plugin-tailwindcss": "@modern-js/plugin-tailwindcss/cli",
|
|
131
|
-
"@modern-js/plugin-polyfill": "@modern-js/plugin-polyfill/cli",
|
|
132
|
-
// legacy router (inner react-router-dom v5)
|
|
133
|
-
"@modern-js/plugin-router-v5": "@modern-js/plugin-router-v5/cli"
|
|
72
|
+
const OUTPUT_CONFIG_FILE = 'modern.config.json';
|
|
73
|
+
const DEFAULT_RUNTIME_CONFIG = 'modern.runtime';
|
|
74
|
+
const ROUTE_MANIFEST_FILE = 'routes-manifest.json';
|
|
75
|
+
const LOADER_ROUTES_DIR = "loader-routes";
|
|
76
|
+
const DEFAULT_DEV_HOST = '0.0.0.0';
|
|
77
|
+
const INTERNAL_RUNTIME_PLUGINS = {
|
|
78
|
+
'@modern-js/runtime': '@modern-js/runtime/cli'
|
|
134
79
|
};
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
80
|
+
exports.API_DIR = __webpack_exports__.API_DIR;
|
|
81
|
+
exports.CONFIG_CACHE_DIR = __webpack_exports__.CONFIG_CACHE_DIR;
|
|
82
|
+
exports.CONFIG_FILE_EXTENSIONS = __webpack_exports__.CONFIG_FILE_EXTENSIONS;
|
|
83
|
+
exports.DEFAULT_API_PREFIX = __webpack_exports__.DEFAULT_API_PREFIX;
|
|
84
|
+
exports.DEFAULT_DEV_HOST = __webpack_exports__.DEFAULT_DEV_HOST;
|
|
85
|
+
exports.DEFAULT_ENTRY_NAME = __webpack_exports__.DEFAULT_ENTRY_NAME;
|
|
86
|
+
exports.DEFAULT_RUNTIME_CONFIG = __webpack_exports__.DEFAULT_RUNTIME_CONFIG;
|
|
87
|
+
exports.ENTRY_NAME_PATTERN = __webpack_exports__.ENTRY_NAME_PATTERN;
|
|
88
|
+
exports.INTERNAL_RUNTIME_PLUGINS = __webpack_exports__.INTERNAL_RUNTIME_PLUGINS;
|
|
89
|
+
exports.JS_EXTENSIONS = __webpack_exports__.JS_EXTENSIONS;
|
|
90
|
+
exports.LOADABLE_STATS_FILE = __webpack_exports__.LOADABLE_STATS_FILE;
|
|
91
|
+
exports.LOADER_ROUTES_DIR = __webpack_exports__.LOADER_ROUTES_DIR;
|
|
92
|
+
exports.MAIN_ENTRY_NAME = __webpack_exports__.MAIN_ENTRY_NAME;
|
|
93
|
+
exports.NESTED_ROUTE_SPEC_FILE = __webpack_exports__.NESTED_ROUTE_SPEC_FILE;
|
|
94
|
+
exports.OUTPUT_CONFIG_FILE = __webpack_exports__.OUTPUT_CONFIG_FILE;
|
|
95
|
+
exports.ROUTE_MANIFEST_FILE = __webpack_exports__.ROUTE_MANIFEST_FILE;
|
|
96
|
+
exports.ROUTE_SPEC_FILE = __webpack_exports__.ROUTE_SPEC_FILE;
|
|
97
|
+
exports.SERVER_BUNDLE_DIRECTORY = __webpack_exports__.SERVER_BUNDLE_DIRECTORY;
|
|
98
|
+
exports.SERVER_DIR = __webpack_exports__.SERVER_DIR;
|
|
99
|
+
exports.SERVER_PLUGIN_BFF = __webpack_exports__.SERVER_PLUGIN_BFF;
|
|
100
|
+
exports.SERVER_PLUGIN_POLYFILL = __webpack_exports__.SERVER_PLUGIN_POLYFILL;
|
|
101
|
+
exports.SERVER_RENDER_FUNCTION_NAME = __webpack_exports__.SERVER_RENDER_FUNCTION_NAME;
|
|
102
|
+
exports.SERVER_WORKER_BUNDLE_DIRECTORY = __webpack_exports__.SERVER_WORKER_BUNDLE_DIRECTORY;
|
|
103
|
+
exports.SHARED_DIR = __webpack_exports__.SHARED_DIR;
|
|
104
|
+
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
105
|
+
"API_DIR",
|
|
106
|
+
"CONFIG_CACHE_DIR",
|
|
107
|
+
"CONFIG_FILE_EXTENSIONS",
|
|
108
|
+
"DEFAULT_API_PREFIX",
|
|
109
|
+
"DEFAULT_DEV_HOST",
|
|
110
|
+
"DEFAULT_ENTRY_NAME",
|
|
111
|
+
"DEFAULT_RUNTIME_CONFIG",
|
|
112
|
+
"ENTRY_NAME_PATTERN",
|
|
113
|
+
"INTERNAL_RUNTIME_PLUGINS",
|
|
114
|
+
"JS_EXTENSIONS",
|
|
115
|
+
"LOADABLE_STATS_FILE",
|
|
116
|
+
"LOADER_ROUTES_DIR",
|
|
117
|
+
"MAIN_ENTRY_NAME",
|
|
118
|
+
"NESTED_ROUTE_SPEC_FILE",
|
|
119
|
+
"OUTPUT_CONFIG_FILE",
|
|
120
|
+
"ROUTE_MANIFEST_FILE",
|
|
121
|
+
"ROUTE_SPEC_FILE",
|
|
122
|
+
"SERVER_BUNDLE_DIRECTORY",
|
|
123
|
+
"SERVER_DIR",
|
|
124
|
+
"SERVER_PLUGIN_BFF",
|
|
125
|
+
"SERVER_PLUGIN_POLYFILL",
|
|
126
|
+
"SERVER_RENDER_FUNCTION_NAME",
|
|
127
|
+
"SERVER_WORKER_BUNDLE_DIRECTORY",
|
|
128
|
+
"SHARED_DIR"
|
|
129
|
+
].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
|
|
130
|
+
Object.defineProperty(exports, '__esModule', {
|
|
131
|
+
value: true
|
|
169
132
|
});
|
package/dist/cjs/cli/ensure.js
CHANGED
|
@@ -1,49 +1,56 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
var
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
};
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
};
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
)
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
2
|
+
var __webpack_require__ = {};
|
|
3
|
+
(()=>{
|
|
4
|
+
__webpack_require__.n = (module)=>{
|
|
5
|
+
var getter = module && module.__esModule ? ()=>module['default'] : ()=>module;
|
|
6
|
+
__webpack_require__.d(getter, {
|
|
7
|
+
a: getter
|
|
8
|
+
});
|
|
9
|
+
return getter;
|
|
10
|
+
};
|
|
11
|
+
})();
|
|
12
|
+
(()=>{
|
|
13
|
+
__webpack_require__.d = (exports1, definition)=>{
|
|
14
|
+
for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
|
|
15
|
+
enumerable: true,
|
|
16
|
+
get: definition[key]
|
|
17
|
+
});
|
|
18
|
+
};
|
|
19
|
+
})();
|
|
20
|
+
(()=>{
|
|
21
|
+
__webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
|
|
22
|
+
})();
|
|
23
|
+
(()=>{
|
|
24
|
+
__webpack_require__.r = (exports1)=>{
|
|
25
|
+
if ("u" > typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
|
|
26
|
+
value: 'Module'
|
|
27
|
+
});
|
|
28
|
+
Object.defineProperty(exports1, '__esModule', {
|
|
29
|
+
value: true
|
|
30
|
+
});
|
|
31
|
+
};
|
|
32
|
+
})();
|
|
33
|
+
var __webpack_exports__ = {};
|
|
34
|
+
__webpack_require__.r(__webpack_exports__);
|
|
35
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
36
|
+
ensureAbsolutePath: ()=>ensureAbsolutePath,
|
|
37
|
+
ensureArray: ()=>ensureArray
|
|
33
38
|
});
|
|
34
|
-
|
|
35
|
-
var
|
|
36
|
-
const ensureAbsolutePath = (base, filePath)
|
|
37
|
-
const ensureArray = (params)
|
|
38
|
-
|
|
39
|
-
return
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
params
|
|
43
|
-
];
|
|
39
|
+
const external_path_namespaceObject = require("path");
|
|
40
|
+
var external_path_default = /*#__PURE__*/ __webpack_require__.n(external_path_namespaceObject);
|
|
41
|
+
const ensureAbsolutePath = (base, filePath)=>external_path_default().isAbsolute(filePath) ? filePath : external_path_default().resolve(base, filePath);
|
|
42
|
+
const ensureArray = (params)=>{
|
|
43
|
+
if (Array.isArray(params)) return params;
|
|
44
|
+
return [
|
|
45
|
+
params
|
|
46
|
+
];
|
|
44
47
|
};
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
48
|
+
exports.ensureAbsolutePath = __webpack_exports__.ensureAbsolutePath;
|
|
49
|
+
exports.ensureArray = __webpack_exports__.ensureArray;
|
|
50
|
+
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
51
|
+
"ensureAbsolutePath",
|
|
52
|
+
"ensureArray"
|
|
53
|
+
].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
|
|
54
|
+
Object.defineProperty(exports, '__esModule', {
|
|
55
|
+
value: true
|
|
49
56
|
});
|