Browser and node testing works again.
This commit is contained in:
parent
e3752e5986
commit
4470477d7f
@ -12,9 +12,13 @@ const output = `"use strict";
|
|||||||
|
|
||||||
import * as ethers from "./ethers";
|
import * as ethers from "./ethers";
|
||||||
|
|
||||||
if ((<any>global)._ethers == null) {
|
try {
|
||||||
(<any>global)._ethers = ethers;
|
const anyGlobal = (window as any);
|
||||||
}
|
|
||||||
|
if (anyGlobal._ethers == null) {
|
||||||
|
anyGlobal._ethers = ethers;
|
||||||
|
}
|
||||||
|
} catch (error) { }
|
||||||
|
|
||||||
export { ethers };
|
export { ethers };
|
||||||
|
|
||||||
|
24
karma-esm.conf.js
Normal file
24
karma-esm.conf.js
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
"use strict";
|
||||||
|
|
||||||
|
module.exports = function(config) {
|
||||||
|
config.set({
|
||||||
|
frameworks: [ 'mocha' ],
|
||||||
|
files: [
|
||||||
|
{ pattern: "./packages/ethers/dist/ethers-all.esm.min.js", type: "module" },
|
||||||
|
{ pattern: "./packages/tests/dist/tests.esm.js", type: "module" }
|
||||||
|
],
|
||||||
|
reporters: [ 'progress' ],
|
||||||
|
port: 9876,
|
||||||
|
logLevel: config.LOG_INFO,
|
||||||
|
browsers: [ 'ChromeHeadless' ],
|
||||||
|
autoWatch: false,
|
||||||
|
singleRun: true,
|
||||||
|
/*
|
||||||
|
client: {
|
||||||
|
mocha: {
|
||||||
|
grep: 'utf',
|
||||||
|
}
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
})
|
||||||
|
}
|
24
karma-umd.conf.js
Normal file
24
karma-umd.conf.js
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
"use strict";
|
||||||
|
|
||||||
|
module.exports = function(config) {
|
||||||
|
config.set({
|
||||||
|
frameworks: [ 'mocha' ],
|
||||||
|
files: [
|
||||||
|
"./packages/ethers/dist/ethers-all.umd.min.js",
|
||||||
|
"./packages/tests/dist/tests.umd.js",
|
||||||
|
],
|
||||||
|
reporters: [ 'progress' ],
|
||||||
|
port: 9876,
|
||||||
|
logLevel: config.LOG_INFO,
|
||||||
|
browsers: [ 'ChromeHeadless' ],
|
||||||
|
autoWatch: false,
|
||||||
|
singleRun: true,
|
||||||
|
/*
|
||||||
|
client: {
|
||||||
|
mocha: {
|
||||||
|
grep: 'utf',
|
||||||
|
}
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
})
|
||||||
|
}
|
52
package.json
52
package.json
@ -9,12 +9,19 @@
|
|||||||
"auto-build": "node ./admin/cmds/reset-build.js && npm run build -- -w",
|
"auto-build": "node ./admin/cmds/reset-build.js && npm run build -- -w",
|
||||||
"bootstrap": "node ./admin/cmds/reset-build.js && node ./admin/cmds/update-depgraph && lerna bootstrap --hoist",
|
"bootstrap": "node ./admin/cmds/reset-build.js && node ./admin/cmds/update-depgraph && lerna bootstrap --hoist",
|
||||||
"build": "tsc --build ./tsconfig.project.json",
|
"build": "tsc --build ./tsconfig.project.json",
|
||||||
"build-cjs": "node ./admin/cmds/set-option cjs && npm run build",
|
|
||||||
"build-esm": "node ./admin/cmds/set-option esm && npm run build",
|
"_build-cjs": "node ./admin/cmds/set-option cjs && npm run build",
|
||||||
"build-all": "npm run build-esm && npm run build-cjs",
|
"_build-esm": "node ./admin/cmds/set-option esm && npm run build",
|
||||||
|
"_dist-min-all": "node ./admin/cmds/set-option.js browser-lang-all && rollup -c --configMinify && rollup -c --configMinify --configModule && mv ./packages/ethers/dist/ethers.umd.min.js ./packages/ethers/dist/ethers-all.umd.min.js && mv ./packages/ethers/dist/ethers.esm.min.js ./packages/ethers/dist/ethers-all.esm.min.js",
|
||||||
|
"_dist-min-en": "node ./admin/cmds/set-option.js browser-lang-en && rollup -c --configMinify && rollup -c --configMinify --configModule",
|
||||||
|
"_dist": "npm run _dist-min-all && npm run _dist-min-en && rollup -c && rollup -c --configModule",
|
||||||
|
"build-all": "node ./admin/cmds/update-exports.js && npm run _build-esm && npm run _build-cjs && npm run _dist",
|
||||||
|
|
||||||
"clean": "node ./admin/cmds/reset-build.js && tsc --build --clean ./tsconfig.project.json",
|
"clean": "node ./admin/cmds/reset-build.js && tsc --build --clean ./tsconfig.project.json",
|
||||||
"_dist_prepare": "npm run clean && npm run bootstrap && npm run build && node ./admin/cmds/update-exports.js",
|
|
||||||
"_dist_ethers": "npm run _distMinLangAll && npm run _distMinLangEn && rollup -c && rollup -c --configModule",
|
"_dist_ethers": "npm run _distMinLangAll && npm run _distMinLangEn && rollup -c && rollup -c --configModule",
|
||||||
|
|
||||||
|
"_dist_prepare": "npm run clean && npm run bootstrap && npm run build && node ./admin/cmds/update-exports.js",
|
||||||
"_dist_tests": "rollup -c --configTest && rollup -c --configTest --configMinify && rollup -c --configTest --configModule && rollup -c --configTest --configModule --configMinify",
|
"_dist_tests": "rollup -c --configTest && rollup -c --configTest --configMinify && rollup -c --configTest --configModule && rollup -c --configTest --configModule --configMinify",
|
||||||
"_test_prepare": "npm run _dist_prepare && npm run _dist_tests",
|
"_test_prepare": "npm run _dist_prepare && npm run _dist_tests",
|
||||||
"_test_node": "cd packages/tests && mocha --no-colors --reporter ./reporter ./lib/test-*.js",
|
"_test_node": "cd packages/tests && mocha --no-colors --reporter ./reporter ./lib/test-*.js",
|
||||||
@ -26,16 +33,22 @@
|
|||||||
"old-test-phantomjs": "cd packages/tests && npm run dist-phantomjs && phantomjs --web-security=false ../../node_modules/mocha-phantomjs-core/mocha-phantomjs-core.js ./test.html ./tests/reporter.js",
|
"old-test-phantomjs": "cd packages/tests && npm run dist-phantomjs && phantomjs --web-security=false ../../node_modules/mocha-phantomjs-core/mocha-phantomjs-core.js ./test.html ./tests/reporter.js",
|
||||||
"old-test-aion": "npm run dist && npm run test-aion-node",
|
"old-test-aion": "npm run dist && npm run test-aion-node",
|
||||||
"old-test-aion-node": "cd packages/aion-tests && mocha --no-colors --reporter ../tests/tests/reporter ./tests/test-*.js",
|
"old-test-aion-node": "cd packages/aion-tests && mocha --no-colors --reporter ../tests/tests/reporter ./tests/test-*.js",
|
||||||
"update-versions": "npm run _dist_prepare && node ./admin/cmds/update-versions",
|
|
||||||
"publish-all": "node ./admin/cmds/publish",
|
"_dist-tests-esm": "rollup -c rollup-tests.config.js --configModule",
|
||||||
"_distMinLangAll": "node ./admin/cmds/set-option.js browser-lang-all && rollup -c --configMinify && rollup -c --configMinify --configModule && mv ./packages/ethers/dist/ethers.umd.min.js ./packages/ethers/dist/ethers-all.umd.min.js && mv ./packages/ethers/dist/ethers.esm.min.js ./packages/ethers/dist/ethers-all.esm.min.js",
|
"_dist-test-umd": "rollup -c rollup-tests.config.js",
|
||||||
"_distMinLangEn": "node ./admin/cmds/set-option.js browser-lang-en && rollup -c --configMinify && rollup -c --configMinify --configModule",
|
"_test-browser-umd": "karma start --single-run --browsers ChromeHeadless karma-umd.conf.js",
|
||||||
"_dist": "npm run build-all && npm run _distMinLangAll && npm run _distMinLangEn && rollup -c && rollup -c --configModule",
|
"_test-browser-esm": "karma start --single-run --browsers ChromeHeadless karma-esm.conf.js",
|
||||||
"_distTestBrowserEsm": "rollup -c rollup-tests.config.js --configModule",
|
"_test-node": "mocha --no-colors --reporter ./packages/tests/reporter ./packages/tests/lib/test-*.js",
|
||||||
"_distTestBrowserUmd": "rollup -c rollup-tests.config.js",
|
"test-browser-umd": "npm run build-all && npm run _dist-test-umd && npm run _test-browser-umd",
|
||||||
"_distTestBrowser": "npm run _distTestBrowserEsm && npm run _distTestBrowserUmd",
|
"test-browser-esm": "npm run build-all && npm run _dist-test-esm && npm run _test-browser-esm",
|
||||||
|
"test-node": "npm run build-all && npm run _test-node",
|
||||||
|
"test": "if [ \"$TEST\" == \"\" ]; then npm run test-node; else npm run \"test-$TEST\"; fi",
|
||||||
|
|
||||||
"lock-versions": "node ./admin/cmds/lock-versions",
|
"lock-versions": "node ./admin/cmds/lock-versions",
|
||||||
"build-docs": "flatworm docs.wrm docs",
|
"build-docs": "flatworm docs.wrm docs",
|
||||||
|
|
||||||
|
"update-versions": "npm run _dist_prepare && node ./admin/cmds/update-versions",
|
||||||
|
"publish-all": "node ./admin/cmds/publish",
|
||||||
"sync-github": "node ./admin/cmds/cache-github"
|
"sync-github": "node ./admin/cmds/cache-github"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
@ -45,15 +58,14 @@
|
|||||||
"aes-js": "3.0.0",
|
"aes-js": "3.0.0",
|
||||||
"browserify": "16.2.3",
|
"browserify": "16.2.3",
|
||||||
"diff": "4.0.1",
|
"diff": "4.0.1",
|
||||||
"npm-packlist": "1.4.1",
|
"karma": "4.4.1",
|
||||||
|
"karma-chrome-launcher": "3.1.0",
|
||||||
|
"karma-mocha": "1.3.0",
|
||||||
"lerna": "^3.13.0",
|
"lerna": "^3.13.0",
|
||||||
"libnpm": "2.0.1",
|
"libnpm": "2.0.1",
|
||||||
"mocha": "^5.2.0",
|
"mocha": "^5.2.0",
|
||||||
"mocha-phantomjs-core": "2.1.2",
|
"mocha-phantomjs-core": "2.1.2",
|
||||||
"scrypt-js": "3.0.0",
|
"npm-packlist": "1.4.1",
|
||||||
"semver": "^5.6.0",
|
|
||||||
"tar": "4.4.8",
|
|
||||||
"typescript": "3.6.2",
|
|
||||||
"rollup": "1.20.1",
|
"rollup": "1.20.1",
|
||||||
"rollup-plugin-node-builtins": "2.1.2",
|
"rollup-plugin-node-builtins": "2.1.2",
|
||||||
"rollup-plugin-commonjs": "10.0.2",
|
"rollup-plugin-commonjs": "10.0.2",
|
||||||
@ -62,6 +74,10 @@
|
|||||||
"rollup-plugin-node-resolve": "5.2.0",
|
"rollup-plugin-node-resolve": "5.2.0",
|
||||||
"rollup-plugin-terser": "5.1.1",
|
"rollup-plugin-terser": "5.1.1",
|
||||||
"rollup-plugin-uglify": "6.0.2",
|
"rollup-plugin-uglify": "6.0.2",
|
||||||
"rollup-pluginutils": "2.8.1"
|
"rollup-pluginutils": "2.8.1",
|
||||||
|
"scrypt-js": "3.0.0",
|
||||||
|
"semver": "^5.6.0",
|
||||||
|
"tar": "4.4.8",
|
||||||
|
"typescript": "3.6.2"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
2
packages/ethers/dist/ethers-all.esm.min.js
vendored
2
packages/ethers/dist/ethers-all.esm.min.js
vendored
File diff suppressed because one or more lines are too long
2
packages/ethers/dist/ethers-all.umd.min.js
vendored
2
packages/ethers/dist/ethers-all.umd.min.js
vendored
File diff suppressed because one or more lines are too long
23
packages/ethers/dist/ethers.esm.js
vendored
23
packages/ethers/dist/ethers.esm.js
vendored
@ -12568,13 +12568,18 @@ var Wordlist = /** @class */ (function () {
|
|||||||
name = lang.locale;
|
name = lang.locale;
|
||||||
}
|
}
|
||||||
if (exportWordlist) {
|
if (exportWordlist) {
|
||||||
var g = commonjsGlobal;
|
try {
|
||||||
if (g._ethers && g._ethers.wordlists) {
|
var anyGlobal = window;
|
||||||
if (!g._ethers.wordlists[name]) {
|
if (anyGlobal._ethers && anyGlobal._ethers.wordlists) {
|
||||||
lib_esm$2.defineReadOnly(g._ethers.wordlists, name, lang);
|
if (!anyGlobal._ethers.wordlists[name]) {
|
||||||
|
lib_esm$2.defineReadOnly(anyGlobal._ethers.wordlists, name, lang);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
catch (error) {
|
||||||
|
console.log("FOOBAR2", error);
|
||||||
|
}
|
||||||
|
}
|
||||||
};
|
};
|
||||||
return Wordlist;
|
return Wordlist;
|
||||||
}());
|
}());
|
||||||
@ -18980,8 +18985,14 @@ var ethers = /*#__PURE__*/Object.freeze({
|
|||||||
});
|
});
|
||||||
|
|
||||||
"use strict";
|
"use strict";
|
||||||
if (global._ethers == null) {
|
try {
|
||||||
global._ethers = ethers;
|
const anyGlobal = window;
|
||||||
|
if (anyGlobal._ethers == null) {
|
||||||
|
anyGlobal._ethers = ethers;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (error) {
|
||||||
|
console.log("FOOBAR", error);
|
||||||
}
|
}
|
||||||
|
|
||||||
export { BigNumber, Contract, ContractFactory, FixedNumber, Signer, VoidSigner, Wallet, browser_1$2 as Wordlist, index$1 as constants, errors, ethers, getDefaultProvider, logger$A as logger, index$2 as providers, utils$1 as utils, version$l as version, browser_2$1 as wordlists };
|
export { BigNumber, Contract, ContractFactory, FixedNumber, Signer, VoidSigner, Wallet, browser_1$2 as Wordlist, index$1 as constants, errors, ethers, getDefaultProvider, logger$A as logger, index$2 as providers, utils$1 as utils, version$l as version, browser_2$1 as wordlists };
|
||||||
|
2
packages/ethers/dist/ethers.esm.min.js
vendored
2
packages/ethers/dist/ethers.esm.min.js
vendored
File diff suppressed because one or more lines are too long
23
packages/ethers/dist/ethers.umd.js
vendored
23
packages/ethers/dist/ethers.umd.js
vendored
@ -13637,13 +13637,18 @@
|
|||||||
name = lang.locale;
|
name = lang.locale;
|
||||||
}
|
}
|
||||||
if (exportWordlist) {
|
if (exportWordlist) {
|
||||||
var g = commonjsGlobal;
|
try {
|
||||||
if (g._ethers && g._ethers.wordlists) {
|
var anyGlobal = window;
|
||||||
if (!g._ethers.wordlists[name]) {
|
if (anyGlobal._ethers && anyGlobal._ethers.wordlists) {
|
||||||
lib$3.defineReadOnly(g._ethers.wordlists, name, lang);
|
if (!anyGlobal._ethers.wordlists[name]) {
|
||||||
|
lib$3.defineReadOnly(anyGlobal._ethers.wordlists, name, lang);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
catch (error) {
|
||||||
|
console.log("FOOBAR2", error);
|
||||||
|
}
|
||||||
|
}
|
||||||
};
|
};
|
||||||
return Wordlist;
|
return Wordlist;
|
||||||
}());
|
}());
|
||||||
@ -21480,8 +21485,14 @@
|
|||||||
// To modify this file, you must update ./admin/cmds/update-exports.js
|
// To modify this file, you must update ./admin/cmds/update-exports.js
|
||||||
var ethers$1 = __importStar(ethers);
|
var ethers$1 = __importStar(ethers);
|
||||||
exports.ethers = ethers$1;
|
exports.ethers = ethers$1;
|
||||||
if (commonjsGlobal._ethers == null) {
|
try {
|
||||||
commonjsGlobal._ethers = ethers$1;
|
var anyGlobal = window;
|
||||||
|
if (anyGlobal._ethers == null) {
|
||||||
|
anyGlobal._ethers = ethers$1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (error) {
|
||||||
|
console.log("FOOBAR", error);
|
||||||
}
|
}
|
||||||
var ethers_1 = ethers;
|
var ethers_1 = ethers;
|
||||||
exports.Signer = ethers_1.Signer;
|
exports.Signer = ethers_1.Signer;
|
||||||
|
2
packages/ethers/dist/ethers.umd.min.js
vendored
2
packages/ethers/dist/ethers.umd.min.js
vendored
File diff suppressed because one or more lines are too long
@ -1,8 +1,14 @@
|
|||||||
"use strict";
|
"use strict";
|
||||||
// To modify this file, you must update ./admin/cmds/update-exports.js
|
// To modify this file, you must update ./admin/cmds/update-exports.js
|
||||||
import * as ethers from "./ethers";
|
import * as ethers from "./ethers";
|
||||||
if (global._ethers == null) {
|
try {
|
||||||
global._ethers = ethers;
|
const anyGlobal = window;
|
||||||
|
if (anyGlobal._ethers == null) {
|
||||||
|
anyGlobal._ethers = ethers;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (error) {
|
||||||
|
console.log("FOOBAR", error);
|
||||||
}
|
}
|
||||||
export { ethers };
|
export { ethers };
|
||||||
export { Signer, Wallet, VoidSigner, getDefaultProvider, providers, Contract, ContractFactory, BigNumber, FixedNumber, constants, errors, logger, utils, wordlists,
|
export { Signer, Wallet, VoidSigner, getDefaultProvider, providers, Contract, ContractFactory, BigNumber, FixedNumber, constants, errors, logger, utils, wordlists,
|
||||||
|
@ -10,8 +10,14 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|||||||
// To modify this file, you must update ./admin/cmds/update-exports.js
|
// To modify this file, you must update ./admin/cmds/update-exports.js
|
||||||
var ethers = __importStar(require("./ethers"));
|
var ethers = __importStar(require("./ethers"));
|
||||||
exports.ethers = ethers;
|
exports.ethers = ethers;
|
||||||
if (global._ethers == null) {
|
try {
|
||||||
global._ethers = ethers;
|
var anyGlobal = window;
|
||||||
|
if (anyGlobal._ethers == null) {
|
||||||
|
anyGlobal._ethers = ethers;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (error) {
|
||||||
|
console.log("FOOBAR", error);
|
||||||
}
|
}
|
||||||
var ethers_1 = require("./ethers");
|
var ethers_1 = require("./ethers");
|
||||||
exports.Signer = ethers_1.Signer;
|
exports.Signer = ethers_1.Signer;
|
||||||
|
@ -4,8 +4,14 @@
|
|||||||
|
|
||||||
import * as ethers from "./ethers";
|
import * as ethers from "./ethers";
|
||||||
|
|
||||||
if ((<any>global)._ethers == null) {
|
try {
|
||||||
(<any>global)._ethers = ethers;
|
const anyGlobal = (window as any);
|
||||||
|
|
||||||
|
if (anyGlobal._ethers == null) {
|
||||||
|
anyGlobal._ethers = ethers;
|
||||||
|
}
|
||||||
|
} catch (error) {
|
||||||
|
console.log("FOOBAR", error);
|
||||||
}
|
}
|
||||||
|
|
||||||
export { ethers };
|
export { ethers };
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
'use strict';
|
'use strict';
|
||||||
console.log("Using global.ethers");
|
console.log("Using global.ethers");
|
||||||
const anyGlobal = window;
|
const anyGlobal = window;
|
||||||
const ethers = anyGlobal.ethers;
|
const ethers = anyGlobal._ethers;
|
||||||
export { ethers };
|
export { ethers };
|
||||||
|
@ -2,5 +2,5 @@
|
|||||||
Object.defineProperty(exports, "__esModule", { value: true });
|
Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
console.log("Using global.ethers");
|
console.log("Using global.ethers");
|
||||||
var anyGlobal = window;
|
var anyGlobal = window;
|
||||||
var ethers = anyGlobal.ethers;
|
var ethers = anyGlobal._ethers;
|
||||||
exports.ethers = ethers;
|
exports.ethers = ethers;
|
||||||
|
@ -4,6 +4,6 @@ console.log("Using global.ethers");
|
|||||||
|
|
||||||
const anyGlobal = (window as any);
|
const anyGlobal = (window as any);
|
||||||
|
|
||||||
const ethers = anyGlobal.ethers;
|
const ethers = anyGlobal._ethers;
|
||||||
|
|
||||||
export { ethers }
|
export { ethers }
|
||||||
|
@ -35,12 +35,17 @@ export class Wordlist {
|
|||||||
name = lang.locale;
|
name = lang.locale;
|
||||||
}
|
}
|
||||||
if (exportWordlist) {
|
if (exportWordlist) {
|
||||||
const g = global;
|
try {
|
||||||
if (g._ethers && g._ethers.wordlists) {
|
const anyGlobal = window;
|
||||||
if (!g._ethers.wordlists[name]) {
|
if (anyGlobal._ethers && anyGlobal._ethers.wordlists) {
|
||||||
defineReadOnly(g._ethers.wordlists, name, lang);
|
if (!anyGlobal._ethers.wordlists[name]) {
|
||||||
|
defineReadOnly(anyGlobal._ethers.wordlists, name, lang);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
catch (error) {
|
||||||
|
console.log("FOOBAR2", error);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -37,13 +37,18 @@ var Wordlist = /** @class */ (function () {
|
|||||||
name = lang.locale;
|
name = lang.locale;
|
||||||
}
|
}
|
||||||
if (exportWordlist) {
|
if (exportWordlist) {
|
||||||
var g = global;
|
try {
|
||||||
if (g._ethers && g._ethers.wordlists) {
|
var anyGlobal = window;
|
||||||
if (!g._ethers.wordlists[name]) {
|
if (anyGlobal._ethers && anyGlobal._ethers.wordlists) {
|
||||||
properties_1.defineReadOnly(g._ethers.wordlists, name, lang);
|
if (!anyGlobal._ethers.wordlists[name]) {
|
||||||
|
properties_1.defineReadOnly(anyGlobal._ethers.wordlists, name, lang);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
catch (error) {
|
||||||
|
console.log("FOOBAR2", error);
|
||||||
|
}
|
||||||
|
}
|
||||||
};
|
};
|
||||||
return Wordlist;
|
return Wordlist;
|
||||||
}());
|
}());
|
||||||
|
@ -44,12 +44,14 @@ export abstract class Wordlist {
|
|||||||
static register(lang: Wordlist, name?: string): void {
|
static register(lang: Wordlist, name?: string): void {
|
||||||
if (!name) { name = lang.locale; }
|
if (!name) { name = lang.locale; }
|
||||||
if (exportWordlist) {
|
if (exportWordlist) {
|
||||||
const g: any = (<any>global)
|
try {
|
||||||
if (g._ethers && g._ethers.wordlists) {
|
const anyGlobal = (window as any)
|
||||||
if (!g._ethers.wordlists[name]) {
|
if (anyGlobal._ethers && anyGlobal._ethers.wordlists) {
|
||||||
defineReadOnly(g._ethers.wordlists, name, lang);
|
if (!anyGlobal._ethers.wordlists[name]) {
|
||||||
|
defineReadOnly(anyGlobal._ethers.wordlists, name, lang);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} catch (error) { }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user