@modern-js/utils 2.21.1 → 2.22.1-alpha.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/FileSizeReporter.d.ts +16 -0
- package/dist/FileSizeReporter.js +162 -0
- package/dist/alias.d.ts +25 -0
- package/dist/alias.js +108 -0
- package/dist/analyzeProject.d.ts +2 -0
- package/dist/analyzeProject.js +71 -0
- package/dist/applyOptionsChain.d.ts +3 -0
- package/dist/applyOptionsChain.js +58 -0
- package/dist/babel.d.ts +3 -0
- package/dist/babel.js +136 -0
- package/dist/chainId.d.ts +244 -0
- package/dist/chainId.js +196 -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/clearConsole.d.ts +1 -0
- package/dist/clearConsole.js +31 -0
- package/dist/commands.d.ts +4 -0
- package/dist/commands.js +48 -0
- package/dist/compatRequire.d.ts +13 -0
- package/dist/compatRequire.js +82 -0
- package/dist/compiled.d.ts +43 -0
- package/dist/compiled.js +142 -0
- package/dist/constants.d.ts +244 -0
- package/dist/constants.js +320 -0
- package/dist/debug.d.ts +6 -0
- package/dist/debug.js +28 -0
- package/dist/emptyDir.d.ts +1 -0
- package/dist/emptyDir.js +52 -0
- package/dist/ensureAbsolutePath.d.ts +7 -0
- package/dist/ensureAbsolutePath.js +38 -0
- package/dist/ensureArray.d.ts +1 -0
- package/dist/ensureArray.js +32 -0
- package/dist/esm/runtime-browser/parsed.js +5 -1
- package/dist/findExists.d.ts +6 -0
- package/dist/findExists.js +45 -0
- package/dist/generateMetaTags.d.ts +16 -0
- package/dist/generateMetaTags.js +61 -0
- package/dist/getBrowserslist.d.ts +2 -0
- package/dist/getBrowserslist.js +31 -0
- package/dist/getCoreJsVersion.d.ts +1 -0
- package/dist/getCoreJsVersion.js +46 -0
- package/dist/getEntryOptions.d.ts +1 -0
- package/dist/getEntryOptions.js +54 -0
- package/dist/getPackageManager.d.ts +1 -0
- package/dist/getPackageManager.js +87 -0
- package/dist/getPort.d.ts +14 -0
- package/dist/getPort.js +112 -0
- package/dist/getServerConfig.d.ts +1 -0
- package/dist/getServerConfig.js +67 -0
- package/dist/getTargetDir.d.ts +1 -0
- package/dist/getTargetDir.js +41 -0
- package/dist/import.d.ts +5 -0
- package/dist/import.js +33 -0
- package/dist/index.d.ts +44 -0
- package/dist/index.js +60 -0
- package/dist/is/index.d.ts +58 -0
- package/dist/is/index.js +114 -0
- package/dist/is/nodeEnv.d.ts +8 -0
- package/dist/is/nodeEnv.js +39 -0
- package/dist/is/platform.d.ts +2 -0
- package/dist/is/platform.js +30 -0
- package/dist/is/type.d.ts +8 -0
- package/dist/is/type.js +64 -0
- package/dist/logger.d.ts +65 -0
- package/dist/logger.js +145 -0
- package/dist/monorepo.d.ts +11 -0
- package/dist/monorepo.js +137 -0
- package/dist/nodeEnv.d.ts +3 -0
- package/dist/nodeEnv.js +81 -0
- package/dist/path.d.ts +18 -0
- package/dist/path.js +92 -0
- package/dist/pathSerializer.d.ts +16 -0
- package/dist/pathSerializer.js +76 -0
- package/dist/plugin.d.ts +2 -0
- package/dist/plugin.js +46 -0
- package/dist/prettyInstructions.d.ts +9 -0
- package/dist/prettyInstructions.js +112 -0
- package/dist/printBuildError.d.ts +8 -0
- package/dist/printBuildError.js +57 -0
- package/dist/react.d.ts +1 -0
- package/dist/react.js +64 -0
- package/dist/readTsConfig.d.ts +2 -0
- package/dist/readTsConfig.js +47 -0
- package/dist/removeSlash.d.ts +3 -0
- package/dist/removeSlash.js +33 -0
- package/dist/resolve.d.ts +13 -0
- package/dist/resolve.js +63 -0
- package/dist/routes.d.ts +2 -0
- package/dist/routes.js +58 -0
- package/dist/runtimeExports.d.ts +4 -0
- package/dist/runtimeExports.js +73 -0
- package/dist/ssr.d.ts +8 -0
- package/dist/ssr.js +30 -0
- package/dist/storage.d.ts +5 -0
- package/dist/storage.js +75 -0
- package/dist/testUtils.d.ts +5 -0
- package/dist/testUtils.js +38 -0
- package/dist/types.d.ts +1 -0
- package/dist/types.js +15 -0
- package/dist/universal/constants.d.ts +9 -0
- package/dist/universal/constants.js +30 -0
- package/dist/universal/formatWebpack.d.ts +13 -0
- package/dist/universal/formatWebpack.js +100 -0
- package/dist/universal/nestedRoutes.d.ts +8 -0
- package/dist/universal/nestedRoutes.js +131 -0
- package/dist/universal/remixRouter.d.ts +1 -0
- package/dist/universal/remixRouter.js +17 -0
- package/dist/universal/serialize.d.ts +1 -0
- package/dist/universal/serialize.js +40 -0
- package/dist/version.d.ts +2 -0
- package/dist/version.js +92 -0
- package/dist/wait.d.ts +2 -0
- package/dist/wait.js +29 -0
- package/dist/watch.d.ts +8 -0
- package/dist/watch.js +90 -0
- package/package.json +5 -5
@@ -0,0 +1,244 @@
|
|
1
|
+
export declare const CHAIN_ID: {
|
2
|
+
/** Predefined rules */
|
3
|
+
readonly RULE: {
|
4
|
+
/** Rule for .mjs */
|
5
|
+
readonly MJS: "mjs";
|
6
|
+
/** Rule for predefined loaders */
|
7
|
+
|
8
|
+
readonly LOADERS: "loaders";
|
9
|
+
/** Rule for fonts */
|
10
|
+
|
11
|
+
readonly FONT: "font";
|
12
|
+
/** Rule for images */
|
13
|
+
|
14
|
+
readonly IMAGE: "image";
|
15
|
+
/** Rule for media */
|
16
|
+
|
17
|
+
readonly MEDIA: "media";
|
18
|
+
/** Rule for js */
|
19
|
+
|
20
|
+
readonly JS: "js";
|
21
|
+
/** Rule for data uri encoded javascript */
|
22
|
+
|
23
|
+
readonly JS_DATA_URI: "js-data-uri";
|
24
|
+
/** Rule for ts */
|
25
|
+
|
26
|
+
readonly TS: "ts";
|
27
|
+
/** Rule for css */
|
28
|
+
|
29
|
+
readonly CSS: "css";
|
30
|
+
/** Rule for less */
|
31
|
+
|
32
|
+
readonly LESS: "less";
|
33
|
+
/** Rule for sass */
|
34
|
+
|
35
|
+
readonly SASS: "sass";
|
36
|
+
/** Rule for stylus */
|
37
|
+
|
38
|
+
readonly STYLUS: "stylus";
|
39
|
+
/** Rule for svg */
|
40
|
+
|
41
|
+
readonly SVG: "svg";
|
42
|
+
/** Rule for pug */
|
43
|
+
|
44
|
+
readonly PUG: "pug";
|
45
|
+
/** Rule for toml */
|
46
|
+
|
47
|
+
readonly TOML: "toml";
|
48
|
+
/** Rule for yaml */
|
49
|
+
|
50
|
+
readonly YAML: "yaml";
|
51
|
+
/** Rule for bff */
|
52
|
+
|
53
|
+
readonly JS_BFF_API: "js-bff-api";
|
54
|
+
};
|
55
|
+
/** Predefined rule groups */
|
56
|
+
|
57
|
+
readonly ONE_OF: {
|
58
|
+
readonly SVG: "svg";
|
59
|
+
readonly SVG_URL: "svg-url";
|
60
|
+
readonly SVG_ASSET: "svg-asset";
|
61
|
+
readonly SVG_INLINE: "svg-inline";
|
62
|
+
};
|
63
|
+
/** Predefined loaders */
|
64
|
+
|
65
|
+
readonly USE: {
|
66
|
+
/** ts-loader */
|
67
|
+
readonly TS: "ts";
|
68
|
+
/** css-loader */
|
69
|
+
|
70
|
+
readonly CSS: "css";
|
71
|
+
/** sass-loader */
|
72
|
+
|
73
|
+
readonly SASS: "sass";
|
74
|
+
/** less-loader */
|
75
|
+
|
76
|
+
readonly LESS: "less";
|
77
|
+
/** stylus-loader */
|
78
|
+
|
79
|
+
readonly STYLUS: "stylus";
|
80
|
+
/** url-loader */
|
81
|
+
|
82
|
+
readonly URL: "url";
|
83
|
+
/** pug-loader */
|
84
|
+
|
85
|
+
readonly PUG: "pug";
|
86
|
+
/** file-loader */
|
87
|
+
|
88
|
+
readonly FILE: "file";
|
89
|
+
/** @svgr/webpack */
|
90
|
+
|
91
|
+
readonly SVGR: "svgr";
|
92
|
+
/** yaml-loader */
|
93
|
+
|
94
|
+
readonly YAML: "yaml";
|
95
|
+
/** toml-loader */
|
96
|
+
|
97
|
+
readonly TOML: "toml";
|
98
|
+
/** html-loader */
|
99
|
+
|
100
|
+
readonly HTML: "html";
|
101
|
+
/** babel-loader */
|
102
|
+
|
103
|
+
readonly BABEL: "babel";
|
104
|
+
/** esbuild-loader */
|
105
|
+
|
106
|
+
readonly ESBUILD: "esbuild";
|
107
|
+
/** swc-loader */
|
108
|
+
|
109
|
+
readonly SWC: "swc";
|
110
|
+
/** style-loader */
|
111
|
+
|
112
|
+
readonly STYLE: "style-loader";
|
113
|
+
/** postcss-loader */
|
114
|
+
|
115
|
+
readonly POSTCSS: "postcss";
|
116
|
+
/** markdown-loader */
|
117
|
+
|
118
|
+
readonly MARKDOWN: "markdown";
|
119
|
+
/** ignore-css-loader */
|
120
|
+
|
121
|
+
readonly IGNORE_CSS: "ignore-css";
|
122
|
+
/** css-modules-typescript-loader */
|
123
|
+
|
124
|
+
readonly CSS_MODULES_TS: "css-modules-typescript";
|
125
|
+
/** mini-css-extract-plugin.loader */
|
126
|
+
|
127
|
+
readonly MINI_CSS_EXTRACT: "mini-css-extract";
|
128
|
+
/** builder-plugin-image-compress.loader */
|
129
|
+
|
130
|
+
readonly IMAGE_COMPRESS: "image-compress";
|
131
|
+
/** builder-plugin-image-compress svgo-loader */
|
132
|
+
|
133
|
+
readonly SVGO: "svgo";
|
134
|
+
/** builder-plugin-imagex */
|
135
|
+
|
136
|
+
readonly IMAGEX: "imagex";
|
137
|
+
};
|
138
|
+
/** Predefined plugins */
|
139
|
+
|
140
|
+
readonly PLUGIN: {
|
141
|
+
/** HotModuleReplacementPlugin */
|
142
|
+
readonly HMR: "hmr";
|
143
|
+
/** CopyWebpackPlugin */
|
144
|
+
|
145
|
+
readonly COPY: "copy";
|
146
|
+
/** HtmlWebpackPlugin */
|
147
|
+
|
148
|
+
readonly HTML: "html";
|
149
|
+
/** DefinePlugin */
|
150
|
+
|
151
|
+
readonly DEFINE: "define";
|
152
|
+
/** IgnorePlugin */
|
153
|
+
|
154
|
+
readonly IGNORE: "ignore";
|
155
|
+
/** BannerPlugin */
|
156
|
+
|
157
|
+
readonly BANNER: "banner";
|
158
|
+
/** Webpackbar */
|
159
|
+
|
160
|
+
readonly PROGRESS: "progress";
|
161
|
+
/** Inspector */
|
162
|
+
|
163
|
+
readonly INSPECTOR: "inspector";
|
164
|
+
/** AppIconPlugin */
|
165
|
+
|
166
|
+
readonly APP_ICON: "app-icon";
|
167
|
+
/** FaviconUrlPlugin */
|
168
|
+
|
169
|
+
readonly FAVICON_URL: "favicon-url";
|
170
|
+
/** LoadableWebpackPlugin */
|
171
|
+
|
172
|
+
readonly LOADABLE: "loadable";
|
173
|
+
/** WebpackManifestPlugin */
|
174
|
+
|
175
|
+
readonly MANIFEST: "webpack-manifest";
|
176
|
+
/** ForkTsCheckerWebpackPlugin */
|
177
|
+
|
178
|
+
readonly TS_CHECKER: "ts-checker";
|
179
|
+
/** InlineChunkHtmlPlugin */
|
180
|
+
|
181
|
+
readonly INLINE_HTML: "inline-html";
|
182
|
+
/** WebpackBundleAnalyzer */
|
183
|
+
|
184
|
+
readonly BUNDLE_ANALYZER: "bundle-analyze";
|
185
|
+
/** BottomTemplatePlugin */
|
186
|
+
|
187
|
+
readonly BOTTOM_TEMPLATE: "bottom-template";
|
188
|
+
/** HtmlCrossOriginPlugin */
|
189
|
+
|
190
|
+
readonly HTML_CROSS_ORIGIN: "html-cross-origin";
|
191
|
+
/** MiniCssExtractPlugin */
|
192
|
+
|
193
|
+
readonly MINI_CSS_EXTRACT: "mini-css-extract";
|
194
|
+
/** ReactFastRefreshPlugin */
|
195
|
+
|
196
|
+
readonly REACT_FAST_REFRESH: "react-fast-refresh";
|
197
|
+
/** ProvidePlugin for node polyfill */
|
198
|
+
|
199
|
+
readonly NODE_POLYFILL_PROVIDE: "node-polyfill-provide";
|
200
|
+
/** WebpackSRIPlugin */
|
201
|
+
|
202
|
+
readonly SUBRESOURCE_INTEGRITY: "subresource-integrity";
|
203
|
+
/** WebpackAssetsRetryPlugin */
|
204
|
+
|
205
|
+
readonly ASSETS_RETRY: "ASSETS_RETRY";
|
206
|
+
/** AutoSetRootFontSizePlugin */
|
207
|
+
|
208
|
+
readonly AUTO_SET_ROOT_SIZE: "auto-set-root-size";
|
209
|
+
/** HtmlAsyncChunkPlugin */
|
210
|
+
|
211
|
+
readonly HTML_ASYNC_CHUNK: "html-async-chunk";
|
212
|
+
/** SWC_POLYFILL_CHECKER */
|
213
|
+
|
214
|
+
readonly SWC_POLYFILL_CHECKER: "swc-polyfill-checker-plugin";
|
215
|
+
/** HtmlTagsPlugin */
|
216
|
+
|
217
|
+
readonly HTML_TAGS: "html-tags";
|
218
|
+
};
|
219
|
+
/** Predefined minimizers */
|
220
|
+
|
221
|
+
readonly MINIMIZER: {
|
222
|
+
/** TerserWebpackPlugin */
|
223
|
+
readonly JS: "js";
|
224
|
+
/** CssMinimizerWebpackPlugin */
|
225
|
+
|
226
|
+
readonly CSS: "css";
|
227
|
+
/** ESBuildPlugin */
|
228
|
+
|
229
|
+
readonly ESBUILD: "js-css";
|
230
|
+
/** SWCPlugin */
|
231
|
+
|
232
|
+
readonly SWC: "swc";
|
233
|
+
};
|
234
|
+
/** Predefined resolve plugins */
|
235
|
+
|
236
|
+
readonly RESOLVE_PLUGIN: {
|
237
|
+
/** ModuleScopePlugin */
|
238
|
+
readonly MODULE_SCOPE: "module-scope";
|
239
|
+
/** TsConfigPathsPlugin */
|
240
|
+
|
241
|
+
readonly TS_CONFIG_PATHS: "ts-config-paths";
|
242
|
+
};
|
243
|
+
};
|
244
|
+
export type ChainIdentifier = typeof CHAIN_ID;
|
package/dist/chainId.js
ADDED
@@ -0,0 +1,196 @@
|
|
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 chainId_exports = {};
|
19
|
+
__export(chainId_exports, {
|
20
|
+
CHAIN_ID: () => CHAIN_ID
|
21
|
+
});
|
22
|
+
module.exports = __toCommonJS(chainId_exports);
|
23
|
+
const CHAIN_ID = {
|
24
|
+
/** Predefined rules */
|
25
|
+
RULE: {
|
26
|
+
/** Rule for .mjs */
|
27
|
+
MJS: "mjs",
|
28
|
+
/** Rule for predefined loaders */
|
29
|
+
LOADERS: "loaders",
|
30
|
+
/** Rule for fonts */
|
31
|
+
FONT: "font",
|
32
|
+
/** Rule for images */
|
33
|
+
IMAGE: "image",
|
34
|
+
/** Rule for media */
|
35
|
+
MEDIA: "media",
|
36
|
+
/** Rule for js */
|
37
|
+
JS: "js",
|
38
|
+
/** Rule for data uri encoded javascript */
|
39
|
+
JS_DATA_URI: "js-data-uri",
|
40
|
+
/** Rule for ts */
|
41
|
+
TS: "ts",
|
42
|
+
/** Rule for css */
|
43
|
+
CSS: "css",
|
44
|
+
/** Rule for less */
|
45
|
+
LESS: "less",
|
46
|
+
/** Rule for sass */
|
47
|
+
SASS: "sass",
|
48
|
+
/** Rule for stylus */
|
49
|
+
STYLUS: "stylus",
|
50
|
+
/** Rule for svg */
|
51
|
+
SVG: "svg",
|
52
|
+
/** Rule for pug */
|
53
|
+
PUG: "pug",
|
54
|
+
/** Rule for toml */
|
55
|
+
TOML: "toml",
|
56
|
+
/** Rule for yaml */
|
57
|
+
YAML: "yaml",
|
58
|
+
/** Rule for bff */
|
59
|
+
JS_BFF_API: "js-bff-api"
|
60
|
+
},
|
61
|
+
/** Predefined rule groups */
|
62
|
+
ONE_OF: {
|
63
|
+
SVG: "svg",
|
64
|
+
SVG_URL: "svg-url",
|
65
|
+
SVG_ASSET: "svg-asset",
|
66
|
+
SVG_INLINE: "svg-inline"
|
67
|
+
},
|
68
|
+
/** Predefined loaders */
|
69
|
+
USE: {
|
70
|
+
/** ts-loader */
|
71
|
+
TS: "ts",
|
72
|
+
/** css-loader */
|
73
|
+
CSS: "css",
|
74
|
+
/** sass-loader */
|
75
|
+
SASS: "sass",
|
76
|
+
/** less-loader */
|
77
|
+
LESS: "less",
|
78
|
+
/** stylus-loader */
|
79
|
+
STYLUS: "stylus",
|
80
|
+
/** url-loader */
|
81
|
+
URL: "url",
|
82
|
+
/** pug-loader */
|
83
|
+
PUG: "pug",
|
84
|
+
/** file-loader */
|
85
|
+
FILE: "file",
|
86
|
+
/** @svgr/webpack */
|
87
|
+
SVGR: "svgr",
|
88
|
+
/** yaml-loader */
|
89
|
+
YAML: "yaml",
|
90
|
+
/** toml-loader */
|
91
|
+
TOML: "toml",
|
92
|
+
/** html-loader */
|
93
|
+
HTML: "html",
|
94
|
+
/** babel-loader */
|
95
|
+
BABEL: "babel",
|
96
|
+
/** esbuild-loader */
|
97
|
+
ESBUILD: "esbuild",
|
98
|
+
/** swc-loader */
|
99
|
+
SWC: "swc",
|
100
|
+
/** style-loader */
|
101
|
+
STYLE: "style-loader",
|
102
|
+
/** postcss-loader */
|
103
|
+
POSTCSS: "postcss",
|
104
|
+
/** markdown-loader */
|
105
|
+
MARKDOWN: "markdown",
|
106
|
+
/** ignore-css-loader */
|
107
|
+
IGNORE_CSS: "ignore-css",
|
108
|
+
/** css-modules-typescript-loader */
|
109
|
+
CSS_MODULES_TS: "css-modules-typescript",
|
110
|
+
/** mini-css-extract-plugin.loader */
|
111
|
+
MINI_CSS_EXTRACT: "mini-css-extract",
|
112
|
+
/** builder-plugin-image-compress.loader */
|
113
|
+
IMAGE_COMPRESS: "image-compress",
|
114
|
+
/** builder-plugin-image-compress svgo-loader */
|
115
|
+
SVGO: "svgo",
|
116
|
+
/** builder-plugin-imagex */
|
117
|
+
IMAGEX: "imagex"
|
118
|
+
},
|
119
|
+
/** Predefined plugins */
|
120
|
+
PLUGIN: {
|
121
|
+
/** HotModuleReplacementPlugin */
|
122
|
+
HMR: "hmr",
|
123
|
+
/** CopyWebpackPlugin */
|
124
|
+
COPY: "copy",
|
125
|
+
/** HtmlWebpackPlugin */
|
126
|
+
HTML: "html",
|
127
|
+
/** DefinePlugin */
|
128
|
+
DEFINE: "define",
|
129
|
+
/** IgnorePlugin */
|
130
|
+
IGNORE: "ignore",
|
131
|
+
/** BannerPlugin */
|
132
|
+
BANNER: "banner",
|
133
|
+
/** Webpackbar */
|
134
|
+
PROGRESS: "progress",
|
135
|
+
/** Inspector */
|
136
|
+
INSPECTOR: "inspector",
|
137
|
+
/** AppIconPlugin */
|
138
|
+
APP_ICON: "app-icon",
|
139
|
+
/** FaviconUrlPlugin */
|
140
|
+
FAVICON_URL: "favicon-url",
|
141
|
+
/** LoadableWebpackPlugin */
|
142
|
+
LOADABLE: "loadable",
|
143
|
+
/** WebpackManifestPlugin */
|
144
|
+
MANIFEST: "webpack-manifest",
|
145
|
+
/** ForkTsCheckerWebpackPlugin */
|
146
|
+
TS_CHECKER: "ts-checker",
|
147
|
+
/** InlineChunkHtmlPlugin */
|
148
|
+
INLINE_HTML: "inline-html",
|
149
|
+
/** WebpackBundleAnalyzer */
|
150
|
+
BUNDLE_ANALYZER: "bundle-analyze",
|
151
|
+
/** BottomTemplatePlugin */
|
152
|
+
BOTTOM_TEMPLATE: "bottom-template",
|
153
|
+
/** HtmlCrossOriginPlugin */
|
154
|
+
HTML_CROSS_ORIGIN: "html-cross-origin",
|
155
|
+
/** MiniCssExtractPlugin */
|
156
|
+
MINI_CSS_EXTRACT: "mini-css-extract",
|
157
|
+
/** ReactFastRefreshPlugin */
|
158
|
+
REACT_FAST_REFRESH: "react-fast-refresh",
|
159
|
+
/** ProvidePlugin for node polyfill */
|
160
|
+
NODE_POLYFILL_PROVIDE: "node-polyfill-provide",
|
161
|
+
/** WebpackSRIPlugin */
|
162
|
+
SUBRESOURCE_INTEGRITY: "subresource-integrity",
|
163
|
+
/** WebpackAssetsRetryPlugin */
|
164
|
+
ASSETS_RETRY: "ASSETS_RETRY",
|
165
|
+
/** AutoSetRootFontSizePlugin */
|
166
|
+
AUTO_SET_ROOT_SIZE: "auto-set-root-size",
|
167
|
+
/** HtmlAsyncChunkPlugin */
|
168
|
+
HTML_ASYNC_CHUNK: "html-async-chunk",
|
169
|
+
/** SWC_POLYFILL_CHECKER */
|
170
|
+
SWC_POLYFILL_CHECKER: "swc-polyfill-checker-plugin",
|
171
|
+
/** HtmlTagsPlugin */
|
172
|
+
HTML_TAGS: "html-tags"
|
173
|
+
},
|
174
|
+
/** Predefined minimizers */
|
175
|
+
MINIMIZER: {
|
176
|
+
/** TerserWebpackPlugin */
|
177
|
+
JS: "js",
|
178
|
+
/** CssMinimizerWebpackPlugin */
|
179
|
+
CSS: "css",
|
180
|
+
/** ESBuildPlugin */
|
181
|
+
ESBUILD: "js-css",
|
182
|
+
/** SWCPlugin */
|
183
|
+
SWC: "swc"
|
184
|
+
},
|
185
|
+
/** Predefined resolve plugins */
|
186
|
+
RESOLVE_PLUGIN: {
|
187
|
+
/** ModuleScopePlugin */
|
188
|
+
MODULE_SCOPE: "module-scope",
|
189
|
+
/** TsConfigPathsPlugin */
|
190
|
+
TS_CONFIG_PATHS: "ts-config-paths"
|
191
|
+
}
|
192
|
+
};
|
193
|
+
// Annotate the CommonJS export names for ESM import in node:
|
194
|
+
0 && (module.exports = {
|
195
|
+
CHAIN_ID
|
196
|
+
});
|
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"));
|