evm-chains-info 0.0.30 → 0.0.32
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/evm-chains-info/evm-chains-info.js +1 -2
- package/dist/libevm-chains-info/libevm-chains-info.js +1 -2
- package/evm-chains-info +88 -43
- package/fs-worker.webpack.config.cjs +82 -0
- package/libevm-chains-info +124 -40
- package/package.json +16 -17
- package/webpack.config.cjs +155 -0
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
// SPDX-License-Identifier: AGPL-3.0-or-later
|
|
2
|
+
|
|
3
|
+
/** ---------------------------------------------------------
|
|
4
|
+
* webpack.config.cjs
|
|
5
|
+
* ---------------------------------------------------------
|
|
6
|
+
* Copyright ©
|
|
7
|
+
* Pellegrino Prevete
|
|
8
|
+
* 2024, 2025, 2026
|
|
9
|
+
*
|
|
10
|
+
* All rights reserved
|
|
11
|
+
* ---------------------------------------------------------
|
|
12
|
+
*
|
|
13
|
+
* This program is free software: you can redistribute it and/or
|
|
14
|
+
* modify it under the terms of the GNU General Public License
|
|
15
|
+
* as published by the Free Software Foundation, either
|
|
16
|
+
* version 3 of the License, or (at your option) any later
|
|
17
|
+
* version.
|
|
18
|
+
*
|
|
19
|
+
* This program is distributed in the hope that it will be
|
|
20
|
+
* useful, but WITHOUT ANY WARRANTY; without even the implied
|
|
21
|
+
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
|
22
|
+
* PURPOSE.
|
|
23
|
+
* See the GNU General Public License for more details.
|
|
24
|
+
*
|
|
25
|
+
* You should have received a copy of the
|
|
26
|
+
* GNU General Public License along with this program.
|
|
27
|
+
* If not, see <https://www.gnu.org/licenses/>.
|
|
28
|
+
*/
|
|
29
|
+
|
|
30
|
+
const
|
|
31
|
+
_path =
|
|
32
|
+
require(
|
|
33
|
+
'path');
|
|
34
|
+
const
|
|
35
|
+
_output_dir =
|
|
36
|
+
_path.resolve(
|
|
37
|
+
__dirname);
|
|
38
|
+
const
|
|
39
|
+
_input_file_name =
|
|
40
|
+
`evm-chains-info`;
|
|
41
|
+
const
|
|
42
|
+
_input_file_path =
|
|
43
|
+
`./${_input_file_name}`;
|
|
44
|
+
const
|
|
45
|
+
_output_file_name =
|
|
46
|
+
`${_input_file_name}.js`;
|
|
47
|
+
const
|
|
48
|
+
_output = {
|
|
49
|
+
path:
|
|
50
|
+
_output_dir,
|
|
51
|
+
filename:
|
|
52
|
+
_output_file_name
|
|
53
|
+
};
|
|
54
|
+
const
|
|
55
|
+
_node_fs_ignore =
|
|
56
|
+
{ resourceRegExp:
|
|
57
|
+
/^node:fs$/ };
|
|
58
|
+
const
|
|
59
|
+
_yargs_ignore =
|
|
60
|
+
{ resourceRegExp:
|
|
61
|
+
/^yargs$/ };
|
|
62
|
+
const
|
|
63
|
+
_yargs_helpers_ignore =
|
|
64
|
+
{ resourceRegExp:
|
|
65
|
+
/^yargs\/helpers$/ };
|
|
66
|
+
const
|
|
67
|
+
_webpack =
|
|
68
|
+
require(
|
|
69
|
+
"webpack");
|
|
70
|
+
const
|
|
71
|
+
_ignore_plugin =
|
|
72
|
+
_webpack.IgnorePlugin;
|
|
73
|
+
const
|
|
74
|
+
_node_fs_ignore_plugin =
|
|
75
|
+
new _ignore_plugin(
|
|
76
|
+
_node_fs_ignore);
|
|
77
|
+
const
|
|
78
|
+
_yargs_ignore_plugin =
|
|
79
|
+
new _ignore_plugin(
|
|
80
|
+
_yargs_ignore);
|
|
81
|
+
const
|
|
82
|
+
_yargs_helpers_ignore_plugin =
|
|
83
|
+
new _ignore_plugin(
|
|
84
|
+
_yargs_helpers_ignore);
|
|
85
|
+
module.exports = {
|
|
86
|
+
entry:
|
|
87
|
+
_input_file_path,
|
|
88
|
+
output:
|
|
89
|
+
_output,
|
|
90
|
+
optimization: {
|
|
91
|
+
moduleIds: 'deterministic',
|
|
92
|
+
},
|
|
93
|
+
resolve: {
|
|
94
|
+
alias: {
|
|
95
|
+
"node:fs":
|
|
96
|
+
_path.resolve(
|
|
97
|
+
__dirname,
|
|
98
|
+
'node_modules/opfs/opfs'),
|
|
99
|
+
"evm-chains-info":
|
|
100
|
+
_path.resolve(
|
|
101
|
+
__dirname,
|
|
102
|
+
'./libevm-chains-info'),
|
|
103
|
+
"evm-contracts-tools":
|
|
104
|
+
_path.resolve(
|
|
105
|
+
__dirname,
|
|
106
|
+
'node_modules/evm-contracts-tools/evm-contracts-tools'),
|
|
107
|
+
"evm-wallet":
|
|
108
|
+
_path.resolve(
|
|
109
|
+
__dirname,
|
|
110
|
+
'node_modules/evm-wallet/libevm-wallet'),
|
|
111
|
+
"fs":
|
|
112
|
+
_path.resolve(
|
|
113
|
+
__dirname,
|
|
114
|
+
"node_modules/fs/fs"),
|
|
115
|
+
"path":
|
|
116
|
+
_path.resolve(
|
|
117
|
+
__dirname,
|
|
118
|
+
'node_modules/path/mod.js'),
|
|
119
|
+
"web-worker":
|
|
120
|
+
_path.resolve(
|
|
121
|
+
__dirname,
|
|
122
|
+
'node_modules/web-worker/mod.js'),
|
|
123
|
+
"yargs":
|
|
124
|
+
_path.resolve(
|
|
125
|
+
__dirname,
|
|
126
|
+
'node_modules/yargs/browser.mjs'),
|
|
127
|
+
"yargs/helpers":
|
|
128
|
+
_path.resolve(
|
|
129
|
+
__dirname,
|
|
130
|
+
'node_modules/yargs/helpers/helpers.mjs'),
|
|
131
|
+
"yargs-parser":
|
|
132
|
+
_path.resolve(
|
|
133
|
+
__dirname,
|
|
134
|
+
'node_modules/yargs-parser/browser.mjs'),
|
|
135
|
+
},
|
|
136
|
+
fallback: {
|
|
137
|
+
"utils":
|
|
138
|
+
false,
|
|
139
|
+
"web-worker":
|
|
140
|
+
false,
|
|
141
|
+
"yargs":
|
|
142
|
+
false,
|
|
143
|
+
"yargs/helpers":
|
|
144
|
+
false,
|
|
145
|
+
}
|
|
146
|
+
},
|
|
147
|
+
externals:
|
|
148
|
+
{ yargs:
|
|
149
|
+
'yargs' },
|
|
150
|
+
plugins: [
|
|
151
|
+
_node_fs_ignore_plugin,
|
|
152
|
+
_yargs_ignore_plugin,
|
|
153
|
+
_yargs_helpers_ignore_plugin
|
|
154
|
+
]
|
|
155
|
+
};
|