Skip to content

Commit

Permalink
chore: version package
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] authored and iosh committed Sep 17, 2024
1 parent 3c0ebc6 commit 3516c48
Show file tree
Hide file tree
Showing 8 changed files with 23 additions and 26 deletions.
5 changes: 0 additions & 5 deletions .changeset/nasty-dancers-exercise.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/stupid-jobs-admire.md

This file was deleted.

10 changes: 10 additions & 0 deletions packages/node/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
# @xcfx/node

## 0.1.0

### Minor Changes

- f4cf061: Enhance check node is ready

### Patch Changes

- fce4f61: Added port check

## 0.0.8

### Patch Changes
Expand Down
7 changes: 2 additions & 5 deletions packages/node/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@xcfx/node",
"version": "0.0.8",
"version": "0.1.0",
"description": "",
"main": "./dist/index.js",
"types": "./dist/index.d.ts",
Expand All @@ -9,10 +9,7 @@
"build": "tsc --project ./tsconfig.build.json",
"clean": "rm -rf dist"
},
"keywords": [
"conflux",
"conflux rust"
],
"keywords": ["conflux", "conflux rust"],
"files": [
"dist",
"data",
Expand Down
4 changes: 2 additions & 2 deletions packages/node/src/createConfigFile.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,12 +92,12 @@ export async function createConfigFile({
const configStr = Object.entries(newConfig)
.map(
([key, value]) =>
`${key} = ${typeof value === "string" ? `"${value}"` : value}`
`${key} = ${typeof value === "string" ? `"${value}"` : value}`,
)
.join("\n");
await fs.writeFile(
path.join(__dirname, `../data/${CONFIG_FILE_NAME}`),
configStr
configStr,
);

return newConfig;
Expand Down
10 changes: 5 additions & 5 deletions packages/node/src/createServer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export type createServerReturnType = {
};

async function createServer(
config: ConfluxConfig & ServerConfig = {}
config: ConfluxConfig & ServerConfig = {},
): Promise<createServerReturnType> {
const configWithDefault = {
...config,
Expand All @@ -40,12 +40,12 @@ async function createServer(
})
) {
throw new Error(
`The Conflux node is already running on the port ${configWithDefault.jsonrpc_http_port}.`
`The Conflux node is already running on the port ${configWithDefault.jsonrpc_http_port}.`,
);
}

throw new Error(
`The jsonrpc_http_port port ${configWithDefault.jsonrpc_http_port} is already in use.`
`The jsonrpc_http_port port ${configWithDefault.jsonrpc_http_port} is already in use.`,
);
}

Expand All @@ -57,12 +57,12 @@ async function createServer(
})
) {
throw new Error(
`The Conflux node is already running on the port ${configWithDefault.jsonrpc_ws_port}.`
`The Conflux node is already running on the port ${configWithDefault.jsonrpc_ws_port}.`,
);
}

throw new Error(
`The jsonrpc_ws_port port ${configWithDefault.jsonrpc_ws_port} is already in use.`
`The jsonrpc_ws_port port ${configWithDefault.jsonrpc_ws_port} is already in use.`,
);
}

Expand Down
6 changes: 3 additions & 3 deletions packages/node/src/helper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ export type checkIsConfluxNodeRunningParamsType = {
);

export async function checkIsConfluxNodeRunning(
args: checkIsConfluxNodeRunningParamsType
args: checkIsConfluxNodeRunningParamsType,
) {
const chain = createChain({
chainId: args.chainId,
Expand Down Expand Up @@ -174,14 +174,14 @@ export async function waitConfluxNodeReady({
chain,
transport: http(),
});

await client.request(
{
method: "cfx_getStatus",
},
{
retryCount: 50,
retryDelay: 500,
}
},
);
}
2 changes: 1 addition & 1 deletion packages/node/src/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export class ConfluxServer {
],
{
cwd: this.workDir,
}
},
);

this.conflux.stderr.on("data", this.onListenError);
Expand Down

0 comments on commit 3516c48

Please sign in to comment.