@subiz/wsclient 4.0.27 → 4.0.28

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +4 -4
  2. package/realtime.js +2 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@subiz/wsclient",
3
- "version": "4.0.27",
3
+ "version": "4.0.28",
4
4
  "main": "realtime.js",
5
5
  "scripts": {
6
6
  "dev": "vite",
@@ -15,9 +15,9 @@
15
15
  "homepage": "https://github.com/subiz/wsclient#readme",
16
16
  "description": "",
17
17
  "devDependencies": {
18
- "tape": "^5.8.1",
19
- "vite": "^5.3.4",
20
- "vite-plugin-commonjs": "^0.10.1"
18
+ "tape": "^5.9.0",
19
+ "vite": "^6.0.7",
20
+ "vite-plugin-commonjs": "^0.10.4"
21
21
  },
22
22
  "dependencies": {
23
23
  "@subiz/flow": "^1.1.0"
package/realtime.js CHANGED
@@ -34,7 +34,7 @@ function Conn(apiUrl, credential, onDead, onEvents, callAPI, accid) {
34
34
  // the polling loop starts after the first subscribe call finished successfully
35
35
  var polling = function (backoff) {
36
36
  if (dead) return
37
- callAPI('get', apiUrl + 'poll?token=' + lastToken + '&account_id=' + accid, undefined, function (body, code) {
37
+ callAPI('get', apiUrl + 'poll?token=' + lastToken + '&account-id=' + accid, undefined, function (body, code) {
38
38
  if (dead) return
39
39
  if (retryable(code)) return setTimeout(polling, calcNextBackoff(backoff), backoff + 1)
40
40
  if (code !== 200) {
@@ -70,7 +70,7 @@ function Conn(apiUrl, credential, onDead, onEvents, callAPI, accid) {
70
70
  else if (credential.user_mask) query += '&user-mask=' + encodeURIComponent(credential.user_mask)
71
71
  else if (access_token) query += '&access-token=' + access_token
72
72
 
73
- let fullurl = apiUrl + 'subs' + query + '&account_id=' + encodeURIComponent(accid || credential.account_id)
73
+ let fullurl = apiUrl + 'subs' + query + '&account-id=' + encodeURIComponent(accid || credential.account_id)
74
74
  callAPI('post', fullurl, JSON.stringify({events: events}), function (body, code) {
75
75
  if (dead) {
76
76
  out = repeat('dead', events.length)