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

Update decoder.ts #224

Open
wants to merge 59 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
59 commits
Select commit Hold shift + click to select a range
3d19572
Update decoder.ts
icocoding Sep 21, 2024
888072f
Update README.md
icocoding Sep 21, 2024
470e56f
ci: version bump to 1.3.27
gh-action-bump-version Sep 21, 2024
adb3685
ci: version bump to 1.3.28
gh-action-bump-version Sep 21, 2024
557eb14
Update FUNDING.yml
icocoding Sep 21, 2024
222e8d2
ci: version bump to 1.3.29
gh-action-bump-version Sep 21, 2024
eed00c5
Update package.json
icocoding Sep 21, 2024
b6bd6b6
ci: version bump to 1.0.2
gh-action-bump-version Sep 21, 2024
4cb2a21
Update package.json
icocoding Sep 21, 2024
0f0113d
ci: version bump to 1.0.3
gh-action-bump-version Sep 21, 2024
f61f210
Update publish.yml
icocoding Sep 21, 2024
210332c
ci: version bump to 1.0.4
gh-action-bump-version Sep 21, 2024
461b401
Update publish.yml
icocoding Sep 21, 2024
eb8f5da
ci: version bump to 1.0.5
gh-action-bump-version Sep 21, 2024
195f45f
Update publish.yml
icocoding Sep 21, 2024
82c37dc
ci: version bump to 1.0.6
gh-action-bump-version Sep 21, 2024
115505e
Update publish.yml
icocoding Sep 21, 2024
0c824cb
ci: version bump to 1.0.7
gh-action-bump-version Sep 21, 2024
b780c1e
Update publish.yml
icocoding Sep 21, 2024
0b8697d
ci: version bump to 1.0.8
gh-action-bump-version Sep 21, 2024
e0ddf58
Update publish.yml
icocoding Sep 21, 2024
8abe2bb
ci: version bump to 1.0.9
gh-action-bump-version Sep 21, 2024
ded4bf9
Update package.json
icocoding Sep 21, 2024
e500576
ci: version bump to 1.0.10
gh-action-bump-version Sep 21, 2024
93e9400
Update publish.yml
icocoding Sep 21, 2024
80b188a
ci: version bump to 1.0.11
gh-action-bump-version Sep 21, 2024
36c6fac
Update publish.yml
icocoding Sep 21, 2024
4d02dcd
ci: version bump to 1.0.12
gh-action-bump-version Sep 21, 2024
307e7a6
Update publish.yml
icocoding Sep 21, 2024
a000af4
ci: version bump to 1.0.13
gh-action-bump-version Sep 21, 2024
f227623
Update package.json
icocoding Sep 21, 2024
55bd64e
ci: version bump to 1.0.14
gh-action-bump-version Sep 21, 2024
7670060
Update package.json
icocoding Sep 21, 2024
86e8d51
Update publish.yml
icocoding Sep 21, 2024
e7badcb
Update package.json
icocoding Sep 21, 2024
761e41c
Update package.json
icocoding Sep 21, 2024
f17e2f4
ci: version bump to 1.0.15
gh-action-bump-version Sep 21, 2024
6d91e4d
Update publish.yml
icocoding Sep 21, 2024
2fca841
ci: version bump to 1.0.16
gh-action-bump-version Sep 21, 2024
03ca6af
ci: version bump to 1.0.17
gh-action-bump-version Sep 21, 2024
9a7d296
ci: version bump to 1.0.18
gh-action-bump-version Sep 21, 2024
c1c9b9c
Update decoder.ts
icocoding Sep 21, 2024
0f6d426
ci: version bump to 1.0.19
gh-action-bump-version Sep 21, 2024
c62bdc7
Update decoder.ts
icocoding Sep 21, 2024
ee74f6d
ci: version bump to 1.0.20
gh-action-bump-version Sep 21, 2024
8e200b9
Update logger.ts
icocoding Sep 23, 2024
8918518
ci: version bump to 1.0.21
gh-action-bump-version Sep 23, 2024
3146f8c
Update logger.ts
icocoding Sep 23, 2024
c2c0e16
ci: version bump to 1.0.22
gh-action-bump-version Sep 23, 2024
94776ea
Update logger.ts
icocoding Sep 23, 2024
9b0010c
ci: version bump to 1.0.23
gh-action-bump-version Sep 23, 2024
73dabcd
Update logger.ts
icocoding Sep 23, 2024
19322b3
ci: version bump to 1.0.24
gh-action-bump-version Sep 23, 2024
e6dd1dc
Update logger.ts
icocoding Sep 23, 2024
81dc938
ci: version bump to 1.0.25
gh-action-bump-version Sep 23, 2024
57d6251
Update logger.ts
icocoding Sep 23, 2024
77a103e
ci: version bump to 1.0.26
gh-action-bump-version Sep 23, 2024
0fee4c4
Update decoder.ts
icocoding Sep 23, 2024
6d7a6de
ci: version bump to 1.0.27
gh-action-bump-version Sep 23, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# These are supported funding model platforms

github: stoqey # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
github: cocoding # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
patreon: # Replace with a single Patreon username
open_collective: # Replace with a single Open Collective username
ko_fi: # Replace with a single Ko-fi username
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ jobs:
# Publish the package
- name: "Publishing to Npm registry"
run: |
npm config set //registry.npmjs.org/:_authToken=$NPM_AUTH_TOKEN
npm config set //registry.npmjs.org/:_authToken=${{ secrets.NPM_AUTH_TOKEN }}
npm publish
env:
CI: true
NPM_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -257,3 +257,4 @@ In addition to that, a little demo / example app would be nice, to demonstrate A
Any kind of bugfixes are welcome as well.

If you want to contribute, read the [Developer Guide](https://github.com/stoqey/ib/wiki/Developer-Guide) and start coding.

19 changes: 11 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
{
"name": "@stoqey/ib",
"version": "1.3.26",
"name": "@icocoding/ib-node-api",
"version": "1.0.27",
"publishConfig": {
"access": "public"
},
"private": false,
"description": "Interactive Brokers TWS/IB Gateway API client library for Node.js (TS)",
"keywords": [
Expand Down Expand Up @@ -31,19 +34,19 @@
"library",
"stoqey"
],
"homepage": "https://github.com/stoqey/ib",
"homepage": "https://github.com/icocoding/ib-node-api",
"bugs": {
"url": "https://github.com/stoqey/ib/issues"
"url": "https://github.com/icocoding/ib-node-api/issues"
},
"repository": {
"type": "git",
"url": "git://github.com/stoqey/ib.git"
"url": "git://github.com/icocoding/ib-node-api.git"
},
"license": "MIT",
"author": {
"name": "Ceddy Muhoza",
"email": "[email protected]",
"url": "https://ceddy.org"
"name": "cocoding",
"email": "",
"url": "http://blog.cocoding.org"
},
"main": "dist/index.js",
"types": "dist/index.d.ts",
Expand Down
1 change: 1 addition & 0 deletions src/core/api-next/logger.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ export class IBApiNextLogger {
/** Set the current log level. */
set logLevel(level: LogLevel) {
this._logLevel = level;
(this.logger as any).logLevel = level;
}

/** Log a debug information. */
Expand Down
7 changes: 4 additions & 3 deletions src/core/io/decoder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -450,11 +450,12 @@ export class Decoder {
*/
readStr(): string {
if (this.dataQueue.length === 0) {
throw new UnderrunError();
// throw new UnderrunError();
return "";
}
const val = this.dataQueue.shift();
if (val === undefined) {
throw new UnderrunError("End of message reached.");
// throw new UnderrunError("End of message reached.");
}
return val;
}
Expand All @@ -463,7 +464,7 @@ export class Decoder {
* Read a token from queue and return it as boolean value.
*/
readBool(): boolean {
return parseInt(this.readStr(), 10) != 0;
return parseInt(this.readStr() || "0", 10) != 0;
}

/**
Expand Down