@dxos/shell 0.7.0 → 0.7.1-staging.599df14
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/bundle/shell.mjs +130 -130
- package/dist/bundle/shell.mjs.map +1 -1
- package/dist/bundle/shell.umd.js +2 -2
- package/dist/bundle/shell.umd.js.map +1 -1
- package/dist/bundle/style.css +1 -1
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/react.mjs +48 -39
- package/dist/lib/browser/react.mjs.map +3 -3
- package/dist/lib/node/meta.json +1 -1
- package/dist/lib/node/react.cjs +45 -36
- package/dist/lib/node/react.cjs.map +3 -3
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/react.mjs +48 -39
- package/dist/lib/node-esm/react.mjs.map +3 -3
- package/dist/types/src/panels/IdentityPanel/useEdgeAgentsHandlers.d.ts.map +1 -1
- package/dist/types/src/panels/IdentityPanel/useEdgeAgentsHandlers.js +3 -1
- package/dist/types/src/panels/IdentityPanel/useEdgeAgentsHandlers.js.map +1 -1
- package/package.json +25 -25
- package/src/panels/IdentityPanel/useEdgeAgentsHandlers.ts +3 -1
package/dist/lib/node/react.cjs
CHANGED
|
@@ -224,12 +224,13 @@ var import_util6 = require("@dxos/util");
|
|
|
224
224
|
var import_react_client4 = require("@dxos/react-client");
|
|
225
225
|
var import_react41 = require("react");
|
|
226
226
|
var import_invariant2 = require("@dxos/invariant");
|
|
227
|
+
var import_log5 = require("@dxos/log");
|
|
227
228
|
var import_services = require("@dxos/protocols/proto/dxos/client/services");
|
|
228
229
|
var import_metadata = require("@dxos/protocols/proto/dxos/echo/metadata");
|
|
229
230
|
var import_react_client5 = require("@dxos/react-client");
|
|
230
231
|
var import_react42 = require("react");
|
|
231
232
|
var import_invariant3 = require("@dxos/invariant");
|
|
232
|
-
var
|
|
233
|
+
var import_log6 = require("@dxos/log");
|
|
233
234
|
var import_react_client6 = require("@dxos/react-client");
|
|
234
235
|
var import_invitations4 = require("@dxos/react-client/invitations");
|
|
235
236
|
var import_react43 = require("@phosphor-icons/react");
|
|
@@ -241,11 +242,11 @@ var import_util7 = require("@dxos/util");
|
|
|
241
242
|
var import_invitations5 = require("@dxos/react-client/invitations");
|
|
242
243
|
var import_react45 = require("@phosphor-icons/react");
|
|
243
244
|
var import_react46 = __toESM(require("react"));
|
|
244
|
-
var
|
|
245
|
+
var import_log7 = require("@dxos/log");
|
|
245
246
|
var import_react_ui21 = require("@dxos/react-ui");
|
|
246
247
|
var import_react_ui_theme24 = require("@dxos/react-ui-theme");
|
|
247
248
|
var import_react47 = __toESM(require("react"));
|
|
248
|
-
var
|
|
249
|
+
var import_log8 = require("@dxos/log");
|
|
249
250
|
var import_react_client7 = require("@dxos/react-client");
|
|
250
251
|
var import_halo4 = require("@dxos/react-client/halo");
|
|
251
252
|
var import_react_ui22 = require("@dxos/react-ui");
|
|
@@ -256,7 +257,7 @@ var import_react_ui_theme25 = require("@dxos/react-ui-theme");
|
|
|
256
257
|
var import_react50 = require("@xstate/react");
|
|
257
258
|
var import_react51 = require("react");
|
|
258
259
|
var import_xstate2 = require("xstate");
|
|
259
|
-
var
|
|
260
|
+
var import_log9 = require("@dxos/log");
|
|
260
261
|
var import_react_client8 = require("@dxos/react-client");
|
|
261
262
|
var import_invitations6 = require("@dxos/react-client/invitations");
|
|
262
263
|
var import_react52 = require("@phosphor-icons/react");
|
|
@@ -269,13 +270,13 @@ var import_react_ui25 = require("@dxos/react-ui");
|
|
|
269
270
|
var import_react_ui_theme27 = require("@dxos/react-ui-theme");
|
|
270
271
|
var import_util8 = require("@dxos/util");
|
|
271
272
|
var import_react55 = __toESM(require("react"));
|
|
272
|
-
var
|
|
273
|
+
var import_log10 = require("@dxos/log");
|
|
273
274
|
var import_react_client9 = require("@dxos/react-client");
|
|
274
275
|
var import_react_ui26 = require("@dxos/react-ui");
|
|
275
276
|
var import_react56 = __toESM(require("react"));
|
|
276
277
|
var import_react_ui27 = require("@dxos/react-ui");
|
|
277
278
|
var import_react57 = __toESM(require("react"));
|
|
278
|
-
var
|
|
279
|
+
var import_log11 = require("@dxos/log");
|
|
279
280
|
var import_react_ui28 = require("@dxos/react-ui");
|
|
280
281
|
var import_react58 = __toESM(require("react"));
|
|
281
282
|
var import_react_ui29 = require("@dxos/react-ui");
|
|
@@ -288,15 +289,15 @@ var import_util9 = require("@dxos/util");
|
|
|
288
289
|
var import_invitations8 = require("@dxos/react-client/invitations");
|
|
289
290
|
var import_react60 = require("@phosphor-icons/react");
|
|
290
291
|
var import_react61 = __toESM(require("react"));
|
|
291
|
-
var
|
|
292
|
+
var import_log12 = require("@dxos/log");
|
|
292
293
|
var import_invitations9 = require("@dxos/react-client/invitations");
|
|
293
294
|
var import_react_ui31 = require("@dxos/react-ui");
|
|
294
295
|
var import_react62 = require("@xstate/react");
|
|
295
296
|
var import_xstate3 = require("xstate");
|
|
296
|
-
var
|
|
297
|
+
var import_log13 = require("@dxos/log");
|
|
297
298
|
var import_react63 = require("@phosphor-icons/react");
|
|
298
299
|
var import_react64 = __toESM(require("react"));
|
|
299
|
-
var
|
|
300
|
+
var import_log14 = require("@dxos/log");
|
|
300
301
|
var import_react_client10 = require("@dxos/react-client");
|
|
301
302
|
var import_echo4 = require("@dxos/react-client/echo");
|
|
302
303
|
var import_invitations10 = require("@dxos/react-client/invitations");
|
|
@@ -314,7 +315,7 @@ var import_react_ui35 = require("@dxos/react-ui");
|
|
|
314
315
|
var import_react_ui_theme31 = require("@dxos/react-ui-theme");
|
|
315
316
|
var import_rpc_tunnel = require("@dxos/rpc-tunnel");
|
|
316
317
|
var import_react68 = __toESM(require("react"));
|
|
317
|
-
var
|
|
318
|
+
var import_log15 = require("@dxos/log");
|
|
318
319
|
var import_react_client12 = require("@dxos/react-client");
|
|
319
320
|
var import_react_client13 = require("@dxos/react-client");
|
|
320
321
|
var import_echo5 = require("@dxos/react-client/echo");
|
|
@@ -1613,7 +1614,7 @@ var useEdgeAgentHandlers = ({ identity }) => {
|
|
|
1613
1614
|
const onAgentCreate = async () => {
|
|
1614
1615
|
(0, import_invariant2.invariant)(identity, "Identity not found", {
|
|
1615
1616
|
F: __dxlog_file3,
|
|
1616
|
-
L:
|
|
1617
|
+
L: 59,
|
|
1617
1618
|
S: void 0,
|
|
1618
1619
|
A: [
|
|
1619
1620
|
"identity",
|
|
@@ -1634,10 +1635,18 @@ var useEdgeAgentHandlers = ({ identity }) => {
|
|
|
1634
1635
|
setAgentStatus("creating");
|
|
1635
1636
|
setValidationMessage("");
|
|
1636
1637
|
try {
|
|
1637
|
-
await service.createAgent(
|
|
1638
|
+
await service.createAgent(null, {
|
|
1639
|
+
timeout: 7500
|
|
1640
|
+
});
|
|
1638
1641
|
await Promise.all(client.spaces.get().map((space) => space?.internal.setEdgeReplicationPreference(import_metadata.EdgeReplicationSetting.ENABLED)));
|
|
1639
1642
|
setAgentStatus("created");
|
|
1640
1643
|
} catch (err) {
|
|
1644
|
+
import_log5.log.catch(err, void 0, {
|
|
1645
|
+
F: __dxlog_file3,
|
|
1646
|
+
L: 82,
|
|
1647
|
+
S: void 0,
|
|
1648
|
+
C: (f, a) => f(...a)
|
|
1649
|
+
});
|
|
1641
1650
|
setAgentStatus("error");
|
|
1642
1651
|
setValidationMessage(`Error creating an agent: ${err.message}`);
|
|
1643
1652
|
}
|
|
@@ -1744,7 +1753,7 @@ var useKubeAgentHandlers = ({ invitations, identity }) => {
|
|
|
1744
1753
|
const handleAgentCreate = (0, import_react42.useCallback)(async (invitation) => {
|
|
1745
1754
|
const invitationCode = import_invitations4.InvitationEncoder.encode(invitation);
|
|
1746
1755
|
if (invitation.state === import_invitations4.Invitation.State.CONNECTING) {
|
|
1747
|
-
|
|
1756
|
+
import_log6.log.info(JSON.stringify({
|
|
1748
1757
|
invitationCode,
|
|
1749
1758
|
authCode: invitation.authCode
|
|
1750
1759
|
}), void 0, {
|
|
@@ -1910,7 +1919,7 @@ var ConfirmReset = ({ active, onCancel, onConfirm, mode }) => {
|
|
|
1910
1919
|
const processReset = async () => {
|
|
1911
1920
|
setPending(true);
|
|
1912
1921
|
return onConfirm?.().then(() => setPending(false), (error) => {
|
|
1913
|
-
|
|
1922
|
+
import_log7.log.catch(error, void 0, {
|
|
1914
1923
|
F: __dxlog_file5,
|
|
1915
1924
|
L: 38,
|
|
1916
1925
|
S: void 0,
|
|
@@ -2285,7 +2294,7 @@ var JoinHeading = /* @__PURE__ */ (0, import_react49.forwardRef)(({ mode, titleI
|
|
|
2285
2294
|
});
|
|
2286
2295
|
var __dxlog_file7 = "/home/runner/work/dxos/dxos/packages/sdk/shell/src/panels/JoinPanel/joinMachine.ts";
|
|
2287
2296
|
var getInvitationSubscribable = (Kind, invitation) => {
|
|
2288
|
-
(0,
|
|
2297
|
+
(0, import_log9.log)("[subscribing to invitation]", invitation, {
|
|
2289
2298
|
F: __dxlog_file7,
|
|
2290
2299
|
L: 90,
|
|
2291
2300
|
S: void 0,
|
|
@@ -2295,7 +2304,7 @@ var getInvitationSubscribable = (Kind, invitation) => {
|
|
|
2295
2304
|
subscribe: (next, onError, complete) => invitation.subscribe((invitation2) => {
|
|
2296
2305
|
switch (invitation2.state) {
|
|
2297
2306
|
case import_invitations6.Invitation.State.CONNECTING: {
|
|
2298
|
-
(0,
|
|
2307
|
+
(0, import_log9.log)("[invitation connecting]", {
|
|
2299
2308
|
Kind,
|
|
2300
2309
|
invitation: invitation2
|
|
2301
2310
|
}, {
|
|
@@ -2310,7 +2319,7 @@ var getInvitationSubscribable = (Kind, invitation) => {
|
|
|
2310
2319
|
});
|
|
2311
2320
|
}
|
|
2312
2321
|
case import_invitations6.Invitation.State.CONNECTED: {
|
|
2313
|
-
(0,
|
|
2322
|
+
(0, import_log9.log)("[invitation connected]", {
|
|
2314
2323
|
Kind,
|
|
2315
2324
|
invitation: invitation2
|
|
2316
2325
|
}, {
|
|
@@ -2325,7 +2334,7 @@ var getInvitationSubscribable = (Kind, invitation) => {
|
|
|
2325
2334
|
});
|
|
2326
2335
|
}
|
|
2327
2336
|
case import_invitations6.Invitation.State.READY_FOR_AUTHENTICATION: {
|
|
2328
|
-
(0,
|
|
2337
|
+
(0, import_log9.log)("[invitation ready for authentication]", {
|
|
2329
2338
|
Kind,
|
|
2330
2339
|
invitation: invitation2
|
|
2331
2340
|
}, {
|
|
@@ -2340,7 +2349,7 @@ var getInvitationSubscribable = (Kind, invitation) => {
|
|
|
2340
2349
|
});
|
|
2341
2350
|
}
|
|
2342
2351
|
case import_invitations6.Invitation.State.AUTHENTICATING: {
|
|
2343
|
-
(0,
|
|
2352
|
+
(0, import_log9.log)("[invitation authenticating]", {
|
|
2344
2353
|
Kind,
|
|
2345
2354
|
invitation: invitation2
|
|
2346
2355
|
}, {
|
|
@@ -2355,7 +2364,7 @@ var getInvitationSubscribable = (Kind, invitation) => {
|
|
|
2355
2364
|
});
|
|
2356
2365
|
}
|
|
2357
2366
|
case import_invitations6.Invitation.State.SUCCESS: {
|
|
2358
|
-
(0,
|
|
2367
|
+
(0, import_log9.log)("[invitation success]", {
|
|
2359
2368
|
Kind,
|
|
2360
2369
|
invitation: invitation2
|
|
2361
2370
|
}, {
|
|
@@ -2371,7 +2380,7 @@ var getInvitationSubscribable = (Kind, invitation) => {
|
|
|
2371
2380
|
return complete?.();
|
|
2372
2381
|
}
|
|
2373
2382
|
case import_invitations6.Invitation.State.CANCELLED: {
|
|
2374
|
-
|
|
2383
|
+
import_log9.log.warn("[invitation cancelled]", {
|
|
2375
2384
|
Kind
|
|
2376
2385
|
}, {
|
|
2377
2386
|
F: __dxlog_file7,
|
|
@@ -2385,7 +2394,7 @@ var getInvitationSubscribable = (Kind, invitation) => {
|
|
|
2385
2394
|
});
|
|
2386
2395
|
}
|
|
2387
2396
|
case import_invitations6.Invitation.State.TIMEOUT: {
|
|
2388
|
-
|
|
2397
|
+
import_log9.log.error("[invitation timeout]", {
|
|
2389
2398
|
Kind
|
|
2390
2399
|
}, {
|
|
2391
2400
|
F: __dxlog_file7,
|
|
@@ -2401,7 +2410,7 @@ var getInvitationSubscribable = (Kind, invitation) => {
|
|
|
2401
2410
|
}
|
|
2402
2411
|
}, (error) => {
|
|
2403
2412
|
if (error instanceof import_react_client8.AlreadyJoinedError) {
|
|
2404
|
-
(0,
|
|
2413
|
+
(0, import_log9.log)("[already joined]", {
|
|
2405
2414
|
Kind,
|
|
2406
2415
|
error
|
|
2407
2416
|
}, {
|
|
@@ -2416,7 +2425,7 @@ var getInvitationSubscribable = (Kind, invitation) => {
|
|
|
2416
2425
|
});
|
|
2417
2426
|
return complete?.();
|
|
2418
2427
|
}
|
|
2419
|
-
|
|
2428
|
+
import_log9.log.error("[invitation errored]", {
|
|
2420
2429
|
Kind,
|
|
2421
2430
|
error
|
|
2422
2431
|
}, {
|
|
@@ -2755,7 +2764,7 @@ var joinMachine = (0, import_xstate2.createMachine)({
|
|
|
2755
2764
|
} : context.space
|
|
2756
2765
|
}),
|
|
2757
2766
|
log: (context, event) => {
|
|
2758
|
-
(0,
|
|
2767
|
+
(0, import_log9.log)("[transition]", {
|
|
2759
2768
|
event,
|
|
2760
2769
|
haloInvitation: context.halo.invitation,
|
|
2761
2770
|
spaceInvitation: context.space.invitation
|
|
@@ -2773,7 +2782,7 @@ var defaultCodeFromUrl = (invitationType, text) => {
|
|
|
2773
2782
|
const searchParams = new URLSearchParams(text.substring(text.lastIndexOf("?")));
|
|
2774
2783
|
return searchParams.get(`${invitationType}InvitationCode`) ?? searchParams.get(`${invitationType}Invitation`) ?? searchParams.get("invitationCode") ?? searchParams.get("invitation") ?? text;
|
|
2775
2784
|
} catch (err) {
|
|
2776
|
-
|
|
2785
|
+
import_log9.log.catch(err, void 0, {
|
|
2777
2786
|
F: __dxlog_file7,
|
|
2778
2787
|
L: 452,
|
|
2779
2788
|
S: void 0,
|
|
@@ -2794,7 +2803,7 @@ var useJoinMachine = (client, options) => {
|
|
|
2794
2803
|
invitationSubscribable: getInvitationSubscribable("Halo", invitationObservable)
|
|
2795
2804
|
};
|
|
2796
2805
|
} catch (err) {
|
|
2797
|
-
|
|
2806
|
+
import_log9.log.error("Could not redeem device invitation code", err, {
|
|
2798
2807
|
F: __dxlog_file7,
|
|
2799
2808
|
L: 473,
|
|
2800
2809
|
S: void 0,
|
|
@@ -2819,7 +2828,7 @@ var useJoinMachine = (client, options) => {
|
|
|
2819
2828
|
invitationSubscribable: getInvitationSubscribable("Space", invitationObservable)
|
|
2820
2829
|
};
|
|
2821
2830
|
} catch (err) {
|
|
2822
|
-
|
|
2831
|
+
import_log9.log.error("Could not redeem space invitation code", err, {
|
|
2823
2832
|
F: __dxlog_file7,
|
|
2824
2833
|
L: 495,
|
|
2825
2834
|
S: void 0,
|
|
@@ -2984,7 +2993,7 @@ var IdentityInput = (props) => {
|
|
|
2984
2993
|
identity
|
|
2985
2994
|
});
|
|
2986
2995
|
}, (error) => {
|
|
2987
|
-
|
|
2996
|
+
import_log10.log.catch(error, void 0, {
|
|
2988
2997
|
F: __dxlog_file8,
|
|
2989
2998
|
L: 38,
|
|
2990
2999
|
S: void 0,
|
|
@@ -3001,7 +3010,7 @@ var IdentityInput = (props) => {
|
|
|
3001
3010
|
identity
|
|
3002
3011
|
});
|
|
3003
3012
|
}, (error) => {
|
|
3004
|
-
|
|
3013
|
+
import_log10.log.catch(error, void 0, {
|
|
3005
3014
|
F: __dxlog_file8,
|
|
3006
3015
|
L: 48,
|
|
3007
3016
|
S: void 0,
|
|
@@ -3054,7 +3063,7 @@ var invitationCodeFromUrl = (text) => {
|
|
|
3054
3063
|
const invitation = searchParams.get("spaceInvitationCode") ?? searchParams.get("deviceInvitationCode");
|
|
3055
3064
|
return invitation ?? text;
|
|
3056
3065
|
} catch (err) {
|
|
3057
|
-
|
|
3066
|
+
import_log11.log.catch(err, void 0, {
|
|
3058
3067
|
F: __dxlog_file9,
|
|
3059
3068
|
L: 25,
|
|
3060
3069
|
S: void 0,
|
|
@@ -3415,7 +3424,7 @@ var JoinPanel = ({ titleId: propsTitleId, mode = "default", initialDisposition =
|
|
|
3415
3424
|
});
|
|
3416
3425
|
(0, import_react47.useEffect)(() => {
|
|
3417
3426
|
const subscription = joinService.subscribe((state) => {
|
|
3418
|
-
(0,
|
|
3427
|
+
(0, import_log8.log)("[state]", state, {
|
|
3419
3428
|
F: __dxlog_file10,
|
|
3420
3429
|
L: 210,
|
|
3421
3430
|
S: void 0,
|
|
@@ -3738,7 +3747,7 @@ var spaceMachine = (0, import_xstate3.createMachine)({
|
|
|
3738
3747
|
invitation: () => void 0
|
|
3739
3748
|
}),
|
|
3740
3749
|
log: (context, event) => {
|
|
3741
|
-
(0,
|
|
3750
|
+
(0, import_log13.log)("[transition]", {
|
|
3742
3751
|
event,
|
|
3743
3752
|
context
|
|
3744
3753
|
}, {
|
|
@@ -3763,7 +3772,7 @@ var activeActionKey = "dxos:react-shell/space-manager/active-action";
|
|
|
3763
3772
|
var handleInvitationEvent = (invitation, subscription) => {
|
|
3764
3773
|
const invitationCode = import_invitations10.InvitationEncoder.encode(invitation);
|
|
3765
3774
|
if (invitation.state === import_invitations10.Invitation.State.CONNECTING) {
|
|
3766
|
-
|
|
3775
|
+
import_log14.log.info(JSON.stringify({
|
|
3767
3776
|
invitationCode,
|
|
3768
3777
|
authCode: invitation.authCode
|
|
3769
3778
|
}), void 0, {
|
|
@@ -3939,7 +3948,7 @@ var SpacePanel = ({ titleId: propsTitleId, createInvitationUrl = (code) => code,
|
|
|
3939
3948
|
});
|
|
3940
3949
|
(0, import_react61.useEffect)(() => {
|
|
3941
3950
|
const subscription = spaceService.subscribe((state) => {
|
|
3942
|
-
(0,
|
|
3951
|
+
(0, import_log12.log)("[state]", state, {
|
|
3943
3952
|
F: __dxlog_file13,
|
|
3944
3953
|
L: 95,
|
|
3945
3954
|
S: void 0,
|
|
@@ -4094,7 +4103,7 @@ var Shell = ({ runtime }) => {
|
|
|
4094
4103
|
]);
|
|
4095
4104
|
(0, import_react68.useEffect)(() => {
|
|
4096
4105
|
if (layout === import_react_client13.ShellLayout.SPACE && !space) {
|
|
4097
|
-
|
|
4106
|
+
import_log15.log.warn("No space found for shell space invitations.", void 0, {
|
|
4098
4107
|
F: __dxlog_file14,
|
|
4099
4108
|
L: 67,
|
|
4100
4109
|
S: void 0,
|