@couch-kit/client 0.8.0 → 0.8.1
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.
- package/CHANGELOG.md +9 -0
- package/dist/index.js +2 -1
- package/lib/client.d.ts.map +1 -1
- package/package.json +2 -2
- package/src/client.ts +2 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# @couch-kit/client
|
|
2
2
|
|
|
3
|
+
## 0.8.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#27](https://github.com/faluciano/react-native-couch-kit/pull/27) [`4976357`](https://github.com/faluciano/react-native-couch-kit/commit/49763573df502e394d5591b73000f48ee711d7a8) Thanks [@faluciano](https://github.com/faluciano)! - Fix WebSocket connection failure caused by path mismatch: the client connected to `ws://host:8082` (root path `/`) while the server only accepted upgrades on `/ws`. Added shared `DEFAULT_WS_PATH` constant to `@couch-kit/core` and use it in both client URL construction and server handler registration.
|
|
8
|
+
|
|
9
|
+
- Updated dependencies [[`4976357`](https://github.com/faluciano/react-native-couch-kit/commit/49763573df502e394d5591b73000f48ee711d7a8)]:
|
|
10
|
+
- @couch-kit/core@0.8.1
|
|
11
|
+
|
|
3
12
|
## 0.8.0
|
|
4
13
|
|
|
5
14
|
### Minor Changes
|
package/dist/index.js
CHANGED
|
@@ -4,6 +4,7 @@ import {
|
|
|
4
4
|
MessageTypes as MessageTypes2,
|
|
5
5
|
InternalActionTypes,
|
|
6
6
|
DEFAULT_WS_PORT_OFFSET,
|
|
7
|
+
DEFAULT_WS_PATH,
|
|
7
8
|
DEFAULT_MAX_RETRIES,
|
|
8
9
|
DEFAULT_BASE_DELAY,
|
|
9
10
|
DEFAULT_MAX_DELAY,
|
|
@@ -98,7 +99,7 @@ function useGameClient(config) {
|
|
|
98
99
|
const host = window.location.hostname;
|
|
99
100
|
const httpPort = parseInt(window.location.port, 10) || 80;
|
|
100
101
|
const wsPort = cfg.wsPort || httpPort + DEFAULT_WS_PORT_OFFSET;
|
|
101
|
-
wsUrl = `${protocol}//${host}:${wsPort}`;
|
|
102
|
+
wsUrl = `${protocol}//${host}:${wsPort}${DEFAULT_WS_PATH}`;
|
|
102
103
|
}
|
|
103
104
|
if (!wsUrl)
|
|
104
105
|
return;
|
package/lib/client.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AACA,OAAO,
|
|
1
|
+
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AACA,OAAO,EAWL,KAAK,UAAU,EACf,KAAK,OAAO,EAEb,MAAM,iBAAiB,CAAC;AAGzB,MAAM,WAAW,YAAY,CAAC,CAAC,SAAS,UAAU,EAAE,CAAC,SAAS,OAAO;IACnE,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,CAAC,KAAK,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,KAAK,CAAC,CAAC;IACpC,YAAY,EAAE,CAAC,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,mEAAmE;IACnE,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,4EAA4E;IAC5E,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,wEAAwE;IACxE,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;IACvB,YAAY,CAAC,EAAE,MAAM,IAAI,CAAC;IAC1B,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,aAAa,CAAC,CAAC,SAAS,UAAU,EAAE,CAAC,SAAS,OAAO,EACnE,MAAM,EAAE,YAAY,CAAC,CAAC,EAAE,CAAC,CAAC;;;;yBAsNc,CAAC;;IAqBvC,8EAA8E;;IAE9E,0EAA0E;;IAE1E,+EAA+E;;EAGlF"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@couch-kit/client",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.1",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public",
|
|
6
6
|
"provenance": true
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
"clean": "rm -rf dist lib"
|
|
48
48
|
},
|
|
49
49
|
"dependencies": {
|
|
50
|
-
"@couch-kit/core": "0.8.
|
|
50
|
+
"@couch-kit/core": "0.8.1"
|
|
51
51
|
},
|
|
52
52
|
"devDependencies": {
|
|
53
53
|
"react": "^18.2.0",
|
package/src/client.ts
CHANGED
|
@@ -3,6 +3,7 @@ import {
|
|
|
3
3
|
MessageTypes,
|
|
4
4
|
InternalActionTypes,
|
|
5
5
|
DEFAULT_WS_PORT_OFFSET,
|
|
6
|
+
DEFAULT_WS_PATH,
|
|
6
7
|
DEFAULT_MAX_RETRIES,
|
|
7
8
|
DEFAULT_BASE_DELAY,
|
|
8
9
|
DEFAULT_MAX_DELAY,
|
|
@@ -106,7 +107,7 @@ export function useGameClient<S extends IGameState, A extends IAction>(
|
|
|
106
107
|
const host = window.location.hostname;
|
|
107
108
|
const httpPort = parseInt(window.location.port, 10) || 80;
|
|
108
109
|
const wsPort = cfg.wsPort || httpPort + DEFAULT_WS_PORT_OFFSET;
|
|
109
|
-
wsUrl = `${protocol}//${host}:${wsPort}`;
|
|
110
|
+
wsUrl = `${protocol}//${host}:${wsPort}${DEFAULT_WS_PATH}`;
|
|
110
111
|
}
|
|
111
112
|
|
|
112
113
|
if (!wsUrl) return;
|