did-resolver
Advanced tools
Comparing version 3.1.4 to 3.1.5
@@ -0,1 +1,8 @@ | ||
## [3.1.5](https://github.com/decentralized-identity/did-resolver/compare/3.1.4...3.1.5) (2021-12-09) | ||
### Bug Fixes | ||
* use Resolvable as type instead of Resolver ([#110](https://github.com/decentralized-identity/did-resolver/issues/110)) ([35c4d67](https://github.com/decentralized-identity/did-resolver/commit/35c4d67e5750338983a89c125f424d7d039aaf68)), closes [#109](https://github.com/decentralized-identity/did-resolver/issues/109) | ||
## [3.1.4](https://github.com/decentralized-identity/did-resolver/compare/3.1.3...3.1.4) (2021-12-04) | ||
@@ -2,0 +9,0 @@ |
@@ -84,9 +84,7 @@ export declare type Extensible = Record<string, any>; | ||
} | ||
export declare type DIDResolver = (did: string, parsed: ParsedDID, resolver: Resolver, options: DIDResolutionOptions) => Promise<DIDResolutionResult>; | ||
export declare type DIDResolver = (did: string, parsed: ParsedDID, resolver: Resolvable, options: DIDResolutionOptions) => Promise<DIDResolutionResult>; | ||
export declare type WrappedResolver = () => Promise<DIDResolutionResult>; | ||
export declare type DIDCache = (parsed: ParsedDID, resolve: WrappedResolver) => Promise<DIDResolutionResult>; | ||
export declare type LegacyDIDResolver = (did: string, parsed: ParsedDID, resolver: Resolver) => Promise<DIDDocument>; | ||
export interface ResolverRegistry { | ||
[index: string]: DIDResolver; | ||
} | ||
export declare type LegacyDIDResolver = (did: string, parsed: ParsedDID, resolver: Resolvable) => Promise<DIDDocument>; | ||
export declare type ResolverRegistry = Record<string, DIDResolver>; | ||
export interface LegacyResolverRegistry { | ||
@@ -103,5 +101,5 @@ [index: string]: LegacyDIDResolver; | ||
export declare function wrapLegacyResolver(resolve: LegacyDIDResolver): DIDResolver; | ||
export declare type Resolvable = { | ||
export interface Resolvable { | ||
resolve: (didUrl: string, options?: DIDResolutionOptions) => Promise<DIDResolutionResult>; | ||
}; | ||
} | ||
export declare class Resolver implements Resolvable { | ||
@@ -108,0 +106,0 @@ private registry; |
@@ -108,3 +108,3 @@ // Copyright 2018 Consensys AG | ||
didDocument: doc | ||
}; | ||
}; // eslint-disable-next-line @typescript-eslint/no-explicit-any | ||
}); | ||
@@ -111,0 +111,0 @@ }, function (e) { |
@@ -95,3 +95,3 @@ function _extends() { | ||
didDocument: doc | ||
}); | ||
}); // eslint-disable-next-line @typescript-eslint/no-explicit-any | ||
} catch (e) { | ||
@@ -98,0 +98,0 @@ return _extends({}, EMPTY_RESULT, { |
@@ -108,3 +108,3 @@ // Copyright 2018 Consensys AG | ||
didDocument: doc | ||
}; | ||
}; // eslint-disable-next-line @typescript-eslint/no-explicit-any | ||
}); | ||
@@ -111,0 +111,0 @@ }, function (e) { |
@@ -113,3 +113,3 @@ (function (global, factory) { | ||
didDocument: doc | ||
}; | ||
}; // eslint-disable-next-line @typescript-eslint/no-explicit-any | ||
}); | ||
@@ -116,0 +116,0 @@ }, function (e) { |
{ | ||
"name": "did-resolver", | ||
"version": "3.1.4", | ||
"version": "3.1.5", | ||
"description": "Resolve DID documents", | ||
@@ -5,0 +5,0 @@ "source": "src/resolver.ts", |
@@ -119,3 +119,3 @@ // Copyright 2018 Consensys AG | ||
parsed: ParsedDID, | ||
resolver: Resolver, | ||
resolver: Resolvable, | ||
options: DIDResolutionOptions | ||
@@ -125,7 +125,5 @@ ) => Promise<DIDResolutionResult> | ||
export type DIDCache = (parsed: ParsedDID, resolve: WrappedResolver) => Promise<DIDResolutionResult> | ||
export type LegacyDIDResolver = (did: string, parsed: ParsedDID, resolver: Resolver) => Promise<DIDDocument> | ||
export type LegacyDIDResolver = (did: string, parsed: ParsedDID, resolver: Resolvable) => Promise<DIDDocument> | ||
export interface ResolverRegistry { | ||
[index: string]: DIDResolver | ||
} | ||
export type ResolverRegistry = Record<string, DIDResolver> | ||
@@ -171,2 +169,3 @@ export interface LegacyResolverRegistry { | ||
const DID_MATCHER = new RegExp(`^did:${METHOD}:${METHOD_ID}${PARAMS}${PATH}${QUERY}${FRAGMENT}$`) | ||
export function parse(didUrl: string): ParsedDID | null { | ||
@@ -213,2 +212,3 @@ if (didUrl === '' || !didUrl) return null | ||
} | ||
// eslint-disable-next-line @typescript-eslint/no-explicit-any | ||
} catch (e: any) { | ||
@@ -226,3 +226,3 @@ return { | ||
export type Resolvable = { | ||
export interface Resolvable { | ||
resolve: (didUrl: string, options?: DIDResolutionOptions) => Promise<DIDResolutionResult> | ||
@@ -229,0 +229,0 @@ } |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
123347
1378