@dxos/edge-client 0.8.4-main.84f28bd → 0.8.4-main.c1de068
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 +41 -28
- package/dist/lib/browser/index.mjs.map +3 -3
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/node-esm/index.mjs +41 -28
- 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 +1 -0
- package/dist/types/src/edge-http-client.d.ts.map +1 -1
- package/dist/types/src/edge-ws-connection.d.ts +1 -0
- package/dist/types/src/edge-ws-connection.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +15 -15
- package/src/edge-http-client.ts +4 -0
- package/src/edge-ws-connection.ts +10 -2
- package/src/http-client.test.ts +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"inputs":{"src/protocol.ts":{"bytes":10133,"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"},"src/defs.ts":{"bytes":1550,"imports":[{"path":"@dxos/protocols/buf","kind":"import-statement","external":true},{"path":"@dxos/protocols/buf/dxos/edge/messenger_pb","kind":"import-statement","external":true},{"path":"src/protocol.ts","kind":"import-statement","original":"./protocol"}],"format":"esm"},"src/edge-ws-muxer.ts":{"bytes":24135,"imports":[{"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":"src/defs.ts","kind":"import-statement","original":"./defs"}],"format":"esm"},"src/edge-identity.ts":{"bytes":3976,"imports":[{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/protocols/proto","kind":"import-statement","external":true}],"format":"esm"},"src/edge-ws-connection.ts":{"bytes":24053,"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","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":"src/defs.ts","kind":"import-statement","original":"./defs"},{"path":"src/edge-ws-muxer.ts","kind":"import-statement","original":"./edge-ws-muxer"},{"path":"src/protocol.ts","kind":"import-statement","original":"./protocol"}],"format":"esm"},"src/errors.ts":{"bytes":1188,"imports":[],"format":"esm"},"src/utils.ts":{"bytes":1398,"imports":[],"format":"esm"},"src/edge-client.ts":{"bytes":35116,"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/proto/dxos/client/services","kind":"import-statement","external":true},{"path":"src/defs.ts","kind":"import-statement","original":"./defs"},{"path":"src/edge-identity.ts","kind":"import-statement","original":"./edge-identity"},{"path":"src/edge-ws-connection.ts","kind":"import-statement","original":"./edge-ws-connection"},{"path":"src/errors.ts","kind":"import-statement","original":"./errors"},{"path":"src/utils.ts","kind":"import-statement","original":"./utils"}],"format":"esm"},"src/auth.ts":{"bytes":12117,"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"},"src/http-client.ts":{"bytes":6673,"imports":[{"path":"effect","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true}],"format":"esm"},"src/edge-http-client.ts":{"bytes":35303,"imports":[{"path":"@effect/platform","kind":"import-statement","external":true},{"path":"effect","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},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"src/edge-identity.ts","kind":"import-statement","original":"./edge-identity"},{"path":"src/http-client.ts","kind":"import-statement","original":"./http-client"},{"path":"src/utils.ts","kind":"import-statement","original":"./utils"}],"format":"esm"},"src/index.ts":{"bytes":1280,"imports":[{"path":"@dxos/protocols/buf/dxos/edge/messenger_pb","kind":"import-statement","external":true},{"path":"src/edge-client.ts","kind":"import-statement","original":"./edge-client"},{"path":"src/defs.ts","kind":"import-statement","original":"./defs"},{"path":"src/protocol.ts","kind":"import-statement","original":"./protocol"},{"path":"src/errors.ts","kind":"import-statement","original":"./errors"},{"path":"src/auth.ts","kind":"import-statement","original":"./auth"},{"path":"src/edge-http-client.ts","kind":"import-statement","original":"./edge-http-client"},{"path":"src/edge-identity.ts","kind":"import-statement","original":"./edge-identity"},{"path":"src/edge-ws-muxer.ts","kind":"import-statement","original":"./edge-ws-muxer"}],"format":"esm"},"src/testing/test-server.ts":{"bytes":4545,"imports":[{"path":"@dxos/node-std/http","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true}],"format":"esm"},"src/testing/test-utils.ts":{"bytes":13985,"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","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":"src/defs.ts","kind":"import-statement","original":"../defs"},{"path":"src/edge-ws-muxer.ts","kind":"import-statement","original":"../edge-ws-muxer"},{"path":"src/protocol.ts","kind":"import-statement","original":"../protocol"}],"format":"esm"},"src/testing/index.ts":{"bytes":570,"imports":[{"path":"src/testing/test-server.ts","kind":"import-statement","original":"./test-server"},{"path":"src/testing/test-utils.ts","kind":"import-statement","original":"./test-utils"}],"format":"esm"}},"outputs":{"dist/lib/browser/edge-ws-muxer.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"dist/lib/browser/edge-ws-muxer.mjs":{"imports":[{"path":"dist/lib/browser/chunk-LMP5TVOP.mjs","kind":"import-statement"}],"exports":["CLOUDFLARE_MESSAGE_MAX_BYTES","CLOUDFLARE_RPC_MAX_BYTES","WebSocketMuxer"],"entryPoint":"src/edge-ws-muxer.ts","inputs":{},"bytes":249},"dist/lib/browser/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":57740},"dist/lib/browser/index.mjs":{"imports":[{"path":"dist/lib/browser/chunk-LMP5TVOP.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/protocols/proto/dxos/client/services","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","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/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":"@effect/platform","kind":"import-statement","external":true},{"path":"effect","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},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"effect","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true}],"exports":["CLOUDFLARE_MESSAGE_MAX_BYTES","CLOUDFLARE_RPC_MAX_BYTES","EdgeClient","EdgeConnectionClosedError","EdgeHttpClient","EdgeIdentityChangedError","Protocol","WebSocketMuxer","createChainEdgeIdentity","createDeviceEdgeIdentity","createEphemeralEdgeIdentity","createStubEdgeIdentity","createTestHaloEdgeIdentity","getTypename","handleAuthChallenge","protocol","toUint8Array"],"entryPoint":"src/index.ts","inputs":{"src/index.ts":{"bytesInOutput":60},"src/edge-client.ts":{"bytesInOutput":9374},"src/edge-identity.ts":{"bytesInOutput":1137},"src/edge-ws-connection.ts":{"bytesInOutput":7164},"src/errors.ts":{"bytesInOutput":232},"src/utils.ts":{"bytesInOutput":244},"src/auth.ts":{"bytesInOutput":2980},"src/edge-http-client.ts":{"bytesInOutput":8025},"src/http-client.ts":{"bytesInOutput":1410}},"bytes":31479},"dist/lib/browser/testing/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":9535},"dist/lib/browser/testing/index.mjs":{"imports":[{"path":"dist/lib/browser/chunk-LMP5TVOP.mjs","kind":"import-statement"},{"path":"@dxos/node-std/http","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"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","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","createTestServer","responseHandler"],"entryPoint":"src/testing/index.ts","inputs":{"src/testing/test-server.ts":{"bytesInOutput":1151},"src/testing/index.ts":{"bytesInOutput":0},"src/testing/test-utils.ts":{"bytesInOutput":3678}},"bytes":5103},"dist/lib/browser/chunk-LMP5TVOP.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":17227},"dist/lib/browser/chunk-LMP5TVOP.mjs":{"imports":[{"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":"@dxos/protocols/buf","kind":"import-statement","external":true},{"path":"@dxos/protocols/buf/dxos/edge/messenger_pb","kind":"import-statement","external":true},{"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}],"exports":["CLOUDFLARE_MESSAGE_MAX_BYTES","CLOUDFLARE_RPC_MAX_BYTES","Protocol","WebSocketMuxer","getTypename","protocol","toUint8Array"],"inputs":{"src/edge-ws-muxer.ts":{"bytesInOutput":5667},"src/defs.ts":{"bytesInOutput":298},"src/protocol.ts":{"bytesInOutput":2587}},"bytes":8842}}}
|
|
1
|
+
{"inputs":{"src/protocol.ts":{"bytes":10133,"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"},"src/defs.ts":{"bytes":1550,"imports":[{"path":"@dxos/protocols/buf","kind":"import-statement","external":true},{"path":"@dxos/protocols/buf/dxos/edge/messenger_pb","kind":"import-statement","external":true},{"path":"src/protocol.ts","kind":"import-statement","original":"./protocol"}],"format":"esm"},"src/edge-ws-muxer.ts":{"bytes":24135,"imports":[{"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":"src/defs.ts","kind":"import-statement","original":"./defs"}],"format":"esm"},"src/edge-identity.ts":{"bytes":3976,"imports":[{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/protocols/proto","kind":"import-statement","external":true}],"format":"esm"},"src/edge-ws-connection.ts":{"bytes":25461,"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","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":"src/defs.ts","kind":"import-statement","original":"./defs"},{"path":"src/edge-ws-muxer.ts","kind":"import-statement","original":"./edge-ws-muxer"},{"path":"src/protocol.ts","kind":"import-statement","original":"./protocol"}],"format":"esm"},"src/errors.ts":{"bytes":1188,"imports":[],"format":"esm"},"src/utils.ts":{"bytes":1398,"imports":[],"format":"esm"},"src/edge-client.ts":{"bytes":35116,"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/proto/dxos/client/services","kind":"import-statement","external":true},{"path":"src/defs.ts","kind":"import-statement","original":"./defs"},{"path":"src/edge-identity.ts","kind":"import-statement","original":"./edge-identity"},{"path":"src/edge-ws-connection.ts","kind":"import-statement","original":"./edge-ws-connection"},{"path":"src/errors.ts","kind":"import-statement","original":"./errors"},{"path":"src/utils.ts","kind":"import-statement","original":"./utils"}],"format":"esm"},"src/auth.ts":{"bytes":12117,"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"},"src/http-client.ts":{"bytes":6673,"imports":[{"path":"effect","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true}],"format":"esm"},"src/edge-http-client.ts":{"bytes":35889,"imports":[{"path":"@effect/platform","kind":"import-statement","external":true},{"path":"effect","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},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"src/edge-identity.ts","kind":"import-statement","original":"./edge-identity"},{"path":"src/http-client.ts","kind":"import-statement","original":"./http-client"},{"path":"src/utils.ts","kind":"import-statement","original":"./utils"}],"format":"esm"},"src/index.ts":{"bytes":1280,"imports":[{"path":"@dxos/protocols/buf/dxos/edge/messenger_pb","kind":"import-statement","external":true},{"path":"src/edge-client.ts","kind":"import-statement","original":"./edge-client"},{"path":"src/defs.ts","kind":"import-statement","original":"./defs"},{"path":"src/protocol.ts","kind":"import-statement","original":"./protocol"},{"path":"src/errors.ts","kind":"import-statement","original":"./errors"},{"path":"src/auth.ts","kind":"import-statement","original":"./auth"},{"path":"src/edge-http-client.ts","kind":"import-statement","original":"./edge-http-client"},{"path":"src/edge-identity.ts","kind":"import-statement","original":"./edge-identity"},{"path":"src/edge-ws-muxer.ts","kind":"import-statement","original":"./edge-ws-muxer"}],"format":"esm"},"src/testing/test-server.ts":{"bytes":4545,"imports":[{"path":"@dxos/node-std/http","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true}],"format":"esm"},"src/testing/test-utils.ts":{"bytes":13985,"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","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":"src/defs.ts","kind":"import-statement","original":"../defs"},{"path":"src/edge-ws-muxer.ts","kind":"import-statement","original":"../edge-ws-muxer"},{"path":"src/protocol.ts","kind":"import-statement","original":"../protocol"}],"format":"esm"},"src/testing/index.ts":{"bytes":570,"imports":[{"path":"src/testing/test-server.ts","kind":"import-statement","original":"./test-server"},{"path":"src/testing/test-utils.ts","kind":"import-statement","original":"./test-utils"}],"format":"esm"}},"outputs":{"dist/lib/browser/edge-ws-muxer.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"dist/lib/browser/edge-ws-muxer.mjs":{"imports":[{"path":"dist/lib/browser/chunk-LMP5TVOP.mjs","kind":"import-statement"}],"exports":["CLOUDFLARE_MESSAGE_MAX_BYTES","CLOUDFLARE_RPC_MAX_BYTES","WebSocketMuxer"],"entryPoint":"src/edge-ws-muxer.ts","inputs":{},"bytes":249},"dist/lib/browser/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":58686},"dist/lib/browser/index.mjs":{"imports":[{"path":"dist/lib/browser/chunk-LMP5TVOP.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/protocols/proto/dxos/client/services","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","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/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":"@effect/platform","kind":"import-statement","external":true},{"path":"effect","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},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"effect","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true}],"exports":["CLOUDFLARE_MESSAGE_MAX_BYTES","CLOUDFLARE_RPC_MAX_BYTES","EdgeClient","EdgeConnectionClosedError","EdgeHttpClient","EdgeIdentityChangedError","Protocol","WebSocketMuxer","createChainEdgeIdentity","createDeviceEdgeIdentity","createEphemeralEdgeIdentity","createStubEdgeIdentity","createTestHaloEdgeIdentity","getTypename","handleAuthChallenge","protocol","toUint8Array"],"entryPoint":"src/index.ts","inputs":{"src/index.ts":{"bytesInOutput":60},"src/edge-client.ts":{"bytesInOutput":9374},"src/edge-identity.ts":{"bytesInOutput":1137},"src/edge-ws-connection.ts":{"bytesInOutput":7529},"src/errors.ts":{"bytesInOutput":232},"src/utils.ts":{"bytesInOutput":244},"src/auth.ts":{"bytesInOutput":2980},"src/edge-http-client.ts":{"bytesInOutput":8163},"src/http-client.ts":{"bytesInOutput":1410}},"bytes":31982},"dist/lib/browser/testing/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":9535},"dist/lib/browser/testing/index.mjs":{"imports":[{"path":"dist/lib/browser/chunk-LMP5TVOP.mjs","kind":"import-statement"},{"path":"@dxos/node-std/http","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"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","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","createTestServer","responseHandler"],"entryPoint":"src/testing/index.ts","inputs":{"src/testing/test-server.ts":{"bytesInOutput":1151},"src/testing/index.ts":{"bytesInOutput":0},"src/testing/test-utils.ts":{"bytesInOutput":3678}},"bytes":5103},"dist/lib/browser/chunk-LMP5TVOP.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":17227},"dist/lib/browser/chunk-LMP5TVOP.mjs":{"imports":[{"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":"@dxos/protocols/buf","kind":"import-statement","external":true},{"path":"@dxos/protocols/buf/dxos/edge/messenger_pb","kind":"import-statement","external":true},{"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}],"exports":["CLOUDFLARE_MESSAGE_MAX_BYTES","CLOUDFLARE_RPC_MAX_BYTES","Protocol","WebSocketMuxer","getTypename","protocol","toUint8Array"],"inputs":{"src/edge-ws-muxer.ts":{"bytesInOutput":5667},"src/defs.ts":{"bytesInOutput":298},"src/protocol.ts":{"bytesInOutput":2587}},"bytes":8842}}}
|
|
@@ -78,7 +78,7 @@ var SIGNAL_KEEPALIVE_INTERVAL = 4e3;
|
|
|
78
78
|
var SIGNAL_KEEPALIVE_TIMEOUT = 12e3;
|
|
79
79
|
var EdgeWsConnection = class extends Resource {
|
|
80
80
|
constructor(_identity, _connectionInfo, _callbacks) {
|
|
81
|
-
super(), this._identity = _identity, this._connectionInfo = _connectionInfo, this._callbacks = _callbacks;
|
|
81
|
+
super(), this._identity = _identity, this._connectionInfo = _connectionInfo, this._callbacks = _callbacks, this._lastReceivedMessageTimestamp = Date.now();
|
|
82
82
|
}
|
|
83
83
|
get info() {
|
|
84
84
|
return {
|
|
@@ -90,7 +90,7 @@ var EdgeWsConnection = class extends Resource {
|
|
|
90
90
|
send(message) {
|
|
91
91
|
invariant2(this._ws, void 0, {
|
|
92
92
|
F: __dxlog_file2,
|
|
93
|
-
L:
|
|
93
|
+
L: 53,
|
|
94
94
|
S: this,
|
|
95
95
|
A: [
|
|
96
96
|
"this._ws",
|
|
@@ -99,7 +99,7 @@ var EdgeWsConnection = class extends Resource {
|
|
|
99
99
|
});
|
|
100
100
|
invariant2(this._wsMuxer, void 0, {
|
|
101
101
|
F: __dxlog_file2,
|
|
102
|
-
L:
|
|
102
|
+
L: 54,
|
|
103
103
|
S: this,
|
|
104
104
|
A: [
|
|
105
105
|
"this._wsMuxer",
|
|
@@ -111,7 +111,7 @@ var EdgeWsConnection = class extends Resource {
|
|
|
111
111
|
payload: protocol.getPayloadType(message)
|
|
112
112
|
}, {
|
|
113
113
|
F: __dxlog_file2,
|
|
114
|
-
L:
|
|
114
|
+
L: 55,
|
|
115
115
|
S: this,
|
|
116
116
|
C: (f, a) => f(...a)
|
|
117
117
|
});
|
|
@@ -124,7 +124,7 @@ var EdgeWsConnection = class extends Resource {
|
|
|
124
124
|
payload: protocol.getPayloadType(message)
|
|
125
125
|
}, {
|
|
126
126
|
F: __dxlog_file2,
|
|
127
|
-
L:
|
|
127
|
+
L: 59,
|
|
128
128
|
S: this,
|
|
129
129
|
C: (f, a) => f(...a)
|
|
130
130
|
});
|
|
@@ -134,7 +134,7 @@ var EdgeWsConnection = class extends Resource {
|
|
|
134
134
|
} else {
|
|
135
135
|
this._wsMuxer.send(message).catch((e) => log.catch(e, void 0, {
|
|
136
136
|
F: __dxlog_file2,
|
|
137
|
-
L:
|
|
137
|
+
L: 68,
|
|
138
138
|
S: this,
|
|
139
139
|
C: (f, a) => f(...a)
|
|
140
140
|
}));
|
|
@@ -156,7 +156,7 @@ var EdgeWsConnection = class extends Resource {
|
|
|
156
156
|
if (this.isOpen) {
|
|
157
157
|
log("connected", void 0, {
|
|
158
158
|
F: __dxlog_file2,
|
|
159
|
-
L:
|
|
159
|
+
L: 85,
|
|
160
160
|
S: this,
|
|
161
161
|
C: (f, a) => f(...a)
|
|
162
162
|
});
|
|
@@ -167,7 +167,7 @@ var EdgeWsConnection = class extends Resource {
|
|
|
167
167
|
currentIdentity: this._identity
|
|
168
168
|
}, {
|
|
169
169
|
F: __dxlog_file2,
|
|
170
|
-
L:
|
|
170
|
+
L: 89,
|
|
171
171
|
S: this,
|
|
172
172
|
C: (f, a) => f(...a)
|
|
173
173
|
});
|
|
@@ -180,7 +180,7 @@ var EdgeWsConnection = class extends Resource {
|
|
|
180
180
|
reason: event.reason
|
|
181
181
|
}, {
|
|
182
182
|
F: __dxlog_file2,
|
|
183
|
-
L:
|
|
183
|
+
L: 94,
|
|
184
184
|
S: this,
|
|
185
185
|
C: (f, a) => f(...a)
|
|
186
186
|
});
|
|
@@ -195,7 +195,7 @@ var EdgeWsConnection = class extends Resource {
|
|
|
195
195
|
info: event.message
|
|
196
196
|
}, {
|
|
197
197
|
F: __dxlog_file2,
|
|
198
|
-
L:
|
|
198
|
+
L: 101,
|
|
199
199
|
S: this,
|
|
200
200
|
C: (f, a) => f(...a)
|
|
201
201
|
});
|
|
@@ -205,7 +205,7 @@ var EdgeWsConnection = class extends Resource {
|
|
|
205
205
|
error: event.error
|
|
206
206
|
}, {
|
|
207
207
|
F: __dxlog_file2,
|
|
208
|
-
L:
|
|
208
|
+
L: 104,
|
|
209
209
|
S: this,
|
|
210
210
|
C: (f, a) => f(...a)
|
|
211
211
|
});
|
|
@@ -217,12 +217,13 @@ var EdgeWsConnection = class extends Resource {
|
|
|
217
217
|
event: event.type
|
|
218
218
|
}, {
|
|
219
219
|
F: __dxlog_file2,
|
|
220
|
-
L:
|
|
220
|
+
L: 112,
|
|
221
221
|
S: this,
|
|
222
222
|
C: (f, a) => f(...a)
|
|
223
223
|
});
|
|
224
224
|
return;
|
|
225
225
|
}
|
|
226
|
+
this._lastReceivedMessageTimestamp = Date.now();
|
|
226
227
|
if (event.data === "__pong__") {
|
|
227
228
|
this._rescheduleHeartbeatTimeout();
|
|
228
229
|
return;
|
|
@@ -238,7 +239,7 @@ var EdgeWsConnection = class extends Resource {
|
|
|
238
239
|
payload: protocol.getPayloadType(message)
|
|
239
240
|
}, {
|
|
240
241
|
F: __dxlog_file2,
|
|
241
|
-
L:
|
|
242
|
+
L: 130,
|
|
242
243
|
S: this,
|
|
243
244
|
C: (f, a) => f(...a)
|
|
244
245
|
});
|
|
@@ -262,7 +263,7 @@ var EdgeWsConnection = class extends Resource {
|
|
|
262
263
|
err
|
|
263
264
|
}, {
|
|
264
265
|
F: __dxlog_file2,
|
|
265
|
-
L:
|
|
266
|
+
L: 148,
|
|
266
267
|
S: this,
|
|
267
268
|
C: (f, a) => f(...a)
|
|
268
269
|
});
|
|
@@ -271,7 +272,7 @@ var EdgeWsConnection = class extends Resource {
|
|
|
271
272
|
_scheduleHeartbeats() {
|
|
272
273
|
invariant2(this._ws, void 0, {
|
|
273
274
|
F: __dxlog_file2,
|
|
274
|
-
L:
|
|
275
|
+
L: 153,
|
|
275
276
|
S: this,
|
|
276
277
|
A: [
|
|
277
278
|
"this._ws",
|
|
@@ -291,17 +292,23 @@ var EdgeWsConnection = class extends Resource {
|
|
|
291
292
|
void this._inactivityTimeoutCtx?.dispose();
|
|
292
293
|
this._inactivityTimeoutCtx = new Context(void 0, {
|
|
293
294
|
F: __dxlog_file2,
|
|
294
|
-
L:
|
|
295
|
+
L: 172
|
|
295
296
|
});
|
|
296
297
|
scheduleTask(this._inactivityTimeoutCtx, () => {
|
|
297
298
|
if (this.isOpen) {
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
299
|
+
if (Date.now() - this._lastReceivedMessageTimestamp > SIGNAL_KEEPALIVE_TIMEOUT) {
|
|
300
|
+
log.warn("restart due to inactivity timeout", {
|
|
301
|
+
lastReceivedMessageTimestamp: this._lastReceivedMessageTimestamp
|
|
302
|
+
}, {
|
|
303
|
+
F: __dxlog_file2,
|
|
304
|
+
L: 178,
|
|
305
|
+
S: this,
|
|
306
|
+
C: (f, a) => f(...a)
|
|
307
|
+
});
|
|
308
|
+
this._callbacks.onRestartRequired();
|
|
309
|
+
} else {
|
|
310
|
+
this._rescheduleHeartbeatTimeout();
|
|
311
|
+
}
|
|
305
312
|
}
|
|
306
313
|
}, SIGNAL_KEEPALIVE_TIMEOUT);
|
|
307
314
|
}
|
|
@@ -874,6 +881,12 @@ var EdgeHttpClient = class {
|
|
|
874
881
|
//
|
|
875
882
|
// OAuth and credentials
|
|
876
883
|
//
|
|
884
|
+
async listFunctions(args) {
|
|
885
|
+
return this._call(new URL("/functions", this.baseUrl), {
|
|
886
|
+
...args,
|
|
887
|
+
method: "GET"
|
|
888
|
+
});
|
|
889
|
+
}
|
|
877
890
|
async initiateOAuthFlow(body, args) {
|
|
878
891
|
return this._call(new URL("/oauth/initiate", this.baseUrl), {
|
|
879
892
|
...args,
|
|
@@ -961,14 +974,14 @@ var EdgeHttpClient = class {
|
|
|
961
974
|
const shouldRetry = createRetryHandler(args);
|
|
962
975
|
const requestContext = args.context ?? new Context3(void 0, {
|
|
963
976
|
F: __dxlog_file6,
|
|
964
|
-
L:
|
|
977
|
+
L: 293
|
|
965
978
|
});
|
|
966
979
|
log4("fetch", {
|
|
967
980
|
url,
|
|
968
981
|
request: args.body
|
|
969
982
|
}, {
|
|
970
983
|
F: __dxlog_file6,
|
|
971
|
-
L:
|
|
984
|
+
L: 294,
|
|
972
985
|
S: this,
|
|
973
986
|
C: (f, a) => f(...a)
|
|
974
987
|
});
|
|
@@ -990,7 +1003,7 @@ var EdgeHttpClient = class {
|
|
|
990
1003
|
body
|
|
991
1004
|
}, {
|
|
992
1005
|
F: __dxlog_file6,
|
|
993
|
-
L:
|
|
1006
|
+
L: 310,
|
|
994
1007
|
S: this,
|
|
995
1008
|
C: (f, a) => f(...a)
|
|
996
1009
|
});
|
|
@@ -1015,7 +1028,7 @@ var EdgeHttpClient = class {
|
|
|
1015
1028
|
processingError
|
|
1016
1029
|
}, {
|
|
1017
1030
|
F: __dxlog_file6,
|
|
1018
|
-
L:
|
|
1031
|
+
L: 328,
|
|
1019
1032
|
S: this,
|
|
1020
1033
|
C: (f, a) => f(...a)
|
|
1021
1034
|
});
|
|
@@ -1028,7 +1041,7 @@ var EdgeHttpClient = class {
|
|
|
1028
1041
|
if (!this._edgeIdentity) {
|
|
1029
1042
|
log4.warn("unauthorized response received before identity was set", void 0, {
|
|
1030
1043
|
F: __dxlog_file6,
|
|
1031
|
-
L:
|
|
1044
|
+
L: 337,
|
|
1032
1045
|
S: this,
|
|
1033
1046
|
C: (f, a) => f(...a)
|
|
1034
1047
|
});
|