@blinkdotnew/sdk 0.6.1 → 0.6.2
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/dist/index.js +3 -1
- package/dist/index.mjs +3 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -2612,7 +2612,9 @@ var BlinkRealtimeChannel = class {
|
|
|
2612
2612
|
}
|
|
2613
2613
|
return new Promise((resolve, reject) => {
|
|
2614
2614
|
try {
|
|
2615
|
-
const
|
|
2615
|
+
const httpClient = this.httpClient;
|
|
2616
|
+
const coreUrl = httpClient.coreUrl || "https://core.blink.new";
|
|
2617
|
+
const baseUrl = coreUrl.includes("localhost") ? "ws://localhost:3000" : coreUrl.replace("https://", "wss://").replace("http://", "ws://");
|
|
2616
2618
|
const wsUrl = `${baseUrl}?project_id=${this.projectId}`;
|
|
2617
2619
|
const WSClass = getWebSocketClass();
|
|
2618
2620
|
this.websocket = new WSClass(wsUrl);
|
package/dist/index.mjs
CHANGED
|
@@ -2610,7 +2610,9 @@ var BlinkRealtimeChannel = class {
|
|
|
2610
2610
|
}
|
|
2611
2611
|
return new Promise((resolve, reject) => {
|
|
2612
2612
|
try {
|
|
2613
|
-
const
|
|
2613
|
+
const httpClient = this.httpClient;
|
|
2614
|
+
const coreUrl = httpClient.coreUrl || "https://core.blink.new";
|
|
2615
|
+
const baseUrl = coreUrl.includes("localhost") ? "ws://localhost:3000" : coreUrl.replace("https://", "wss://").replace("http://", "ws://");
|
|
2614
2616
|
const wsUrl = `${baseUrl}?project_id=${this.projectId}`;
|
|
2615
2617
|
const WSClass = getWebSocketClass();
|
|
2616
2618
|
this.websocket = new WSClass(wsUrl);
|