Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ESM Support #3978

Merged
merged 61 commits into from
May 24, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
61 commits
Select commit Hold shift + click to select a range
4b5b162
ESM changes
wemeetagain Apr 6, 2022
ce17ec7
Fix root lodestar script
wemeetagain May 5, 2022
6651245
Fix some linter errors
wemeetagain May 7, 2022
aad9f89
trying directly re-exporting under an alias from networks module
dadepo May 8, 2022
9937b21
Fix types exports
wemeetagain May 8, 2022
8d7f8b2
Fix more linter errors
wemeetagain May 9, 2022
173f2cf
Fix spec test download
wemeetagain May 9, 2022
423dd72
Update bls to 7.1.0
wemeetagain May 9, 2022
692be20
Fix spec tests
wemeetagain May 9, 2022
a1ef62c
temp reverting eslint parser option to 10 and disabling the check of …
dadepo May 9, 2022
143d485
temp commented out file-extension-in-import
dadepo May 9, 2022
b145f32
Disable readme checks
wemeetagain May 11, 2022
7c7816b
Fix check-build
wemeetagain May 11, 2022
050097f
Fix params e2e tests
wemeetagain May 11, 2022
2fe6f84
Bump @chainsafe/threads
wemeetagain May 12, 2022
2504196
Bump bls to v7.1.1
wemeetagain May 15, 2022
d6af2e2
Add timeouts after node initialization but before sim test run
wemeetagain May 16, 2022
867d53c
Tweak timeouts
wemeetagain May 16, 2022
57eb509
Tweak timeout
wemeetagain May 16, 2022
c500a1d
Tweak sim merge timeout
wemeetagain May 16, 2022
2914274
Tweak sim merge timeout
wemeetagain May 16, 2022
abd623b
Tweak sim merge timeout
wemeetagain May 16, 2022
f04e27c
Tweak sim merge timeout
wemeetagain May 16, 2022
b8f07ae
Add more timeouts
wemeetagain May 16, 2022
5d748ab
Add another timeout
wemeetagain May 17, 2022
63d30d2
Merge branch 'master' into cayman/es-modules
wemeetagain May 17, 2022
e78c10c
Fix linter errors
wemeetagain May 17, 2022
8bca953
Fix some tests
wemeetagain May 17, 2022
254c1e5
Fix some linter errors and spec tests
wemeetagain May 18, 2022
6d292e0
Fix benchmarks
wemeetagain May 18, 2022
177a269
Fix linter errors
wemeetagain May 18, 2022
41adda1
Update each bls dependency
wemeetagain May 18, 2022
b8d4660
Tweak timeouts
wemeetagain May 18, 2022
a00ff45
Add another timeout
wemeetagain May 18, 2022
c376bdb
More timeouts
wemeetagain May 18, 2022
68752e2
Merge branch 'master' into cayman/es-modules
wemeetagain May 18, 2022
16bad3b
Fix bls pool size
wemeetagain May 19, 2022
347b0fd
Set root package.json to ESM
wemeetagain May 19, 2022
6036371
Remove old linter comment
wemeetagain May 19, 2022
7d184f0
Revert "Set root package.json to ESM"
wemeetagain May 19, 2022
52b39f3
Remove stray file (probably old)
wemeetagain May 19, 2022
43a2698
Merge branch 'master' into cayman/es-modules
wemeetagain May 19, 2022
5d086b5
Merge branch 'master' into cayman/es-modules
wemeetagain May 20, 2022
51b8206
Undo unnecessary diff
dapplion May 20, 2022
3eab6d7
Add comment on __dirname replacement
dapplion May 20, 2022
6970d77
Import type @chainsafe/bls/types
dapplion May 20, 2022
5e5cbec
Use lodestar path imports
dapplion May 20, 2022
3497b67
Revert multifork to lodestar package
dapplion May 20, 2022
8e334ad
Format .mocharc.yaml
dapplion May 20, 2022
2da1ff7
Use same @chainsafe/as-sha256 version
dapplion May 20, 2022
69a7fde
Fix lodash path imports
dapplion May 20, 2022
d641ac8
Use src instead of lib
wemeetagain May 20, 2022
44381d4
Load db metrics
wemeetagain May 20, 2022
9c2b1ee
Merge branch 'master' into cayman/es-modules
wemeetagain May 20, 2022
3d4ddd2
Remove experimental-specifier-resolution
wemeetagain May 21, 2022
8b2ba5e
Remove lodestat/chain export
wemeetagain May 21, 2022
232ced0
Add stray missing file extension
wemeetagain May 21, 2022
4fd1e75
Revert ValidatorDir changes
wemeetagain May 21, 2022
54ac711
Fix stray missing file extensions
wemeetagain May 21, 2022
40de3d7
Merge branch 'master' into cayman/es-modules
wemeetagain May 24, 2022
f070d18
Fix check-types
wemeetagain May 24, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
6 changes: 3 additions & 3 deletions .benchrc.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Mocha opts
extension: ["ts"]
colors: true
require:
- ts-node/register
- packages/lodestar/test/setupBLS.ts
node-option:
- "loader=ts-node/register"

# benchmark opts
threshold: 3
Expand Down
16 changes: 14 additions & 2 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,9 @@ module.exports = {
parserOptions: {
ecmaVersion: 10,
project: "./tsconfig.json",
sourceType: "module",
},
plugins: ["@typescript-eslint", "eslint-plugin-import", "eslint-plugin-node", "no-only-tests", "prettier"],
plugins: ["@typescript-eslint", "eslint-plugin-import", "@chainsafe/eslint-plugin-node", "no-only-tests", "prettier"],
extends: [
"eslint:recommended",
"plugin:import/errors",
Expand Down Expand Up @@ -110,7 +111,7 @@ module.exports = {
//if --fix is run it messes imports like /lib/presets/minimal & /lib/presets/mainnet
"import/no-duplicates": "off",
"import/no-relative-packages": "error",
"node/no-deprecated-api": "error",
"@chainsafe/node/no-deprecated-api": "error",
"new-parens": "error",
"no-caller": "error",
"no-bitwise": "off",
Expand Down Expand Up @@ -147,6 +148,17 @@ module.exports = {

// Prevents accidentally pushing a commit with .only in Mocha tests
"no-only-tests/no-only-tests": "error",

// TEMP Disabled while eslint-plugin-import support ESM (Typescript does support it) https://github.com/import-js/eslint-plugin-import/issues/2170
"import/no-unresolved": "off",

"@chainsafe/node/file-extension-in-import": [
"error",
"always",
{
"esm": true
}
],
},
settings: {
"import/core-modules": [
Expand Down
7 changes: 5 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,13 @@ jobs:

- name: Check Types
run: yarn run check-types
- name: README check
run: yarn run check-readme
# TODO: uncomment after https://github.com/bbc/typescript-docs-verifier/issues/17 is resolved
# - name: README check
# run: yarn run check-readme
- name: Lint
run: yarn lint
- name: Check Build
run: yarn check-build
- name: Unit tests
run: yarn test:unit
- name: Upload coverage data
Expand Down
5 changes: 3 additions & 2 deletions .mocharc.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
extension: ["ts"]
colors: true
require:
- ts-node/register
node-option:
- "loader=ts-node/esm"
2 changes: 1 addition & 1 deletion lodestar
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@
#
# ./lodestar.sh beacon --network prater

node --trace-deprecation --max-old-space-size=4096 ./packages/cli/bin/lodestar "$@"
node --trace-deprecation --max-old-space-size=4096 ./packages/cli/bin/lodestar.js "$@"
11 changes: 6 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
"build:watch": "run-p build:lib:watch build:types:watch",
"build:ifchanged": "lerna exec -- ../../scripts/build_if_changed.sh",
"lint": "lerna run lint --no-bail",
"check-build": "lerna run check-build",
"check-types": "lerna run check-types --no-bail",
"coverage": "lerna run coverage --no-bail",
"test:unit": "lerna run test:unit --no-bail --concurrency 1",
Expand All @@ -25,13 +26,14 @@
"test:spec-fast": "lerna run test:spec-fast --no-bail",
"test:spec-main": "lerna run test:spec-main --no-bail",
"benchmark": "yarn benchmark:files 'packages/*/test/perf/**/*.test.ts'",
"benchmark:files": "LODESTAR_PRESET=mainnet NODE_OPTIONS=--max-old-space-size=4096 benchmark --config .benchrc.yaml",
"benchmark:files": "LODESTAR_PRESET=mainnet NODE_OPTIONS='--max-old-space-size=4096 --loader=ts-node/esm' benchmark --config .benchrc.yaml",
"publish:release": "lerna publish from-package --yes --no-verify-access",
"release": "lerna version --no-push --sign-git-commit",
"postrelease": "git tag -d $(git describe --abbrev=0)",
"check-readme": "lerna run check-readme"
},
"devDependencies": {
"@chainsafe/eslint-plugin-node": "^11.2.3",
"@dapplion/benchmark": "^0.2.2",
"@types/chai": "4.2.0",
"@types/chai-as-promised": "^7.1.2",
Expand All @@ -46,21 +48,20 @@
"eslint": "^7.14.0",
"eslint-plugin-import": "^2.23.0",
"eslint-plugin-no-only-tests": "^2.4.0",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-prettier": "^3.1.4",
"lerna": "^4.0.0",
"mocha": "^8.3.0",
"mocha": "^9.2.2",
"npm-run-all": "^4.1.5",
"nyc": "^15.1.0",
"prettier": "^2.0.5",
"sinon": "^9.0.2",
"supertest": "^4.0.2",
"ts-node": "^9.1.1",
"ts-node": "^10.7.0",
"typedoc": "^0.19.2",
"typedoc-plugin-external-module-name": "^4.0.3",
"typedoc-plugin-internal-external": "^2.2.0",
"typedoc-plugin-markdown": "^2.4.1",
"typescript": "^4.4.0",
"typescript": "4.6.3",
"typescript-docs-verifier": "^2.0.0-rc.1"
},
"dependencies": {},
Expand Down
4 changes: 3 additions & 1 deletion packages/api/.mocharc.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
colors: true
require: ts-node/register
timeout: 2000
exit: true
extension: ["ts"]
node-option:
- "loader=ts-node/esm"
1 change: 0 additions & 1 deletion packages/api/keymanager.d.ts

This file was deleted.

2 changes: 0 additions & 2 deletions packages/api/keymanager.js

This file was deleted.

1 change: 0 additions & 1 deletion packages/api/keymanager_server.d.ts

This file was deleted.

2 changes: 0 additions & 2 deletions packages/api/keymanager_server.js

This file was deleted.

27 changes: 26 additions & 1 deletion packages/api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,31 @@
"url": "https://github.com/ChainSafe/lodestar/issues"
},
"version": "0.37.0",
"main": "lib/index.js",
"type": "module",
"exports": {
".": {
"import": "./lib/index.js"
},
"./keymanager": {
"import": "./lib/keymanager/index.js"
},
"./keymanager/server": {
"import": "./lib/keymanager/server.js"
},
"./server": {
"import": "./lib/server/index.js"
}
},
"typesVersions": {
"*": {
"*": [
"*",
"lib/*",
"lib/*/index"
]
}
},
"types": "./lib/index.d.ts",
"files": [
"lib/**/*.d.ts",
"lib/**/*.js",
Expand All @@ -25,6 +49,7 @@
"build": "tsc -p tsconfig.build.json",
"build:typedocs": "typedoc --exclude src/index.ts --out typedocs src",
"build:release": "yarn clean && yarn run build && yarn run build:typedocs",
"check-build": "node -e \"(async function() { await import('./lib/index.js') })()\"",
"check-types": "tsc",
"coverage": "codecov -F lodestar-api",
"lint": "eslint --color --ext .ts src/ test/",
Expand Down
1 change: 0 additions & 1 deletion packages/api/server.d.ts

This file was deleted.

2 changes: 0 additions & 2 deletions packages/api/server.js

This file was deleted.

4 changes: 2 additions & 2 deletions packages/api/src/client/beacon.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import {IChainForkConfig} from "@chainsafe/lodestar-config";
import {IHttpClient, generateGenericJsonClient} from "./utils";
import {Api, ReqTypes, routesData, getReqSerializers, getReturnTypes} from "../routes/beacon";
import {IHttpClient, generateGenericJsonClient} from "./utils/index.js";
import {Api, ReqTypes, routesData, getReqSerializers, getReturnTypes} from "../routes/beacon/index.js";

/**
* REST HTTP client for beacon routes
Expand Down
4 changes: 2 additions & 2 deletions packages/api/src/client/config.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import {IChainForkConfig} from "@chainsafe/lodestar-config";
import {IHttpClient, generateGenericJsonClient} from "./utils";
import {Api, ReqTypes, routesData, getReqSerializers, getReturnTypes} from "../routes/config";
import {IHttpClient, generateGenericJsonClient} from "./utils/index.js";
import {Api, ReqTypes, routesData, getReqSerializers, getReturnTypes} from "../routes/config.js";

/**
* REST HTTP client for config routes
Expand Down
4 changes: 2 additions & 2 deletions packages/api/src/client/debug.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import {IChainForkConfig} from "@chainsafe/lodestar-config";
import {IHttpClient, getFetchOptsSerializers, generateGenericJsonClient} from "./utils";
import {Api, ReqTypes, routesData, getReqSerializers, getReturnTypes, StateFormat} from "../routes/debug";
import {IHttpClient, getFetchOptsSerializers, generateGenericJsonClient} from "./utils/index.js";
import {Api, ReqTypes, routesData, getReqSerializers, getReturnTypes, StateFormat} from "../routes/debug.js";

/**
* REST HTTP client for debug routes
Expand Down
4 changes: 2 additions & 2 deletions packages/api/src/client/events.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import EventSource from "eventsource";
import {IChainForkConfig} from "@chainsafe/lodestar-config";
import {Api, BeaconEvent, routesData, getEventSerdes} from "../routes/events";
import {stringifyQuery} from "./utils/format";
import {Api, BeaconEvent, routesData, getEventSerdes} from "../routes/events.js";
import {stringifyQuery} from "./utils/format.js";

/**
* REST HTTP client for events routes
Expand Down
20 changes: 10 additions & 10 deletions packages/api/src/client/index.ts
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
import {IChainForkConfig} from "@chainsafe/lodestar-config";
import {Api} from "../interface";
import {IHttpClient, HttpClient, HttpClientOptions, HttpClientModules, HttpError} from "./utils";
import {Api} from "../interface.js";
import {IHttpClient, HttpClient, HttpClientOptions, HttpClientModules, HttpError} from "./utils/index.js";
export {HttpClient, HttpClientOptions, HttpError};

import * as beacon from "./beacon";
import * as configApi from "./config";
import * as debug from "./debug";
import * as events from "./events";
import * as lightclient from "./lightclient";
import * as lodestar from "./lodestar";
import * as node from "./node";
import * as validator from "./validator";
import * as beacon from "./beacon.js";
import * as configApi from "./config.js";
import * as debug from "./debug.js";
import * as events from "./events.js";
import * as lightclient from "./lightclient.js";
import * as lodestar from "./lodestar.js";
import * as node from "./node.js";
import * as validator from "./validator.js";

type ClientModules = HttpClientModules & {
config: IChainForkConfig;
Expand Down
4 changes: 2 additions & 2 deletions packages/api/src/client/lightclient.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import {IChainForkConfig} from "@chainsafe/lodestar-config";
import {deserializeProof} from "@chainsafe/persistent-merkle-tree";
import {IHttpClient, getFetchOptsSerializers, generateGenericJsonClient} from "./utils";
import {Api, ReqTypes, routesData, getReqSerializers, getReturnTypes} from "../routes/lightclient";
import {IHttpClient, getFetchOptsSerializers, generateGenericJsonClient} from "./utils/index.js";
import {Api, ReqTypes, routesData, getReqSerializers, getReturnTypes} from "../routes/lightclient.js";

/**
* REST HTTP client for lightclient routes
Expand Down
4 changes: 2 additions & 2 deletions packages/api/src/client/lodestar.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import {IChainForkConfig} from "@chainsafe/lodestar-config";
import {IHttpClient, generateGenericJsonClient} from "./utils";
import {Api, ReqTypes, routesData, getReqSerializers, getReturnTypes} from "../routes/lodestar";
import {IHttpClient, generateGenericJsonClient} from "./utils/index.js";
import {Api, ReqTypes, routesData, getReqSerializers, getReturnTypes} from "../routes/lodestar.js";

/**
* REST HTTP client for lodestar routes
Expand Down
4 changes: 2 additions & 2 deletions packages/api/src/client/node.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import {IChainForkConfig} from "@chainsafe/lodestar-config";
import {IHttpClient, generateGenericJsonClient} from "./utils";
import {Api, ReqTypes, routesData, getReqSerializers, getReturnTypes} from "../routes/node";
import {IHttpClient, generateGenericJsonClient} from "./utils/index.js";
import {Api, ReqTypes, routesData, getReqSerializers, getReturnTypes} from "../routes/node.js";

/**
* REST HTTP client for beacon routes
Expand Down
6 changes: 3 additions & 3 deletions packages/api/src/client/utils/client.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import {mapValues} from "@chainsafe/lodestar-utils";
import {FetchOpts, IHttpClient} from "./httpClient";
import {compileRouteUrlFormater} from "../../utils/urlFormat";
import {FetchOpts, IHttpClient} from "./httpClient.js";
import {compileRouteUrlFormater} from "../../utils/urlFormat.js";
import {
RouteDef,
ReqGeneric,
Expand All @@ -10,7 +10,7 @@ import {
ReqSerializer,
ReqSerializers,
RoutesData,
} from "../../utils/types";
} from "../../utils/types.js";

// See /packages/api/src/routes/index.ts for reasoning

Expand Down
6 changes: 3 additions & 3 deletions packages/api/src/client/utils/httpClient.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import {fetch} from "cross-fetch";
import {AbortSignal, AbortController} from "@chainsafe/abort-controller";
import {ErrorAborted, ILogger, TimeoutError} from "@chainsafe/lodestar-utils";
import {ReqGeneric, RouteDef} from "../../utils";
import {stringifyQuery, urlJoin} from "./format";
import {Metrics} from "./metrics";
import {ReqGeneric, RouteDef} from "../../utils/index.js";
import {stringifyQuery, urlJoin} from "./format.js";
import {Metrics} from "./metrics.js";

export class HttpError extends Error {
status: number;
Expand Down
4 changes: 2 additions & 2 deletions packages/api/src/client/utils/index.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
export * from "./client";
export * from "./httpClient";
export * from "./client.js";
export * from "./httpClient.js";
4 changes: 2 additions & 2 deletions packages/api/src/client/validator.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import {IChainForkConfig} from "@chainsafe/lodestar-config";
import {IHttpClient, generateGenericJsonClient} from "./utils";
import {Api, ReqTypes, routesData, getReqSerializers, getReturnTypes} from "../routes/validator";
import {IHttpClient, generateGenericJsonClient} from "./utils/index.js";
import {Api, ReqTypes, routesData, getReqSerializers, getReturnTypes} from "../routes/validator.js";

/**
* REST HTTP client for validator routes
Expand Down
6 changes: 3 additions & 3 deletions packages/api/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
export * as routes from "./routes";
export * from "./interface";
export {getClient, HttpClient, HttpClientOptions, HttpError} from "./client";
export * as routes from "./routes/index.js";
export * from "./interface.js";
export {getClient, HttpClient, HttpClientOptions, HttpError} from "./client/index.js";

// Node: Don't export server here so it's not bundled to all consumers
16 changes: 8 additions & 8 deletions packages/api/src/interface.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import {Api as BeaconApi} from "./routes/beacon";
import {Api as ConfigApi} from "./routes/config";
import {Api as DebugApi} from "./routes/debug";
import {Api as EventsApi} from "./routes/events";
import {Api as LightclientApi} from "./routes/lightclient";
import {Api as LodestarApi} from "./routes/lodestar";
import {Api as NodeApi} from "./routes/node";
import {Api as ValidatorApi} from "./routes/validator";
import {Api as BeaconApi} from "./routes/beacon/index.js";
import {Api as ConfigApi} from "./routes/config.js";
import {Api as DebugApi} from "./routes/debug.js";
import {Api as EventsApi} from "./routes/events.js";
import {Api as LightclientApi} from "./routes/lightclient.js";
import {Api as LodestarApi} from "./routes/lodestar.js";
import {Api as NodeApi} from "./routes/node.js";
import {Api as ValidatorApi} from "./routes/validator.js";

export type Api = {
beacon: BeaconApi;
Expand Down
4 changes: 2 additions & 2 deletions packages/api/src/keymanager/client.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {IHttpClient, generateGenericJsonClient} from "../client/utils";
import {Api, ReqTypes, routesData, getReqSerializers, getReturnTypes} from "./routes";
import {IHttpClient, generateGenericJsonClient} from "../client/utils/index.js";
import {Api, ReqTypes, routesData, getReqSerializers, getReturnTypes} from "./routes.js";
import {IChainForkConfig} from "@chainsafe/lodestar-config";

export function getClient(_config: IChainForkConfig, httpClient: IHttpClient): Api {
Expand Down
10 changes: 5 additions & 5 deletions packages/api/src/keymanager/index.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import {IChainForkConfig} from "@chainsafe/lodestar-config";
import {HttpClient, HttpClientOptions} from "../client";
import {IHttpClient} from "../client/utils";
import {Api} from "./routes";
import * as keymanager from "./client";
import {HttpClient, HttpClientOptions} from "../client/index.js";
import {IHttpClient} from "../client/utils/index.js";
import {Api} from "./routes.js";
import * as keymanager from "./client.js";

export {ImportStatus, DeletionStatus, KeystoreStr, SlashingProtectionData, PubkeyHex, Api} from "./routes";
export {ImportStatus, DeletionStatus, KeystoreStr, SlashingProtectionData, PubkeyHex, Api} from "./routes.js";

/**
* REST HTTP client for all keymanager routes
Expand Down
2 changes: 1 addition & 1 deletion packages/api/src/keymanager/routes.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {ReturnTypes, RoutesData, Schema, reqEmpty, ReqSerializers, ReqEmpty, jsonType} from "../utils";
import {ReturnTypes, RoutesData, Schema, reqEmpty, ReqSerializers, ReqEmpty, jsonType} from "../utils/index.js";

export enum ImportStatus {
/** Keystore successfully decrypted and imported to keymanager permanent storage */
Expand Down
4 changes: 2 additions & 2 deletions packages/api/src/keymanager/server.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import {IChainForkConfig} from "@chainsafe/lodestar-config";
import {ServerRoutes, getGenericJsonServer} from "../server/utils";
import {Api, ReqTypes, routesData, getReturnTypes, getReqSerializers} from "./routes";
import {ServerRoutes, getGenericJsonServer} from "../server/utils/index.js";
import {Api, ReqTypes, routesData, getReturnTypes, getReqSerializers} from "./routes.js";

export function getRoutes(config: IChainForkConfig, api: Api): ServerRoutes<Api, ReqTypes> {
// All routes return JSON, use a server auto-generator
Expand Down
Loading