@modern-js/utils 2.4.1-beta.0 → 2.5.0-alpha.0
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +7 -1
- package/dist/FileSizeReporter.d.ts +5 -5
- package/dist/FileSizeReporter.js +143 -136
- package/dist/alias.d.ts +16 -14
- package/dist/alias.js +94 -54
- package/dist/analyzeProject.d.ts +1 -1
- package/dist/analyzeProject.js +58 -33
- package/dist/applyOptionsChain.d.ts +1 -1
- package/dist/applyOptionsChain.js +55 -27
- package/dist/chainId.d.ts +256 -184
- package/dist/chainId.js +132 -187
- package/dist/clearConsole.d.ts +1 -1
- package/dist/clearConsole.js +29 -7
- package/dist/commands.d.ts +1 -1
- package/dist/commands.js +33 -10
- package/dist/compatRequire.d.ts +3 -3
- package/dist/compatRequire.js +74 -38
- package/dist/compiled.d.ts +2 -1
- package/dist/compiled.js +137 -72
- package/dist/constants.d.ts +127 -105
- package/dist/constants.js +298 -281
- package/dist/debug.d.ts +1 -1
- package/dist/debug.js +28 -11
- package/dist/emptyDir.d.ts +1 -1
- package/dist/emptyDir.js +51 -9
- package/dist/ensureAbsolutePath.d.ts +1 -1
- package/dist/ensureAbsolutePath.js +33 -14
- package/dist/ensureArray.d.ts +1 -1
- package/dist/ensureArray.js +30 -8
- package/dist/findExists.d.ts +1 -1
- package/dist/findExists.js +37 -17
- package/dist/format.d.ts +3 -3
- package/dist/format.js +93 -81
- package/dist/generateMetaTags.d.ts +4 -4
- package/dist/generateMetaTags.js +56 -43
- package/dist/getBrowserslist.d.ts +1 -1
- package/dist/getBrowserslist.js +31 -7
- package/dist/getCoreJsVersion.d.ts +1 -1
- package/dist/getCoreJsVersion.js +39 -35
- package/dist/getEntryOptions.d.ts +1 -1
- package/dist/getEntryOptions.js +51 -24
- package/dist/getPackageManager.d.ts +1 -1
- package/dist/getPackageManager.js +75 -28
- package/dist/getPort.d.ts +7 -4
- package/dist/getPort.js +104 -58
- package/dist/getServerConfig.d.ts +1 -1
- package/dist/getServerConfig.js +61 -32
- package/dist/import.d.ts +2 -2
- package/dist/import.js +31 -8
- package/dist/index.d.ts +2 -0
- package/dist/index.js +61 -59
- package/dist/is/index.d.ts +5 -1
- package/dist/is/index.js +81 -94
- package/dist/is/node-env.d.ts +1 -1
- package/dist/is/node-env.js +39 -17
- package/dist/is/platform.d.ts +1 -1
- package/dist/is/platform.js +30 -10
- package/dist/is/type.d.ts +1 -1
- package/dist/is/type.js +48 -22
- package/dist/logger.d.ts +51 -51
- package/dist/logger.js +127 -95
- package/dist/monorepo.d.ts +3 -3
- package/dist/monorepo.js +117 -74
- package/dist/nestedRoutes.d.ts +9 -0
- package/dist/nestedRoutes.js +144 -0
- package/dist/nodeEnv.d.ts +1 -1
- package/dist/nodeEnv.js +72 -25
- package/dist/path.d.ts +3 -1
- package/dist/path.js +76 -59
- package/dist/pathSerializer.d.ts +7 -7
- package/dist/pathSerializer.js +65 -43
- package/dist/plugin.d.ts +1 -1
- package/dist/plugin.js +45 -26
- package/dist/prettyInstructions.d.ts +4 -4
- package/dist/prettyInstructions.js +107 -65
- package/dist/printBuildError.d.ts +1 -1
- package/dist/printBuildError.js +54 -40
- package/dist/react.d.ts +1 -1
- package/dist/react.js +57 -21
- package/dist/readTsConfig.d.ts +1 -1
- package/dist/readTsConfig.js +38 -12
- package/dist/remix-router.d.ts +1 -0
- package/dist/remix-router.js +17 -0
- package/dist/removeSlash.d.ts +1 -1
- package/dist/removeSlash.js +33 -9
- package/dist/routes.d.ts +1 -1
- package/dist/routes.js +49 -22
- package/dist/runtimeExports.d.ts +3 -3
- package/dist/runtimeExports.js +59 -39
- package/dist/serialize.d.ts +1 -0
- package/dist/serialize.js +36 -0
- package/dist/ssr.d.ts +2 -1
- package/dist/ssr.js +30 -7
- package/dist/storage.d.ts +3 -3
- package/dist/storage.js +65 -59
- package/dist/test-utils.d.ts +1 -1
- package/dist/test-utils.js +30 -24
- package/dist/tryResolve.d.ts +2 -1
- package/dist/tryResolve.js +45 -33
- package/dist/types.d.ts +1 -1
- package/dist/types.js +15 -2
- package/dist/version.d.ts +1 -1
- package/dist/version.js +83 -24
- package/dist/wait.d.ts +1 -1
- package/dist/wait.js +28 -6
- package/dist/watch.d.ts +5 -5
- package/dist/watch.js +82 -55
- package/package.json +31 -9
@@ -1,30 +1,58 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
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 applyOptionsChain_exports = {};
|
19
|
+
__export(applyOptionsChain_exports, {
|
20
|
+
applyOptionsChain: () => applyOptionsChain
|
21
|
+
});
|
22
|
+
module.exports = __toCommonJS(applyOptionsChain_exports);
|
23
|
+
var import_index = require("./index");
|
6
24
|
function applyOptionsChain(defaults, options, utils, mergeFn = Object.assign) {
|
7
|
-
|
8
|
-
return defaults;
|
9
|
-
}
|
10
|
-
if ((0, index_1.isPlainObject)(options)) {
|
11
|
-
return mergeFn(defaults, options);
|
12
|
-
}
|
13
|
-
else if ((0, index_1.isFunction)(options)) {
|
14
|
-
const ret = options(defaults, utils);
|
15
|
-
if (ret) {
|
16
|
-
if (!(0, index_1.isPlainObject)(ret)) {
|
17
|
-
index_1.logger.warn(`${options.name}: Function should mutate the config and return nothing, Or return a cloned or merged version of config object.`);
|
18
|
-
}
|
19
|
-
return ret;
|
20
|
-
}
|
21
|
-
}
|
22
|
-
else if (Array.isArray(options)) {
|
23
|
-
return options.reduce((memo, cur) => applyOptionsChain(memo, cur, utils, mergeFn), defaults);
|
24
|
-
}
|
25
|
-
else {
|
26
|
-
throw new Error(`applyOptionsChain error:\ndefault options is: ${JSON.stringify(defaults)}`);
|
27
|
-
}
|
25
|
+
if (!options) {
|
28
26
|
return defaults;
|
27
|
+
}
|
28
|
+
if ((0, import_index.isPlainObject)(options)) {
|
29
|
+
return mergeFn(defaults, options);
|
30
|
+
} else if ((0, import_index.isFunction)(options)) {
|
31
|
+
const ret = options(defaults, utils);
|
32
|
+
if (ret) {
|
33
|
+
if (!(0, import_index.isPlainObject)(ret)) {
|
34
|
+
import_index.logger.warn(
|
35
|
+
`${options.name}: Function should mutate the config and return nothing, Or return a cloned or merged version of config object.`
|
36
|
+
);
|
37
|
+
}
|
38
|
+
return ret;
|
39
|
+
}
|
40
|
+
} else if (Array.isArray(options)) {
|
41
|
+
return options.reduce(
|
42
|
+
(memo, cur) => applyOptionsChain(memo, cur, utils, mergeFn),
|
43
|
+
defaults
|
44
|
+
);
|
45
|
+
} else {
|
46
|
+
throw new Error(
|
47
|
+
`applyOptionsChain error:
|
48
|
+
default options is: ${JSON.stringify(
|
49
|
+
defaults
|
50
|
+
)}`
|
51
|
+
);
|
52
|
+
}
|
53
|
+
return defaults;
|
29
54
|
}
|
30
|
-
|
55
|
+
// Annotate the CommonJS export names for ESM import in node:
|
56
|
+
0 && (module.exports = {
|
57
|
+
applyOptionsChain
|
58
|
+
});
|
package/dist/chainId.d.ts
CHANGED
@@ -1,186 +1,258 @@
|
|
1
1
|
export declare const CHAIN_ID: {
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
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
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
readonly
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
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
|
-
readonly
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
/**
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
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 JS: "js";
|
59
|
+
readonly TS: "ts";
|
60
|
+
readonly CSS: "css";
|
61
|
+
readonly LESS: "less";
|
62
|
+
readonly SASS: "sass";
|
63
|
+
readonly YAML: "yml";
|
64
|
+
readonly TOML: "toml";
|
65
|
+
readonly FALLBACK: "fallback";
|
66
|
+
readonly MARKDOWN: "markdown";
|
67
|
+
readonly BFF_CLIENT: "bff-client";
|
68
|
+
readonly CSS_MODULES: "css-modules";
|
69
|
+
readonly LESS_MODULES: "less-modules";
|
70
|
+
readonly SASS_MODULES: "sass-modules";
|
71
|
+
readonly SVG: "svg";
|
72
|
+
readonly SVG_URL: "svg-url";
|
73
|
+
readonly SVG_ASSET: "svg-asset";
|
74
|
+
readonly SVG_INLINE: "svg-inline";
|
75
|
+
readonly ASSETS: "assets";
|
76
|
+
readonly ASSETS_URL: "assets-url";
|
77
|
+
readonly ASSETS_INLINE: "assets-inline";
|
78
|
+
readonly IMAGE_COMPRESS: "image-compress";
|
79
|
+
};
|
80
|
+
/** Predefined loaders */
|
81
|
+
|
82
|
+
readonly USE: {
|
83
|
+
/** ts-loader */
|
84
|
+
readonly TS: "ts";
|
85
|
+
/** css-loader */
|
86
|
+
|
87
|
+
readonly CSS: "css";
|
88
|
+
/** sass-loader */
|
89
|
+
|
90
|
+
readonly SASS: "sass";
|
91
|
+
/** less-loader */
|
92
|
+
|
93
|
+
readonly LESS: "less";
|
94
|
+
/** stylus-loader */
|
95
|
+
|
96
|
+
readonly STYLUS: "stylus";
|
97
|
+
/** url-loader */
|
98
|
+
|
99
|
+
readonly URL: "url";
|
100
|
+
/** pug-loader */
|
101
|
+
|
102
|
+
readonly PUG: "pug";
|
103
|
+
/** file-loader */
|
104
|
+
|
105
|
+
readonly FILE: "file";
|
106
|
+
/** @svgr/webpack */
|
107
|
+
|
108
|
+
readonly SVGR: "svgr";
|
109
|
+
/** yaml-loader */
|
110
|
+
|
111
|
+
readonly YAML: "yaml";
|
112
|
+
/** toml-loader */
|
113
|
+
|
114
|
+
readonly TOML: "toml";
|
115
|
+
/** html-loader */
|
116
|
+
|
117
|
+
readonly HTML: "html";
|
118
|
+
/** babel-loader */
|
119
|
+
|
120
|
+
readonly BABEL: "babel";
|
121
|
+
/** esbuild-loader */
|
122
|
+
|
123
|
+
readonly ESBUILD: "esbuild";
|
124
|
+
/** swc-loader */
|
125
|
+
|
126
|
+
readonly SWC: "swc";
|
127
|
+
/** style-loader */
|
128
|
+
|
129
|
+
readonly STYLE: "style-loader";
|
130
|
+
/** postcss-loader */
|
131
|
+
|
132
|
+
readonly POSTCSS: "postcss";
|
133
|
+
/** markdown-loader */
|
134
|
+
|
135
|
+
readonly MARKDOWN: "markdown";
|
136
|
+
/** ignore-css-loader */
|
137
|
+
|
138
|
+
readonly IGNORE_CSS: "ignore-css";
|
139
|
+
/** css-modules-typescript-loader */
|
140
|
+
|
141
|
+
readonly CSS_MODULES_TS: "css-modules-typescript";
|
142
|
+
/** mini-css-extract-plugin.loader */
|
143
|
+
|
144
|
+
readonly MINI_CSS_EXTRACT: "mini-css-extract";
|
145
|
+
/** builder-plugin-image-compress.loader */
|
146
|
+
|
147
|
+
readonly IMAGE_COMPRESS: "image-compress";
|
148
|
+
/** builder-plugin-image-compress svgo-loader */
|
149
|
+
|
150
|
+
readonly SVGO: "svgo";
|
151
|
+
/** builder-plugin-imagex */
|
152
|
+
|
153
|
+
readonly IMAGEX: "imagex";
|
154
|
+
};
|
155
|
+
/** Predefined plugins */
|
156
|
+
|
157
|
+
readonly PLUGIN: {
|
158
|
+
/** HotModuleReplacementPlugin */
|
159
|
+
readonly HMR: "hmr";
|
160
|
+
/** CopyWebpackPlugin */
|
161
|
+
|
162
|
+
readonly COPY: "copy";
|
163
|
+
/** HtmlWebpackPlugin */
|
164
|
+
|
165
|
+
readonly HTML: "html";
|
166
|
+
/** DefinePlugin */
|
167
|
+
|
168
|
+
readonly DEFINE: "define";
|
169
|
+
/** IgnorePlugin */
|
170
|
+
|
171
|
+
readonly IGNORE: "ignore";
|
172
|
+
/** BannerPlugin */
|
173
|
+
|
174
|
+
readonly BANNER: "banner";
|
175
|
+
/** Webpackbar */
|
176
|
+
|
177
|
+
readonly PROGRESS: "progress";
|
178
|
+
/** Inspector */
|
179
|
+
|
180
|
+
readonly INSPECTOR: "inspector";
|
181
|
+
/** AppIconPlugin */
|
182
|
+
|
183
|
+
readonly APP_ICON: "app-icon";
|
184
|
+
/** LoadableWebpackPlugin */
|
185
|
+
|
186
|
+
readonly LOADABLE: "loadable";
|
187
|
+
/** WebpackManifestPlugin */
|
188
|
+
|
189
|
+
readonly MANIFEST: "webpack-manifest";
|
190
|
+
/** ForkTsCheckerWebpackPlugin */
|
191
|
+
|
192
|
+
readonly TS_CHECKER: "ts-checker";
|
193
|
+
/** InlineChunkHtmlPlugin */
|
194
|
+
|
195
|
+
readonly INLINE_HTML: "inline-html";
|
196
|
+
/** WebpackBundleAnalyzer */
|
197
|
+
|
198
|
+
readonly BUNDLE_ANALYZER: "bundle-analyze";
|
199
|
+
/** BottomTemplatePlugin */
|
200
|
+
|
201
|
+
readonly BOTTOM_TEMPLATE: "bottom-template";
|
202
|
+
/** HtmlCrossOriginPlugin */
|
203
|
+
|
204
|
+
readonly HTML_CROSS_ORIGIN: "html-cross-origin";
|
205
|
+
/** MiniCssExtractPlugin */
|
206
|
+
|
207
|
+
readonly MINI_CSS_EXTRACT: "mini-css-extract";
|
208
|
+
/** ReactFastRefreshPlugin */
|
209
|
+
|
210
|
+
readonly REACT_FAST_REFRESH: "react-fast-refresh";
|
211
|
+
/** ProvidePlugin for node polyfill */
|
212
|
+
|
213
|
+
readonly NODE_POLYFILL_PROVIDE: "node-polyfill-provide";
|
214
|
+
/** WebpackSRIPlugin */
|
215
|
+
|
216
|
+
readonly SUBRESOURCE_INTEGRITY: "subresource-integrity";
|
217
|
+
/** WebpackAssetsRetryPlugin */
|
218
|
+
|
219
|
+
readonly ASSETS_RETRY: "ASSETS_RETRY";
|
220
|
+
/** AutoSetRootFontSizePlugin */
|
221
|
+
|
222
|
+
readonly AUTO_SET_ROOT_SIZE: "auto-set-root-size";
|
223
|
+
/** HtmlAsyncChunkPlugin */
|
224
|
+
|
225
|
+
readonly HTML_ASYNC_CHUNK: "html-async-chunk";
|
226
|
+
/** SWC_POLYFILL_CHECKER */
|
227
|
+
|
228
|
+
readonly SWC_POLYFILL_CHECKER: "swc-polyfill-checker-plugin";
|
229
|
+
/** HtmlTagsPlugin */
|
230
|
+
|
231
|
+
readonly HTML_TAGS: "html-tags";
|
232
|
+
};
|
233
|
+
/** Predefined minimizers */
|
234
|
+
|
235
|
+
readonly MINIMIZER: {
|
236
|
+
/** TerserWebpackPlugin */
|
237
|
+
readonly JS: "js";
|
238
|
+
/** CssMinimizerWebpackPlugin */
|
239
|
+
|
240
|
+
readonly CSS: "css";
|
241
|
+
/** ESBuildPlugin */
|
242
|
+
|
243
|
+
readonly ESBUILD: "js-css";
|
244
|
+
/** SWCPlugin */
|
245
|
+
|
246
|
+
readonly SWC: "swc";
|
247
|
+
};
|
248
|
+
/** Predefined resolve plugins */
|
249
|
+
|
250
|
+
readonly RESOLVE_PLUGIN: {
|
251
|
+
/** ModuleScopePlugin */
|
252
|
+
readonly MODULE_SCOPE: "module-scope";
|
253
|
+
/** TsConfigPathsPlugin */
|
254
|
+
|
255
|
+
readonly TS_CONFIG_PATHS: "ts-config-paths";
|
256
|
+
};
|
185
257
|
};
|
186
|
-
export type ChainIdentifier = typeof CHAIN_ID;
|
258
|
+
export declare type ChainIdentifier = typeof CHAIN_ID;
|