querysub 0.27.0 → 0.28.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.
package/package.json
CHANGED
|
@@ -37,6 +37,7 @@ import { getCallResultPath } from "./querysubPrediction";
|
|
|
37
37
|
import { pathValueAuthority2 } from "../0-path-value-core/NodePathAuthorities";
|
|
38
38
|
import { diskLog } from "../diagnostics/logs/diskLogger";
|
|
39
39
|
import { assertIsManagementUser } from "../diagnostics/managementPages";
|
|
40
|
+
import { getBrowserUrlNode } from "../-f-node-discovery/NodeDiscovery";
|
|
40
41
|
setFlag(require, "preact", "allowclient", true);
|
|
41
42
|
|
|
42
43
|
export { Querysub, id };
|
|
@@ -49,7 +50,15 @@ export { Querysub, id };
|
|
|
49
50
|
// very lightweight, hopefully...)
|
|
50
51
|
// - I guess we track our watches, but even that... should be fairly light, and... there
|
|
51
52
|
// is little benefit to sharding that?
|
|
52
|
-
export const querysubNodeId = lazy(() =>
|
|
53
|
+
export const querysubNodeId = lazy(() => {
|
|
54
|
+
if (isNode()) {
|
|
55
|
+
return getControllerNodeId(QuerysubController);
|
|
56
|
+
} else {
|
|
57
|
+
// NOTE: We won't be able to directly connect to some querysub nodes (because they are from other
|
|
58
|
+
// developers), so... just use the browser url.
|
|
59
|
+
return getBrowserUrlNode();
|
|
60
|
+
}
|
|
61
|
+
});
|
|
53
62
|
|
|
54
63
|
setImmediate(() => {
|
|
55
64
|
async function querysubWatchLatest(config: WatchConfig) {
|
|
@@ -19,6 +19,7 @@ import { setFlag } from "socket-function/require/compileFlags";
|
|
|
19
19
|
import cbor from "cbor-x";
|
|
20
20
|
import { FunctionMetadata } from "../3-path-functions/syncSchema";
|
|
21
21
|
import { isNode, nextId, sort } from "socket-function/src/misc";
|
|
22
|
+
import { getBrowserUrlNode } from "../-f-node-discovery/NodeDiscovery";
|
|
22
23
|
setFlag(require, "cbor-x", "allowclient", true);
|
|
23
24
|
const cborEncoder = lazy(() => new cbor.Encoder({ structuredClone: true }));
|
|
24
25
|
|