@dxos/client-services 0.1.58-main.e460f33 → 0.1.58-main.eedac7a
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/{chunk-PNAXUNJ7.mjs → chunk-5NAD4IAA.mjs} +6 -6
- package/dist/lib/browser/chunk-5NAD4IAA.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +6 -5
- package/dist/lib/browser/index.mjs.map +3 -3
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/packlets/testing/index.mjs +3 -3
- package/dist/lib/browser/packlets/testing/index.mjs.map +3 -3
- package/dist/lib/node/index.cjs +9 -8
- package/dist/lib/node/index.cjs.map +3 -3
- package/dist/lib/node/meta.json +1 -1
- package/dist/lib/node/packlets/testing/index.cjs +6 -6
- package/dist/lib/node/packlets/testing/index.cjs.map +3 -3
- package/dist/types/src/packlets/invitations/invitations-handler.d.ts +3 -3
- package/dist/types/src/packlets/invitations/invitations-handler.d.ts.map +1 -1
- package/dist/types/src/packlets/invitations/invitations-service.d.ts.map +1 -1
- package/dist/types/src/packlets/testing/invitation-utils.d.ts +5 -5
- package/dist/types/src/packlets/testing/invitation-utils.d.ts.map +1 -1
- package/dist/types/src/packlets/vault/shell-runtime.d.ts +1 -1
- package/dist/types/src/packlets/vault/shell-runtime.d.ts.map +1 -1
- package/dist/types/src/version.d.ts +1 -1
- package/package.json +34 -34
- package/src/packlets/invitations/invitations-handler.ts +6 -6
- package/src/packlets/invitations/invitations-service.ts +5 -5
- package/src/packlets/spaces/spaces-service.ts +1 -1
- package/src/packlets/testing/invitation-utils.ts +9 -9
- package/src/packlets/vault/shell-runtime.ts +4 -4
- package/src/version.ts +1 -1
- package/dist/lib/browser/chunk-PNAXUNJ7.mjs.map +0 -7
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { AuthenticatingInvitation, CancellableInvitation } from '@dxos/client-protocol';
|
|
2
2
|
import { Invitation } from '@dxos/protocols/proto/dxos/client/services';
|
|
3
3
|
import { InvitationProtocol } from './invitation-protocol';
|
|
4
4
|
/**
|
|
@@ -30,7 +30,7 @@ import { InvitationProtocol } from './invitation-protocol';
|
|
|
30
30
|
*/
|
|
31
31
|
export declare class InvitationsHandler {
|
|
32
32
|
private readonly _networkManager;
|
|
33
|
-
createInvitation(protocol: InvitationProtocol, options?: Partial<Invitation>):
|
|
34
|
-
acceptInvitation(protocol: InvitationProtocol, invitation: Invitation):
|
|
33
|
+
createInvitation(protocol: InvitationProtocol, options?: Partial<Invitation>): CancellableInvitation;
|
|
34
|
+
acceptInvitation(protocol: InvitationProtocol, invitation: Invitation): AuthenticatingInvitation;
|
|
35
35
|
}
|
|
36
36
|
//# sourceMappingURL=invitations-handler.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"invitations-handler.d.ts","sourceRoot":"","sources":["../../../../../src/packlets/invitations/invitations-handler.ts"],"names":[],"mappings":"AAKA,OAAO,EACL,
|
|
1
|
+
{"version":3,"file":"invitations-handler.d.ts","sourceRoot":"","sources":["../../../../../src/packlets/invitations/invitations-handler.ts"],"names":[],"mappings":"AAKA,OAAO,EACL,wBAAwB,EAExB,qBAAqB,EAEtB,MAAM,uBAAuB,CAAC;AAQ/B,OAAO,EAAE,UAAU,EAAE,MAAM,4CAA4C,CAAC;AASxE,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAE3D;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,qBAAa,kBAAkB;IAIjB,OAAO,CAAC,QAAQ,CAAC,eAAe;IAE5C,gBAAgB,CAAC,QAAQ,EAAE,kBAAkB,EAAE,OAAO,CAAC,EAAE,OAAO,CAAC,UAAU,CAAC,GAAG,qBAAqB;IAiJpG,gBAAgB,CAAC,QAAQ,EAAE,kBAAkB,EAAE,UAAU,EAAE,UAAU,GAAG,wBAAwB;CAmLjG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"invitations-service.d.ts","sourceRoot":"","sources":["../../../../../src/packlets/invitations/invitations-service.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAG9C,OAAO,EACL,qBAAqB,EACrB,UAAU,EACV,kBAAkB,EAClB,wBAAwB,EACzB,MAAM,4CAA4C,CAAC;AAEpD,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAC3D,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAE3D;;GAEG;AACH,qBAAa,sBAAuB,YAAW,kBAAkB;IAS7D,OAAO,CAAC,QAAQ,CAAC,mBAAmB;IACpC,OAAO,CAAC,QAAQ,CAAC,WAAW;IAT9B,OAAO,CAAC,QAAQ,CAAC,kBAAkB,
|
|
1
|
+
{"version":3,"file":"invitations-service.d.ts","sourceRoot":"","sources":["../../../../../src/packlets/invitations/invitations-service.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAG9C,OAAO,EACL,qBAAqB,EACrB,UAAU,EACV,kBAAkB,EAClB,wBAAwB,EACzB,MAAM,4CAA4C,CAAC;AAEpD,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAC3D,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAE3D;;GAEG;AACH,qBAAa,sBAAuB,YAAW,kBAAkB;IAS7D,OAAO,CAAC,QAAQ,CAAC,mBAAmB;IACpC,OAAO,CAAC,QAAQ,CAAC,WAAW;IAT9B,OAAO,CAAC,QAAQ,CAAC,kBAAkB,CAA4C;IAC/E,OAAO,CAAC,QAAQ,CAAC,kBAAkB,CAA+C;IAClF,OAAO,CAAC,QAAQ,CAAC,kBAAkB,CAA2B;IAC9D,OAAO,CAAC,QAAQ,CAAC,mBAAmB,CAA2B;IAC/D,OAAO,CAAC,QAAQ,CAAC,eAAe,CAA2B;IAC3D,OAAO,CAAC,QAAQ,CAAC,gBAAgB,CAA2B;gBAGzC,mBAAmB,EAAE,kBAAkB,EACvC,WAAW,EAAE,CAAC,UAAU,EAAE,UAAU,KAAK,kBAAkB;IAI9E,iBAAiB;IAMjB,gBAAgB,CAAC,OAAO,EAAE,UAAU,GAAG,MAAM,CAAC,UAAU,CAAC;IAgCzD,gBAAgB,CAAC,OAAO,EAAE,UAAU,GAAG,MAAM,CAAC,UAAU,CAAC;IAgCnD,YAAY,CAAC,EAAE,YAAY,EAAE,QAAQ,EAAE,EAAE,qBAAqB,GAAG,OAAO,CAAC,IAAI,CAAC;IAW9E,gBAAgB,CAAC,EAAE,YAAY,EAAE,EAAE;QAAE,YAAY,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC,IAAI,CAAC;IAkBjF,gBAAgB,IAAI,MAAM,CAAC,wBAAwB,CAAC;CAkDrD"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { AuthenticatingInvitation, CancellableInvitation } from '@dxos/client-protocol';
|
|
2
2
|
import { Invitation } from '@dxos/protocols/proto/dxos/client/services';
|
|
3
3
|
import { ServiceContext } from '../services';
|
|
4
4
|
/**
|
|
@@ -6,10 +6,10 @@ import { ServiceContext } from '../services';
|
|
|
6
6
|
*/
|
|
7
7
|
export declare const sanitizeInvitation: (invitation: Invitation) => Invitation;
|
|
8
8
|
export type InvitationHost = {
|
|
9
|
-
|
|
9
|
+
share(options?: Partial<Invitation>): CancellableInvitation;
|
|
10
10
|
};
|
|
11
11
|
export type InvitationGuest = {
|
|
12
|
-
|
|
12
|
+
join(invitation: Invitation | string): AuthenticatingInvitation;
|
|
13
13
|
};
|
|
14
14
|
export type PerformInvitationCallbacks<T> = {
|
|
15
15
|
onConnecting?: (value: T) => boolean | void;
|
|
@@ -26,8 +26,8 @@ export type PerformInvitationParams = {
|
|
|
26
26
|
guest: ServiceContext | InvitationGuest;
|
|
27
27
|
options?: Partial<Invitation>;
|
|
28
28
|
hooks?: {
|
|
29
|
-
host?: PerformInvitationCallbacks<
|
|
30
|
-
guest?: PerformInvitationCallbacks<
|
|
29
|
+
host?: PerformInvitationCallbacks<CancellableInvitation>;
|
|
30
|
+
guest?: PerformInvitationCallbacks<AuthenticatingInvitation>;
|
|
31
31
|
};
|
|
32
32
|
};
|
|
33
33
|
export type Result = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"invitation-utils.d.ts","sourceRoot":"","sources":["../../../../../src/packlets/testing/invitation-utils.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"invitation-utils.d.ts","sourceRoot":"","sources":["../../../../../src/packlets/testing/invitation-utils.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,wBAAwB,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAC;AAExF,OAAO,EAAE,UAAU,EAAE,MAAM,4CAA4C,CAAC;AAExE,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAE7C;;GAEG;AACH,eAAO,MAAM,kBAAkB,eAAgB,UAAU,KAAG,UAU3D,CAAC;AAEF,MAAM,MAAM,cAAc,GAAG;IAC3B,KAAK,CAAC,OAAO,CAAC,EAAE,OAAO,CAAC,UAAU,CAAC,GAAG,qBAAqB,CAAC;CAC7D,CAAC;AAEF,MAAM,MAAM,eAAe,GAAG;IAC5B,IAAI,CAAC,UAAU,EAAE,UAAU,GAAG,MAAM,GAAG,wBAAwB,CAAC;CACjE,CAAC;AAEF,MAAM,MAAM,0BAA0B,CAAC,CAAC,IAAI;IAC1C,YAAY,CAAC,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,OAAO,GAAG,IAAI,CAAC;IAC5C,WAAW,CAAC,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,OAAO,GAAG,IAAI,CAAC;IAC3C,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,OAAO,GAAG,IAAI,CAAC;IACvC,gBAAgB,CAAC,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,OAAO,GAAG,IAAI,CAAC;IAChD,SAAS,CAAC,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,OAAO,GAAG,IAAI,CAAC;IACzC,WAAW,CAAC,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,OAAO,GAAG,IAAI,CAAC;IAC3C,SAAS,CAAC,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,OAAO,GAAG,IAAI,CAAC;IACzC,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,OAAO,GAAG,IAAI,CAAC;CACxC,CAAC;AAEF,MAAM,MAAM,uBAAuB,GAAG;IACpC,IAAI,EAAE,cAAc,GAAG,cAAc,CAAC;IACtC,KAAK,EAAE,cAAc,GAAG,eAAe,CAAC;IACxC,OAAO,CAAC,EAAE,OAAO,CAAC,UAAU,CAAC,CAAC;IAC9B,KAAK,CAAC,EAAE;QACN,IAAI,CAAC,EAAE,0BAA0B,CAAC,qBAAqB,CAAC,CAAC;QACzD,KAAK,CAAC,EAAE,0BAA0B,CAAC,wBAAwB,CAAC,CAAC;KAC9D,CAAC;CACH,CAAC;AAEF,MAAM,MAAM,MAAM,GAAG;IAAE,UAAU,CAAC,EAAE,UAAU,CAAC;IAAC,KAAK,CAAC,EAAE,KAAK,CAAA;CAAE,CAAC;AAEhE,eAAO,MAAM,iBAAiB,qCAK3B,uBAAuB,KAAG,CAAC,QAAQ,MAAM,CAAC,EAAE,QAAQ,MAAM,CAAC,CAmI7D,CAAC"}
|
|
@@ -17,7 +17,7 @@ export declare class ShellRuntimeImpl implements ShellRuntime {
|
|
|
17
17
|
get layout(): ShellLayout;
|
|
18
18
|
get invitationCode(): string | undefined;
|
|
19
19
|
get spaceKey(): PublicKey | undefined;
|
|
20
|
-
setLayout(layout
|
|
20
|
+
setLayout({ layout, invitationCode, spaceKey }: LayoutRequest): void;
|
|
21
21
|
setAppContext(context: AppContextRequest): Promise<void>;
|
|
22
22
|
open(): Promise<void>;
|
|
23
23
|
close(): Promise<void>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shell-runtime.d.ts","sourceRoot":"","sources":["../../../../../src/packlets/vault/shell-runtime.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AACpC,OAAO,EAAsC,YAAY,EAAsB,MAAM,uBAAuB,CAAC;AAE7G,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AACvC,OAAO,EAAE,iBAAiB,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,mCAAmC,CAAC;AAClG,OAAO,EAAoC,OAAO,EAAE,MAAM,WAAW,CAAC;AAEtE;;GAEG;AACH,qBAAa,gBAAiB,YAAW,YAAY;IAOvC,OAAO,CAAC,QAAQ,CAAC,KAAK;IANlC,QAAQ,CAAC,YAAY,uBAA8B;IACnD,OAAO,CAAC,OAAO,CAAC,CAAiC;IACjD,OAAO,CAAC,OAAO,CAAuB;IACtC,OAAO,CAAC,eAAe,CAAC,CAAS;IACjC,OAAO,CAAC,SAAS,CAAC,CAAY;gBAED,KAAK,EAAE,OAAO;IAE3C,IAAI,MAAM,gBAET;IAED,IAAI,cAAc,uBAEjB;IAED,IAAI,QAAQ,0BAEX;IAED,SAAS,CAAC,MAAM,EAAE,
|
|
1
|
+
{"version":3,"file":"shell-runtime.d.ts","sourceRoot":"","sources":["../../../../../src/packlets/vault/shell-runtime.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AACpC,OAAO,EAAsC,YAAY,EAAsB,MAAM,uBAAuB,CAAC;AAE7G,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AACvC,OAAO,EAAE,iBAAiB,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,mCAAmC,CAAC;AAClG,OAAO,EAAoC,OAAO,EAAE,MAAM,WAAW,CAAC;AAEtE;;GAEG;AACH,qBAAa,gBAAiB,YAAW,YAAY;IAOvC,OAAO,CAAC,QAAQ,CAAC,KAAK;IANlC,QAAQ,CAAC,YAAY,uBAA8B;IACnD,OAAO,CAAC,OAAO,CAAC,CAAiC;IACjD,OAAO,CAAC,OAAO,CAAuB;IACtC,OAAO,CAAC,eAAe,CAAC,CAAS;IACjC,OAAO,CAAC,SAAS,CAAC,CAAY;gBAED,KAAK,EAAE,OAAO;IAE3C,IAAI,MAAM,gBAET;IAED,IAAI,cAAc,uBAEjB;IAED,IAAI,QAAQ,0BAEX;IAED,SAAS,CAAC,EAAE,MAAM,EAAE,cAAc,EAAE,QAAQ,EAAE,EAAE,aAAa;IAOvD,aAAa,CAAC,OAAO,EAAE,iBAAiB;IAMxC,IAAI;IAoBJ,KAAK;CAIZ"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const DXOS_VERSION = "0.1.58-main.
|
|
1
|
+
export declare const DXOS_VERSION = "0.1.58-main.eedac7a";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dxos/client-services",
|
|
3
|
-
"version": "0.1.58-main.
|
|
3
|
+
"version": "0.1.58-main.eedac7a",
|
|
4
4
|
"description": "DXOS client services implementation",
|
|
5
5
|
"homepage": "https://dxos.org",
|
|
6
6
|
"bugs": "https://github.com/dxos/dxos/issues",
|
|
@@ -21,42 +21,42 @@
|
|
|
21
21
|
"src"
|
|
22
22
|
],
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@dxos/async": "0.1.58-main.
|
|
25
|
-
"@dxos/client-protocol": "0.1.58-main.
|
|
26
|
-
"@dxos/codec-protobuf": "0.1.58-main.
|
|
27
|
-
"@dxos/config": "0.1.58-main.
|
|
28
|
-
"@dxos/context": "0.1.58-main.
|
|
29
|
-
"@dxos/credentials": "0.1.58-main.
|
|
30
|
-
"@dxos/crypto": "0.1.58-main.
|
|
31
|
-
"@dxos/debug": "0.1.58-main.
|
|
32
|
-
"@dxos/document-model": "0.1.58-main.
|
|
33
|
-
"@dxos/echo-db": "0.1.58-main.
|
|
34
|
-
"@dxos/echo-pipeline": "0.1.58-main.
|
|
35
|
-
"@dxos/feed-store": "0.1.58-main.
|
|
36
|
-
"@dxos/invariant": "0.1.58-main.
|
|
37
|
-
"@dxos/keyring": "0.1.58-main.
|
|
38
|
-
"@dxos/keys": "0.1.58-main.
|
|
39
|
-
"@dxos/lock-file": "0.1.58-main.
|
|
40
|
-
"@dxos/log": "0.1.58-main.
|
|
41
|
-
"@dxos/messaging": "0.1.58-main.
|
|
42
|
-
"@dxos/model-factory": "0.1.58-main.
|
|
43
|
-
"@dxos/network-manager": "0.1.58-main.
|
|
44
|
-
"@dxos/node-std": "0.1.58-main.
|
|
45
|
-
"@dxos/protocols": "0.1.58-main.
|
|
46
|
-
"@dxos/random-access-storage": "0.1.58-main.
|
|
47
|
-
"@dxos/rpc": "0.1.58-main.
|
|
48
|
-
"@dxos/teleport": "0.1.58-main.
|
|
49
|
-
"@dxos/teleport-extension-gossip": "0.1.58-main.
|
|
50
|
-
"@dxos/teleport-extension-object-sync": "0.1.58-main.
|
|
51
|
-
"@dxos/text-model": "0.1.58-main.
|
|
52
|
-
"@dxos/timeframe": "0.1.58-main.
|
|
53
|
-
"@dxos/tracing": "0.1.58-main.
|
|
54
|
-
"@dxos/util": "0.1.58-main.
|
|
55
|
-
"@dxos/websocket-rpc": "0.1.58-main.
|
|
24
|
+
"@dxos/async": "0.1.58-main.eedac7a",
|
|
25
|
+
"@dxos/client-protocol": "0.1.58-main.eedac7a",
|
|
26
|
+
"@dxos/codec-protobuf": "0.1.58-main.eedac7a",
|
|
27
|
+
"@dxos/config": "0.1.58-main.eedac7a",
|
|
28
|
+
"@dxos/context": "0.1.58-main.eedac7a",
|
|
29
|
+
"@dxos/credentials": "0.1.58-main.eedac7a",
|
|
30
|
+
"@dxos/crypto": "0.1.58-main.eedac7a",
|
|
31
|
+
"@dxos/debug": "0.1.58-main.eedac7a",
|
|
32
|
+
"@dxos/document-model": "0.1.58-main.eedac7a",
|
|
33
|
+
"@dxos/echo-db": "0.1.58-main.eedac7a",
|
|
34
|
+
"@dxos/echo-pipeline": "0.1.58-main.eedac7a",
|
|
35
|
+
"@dxos/feed-store": "0.1.58-main.eedac7a",
|
|
36
|
+
"@dxos/invariant": "0.1.58-main.eedac7a",
|
|
37
|
+
"@dxos/keyring": "0.1.58-main.eedac7a",
|
|
38
|
+
"@dxos/keys": "0.1.58-main.eedac7a",
|
|
39
|
+
"@dxos/lock-file": "0.1.58-main.eedac7a",
|
|
40
|
+
"@dxos/log": "0.1.58-main.eedac7a",
|
|
41
|
+
"@dxos/messaging": "0.1.58-main.eedac7a",
|
|
42
|
+
"@dxos/model-factory": "0.1.58-main.eedac7a",
|
|
43
|
+
"@dxos/network-manager": "0.1.58-main.eedac7a",
|
|
44
|
+
"@dxos/node-std": "0.1.58-main.eedac7a",
|
|
45
|
+
"@dxos/protocols": "0.1.58-main.eedac7a",
|
|
46
|
+
"@dxos/random-access-storage": "0.1.58-main.eedac7a",
|
|
47
|
+
"@dxos/rpc": "0.1.58-main.eedac7a",
|
|
48
|
+
"@dxos/teleport": "0.1.58-main.eedac7a",
|
|
49
|
+
"@dxos/teleport-extension-gossip": "0.1.58-main.eedac7a",
|
|
50
|
+
"@dxos/teleport-extension-object-sync": "0.1.58-main.eedac7a",
|
|
51
|
+
"@dxos/text-model": "0.1.58-main.eedac7a",
|
|
52
|
+
"@dxos/timeframe": "0.1.58-main.eedac7a",
|
|
53
|
+
"@dxos/tracing": "0.1.58-main.eedac7a",
|
|
54
|
+
"@dxos/util": "0.1.58-main.eedac7a",
|
|
55
|
+
"@dxos/websocket-rpc": "0.1.58-main.eedac7a"
|
|
56
56
|
},
|
|
57
57
|
"devDependencies": {
|
|
58
58
|
"@types/readable-stream": "^2.3.9",
|
|
59
|
-
"@dxos/signal": "0.1.58-main.
|
|
59
|
+
"@dxos/signal": "0.1.58-main.eedac7a"
|
|
60
60
|
},
|
|
61
61
|
"publishConfig": {
|
|
62
62
|
"access": "public"
|
|
@@ -4,9 +4,9 @@
|
|
|
4
4
|
|
|
5
5
|
import { PushStream, scheduleTask, TimeoutError, Trigger } from '@dxos/async';
|
|
6
6
|
import {
|
|
7
|
-
|
|
7
|
+
AuthenticatingInvitation,
|
|
8
8
|
AUTHENTICATION_CODE_LENGTH,
|
|
9
|
-
|
|
9
|
+
CancellableInvitation,
|
|
10
10
|
INVITATION_TIMEOUT,
|
|
11
11
|
} from '@dxos/client-protocol';
|
|
12
12
|
import { Context } from '@dxos/context';
|
|
@@ -60,7 +60,7 @@ export class InvitationsHandler {
|
|
|
60
60
|
*/
|
|
61
61
|
constructor(private readonly _networkManager: NetworkManager) {}
|
|
62
62
|
|
|
63
|
-
createInvitation(protocol: InvitationProtocol, options?: Partial<Invitation>):
|
|
63
|
+
createInvitation(protocol: InvitationProtocol, options?: Partial<Invitation>): CancellableInvitation {
|
|
64
64
|
const {
|
|
65
65
|
invitationId = PublicKey.random().toHex(),
|
|
66
66
|
type = Invitation.Type.INTERACTIVE,
|
|
@@ -193,7 +193,7 @@ export class InvitationsHandler {
|
|
|
193
193
|
});
|
|
194
194
|
|
|
195
195
|
// TODO(burdon): Stop anything pending.
|
|
196
|
-
const observable = new
|
|
196
|
+
const observable = new CancellableInvitation({
|
|
197
197
|
initialInvitation: invitation,
|
|
198
198
|
subscriber: stream.observable,
|
|
199
199
|
onCancel: async () => {
|
|
@@ -205,7 +205,7 @@ export class InvitationsHandler {
|
|
|
205
205
|
return observable;
|
|
206
206
|
}
|
|
207
207
|
|
|
208
|
-
acceptInvitation(protocol: InvitationProtocol, invitation: Invitation):
|
|
208
|
+
acceptInvitation(protocol: InvitationProtocol, invitation: Invitation): AuthenticatingInvitation {
|
|
209
209
|
const { timeout = INVITATION_TIMEOUT } = invitation;
|
|
210
210
|
invariant(protocol);
|
|
211
211
|
|
|
@@ -369,7 +369,7 @@ export class InvitationsHandler {
|
|
|
369
369
|
setState({ state: Invitation.State.CONNECTING });
|
|
370
370
|
});
|
|
371
371
|
|
|
372
|
-
const observable = new
|
|
372
|
+
const observable = new AuthenticatingInvitation({
|
|
373
373
|
initialInvitation: invitation,
|
|
374
374
|
subscriber: stream.observable,
|
|
375
375
|
onCancel: async () => {
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
//
|
|
4
4
|
|
|
5
5
|
import { Event } from '@dxos/async';
|
|
6
|
-
import {
|
|
6
|
+
import { AuthenticatingInvitation, CancellableInvitation } from '@dxos/client-protocol';
|
|
7
7
|
import { Stream } from '@dxos/codec-protobuf';
|
|
8
8
|
import { invariant } from '@dxos/invariant';
|
|
9
9
|
import { log } from '@dxos/log';
|
|
@@ -21,8 +21,8 @@ import { InvitationsHandler } from './invitations-handler';
|
|
|
21
21
|
* Adapts invitation service observable to client/service stream.
|
|
22
22
|
*/
|
|
23
23
|
export class InvitationsServiceImpl implements InvitationsService {
|
|
24
|
-
private readonly _createInvitations = new Map<string,
|
|
25
|
-
private readonly _acceptInvitations = new Map<string,
|
|
24
|
+
private readonly _createInvitations = new Map<string, CancellableInvitation>();
|
|
25
|
+
private readonly _acceptInvitations = new Map<string, AuthenticatingInvitation>();
|
|
26
26
|
private readonly _invitationCreated = new Event<Invitation>();
|
|
27
27
|
private readonly _invitationAccepted = new Event<Invitation>();
|
|
28
28
|
private readonly _removedCreated = new Event<Invitation>();
|
|
@@ -41,7 +41,7 @@ export class InvitationsServiceImpl implements InvitationsService {
|
|
|
41
41
|
}
|
|
42
42
|
|
|
43
43
|
createInvitation(options: Invitation): Stream<Invitation> {
|
|
44
|
-
let invitation:
|
|
44
|
+
let invitation: CancellableInvitation;
|
|
45
45
|
|
|
46
46
|
const existingInvitation = this._createInvitations.get(options.invitationId);
|
|
47
47
|
if (existingInvitation) {
|
|
@@ -73,7 +73,7 @@ export class InvitationsServiceImpl implements InvitationsService {
|
|
|
73
73
|
}
|
|
74
74
|
|
|
75
75
|
acceptInvitation(options: Invitation): Stream<Invitation> {
|
|
76
|
-
let invitation:
|
|
76
|
+
let invitation: AuthenticatingInvitation;
|
|
77
77
|
|
|
78
78
|
const existingInvitation = this._acceptInvitations.get(options.invitationId);
|
|
79
79
|
if (existingInvitation) {
|
|
@@ -99,7 +99,7 @@ export class SpacesServiceImpl implements SpacesService {
|
|
|
99
99
|
subscriptions.add(space.dataPipeline.onNewEpoch.on(ctx, () => scheduler.trigger()));
|
|
100
100
|
|
|
101
101
|
// Pipeline progress.
|
|
102
|
-
space.inner.controlPipeline.state.timeframeUpdate.on(ctx, () => scheduler.trigger());
|
|
102
|
+
subscriptions.add(space.inner.controlPipeline.state.timeframeUpdate.on(ctx, () => scheduler.trigger()));
|
|
103
103
|
if (space.dataPipeline.pipelineState) {
|
|
104
104
|
subscriptions.add(space.dataPipeline.pipelineState.timeframeUpdate.on(ctx, () => scheduler.trigger()));
|
|
105
105
|
}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
//
|
|
4
4
|
|
|
5
5
|
import { Trigger } from '@dxos/async';
|
|
6
|
-
import {
|
|
6
|
+
import { AuthenticatingInvitation, CancellableInvitation } from '@dxos/client-protocol';
|
|
7
7
|
import { invariant } from '@dxos/invariant';
|
|
8
8
|
import { Invitation } from '@dxos/protocols/proto/dxos/client/services';
|
|
9
9
|
|
|
@@ -25,11 +25,11 @@ export const sanitizeInvitation = (invitation: Invitation): Invitation => {
|
|
|
25
25
|
};
|
|
26
26
|
|
|
27
27
|
export type InvitationHost = {
|
|
28
|
-
|
|
28
|
+
share(options?: Partial<Invitation>): CancellableInvitation;
|
|
29
29
|
};
|
|
30
30
|
|
|
31
31
|
export type InvitationGuest = {
|
|
32
|
-
|
|
32
|
+
join(invitation: Invitation | string): AuthenticatingInvitation;
|
|
33
33
|
};
|
|
34
34
|
|
|
35
35
|
export type PerformInvitationCallbacks<T> = {
|
|
@@ -48,8 +48,8 @@ export type PerformInvitationParams = {
|
|
|
48
48
|
guest: ServiceContext | InvitationGuest;
|
|
49
49
|
options?: Partial<Invitation>;
|
|
50
50
|
hooks?: {
|
|
51
|
-
host?: PerformInvitationCallbacks<
|
|
52
|
-
guest?: PerformInvitationCallbacks<
|
|
51
|
+
host?: PerformInvitationCallbacks<CancellableInvitation>;
|
|
52
|
+
guest?: PerformInvitationCallbacks<AuthenticatingInvitation>;
|
|
53
53
|
};
|
|
54
54
|
};
|
|
55
55
|
|
|
@@ -196,7 +196,7 @@ export const performInvitation = ({
|
|
|
196
196
|
const createInvitation = (
|
|
197
197
|
host: ServiceContext | InvitationHost,
|
|
198
198
|
options?: Partial<Invitation>,
|
|
199
|
-
):
|
|
199
|
+
): CancellableInvitation => {
|
|
200
200
|
options ??= {
|
|
201
201
|
authMethod: Invitation.AuthMethod.NONE,
|
|
202
202
|
...(options ?? {}),
|
|
@@ -207,13 +207,13 @@ const createInvitation = (
|
|
|
207
207
|
return host.invitations.createInvitation(hostHandler, options);
|
|
208
208
|
}
|
|
209
209
|
|
|
210
|
-
return host.
|
|
210
|
+
return host.share(options);
|
|
211
211
|
};
|
|
212
212
|
|
|
213
213
|
const acceptInvitation = (
|
|
214
214
|
guest: ServiceContext | InvitationGuest,
|
|
215
215
|
invitation: Invitation,
|
|
216
|
-
):
|
|
216
|
+
): AuthenticatingInvitation => {
|
|
217
217
|
invitation = sanitizeInvitation(invitation);
|
|
218
218
|
|
|
219
219
|
if (guest instanceof ServiceContext) {
|
|
@@ -221,5 +221,5 @@ const acceptInvitation = (
|
|
|
221
221
|
return guest.invitations.acceptInvitation(guestHandler, invitation);
|
|
222
222
|
}
|
|
223
223
|
|
|
224
|
-
return guest.
|
|
224
|
+
return guest.join(invitation);
|
|
225
225
|
};
|
|
@@ -33,11 +33,11 @@ export class ShellRuntimeImpl implements ShellRuntime {
|
|
|
33
33
|
return this._spaceKey;
|
|
34
34
|
}
|
|
35
35
|
|
|
36
|
-
setLayout(layout
|
|
36
|
+
setLayout({ layout, invitationCode, spaceKey }: LayoutRequest) {
|
|
37
37
|
this._layout = layout;
|
|
38
|
-
this._invitationCode =
|
|
39
|
-
this._spaceKey =
|
|
40
|
-
this.layoutUpdate.emit({ layout,
|
|
38
|
+
this._invitationCode = invitationCode;
|
|
39
|
+
this._spaceKey = spaceKey;
|
|
40
|
+
this.layoutUpdate.emit({ layout, invitationCode, spaceKey });
|
|
41
41
|
}
|
|
42
42
|
|
|
43
43
|
async setAppContext(context: AppContextRequest) {
|
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const DXOS_VERSION = "0.1.58-main.
|
|
1
|
+
export const DXOS_VERSION = "0.1.58-main.eedac7a";
|