@dxos/client-services 0.6.2-main.fb91371 → 0.6.2
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-PAEGT62B.mjs → chunk-CFKVGKP3.mjs} +47 -38
- package/dist/lib/browser/chunk-CFKVGKP3.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-XOFUNNNR.cjs → chunk-7XBIZ7NK.cjs} +78 -69
- package/dist/lib/node/chunk-7XBIZ7NK.cjs.map +7 -0
- package/dist/lib/node/index.cjs +45 -45
- package/dist/lib/node/meta.json +1 -1
- package/dist/lib/node/packlets/testing/index.cjs +8 -8
- package/dist/types/src/packlets/invitations/invitations-handler.d.ts.map +1 -1
- package/dist/types/src/version.d.ts +1 -1
- package/dist/types/src/version.d.ts.map +1 -1
- package/package.json +36 -36
- package/src/packlets/invitations/invitations-handler.ts +9 -0
- package/src/packlets/services/service-context.test.ts +13 -11
- package/src/version.ts +5 -1
- package/dist/lib/browser/chunk-PAEGT62B.mjs.map +0 -7
- package/dist/lib/node/chunk-XOFUNNNR.cjs.map +0 -7
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
InvitationsManager,
|
|
8
8
|
ServiceContext,
|
|
9
9
|
SpaceInvitationProtocol
|
|
10
|
-
} from "../../chunk-
|
|
10
|
+
} from "../../chunk-CFKVGKP3.mjs";
|
|
11
11
|
|
|
12
12
|
// packages/sdk/client-services/src/packlets/testing/credential-utils.ts
|
|
13
13
|
import { createCredential } from "@dxos/credentials";
|
|
@@ -26,8 +26,8 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
26
26
|
mod
|
|
27
27
|
));
|
|
28
28
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
-
var
|
|
30
|
-
__export(
|
|
29
|
+
var chunk_7XBIZ7NK_exports = {};
|
|
30
|
+
__export(chunk_7XBIZ7NK_exports, {
|
|
31
31
|
ClientRpcServer: () => ClientRpcServer,
|
|
32
32
|
ClientServicesHost: () => ClientServicesHost,
|
|
33
33
|
ClientServicesProviderResource: () => ClientServicesProviderResource,
|
|
@@ -70,7 +70,7 @@ __export(chunk_XOFUNNNR_exports, {
|
|
|
70
70
|
subscribeToSpaces: () => subscribeToSpaces,
|
|
71
71
|
subscribeToSwarmInfo: () => subscribeToSwarmInfo
|
|
72
72
|
});
|
|
73
|
-
module.exports = __toCommonJS(
|
|
73
|
+
module.exports = __toCommonJS(chunk_7XBIZ7NK_exports);
|
|
74
74
|
var import_async = require("@dxos/async");
|
|
75
75
|
var import_codec_protobuf = require("@dxos/codec-protobuf");
|
|
76
76
|
var import_feed_store = require("@dxos/feed-store");
|
|
@@ -154,6 +154,7 @@ var import_protocols5 = require("@dxos/protocols");
|
|
|
154
154
|
var import_services6 = require("@dxos/protocols/proto/dxos/client/services");
|
|
155
155
|
var import_invitations = require("@dxos/protocols/proto/dxos/halo/invitations");
|
|
156
156
|
var import_invitations2 = require("@dxos/protocols/proto/dxos/halo/invitations");
|
|
157
|
+
var import_tracing5 = require("@dxos/tracing");
|
|
157
158
|
var import_util5 = require("@dxos/util");
|
|
158
159
|
var import_async10 = require("@dxos/async");
|
|
159
160
|
var import_context6 = require("@dxos/context");
|
|
@@ -211,7 +212,7 @@ var import_protocols9 = require("@dxos/protocols");
|
|
|
211
212
|
var import_services12 = require("@dxos/protocols/proto/dxos/client/services");
|
|
212
213
|
var import_credentials13 = require("@dxos/protocols/proto/dxos/halo/credentials");
|
|
213
214
|
var import_timeframe3 = require("@dxos/timeframe");
|
|
214
|
-
var
|
|
215
|
+
var import_tracing6 = require("@dxos/tracing");
|
|
215
216
|
var import_util7 = require("@dxos/util");
|
|
216
217
|
var import_async14 = require("@dxos/async");
|
|
217
218
|
var import_context11 = require("@dxos/context");
|
|
@@ -247,7 +248,7 @@ var import_protocols11 = require("@dxos/protocols");
|
|
|
247
248
|
var import_services14 = require("@dxos/protocols/proto/dxos/client/services");
|
|
248
249
|
var import_credentials16 = require("@dxos/protocols/proto/dxos/halo/credentials");
|
|
249
250
|
var import_teleport_extension_gossip2 = require("@dxos/teleport-extension-gossip");
|
|
250
|
-
var
|
|
251
|
+
var import_tracing7 = require("@dxos/tracing");
|
|
251
252
|
var import_util9 = require("@dxos/util");
|
|
252
253
|
var import_credentials17 = require("@dxos/credentials");
|
|
253
254
|
var import_debug4 = require("@dxos/debug");
|
|
@@ -262,7 +263,7 @@ var import_invariant16 = require("@dxos/invariant");
|
|
|
262
263
|
var import_log16 = require("@dxos/log");
|
|
263
264
|
var import_protocols12 = require("@dxos/protocols");
|
|
264
265
|
var import_services15 = require("@dxos/protocols/proto/dxos/client/services");
|
|
265
|
-
var
|
|
266
|
+
var import_tracing8 = require("@dxos/tracing");
|
|
266
267
|
var import_async18 = require("@dxos/async");
|
|
267
268
|
var import_context14 = require("@dxos/context");
|
|
268
269
|
var import_credentials20 = require("@dxos/credentials");
|
|
@@ -277,7 +278,7 @@ var import_log17 = require("@dxos/log");
|
|
|
277
278
|
var import_protocols13 = require("@dxos/protocols");
|
|
278
279
|
var import_services16 = require("@dxos/protocols/proto/dxos/client/services");
|
|
279
280
|
var import_teleport_extension_object_sync = require("@dxos/teleport-extension-object-sync");
|
|
280
|
-
var
|
|
281
|
+
var import_tracing9 = require("@dxos/tracing");
|
|
281
282
|
var import_util10 = require("@dxos/util");
|
|
282
283
|
var import_invariant18 = require("@dxos/invariant");
|
|
283
284
|
var import_lock_file = require("@dxos/lock-file");
|
|
@@ -306,7 +307,7 @@ var import_messaging = require("@dxos/messaging");
|
|
|
306
307
|
var import_network_manager2 = require("@dxos/network-manager");
|
|
307
308
|
var import_protocols16 = require("@dxos/protocols");
|
|
308
309
|
var import_services17 = require("@dxos/protocols/proto/dxos/client/services");
|
|
309
|
-
var
|
|
310
|
+
var import_tracing10 = require("@dxos/tracing");
|
|
310
311
|
var import_websocket_rpc = require("@dxos/websocket-rpc");
|
|
311
312
|
var import_async20 = require("@dxos/async");
|
|
312
313
|
var import_codec_protobuf12 = require("@dxos/codec-protobuf");
|
|
@@ -314,7 +315,7 @@ var import_invariant21 = require("@dxos/invariant");
|
|
|
314
315
|
var import_services18 = require("@dxos/protocols/proto/dxos/client/services");
|
|
315
316
|
var import_config3 = require("@dxos/config");
|
|
316
317
|
var import_services19 = require("@dxos/protocols/proto/dxos/client/services");
|
|
317
|
-
var
|
|
318
|
+
var import_tracing11 = require("@dxos/tracing");
|
|
318
319
|
var import_util13 = require("@dxos/util");
|
|
319
320
|
var import_keys16 = require("@dxos/keys");
|
|
320
321
|
var import_util14 = require("@dxos/util");
|
|
@@ -646,7 +647,7 @@ var DevtoolsServiceImpl = class {
|
|
|
646
647
|
});
|
|
647
648
|
}
|
|
648
649
|
};
|
|
649
|
-
var DXOS_VERSION = "0.6.2
|
|
650
|
+
var DXOS_VERSION = "0.6.2";
|
|
650
651
|
var getPlatform = () => {
|
|
651
652
|
if (process.browser) {
|
|
652
653
|
if (typeof window !== "undefined") {
|
|
@@ -2476,6 +2477,7 @@ var InvitationTopology = class {
|
|
|
2476
2477
|
}
|
|
2477
2478
|
};
|
|
2478
2479
|
var __dxlog_file12 = "/home/runner/work/dxos/dxos/packages/sdk/client-services/src/packlets/invitations/invitations-handler.ts";
|
|
2480
|
+
var metrics = import_tracing5.trace.metrics;
|
|
2479
2481
|
var MAX_DELEGATED_INVITATION_HOST_TRIES = 3;
|
|
2480
2482
|
var InvitationsHandler = class {
|
|
2481
2483
|
/**
|
|
@@ -2486,6 +2488,7 @@ var InvitationsHandler = class {
|
|
|
2486
2488
|
this._defaultTeleportParams = _defaultTeleportParams;
|
|
2487
2489
|
}
|
|
2488
2490
|
handleInvitationFlow(ctx, stream, protocol, invitation) {
|
|
2491
|
+
metrics.increment("invitation.created");
|
|
2489
2492
|
const guardedState = this._createGuardedState(ctx, invitation, stream);
|
|
2490
2493
|
const createExtension = () => {
|
|
2491
2494
|
const extension = new InvitationHostExtension(guardedState.mutex, {
|
|
@@ -2501,7 +2504,7 @@ var InvitationsHandler = class {
|
|
|
2501
2504
|
const deviceKey = admissionRequest.device?.deviceKey ?? admissionRequest.space?.deviceKey;
|
|
2502
2505
|
(0, import_invariant6.invariant)(deviceKey, void 0, {
|
|
2503
2506
|
F: __dxlog_file12,
|
|
2504
|
-
L:
|
|
2507
|
+
L: 93,
|
|
2505
2508
|
S: this,
|
|
2506
2509
|
A: [
|
|
2507
2510
|
"deviceKey",
|
|
@@ -2530,7 +2533,7 @@ var InvitationsHandler = class {
|
|
|
2530
2533
|
id: traceId
|
|
2531
2534
|
}), {
|
|
2532
2535
|
F: __dxlog_file12,
|
|
2533
|
-
L:
|
|
2536
|
+
L: 118,
|
|
2534
2537
|
S: this,
|
|
2535
2538
|
C: (f, a) => f(...a)
|
|
2536
2539
|
});
|
|
@@ -2538,7 +2541,7 @@ var InvitationsHandler = class {
|
|
|
2538
2541
|
...protocol.toJSON()
|
|
2539
2542
|
}, {
|
|
2540
2543
|
F: __dxlog_file12,
|
|
2541
|
-
L:
|
|
2544
|
+
L: 119,
|
|
2542
2545
|
S: this,
|
|
2543
2546
|
C: (f, a) => f(...a)
|
|
2544
2547
|
});
|
|
@@ -2550,16 +2553,17 @@ var InvitationsHandler = class {
|
|
|
2550
2553
|
...protocol.toJSON()
|
|
2551
2554
|
}, {
|
|
2552
2555
|
F: __dxlog_file12,
|
|
2553
|
-
L:
|
|
2556
|
+
L: 121,
|
|
2554
2557
|
S: this,
|
|
2555
2558
|
C: (f, a) => f(...a)
|
|
2556
2559
|
});
|
|
2557
2560
|
guardedState.set(extension, import_services6.Invitation.State.SUCCESS);
|
|
2561
|
+
metrics.increment("invitation.success");
|
|
2558
2562
|
import_log6.log.trace("dxos.sdk.invitations-handler.host.onOpen", import_protocols5.trace.end({
|
|
2559
2563
|
id: traceId
|
|
2560
2564
|
}), {
|
|
2561
2565
|
F: __dxlog_file12,
|
|
2562
|
-
L:
|
|
2566
|
+
L: 124,
|
|
2563
2567
|
S: this,
|
|
2564
2568
|
C: (f, a) => f(...a)
|
|
2565
2569
|
});
|
|
@@ -2570,20 +2574,22 @@ var InvitationsHandler = class {
|
|
|
2570
2574
|
} catch (err) {
|
|
2571
2575
|
if (err instanceof import_async9.TimeoutError) {
|
|
2572
2576
|
if (guardedState.set(extension, import_services6.Invitation.State.TIMEOUT)) {
|
|
2577
|
+
metrics.increment("invitation.timeout");
|
|
2573
2578
|
(0, import_log6.log)("timeout", {
|
|
2574
2579
|
...protocol.toJSON()
|
|
2575
2580
|
}, {
|
|
2576
2581
|
F: __dxlog_file12,
|
|
2577
|
-
L:
|
|
2582
|
+
L: 134,
|
|
2578
2583
|
S: this,
|
|
2579
2584
|
C: (f, a) => f(...a)
|
|
2580
2585
|
});
|
|
2581
2586
|
}
|
|
2582
2587
|
} else {
|
|
2583
2588
|
if (guardedState.error(extension, err)) {
|
|
2589
|
+
metrics.increment("invitation.failed");
|
|
2584
2590
|
import_log6.log.error("failed", err, {
|
|
2585
2591
|
F: __dxlog_file12,
|
|
2586
|
-
L:
|
|
2592
|
+
L: 139,
|
|
2587
2593
|
S: this,
|
|
2588
2594
|
C: (f, a) => f(...a)
|
|
2589
2595
|
});
|
|
@@ -2594,7 +2600,7 @@ var InvitationsHandler = class {
|
|
|
2594
2600
|
error: err
|
|
2595
2601
|
}), {
|
|
2596
2602
|
F: __dxlog_file12,
|
|
2597
|
-
L:
|
|
2603
|
+
L: 142,
|
|
2598
2604
|
S: this,
|
|
2599
2605
|
C: (f, a) => f(...a)
|
|
2600
2606
|
});
|
|
@@ -2608,7 +2614,7 @@ var InvitationsHandler = class {
|
|
|
2608
2614
|
...err.context
|
|
2609
2615
|
}, {
|
|
2610
2616
|
F: __dxlog_file12,
|
|
2611
|
-
L:
|
|
2617
|
+
L: 150,
|
|
2612
2618
|
S: this,
|
|
2613
2619
|
C: (f, a) => f(...a)
|
|
2614
2620
|
});
|
|
@@ -2616,20 +2622,22 @@ var InvitationsHandler = class {
|
|
|
2616
2622
|
}
|
|
2617
2623
|
if (err instanceof import_async9.TimeoutError) {
|
|
2618
2624
|
if (guardedState.set(extension, import_services6.Invitation.State.TIMEOUT)) {
|
|
2625
|
+
metrics.increment("invitation.timeout");
|
|
2619
2626
|
(0, import_log6.log)("timeout", {
|
|
2620
2627
|
err
|
|
2621
2628
|
}, {
|
|
2622
2629
|
F: __dxlog_file12,
|
|
2623
|
-
L:
|
|
2630
|
+
L: 156,
|
|
2624
2631
|
S: this,
|
|
2625
2632
|
C: (f, a) => f(...a)
|
|
2626
2633
|
});
|
|
2627
2634
|
}
|
|
2628
2635
|
} else {
|
|
2629
2636
|
if (guardedState.error(extension, err)) {
|
|
2637
|
+
metrics.increment("invitation.failed");
|
|
2630
2638
|
import_log6.log.error("failed", err, {
|
|
2631
2639
|
F: __dxlog_file12,
|
|
2632
|
-
L:
|
|
2640
|
+
L: 161,
|
|
2633
2641
|
S: this,
|
|
2634
2642
|
C: (f, a) => f(...a)
|
|
2635
2643
|
});
|
|
@@ -2643,7 +2651,7 @@ var InvitationsHandler = class {
|
|
|
2643
2651
|
if (invitation.created.getTime() + invitation.lifetime * 1e3 < Date.now()) {
|
|
2644
2652
|
import_log6.log.warn("invitation has already expired", void 0, {
|
|
2645
2653
|
F: __dxlog_file12,
|
|
2646
|
-
L:
|
|
2654
|
+
L: 172,
|
|
2647
2655
|
S: this,
|
|
2648
2656
|
C: (f, a) => f(...a)
|
|
2649
2657
|
});
|
|
@@ -2651,6 +2659,7 @@ var InvitationsHandler = class {
|
|
|
2651
2659
|
(0, import_async9.scheduleTask)(ctx, async () => {
|
|
2652
2660
|
await swarmConnection.close();
|
|
2653
2661
|
guardedState.set(null, import_services6.Invitation.State.EXPIRED);
|
|
2662
|
+
metrics.increment("invitation.expired");
|
|
2654
2663
|
await ctx.dispose();
|
|
2655
2664
|
}, invitation.created.getTime() + invitation.lifetime * 1e3 - Date.now());
|
|
2656
2665
|
}
|
|
@@ -2666,7 +2675,7 @@ var InvitationsHandler = class {
|
|
|
2666
2675
|
if (deviceProfile) {
|
|
2667
2676
|
(0, import_invariant6.invariant)(invitation.kind === import_services6.Invitation.Kind.DEVICE, "deviceProfile provided for non-device invitation", {
|
|
2668
2677
|
F: __dxlog_file12,
|
|
2669
|
-
L:
|
|
2678
|
+
L: 206,
|
|
2670
2679
|
S: this,
|
|
2671
2680
|
A: [
|
|
2672
2681
|
"invitation.kind === Invitation.Kind.DEVICE",
|
|
@@ -2684,7 +2693,7 @@ var InvitationsHandler = class {
|
|
|
2684
2693
|
triedPeers: triedPeersIds.size
|
|
2685
2694
|
}, {
|
|
2686
2695
|
F: __dxlog_file12,
|
|
2687
|
-
L:
|
|
2696
|
+
L: 214,
|
|
2688
2697
|
S: this,
|
|
2689
2698
|
C: (f, a) => f(...a)
|
|
2690
2699
|
});
|
|
@@ -2711,7 +2720,7 @@ var InvitationsHandler = class {
|
|
|
2711
2720
|
currentState: guardedState.current.state
|
|
2712
2721
|
}, {
|
|
2713
2722
|
F: __dxlog_file12,
|
|
2714
|
-
L:
|
|
2723
|
+
L: 242,
|
|
2715
2724
|
S: this,
|
|
2716
2725
|
C: (f, a) => f(...a)
|
|
2717
2726
|
});
|
|
@@ -2729,7 +2738,7 @@ var InvitationsHandler = class {
|
|
|
2729
2738
|
id: traceId
|
|
2730
2739
|
}), {
|
|
2731
2740
|
F: __dxlog_file12,
|
|
2732
|
-
L:
|
|
2741
|
+
L: 254,
|
|
2733
2742
|
S: this,
|
|
2734
2743
|
C: (f, a) => f(...a)
|
|
2735
2744
|
});
|
|
@@ -2741,7 +2750,7 @@ var InvitationsHandler = class {
|
|
|
2741
2750
|
...protocol.toJSON()
|
|
2742
2751
|
}, {
|
|
2743
2752
|
F: __dxlog_file12,
|
|
2744
|
-
L:
|
|
2753
|
+
L: 265,
|
|
2745
2754
|
S: this,
|
|
2746
2755
|
C: (f, a) => f(...a)
|
|
2747
2756
|
});
|
|
@@ -2750,7 +2759,7 @@ var InvitationsHandler = class {
|
|
|
2750
2759
|
...protocol.toJSON()
|
|
2751
2760
|
}, {
|
|
2752
2761
|
F: __dxlog_file12,
|
|
2753
|
-
L:
|
|
2762
|
+
L: 269,
|
|
2754
2763
|
S: this,
|
|
2755
2764
|
C: (f, a) => f(...a)
|
|
2756
2765
|
});
|
|
@@ -2763,7 +2772,7 @@ var InvitationsHandler = class {
|
|
|
2763
2772
|
response: introductionResponse
|
|
2764
2773
|
}, {
|
|
2765
2774
|
F: __dxlog_file12,
|
|
2766
|
-
L:
|
|
2775
|
+
L: 274,
|
|
2767
2776
|
S: this,
|
|
2768
2777
|
C: (f, a) => f(...a)
|
|
2769
2778
|
});
|
|
@@ -2784,7 +2793,7 @@ var InvitationsHandler = class {
|
|
|
2784
2793
|
...protocol.toJSON()
|
|
2785
2794
|
}, {
|
|
2786
2795
|
F: __dxlog_file12,
|
|
2787
|
-
L:
|
|
2796
|
+
L: 300,
|
|
2788
2797
|
S: this,
|
|
2789
2798
|
C: (f, a) => f(...a)
|
|
2790
2799
|
});
|
|
@@ -2796,7 +2805,7 @@ var InvitationsHandler = class {
|
|
|
2796
2805
|
...protocol.toJSON()
|
|
2797
2806
|
}, {
|
|
2798
2807
|
F: __dxlog_file12,
|
|
2799
|
-
L:
|
|
2808
|
+
L: 311,
|
|
2800
2809
|
S: this,
|
|
2801
2810
|
C: (f, a) => f(...a)
|
|
2802
2811
|
});
|
|
@@ -2809,7 +2818,7 @@ var InvitationsHandler = class {
|
|
|
2809
2818
|
id: traceId
|
|
2810
2819
|
}), {
|
|
2811
2820
|
F: __dxlog_file12,
|
|
2812
|
-
L:
|
|
2821
|
+
L: 317,
|
|
2813
2822
|
S: this,
|
|
2814
2823
|
C: (f, a) => f(...a)
|
|
2815
2824
|
});
|
|
@@ -2819,7 +2828,7 @@ var InvitationsHandler = class {
|
|
|
2819
2828
|
...protocol.toJSON()
|
|
2820
2829
|
}, {
|
|
2821
2830
|
F: __dxlog_file12,
|
|
2822
|
-
L:
|
|
2831
|
+
L: 320,
|
|
2823
2832
|
S: this,
|
|
2824
2833
|
C: (f, a) => f(...a)
|
|
2825
2834
|
});
|
|
@@ -2827,7 +2836,7 @@ var InvitationsHandler = class {
|
|
|
2827
2836
|
} else {
|
|
2828
2837
|
(0, import_log6.log)("auth failed", err, {
|
|
2829
2838
|
F: __dxlog_file12,
|
|
2830
|
-
L:
|
|
2839
|
+
L: 323,
|
|
2831
2840
|
S: this,
|
|
2832
2841
|
C: (f, a) => f(...a)
|
|
2833
2842
|
});
|
|
@@ -2839,7 +2848,7 @@ var InvitationsHandler = class {
|
|
|
2839
2848
|
error: err
|
|
2840
2849
|
}), {
|
|
2841
2850
|
F: __dxlog_file12,
|
|
2842
|
-
L:
|
|
2851
|
+
L: 327,
|
|
2843
2852
|
S: this,
|
|
2844
2853
|
C: (f, a) => f(...a)
|
|
2845
2854
|
});
|
|
@@ -2855,7 +2864,7 @@ var InvitationsHandler = class {
|
|
|
2855
2864
|
...protocol.toJSON()
|
|
2856
2865
|
}, {
|
|
2857
2866
|
F: __dxlog_file12,
|
|
2858
|
-
L:
|
|
2867
|
+
L: 336,
|
|
2859
2868
|
S: this,
|
|
2860
2869
|
C: (f, a) => f(...a)
|
|
2861
2870
|
});
|
|
@@ -2863,7 +2872,7 @@ var InvitationsHandler = class {
|
|
|
2863
2872
|
} else {
|
|
2864
2873
|
(0, import_log6.log)("auth failed", err, {
|
|
2865
2874
|
F: __dxlog_file12,
|
|
2866
|
-
L:
|
|
2875
|
+
L: 339,
|
|
2867
2876
|
S: this,
|
|
2868
2877
|
C: (f, a) => f(...a)
|
|
2869
2878
|
});
|
|
@@ -2881,7 +2890,7 @@ var InvitationsHandler = class {
|
|
|
2881
2890
|
} else {
|
|
2882
2891
|
(0, import_invariant6.invariant)(invitation.swarmKey, void 0, {
|
|
2883
2892
|
F: __dxlog_file12,
|
|
2884
|
-
L:
|
|
2893
|
+
L: 354,
|
|
2885
2894
|
S: this,
|
|
2886
2895
|
A: [
|
|
2887
2896
|
"invitation.swarmKey",
|
|
@@ -2981,7 +2990,7 @@ var InvitationsHandler = class {
|
|
|
2981
2990
|
oldState: stateToString(invitation.state)
|
|
2982
2991
|
}, {
|
|
2983
2992
|
F: __dxlog_file12,
|
|
2984
|
-
L:
|
|
2993
|
+
L: 448,
|
|
2985
2994
|
S: this,
|
|
2986
2995
|
C: (f, a) => f(...a)
|
|
2987
2996
|
});
|
|
@@ -2992,7 +3001,7 @@ var InvitationsHandler = class {
|
|
|
2992
3001
|
oldState: stateToString(invitation.state)
|
|
2993
3002
|
}, {
|
|
2994
3003
|
F: __dxlog_file12,
|
|
2995
|
-
L:
|
|
3004
|
+
L: 454,
|
|
2996
3005
|
S: this,
|
|
2997
3006
|
C: (f, a) => f(...a)
|
|
2998
3007
|
});
|
|
@@ -3011,7 +3020,7 @@ var InvitationsHandler = class {
|
|
|
3011
3020
|
for (let attempt = 1; attempt <= MAX_OTP_ATTEMPTS; attempt++) {
|
|
3012
3021
|
(0, import_log6.log)("guest waiting for authentication code...", void 0, {
|
|
3013
3022
|
F: __dxlog_file12,
|
|
3014
|
-
L:
|
|
3023
|
+
L: 479,
|
|
3015
3024
|
S: this,
|
|
3016
3025
|
C: (f, a) => f(...a)
|
|
3017
3026
|
});
|
|
@@ -3019,7 +3028,7 @@ var InvitationsHandler = class {
|
|
|
3019
3028
|
const authCode = await authenticated.wait(options);
|
|
3020
3029
|
(0, import_log6.log)("sending authentication request", void 0, {
|
|
3021
3030
|
F: __dxlog_file12,
|
|
3022
|
-
L:
|
|
3031
|
+
L: 483,
|
|
3023
3032
|
S: this,
|
|
3024
3033
|
C: (f, a) => f(...a)
|
|
3025
3034
|
});
|
|
@@ -3038,7 +3047,7 @@ var InvitationsHandler = class {
|
|
|
3038
3047
|
attempt
|
|
3039
3048
|
}, {
|
|
3040
3049
|
F: __dxlog_file12,
|
|
3041
|
-
L:
|
|
3050
|
+
L: 494,
|
|
3042
3051
|
S: this,
|
|
3043
3052
|
C: (f, a) => f(...a)
|
|
3044
3053
|
});
|
|
@@ -3056,7 +3065,7 @@ var InvitationsHandler = class {
|
|
|
3056
3065
|
}
|
|
3057
3066
|
(0, import_log6.log)("sending authentication request", void 0, {
|
|
3058
3067
|
F: __dxlog_file12,
|
|
3059
|
-
L:
|
|
3068
|
+
L: 513,
|
|
3060
3069
|
S: this,
|
|
3061
3070
|
C: (f, a) => f(...a)
|
|
3062
3071
|
});
|
|
@@ -4755,21 +4764,21 @@ var DataSpace = class {
|
|
|
4755
4764
|
}
|
|
4756
4765
|
};
|
|
4757
4766
|
_ts_decorate4([
|
|
4758
|
-
|
|
4767
|
+
import_tracing6.trace.info()
|
|
4759
4768
|
], DataSpace.prototype, "_inner", void 0);
|
|
4760
4769
|
_ts_decorate4([
|
|
4761
|
-
|
|
4770
|
+
import_tracing6.trace.info()
|
|
4762
4771
|
], DataSpace.prototype, "id", null);
|
|
4763
4772
|
_ts_decorate4([
|
|
4764
|
-
|
|
4773
|
+
import_tracing6.trace.info()
|
|
4765
4774
|
], DataSpace.prototype, "key", null);
|
|
4766
4775
|
_ts_decorate4([
|
|
4767
|
-
|
|
4776
|
+
import_tracing6.trace.info({
|
|
4768
4777
|
enum: import_services12.SpaceState
|
|
4769
4778
|
})
|
|
4770
4779
|
], DataSpace.prototype, "state", null);
|
|
4771
4780
|
_ts_decorate4([
|
|
4772
|
-
|
|
4781
|
+
import_tracing6.trace.info({
|
|
4773
4782
|
depth: null
|
|
4774
4783
|
})
|
|
4775
4784
|
], DataSpace.prototype, "_automergeInfo", null);
|
|
@@ -4780,12 +4789,12 @@ _ts_decorate4([
|
|
|
4780
4789
|
import_async13.synchronized
|
|
4781
4790
|
], DataSpace.prototype, "close", null);
|
|
4782
4791
|
_ts_decorate4([
|
|
4783
|
-
|
|
4792
|
+
import_tracing6.trace.span({
|
|
4784
4793
|
showInBrowserTimeline: true
|
|
4785
4794
|
})
|
|
4786
4795
|
], DataSpace.prototype, "initializeDataPipeline", null);
|
|
4787
4796
|
_ts_decorate4([
|
|
4788
|
-
|
|
4797
|
+
import_tracing6.trace.span({
|
|
4789
4798
|
showInBrowserTimeline: true
|
|
4790
4799
|
})
|
|
4791
4800
|
], DataSpace.prototype, "_initializeAndReadControlPipeline", null);
|
|
@@ -4800,7 +4809,7 @@ _ts_decorate4([
|
|
|
4800
4809
|
], DataSpace.prototype, "deactivate", null);
|
|
4801
4810
|
DataSpace = _ts_decorate4([
|
|
4802
4811
|
(0, import_async13.trackLeaks)("open", "close"),
|
|
4803
|
-
|
|
4812
|
+
import_tracing6.trace.resource()
|
|
4804
4813
|
], DataSpace);
|
|
4805
4814
|
var spaceGenesis = async (keyring, signingContext, space, automergeRoot) => {
|
|
4806
4815
|
const credentials = [
|
|
@@ -4898,7 +4907,7 @@ var DataSpaceManager = class {
|
|
|
4898
4907
|
this._spaces = new import_util9.ComplexMap(import_keys12.PublicKey.hash);
|
|
4899
4908
|
this._isOpen = false;
|
|
4900
4909
|
this._instanceId = import_keys12.PublicKey.random().toHex();
|
|
4901
|
-
|
|
4910
|
+
import_tracing7.trace.diagnostic({
|
|
4902
4911
|
id: "spaces",
|
|
4903
4912
|
name: "Spaces",
|
|
4904
4913
|
fetch: async () => {
|
|
@@ -5754,7 +5763,7 @@ var SpacesServiceImpl = class {
|
|
|
5754
5763
|
const dataSpaceManager = await this._getDataSpaceManager();
|
|
5755
5764
|
const identity = this._identityManager.identity?.identityKey.truncate();
|
|
5756
5765
|
if (identity) {
|
|
5757
|
-
|
|
5766
|
+
import_tracing8.trace.metrics.gauge("echo.space.count", dataSpaceManager.spaces.size, {
|
|
5758
5767
|
tags: {
|
|
5759
5768
|
identity
|
|
5760
5769
|
}
|
|
@@ -6026,14 +6035,14 @@ var ServiceContext = class extends import_context14.Resource {
|
|
|
6026
6035
|
}
|
|
6027
6036
|
};
|
|
6028
6037
|
_ts_decorate6([
|
|
6029
|
-
|
|
6038
|
+
import_tracing9.trace.span()
|
|
6030
6039
|
], ServiceContext.prototype, "_open", null);
|
|
6031
6040
|
_ts_decorate6([
|
|
6032
|
-
|
|
6041
|
+
import_tracing9.trace.span()
|
|
6033
6042
|
], ServiceContext.prototype, "_initialize", null);
|
|
6034
6043
|
ServiceContext = _ts_decorate6([
|
|
6035
6044
|
(0, import_util10.safeInstanceof)("dxos.client-services.ServiceContext"),
|
|
6036
|
-
|
|
6045
|
+
import_tracing9.trace.resource()
|
|
6037
6046
|
], ServiceContext);
|
|
6038
6047
|
var ServiceRegistry = class {
|
|
6039
6048
|
// prettier-ignore
|
|
@@ -6410,7 +6419,7 @@ var DiagnosticsCollector = class {
|
|
|
6410
6419
|
});
|
|
6411
6420
|
const clientDiagnostics = {
|
|
6412
6421
|
config,
|
|
6413
|
-
trace:
|
|
6422
|
+
trace: import_tracing11.TRACE_PROCESSOR.getDiagnostics()
|
|
6414
6423
|
};
|
|
6415
6424
|
const diagnostics = serviceDiagnostics != null ? {
|
|
6416
6425
|
client: clientDiagnostics,
|
|
@@ -6423,12 +6432,12 @@ var DiagnosticsCollector = class {
|
|
|
6423
6432
|
}
|
|
6424
6433
|
};
|
|
6425
6434
|
var findSystemServiceProvider = () => {
|
|
6426
|
-
const serviceProviders =
|
|
6435
|
+
const serviceProviders = import_tracing11.TRACE_PROCESSOR.findResourcesByAnnotation(ClientServicesProviderResource);
|
|
6427
6436
|
const providerResource = serviceProviders.find((r) => r.instance.deref()?.services?.SystemService != null);
|
|
6428
6437
|
return providerResource?.instance?.deref() ?? null;
|
|
6429
6438
|
};
|
|
6430
6439
|
var findConfigs = () => {
|
|
6431
|
-
const configs =
|
|
6440
|
+
const configs = import_tracing11.TRACE_PROCESSOR.findResourcesByAnnotation(import_config3.ConfigResource);
|
|
6432
6441
|
return configs.map((r) => r.instance.deref()).filter(import_util13.nonNullable);
|
|
6433
6442
|
};
|
|
6434
6443
|
var ContactsServiceImpl = class {
|
|
@@ -6550,7 +6559,7 @@ var LoggingServiceImpl = class {
|
|
|
6550
6559
|
};
|
|
6551
6560
|
return new import_codec_protobuf14.Stream(({ next }) => {
|
|
6552
6561
|
const update = () => {
|
|
6553
|
-
const
|
|
6562
|
+
const metrics2 = {
|
|
6554
6563
|
timestamp: /* @__PURE__ */ new Date(),
|
|
6555
6564
|
values: [
|
|
6556
6565
|
getNumericalValues("dxos.echo.pipeline.control"),
|
|
@@ -6559,7 +6568,7 @@ var LoggingServiceImpl = class {
|
|
|
6559
6568
|
};
|
|
6560
6569
|
next({
|
|
6561
6570
|
timestamp: /* @__PURE__ */ new Date(),
|
|
6562
|
-
metrics
|
|
6571
|
+
metrics: metrics2
|
|
6563
6572
|
});
|
|
6564
6573
|
};
|
|
6565
6574
|
update();
|
|
@@ -6729,7 +6738,7 @@ var ClientServicesHost = class {
|
|
|
6729
6738
|
callbacks,
|
|
6730
6739
|
runtimeParams
|
|
6731
6740
|
} = {}) {
|
|
6732
|
-
this._tracingService =
|
|
6741
|
+
this._tracingService = import_tracing10.TRACE_PROCESSOR.createTraceSender();
|
|
6733
6742
|
this._statusUpdate = new import_async19.Event();
|
|
6734
6743
|
this._opening = false;
|
|
6735
6744
|
this._open = false;
|
|
@@ -7066,21 +7075,21 @@ var ClientServicesHost = class {
|
|
|
7066
7075
|
}
|
|
7067
7076
|
};
|
|
7068
7077
|
_ts_decorate8([
|
|
7069
|
-
|
|
7078
|
+
import_tracing10.trace.info()
|
|
7070
7079
|
], ClientServicesHost.prototype, "_opening", void 0);
|
|
7071
7080
|
_ts_decorate8([
|
|
7072
|
-
|
|
7081
|
+
import_tracing10.trace.info()
|
|
7073
7082
|
], ClientServicesHost.prototype, "_open", void 0);
|
|
7074
7083
|
_ts_decorate8([
|
|
7075
7084
|
import_async19.synchronized,
|
|
7076
|
-
|
|
7085
|
+
import_tracing10.trace.span()
|
|
7077
7086
|
], ClientServicesHost.prototype, "open", null);
|
|
7078
7087
|
_ts_decorate8([
|
|
7079
7088
|
import_async19.synchronized,
|
|
7080
|
-
|
|
7089
|
+
import_tracing10.trace.span()
|
|
7081
7090
|
], ClientServicesHost.prototype, "close", null);
|
|
7082
7091
|
ClientServicesHost = _ts_decorate8([
|
|
7083
|
-
|
|
7092
|
+
import_tracing10.trace.resource()
|
|
7084
7093
|
], ClientServicesHost);
|
|
7085
7094
|
// Annotate the CommonJS export names for ESM import in node:
|
|
7086
7095
|
0 && (module.exports = {
|
|
@@ -7126,4 +7135,4 @@ ClientServicesHost = _ts_decorate8([
|
|
|
7126
7135
|
subscribeToSpaces,
|
|
7127
7136
|
subscribeToSwarmInfo
|
|
7128
7137
|
});
|
|
7129
|
-
//# sourceMappingURL=chunk-
|
|
7138
|
+
//# sourceMappingURL=chunk-7XBIZ7NK.cjs.map
|