Skip to content

Commit 1ee8469

Browse files
authored
Merge pull request #20 from tiagosiebler/buildUpdate
feat(): added build workflow, updated files to pass build tests
2 parents 1aab610 + 9c6a384 commit 1ee8469

File tree

8 files changed

+38
-45
lines changed

8 files changed

+38
-45
lines changed

.github/workflows/build.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: "Build Check"
2+
3+
on:
4+
pull_request:
5+
workflow_dispatch:
6+
push:
7+
8+
jobs:
9+
build:
10+
name: 'Build'
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- name: 'Checkout source code'
15+
uses: actions/checkout@v4
16+
17+
- uses: actions/setup-node@v4
18+
with:
19+
node-version-file: '.nvmrc'
20+
registry-url: 'https://registry.npmjs.org/'
21+
cache: 'npm'
22+
23+
- name: Install
24+
run: npm ci --ignore-scripts
25+
26+
- name: Check Build
27+
run: npm run build

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
node_modules
1+
node_modules
2+
dist

package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@
66
"main": "index.js",
77
"scripts": {
88
"test": "echo \"Error: no test specified\" && exit 1",
9-
"lint": "eslint -c .eslintrc.json"
9+
"lint": "eslint -c .eslintrc.json",
10+
"build": "tsc"
11+
1012
},
1113
"dependencies": {
1214
"accountstate": "^0.0.19",

src/demos/react-bybit/src/index.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
1+
import "bootstrap/dist/css/bootstrap.min.css";
12
import ReactDOM from "react-dom/client"; // Correct import for React 18
2-
import React from "react";
33
import App from "./App";
4-
import "bootstrap/dist/css/bootstrap.min.css";
54

65
const root = ReactDOM.createRoot(
76
document.getElementById("root") as HTMLElement

src/exchanges/bybit/orderbooks/local-orderbook.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { DefaultLogger, WebsocketClient } from 'bybit-api';
1+
import { WebsocketClient } from 'bybit-api';
22
import {
33
OrderBookLevel,
44
OrderBookLevelState,
@@ -45,17 +45,18 @@ function handleOrderbookUpdate(message: WsMessage) {
4545
const { topic, type, ts, data } = message;
4646
const [topicKey, depth, symbol] = topic.split('.');
4747

48+
4849
// Use the new function for both bid and ask levels
4950
const levelsMapBid = mapOrderBookLevels(symbol, data.b, 'Buy');
5051
const levelsMapAsk = mapOrderBookLevels(symbol, data.a, 'Sell');
5152

5253
//merge bid and ask levels into a single array
5354
const levels = [...levelsMapBid, ...levelsMapAsk];
5455

55-
if (type === 'snapshot') {
56+
if (type === 'snapshot' ) {
5657
return OrderBooks.handleSnapshot(
5758
symbol,
58-
levels,
59+
levels as any,
5960
// message,
6061
).print();
6162
}

src/exchanges/ftx/account-events/README.md

Lines changed: 0 additions & 3 deletions
This file was deleted.

src/exchanges/ftx/account-events/log-account-events.ts

Lines changed: 0 additions & 34 deletions
This file was deleted.

tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,6 @@
1919
"lib": ["es2020", "DOM"],
2020
"baseUrl": "src"
2121
},
22-
"exclude": ["**/node_modules/*", "coverage", "bin", "docs", "test"],
22+
"exclude": ["**/node_modules/*", "coverage", "bin", "docs", "test", "src/demos/react-bybit"],
2323
"include": ["src/**/*"]
2424
}

0 commit comments

Comments
 (0)