hypha-rpc 0.20.70 → 0.20.72
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/hypha-rpc-websocket.js +22 -1
- package/dist/hypha-rpc-websocket.js.map +1 -1
- package/dist/hypha-rpc-websocket.min.js +1 -1
- package/dist/hypha-rpc-websocket.min.js.map +1 -1
- package/dist/hypha-rpc-websocket.min.mjs +1 -1
- package/dist/hypha-rpc-websocket.min.mjs.map +1 -1
- package/dist/hypha-rpc-websocket.mjs +22 -1
- package/dist/hypha-rpc-websocket.mjs.map +1 -1
- package/package.json +4 -4
- package/src/rpc.js +1 -1
- package/src/websocket-client.js +21 -0
- package/.eslintrc +0 -4
- package/.prettierignore +0 -3
- package/karma.conf.js +0 -114
- package/tests/.eslintrc.js +0 -8
- package/tests/server_compatibility_test.js +0 -105
- package/tests/utils_test.js +0 -205
- package/tests/websocket_client_test.js +0 -921
- package/webpack.config.js +0 -60
|
@@ -1888,7 +1888,7 @@ class RPC extends _utils_index_js__WEBPACK_IMPORTED_MODULE_0__.MessageEmitter {
|
|
|
1888
1888
|
aObject instanceof String ||
|
|
1889
1889
|
aObject instanceof Date ||
|
|
1890
1890
|
aObject instanceof RegExp ||
|
|
1891
|
-
aObject instanceof ImageData ||
|
|
1891
|
+
(typeof ImageData !== "undefined" && aObject instanceof ImageData) ||
|
|
1892
1892
|
(typeof FileList !== "undefined" && aObject instanceof FileList) ||
|
|
1893
1893
|
(typeof FileSystemDirectoryHandle !== "undefined" &&
|
|
1894
1894
|
aObject instanceof FileSystemDirectoryHandle) ||
|
|
@@ -5795,6 +5795,27 @@ async function connectToServer(config) {
|
|
|
5795
5795
|
clientId = (0,_utils_index_js__WEBPACK_IMPORTED_MODULE_1__.randId)();
|
|
5796
5796
|
config.client_id = clientId;
|
|
5797
5797
|
}
|
|
5798
|
+
if (Object.keys(config).length === 0) {
|
|
5799
|
+
if (typeof process !== "undefined" && process.env) {
|
|
5800
|
+
// Node.js
|
|
5801
|
+
config.server_url = process.env.HYPHA_SERVER_URL;
|
|
5802
|
+
config.token = process.env.HYPHA_TOKEN;
|
|
5803
|
+
config.client_id = process.env.HYPHA_CLIENT_ID;
|
|
5804
|
+
config.workspace = process.env.HYPHA_WORKSPACE;
|
|
5805
|
+
} else if (typeof self !== "undefined" && self.env) {
|
|
5806
|
+
// WebWorker (only if you inject self.env manually)
|
|
5807
|
+
config.server_url = self.env.HYPHA_SERVER_URL;
|
|
5808
|
+
config.token = self.env.HYPHA_TOKEN;
|
|
5809
|
+
config.client_id = self.env.HYPHA_CLIENT_ID;
|
|
5810
|
+
config.workspace = self.env.HYPHA_WORKSPACE;
|
|
5811
|
+
} else if (typeof globalThis !== "undefined" && globalThis.env) {
|
|
5812
|
+
// Browser (only if you define globalThis.env beforehand)
|
|
5813
|
+
config.server_url = globalThis.env.HYPHA_SERVER_URL;
|
|
5814
|
+
config.token = globalThis.env.HYPHA_TOKEN;
|
|
5815
|
+
config.client_id = globalThis.env.HYPHA_CLIENT_ID;
|
|
5816
|
+
config.workspace = globalThis.env.HYPHA_WORKSPACE;
|
|
5817
|
+
}
|
|
5818
|
+
}
|
|
5798
5819
|
|
|
5799
5820
|
let server_url = normalizeServerUrl(config.server_url);
|
|
5800
5821
|
|