@botpress/webchat-client 0.2.0-beta.2 → 0.2.0

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.
@@ -1,5 +1,5 @@
1
1
 
2
- > @botpress/webchat-client@0.2.0-beta.2 build /home/runner/work/genisys/genisys/packages/webchat-client
2
+ > @botpress/webchat-client@0.2.0 build /home/runner/work/genisys/genisys/packages/webchat-client
3
3
  > openapi-ts && vite build
4
4
 
5
5
  ⏳ Generating from raw OpenAPI specification
@@ -18,12 +18,12 @@ computing gzip size...
18
18
  dist/webchat-client7.js  0.45 kB │ gzip: 0.26 kB
19
19
  dist/webchat-client9.js  2.63 kB │ gzip: 1.15 kB
20
20
  dist/webchat-client3.js  3.30 kB │ gzip: 0.58 kB
21
- dist/webchat-client2.js  4.75 kB │ gzip: 1.30 kB
21
+ dist/webchat-client2.js  4.75 kB │ gzip: 1.31 kB
22
22
  dist/webchat-client10.js  8.58 kB │ gzip: 2.91 kB
23
23
  dist/webchat-client5.js 10.93 kB │ gzip: 3.47 kB
24
24
  [vite:dts] Start rollup declaration files...
25
25
  Analysis will use the bundled TypeScript version 5.4.2
26
26
  *** The target project appears to use TypeScript 5.6.2 which is newer than the bundled compiler engine; consider upgrading API Extractor.
27
- [vite:dts] Declaration files built in 5038ms.
27
+ [vite:dts] Declaration files built in 5323ms.
28
28
 
29
- ✓ built in 5.45s
29
+ ✓ built in 5.65s
@@ -88,7 +88,7 @@ const n = (a) => a.data, v = {
88
88
  }
89
89
  })
90
90
  }), h.onopen = () => l.emit("open"), h.onerror = (g) => {
91
- l.emit("error", g), u < 10 && (u++, setTimeout(() => f(), 3e3));
91
+ u < 10 ? (u++, setTimeout(() => f(), 3e3)) : l.emit("error", g);
92
92
  }, h.onmessage = (g) => {
93
93
  const o = D(g.data);
94
94
  l.emit(o.type, o.data);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@botpress/webchat-client",
3
- "version": "0.2.0-beta.2",
3
+ "version": "0.2.0",
4
4
  "description": "",
5
5
  "main": "src/index.ts",
6
6
  "type": "module",
@@ -227,11 +227,11 @@ export const createClient = ({
227
227
 
228
228
  eventSource.onopen = () => eventEmitter.emit('open')
229
229
  eventSource.onerror = (err) => {
230
- eventEmitter.emit('error', err)
231
-
232
230
  if (retryCount < MAX_RETRIES) {
233
231
  retryCount++
234
232
  setTimeout(() => connect(), RETRY_INTERVAL)
233
+ } else {
234
+ eventEmitter.emit('error', err)
235
235
  }
236
236
  }
237
237
  eventSource.onmessage = (ev) => {