@dxos/client-services 0.3.11-main.5e1976a → 0.3.11-main.604a65a
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-QIHAW5TM.mjs → chunk-MOW7FRV3.mjs} +127 -40
- package/dist/lib/browser/chunk-MOW7FRV3.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +1 -1
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/packlets/testing/index.mjs +1 -1
- package/dist/lib/node/{chunk-4R65PB4H.cjs → chunk-E5I5NVZ4.cjs} +217 -130
- package/dist/lib/node/chunk-E5I5NVZ4.cjs.map +7 -0
- package/dist/lib/node/index.cjs +37 -37
- package/dist/lib/node/meta.json +1 -1
- package/dist/lib/node/packlets/testing/index.cjs +8 -8
- package/dist/types/src/packlets/network/network-service.d.ts.map +1 -1
- package/dist/types/src/packlets/services/diagnostics.d.ts +32 -16
- package/dist/types/src/packlets/services/diagnostics.d.ts.map +1 -1
- package/dist/types/src/packlets/services/platform.d.ts +1 -14
- package/dist/types/src/packlets/services/platform.d.ts.map +1 -1
- package/dist/types/src/packlets/spaces/automerge-space-state.d.ts +2 -0
- package/dist/types/src/packlets/spaces/automerge-space-state.d.ts.map +1 -1
- package/dist/types/src/packlets/spaces/data-space-manager.d.ts.map +1 -1
- package/dist/types/src/packlets/spaces/data-space.d.ts +2 -0
- package/dist/types/src/packlets/spaces/data-space.d.ts.map +1 -1
- package/dist/types/src/packlets/system/system-service.d.ts +3 -2
- package/dist/types/src/packlets/system/system-service.d.ts.map +1 -1
- package/dist/types/src/version.d.ts +1 -1
- package/package.json +35 -35
- package/src/packlets/identity/identity-manager.ts +1 -1
- package/src/packlets/network/network-service.ts +5 -1
- package/src/packlets/services/diagnostics.ts +52 -16
- package/src/packlets/services/platform.ts +7 -19
- package/src/packlets/spaces/automerge-space-state.ts +4 -0
- package/src/packlets/spaces/data-space-manager.ts +5 -1
- package/src/packlets/spaces/data-space.ts +36 -3
- package/src/packlets/spaces/spaces-service.ts +2 -2
- package/src/packlets/system/system-service.ts +7 -1
- package/src/version.ts +1 -1
- package/dist/lib/browser/chunk-QIHAW5TM.mjs.map +0 -7
- package/dist/lib/node/chunk-4R65PB4H.cjs.map +0 -7
|
@@ -31,7 +31,7 @@ __export(testing_exports, {
|
|
|
31
31
|
syncItemsLocal: () => syncItemsLocal
|
|
32
32
|
});
|
|
33
33
|
module.exports = __toCommonJS(testing_exports);
|
|
34
|
-
var
|
|
34
|
+
var import_chunk_E5I5NVZ4 = require("../../chunk-E5I5NVZ4.cjs");
|
|
35
35
|
var import_credentials = require("@dxos/credentials");
|
|
36
36
|
var import_keys = require("@dxos/keys");
|
|
37
37
|
var import_async = require("@dxos/async");
|
|
@@ -209,7 +209,7 @@ var createInvitation = (host, options) => {
|
|
|
209
209
|
authMethod: import_services.Invitation.AuthMethod.NONE,
|
|
210
210
|
...options ?? {}
|
|
211
211
|
};
|
|
212
|
-
if (host instanceof
|
|
212
|
+
if (host instanceof import_chunk_E5I5NVZ4.ServiceContext) {
|
|
213
213
|
const hostHandler = host.getInvitationHandler({
|
|
214
214
|
kind: import_services.Invitation.Kind.SPACE,
|
|
215
215
|
...options
|
|
@@ -220,7 +220,7 @@ var createInvitation = (host, options) => {
|
|
|
220
220
|
};
|
|
221
221
|
var acceptInvitation = (guest, invitation) => {
|
|
222
222
|
invitation = sanitizeInvitation(invitation);
|
|
223
|
-
if (guest instanceof
|
|
223
|
+
if (guest instanceof import_chunk_E5I5NVZ4.ServiceContext) {
|
|
224
224
|
const guestHandler = guest.getInvitationHandler({
|
|
225
225
|
kind: invitation.kind
|
|
226
226
|
});
|
|
@@ -229,7 +229,7 @@ var acceptInvitation = (guest, invitation) => {
|
|
|
229
229
|
return guest.join(invitation);
|
|
230
230
|
};
|
|
231
231
|
var createServiceHost = (config, signalManagerContext) => {
|
|
232
|
-
return new
|
|
232
|
+
return new import_chunk_E5I5NVZ4.ClientServicesHost({
|
|
233
233
|
config,
|
|
234
234
|
signalManager: new import_messaging.MemorySignalManager(signalManagerContext),
|
|
235
235
|
transportFactory: import_network_manager.MemoryTransportFactory
|
|
@@ -243,8 +243,8 @@ var createServiceContext = ({ signalContext = new import_messaging.MemorySignalM
|
|
|
243
243
|
signalManager,
|
|
244
244
|
transportFactory: import_network_manager.MemoryTransportFactory
|
|
245
245
|
});
|
|
246
|
-
const modelFactory = (0,
|
|
247
|
-
return new
|
|
246
|
+
const modelFactory = (0, import_chunk_E5I5NVZ4.createDefaultModelFactory)();
|
|
247
|
+
return new import_chunk_E5I5NVZ4.ServiceContext(storage, networkManager, signalManager, modelFactory);
|
|
248
248
|
};
|
|
249
249
|
var createPeers = async (numPeers) => {
|
|
250
250
|
const signalContext = new import_messaging.MemorySignalManagerContext();
|
|
@@ -328,7 +328,7 @@ var TestPeer = class {
|
|
|
328
328
|
feedStore: this.feedStore,
|
|
329
329
|
networkManager: this.networkManager,
|
|
330
330
|
metadataStore: this.metadataStore,
|
|
331
|
-
modelFactory: (0,
|
|
331
|
+
modelFactory: (0, import_chunk_E5I5NVZ4.createDefaultModelFactory)(),
|
|
332
332
|
snapshotStore: this.snapshotStore,
|
|
333
333
|
blobStore: this.blobStore
|
|
334
334
|
});
|
|
@@ -340,7 +340,7 @@ var TestPeer = class {
|
|
|
340
340
|
return this._props.automergeHost ??= new import_echo_pipeline.AutomergeHost(this.storage.createDirectory("automerge"));
|
|
341
341
|
}
|
|
342
342
|
get dataSpaceManager() {
|
|
343
|
-
return this._props.dataSpaceManager ??= new
|
|
343
|
+
return this._props.dataSpaceManager ??= new import_chunk_E5I5NVZ4.DataSpaceManager(this.spaceManager, this.metadataStore, new import_echo_pipeline.DataServiceSubscriptions(), this.keyring, this.identity, this.feedStore, this.automergeHost);
|
|
344
344
|
}
|
|
345
345
|
async createIdentity() {
|
|
346
346
|
this._props.signingContext ??= await createSigningContext(this.keyring);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"network-service.d.ts","sourceRoot":"","sources":["../../../../../src/packlets/network/network-service.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAC9C,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,iBAAiB,CAAC;AACrD,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EACL,KAAK,cAAc,EACnB,KAAK,aAAa,EAClB,KAAK,mBAAmB,EACzB,MAAM,4CAA4C,CAAC;AAEpD,qBAAa,kBAAmB,YAAW,cAAc;
|
|
1
|
+
{"version":3,"file":"network-service.d.ts","sourceRoot":"","sources":["../../../../../src/packlets/network/network-service.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAC9C,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,iBAAiB,CAAC;AACrD,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EACL,KAAK,cAAc,EACnB,KAAK,aAAa,EAClB,KAAK,mBAAmB,EACzB,MAAM,4CAA4C,CAAC;AAEpD,qBAAa,kBAAmB,YAAW,cAAc;IAErD,OAAO,CAAC,QAAQ,CAAC,cAAc;IAC/B,OAAO,CAAC,QAAQ,CAAC,aAAa;gBADb,cAAc,EAAE,cAAc,EAC9B,aAAa,EAAE,aAAa;IAG/C,WAAW;IAqBL,YAAY,CAAC,OAAO,EAAE,mBAAmB;CAGhD"}
|
|
@@ -1,29 +1,45 @@
|
|
|
1
1
|
import { type ClientServices } from '@dxos/client-protocol';
|
|
2
2
|
import { type Config, type ConfigProto } from '@dxos/config';
|
|
3
3
|
import { type PublicKey } from '@dxos/keys';
|
|
4
|
-
import { type Device, type Identity, type Metrics, type NetworkStatus, type Space as SpaceProto, SpaceMember } from '@dxos/protocols/proto/dxos/client/services';
|
|
4
|
+
import { type Device, type Identity, type Metrics, type NetworkStatus, type Space as SpaceProto, type Platform, SpaceMember, type LogEntry } from '@dxos/protocols/proto/dxos/client/services';
|
|
5
5
|
import { type SubscribeToFeedsResponse } from '@dxos/protocols/proto/dxos/devtools/host';
|
|
6
6
|
import { type SwarmInfo } from '@dxos/protocols/proto/dxos/devtools/swarm';
|
|
7
7
|
import { type Epoch } from '@dxos/protocols/proto/dxos/halo/credentials';
|
|
8
|
-
import { type
|
|
8
|
+
import { type Resource, type Span } from '@dxos/protocols/proto/dxos/tracing';
|
|
9
9
|
import { type ServiceContext } from './service-context';
|
|
10
10
|
export type Diagnostics = {
|
|
11
|
-
created: string;
|
|
12
|
-
platform: Platform;
|
|
13
|
-
config?: ConfigProto;
|
|
14
11
|
client: {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
12
|
+
config: ConfigProto;
|
|
13
|
+
trace: TraceDiagnostic;
|
|
14
|
+
};
|
|
15
|
+
services: {
|
|
16
|
+
trace: TraceDiagnostic;
|
|
17
|
+
created: string;
|
|
18
|
+
platform: Platform;
|
|
19
|
+
config?: ConfigProto;
|
|
20
|
+
client: {
|
|
21
|
+
version: string;
|
|
22
|
+
storage: {
|
|
23
|
+
version: number;
|
|
24
|
+
};
|
|
18
25
|
};
|
|
26
|
+
identity?: Identity;
|
|
27
|
+
devices?: Device[];
|
|
28
|
+
spaces?: SpaceStats[];
|
|
29
|
+
networkStatus?: NetworkStatus;
|
|
30
|
+
swarms?: SwarmInfo[];
|
|
31
|
+
feeds?: Partial<SubscribeToFeedsResponse.Feed>[];
|
|
32
|
+
metrics?: Metrics;
|
|
33
|
+
storage?: {
|
|
34
|
+
file: string;
|
|
35
|
+
count: number;
|
|
36
|
+
}[];
|
|
19
37
|
};
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
feeds?: Partial<SubscribeToFeedsResponse.Feed>[];
|
|
26
|
-
metrics?: Metrics;
|
|
38
|
+
};
|
|
39
|
+
export type TraceDiagnostic = {
|
|
40
|
+
resources: Record<string, Resource>;
|
|
41
|
+
spans: Span[];
|
|
42
|
+
logs: LogEntry[];
|
|
27
43
|
};
|
|
28
44
|
export type SpaceStats = {
|
|
29
45
|
key: PublicKey;
|
|
@@ -45,5 +61,5 @@ export type SpaceStats = {
|
|
|
45
61
|
/**
|
|
46
62
|
* Create diagnostics to provide snapshot of current system state.
|
|
47
63
|
*/
|
|
48
|
-
export declare const createDiagnostics: (clientServices: Partial<ClientServices>, serviceContext: ServiceContext, config: Config) => Promise<Diagnostics>;
|
|
64
|
+
export declare const createDiagnostics: (clientServices: Partial<ClientServices>, serviceContext: ServiceContext, config: Config) => Promise<Diagnostics['services']>;
|
|
49
65
|
//# sourceMappingURL=diagnostics.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"diagnostics.d.ts","sourceRoot":"","sources":["../../../../../src/packlets/services/diagnostics.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAE5D,OAAO,EAAE,KAAK,MAAM,EAAE,KAAK,WAAW,EAAE,MAAM,cAAc,CAAC;AAK7D,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,YAAY,CAAC;AAG5C,OAAO,EACL,KAAK,MAAM,EACX,KAAK,QAAQ,EACb,KAAK,OAAO,EACZ,KAAK,aAAa,EAClB,KAAK,KAAK,IAAI,UAAU,EACxB,WAAW,
|
|
1
|
+
{"version":3,"file":"diagnostics.d.ts","sourceRoot":"","sources":["../../../../../src/packlets/services/diagnostics.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAE5D,OAAO,EAAE,KAAK,MAAM,EAAE,KAAK,WAAW,EAAE,MAAM,cAAc,CAAC;AAK7D,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,YAAY,CAAC;AAG5C,OAAO,EACL,KAAK,MAAM,EACX,KAAK,QAAQ,EACb,KAAK,OAAO,EACZ,KAAK,aAAa,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AAEF,MAAM,MAAM,eAAe,GAAG;IAC5B,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;IACpC,KAAK,EAAE,IAAI,EAAE,CAAC;IACd,IAAI,EAAE,QAAQ,EAAE,CAAC;CAClB,CAAC;AAGF,MAAM,MAAM,UAAU,GAAG;IACvB,GAAG,EAAE,SAAS,CAAC;IACf,UAAU,CAAC,EAAE;QACX,IAAI,EAAE,MAAM,CAAC;KACd,CAAC;IACF,EAAE,CAAC,EAAE;QACH,OAAO,EAAE,MAAM,CAAC;KACjB,CAAC;IACF,OAAO,CAAC,EAAE,UAAU,CAAC,OAAO,GAAG;QAC7B,WAAW,CAAC,EAAE,MAAM,CAAC;KACtB,CAAC;IACF,MAAM,CAAC,EAAE,CAAC,KAAK,GAAG;QAAE,EAAE,CAAC,EAAE,SAAS,CAAA;KAAE,CAAC,EAAE,CAAC;IACxC,OAAO,CAAC,EAAE,WAAW,EAAE,CAAC;IACxB,QAAQ,CAAC,EAAE,UAAU,CAAC,aAAa,CAAC;CACrC,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,iBAAiB,mBACZ,QAAQ,cAAc,CAAC,kBACvB,cAAc,UACtB,MAAM,KACb,QAAQ,WAAW,CAAC,UAAU,CAAC,CAsFjC,CAAC"}
|
|
@@ -1,16 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
type: 'browser' | 'shared-worker' | 'node';
|
|
3
|
-
userAgent?: string;
|
|
4
|
-
platform?: string;
|
|
5
|
-
runtime?: string;
|
|
6
|
-
uptime?: number;
|
|
7
|
-
memory?: {
|
|
8
|
-
rss: number;
|
|
9
|
-
heapTotal: number;
|
|
10
|
-
heapUsed: number;
|
|
11
|
-
external: number;
|
|
12
|
-
arrayBuffers: number;
|
|
13
|
-
};
|
|
14
|
-
};
|
|
1
|
+
import { Platform } from '@dxos/protocols/proto/dxos/client/services';
|
|
15
2
|
export declare const getPlatform: () => Platform;
|
|
16
3
|
//# sourceMappingURL=platform.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"platform.d.ts","sourceRoot":"","sources":["../../../../../src/packlets/services/platform.ts"],"names":[],"mappings":"AAIA,
|
|
1
|
+
{"version":3,"file":"platform.d.ts","sourceRoot":"","sources":["../../../../../src/packlets/services/platform.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,QAAQ,EAAE,MAAM,4CAA4C,CAAC;AAEtE,eAAO,MAAM,WAAW,QAAO,QA6B9B,CAAC"}
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { type CredentialProcessor, type SpecificCredential } from '@dxos/credentials';
|
|
2
2
|
import { type Credential, type Epoch } from '@dxos/protocols/proto/dxos/halo/credentials';
|
|
3
3
|
export declare class AutomergeSpaceState implements CredentialProcessor {
|
|
4
|
+
private readonly _onNewRoot;
|
|
4
5
|
rootUrl: string | undefined;
|
|
5
6
|
lastEpoch: SpecificCredential<Epoch> | undefined;
|
|
7
|
+
constructor(_onNewRoot: (rootUrl: string) => void);
|
|
6
8
|
processCredential(credential: Credential): Promise<void>;
|
|
7
9
|
}
|
|
8
10
|
//# sourceMappingURL=automerge-space-state.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"automerge-space-state.d.ts","sourceRoot":"","sources":["../../../../../src/packlets/spaces/automerge-space-state.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,mBAAmB,EAAE,KAAK,kBAAkB,EAAuB,MAAM,mBAAmB,CAAC;AAC3G,OAAO,EAAE,KAAK,UAAU,EAAE,KAAK,KAAK,EAAE,MAAM,6CAA6C,CAAC;AAE1F,qBAAa,mBAAoB,YAAW,mBAAmB;
|
|
1
|
+
{"version":3,"file":"automerge-space-state.d.ts","sourceRoot":"","sources":["../../../../../src/packlets/spaces/automerge-space-state.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,mBAAmB,EAAE,KAAK,kBAAkB,EAAuB,MAAM,mBAAmB,CAAC;AAC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CAAC,QAAQ,CAAC,cAAc;IAC/B,OAAO,CAAC,QAAQ,CAAC,yBAAyB;IAC1C,OAAO,CAAC,QAAQ,CAAC,QAAQ;IACzB,OAAO,CAAC,QAAQ,CAAC,eAAe;IAChC,OAAO,CAAC,QAAQ,CAAC,UAAU;IAC3B,OAAO,CAAC,QAAQ,CAAC,cAAc;IAhBjC,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAiB;IAEtC,SAAgB,OAAO,cAAe;IAEtC,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAwD;IAEhF,OAAO,CAAC,OAAO,CAAS;IACxB,OAAO,CAAC,QAAQ,CAAC,WAAW,CAA8B;gBAGvC,aAAa,EAAE,YAAY,EAC3B,cAAc,EAAE,aAAa,EAC7B,yBAAyB,EAAE,wBAAwB,EACnD,QAAQ,EAAE,OAAO,EACjB,eAAe,EAAE,cAAc,EAC/B,UAAU,EAAE,SAAS,CAAC,WAAW,CAAC,EAClC,cAAc,EAAE,aAAa;IAIhD,IAAI,MAAM,qCAET;IAGK,IAAI;IA2BJ,KAAK;IASX;;OAEG;IAEG,WAAW;IAoCX,WAAW,CAAC,IAAI,EAAE,kBAAkB,GAAG,OAAO,CAAC,SAAS,CAAC;IAoB/D;;;;OAIG;IACG,mBAAmB,CAAC,QAAQ,EAAE,SAAS;YAU/B,eAAe;CA2F9B"}
|
|
@@ -72,6 +72,7 @@ export declare class DataSpace {
|
|
|
72
72
|
get notarizationPlugin(): NotarizationPlugin;
|
|
73
73
|
get cache(): SpaceCache | undefined;
|
|
74
74
|
get automergeSpaceState(): AutomergeSpaceState;
|
|
75
|
+
private get _automergeInfo();
|
|
75
76
|
open(): Promise<void>;
|
|
76
77
|
private _open;
|
|
77
78
|
close(): Promise<void>;
|
|
@@ -87,6 +88,7 @@ export declare class DataSpace {
|
|
|
87
88
|
initializeDataPipeline(): Promise<void>;
|
|
88
89
|
private _initializeAndReadControlPipeline;
|
|
89
90
|
private _createWritableFeeds;
|
|
91
|
+
private _onNewAutomergeRoot;
|
|
90
92
|
updateOwnProfile(profile: ProfileDocument): Promise<void>;
|
|
91
93
|
createEpoch(options?: CreateEpochOptions): Promise<void>;
|
|
92
94
|
activate(): Promise<void>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"data-space.d.ts","sourceRoot":"","sources":["../../../../../src/packlets/spaces/data-space.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,EAAiD,MAAM,aAAa,CAAC;AAInF,OAAO,EACL,KAAK,aAAa,EAClB,KAAK,KAAK,EAEV,KAAK,YAAY,EACjB,KAAK,kBAAkB,EACvB,KAAK,aAAa,EACnB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"data-space.d.ts","sourceRoot":"","sources":["../../../../../src/packlets/spaces/data-space.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,EAAiD,MAAM,aAAa,CAAC;AAInF,OAAO,EACL,KAAK,aAAa,EAClB,KAAK,KAAK,EAEV,KAAK,YAAY,EACjB,KAAK,kBAAkB,EACvB,KAAK,aAAa,EACnB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAElD,OAAO,EAAE,KAAK,OAAO,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAGvC,OAAO,EAAE,UAAU,EAAE,KAAK,KAAK,IAAI,UAAU,EAAsB,MAAM,4CAA4C,CAAC;AACtH,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,sCAAsC,CAAC;AACxE,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,0CAA0C,CAAC;AAC3E,OAAO,EAEL,KAAK,eAAe,EAGrB,MAAM,6CAA6C,CAAC;AACrD,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,iDAAiD,CAAC;AACrF,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AQ;IAWR,UAAU;CAYjB"}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { type Event } from '@dxos/async';
|
|
2
2
|
import { Stream } from '@dxos/codec-protobuf';
|
|
3
3
|
import { type Config } from '@dxos/config';
|
|
4
|
-
import { GetDiagnosticsRequest, type SystemService, type SystemStatus, type UpdateStatusRequest, type QueryStatusRequest, type QueryStatusResponse } from '@dxos/protocols/proto/dxos/client/services';
|
|
4
|
+
import { GetDiagnosticsRequest, type SystemService, type SystemStatus, type UpdateStatusRequest, type QueryStatusRequest, type QueryStatusResponse, type Platform } from '@dxos/protocols/proto/dxos/client/services';
|
|
5
5
|
import { type MaybePromise } from '@dxos/util';
|
|
6
6
|
import { type Diagnostics } from '../services';
|
|
7
7
|
export type SystemServiceOptions = {
|
|
8
8
|
config?: Config;
|
|
9
9
|
statusUpdate: Event<void>;
|
|
10
10
|
getCurrentStatus: () => SystemStatus;
|
|
11
|
-
getDiagnostics: () => Promise<Partial<Diagnostics>>;
|
|
11
|
+
getDiagnostics: () => Promise<Partial<Diagnostics['services']>>;
|
|
12
12
|
onUpdateStatus: (status: SystemStatus) => MaybePromise<void>;
|
|
13
13
|
onReset: () => MaybePromise<void>;
|
|
14
14
|
};
|
|
@@ -28,6 +28,7 @@ export declare class SystemServiceImpl implements SystemService {
|
|
|
28
28
|
timestamp: Date;
|
|
29
29
|
diagnostics: any;
|
|
30
30
|
}>;
|
|
31
|
+
getPlatform(): Promise<Platform>;
|
|
31
32
|
updateStatus({ status }: UpdateStatusRequest): Promise<void>;
|
|
32
33
|
queryStatus({ interval }?: QueryStatusRequest): Stream<QueryStatusResponse>;
|
|
33
34
|
reset(): Promise<void>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"system-service.d.ts","sourceRoot":"","sources":["../../../../../src/packlets/system/system-service.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,KAAK,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAC9C,OAAO,EAAE,KAAK,MAAM,EAAE,MAAM,cAAc,CAAC;AAC3C,OAAO,EACL,qBAAqB,EACrB,KAAK,aAAa,EAClB,KAAK,YAAY,EACjB,KAAK,mBAAmB,EACxB,KAAK,kBAAkB,EACvB,KAAK,mBAAmB,
|
|
1
|
+
{"version":3,"file":"system-service.d.ts","sourceRoot":"","sources":["../../../../../src/packlets/system/system-service.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,KAAK,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAC9C,OAAO,EAAE,KAAK,MAAM,EAAE,MAAM,cAAc,CAAC;AAC3C,OAAO,EACL,qBAAqB,EACrB,KAAK,aAAa,EAClB,KAAK,YAAY,EACjB,KAAK,mBAAmB,EACxB,KAAK,kBAAkB,EACvB,KAAK,mBAAmB,EACxB,KAAK,QAAQ,EACd,MAAM,4CAA4C,CAAC;AACpD,OAAO,EAAmB,KAAK,YAAY,EAAE,MAAM,YAAY,CAAC;AAEhE,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,aAAa,CAAC;AAG/C,MAAM,MAAM,oBAAoB,GAAG;IACjC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,YAAY,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC;IAC1B,gBAAgB,EAAE,MAAM,YAAY,CAAC;IACrC,cAAc,EAAE,MAAM,OAAO,CAAC,OAAO,CAAC,WAAW,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;IAChE,cAAc,EAAE,CAAC,MAAM,EAAE,YAAY,KAAK,YAAY,CAAC,IAAI,CAAC,CAAC;IAC7D,OAAO,EAAE,MAAM,YAAY,CAAC,IAAI,CAAC,CAAC;CACnC,CAAC;AAEF,qBAAa,iBAAkB,YAAW,aAAa;IACrD,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAiC;IAC1D,OAAO,CAAC,QAAQ,CAAC,aAAa,CAAuC;IACrE,OAAO,CAAC,QAAQ,CAAC,iBAAiB,CAA2C;IAC7E,OAAO,CAAC,QAAQ,CAAC,eAAe,CAAyC;IACzE,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAkC;IAC3D,OAAO,CAAC,QAAQ,CAAC,eAAe,CAAyC;gBAE7D,EACV,MAAM,EACN,YAAY,EACZ,cAAc,EACd,cAAc,EACd,gBAAgB,EAChB,OAAO,GACR,EAAE,oBAAoB;IASjB,SAAS;IAIf;;OAEG;IACG,cAAc,CAAC,EAAE,IAAI,EAAE,GAAE,qBAA0B;;;;IAgBnD,WAAW,IAAI,OAAO,CAAC,QAAQ,CAAC;IAIhC,YAAY,CAAC,EAAE,MAAM,EAAE,EAAE,mBAAmB;IAKlD,WAAW,CAAC,EAAE,QAAgB,EAAE,GAAE,kBAAuB,GAAG,MAAM,CAAC,mBAAmB,CAAC;IAgBjF,KAAK;CAGZ"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const DXOS_VERSION = "0.3.11-main.
|
|
1
|
+
export declare const DXOS_VERSION = "0.3.11-main.604a65a";
|
|
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.3.11-main.
|
|
3
|
+
"version": "0.3.11-main.604a65a",
|
|
4
4
|
"description": "DXOS client services implementation",
|
|
5
5
|
"homepage": "https://dxos.org",
|
|
6
6
|
"bugs": "https://github.com/dxos/dxos/issues",
|
|
@@ -22,44 +22,44 @@
|
|
|
22
22
|
],
|
|
23
23
|
"dependencies": {
|
|
24
24
|
"platform": "^1.3.6",
|
|
25
|
-
"@dxos/
|
|
26
|
-
"@dxos/client-protocol": "0.3.11-main.
|
|
27
|
-
"@dxos/
|
|
28
|
-
"@dxos/
|
|
29
|
-
"@dxos/
|
|
30
|
-
"@dxos/
|
|
31
|
-
"@dxos/
|
|
32
|
-
"@dxos/
|
|
33
|
-
"@dxos/
|
|
34
|
-
"@dxos/
|
|
35
|
-
"@dxos/echo-pipeline": "0.3.11-main.
|
|
36
|
-
"@dxos/
|
|
37
|
-
"@dxos/
|
|
38
|
-
"@dxos/
|
|
39
|
-
"@dxos/keyring": "0.3.11-main.
|
|
40
|
-
"@dxos/keys": "0.3.11-main.
|
|
41
|
-
"@dxos/lock-file": "0.3.11-main.
|
|
42
|
-
"@dxos/log": "0.3.11-main.
|
|
43
|
-
"@dxos/model-factory": "0.3.11-main.
|
|
44
|
-
"@dxos/messaging": "0.3.11-main.
|
|
45
|
-
"@dxos/
|
|
46
|
-
"@dxos/
|
|
47
|
-
"@dxos/
|
|
48
|
-
"@dxos/random-access-storage": "0.3.11-main.
|
|
49
|
-
"@dxos/
|
|
50
|
-
"@dxos/
|
|
51
|
-
"@dxos/teleport": "0.3.11-main.
|
|
52
|
-
"@dxos/text-model": "0.3.11-main.
|
|
53
|
-
"@dxos/teleport-extension-object-sync": "0.3.11-main.
|
|
54
|
-
"@dxos/timeframe": "0.3.11-main.
|
|
55
|
-
"@dxos/tracing": "0.3.11-main.
|
|
56
|
-
"@dxos/util": "0.3.11-main.
|
|
57
|
-
"@dxos/websocket-rpc": "0.3.11-main.
|
|
25
|
+
"@dxos/async": "0.3.11-main.604a65a",
|
|
26
|
+
"@dxos/client-protocol": "0.3.11-main.604a65a",
|
|
27
|
+
"@dxos/codec-protobuf": "0.3.11-main.604a65a",
|
|
28
|
+
"@dxos/config": "0.3.11-main.604a65a",
|
|
29
|
+
"@dxos/crypto": "0.3.11-main.604a65a",
|
|
30
|
+
"@dxos/context": "0.3.11-main.604a65a",
|
|
31
|
+
"@dxos/credentials": "0.3.11-main.604a65a",
|
|
32
|
+
"@dxos/document-model": "0.3.11-main.604a65a",
|
|
33
|
+
"@dxos/debug": "0.3.11-main.604a65a",
|
|
34
|
+
"@dxos/echo-db": "0.3.11-main.604a65a",
|
|
35
|
+
"@dxos/echo-pipeline": "0.3.11-main.604a65a",
|
|
36
|
+
"@dxos/feed-store": "0.3.11-main.604a65a",
|
|
37
|
+
"@dxos/invariant": "0.3.11-main.604a65a",
|
|
38
|
+
"@dxos/echo-schema": "0.3.11-main.604a65a",
|
|
39
|
+
"@dxos/keyring": "0.3.11-main.604a65a",
|
|
40
|
+
"@dxos/keys": "0.3.11-main.604a65a",
|
|
41
|
+
"@dxos/lock-file": "0.3.11-main.604a65a",
|
|
42
|
+
"@dxos/log": "0.3.11-main.604a65a",
|
|
43
|
+
"@dxos/model-factory": "0.3.11-main.604a65a",
|
|
44
|
+
"@dxos/messaging": "0.3.11-main.604a65a",
|
|
45
|
+
"@dxos/network-manager": "0.3.11-main.604a65a",
|
|
46
|
+
"@dxos/protocols": "0.3.11-main.604a65a",
|
|
47
|
+
"@dxos/node-std": "0.3.11-main.604a65a",
|
|
48
|
+
"@dxos/random-access-storage": "0.3.11-main.604a65a",
|
|
49
|
+
"@dxos/rpc": "0.3.11-main.604a65a",
|
|
50
|
+
"@dxos/teleport": "0.3.11-main.604a65a",
|
|
51
|
+
"@dxos/teleport-extension-gossip": "0.3.11-main.604a65a",
|
|
52
|
+
"@dxos/text-model": "0.3.11-main.604a65a",
|
|
53
|
+
"@dxos/teleport-extension-object-sync": "0.3.11-main.604a65a",
|
|
54
|
+
"@dxos/timeframe": "0.3.11-main.604a65a",
|
|
55
|
+
"@dxos/tracing": "0.3.11-main.604a65a",
|
|
56
|
+
"@dxos/util": "0.3.11-main.604a65a",
|
|
57
|
+
"@dxos/websocket-rpc": "0.3.11-main.604a65a"
|
|
58
58
|
},
|
|
59
59
|
"devDependencies": {
|
|
60
60
|
"@types/platform": "^1.3.4",
|
|
61
61
|
"@types/readable-stream": "^2.3.9",
|
|
62
|
-
"@dxos/signal": "0.3.11-main.
|
|
62
|
+
"@dxos/signal": "0.3.11-main.604a65a"
|
|
63
63
|
},
|
|
64
64
|
"publishConfig": {
|
|
65
65
|
"access": "public"
|
|
@@ -12,13 +12,17 @@ import {
|
|
|
12
12
|
} from '@dxos/protocols/proto/dxos/client/services';
|
|
13
13
|
|
|
14
14
|
export class NetworkServiceImpl implements NetworkService {
|
|
15
|
-
constructor(
|
|
15
|
+
constructor(
|
|
16
|
+
private readonly networkManager: NetworkManager,
|
|
17
|
+
private readonly signalManager: SignalManager,
|
|
18
|
+
) {}
|
|
16
19
|
|
|
17
20
|
queryStatus() {
|
|
18
21
|
return new Stream<NetworkStatus>(({ next }) => {
|
|
19
22
|
const update = () => {
|
|
20
23
|
next({
|
|
21
24
|
swarm: this.networkManager.connectionState,
|
|
25
|
+
connectionInfo: this.networkManager.connectionLog?.swarms,
|
|
22
26
|
signaling: this.signalManager.getStatus().map(({ host, state }) => ({ server: host, state })),
|
|
23
27
|
});
|
|
24
28
|
};
|
|
@@ -18,13 +18,17 @@ import {
|
|
|
18
18
|
type Metrics,
|
|
19
19
|
type NetworkStatus,
|
|
20
20
|
type Space as SpaceProto,
|
|
21
|
+
type Platform,
|
|
21
22
|
SpaceMember,
|
|
23
|
+
type LogEntry,
|
|
22
24
|
} from '@dxos/protocols/proto/dxos/client/services';
|
|
23
25
|
import { type SubscribeToFeedsResponse } from '@dxos/protocols/proto/dxos/devtools/host';
|
|
24
26
|
import { type SwarmInfo } from '@dxos/protocols/proto/dxos/devtools/swarm';
|
|
25
27
|
import { type Epoch } from '@dxos/protocols/proto/dxos/halo/credentials';
|
|
28
|
+
import { type Resource, type Span } from '@dxos/protocols/proto/dxos/tracing';
|
|
29
|
+
import { TRACE_PROCESSOR } from '@dxos/tracing';
|
|
26
30
|
|
|
27
|
-
import { getPlatform
|
|
31
|
+
import { getPlatform } from './platform';
|
|
28
32
|
import { type ServiceContext } from './service-context';
|
|
29
33
|
import { DXOS_VERSION } from '../../version';
|
|
30
34
|
import { type DataSpace } from '../spaces';
|
|
@@ -32,22 +36,36 @@ import { type DataSpace } from '../spaces';
|
|
|
32
36
|
const DEFAULT_TIMEOUT = 1_000;
|
|
33
37
|
|
|
34
38
|
export type Diagnostics = {
|
|
35
|
-
created: string;
|
|
36
|
-
platform: Platform;
|
|
37
|
-
config?: ConfigProto;
|
|
38
39
|
client: {
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
40
|
+
config: ConfigProto;
|
|
41
|
+
trace: TraceDiagnostic;
|
|
42
|
+
};
|
|
43
|
+
services: {
|
|
44
|
+
trace: TraceDiagnostic;
|
|
45
|
+
created: string;
|
|
46
|
+
platform: Platform;
|
|
47
|
+
config?: ConfigProto;
|
|
48
|
+
client: {
|
|
49
|
+
version: string;
|
|
50
|
+
storage: {
|
|
51
|
+
version: number;
|
|
52
|
+
};
|
|
42
53
|
};
|
|
54
|
+
identity?: Identity;
|
|
55
|
+
devices?: Device[];
|
|
56
|
+
spaces?: SpaceStats[];
|
|
57
|
+
networkStatus?: NetworkStatus;
|
|
58
|
+
swarms?: SwarmInfo[];
|
|
59
|
+
feeds?: Partial<SubscribeToFeedsResponse.Feed>[];
|
|
60
|
+
metrics?: Metrics;
|
|
61
|
+
storage?: { file: string; count: number }[];
|
|
43
62
|
};
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
metrics?: Metrics;
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
export type TraceDiagnostic = {
|
|
66
|
+
resources: Record<string, Resource>;
|
|
67
|
+
spans: Span[];
|
|
68
|
+
logs: LogEntry[];
|
|
51
69
|
};
|
|
52
70
|
|
|
53
71
|
// TODO(burdon): Normalize for ECHO/HALO.
|
|
@@ -74,8 +92,8 @@ export const createDiagnostics = async (
|
|
|
74
92
|
clientServices: Partial<ClientServices>,
|
|
75
93
|
serviceContext: ServiceContext,
|
|
76
94
|
config: Config,
|
|
77
|
-
): Promise<Diagnostics> => {
|
|
78
|
-
const diagnostics: Diagnostics = {
|
|
95
|
+
): Promise<Diagnostics['services']> => {
|
|
96
|
+
const diagnostics: Diagnostics['services'] = {
|
|
79
97
|
created: new Date().toISOString(),
|
|
80
98
|
platform: getPlatform(),
|
|
81
99
|
client: {
|
|
@@ -84,6 +102,7 @@ export const createDiagnostics = async (
|
|
|
84
102
|
version: STORAGE_VERSION,
|
|
85
103
|
},
|
|
86
104
|
},
|
|
105
|
+
trace: TRACE_PROCESSOR.getDiagnostics(),
|
|
87
106
|
};
|
|
88
107
|
|
|
89
108
|
// Trace metrics.
|
|
@@ -95,6 +114,23 @@ export const createDiagnostics = async (
|
|
|
95
114
|
}).catch(() => undefined);
|
|
96
115
|
}
|
|
97
116
|
|
|
117
|
+
if (typeof navigator !== 'undefined' && navigator.storage) {
|
|
118
|
+
const map = new Map();
|
|
119
|
+
const dir = await navigator.storage.getDirectory();
|
|
120
|
+
for await (const filename of (dir as any)?.keys()) {
|
|
121
|
+
const idx = filename.indexOf('-', filename.indexOf('-') + 1);
|
|
122
|
+
if (idx === -1) {
|
|
123
|
+
continue;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
map.set(filename.slice(0, idx), (map.get(filename.slice(0, idx)) ?? 0) + 1);
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
diagnostics.storage = Array.from(map.entries())
|
|
130
|
+
.sort((a, b) => b[1] - a[1])
|
|
131
|
+
.map(([file, count]) => ({ file, count }));
|
|
132
|
+
}
|
|
133
|
+
|
|
98
134
|
const identity = serviceContext.identityManager.identity;
|
|
99
135
|
if (identity) {
|
|
100
136
|
// Identity.
|
|
@@ -2,20 +2,7 @@
|
|
|
2
2
|
// Copyright 2022 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
type: 'browser' | 'shared-worker' | 'node';
|
|
7
|
-
userAgent?: string;
|
|
8
|
-
platform?: string;
|
|
9
|
-
runtime?: string;
|
|
10
|
-
uptime?: number;
|
|
11
|
-
memory?: {
|
|
12
|
-
rss: number;
|
|
13
|
-
heapTotal: number;
|
|
14
|
-
heapUsed: number;
|
|
15
|
-
external: number;
|
|
16
|
-
arrayBuffers: number;
|
|
17
|
-
};
|
|
18
|
-
};
|
|
5
|
+
import { Platform } from '@dxos/protocols/proto/dxos/client/services';
|
|
19
6
|
|
|
20
7
|
export const getPlatform = (): Platform => {
|
|
21
8
|
if ((process as any).browser) {
|
|
@@ -23,14 +10,14 @@ export const getPlatform = (): Platform => {
|
|
|
23
10
|
// Browser.
|
|
24
11
|
const { userAgent } = window.navigator;
|
|
25
12
|
return {
|
|
26
|
-
type:
|
|
13
|
+
type: Platform.PLATFORM_TYPE.BROWSER,
|
|
27
14
|
userAgent,
|
|
28
15
|
uptime: Math.floor((Date.now() - window.performance.timeOrigin) / 1_000),
|
|
29
16
|
};
|
|
30
17
|
} else {
|
|
31
18
|
// Shared worker.
|
|
32
19
|
return {
|
|
33
|
-
type:
|
|
20
|
+
type: Platform.PLATFORM_TYPE.SHARED_WORKER,
|
|
34
21
|
uptime: Math.floor((Date.now() - performance.timeOrigin) / 1_000),
|
|
35
22
|
};
|
|
36
23
|
}
|
|
@@ -38,9 +25,10 @@ export const getPlatform = (): Platform => {
|
|
|
38
25
|
// Node.
|
|
39
26
|
const { platform, version, arch } = process;
|
|
40
27
|
return {
|
|
41
|
-
type:
|
|
42
|
-
platform
|
|
43
|
-
|
|
28
|
+
type: Platform.PLATFORM_TYPE.NODE,
|
|
29
|
+
platform,
|
|
30
|
+
arch,
|
|
31
|
+
runtime: version,
|
|
44
32
|
uptime: Math.floor(process.uptime()),
|
|
45
33
|
memory: process.memoryUsage(),
|
|
46
34
|
};
|
|
@@ -9,6 +9,8 @@ export class AutomergeSpaceState implements CredentialProcessor {
|
|
|
9
9
|
public rootUrl: string | undefined = undefined;
|
|
10
10
|
public lastEpoch: SpecificCredential<Epoch> | undefined = undefined;
|
|
11
11
|
|
|
12
|
+
constructor(private readonly _onNewRoot: (rootUrl: string) => void) {}
|
|
13
|
+
|
|
12
14
|
async processCredential(credential: Credential) {
|
|
13
15
|
if (!checkCredentialType(credential, 'dxos.halo.credentials.Epoch')) {
|
|
14
16
|
return;
|
|
@@ -17,6 +19,8 @@ export class AutomergeSpaceState implements CredentialProcessor {
|
|
|
17
19
|
this.lastEpoch = credential;
|
|
18
20
|
if (credential.subject.assertion.automergeRoot) {
|
|
19
21
|
this.rootUrl = credential.subject.assertion.automergeRoot;
|
|
22
|
+
|
|
23
|
+
this._onNewRoot(this.rootUrl);
|
|
20
24
|
}
|
|
21
25
|
}
|
|
22
26
|
}
|
|
@@ -143,6 +143,9 @@ export class DataSpaceManager {
|
|
|
143
143
|
const space = await this._constructSpace(metadata);
|
|
144
144
|
|
|
145
145
|
const automergeRoot = this._automergeHost.repo.create();
|
|
146
|
+
automergeRoot.change((doc: any) => {
|
|
147
|
+
doc.experimental_spaceKey = spaceKey.toHex();
|
|
148
|
+
});
|
|
146
149
|
|
|
147
150
|
const credentials = await spaceGenesis(this._keyring, this._signingContext, space.inner, automergeRoot.url);
|
|
148
151
|
await this._metadataStore.addSpace(metadata);
|
|
@@ -222,12 +225,13 @@ export class DataSpaceManager {
|
|
|
222
225
|
credentialProvider: createAuthProvider(this._signingContext.credentialSigner),
|
|
223
226
|
credentialAuthenticator: deferFunction(() => dataSpace.authVerifier.verifier),
|
|
224
227
|
},
|
|
225
|
-
|
|
228
|
+
onAuthorizedConnection: (session) => {
|
|
226
229
|
session.addExtension(
|
|
227
230
|
'dxos.mesh.teleport.gossip',
|
|
228
231
|
gossip.createExtension({ remotePeerId: session.remotePeerId }),
|
|
229
232
|
);
|
|
230
233
|
session.addExtension('dxos.mesh.teleport.notarization', dataSpace.notarizationPlugin.createExtension());
|
|
234
|
+
this._automergeHost.authorizeDevice(space.key, session.remotePeerId);
|
|
231
235
|
session.addExtension('dxos.mesh.teleport.automerge', this._automergeHost.createExtension());
|
|
232
236
|
},
|
|
233
237
|
onAuthFailure: () => {
|