@lightsparkdev/core 0.3.5 → 0.3.7
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 +13 -0
- package/dist/index.cjs +5 -1
- package/dist/index.js +5 -1
- package/package.json +1 -1
- package/src/requester/Requester.ts +7 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# @lightsparkdev/core
|
|
2
2
|
|
|
3
|
+
## 0.3.7
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 4c09daf: Minor tsconfig update
|
|
8
|
+
Fixes in the react native library to run with older versions of expo
|
|
9
|
+
|
|
10
|
+
## 0.3.6
|
|
11
|
+
|
|
12
|
+
### Patch Changes
|
|
13
|
+
|
|
14
|
+
- a09f51f: Allow websockets without ssl for local testing.
|
|
15
|
+
|
|
3
16
|
## 0.3.5
|
|
4
17
|
|
|
5
18
|
### Patch Changes
|
package/dist/index.cjs
CHANGED
|
@@ -409,8 +409,12 @@ var Requester = class {
|
|
|
409
409
|
if (typeof WebSocket === "undefined" && typeof window === "undefined") {
|
|
410
410
|
websocketImpl = import_ws.default;
|
|
411
411
|
}
|
|
412
|
+
let websocketProtocol = "wss";
|
|
413
|
+
if (baseUrl.startsWith("http://")) {
|
|
414
|
+
websocketProtocol = "ws";
|
|
415
|
+
}
|
|
412
416
|
this.wsClient = (0, import_graphql_ws.createClient)({
|
|
413
|
-
url:
|
|
417
|
+
url: `${websocketProtocol}://${this.stripProtocol(this.baseUrl)}/${this.schemaEndpoint}`,
|
|
414
418
|
connectionParams: () => authProvider.addWsConnectionParams({}),
|
|
415
419
|
webSocketImpl: websocketImpl
|
|
416
420
|
});
|
package/dist/index.js
CHANGED
|
@@ -357,8 +357,12 @@ var Requester = class {
|
|
|
357
357
|
if (typeof WebSocket === "undefined" && typeof window === "undefined") {
|
|
358
358
|
websocketImpl = NodeWebSocket;
|
|
359
359
|
}
|
|
360
|
+
let websocketProtocol = "wss";
|
|
361
|
+
if (baseUrl.startsWith("http://")) {
|
|
362
|
+
websocketProtocol = "ws";
|
|
363
|
+
}
|
|
360
364
|
this.wsClient = createClient({
|
|
361
|
-
url:
|
|
365
|
+
url: `${websocketProtocol}://${this.stripProtocol(this.baseUrl)}/${this.schemaEndpoint}`,
|
|
362
366
|
connectionParams: () => authProvider.addWsConnectionParams({}),
|
|
363
367
|
webSocketImpl: websocketImpl
|
|
364
368
|
});
|
package/package.json
CHANGED
|
@@ -41,8 +41,14 @@ class Requester {
|
|
|
41
41
|
if (typeof WebSocket === "undefined" && typeof window === "undefined") {
|
|
42
42
|
websocketImpl = NodeWebSocket;
|
|
43
43
|
}
|
|
44
|
+
let websocketProtocol = "wss";
|
|
45
|
+
if (baseUrl.startsWith("http://")) {
|
|
46
|
+
websocketProtocol = "ws";
|
|
47
|
+
}
|
|
44
48
|
this.wsClient = createClient({
|
|
45
|
-
url:
|
|
49
|
+
url: `${websocketProtocol}://${this.stripProtocol(this.baseUrl)}/${
|
|
50
|
+
this.schemaEndpoint
|
|
51
|
+
}`,
|
|
46
52
|
connectionParams: () => authProvider.addWsConnectionParams({}),
|
|
47
53
|
webSocketImpl: websocketImpl,
|
|
48
54
|
});
|