@modern-js/utils 2.21.1 → 2.22.0
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +11 -0
- package/dist/cjs/cli/alias.js +12 -4
- package/dist/cjs/cli/applyOptionsChain.js +3 -1
- package/dist/cjs/cli/babel.js +6 -2
- package/dist/cjs/cli/commands.js +12 -4
- package/dist/cjs/cli/common.js +9 -3
- package/dist/cjs/cli/constants/chainId.js +3 -1
- package/dist/cjs/cli/constants/index.js +93 -31
- package/dist/cjs/cli/ensure.js +6 -2
- package/dist/cjs/cli/fs.js +6 -2
- package/dist/cjs/cli/get/config.js +3 -1
- package/dist/cjs/cli/get/data.js +24 -8
- package/dist/cjs/cli/get/index.js +6 -2
- package/dist/cjs/cli/is/config.js +18 -6
- package/dist/cjs/cli/is/env.js +18 -6
- package/dist/cjs/cli/is/platform.js +6 -2
- package/dist/cjs/cli/is/project.js +21 -7
- package/dist/cjs/cli/is/type.js +27 -9
- package/dist/cjs/cli/logger.js +6 -2
- package/dist/cjs/cli/monorepo.js +21 -7
- package/dist/cjs/cli/package.js +12 -4
- package/dist/cjs/cli/path.js +39 -13
- package/dist/cjs/cli/pathSerializer.js +12 -4
- package/dist/cjs/cli/port.js +3 -1
- package/dist/cjs/cli/prettyInstructions.js +6 -2
- package/dist/cjs/cli/print.js +3 -1
- package/dist/cjs/cli/require.js +18 -6
- package/dist/cjs/cli/routes.js +3 -1
- package/dist/cjs/cli/runtimeExports.js +3 -1
- package/dist/cjs/cli/test.js +3 -1
- package/dist/cjs/cli/watch.js +6 -2
- package/dist/cjs/compiled.js +99 -33
- package/dist/cjs/import.js +6 -2
- package/dist/cjs/runtime/nestedRoutes.js +6 -2
- package/dist/cjs/runtime-browser/parsed.js +8 -2
- package/dist/cjs/runtime-node/index.js +9 -3
- package/dist/cjs/runtime-node/serialize.js +3 -1
- package/dist/cjs/runtime-node/storage.js +3 -1
- package/dist/cjs/universal/constants.js +6 -2
- package/dist/cjs/universal/formatWebpack.js +3 -1
- package/dist/cjs/universal/pluginDagSort.js +3 -1
- package/dist/esm/runtime-browser/parsed.js +5 -1
- package/package.json +5 -5
package/CHANGELOG.md
CHANGED
@@ -1,5 +1,16 @@
|
|
1
1
|
# @modern-js/utils
|
2
2
|
|
3
|
+
## 2.22.0
|
4
|
+
|
5
|
+
### Patch Changes
|
6
|
+
|
7
|
+
- 3d48836: chore(deps): fix all missing peer dependencies
|
8
|
+
|
9
|
+
chore(deps): 修复缺少的 peer dependencies
|
10
|
+
|
11
|
+
- 5050e8e: fix: browser should get last element that server insert to html for baseUrl
|
12
|
+
fix: 浏览器需要获取最后一个 Server 注入 HTML 的 baseUrl 数据
|
13
|
+
|
3
14
|
## 2.21.1
|
4
15
|
|
5
16
|
## 2.21.0
|
package/dist/cjs/cli/alias.js
CHANGED
@@ -10,10 +10,18 @@ function _export(target, all) {
|
|
10
10
|
});
|
11
11
|
}
|
12
12
|
_export(exports, {
|
13
|
-
validAlias: ()
|
14
|
-
|
15
|
-
|
16
|
-
|
13
|
+
validAlias: function() {
|
14
|
+
return validAlias;
|
15
|
+
},
|
16
|
+
mergeAlias: function() {
|
17
|
+
return mergeAlias;
|
18
|
+
},
|
19
|
+
getAliasConfig: function() {
|
20
|
+
return getAliasConfig;
|
21
|
+
},
|
22
|
+
getUserAlias: function() {
|
23
|
+
return getUserAlias;
|
24
|
+
}
|
17
25
|
});
|
18
26
|
const _interop_require_default = require("@swc/helpers/_/_interop_require_default");
|
19
27
|
const _fs = /* @__PURE__ */ _interop_require_default._(require("fs"));
|
@@ -4,7 +4,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
});
|
5
5
|
Object.defineProperty(exports, "applyOptionsChain", {
|
6
6
|
enumerable: true,
|
7
|
-
get: ()
|
7
|
+
get: function() {
|
8
|
+
return applyOptionsChain;
|
9
|
+
}
|
8
10
|
});
|
9
11
|
const _is = require("./is");
|
10
12
|
const _logger = require("./logger");
|
package/dist/cjs/cli/babel.js
CHANGED
@@ -10,8 +10,12 @@ function _export(target, all) {
|
|
10
10
|
});
|
11
11
|
}
|
12
12
|
_export(exports, {
|
13
|
-
getBabelUtils: ()
|
14
|
-
|
13
|
+
getBabelUtils: function() {
|
14
|
+
return getBabelUtils;
|
15
|
+
},
|
16
|
+
applyUserBabelConfig: function() {
|
17
|
+
return applyUserBabelConfig;
|
18
|
+
}
|
15
19
|
});
|
16
20
|
const _path = require("path");
|
17
21
|
const _applyOptionsChain = require("./applyOptionsChain");
|
package/dist/cjs/cli/commands.js
CHANGED
@@ -10,10 +10,18 @@ function _export(target, all) {
|
|
10
10
|
});
|
11
11
|
}
|
12
12
|
_export(exports, {
|
13
|
-
getFullArgv: ()
|
14
|
-
|
15
|
-
|
16
|
-
|
13
|
+
getFullArgv: function() {
|
14
|
+
return getFullArgv;
|
15
|
+
},
|
16
|
+
getArgv: function() {
|
17
|
+
return getArgv;
|
18
|
+
},
|
19
|
+
getCommand: function() {
|
20
|
+
return getCommand;
|
21
|
+
},
|
22
|
+
isDevCommand: function() {
|
23
|
+
return isDevCommand;
|
24
|
+
}
|
17
25
|
});
|
18
26
|
const getFullArgv = () => {
|
19
27
|
var _process_env_MODERN_ARGV;
|
package/dist/cjs/cli/common.js
CHANGED
@@ -10,9 +10,15 @@ function _export(target, all) {
|
|
10
10
|
});
|
11
11
|
}
|
12
12
|
_export(exports, {
|
13
|
-
createDebugger: ()
|
14
|
-
|
15
|
-
|
13
|
+
createDebugger: function() {
|
14
|
+
return createDebugger;
|
15
|
+
},
|
16
|
+
clearConsole: function() {
|
17
|
+
return clearConsole;
|
18
|
+
},
|
19
|
+
wait: function() {
|
20
|
+
return wait;
|
21
|
+
}
|
16
22
|
});
|
17
23
|
const _debug = require("../../compiled/debug");
|
18
24
|
const createDebugger = (scope) => (0, _debug.debug)(`modern-js:${scope}`);
|
@@ -10,37 +10,99 @@ function _export(target, all) {
|
|
10
10
|
});
|
11
11
|
}
|
12
12
|
_export(exports, {
|
13
|
-
ROUTE_SPEC_FILE: ()
|
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
|
-
|
13
|
+
ROUTE_SPEC_FILE: function() {
|
14
|
+
return ROUTE_SPEC_FILE;
|
15
|
+
},
|
16
|
+
MAIN_ENTRY_NAME: function() {
|
17
|
+
return MAIN_ENTRY_NAME;
|
18
|
+
},
|
19
|
+
SERVER_BUNDLE_DIRECTORY: function() {
|
20
|
+
return SERVER_BUNDLE_DIRECTORY;
|
21
|
+
},
|
22
|
+
SERVER_WORKER_BUNDLE_DIRECTORY: function() {
|
23
|
+
return SERVER_WORKER_BUNDLE_DIRECTORY;
|
24
|
+
},
|
25
|
+
ENTRY_NAME_PATTERN: function() {
|
26
|
+
return ENTRY_NAME_PATTERN;
|
27
|
+
},
|
28
|
+
SERVER_RENDER_FUNCTION_NAME: function() {
|
29
|
+
return SERVER_RENDER_FUNCTION_NAME;
|
30
|
+
},
|
31
|
+
LOADABLE_STATS_FILE: function() {
|
32
|
+
return LOADABLE_STATS_FILE;
|
33
|
+
},
|
34
|
+
API_DIR: function() {
|
35
|
+
return API_DIR;
|
36
|
+
},
|
37
|
+
SERVER_DIR: function() {
|
38
|
+
return SERVER_DIR;
|
39
|
+
},
|
40
|
+
SHARED_DIR: function() {
|
41
|
+
return SHARED_DIR;
|
42
|
+
},
|
43
|
+
CONFIG_CACHE_DIR: function() {
|
44
|
+
return CONFIG_CACHE_DIR;
|
45
|
+
},
|
46
|
+
CONFIG_FILE_EXTENSIONS: function() {
|
47
|
+
return CONFIG_FILE_EXTENSIONS;
|
48
|
+
},
|
49
|
+
OUTPUT_CONFIG_FILE: function() {
|
50
|
+
return OUTPUT_CONFIG_FILE;
|
51
|
+
},
|
52
|
+
DEFAULT_SERVER_CONFIG: function() {
|
53
|
+
return DEFAULT_SERVER_CONFIG;
|
54
|
+
},
|
55
|
+
ROUTE_MANIFEST_FILE: function() {
|
56
|
+
return ROUTE_MANIFEST_FILE;
|
57
|
+
},
|
58
|
+
LOADER_ROUTES_DIR: function() {
|
59
|
+
return LOADER_ROUTES_DIR;
|
60
|
+
},
|
61
|
+
DEFAULT_DEV_HOST: function() {
|
62
|
+
return DEFAULT_DEV_HOST;
|
63
|
+
},
|
64
|
+
INTERNAL_APP_TOOLS_PLUGINS: function() {
|
65
|
+
return INTERNAL_APP_TOOLS_PLUGINS;
|
66
|
+
},
|
67
|
+
INTERNAL_APP_TOOLS_RUNTIME_PLUGINS: function() {
|
68
|
+
return INTERNAL_APP_TOOLS_RUNTIME_PLUGINS;
|
69
|
+
},
|
70
|
+
INTERNAL_MODULE_TOOLS_PLUGINS: function() {
|
71
|
+
return INTERNAL_MODULE_TOOLS_PLUGINS;
|
72
|
+
},
|
73
|
+
INTERNAL_MONOREPO_TOOLS_PLUGINS: function() {
|
74
|
+
return INTERNAL_MONOREPO_TOOLS_PLUGINS;
|
75
|
+
},
|
76
|
+
INTERNAL_DOC_TOOLS_PLUGINS: function() {
|
77
|
+
return INTERNAL_DOC_TOOLS_PLUGINS;
|
78
|
+
},
|
79
|
+
INTERNAL_CLI_PLUGINS: function() {
|
80
|
+
return INTERNAL_CLI_PLUGINS;
|
81
|
+
},
|
82
|
+
SERVER_PLUGIN_BFF: function() {
|
83
|
+
return SERVER_PLUGIN_BFF;
|
84
|
+
},
|
85
|
+
SERVER_PLUGIN_EXPRESS: function() {
|
86
|
+
return SERVER_PLUGIN_EXPRESS;
|
87
|
+
},
|
88
|
+
SERVER_PLUGIN_KOA: function() {
|
89
|
+
return SERVER_PLUGIN_KOA;
|
90
|
+
},
|
91
|
+
SERVER_PLUGIN_SERVER: function() {
|
92
|
+
return SERVER_PLUGIN_SERVER;
|
93
|
+
},
|
94
|
+
SERVER_PLUGIN_POLYFILL: function() {
|
95
|
+
return SERVER_PLUGIN_POLYFILL;
|
96
|
+
},
|
97
|
+
INTERNAL_SERVER_PLUGINS: function() {
|
98
|
+
return INTERNAL_SERVER_PLUGINS;
|
99
|
+
},
|
100
|
+
PLUGIN_SCHEMAS: function() {
|
101
|
+
return PLUGIN_SCHEMAS;
|
102
|
+
},
|
103
|
+
DEFAULT_BABEL_PRESET_TYPESCRIPT_OPTIONS: function() {
|
104
|
+
return DEFAULT_BABEL_PRESET_TYPESCRIPT_OPTIONS;
|
105
|
+
}
|
44
106
|
});
|
45
107
|
const _export_star = require("@swc/helpers/_/_export_star");
|
46
108
|
_export_star._(require("./chainId"), exports);
|
package/dist/cjs/cli/ensure.js
CHANGED
@@ -10,8 +10,12 @@ function _export(target, all) {
|
|
10
10
|
});
|
11
11
|
}
|
12
12
|
_export(exports, {
|
13
|
-
ensureAbsolutePath: ()
|
14
|
-
|
13
|
+
ensureAbsolutePath: function() {
|
14
|
+
return ensureAbsolutePath;
|
15
|
+
},
|
16
|
+
ensureArray: function() {
|
17
|
+
return ensureArray;
|
18
|
+
}
|
15
19
|
});
|
16
20
|
const _interop_require_default = require("@swc/helpers/_/_interop_require_default");
|
17
21
|
const _path = /* @__PURE__ */ _interop_require_default._(require("path"));
|
package/dist/cjs/cli/fs.js
CHANGED
@@ -10,8 +10,12 @@ function _export(target, all) {
|
|
10
10
|
});
|
11
11
|
}
|
12
12
|
_export(exports, {
|
13
|
-
findExists: ()
|
14
|
-
|
13
|
+
findExists: function() {
|
14
|
+
return findExists;
|
15
|
+
},
|
16
|
+
emptyDir: function() {
|
17
|
+
return emptyDir;
|
18
|
+
}
|
15
19
|
});
|
16
20
|
const _compiled = require("../compiled");
|
17
21
|
const findExists = (files) => {
|
@@ -4,7 +4,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
});
|
5
5
|
Object.defineProperty(exports, "getEntryOptions", {
|
6
6
|
enumerable: true,
|
7
|
-
get: ()
|
7
|
+
get: function() {
|
8
|
+
return getEntryOptions;
|
9
|
+
}
|
8
10
|
});
|
9
11
|
const _is = require("../is");
|
10
12
|
const _constants = require("../constants");
|
package/dist/cjs/cli/get/data.js
CHANGED
@@ -10,14 +10,30 @@ function _export(target, all) {
|
|
10
10
|
});
|
11
11
|
}
|
12
12
|
_export(exports, {
|
13
|
-
getPackageManager: ()
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
13
|
+
getPackageManager: function() {
|
14
|
+
return getPackageManager;
|
15
|
+
},
|
16
|
+
getCoreJsVersion: function() {
|
17
|
+
return getCoreJsVersion;
|
18
|
+
},
|
19
|
+
getAntdMajorVersion: function() {
|
20
|
+
return getAntdMajorVersion;
|
21
|
+
},
|
22
|
+
defaults: function() {
|
23
|
+
return defaults;
|
24
|
+
},
|
25
|
+
getBrowserslist: function() {
|
26
|
+
return getBrowserslist;
|
27
|
+
},
|
28
|
+
getInternalPlugins: function() {
|
29
|
+
return getInternalPlugins;
|
30
|
+
},
|
31
|
+
readTsConfig: function() {
|
32
|
+
return readTsConfig;
|
33
|
+
},
|
34
|
+
readTsConfigByFile: function() {
|
35
|
+
return readTsConfigByFile;
|
36
|
+
}
|
21
37
|
});
|
22
38
|
const _interop_require_default = require("@swc/helpers/_/_interop_require_default");
|
23
39
|
const _os = /* @__PURE__ */ _interop_require_default._(require("os"));
|
@@ -10,8 +10,12 @@ function _export(target, all) {
|
|
10
10
|
});
|
11
11
|
}
|
12
12
|
_export(exports, {
|
13
|
-
getServerConfig: ()
|
14
|
-
|
13
|
+
getServerConfig: function() {
|
14
|
+
return getServerConfig;
|
15
|
+
},
|
16
|
+
getTargetDir: function() {
|
17
|
+
return getTargetDir;
|
18
|
+
}
|
15
19
|
});
|
16
20
|
const _export_star = require("@swc/helpers/_/_export_star");
|
17
21
|
const _interop_require_default = require("@swc/helpers/_/_interop_require_default");
|
@@ -10,12 +10,24 @@ function _export(target, all) {
|
|
10
10
|
});
|
11
11
|
}
|
12
12
|
_export(exports, {
|
13
|
-
isSSR: ()
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
13
|
+
isSSR: function() {
|
14
|
+
return isSSR;
|
15
|
+
},
|
16
|
+
isUseSSRBundle: function() {
|
17
|
+
return isUseSSRBundle;
|
18
|
+
},
|
19
|
+
isServiceWorker: function() {
|
20
|
+
return isServiceWorker;
|
21
|
+
},
|
22
|
+
isRouterV5: function() {
|
23
|
+
return isRouterV5;
|
24
|
+
},
|
25
|
+
isSSGEntry: function() {
|
26
|
+
return isSSGEntry;
|
27
|
+
},
|
28
|
+
isSingleEntry: function() {
|
29
|
+
return isSingleEntry;
|
30
|
+
}
|
19
31
|
});
|
20
32
|
const _type = require("./type");
|
21
33
|
const isSSR = (config) => {
|
package/dist/cjs/cli/is/env.js
CHANGED
@@ -10,12 +10,24 @@ function _export(target, all) {
|
|
10
10
|
});
|
11
11
|
}
|
12
12
|
_export(exports, {
|
13
|
-
getNodeEnv: ()
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
13
|
+
getNodeEnv: function() {
|
14
|
+
return getNodeEnv;
|
15
|
+
},
|
16
|
+
isDev: function() {
|
17
|
+
return isDev;
|
18
|
+
},
|
19
|
+
isProd: function() {
|
20
|
+
return isProd;
|
21
|
+
},
|
22
|
+
isTest: function() {
|
23
|
+
return isTest;
|
24
|
+
},
|
25
|
+
isProdProfile: function() {
|
26
|
+
return isProdProfile;
|
27
|
+
},
|
28
|
+
isFastRefresh: function() {
|
29
|
+
return isFastRefresh;
|
30
|
+
}
|
19
31
|
});
|
20
32
|
const getNodeEnv = () => process.env.NODE_ENV || "development";
|
21
33
|
const isDev = () => getNodeEnv() === "development";
|
@@ -10,8 +10,12 @@ function _export(target, all) {
|
|
10
10
|
});
|
11
11
|
}
|
12
12
|
_export(exports, {
|
13
|
-
isNodeJS: ()
|
14
|
-
|
13
|
+
isNodeJS: function() {
|
14
|
+
return isNodeJS;
|
15
|
+
},
|
16
|
+
isBrowser: function() {
|
17
|
+
return isBrowser;
|
18
|
+
}
|
15
19
|
});
|
16
20
|
const isNodeJS = () => typeof process !== "undefined" && process.versions != null && process.versions.node != null && process.versions.electron == null;
|
17
21
|
const isBrowser = () => typeof window !== "undefined";
|
@@ -10,13 +10,27 @@ function _export(target, all) {
|
|
10
10
|
});
|
11
11
|
}
|
12
12
|
_export(exports, {
|
13
|
-
isDepExists: ()
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
13
|
+
isDepExists: function() {
|
14
|
+
return isDepExists;
|
15
|
+
},
|
16
|
+
isPackageInstalled: function() {
|
17
|
+
return isPackageInstalled;
|
18
|
+
},
|
19
|
+
isApiOnly: function() {
|
20
|
+
return isApiOnly;
|
21
|
+
},
|
22
|
+
isWebOnly: function() {
|
23
|
+
return isWebOnly;
|
24
|
+
},
|
25
|
+
isBeyondReact17: function() {
|
26
|
+
return isBeyondReact17;
|
27
|
+
},
|
28
|
+
isReact18: function() {
|
29
|
+
return isReact18;
|
30
|
+
},
|
31
|
+
isTypescript: function() {
|
32
|
+
return isTypescript;
|
33
|
+
}
|
20
34
|
});
|
21
35
|
const _interop_require_default = require("@swc/helpers/_/_interop_require_default");
|
22
36
|
const _path = /* @__PURE__ */ _interop_require_default._(require("path"));
|
package/dist/cjs/cli/is/type.js
CHANGED
@@ -10,15 +10,33 @@ function _export(target, all) {
|
|
10
10
|
});
|
11
11
|
}
|
12
12
|
_export(exports, {
|
13
|
-
isString: ()
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
13
|
+
isString: function() {
|
14
|
+
return isString;
|
15
|
+
},
|
16
|
+
isUndefined: function() {
|
17
|
+
return isUndefined;
|
18
|
+
},
|
19
|
+
isArray: function() {
|
20
|
+
return isArray;
|
21
|
+
},
|
22
|
+
isFunction: function() {
|
23
|
+
return isFunction;
|
24
|
+
},
|
25
|
+
isObject: function() {
|
26
|
+
return isObject;
|
27
|
+
},
|
28
|
+
isPlainObject: function() {
|
29
|
+
return isPlainObject;
|
30
|
+
},
|
31
|
+
isPromise: function() {
|
32
|
+
return isPromise;
|
33
|
+
},
|
34
|
+
isRegExp: function() {
|
35
|
+
return isRegExp;
|
36
|
+
},
|
37
|
+
isEmpty: function() {
|
38
|
+
return isEmpty;
|
39
|
+
}
|
22
40
|
});
|
23
41
|
function isString(str) {
|
24
42
|
return typeof str === "string";
|
package/dist/cjs/cli/logger.js
CHANGED
@@ -10,8 +10,12 @@ function _export(target, all) {
|
|
10
10
|
});
|
11
11
|
}
|
12
12
|
_export(exports, {
|
13
|
-
Logger: ()
|
14
|
-
|
13
|
+
Logger: function() {
|
14
|
+
return Logger;
|
15
|
+
},
|
16
|
+
logger: function() {
|
17
|
+
return logger;
|
18
|
+
}
|
15
19
|
});
|
16
20
|
const _define_property = require("@swc/helpers/_/_define_property");
|
17
21
|
const _interop_require_default = require("@swc/helpers/_/_interop_require_default");
|
package/dist/cjs/cli/monorepo.js
CHANGED
@@ -10,13 +10,27 @@ function _export(target, all) {
|
|
10
10
|
});
|
11
11
|
}
|
12
12
|
_export(exports, {
|
13
|
-
isLerna: ()
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
13
|
+
isLerna: function() {
|
14
|
+
return isLerna;
|
15
|
+
},
|
16
|
+
isYarnWorkspaces: function() {
|
17
|
+
return isYarnWorkspaces;
|
18
|
+
},
|
19
|
+
isPnpmWorkspaces: function() {
|
20
|
+
return isPnpmWorkspaces;
|
21
|
+
},
|
22
|
+
isMonorepo: function() {
|
23
|
+
return isMonorepo;
|
24
|
+
},
|
25
|
+
isModernjsMonorepo: function() {
|
26
|
+
return isModernjsMonorepo;
|
27
|
+
},
|
28
|
+
findMonorepoRoot: function() {
|
29
|
+
return findMonorepoRoot;
|
30
|
+
},
|
31
|
+
getMonorepoPackages: function() {
|
32
|
+
return getMonorepoPackages;
|
33
|
+
}
|
20
34
|
});
|
21
35
|
const _interop_require_default = require("@swc/helpers/_/_interop_require_default");
|
22
36
|
const _fs = /* @__PURE__ */ _interop_require_default._(require("fs"));
|
package/dist/cjs/cli/package.js
CHANGED
@@ -10,10 +10,18 @@ function _export(target, all) {
|
|
10
10
|
});
|
11
11
|
}
|
12
12
|
_export(exports, {
|
13
|
-
getPnpmVersion: ()
|
14
|
-
|
15
|
-
|
16
|
-
|
13
|
+
getPnpmVersion: function() {
|
14
|
+
return getPnpmVersion;
|
15
|
+
},
|
16
|
+
canUseNpm: function() {
|
17
|
+
return canUseNpm;
|
18
|
+
},
|
19
|
+
canUseYarn: function() {
|
20
|
+
return canUseYarn;
|
21
|
+
},
|
22
|
+
canUsePnpm: function() {
|
23
|
+
return canUsePnpm;
|
24
|
+
}
|
17
25
|
});
|
18
26
|
const _compiled = require("../compiled");
|
19
27
|
async function getPnpmVersion() {
|
package/dist/cjs/cli/path.js
CHANGED
@@ -10,19 +10,45 @@ function _export(target, all) {
|
|
10
10
|
});
|
11
11
|
}
|
12
12
|
_export(exports, {
|
13
|
-
isPathString: ()
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
13
|
+
isPathString: function() {
|
14
|
+
return isPathString;
|
15
|
+
},
|
16
|
+
isRelativePath: function() {
|
17
|
+
return isRelativePath;
|
18
|
+
},
|
19
|
+
normalizeOutputPath: function() {
|
20
|
+
return normalizeOutputPath;
|
21
|
+
},
|
22
|
+
normalizeToPosixPath: function() {
|
23
|
+
return normalizeToPosixPath;
|
24
|
+
},
|
25
|
+
getTemplatePath: function() {
|
26
|
+
return getTemplatePath;
|
27
|
+
},
|
28
|
+
compilePathMatcherRegExp: function() {
|
29
|
+
return compilePathMatcherRegExp;
|
30
|
+
},
|
31
|
+
_joinPathParts: function() {
|
32
|
+
return _joinPathParts;
|
33
|
+
},
|
34
|
+
upwardPaths: function() {
|
35
|
+
return upwardPaths;
|
36
|
+
},
|
37
|
+
getRealTemporaryDirectory: function() {
|
38
|
+
return getRealTemporaryDirectory;
|
39
|
+
},
|
40
|
+
splitPathString: function() {
|
41
|
+
return splitPathString;
|
42
|
+
},
|
43
|
+
removeLeadingSlash: function() {
|
44
|
+
return removeLeadingSlash;
|
45
|
+
},
|
46
|
+
removeTailSlash: function() {
|
47
|
+
return removeTailSlash;
|
48
|
+
},
|
49
|
+
removeSlash: function() {
|
50
|
+
return removeSlash;
|
51
|
+
}
|
26
52
|
});
|
27
53
|
const _interop_require_default = require("@swc/helpers/_/_interop_require_default");
|
28
54
|
const _path = /* @__PURE__ */ _interop_require_default._(require("path"));
|
@@ -10,10 +10,18 @@ function _export(target, all) {
|
|
10
10
|
});
|
11
11
|
}
|
12
12
|
_export(exports, {
|
13
|
-
matchUpwardPathsAsUnknown: ()
|
14
|
-
|
15
|
-
|
16
|
-
|
13
|
+
matchUpwardPathsAsUnknown: function() {
|
14
|
+
return matchUpwardPathsAsUnknown;
|
15
|
+
},
|
16
|
+
applyPathMatcher: function() {
|
17
|
+
return applyPathMatcher;
|
18
|
+
},
|
19
|
+
applyMatcherReplacement: function() {
|
20
|
+
return applyMatcherReplacement;
|
21
|
+
},
|
22
|
+
createDefaultPathMatchers: function() {
|
23
|
+
return createDefaultPathMatchers;
|
24
|
+
}
|
17
25
|
});
|
18
26
|
const _interop_require_default = require("@swc/helpers/_/_interop_require_default");
|
19
27
|
const _os = /* @__PURE__ */ _interop_require_default._(require("os"));
|
package/dist/cjs/cli/port.js
CHANGED
@@ -4,7 +4,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
});
|
5
5
|
Object.defineProperty(exports, "getPort", {
|
6
6
|
enumerable: true,
|
7
|
-
get: ()
|
7
|
+
get: function() {
|
8
|
+
return getPort;
|
9
|
+
}
|
8
10
|
});
|
9
11
|
const _interop_require_default = require("@swc/helpers/_/_interop_require_default");
|
10
12
|
const _net = /* @__PURE__ */ _interop_require_default._(require("net"));
|
@@ -10,8 +10,12 @@ function _export(target, all) {
|
|
10
10
|
});
|
11
11
|
}
|
12
12
|
_export(exports, {
|
13
|
-
getAddressUrls: ()
|
14
|
-
|
13
|
+
getAddressUrls: function() {
|
14
|
+
return getAddressUrls;
|
15
|
+
},
|
16
|
+
prettyInstructions: function() {
|
17
|
+
return prettyInstructions;
|
18
|
+
}
|
15
19
|
});
|
16
20
|
const _interop_require_default = require("@swc/helpers/_/_interop_require_default");
|
17
21
|
const _os = /* @__PURE__ */ _interop_require_default._(require("os"));
|
package/dist/cjs/cli/print.js
CHANGED
@@ -4,7 +4,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
});
|
5
5
|
Object.defineProperty(exports, "printBuildError", {
|
6
6
|
enumerable: true,
|
7
|
-
get: ()
|
7
|
+
get: function() {
|
8
|
+
return printBuildError;
|
9
|
+
}
|
8
10
|
});
|
9
11
|
const _compiled = require("../compiled");
|
10
12
|
const _logger = require("./logger");
|
package/dist/cjs/cli/require.js
CHANGED
@@ -10,12 +10,24 @@ function _export(target, all) {
|
|
10
10
|
});
|
11
11
|
}
|
12
12
|
_export(exports, {
|
13
|
-
compatRequire: ()
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
13
|
+
compatRequire: function() {
|
14
|
+
return compatRequire;
|
15
|
+
},
|
16
|
+
dynamicImport: function() {
|
17
|
+
return dynamicImport;
|
18
|
+
},
|
19
|
+
requireExistModule: function() {
|
20
|
+
return requireExistModule;
|
21
|
+
},
|
22
|
+
cleanRequireCache: function() {
|
23
|
+
return cleanRequireCache;
|
24
|
+
},
|
25
|
+
deleteRequireCache: function() {
|
26
|
+
return deleteRequireCache;
|
27
|
+
},
|
28
|
+
tryResolve: function() {
|
29
|
+
return tryResolve;
|
30
|
+
}
|
19
31
|
});
|
20
32
|
const _fs = require("./fs");
|
21
33
|
const compatRequire = (filePath, interop = true) => {
|
package/dist/cjs/cli/routes.js
CHANGED
@@ -4,7 +4,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
});
|
5
5
|
Object.defineProperty(exports, "getRouteId", {
|
6
6
|
enumerable: true,
|
7
|
-
get: ()
|
7
|
+
get: function() {
|
8
|
+
return getRouteId;
|
9
|
+
}
|
8
10
|
});
|
9
11
|
const _interop_require_default = require("@swc/helpers/_/_interop_require_default");
|
10
12
|
const _path = /* @__PURE__ */ _interop_require_default._(require("path"));
|
@@ -4,7 +4,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
});
|
5
5
|
Object.defineProperty(exports, "createRuntimeExportsUtils", {
|
6
6
|
enumerable: true,
|
7
|
-
get: ()
|
7
|
+
get: function() {
|
8
|
+
return createRuntimeExportsUtils;
|
9
|
+
}
|
8
10
|
});
|
9
11
|
const _interop_require_default = require("@swc/helpers/_/_interop_require_default");
|
10
12
|
const _path = /* @__PURE__ */ _interop_require_default._(require("path"));
|
package/dist/cjs/cli/test.js
CHANGED
@@ -4,7 +4,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
});
|
5
5
|
Object.defineProperty(exports, "initSnapshotSerializer", {
|
6
6
|
enumerable: true,
|
7
|
-
get: ()
|
7
|
+
get: function() {
|
8
|
+
return initSnapshotSerializer;
|
9
|
+
}
|
8
10
|
});
|
9
11
|
const initSnapshotSerializer = (root) => {
|
10
12
|
expect.addSnapshotSerializer({
|
package/dist/cjs/cli/watch.js
CHANGED
@@ -10,8 +10,12 @@ function _export(target, all) {
|
|
10
10
|
});
|
11
11
|
}
|
12
12
|
_export(exports, {
|
13
|
-
WatchChangeType: ()
|
14
|
-
|
13
|
+
WatchChangeType: function() {
|
14
|
+
return WatchChangeType;
|
15
|
+
},
|
16
|
+
watch: function() {
|
17
|
+
return watch;
|
18
|
+
}
|
15
19
|
});
|
16
20
|
const _interop_require_default = require("@swc/helpers/_/_interop_require_default");
|
17
21
|
const _path = /* @__PURE__ */ _interop_require_default._(require("path"));
|
package/dist/cjs/compiled.js
CHANGED
@@ -10,39 +10,105 @@ function _export(target, all) {
|
|
10
10
|
});
|
11
11
|
}
|
12
12
|
_export(exports, {
|
13
|
-
fs: ()
|
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
|
-
|
13
|
+
fs: function() {
|
14
|
+
return _fsextra.default;
|
15
|
+
},
|
16
|
+
ora: function() {
|
17
|
+
return _ora.default;
|
18
|
+
},
|
19
|
+
glob: function() {
|
20
|
+
return _glob.default;
|
21
|
+
},
|
22
|
+
yaml: function() {
|
23
|
+
return _jsyaml.default;
|
24
|
+
},
|
25
|
+
chalk: function() {
|
26
|
+
return _chalk.default;
|
27
|
+
},
|
28
|
+
debug: function() {
|
29
|
+
return _debug.default;
|
30
|
+
},
|
31
|
+
slash: function() {
|
32
|
+
return _slash.default;
|
33
|
+
},
|
34
|
+
execa: function() {
|
35
|
+
return _execa.default;
|
36
|
+
},
|
37
|
+
json5: function() {
|
38
|
+
return _json5.default;
|
39
|
+
},
|
40
|
+
upath: function() {
|
41
|
+
return _upath.default;
|
42
|
+
},
|
43
|
+
pkgUp: function() {
|
44
|
+
return _pkgup.default;
|
45
|
+
},
|
46
|
+
nanoid: function() {
|
47
|
+
return _nanoid.nanoid;
|
48
|
+
},
|
49
|
+
semver: function() {
|
50
|
+
return _semver.default;
|
51
|
+
},
|
52
|
+
dotenv: function() {
|
53
|
+
return _dotenv.default;
|
54
|
+
},
|
55
|
+
lodash: function() {
|
56
|
+
return _lodash.default;
|
57
|
+
},
|
58
|
+
globby: function() {
|
59
|
+
return _globby.default;
|
60
|
+
},
|
61
|
+
address: function() {
|
62
|
+
return _address.default;
|
63
|
+
},
|
64
|
+
signale: function() {
|
65
|
+
return _signale.default;
|
66
|
+
},
|
67
|
+
urlJoin: function() {
|
68
|
+
return _urljoin.default;
|
69
|
+
},
|
70
|
+
minimist: function() {
|
71
|
+
return _minimist.default;
|
72
|
+
},
|
73
|
+
fastGlob: function() {
|
74
|
+
return _fastglob.default;
|
75
|
+
},
|
76
|
+
filesize: function() {
|
77
|
+
return _filesize.default;
|
78
|
+
},
|
79
|
+
gzipSize: function() {
|
80
|
+
return _gzipsize.default;
|
81
|
+
},
|
82
|
+
stripAnsi: function() {
|
83
|
+
return _stripansi.default;
|
84
|
+
},
|
85
|
+
dotenvExpand: function() {
|
86
|
+
return _dotenvexpand.default;
|
87
|
+
},
|
88
|
+
browserslist: function() {
|
89
|
+
return _browserslist.default;
|
90
|
+
},
|
91
|
+
recursiveReaddir: function() {
|
92
|
+
return _recursivereaddir.default;
|
93
|
+
},
|
94
|
+
program: function() {
|
95
|
+
return _commander.program;
|
96
|
+
},
|
97
|
+
Command: function() {
|
98
|
+
return _commander.Command;
|
99
|
+
},
|
100
|
+
Signale: function() {
|
101
|
+
return _signale.Signale;
|
102
|
+
},
|
103
|
+
mime: function() {
|
104
|
+
return mime;
|
105
|
+
},
|
106
|
+
chokidar: function() {
|
107
|
+
return chokidar;
|
108
|
+
},
|
109
|
+
inquirer: function() {
|
110
|
+
return inquirer;
|
111
|
+
}
|
46
112
|
});
|
47
113
|
const _interop_require_default = require("@swc/helpers/_/_interop_require_default");
|
48
114
|
const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
|
package/dist/cjs/import.js
CHANGED
@@ -10,8 +10,12 @@ function _export(target, all) {
|
|
10
10
|
});
|
11
11
|
}
|
12
12
|
_export(exports, {
|
13
|
-
lazyImport: ()
|
14
|
-
|
13
|
+
lazyImport: function() {
|
14
|
+
return lazy;
|
15
|
+
},
|
16
|
+
Import: function() {
|
17
|
+
return Import;
|
18
|
+
}
|
15
19
|
});
|
16
20
|
const lazy = (moduleName, requireFn) => {
|
17
21
|
const importLazyLocal = require("../compiled/import-lazy")(requireFn);
|
@@ -10,8 +10,12 @@ function _export(target, all) {
|
|
10
10
|
});
|
11
11
|
}
|
12
12
|
_export(exports, {
|
13
|
-
transformNestedRoutes: ()
|
14
|
-
|
13
|
+
transformNestedRoutes: function() {
|
14
|
+
return transformNestedRoutes;
|
15
|
+
},
|
16
|
+
renderNestedRoute: function() {
|
17
|
+
return renderNestedRoute;
|
18
|
+
}
|
15
19
|
});
|
16
20
|
const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
|
17
21
|
const _jsxruntime = require("react/jsx-runtime");
|
@@ -4,10 +4,16 @@ Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
});
|
5
5
|
Object.defineProperty(exports, "parsedJSONFromElement", {
|
6
6
|
enumerable: true,
|
7
|
-
get: ()
|
7
|
+
get: function() {
|
8
|
+
return parsedJSONFromElement;
|
9
|
+
}
|
8
10
|
});
|
9
11
|
const parsedJSONFromElement = (id) => {
|
10
|
-
const
|
12
|
+
const elements = document.querySelectorAll(`#${id}`);
|
13
|
+
if (elements.length === 0) {
|
14
|
+
return void 0;
|
15
|
+
}
|
16
|
+
const element = elements[elements.length - 1];
|
11
17
|
if (element) {
|
12
18
|
try {
|
13
19
|
const parsed = JSON.parse((element === null || element === void 0 ? void 0 : element.textContent) || "");
|
@@ -10,9 +10,15 @@ function _export(target, all) {
|
|
10
10
|
});
|
11
11
|
}
|
12
12
|
_export(exports, {
|
13
|
-
run: ()
|
14
|
-
|
15
|
-
|
13
|
+
run: function() {
|
14
|
+
return run;
|
15
|
+
},
|
16
|
+
useHeaders: function() {
|
17
|
+
return useHeaders;
|
18
|
+
},
|
19
|
+
serializeJson: function() {
|
20
|
+
return _serialize.serializeJson;
|
21
|
+
}
|
16
22
|
});
|
17
23
|
const _storage = require("./storage");
|
18
24
|
const _serialize = require("./serialize");
|
@@ -4,7 +4,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
});
|
5
5
|
Object.defineProperty(exports, "serializeJson", {
|
6
6
|
enumerable: true,
|
7
|
-
get: ()
|
7
|
+
get: function() {
|
8
|
+
return serializeJson;
|
9
|
+
}
|
8
10
|
});
|
9
11
|
const _interop_require_default = require("@swc/helpers/_/_interop_require_default");
|
10
12
|
const _serializejavascript = /* @__PURE__ */ _interop_require_default._(require("serialize-javascript"));
|
@@ -4,7 +4,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
});
|
5
5
|
Object.defineProperty(exports, "createStorage", {
|
6
6
|
enumerable: true,
|
7
|
-
get: ()
|
7
|
+
get: function() {
|
8
|
+
return createStorage;
|
9
|
+
}
|
8
10
|
});
|
9
11
|
const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
|
10
12
|
const _async_hooks = /* @__PURE__ */ _interop_require_wildcard._(require("async_hooks"));
|
@@ -10,8 +10,12 @@ function _export(target, all) {
|
|
10
10
|
});
|
11
11
|
}
|
12
12
|
_export(exports, {
|
13
|
-
ROUTE_MANIFEST: ()
|
14
|
-
|
13
|
+
ROUTE_MANIFEST: function() {
|
14
|
+
return ROUTE_MANIFEST;
|
15
|
+
},
|
16
|
+
HMR_SOCK_PATH: function() {
|
17
|
+
return HMR_SOCK_PATH;
|
18
|
+
}
|
15
19
|
});
|
16
20
|
const ROUTE_MANIFEST = `_MODERNJS_ROUTE_MANIFEST`;
|
17
21
|
const HMR_SOCK_PATH = "/webpack-hmr";
|
@@ -4,7 +4,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
});
|
5
5
|
Object.defineProperty(exports, "formatWebpackMessages", {
|
6
6
|
enumerable: true,
|
7
|
-
get: ()
|
7
|
+
get: function() {
|
8
|
+
return formatWebpackMessages;
|
9
|
+
}
|
8
10
|
});
|
9
11
|
const friendlySyntaxErrorLabel = "SyntaxError:";
|
10
12
|
function isLikelyASyntaxError(message) {
|
@@ -4,7 +4,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
});
|
5
5
|
Object.defineProperty(exports, "pluginDagSort", {
|
6
6
|
enumerable: true,
|
7
|
-
get: ()
|
7
|
+
get: function() {
|
8
|
+
return pluginDagSort;
|
9
|
+
}
|
8
10
|
});
|
9
11
|
const pluginDagSort = (plugins, key = "name", preKey = "pre", postKey = "post") => {
|
10
12
|
let allLines = [];
|
@@ -1,5 +1,9 @@
|
|
1
1
|
export const parsedJSONFromElement = (id) => {
|
2
|
-
const
|
2
|
+
const elements = document.querySelectorAll(`#${id}`);
|
3
|
+
if (elements.length === 0) {
|
4
|
+
return void 0;
|
5
|
+
}
|
6
|
+
const element = elements[elements.length - 1];
|
3
7
|
if (element) {
|
4
8
|
try {
|
5
9
|
const parsed = JSON.parse((element === null || element === void 0 ? void 0 : element.textContent) || "");
|
package/package.json
CHANGED
@@ -15,7 +15,7 @@
|
|
15
15
|
"modern",
|
16
16
|
"modern.js"
|
17
17
|
],
|
18
|
-
"version": "2.
|
18
|
+
"version": "2.22.0",
|
19
19
|
"jsnext:source": "./src/index.ts",
|
20
20
|
"types": "./dist/types/index.d.ts",
|
21
21
|
"main": "./dist/cjs/index.js",
|
@@ -203,7 +203,7 @@
|
|
203
203
|
}
|
204
204
|
},
|
205
205
|
"dependencies": {
|
206
|
-
"caniuse-lite": "^1.0.
|
206
|
+
"caniuse-lite": "^1.0.30001489",
|
207
207
|
"lodash": "^4.17.21",
|
208
208
|
"serialize-javascript": "^6.0.0",
|
209
209
|
"react-router-dom": "6.11.2",
|
@@ -231,9 +231,9 @@
|
|
231
231
|
"typescript": "^5",
|
232
232
|
"webpack": "^5.82.1",
|
233
233
|
"@types/serialize-javascript": "^5.0.1",
|
234
|
-
"@modern-js/types": "2.
|
235
|
-
"@scripts/jest-config": "2.
|
236
|
-
"@scripts/build": "2.
|
234
|
+
"@modern-js/types": "2.22.0",
|
235
|
+
"@scripts/jest-config": "2.22.0",
|
236
|
+
"@scripts/build": "2.22.0"
|
237
237
|
},
|
238
238
|
"sideEffects": false,
|
239
239
|
"scripts": {
|