@unstoppabledomains/resolution
Advanced tools
Comparing version 1.3.0 to 1.3.1
@@ -91,3 +91,3 @@ "use strict"; | ||
if (process.env.UNSTOPPABLE_RESOLUTION_URL) | ||
return signedInfuraLink(process.env.UNSTOPPABLE_RESOLUTION_URL); | ||
return process.env.UNSTOPPABLE_RESOLUTION_URL; | ||
} | ||
@@ -98,5 +98,5 @@ else { | ||
if (configObject.type === 'url') | ||
return 'url'; | ||
return configObject.value; | ||
} | ||
throw new Error("Couldn't find any configurate\n\tUse -C to configurate the library"); | ||
throw new Error("Couldn't find any configurations\n\tUse -C to configurate the library"); | ||
} | ||
@@ -115,3 +115,3 @@ exports.getEtheriumUrl = getEtheriumUrl; | ||
var words = value.split(':'); | ||
return { type: words[0], value: words[1] }; | ||
return { type: words[0], value: words.slice(1).join(':') }; | ||
} | ||
@@ -118,0 +118,0 @@ exports.parseConfig = parseConfig; |
@@ -46,2 +46,9 @@ "use strict"; | ||
var types_1 = require("./types"); | ||
try { | ||
var dotenv = require('dotenv'); | ||
dotenv.config(); | ||
} | ||
catch (err) { | ||
console.warn('dotenv is not installed'); | ||
} | ||
var labelDomain = 'reseller-test-braden-6.crypto'; | ||
@@ -48,0 +55,0 @@ var resolution; |
@@ -55,2 +55,9 @@ "use strict"; | ||
var resolution; | ||
try { | ||
var dotenv = require('dotenv'); | ||
dotenv.config(); | ||
} | ||
catch (err) { | ||
console.warn('dotenv is not installed'); | ||
} | ||
beforeEach(function () { | ||
@@ -175,9 +182,15 @@ nock_1.default.cleanAll(); | ||
it('resolves .kred name using ENS blockchain', function () { return __awaiter(void 0, void 0, void 0, function () { | ||
var result; | ||
var eyes, result; | ||
return __generator(this, function (_a) { | ||
switch (_a.label) { | ||
case 0: return [4 /*yield*/, resolution.address('brantly.kred', 'ETH')]; | ||
case 0: | ||
eyes = testHelpers_1.mockAsyncMethods(resolution.ens, { | ||
getResolver: "0x226159d592E2b063810a10Ebf6dcbADA94Ed68b8", | ||
callMethod: "0x96184444629F3489c4dE199871E6F99568229d8f" | ||
}); | ||
return [4 /*yield*/, resolution.address('brantly.kred', 'ETH')]; | ||
case 1: | ||
result = _a.sent(); | ||
expect(result).toEqual('0x8E217c639099F85F3CA3B5ACF032f7232c32F188'); | ||
testHelpers_1.expectSpyToBeCalled(eyes); | ||
expect(result).toEqual('0x96184444629F3489c4dE199871E6F99568229d8f'); | ||
return [2 /*return*/]; | ||
@@ -184,0 +197,0 @@ } |
@@ -6,4 +6,2 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var dotenv_1 = __importDefault(require("dotenv")); | ||
dotenv_1.default.config(); | ||
var Resolution_1 = __importDefault(require("./Resolution")); | ||
@@ -10,0 +8,0 @@ exports.Resolution = Resolution_1.default; |
@@ -46,2 +46,5 @@ export declare const name: string; | ||
export declare const homepage: string; | ||
export declare namespace optionalDependencies { | ||
export const dotenv: string; | ||
} | ||
export declare const devDependencies: { | ||
@@ -80,3 +83,2 @@ "@types/jest": string; | ||
"content-hash": string; | ||
"dotenv": string; | ||
"hash.js": string; | ||
@@ -83,0 +85,0 @@ "js-sha3": string; |
{ | ||
"name": "@unstoppabledomains/resolution", | ||
"version": "1.2.2", | ||
"version": "1.3.0", | ||
"description": "Domain Resolution for blockchain domains", | ||
@@ -49,2 +49,5 @@ "main": "./build/index.js", | ||
"homepage": "https://github.com/unstoppabledomains/resolution.git#readme", | ||
"optionalDependencies": { | ||
"dotenv": "^8.2.0" | ||
}, | ||
"devDependencies": { | ||
@@ -83,3 +86,2 @@ "@types/jest": "24.0.23", | ||
"content-hash": "^2.5.2", | ||
"dotenv": "^8.2.0", | ||
"hash.js": "^1.1.7", | ||
@@ -86,0 +88,0 @@ "js-sha3": "^0.8.0", |
@@ -54,2 +54,9 @@ "use strict"; | ||
var node_fetch_1 = __importDefault(require("node-fetch")); | ||
try { | ||
var dotenv = require('dotenv'); | ||
dotenv.config(); | ||
} | ||
catch (err) { | ||
console.warn('dotenv is not installed'); | ||
} | ||
beforeEach(function () { | ||
@@ -56,0 +63,0 @@ nock_1.default.cleanAll(); |
@@ -69,3 +69,3 @@ export declare type Dictionary<T> = { | ||
addresses: { | ||
[key: string]: string | undefined; | ||
[key: string]: string; | ||
}; | ||
@@ -72,0 +72,0 @@ meta: { |
@@ -99,3 +99,3 @@ "use strict"; | ||
case 5: | ||
expect(true).toBeFalsy(); | ||
fail("Expected resolution error to be thrown but wasn't"); | ||
return [2 /*return*/]; | ||
@@ -102,0 +102,0 @@ } |
@@ -0,6 +1,9 @@ | ||
## Unreleased | ||
* fixed command line interface configuration with url | ||
## 1.3.0 | ||
* Add support for .kred domains on ENS | ||
* Add support for .kred domains on ENS | ||
## 1.2.0 | ||
* Added a command line interface | ||
* Added a command line interface | ||
@@ -7,0 +10,0 @@ ## 1.1.0 |
{ | ||
"name": "@unstoppabledomains/resolution", | ||
"version": "1.3.0", | ||
"version": "1.3.1", | ||
"description": "Domain Resolution for blockchain domains", | ||
@@ -49,2 +49,5 @@ "main": "./build/index.js", | ||
"homepage": "https://github.com/unstoppabledomains/resolution.git#readme", | ||
"optionalDependencies": { | ||
"dotenv": "^8.2.0" | ||
}, | ||
"devDependencies": { | ||
@@ -83,3 +86,2 @@ "@types/jest": "24.0.23", | ||
"content-hash": "^2.5.2", | ||
"dotenv": "^8.2.0", | ||
"hash.js": "^1.1.7", | ||
@@ -86,0 +88,0 @@ "js-sha3": "^0.8.0", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
489261
95
12243
- Removeddotenv@^8.2.0