Skip to content

Commit

Permalink
Merge branch 'release/2.1.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
Elvio Wang committed Dec 8, 2023
2 parents 9f75a1e + 274a855 commit feb036d
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 10 deletions.
9 changes: 7 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ This project adheres to [Semantic Versioning](http://semver.org/).

## [Unreleased]

## [2.1.1] - 2023-12-08
### FIXED
- Fixed `getWatchSocket` function returning an invalid socket due to a missing namespace URL.

## [2.1.0] - 2023-11-24
### ADDED
- Added Haystack utility functions for ease of use. These include:
Expand Down Expand Up @@ -33,7 +37,6 @@ This project adheres to [Semantic Versioning](http://semver.org/).
- Bunyan logging instance
- Added new set of functions under property `v2` of the `WideSkyClient` instance. `v2` consists of client functions:
- `find`: Same functionality as the existing `WideSkyClient.find` but returns only the rows.
- Added new `HisWritePayload` to more easily create payloads suitable for the `hisWrite` function.
- Added new function `performOpInBatch` to perform client operations in a batched and parallel manner. Will be used
as the basis for all new batch functions added.
- Add new batch functions:
Expand All @@ -52,6 +55,7 @@ This project adheres to [Semantic Versioning](http://semver.org/).
- `client.batch.multiFind(filterAndLimits, options)`
- `client.batch.updateOrCreate(entities, options)`
- Added new utility class `EntityCriteria` to be used with `client.batch.updateByFilter`.
- Added new utility class `HisWritePayload` to more easily create payloads suitable for the `hisWrite` function.
- Added new function `entityCount(filter)` to get the number of entities from a filter via a GraphQL query.
- Added new function `findAsId(filter, limit)` to optimise functions that only require the ids of the entity,
normally discarding any other information that would be returned from `client.find`.
Expand Down Expand Up @@ -158,7 +162,7 @@ This project adheres to [Semantic Versioning](http://semver.org/).
### ADDED
- Alpha release

[Unreleased]: https://github.com/widesky/jswidesky-client/compare/master...2.1.0
[Unreleased]: https://github.com/widesky/jswidesky-client/compare/master...2.1.1
[1.0.0]: https://github.com/widesky/jswidesky-client/compare/1.0.0...1.0.0
[1.1.0]: https://github.com/widesky/jswidesky-client/compare/1.1.0...1.0.0
[1.1.1]: https://github.com/widesky/jswidesky-client/compare/1.1.1...1.1.0
Expand All @@ -174,3 +178,4 @@ This project adheres to [Semantic Versioning](http://semver.org/).
[2.0.5]: https://github.com/widesky/jswidesky-client/compare/2.0.5...2.0.4
[2.0.6]: https://github.com/widesky/jswidesky-client/compare/2.0.6...2.0.5
[2.1.0]: https://github.com/widesky/jswidesky-client/compare/2.1.0...2.0.6
[2.1.1]: https://github.com/widesky/jswidesky-client/compare/2.1.1...2.1.0
7 changes: 4 additions & 3 deletions dist/wideskyClient.develop.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/wideskyClient.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@widesky/jswidesky-client",
"version": "2.1.0",
"version": "2.1.1",
"description": "WideSky Client in JavaScript",
"main": "index.js",
"private": false,
Expand Down
6 changes: 4 additions & 2 deletions src/client/client.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ function initLogger(logObj) {
}

class WideSkyClient {
base_uri
baseUri
#username
#password
#clientId
Expand Down Expand Up @@ -1556,7 +1556,9 @@ class WideSkyClient {
const tokens = this.getToken();
const accessToken = tokens.access_token;

const url = `${this.base_uri}/${watchId}`;
const url = `${this.baseUri}/${watchId}`;

this.logger.info(`Socket URL is: ${url}`)

return socket.connect(url, {
query: { Authorization: accessToken },
Expand Down
3 changes: 2 additions & 1 deletion test/realtime/socket.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,12 @@ describe("Realtime", function () {

await ws.getWatchSocket(TEST_WATCH_ID);

expect(ws.baseUri).to.not.equal(undefined);
expect(ws.getToken.callCount).to.equal(1);
expect(socket.connect.callCount).to.equal(1);
expect(socket.connect.firstCall.args).to.eql(
[
`${ws.base_uri}/${TEST_WATCH_ID}`,
`${ws.baseUri}/${TEST_WATCH_ID}`,
{
query: {
Authorization: WS_ACCESS_TOKEN
Expand Down

0 comments on commit feb036d

Please sign in to comment.