@hyperlane-xyz/registry 10.8.0 → 10.8.1
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/consts.d.ts +0 -1
- package/dist/consts.js +0 -1
- package/dist/index.d.ts +0 -1
- package/dist/index.js +0 -1
- package/package.json +1 -1
- package/dist/registry/registry-utils.d.ts +0 -3
- package/dist/registry/registry-utils.js +0 -44
package/dist/consts.d.ts
CHANGED
|
@@ -6,4 +6,3 @@ export declare const WARP_ROUTE_SYMBOL_DIRECTORY_REGEX: RegExp;
|
|
|
6
6
|
export declare const WARP_ROUTE_CONFIG_FILE_REGEX: RegExp;
|
|
7
7
|
export declare const WARP_ROUTE_DEPLOY_FILE_REGEX: RegExp;
|
|
8
8
|
export declare const ABACUS_WORKS_DEPLOYER_NAME = "Abacus Works";
|
|
9
|
-
export declare const PROXY_DEPLOYED_URL = "https://proxy.hyperlane.xyz";
|
package/dist/consts.js
CHANGED
|
@@ -6,4 +6,3 @@ export const WARP_ROUTE_SYMBOL_DIRECTORY_REGEX = /warp_routes\/([a-zA-Z0-9]+)$/;
|
|
|
6
6
|
export const WARP_ROUTE_CONFIG_FILE_REGEX = /warp_routes\/([a-zA-Z0-9]+)\/([a-z0-9-]+)-config.yaml/;
|
|
7
7
|
export const WARP_ROUTE_DEPLOY_FILE_REGEX = /warp_routes\/([a-zA-Z0-9]+)\/([a-z0-9-]+)-deploy.yaml/;
|
|
8
8
|
export const ABACUS_WORKS_DEPLOYER_NAME = 'Abacus Works';
|
|
9
|
-
export const PROXY_DEPLOYED_URL = 'https://proxy.hyperlane.xyz';
|
package/dist/index.d.ts
CHANGED
|
@@ -7,7 +7,6 @@ export { PartialRegistry, PartialRegistryOptions } from './registry/PartialRegis
|
|
|
7
7
|
export { filterWarpRoutesIds, warpConfigToWarpAddresses, warpRouteConfigPathToId, warpRouteConfigToId, createWarpRouteConfigId, } from './registry/warp-utils.js';
|
|
8
8
|
export { ChainAddresses, ChainAddressesSchema } from './types.js';
|
|
9
9
|
export { isAbacusWorksChain } from './utils.js';
|
|
10
|
-
export { getRegistry } from './registry/registry-utils.js';
|
|
11
10
|
export { chainMetadata } from './chainMetadata.js';
|
|
12
11
|
export { chainAddresses } from './chainAddresses.js';
|
|
13
12
|
export { metadata as abstract } from './chains/abstract/metadata.js';
|
package/dist/index.js
CHANGED
|
@@ -7,7 +7,6 @@ export { PartialRegistry } from './registry/PartialRegistry.js';
|
|
|
7
7
|
export { filterWarpRoutesIds, warpConfigToWarpAddresses, warpRouteConfigPathToId, warpRouteConfigToId, createWarpRouteConfigId, } from './registry/warp-utils.js';
|
|
8
8
|
export { ChainAddressesSchema } from './types.js';
|
|
9
9
|
export { isAbacusWorksChain } from './utils.js';
|
|
10
|
-
export { getRegistry } from './registry/registry-utils.js';
|
|
11
10
|
export { chainMetadata } from './chainMetadata.js';
|
|
12
11
|
export { chainAddresses } from './chainAddresses.js';
|
|
13
12
|
export { metadata as abstract } from './chains/abstract/metadata.js';
|
package/package.json
CHANGED
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import { GithubRegistry } from './GithubRegistry.js';
|
|
2
|
-
import { FileSystemRegistry } from './FileSystemRegistry.js';
|
|
3
|
-
import { DEFAULT_GITHUB_REGISTRY, PROXY_DEPLOYED_URL } from '../consts.js';
|
|
4
|
-
import { MergedRegistry } from './MergedRegistry.js';
|
|
5
|
-
const isHttpsUrl = (value) => {
|
|
6
|
-
try {
|
|
7
|
-
if (!value)
|
|
8
|
-
return false;
|
|
9
|
-
const url = new URL(value);
|
|
10
|
-
return url.protocol === 'https:';
|
|
11
|
-
}
|
|
12
|
-
catch {
|
|
13
|
-
return false;
|
|
14
|
-
}
|
|
15
|
-
};
|
|
16
|
-
const isCanonicalRepoUrl = (url) => {
|
|
17
|
-
return url === DEFAULT_GITHUB_REGISTRY;
|
|
18
|
-
};
|
|
19
|
-
export function getRegistry(registryUris, enableProxy, logger) {
|
|
20
|
-
const registryLogger = logger?.child({ module: 'MergedRegistry' });
|
|
21
|
-
const registries = registryUris
|
|
22
|
-
.map((uri) => uri.trim())
|
|
23
|
-
.filter((uri) => !!uri)
|
|
24
|
-
.map((uri, index) => {
|
|
25
|
-
const childLogger = registryLogger?.child({ uri, index });
|
|
26
|
-
if (isHttpsUrl(uri)) {
|
|
27
|
-
return new GithubRegistry({
|
|
28
|
-
uri,
|
|
29
|
-
logger: childLogger,
|
|
30
|
-
proxyUrl: enableProxy && isCanonicalRepoUrl(uri) ? PROXY_DEPLOYED_URL : undefined,
|
|
31
|
-
});
|
|
32
|
-
}
|
|
33
|
-
else {
|
|
34
|
-
return new FileSystemRegistry({
|
|
35
|
-
uri,
|
|
36
|
-
logger: childLogger,
|
|
37
|
-
});
|
|
38
|
-
}
|
|
39
|
-
});
|
|
40
|
-
return new MergedRegistry({
|
|
41
|
-
registries,
|
|
42
|
-
logger,
|
|
43
|
-
});
|
|
44
|
-
}
|