@dxos/edge-client 0.7.4 → 0.7.5-labs.35b4b42
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/lib/browser/index.mjs +109 -29
- package/dist/lib/browser/index.mjs.map +3 -3
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/node/index.cjs +109 -29
- package/dist/lib/node/index.cjs.map +3 -3
- package/dist/lib/node/meta.json +1 -1
- package/dist/lib/node-esm/index.mjs +109 -29
- package/dist/lib/node-esm/index.mjs.map +3 -3
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/types/src/edge-http-client.d.ts +5 -1
- package/dist/types/src/edge-http-client.d.ts.map +1 -1
- package/dist/types/src/edge-ws-connection.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -0
- package/package.json +14 -14
- package/src/edge-http-client.ts +84 -4
- package/src/edge-ws-connection.ts +22 -6
|
@@ -1 +1 @@
|
|
|
1
|
-
{"inputs":{"packages/core/mesh/edge-client/src/protocol.ts":{"bytes":10334,"imports":[{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/protocols/buf","kind":"import-statement","external":true},{"path":"@dxos/protocols/buf/dxos/edge/messenger_pb","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true}],"format":"esm"},"packages/core/mesh/edge-client/src/defs.ts":{"bytes":1607,"imports":[{"path":"@dxos/protocols/buf","kind":"import-statement","external":true},{"path":"@dxos/protocols/buf/dxos/edge/messenger_pb","kind":"import-statement","external":true},{"path":"packages/core/mesh/edge-client/src/protocol.ts","kind":"import-statement","original":"./protocol"}],"format":"esm"},"packages/core/mesh/edge-client/src/edge-identity.ts":{"bytes":4069,"imports":[{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/protocols/proto","kind":"import-statement","external":true}],"format":"esm"},"packages/core/mesh/edge-client/src/edge-ws-connection.ts":{"bytes":18846,"imports":[{"path":"isomorphic-ws","kind":"import-statement","external":true},{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/context","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/protocols/buf","kind":"import-statement","external":true},{"path":"@dxos/protocols/buf/dxos/edge/messenger_pb","kind":"import-statement","external":true},{"path":"packages/core/mesh/edge-client/src/defs.ts","kind":"import-statement","original":"./defs"},{"path":"packages/core/mesh/edge-client/src/protocol.ts","kind":"import-statement","original":"./protocol"}],"format":"esm"},"packages/core/mesh/edge-client/src/errors.ts":{"bytes":1265,"imports":[],"format":"esm"},"packages/core/mesh/edge-client/src/persistent-lifecycle.ts":{"bytes":12584,"imports":[{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/context","kind":"import-statement","external":true},{"path":"@dxos/debug","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true}],"format":"esm"},"packages/core/mesh/edge-client/src/utils.ts":{"bytes":1451,"imports":[],"format":"esm"},"packages/core/mesh/edge-client/src/edge-client.ts":{"bytes":34295,"imports":[{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/context","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"packages/core/mesh/edge-client/src/defs.ts","kind":"import-statement","original":"./defs"},{"path":"packages/core/mesh/edge-client/src/edge-identity.ts","kind":"import-statement","original":"./edge-identity"},{"path":"packages/core/mesh/edge-client/src/edge-ws-connection.ts","kind":"import-statement","original":"./edge-ws-connection"},{"path":"packages/core/mesh/edge-client/src/errors.ts","kind":"import-statement","original":"./errors"},{"path":"packages/core/mesh/edge-client/src/persistent-lifecycle.ts","kind":"import-statement","original":"./persistent-lifecycle"},{"path":"packages/core/mesh/edge-client/src/utils.ts","kind":"import-statement","original":"./utils"}],"format":"esm"},"packages/core/mesh/edge-client/src/auth.ts":{"bytes":12314,"imports":[{"path":"@dxos/credentials","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/keyring","kind":"import-statement","external":true},{"path":"@dxos/keys","kind":"import-statement","external":true}],"format":"esm"},"packages/core/mesh/edge-client/src/edge-http-client.ts":{"bytes":25302,"imports":[{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/context","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/protocols","kind":"import-statement","external":true},{"path":"packages/core/mesh/edge-client/src/edge-identity.ts","kind":"import-statement","original":"./edge-identity"},{"path":"packages/core/mesh/edge-client/src/utils.ts","kind":"import-statement","original":"./utils"}],"format":"esm"},"packages/core/mesh/edge-client/src/index.ts":{"bytes":1228,"imports":[{"path":"@dxos/protocols/buf/dxos/edge/messenger_pb","kind":"import-statement","external":true},{"path":"packages/core/mesh/edge-client/src/edge-client.ts","kind":"import-statement","original":"./edge-client"},{"path":"packages/core/mesh/edge-client/src/defs.ts","kind":"import-statement","original":"./defs"},{"path":"packages/core/mesh/edge-client/src/protocol.ts","kind":"import-statement","original":"./protocol"},{"path":"packages/core/mesh/edge-client/src/errors.ts","kind":"import-statement","original":"./errors"},{"path":"packages/core/mesh/edge-client/src/auth.ts","kind":"import-statement","original":"./auth"},{"path":"packages/core/mesh/edge-client/src/edge-http-client.ts","kind":"import-statement","original":"./edge-http-client"},{"path":"packages/core/mesh/edge-client/src/edge-identity.ts","kind":"import-statement","original":"./edge-identity"}],"format":"esm"},"packages/core/mesh/edge-client/src/testing/test-utils.ts":{"bytes":13201,"imports":[{"path":"isomorphic-ws","kind":"import-statement","external":true},{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/protocols/buf","kind":"import-statement","external":true},{"path":"@dxos/protocols/buf/dxos/edge/messenger_pb","kind":"import-statement","external":true},{"path":"packages/core/mesh/edge-client/src/defs.ts","kind":"import-statement","original":"../defs"},{"path":"packages/core/mesh/edge-client/src/protocol.ts","kind":"import-statement","original":"../protocol"}],"format":"esm"},"packages/core/mesh/edge-client/src/testing/index.ts":{"bytes":516,"imports":[{"path":"packages/core/mesh/edge-client/src/testing/test-utils.ts","kind":"import-statement","original":"./test-utils"}],"format":"esm"}},"outputs":{"packages/core/mesh/edge-client/dist/lib/browser/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":51390},"packages/core/mesh/edge-client/dist/lib/browser/index.mjs":{"imports":[{"path":"packages/core/mesh/edge-client/dist/lib/browser/chunk-ZWJXA37R.mjs","kind":"import-statement"},{"path":"@dxos/protocols/buf/dxos/edge/messenger_pb","kind":"import-statement","external":true},{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/context","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/protocols/proto","kind":"import-statement","external":true},{"path":"isomorphic-ws","kind":"import-statement","external":true},{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/context","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/protocols/buf","kind":"import-statement","external":true},{"path":"@dxos/protocols/buf/dxos/edge/messenger_pb","kind":"import-statement","external":true},{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/context","kind":"import-statement","external":true},{"path":"@dxos/debug","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/credentials","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/keyring","kind":"import-statement","external":true},{"path":"@dxos/keys","kind":"import-statement","external":true},{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/context","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/protocols","kind":"import-statement","external":true}],"exports":["EdgeClient","EdgeConnectionClosedError","EdgeHttpClient","EdgeIdentityChangedError","Protocol","createChainEdgeIdentity","createDeviceEdgeIdentity","createEphemeralEdgeIdentity","createStubEdgeIdentity","createTestHaloEdgeIdentity","getTypename","handleAuthChallenge","protocol","toUint8Array"],"entryPoint":"packages/core/mesh/edge-client/src/index.ts","inputs":{"packages/core/mesh/edge-client/src/index.ts":{"bytesInOutput":60},"packages/core/mesh/edge-client/src/edge-client.ts":{"bytesInOutput":9076},"packages/core/mesh/edge-client/src/edge-identity.ts":{"bytesInOutput":1150},"packages/core/mesh/edge-client/src/edge-ws-connection.ts":{"bytesInOutput":5569},"packages/core/mesh/edge-client/src/errors.ts":{"bytesInOutput":232},"packages/core/mesh/edge-client/src/persistent-lifecycle.ts":{"bytesInOutput":3547},"packages/core/mesh/edge-client/src/utils.ts":{"bytesInOutput":244},"packages/core/mesh/edge-client/src/auth.ts":{"bytesInOutput":2993},"packages/core/mesh/edge-client/src/edge-http-client.ts":{"bytesInOutput":6050}},"bytes":29909},"packages/core/mesh/edge-client/dist/lib/browser/testing/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":6741},"packages/core/mesh/edge-client/dist/lib/browser/testing/index.mjs":{"imports":[{"path":"packages/core/mesh/edge-client/dist/lib/browser/chunk-ZWJXA37R.mjs","kind":"import-statement"},{"path":"isomorphic-ws","kind":"import-statement","external":true},{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/protocols/buf","kind":"import-statement","external":true},{"path":"@dxos/protocols/buf/dxos/edge/messenger_pb","kind":"import-statement","external":true}],"exports":["DEFAULT_PORT","createTestEdgeWsServer"],"entryPoint":"packages/core/mesh/edge-client/src/testing/index.ts","inputs":{"packages/core/mesh/edge-client/src/testing/test-utils.ts":{"bytesInOutput":3466},"packages/core/mesh/edge-client/src/testing/index.ts":{"bytesInOutput":0}},"bytes":3683},"packages/core/mesh/edge-client/dist/lib/browser/chunk-ZWJXA37R.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":5676},"packages/core/mesh/edge-client/dist/lib/browser/chunk-ZWJXA37R.mjs":{"imports":[{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/protocols/buf","kind":"import-statement","external":true},{"path":"@dxos/protocols/buf/dxos/edge/messenger_pb","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"@dxos/protocols/buf","kind":"import-statement","external":true},{"path":"@dxos/protocols/buf/dxos/edge/messenger_pb","kind":"import-statement","external":true}],"exports":["Protocol","getTypename","protocol","toUint8Array"],"inputs":{"packages/core/mesh/edge-client/src/protocol.ts":{"bytesInOutput":2600},"packages/core/mesh/edge-client/src/defs.ts":{"bytesInOutput":298}},"bytes":3106}}}
|
|
1
|
+
{"inputs":{"packages/core/mesh/edge-client/src/protocol.ts":{"bytes":10334,"imports":[{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/protocols/buf","kind":"import-statement","external":true},{"path":"@dxos/protocols/buf/dxos/edge/messenger_pb","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true}],"format":"esm"},"packages/core/mesh/edge-client/src/defs.ts":{"bytes":1607,"imports":[{"path":"@dxos/protocols/buf","kind":"import-statement","external":true},{"path":"@dxos/protocols/buf/dxos/edge/messenger_pb","kind":"import-statement","external":true},{"path":"packages/core/mesh/edge-client/src/protocol.ts","kind":"import-statement","original":"./protocol"}],"format":"esm"},"packages/core/mesh/edge-client/src/edge-identity.ts":{"bytes":4069,"imports":[{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/protocols/proto","kind":"import-statement","external":true}],"format":"esm"},"packages/core/mesh/edge-client/src/edge-ws-connection.ts":{"bytes":21466,"imports":[{"path":"isomorphic-ws","kind":"import-statement","external":true},{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/context","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/protocols/buf","kind":"import-statement","external":true},{"path":"@dxos/protocols/buf/dxos/edge/messenger_pb","kind":"import-statement","external":true},{"path":"packages/core/mesh/edge-client/src/defs.ts","kind":"import-statement","original":"./defs"},{"path":"packages/core/mesh/edge-client/src/protocol.ts","kind":"import-statement","original":"./protocol"}],"format":"esm"},"packages/core/mesh/edge-client/src/errors.ts":{"bytes":1265,"imports":[],"format":"esm"},"packages/core/mesh/edge-client/src/persistent-lifecycle.ts":{"bytes":12584,"imports":[{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/context","kind":"import-statement","external":true},{"path":"@dxos/debug","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true}],"format":"esm"},"packages/core/mesh/edge-client/src/utils.ts":{"bytes":1451,"imports":[],"format":"esm"},"packages/core/mesh/edge-client/src/edge-client.ts":{"bytes":34295,"imports":[{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/context","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"packages/core/mesh/edge-client/src/defs.ts","kind":"import-statement","original":"./defs"},{"path":"packages/core/mesh/edge-client/src/edge-identity.ts","kind":"import-statement","original":"./edge-identity"},{"path":"packages/core/mesh/edge-client/src/edge-ws-connection.ts","kind":"import-statement","original":"./edge-ws-connection"},{"path":"packages/core/mesh/edge-client/src/errors.ts","kind":"import-statement","original":"./errors"},{"path":"packages/core/mesh/edge-client/src/persistent-lifecycle.ts","kind":"import-statement","original":"./persistent-lifecycle"},{"path":"packages/core/mesh/edge-client/src/utils.ts","kind":"import-statement","original":"./utils"}],"format":"esm"},"packages/core/mesh/edge-client/src/auth.ts":{"bytes":12314,"imports":[{"path":"@dxos/credentials","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/keyring","kind":"import-statement","external":true},{"path":"@dxos/keys","kind":"import-statement","external":true}],"format":"esm"},"packages/core/mesh/edge-client/src/edge-http-client.ts":{"bytes":32761,"imports":[{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/context","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/protocols","kind":"import-statement","external":true},{"path":"packages/core/mesh/edge-client/src/edge-identity.ts","kind":"import-statement","original":"./edge-identity"},{"path":"packages/core/mesh/edge-client/src/utils.ts","kind":"import-statement","original":"./utils"}],"format":"esm"},"packages/core/mesh/edge-client/src/index.ts":{"bytes":1228,"imports":[{"path":"@dxos/protocols/buf/dxos/edge/messenger_pb","kind":"import-statement","external":true},{"path":"packages/core/mesh/edge-client/src/edge-client.ts","kind":"import-statement","original":"./edge-client"},{"path":"packages/core/mesh/edge-client/src/defs.ts","kind":"import-statement","original":"./defs"},{"path":"packages/core/mesh/edge-client/src/protocol.ts","kind":"import-statement","original":"./protocol"},{"path":"packages/core/mesh/edge-client/src/errors.ts","kind":"import-statement","original":"./errors"},{"path":"packages/core/mesh/edge-client/src/auth.ts","kind":"import-statement","original":"./auth"},{"path":"packages/core/mesh/edge-client/src/edge-http-client.ts","kind":"import-statement","original":"./edge-http-client"},{"path":"packages/core/mesh/edge-client/src/edge-identity.ts","kind":"import-statement","original":"./edge-identity"}],"format":"esm"},"packages/core/mesh/edge-client/src/testing/test-utils.ts":{"bytes":13201,"imports":[{"path":"isomorphic-ws","kind":"import-statement","external":true},{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/protocols/buf","kind":"import-statement","external":true},{"path":"@dxos/protocols/buf/dxos/edge/messenger_pb","kind":"import-statement","external":true},{"path":"packages/core/mesh/edge-client/src/defs.ts","kind":"import-statement","original":"../defs"},{"path":"packages/core/mesh/edge-client/src/protocol.ts","kind":"import-statement","original":"../protocol"}],"format":"esm"},"packages/core/mesh/edge-client/src/testing/index.ts":{"bytes":516,"imports":[{"path":"packages/core/mesh/edge-client/src/testing/test-utils.ts","kind":"import-statement","original":"./test-utils"}],"format":"esm"}},"outputs":{"packages/core/mesh/edge-client/dist/lib/browser/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":56329},"packages/core/mesh/edge-client/dist/lib/browser/index.mjs":{"imports":[{"path":"packages/core/mesh/edge-client/dist/lib/browser/chunk-ZWJXA37R.mjs","kind":"import-statement"},{"path":"@dxos/protocols/buf/dxos/edge/messenger_pb","kind":"import-statement","external":true},{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/context","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/protocols/proto","kind":"import-statement","external":true},{"path":"isomorphic-ws","kind":"import-statement","external":true},{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/context","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/protocols/buf","kind":"import-statement","external":true},{"path":"@dxos/protocols/buf/dxos/edge/messenger_pb","kind":"import-statement","external":true},{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/context","kind":"import-statement","external":true},{"path":"@dxos/debug","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/credentials","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/keyring","kind":"import-statement","external":true},{"path":"@dxos/keys","kind":"import-statement","external":true},{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/context","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/protocols","kind":"import-statement","external":true}],"exports":["EdgeClient","EdgeConnectionClosedError","EdgeHttpClient","EdgeIdentityChangedError","Protocol","createChainEdgeIdentity","createDeviceEdgeIdentity","createEphemeralEdgeIdentity","createStubEdgeIdentity","createTestHaloEdgeIdentity","getTypename","handleAuthChallenge","protocol","toUint8Array"],"entryPoint":"packages/core/mesh/edge-client/src/index.ts","inputs":{"packages/core/mesh/edge-client/src/index.ts":{"bytesInOutput":60},"packages/core/mesh/edge-client/src/edge-client.ts":{"bytesInOutput":9076},"packages/core/mesh/edge-client/src/edge-identity.ts":{"bytesInOutput":1150},"packages/core/mesh/edge-client/src/edge-ws-connection.ts":{"bytesInOutput":6334},"packages/core/mesh/edge-client/src/errors.ts":{"bytesInOutput":232},"packages/core/mesh/edge-client/src/persistent-lifecycle.ts":{"bytesInOutput":3547},"packages/core/mesh/edge-client/src/utils.ts":{"bytesInOutput":244},"packages/core/mesh/edge-client/src/auth.ts":{"bytesInOutput":2993},"packages/core/mesh/edge-client/src/edge-http-client.ts":{"bytesInOutput":7706}},"bytes":32330},"packages/core/mesh/edge-client/dist/lib/browser/testing/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":6741},"packages/core/mesh/edge-client/dist/lib/browser/testing/index.mjs":{"imports":[{"path":"packages/core/mesh/edge-client/dist/lib/browser/chunk-ZWJXA37R.mjs","kind":"import-statement"},{"path":"isomorphic-ws","kind":"import-statement","external":true},{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/protocols/buf","kind":"import-statement","external":true},{"path":"@dxos/protocols/buf/dxos/edge/messenger_pb","kind":"import-statement","external":true}],"exports":["DEFAULT_PORT","createTestEdgeWsServer"],"entryPoint":"packages/core/mesh/edge-client/src/testing/index.ts","inputs":{"packages/core/mesh/edge-client/src/testing/test-utils.ts":{"bytesInOutput":3466},"packages/core/mesh/edge-client/src/testing/index.ts":{"bytesInOutput":0}},"bytes":3683},"packages/core/mesh/edge-client/dist/lib/browser/chunk-ZWJXA37R.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":5676},"packages/core/mesh/edge-client/dist/lib/browser/chunk-ZWJXA37R.mjs":{"imports":[{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/protocols/buf","kind":"import-statement","external":true},{"path":"@dxos/protocols/buf/dxos/edge/messenger_pb","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"@dxos/protocols/buf","kind":"import-statement","external":true},{"path":"@dxos/protocols/buf/dxos/edge/messenger_pb","kind":"import-statement","external":true}],"exports":["Protocol","getTypename","protocol","toUint8Array"],"inputs":{"packages/core/mesh/edge-client/src/protocol.ts":{"bytesInOutput":2600},"packages/core/mesh/edge-client/src/defs.ts":{"bytesInOutput":298}},"bytes":3106}}}
|
package/dist/lib/node/index.cjs
CHANGED
|
@@ -114,7 +114,9 @@ function _ts_decorate(decorators, target, key, desc) {
|
|
|
114
114
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
115
115
|
}
|
|
116
116
|
var __dxlog_file2 = "/home/runner/work/dxos/dxos/packages/core/mesh/edge-client/src/edge-ws-connection.ts";
|
|
117
|
-
var SIGNAL_KEEPALIVE_INTERVAL =
|
|
117
|
+
var SIGNAL_KEEPALIVE_INTERVAL = 4e3;
|
|
118
|
+
var SIGNAL_KEEPALIVE_TIMEOUT = 12e3;
|
|
119
|
+
var CLOUDFLARE_MESSAGE_LENGTH_LIMIT = 1024 * 1024;
|
|
118
120
|
var EdgeWsConnection = class extends import_context2.Resource {
|
|
119
121
|
constructor(_identity, _connectionInfo, _callbacks) {
|
|
120
122
|
super();
|
|
@@ -132,7 +134,7 @@ var EdgeWsConnection = class extends import_context2.Resource {
|
|
|
132
134
|
send(message) {
|
|
133
135
|
(0, import_invariant2.invariant)(this._ws, void 0, {
|
|
134
136
|
F: __dxlog_file2,
|
|
135
|
-
L:
|
|
137
|
+
L: 54,
|
|
136
138
|
S: this,
|
|
137
139
|
A: [
|
|
138
140
|
"this._ws",
|
|
@@ -144,21 +146,35 @@ var EdgeWsConnection = class extends import_context2.Resource {
|
|
|
144
146
|
payload: import_chunk_ANV2HBEH.protocol.getPayloadType(message)
|
|
145
147
|
}, {
|
|
146
148
|
F: __dxlog_file2,
|
|
147
|
-
L:
|
|
149
|
+
L: 55,
|
|
148
150
|
S: this,
|
|
149
151
|
C: (f, a) => f(...a)
|
|
150
152
|
});
|
|
151
|
-
|
|
153
|
+
const encoded = import_buf.buf.toBinary(import_messenger_pb.MessageSchema, message);
|
|
154
|
+
if (encoded.byteLength >= CLOUDFLARE_MESSAGE_LENGTH_LIMIT) {
|
|
155
|
+
import_log2.log.error("edge message dropped due to websocket message limit", {
|
|
156
|
+
byteLength: encoded.byteLength,
|
|
157
|
+
serviceId: message.serviceId,
|
|
158
|
+
payload: import_chunk_ANV2HBEH.protocol.getPayloadType(message)
|
|
159
|
+
}, {
|
|
160
|
+
F: __dxlog_file2,
|
|
161
|
+
L: 58,
|
|
162
|
+
S: this,
|
|
163
|
+
C: (f, a) => f(...a)
|
|
164
|
+
});
|
|
165
|
+
return;
|
|
166
|
+
}
|
|
167
|
+
this._ws.send(encoded);
|
|
152
168
|
}
|
|
153
169
|
async _open() {
|
|
154
|
-
this._ws = new import_isomorphic_ws.default(this._connectionInfo.url, this._connectionInfo.protocolHeader ? [
|
|
170
|
+
this._ws = new import_isomorphic_ws.default(this._connectionInfo.url.toString(), this._connectionInfo.protocolHeader ? [
|
|
155
171
|
this._connectionInfo.protocolHeader
|
|
156
172
|
] : []);
|
|
157
173
|
this._ws.onopen = () => {
|
|
158
174
|
if (this.isOpen) {
|
|
159
175
|
(0, import_log2.log)("connected", void 0, {
|
|
160
176
|
F: __dxlog_file2,
|
|
161
|
-
L:
|
|
177
|
+
L: 76,
|
|
162
178
|
S: this,
|
|
163
179
|
C: (f, a) => f(...a)
|
|
164
180
|
});
|
|
@@ -169,17 +185,20 @@ var EdgeWsConnection = class extends import_context2.Resource {
|
|
|
169
185
|
currentIdentity: this._identity
|
|
170
186
|
}, {
|
|
171
187
|
F: __dxlog_file2,
|
|
172
|
-
L:
|
|
188
|
+
L: 80,
|
|
173
189
|
S: this,
|
|
174
190
|
C: (f, a) => f(...a)
|
|
175
191
|
});
|
|
176
192
|
}
|
|
177
193
|
};
|
|
178
|
-
this._ws.onclose = () => {
|
|
194
|
+
this._ws.onclose = (event) => {
|
|
179
195
|
if (this.isOpen) {
|
|
180
|
-
|
|
196
|
+
import_log2.log.warn("disconnected while being open", {
|
|
197
|
+
code: event.code,
|
|
198
|
+
reason: event.reason
|
|
199
|
+
}, {
|
|
181
200
|
F: __dxlog_file2,
|
|
182
|
-
L:
|
|
201
|
+
L: 85,
|
|
183
202
|
S: this,
|
|
184
203
|
C: (f, a) => f(...a)
|
|
185
204
|
});
|
|
@@ -193,7 +212,7 @@ var EdgeWsConnection = class extends import_context2.Resource {
|
|
|
193
212
|
info: event.message
|
|
194
213
|
}, {
|
|
195
214
|
F: __dxlog_file2,
|
|
196
|
-
L:
|
|
215
|
+
L: 91,
|
|
197
216
|
S: this,
|
|
198
217
|
C: (f, a) => f(...a)
|
|
199
218
|
});
|
|
@@ -203,7 +222,7 @@ var EdgeWsConnection = class extends import_context2.Resource {
|
|
|
203
222
|
error: event.error
|
|
204
223
|
}, {
|
|
205
224
|
F: __dxlog_file2,
|
|
206
|
-
L:
|
|
225
|
+
L: 94,
|
|
207
226
|
S: this,
|
|
208
227
|
C: (f, a) => f(...a)
|
|
209
228
|
});
|
|
@@ -215,7 +234,7 @@ var EdgeWsConnection = class extends import_context2.Resource {
|
|
|
215
234
|
event: event.type
|
|
216
235
|
}, {
|
|
217
236
|
F: __dxlog_file2,
|
|
218
|
-
L:
|
|
237
|
+
L: 102,
|
|
219
238
|
S: this,
|
|
220
239
|
C: (f, a) => f(...a)
|
|
221
240
|
});
|
|
@@ -233,7 +252,7 @@ var EdgeWsConnection = class extends import_context2.Resource {
|
|
|
233
252
|
payload: import_chunk_ANV2HBEH.protocol.getPayloadType(message)
|
|
234
253
|
}, {
|
|
235
254
|
F: __dxlog_file2,
|
|
236
|
-
L:
|
|
255
|
+
L: 112,
|
|
237
256
|
S: this,
|
|
238
257
|
C: (f, a) => f(...a)
|
|
239
258
|
});
|
|
@@ -255,7 +274,7 @@ var EdgeWsConnection = class extends import_context2.Resource {
|
|
|
255
274
|
err
|
|
256
275
|
}, {
|
|
257
276
|
F: __dxlog_file2,
|
|
258
|
-
L:
|
|
277
|
+
L: 128,
|
|
259
278
|
S: this,
|
|
260
279
|
C: (f, a) => f(...a)
|
|
261
280
|
});
|
|
@@ -264,7 +283,7 @@ var EdgeWsConnection = class extends import_context2.Resource {
|
|
|
264
283
|
_scheduleHeartbeats() {
|
|
265
284
|
(0, import_invariant2.invariant)(this._ws, void 0, {
|
|
266
285
|
F: __dxlog_file2,
|
|
267
|
-
L:
|
|
286
|
+
L: 133,
|
|
268
287
|
S: this,
|
|
269
288
|
A: [
|
|
270
289
|
"this._ws",
|
|
@@ -284,13 +303,19 @@ var EdgeWsConnection = class extends import_context2.Resource {
|
|
|
284
303
|
void this._inactivityTimeoutCtx?.dispose();
|
|
285
304
|
this._inactivityTimeoutCtx = new import_context2.Context(void 0, {
|
|
286
305
|
F: __dxlog_file2,
|
|
287
|
-
L:
|
|
306
|
+
L: 152
|
|
288
307
|
});
|
|
289
308
|
(0, import_async2.scheduleTask)(this._inactivityTimeoutCtx, () => {
|
|
290
309
|
if (this.isOpen) {
|
|
310
|
+
import_log2.log.warn("restart due to inactivity timeout", void 0, {
|
|
311
|
+
F: __dxlog_file2,
|
|
312
|
+
L: 157,
|
|
313
|
+
S: this,
|
|
314
|
+
C: (f, a) => f(...a)
|
|
315
|
+
});
|
|
291
316
|
this._callbacks.onRestartRequired();
|
|
292
317
|
}
|
|
293
|
-
},
|
|
318
|
+
}, SIGNAL_KEEPALIVE_TIMEOUT);
|
|
294
319
|
}
|
|
295
320
|
};
|
|
296
321
|
_ts_decorate([
|
|
@@ -831,7 +856,7 @@ var EdgeHttpClient = class {
|
|
|
831
856
|
url: this._baseUrl
|
|
832
857
|
}, {
|
|
833
858
|
F: __dxlog_file6,
|
|
834
|
-
L:
|
|
859
|
+
L: 49,
|
|
835
860
|
S: this,
|
|
836
861
|
C: (f, a) => f(...a)
|
|
837
862
|
});
|
|
@@ -882,6 +907,13 @@ var EdgeHttpClient = class {
|
|
|
882
907
|
method: "POST"
|
|
883
908
|
});
|
|
884
909
|
}
|
|
910
|
+
async executeWorkflow(spaceId, graphId, input, args) {
|
|
911
|
+
return this._call(`/workflows/${spaceId}/${graphId}`, {
|
|
912
|
+
...args,
|
|
913
|
+
body: input,
|
|
914
|
+
method: "POST"
|
|
915
|
+
});
|
|
916
|
+
}
|
|
885
917
|
async uploadFunction(pathParts, body, args) {
|
|
886
918
|
const path = [
|
|
887
919
|
"functions",
|
|
@@ -896,20 +928,68 @@ var EdgeHttpClient = class {
|
|
|
896
928
|
method: "PUT"
|
|
897
929
|
});
|
|
898
930
|
}
|
|
931
|
+
async queryQueue(subspaceTag, spaceId, query, args) {
|
|
932
|
+
const { queueId } = query;
|
|
933
|
+
const queryParams = new URLSearchParams();
|
|
934
|
+
if (query.after != null) {
|
|
935
|
+
queryParams.set("after", query.after);
|
|
936
|
+
}
|
|
937
|
+
if (query.before != null) {
|
|
938
|
+
queryParams.set("before", query.before);
|
|
939
|
+
}
|
|
940
|
+
if (query.limit != null) {
|
|
941
|
+
queryParams.set("limit", query.limit.toString());
|
|
942
|
+
}
|
|
943
|
+
if (query.reverse != null) {
|
|
944
|
+
queryParams.set("reverse", query.reverse.toString());
|
|
945
|
+
}
|
|
946
|
+
if (query.objectIds != null) {
|
|
947
|
+
queryParams.set("objectIds", query.objectIds.join(","));
|
|
948
|
+
}
|
|
949
|
+
return this._call(`/spaces/${subspaceTag}/${spaceId}/queue/${queueId}/query?${queryParams.toString()}`, {
|
|
950
|
+
...args,
|
|
951
|
+
method: "GET"
|
|
952
|
+
});
|
|
953
|
+
}
|
|
954
|
+
async insertIntoQueue(subspaceTag, spaceId, queueId, objects, args) {
|
|
955
|
+
return this._call(`/spaces/${subspaceTag}/${spaceId}/queue/${queueId}`, {
|
|
956
|
+
...args,
|
|
957
|
+
body: {
|
|
958
|
+
objects
|
|
959
|
+
},
|
|
960
|
+
method: "POST"
|
|
961
|
+
});
|
|
962
|
+
}
|
|
963
|
+
async deleteFromQueue(subspaceTag, spaceId, queueId, objectIds, args) {
|
|
964
|
+
return this._call(`/spaces/${subspaceTag}/${spaceId}/queue/${queueId}`, {
|
|
965
|
+
...args,
|
|
966
|
+
query: {
|
|
967
|
+
ids: objectIds.join(",")
|
|
968
|
+
},
|
|
969
|
+
method: "DELETE"
|
|
970
|
+
});
|
|
971
|
+
}
|
|
899
972
|
async _call(path, args) {
|
|
900
973
|
const requestContext = args.context ?? new import_context4.Context(void 0, {
|
|
901
974
|
F: __dxlog_file6,
|
|
902
|
-
L:
|
|
975
|
+
L: 173
|
|
903
976
|
});
|
|
904
977
|
const shouldRetry = createRetryHandler(args);
|
|
905
|
-
|
|
906
|
-
|
|
978
|
+
let url = `${this._baseUrl}${path.startsWith("/") ? path.slice(1) : path}`;
|
|
979
|
+
if (args.query) {
|
|
980
|
+
const queryParams = new URLSearchParams();
|
|
981
|
+
for (const [key, value] of Object.entries(args.query)) {
|
|
982
|
+
queryParams.set(key, value.toString());
|
|
983
|
+
}
|
|
984
|
+
url += `?${queryParams.toString()}`;
|
|
985
|
+
}
|
|
986
|
+
(0, import_log4.log)("call", {
|
|
907
987
|
method: args.method,
|
|
908
988
|
path,
|
|
909
989
|
request: args.body
|
|
910
990
|
}, {
|
|
911
991
|
F: __dxlog_file6,
|
|
912
|
-
L:
|
|
992
|
+
L: 185,
|
|
913
993
|
S: this,
|
|
914
994
|
C: (f, a) => f(...a)
|
|
915
995
|
});
|
|
@@ -927,12 +1007,12 @@ var EdgeHttpClient = class {
|
|
|
927
1007
|
if (body.success) {
|
|
928
1008
|
return body.data;
|
|
929
1009
|
}
|
|
930
|
-
import_log4.log
|
|
1010
|
+
(0, import_log4.log)("unsuccessful edge response", {
|
|
931
1011
|
path,
|
|
932
1012
|
body
|
|
933
1013
|
}, {
|
|
934
1014
|
F: __dxlog_file6,
|
|
935
|
-
L:
|
|
1015
|
+
L: 204,
|
|
936
1016
|
S: this,
|
|
937
1017
|
C: (f, a) => f(...a)
|
|
938
1018
|
});
|
|
@@ -952,12 +1032,12 @@ var EdgeHttpClient = class {
|
|
|
952
1032
|
processingError = import_protocols.EdgeCallFailedError.fromProcessingFailureCause(error);
|
|
953
1033
|
}
|
|
954
1034
|
if (processingError.isRetryable && await shouldRetry(requestContext, retryAfterHeaderValue)) {
|
|
955
|
-
import_log4.log
|
|
1035
|
+
(0, import_log4.log)("retrying edge request", {
|
|
956
1036
|
path,
|
|
957
1037
|
processingError
|
|
958
1038
|
}, {
|
|
959
1039
|
F: __dxlog_file6,
|
|
960
|
-
L:
|
|
1040
|
+
L: 223,
|
|
961
1041
|
S: this,
|
|
962
1042
|
C: (f, a) => f(...a)
|
|
963
1043
|
});
|
|
@@ -970,7 +1050,7 @@ var EdgeHttpClient = class {
|
|
|
970
1050
|
if (!this._edgeIdentity) {
|
|
971
1051
|
import_log4.log.warn("edge unauthorized response received before identity was set", void 0, {
|
|
972
1052
|
F: __dxlog_file6,
|
|
973
|
-
L:
|
|
1053
|
+
L: 232,
|
|
974
1054
|
S: this,
|
|
975
1055
|
C: (f, a) => f(...a)
|
|
976
1056
|
});
|
|
@@ -980,7 +1060,7 @@ var EdgeHttpClient = class {
|
|
|
980
1060
|
this._authHeader = encodeAuthHeader(challenge);
|
|
981
1061
|
(0, import_log4.log)("auth header updated", void 0, {
|
|
982
1062
|
F: __dxlog_file6,
|
|
983
|
-
L:
|
|
1063
|
+
L: 237,
|
|
984
1064
|
S: this,
|
|
985
1065
|
C: (f, a) => f(...a)
|
|
986
1066
|
});
|