@dxos/plugin-client 0.8.4-main.4a85c3132b → 0.8.4-main.51f1e5ca51
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-J5LGTIGS.mjs +10 -0
- package/dist/lib/browser/chunk-J5LGTIGS.mjs.map +7 -0
- package/dist/lib/browser/chunk-M37DHX5L.mjs +131 -0
- package/dist/lib/browser/chunk-M37DHX5L.mjs.map +7 -0
- package/dist/lib/browser/chunk-RPMM5NKJ.mjs +175 -0
- package/dist/lib/browser/chunk-RPMM5NKJ.mjs.map +7 -0
- package/dist/lib/browser/chunk-VAIJSQYA.mjs +12 -0
- package/dist/lib/browser/chunk-VAIJSQYA.mjs.map +7 -0
- package/dist/lib/browser/cli/index.mjs +70 -94
- package/dist/lib/browser/cli/index.mjs.map +3 -3
- package/dist/lib/browser/create-agent-JV3EM3TV.mjs +26 -0
- package/dist/lib/browser/create-agent-JV3EM3TV.mjs.map +7 -0
- package/dist/lib/browser/create-identity-ZITQKEVZ.mjs +30 -0
- package/dist/lib/browser/create-identity-ZITQKEVZ.mjs.map +7 -0
- package/dist/lib/browser/create-passkey-NCP4XA7C.mjs +81 -0
- package/dist/lib/browser/create-passkey-NCP4XA7C.mjs.map +7 -0
- package/dist/lib/browser/create-recovery-code-L5LA3GAP.mjs +36 -0
- package/dist/lib/browser/create-recovery-code-L5LA3GAP.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +29 -105
- package/dist/lib/browser/index.mjs.map +4 -4
- package/dist/lib/browser/join-identity-3W6PJLKN.mjs +27 -0
- package/dist/lib/browser/join-identity-3W6PJLKN.mjs.map +7 -0
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/operations/index.mjs +13 -0
- package/dist/lib/browser/operations/index.mjs.map +7 -0
- package/dist/lib/browser/recover-identity-KL6QY4GI.mjs +26 -0
- package/dist/lib/browser/recover-identity-KL6QY4GI.mjs.map +7 -0
- package/dist/lib/browser/redeem-passkey-NDEWSJTM.mjs +66 -0
- package/dist/lib/browser/redeem-passkey-NDEWSJTM.mjs.map +7 -0
- package/dist/lib/browser/redeem-token-YLWAVFXD.mjs +29 -0
- package/dist/lib/browser/redeem-token-YLWAVFXD.mjs.map +7 -0
- package/dist/lib/browser/reset-storage-OBHEGA6Z.mjs +26 -0
- package/dist/lib/browser/reset-storage-OBHEGA6Z.mjs.map +7 -0
- package/dist/lib/browser/share-identity-FTFHFSZQ.mjs +31 -0
- package/dist/lib/browser/share-identity-FTFHFSZQ.mjs.map +7 -0
- package/dist/lib/browser/testing/index.mjs +22 -0
- package/dist/lib/browser/testing/index.mjs.map +7 -0
- package/dist/lib/browser/translations.mjs +74 -0
- package/dist/lib/browser/translations.mjs.map +7 -0
- package/dist/lib/browser/types/index.mjs +4 -6
- package/dist/lib/node-esm/chunk-G77YYPR6.mjs +176 -0
- package/dist/lib/node-esm/chunk-G77YYPR6.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-HSLMI22Q.mjs +11 -0
- package/dist/lib/node-esm/chunk-HSLMI22Q.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-OHKM7GJW.mjs +14 -0
- package/dist/lib/node-esm/chunk-OHKM7GJW.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-UBY7FBQ7.mjs +133 -0
- package/dist/lib/node-esm/chunk-UBY7FBQ7.mjs.map +7 -0
- package/dist/lib/node-esm/cli/index.mjs +70 -94
- package/dist/lib/node-esm/cli/index.mjs.map +3 -3
- package/dist/lib/node-esm/create-agent-Y4BPVDV7.mjs +27 -0
- package/dist/lib/node-esm/create-agent-Y4BPVDV7.mjs.map +7 -0
- package/dist/lib/node-esm/create-identity-367SQSX6.mjs +31 -0
- package/dist/lib/node-esm/create-identity-367SQSX6.mjs.map +7 -0
- package/dist/lib/node-esm/create-passkey-WMWK2ETT.mjs +82 -0
- package/dist/lib/node-esm/create-passkey-WMWK2ETT.mjs.map +7 -0
- package/dist/lib/node-esm/create-recovery-code-VJGE5HJL.mjs +37 -0
- package/dist/lib/node-esm/create-recovery-code-VJGE5HJL.mjs.map +7 -0
- package/dist/lib/node-esm/index.mjs +29 -105
- package/dist/lib/node-esm/index.mjs.map +4 -4
- package/dist/lib/node-esm/join-identity-IRIRO2VT.mjs +28 -0
- package/dist/lib/node-esm/join-identity-IRIRO2VT.mjs.map +7 -0
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/operations/index.mjs +14 -0
- package/dist/lib/node-esm/operations/index.mjs.map +7 -0
- package/dist/lib/node-esm/recover-identity-LJCY4BCJ.mjs +27 -0
- package/dist/lib/node-esm/recover-identity-LJCY4BCJ.mjs.map +7 -0
- package/dist/lib/node-esm/redeem-passkey-PT7QWFJE.mjs +67 -0
- package/dist/lib/node-esm/redeem-passkey-PT7QWFJE.mjs.map +7 -0
- package/dist/lib/node-esm/redeem-token-BHKHEXJM.mjs +30 -0
- package/dist/lib/node-esm/redeem-token-BHKHEXJM.mjs.map +7 -0
- package/dist/lib/node-esm/reset-storage-VPUZJOUV.mjs +27 -0
- package/dist/lib/node-esm/reset-storage-VPUZJOUV.mjs.map +7 -0
- package/dist/lib/node-esm/share-identity-SZ3REIRC.mjs +32 -0
- package/dist/lib/node-esm/share-identity-SZ3REIRC.mjs.map +7 -0
- package/dist/lib/node-esm/testing/index.mjs +23 -0
- package/dist/lib/node-esm/testing/index.mjs.map +7 -0
- package/dist/lib/node-esm/translations.mjs +75 -0
- package/dist/lib/node-esm/translations.mjs.map +7 -0
- package/dist/lib/node-esm/types/index.mjs +4 -6
- package/dist/types/src/ClientPlugin.d.ts +1 -1
- package/dist/types/src/ClientPlugin.d.ts.map +1 -1
- package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -0
- package/dist/types/src/capabilities/{client/client.d.ts → client.d.ts} +2 -2
- package/dist/types/src/capabilities/client.d.ts.map +1 -0
- package/dist/types/src/capabilities/index.d.ts +32 -7
- package/dist/types/src/capabilities/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/migrations.d.ts.map +1 -0
- package/dist/types/src/capabilities/navigation-handler/index.d.ts +4 -0
- package/dist/types/src/capabilities/navigation-handler/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/navigation-handler/navigation-handler.d.ts +15 -0
- package/dist/types/src/capabilities/navigation-handler/navigation-handler.d.ts.map +1 -0
- package/dist/types/src/capabilities/node.d.ts +21 -0
- package/dist/types/src/capabilities/node.d.ts.map +1 -0
- package/dist/types/src/capabilities/operation-handler.d.ts +6 -0
- package/dist/types/src/capabilities/operation-handler.d.ts.map +1 -0
- package/dist/types/src/capabilities/react-context.d.ts.map +1 -0
- package/dist/types/src/capabilities/{react-surface/react-surface.d.ts → react-surface.d.ts} +1 -1
- package/dist/types/src/capabilities/react-surface.d.ts.map +1 -0
- package/dist/types/src/capabilities/schema-defs.d.ts.map +1 -0
- package/dist/types/src/cli/commands/config/index.d.ts +1 -1
- package/dist/types/src/cli/commands/config/view.d.ts +1 -1
- package/dist/types/src/cli/commands/config/view.d.ts.map +1 -1
- package/dist/types/src/cli/commands/device/info/info.d.ts +2 -2
- package/dist/types/src/cli/commands/device/info/info.d.ts.map +1 -1
- package/dist/types/src/cli/commands/device/list/list.d.ts +2 -2
- package/dist/types/src/cli/commands/device/list/list.d.ts.map +1 -1
- package/dist/types/src/cli/commands/device/update/update.d.ts.map +1 -1
- package/dist/types/src/cli/commands/device/util.d.ts.map +1 -1
- package/dist/types/src/cli/commands/edge/status.d.ts.map +1 -1
- package/dist/types/src/cli/commands/halo/create/create.d.ts +2 -2
- package/dist/types/src/cli/commands/halo/create/create.d.ts.map +1 -1
- package/dist/types/src/cli/commands/halo/credential/list/list.d.ts +3 -3
- package/dist/types/src/cli/commands/halo/credential/list/list.d.ts.map +1 -1
- package/dist/types/src/cli/commands/halo/identity/identity.d.ts +2 -2
- package/dist/types/src/cli/commands/halo/identity/identity.d.ts.map +1 -1
- package/dist/types/src/cli/commands/halo/join/join.d.ts +1 -1
- package/dist/types/src/cli/commands/halo/keys/keys.d.ts +2 -2
- package/dist/types/src/cli/commands/halo/keys/keys.d.ts.map +1 -1
- package/dist/types/src/cli/commands/halo/seed/seed.d.ts.map +1 -1
- package/dist/types/src/cli/commands/halo/update/update.d.ts.map +1 -1
- package/dist/types/src/cli/commands/halo/util.d.ts.map +1 -1
- package/dist/types/src/cli/commands/profile/create.d.ts +3 -2
- package/dist/types/src/cli/commands/profile/create.d.ts.map +1 -1
- package/dist/types/src/cli/commands/profile/delete.d.ts +1 -1
- package/dist/types/src/cli/commands/profile/delete.d.ts.map +1 -1
- package/dist/types/src/cli/commands/profile/import.d.ts +2 -2
- package/dist/types/src/cli/commands/profile/index.d.ts +6 -6
- package/dist/types/src/cli/commands/profile/list.d.ts.map +1 -1
- package/dist/types/src/cli/commands/profile/reset.d.ts +1 -1
- package/dist/types/src/cli/commands/profile/util.d.ts.map +1 -1
- package/dist/types/src/cli/plugin.d.ts +1 -1
- package/dist/types/src/cli/plugin.d.ts.map +1 -1
- package/dist/types/src/cli/testing/test-console.d.ts.map +1 -1
- package/dist/types/src/containers/DevicesContainer/DevicesContainer.d.ts.map +1 -1
- package/dist/types/src/containers/DevicesContainer/DevicesContainer.stories.d.ts +166 -165
- package/dist/types/src/containers/DevicesContainer/DevicesContainer.stories.d.ts.map +1 -1
- package/dist/types/src/containers/DevicesContainer/index.d.ts +1 -2
- package/dist/types/src/containers/DevicesContainer/index.d.ts.map +1 -1
- package/dist/types/src/containers/JoinDialog/JoinDialog.d.ts.map +1 -1
- package/dist/types/src/containers/JoinDialog/JoinDialog.stories.d.ts +15 -0
- package/dist/types/src/containers/JoinDialog/JoinDialog.stories.d.ts.map +1 -0
- package/dist/types/src/containers/JoinDialog/index.d.ts +1 -2
- package/dist/types/src/containers/JoinDialog/index.d.ts.map +1 -1
- package/dist/types/src/containers/ProfileContainer/ProfileContainer.stories.d.ts.map +1 -1
- package/dist/types/src/containers/ProfileContainer/index.d.ts +1 -2
- package/dist/types/src/containers/ProfileContainer/index.d.ts.map +1 -1
- package/dist/types/src/containers/RecoveryCodeDialog/RecoveryCodeDialog.d.ts.map +1 -1
- package/dist/types/src/containers/RecoveryCodeDialog/RecoveryCodeDialog.stories.d.ts.map +1 -1
- package/dist/types/src/containers/RecoveryCodeDialog/index.d.ts.map +1 -1
- package/dist/types/src/containers/RecoveryCredentialsContainer/RecoveryCredentialsContainer.d.ts.map +1 -1
- package/dist/types/src/containers/RecoveryCredentialsContainer/RecoveryCredentialsContainer.stories.d.ts.map +1 -1
- package/dist/types/src/containers/RecoveryCredentialsContainer/index.d.ts +1 -2
- package/dist/types/src/containers/RecoveryCredentialsContainer/index.d.ts.map +1 -1
- package/dist/types/src/containers/ResetDialog/ResetDialog.d.ts +1 -1
- package/dist/types/src/containers/ResetDialog/ResetDialog.d.ts.map +1 -1
- package/dist/types/src/containers/ResetDialog/ResetDialog.stories.d.ts +1 -1
- package/dist/types/src/containers/ResetDialog/ResetDialog.stories.d.ts.map +1 -1
- package/dist/types/src/containers/ResetDialog/index.d.ts.map +1 -1
- package/dist/types/src/index.d.ts +2 -4
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/operations/create-agent.d.ts +5 -0
- package/dist/types/src/operations/create-agent.d.ts.map +1 -0
- package/dist/types/src/operations/create-identity.d.ts +5 -0
- package/dist/types/src/operations/create-identity.d.ts.map +1 -0
- package/dist/types/src/operations/create-passkey.d.ts +5 -0
- package/dist/types/src/operations/create-passkey.d.ts.map +1 -0
- package/dist/types/src/operations/create-recovery-code.d.ts +5 -0
- package/dist/types/src/operations/create-recovery-code.d.ts.map +1 -0
- package/dist/types/src/operations/definitions.d.ts +36 -0
- package/dist/types/src/operations/definitions.d.ts.map +1 -0
- package/dist/types/src/operations/index.d.ts +4 -0
- package/dist/types/src/operations/index.d.ts.map +1 -0
- package/dist/types/src/operations/join-identity.d.ts +5 -0
- package/dist/types/src/operations/join-identity.d.ts.map +1 -0
- package/dist/types/src/operations/recover-identity.d.ts +5 -0
- package/dist/types/src/operations/recover-identity.d.ts.map +1 -0
- package/dist/types/src/operations/redeem-passkey.d.ts +5 -0
- package/dist/types/src/operations/redeem-passkey.d.ts.map +1 -0
- package/dist/types/src/operations/redeem-token.d.ts +5 -0
- package/dist/types/src/operations/redeem-token.d.ts.map +1 -0
- package/dist/types/src/operations/reset-storage.d.ts +5 -0
- package/dist/types/src/operations/reset-storage.d.ts.map +1 -0
- package/dist/types/src/operations/share-identity.d.ts +5 -0
- package/dist/types/src/operations/share-identity.d.ts.map +1 -0
- package/dist/types/src/testing/index.d.ts +2 -0
- package/dist/types/src/testing/index.d.ts.map +1 -0
- package/dist/types/src/testing/initializeIdentity.d.ts +13 -0
- package/dist/types/src/testing/initializeIdentity.d.ts.map +1 -0
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/src/types/capabilities.d.ts +1 -2
- package/dist/types/src/types/capabilities.d.ts.map +1 -1
- package/dist/types/src/types/events.d.ts.map +1 -1
- package/dist/types/src/types/schema.d.ts +20 -173
- package/dist/types/src/types/schema.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +68 -39
- package/src/ClientPlugin.ts +14 -10
- package/src/capabilities/{app-graph-builder/app-graph-builder.ts → app-graph-builder.ts} +20 -19
- package/src/capabilities/{client/client.ts → client.ts} +9 -7
- package/src/capabilities/index.ts +15 -7
- package/src/capabilities/{migrations/migrations.ts → migrations.ts} +1 -1
- package/src/capabilities/navigation-handler/index.ts +9 -0
- package/src/capabilities/navigation-handler/navigation-handler.ts +64 -0
- package/src/capabilities/node.ts +13 -0
- package/src/capabilities/operation-handler.ts +16 -0
- package/src/capabilities/{react-context/react-context.tsx → react-context.tsx} +4 -4
- package/src/capabilities/{react-surface/react-surface.tsx → react-surface.tsx} +18 -22
- package/src/capabilities/{schema-defs/schema-defs.ts → schema-defs.ts} +1 -1
- package/src/cli/commands/config/view.ts +4 -1
- package/src/cli/commands/device/info/info.test.ts +0 -1
- package/src/cli/commands/device/info/info.ts +0 -2
- package/src/cli/commands/device/list/list.test.ts +0 -1
- package/src/cli/commands/device/list/list.ts +0 -2
- package/src/cli/commands/device/update/update.ts +0 -2
- package/src/cli/commands/edge/status.ts +2 -1
- package/src/cli/commands/halo/create/create.test.ts +0 -1
- package/src/cli/commands/halo/create/create.ts +11 -4
- package/src/cli/commands/halo/credential/list/list.test.ts +0 -1
- package/src/cli/commands/halo/credential/list/list.ts +4 -7
- package/src/cli/commands/halo/identity/identity.ts +0 -1
- package/src/cli/commands/halo/keys/keys.ts +0 -2
- package/src/cli/commands/halo/seed/seed.ts +0 -2
- package/src/cli/commands/halo/update/update.test.ts +0 -1
- package/src/cli/commands/halo/update/update.ts +0 -2
- package/src/cli/commands/profile/create.ts +9 -6
- package/src/cli/commands/profile/delete.ts +5 -2
- package/src/cli/commands/profile/list.ts +12 -11
- package/src/cli/plugin.ts +7 -10
- package/src/cli/testing/test-console.ts +1 -2
- package/src/constants.ts +4 -4
- package/src/containers/DevicesContainer/DevicesContainer.stories.tsx +4 -3
- package/src/containers/DevicesContainer/DevicesContainer.tsx +49 -48
- package/src/containers/DevicesContainer/index.ts +1 -3
- package/src/containers/JoinDialog/JoinDialog.stories.tsx +43 -0
- package/src/containers/JoinDialog/JoinDialog.tsx +15 -12
- package/src/containers/JoinDialog/index.ts +1 -3
- package/src/containers/ProfileContainer/ProfileContainer.stories.tsx +1 -1
- package/src/containers/ProfileContainer/ProfileContainer.tsx +12 -12
- package/src/containers/ProfileContainer/index.ts +1 -3
- package/src/containers/RecoveryCodeDialog/RecoveryCodeDialog.stories.tsx +1 -1
- package/src/containers/RecoveryCodeDialog/RecoveryCodeDialog.tsx +7 -7
- package/src/containers/RecoveryCredentialsContainer/RecoveryCredentialsContainer.stories.tsx +4 -3
- package/src/containers/RecoveryCredentialsContainer/RecoveryCredentialsContainer.tsx +25 -27
- package/src/containers/RecoveryCredentialsContainer/index.ts +1 -3
- package/src/containers/ResetDialog/ResetDialog.stories.tsx +4 -4
- package/src/containers/ResetDialog/ResetDialog.tsx +7 -5
- package/src/index.ts +2 -5
- package/src/meta.ts +1 -1
- package/src/operations/create-agent.ts +26 -0
- package/src/operations/create-identity.ts +29 -0
- package/src/operations/create-passkey.ts +88 -0
- package/src/operations/create-recovery-code.ts +34 -0
- package/src/operations/definitions.ts +107 -0
- package/src/operations/index.ts +20 -0
- package/src/operations/join-identity.ts +28 -0
- package/src/operations/recover-identity.ts +28 -0
- package/src/operations/redeem-passkey.ts +85 -0
- package/src/operations/redeem-token.ts +31 -0
- package/src/operations/reset-storage.ts +27 -0
- package/src/operations/share-identity.ts +26 -0
- package/src/testing/index.ts +5 -0
- package/src/testing/initializeIdentity.ts +24 -0
- package/src/translations.ts +53 -43
- package/src/types/capabilities.ts +4 -4
- package/src/types/events.ts +6 -6
- package/src/types/schema.ts +11 -121
- package/dist/lib/browser/DevicesContainer-46MEG3F5.mjs +0 -268
- package/dist/lib/browser/DevicesContainer-46MEG3F5.mjs.map +0 -7
- package/dist/lib/browser/JoinDialog-2RCYK4O5.mjs +0 -59
- package/dist/lib/browser/JoinDialog-2RCYK4O5.mjs.map +0 -7
- package/dist/lib/browser/ProfileContainer-XYRCOQ5I.mjs +0 -171
- package/dist/lib/browser/ProfileContainer-XYRCOQ5I.mjs.map +0 -7
- package/dist/lib/browser/RecoveryCodeDialog-EX2CLFND.mjs +0 -60
- package/dist/lib/browser/RecoveryCodeDialog-EX2CLFND.mjs.map +0 -7
- package/dist/lib/browser/RecoveryCredentialsContainer-RWTEIHOB.mjs +0 -57
- package/dist/lib/browser/RecoveryCredentialsContainer-RWTEIHOB.mjs.map +0 -7
- package/dist/lib/browser/ResetDialog-W24FOWBQ.mjs +0 -52
- package/dist/lib/browser/ResetDialog-W24FOWBQ.mjs.map +0 -7
- package/dist/lib/browser/app-graph-builder-QJWFLYZE.mjs +0 -121
- package/dist/lib/browser/app-graph-builder-QJWFLYZE.mjs.map +0 -7
- package/dist/lib/browser/chunk-4XYOOXAH.mjs +0 -18
- package/dist/lib/browser/chunk-4XYOOXAH.mjs.map +0 -7
- package/dist/lib/browser/chunk-DPAXDXMK.mjs +0 -283
- package/dist/lib/browser/chunk-DPAXDXMK.mjs.map +0 -7
- package/dist/lib/browser/chunk-N2GMSVDQ.mjs +0 -15
- package/dist/lib/browser/chunk-N2GMSVDQ.mjs.map +0 -7
- package/dist/lib/browser/chunk-VYX3ROUX.mjs +0 -15
- package/dist/lib/browser/chunk-VYX3ROUX.mjs.map +0 -7
- package/dist/lib/browser/client-Z25GQ5YC.mjs +0 -86
- package/dist/lib/browser/client-Z25GQ5YC.mjs.map +0 -7
- package/dist/lib/browser/migrations-HLHRMOW6.mjs +0 -25
- package/dist/lib/browser/migrations-HLHRMOW6.mjs.map +0 -7
- package/dist/lib/browser/operation-resolver-6QW3BKA5.mjs +0 -299
- package/dist/lib/browser/operation-resolver-6QW3BKA5.mjs.map +0 -7
- package/dist/lib/browser/react-context-E7TAJMDK.mjs +0 -26
- package/dist/lib/browser/react-context-E7TAJMDK.mjs.map +0 -7
- package/dist/lib/browser/react-surface-L5A2LBFE.mjs +0 -77
- package/dist/lib/browser/react-surface-L5A2LBFE.mjs.map +0 -7
- package/dist/lib/browser/schema-defs-5WDZWVEI.mjs +0 -28
- package/dist/lib/browser/schema-defs-5WDZWVEI.mjs.map +0 -7
- package/dist/lib/node-esm/DevicesContainer-WQ3DQA45.mjs +0 -269
- package/dist/lib/node-esm/DevicesContainer-WQ3DQA45.mjs.map +0 -7
- package/dist/lib/node-esm/JoinDialog-KLTNJY5F.mjs +0 -60
- package/dist/lib/node-esm/JoinDialog-KLTNJY5F.mjs.map +0 -7
- package/dist/lib/node-esm/ProfileContainer-XI425QK5.mjs +0 -172
- package/dist/lib/node-esm/ProfileContainer-XI425QK5.mjs.map +0 -7
- package/dist/lib/node-esm/RecoveryCodeDialog-AISRNJUM.mjs +0 -61
- package/dist/lib/node-esm/RecoveryCodeDialog-AISRNJUM.mjs.map +0 -7
- package/dist/lib/node-esm/RecoveryCredentialsContainer-3TKQRPQK.mjs +0 -58
- package/dist/lib/node-esm/RecoveryCredentialsContainer-3TKQRPQK.mjs.map +0 -7
- package/dist/lib/node-esm/ResetDialog-GGBWSQZO.mjs +0 -54
- package/dist/lib/node-esm/ResetDialog-GGBWSQZO.mjs.map +0 -7
- package/dist/lib/node-esm/app-graph-builder-6JD6BZAI.mjs +0 -122
- package/dist/lib/node-esm/app-graph-builder-6JD6BZAI.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-H2CCMM4Z.mjs +0 -20
- package/dist/lib/node-esm/chunk-H2CCMM4Z.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-HKSNTZF5.mjs +0 -16
- package/dist/lib/node-esm/chunk-HKSNTZF5.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-RGULICLJ.mjs +0 -17
- package/dist/lib/node-esm/chunk-RGULICLJ.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-VEUNEDN5.mjs +0 -284
- package/dist/lib/node-esm/chunk-VEUNEDN5.mjs.map +0 -7
- package/dist/lib/node-esm/client-5AIPYSBT.mjs +0 -87
- package/dist/lib/node-esm/client-5AIPYSBT.mjs.map +0 -7
- package/dist/lib/node-esm/migrations-O5KG2GGN.mjs +0 -26
- package/dist/lib/node-esm/migrations-O5KG2GGN.mjs.map +0 -7
- package/dist/lib/node-esm/operation-resolver-GSH7AOTZ.mjs +0 -300
- package/dist/lib/node-esm/operation-resolver-GSH7AOTZ.mjs.map +0 -7
- package/dist/lib/node-esm/react-context-OMJSBS23.mjs +0 -27
- package/dist/lib/node-esm/react-context-OMJSBS23.mjs.map +0 -7
- package/dist/lib/node-esm/react-surface-N3BSPMMX.mjs +0 -78
- package/dist/lib/node-esm/react-surface-N3BSPMMX.mjs.map +0 -7
- package/dist/lib/node-esm/schema-defs-ENOYSDP3.mjs +0 -29
- package/dist/lib/node-esm/schema-defs-ENOYSDP3.mjs.map +0 -7
- package/dist/types/src/capabilities/app-graph-builder/app-graph-builder.d.ts.map +0 -1
- package/dist/types/src/capabilities/app-graph-builder/index.d.ts +0 -3
- package/dist/types/src/capabilities/app-graph-builder/index.d.ts.map +0 -1
- package/dist/types/src/capabilities/client/client.d.ts.map +0 -1
- package/dist/types/src/capabilities/client/index.d.ts +0 -18
- package/dist/types/src/capabilities/client/index.d.ts.map +0 -1
- package/dist/types/src/capabilities/migrations/index.d.ts +0 -3
- package/dist/types/src/capabilities/migrations/index.d.ts.map +0 -1
- package/dist/types/src/capabilities/migrations/migrations.d.ts.map +0 -1
- package/dist/types/src/capabilities/operation-resolver/index.d.ts +0 -5
- package/dist/types/src/capabilities/operation-resolver/index.d.ts.map +0 -1
- package/dist/types/src/capabilities/operation-resolver/operation-resolver.d.ts +0 -8
- package/dist/types/src/capabilities/operation-resolver/operation-resolver.d.ts.map +0 -1
- package/dist/types/src/capabilities/react-context/index.d.ts +0 -7
- package/dist/types/src/capabilities/react-context/index.d.ts.map +0 -1
- package/dist/types/src/capabilities/react-context/react-context.d.ts.map +0 -1
- package/dist/types/src/capabilities/react-surface/index.d.ts +0 -5
- package/dist/types/src/capabilities/react-surface/index.d.ts.map +0 -1
- package/dist/types/src/capabilities/react-surface/react-surface.d.ts.map +0 -1
- package/dist/types/src/capabilities/schema-defs/index.d.ts +0 -3
- package/dist/types/src/capabilities/schema-defs/index.d.ts.map +0 -1
- package/dist/types/src/capabilities/schema-defs/schema-defs.d.ts.map +0 -1
- package/src/capabilities/app-graph-builder/index.ts +0 -7
- package/src/capabilities/client/index.ts +0 -7
- package/src/capabilities/migrations/index.ts +0 -7
- package/src/capabilities/operation-resolver/index.ts +0 -7
- package/src/capabilities/operation-resolver/operation-resolver.ts +0 -247
- package/src/capabilities/react-context/index.ts +0 -7
- package/src/capabilities/react-surface/index.ts +0 -7
- package/src/capabilities/schema-defs/index.ts +0 -7
- /package/dist/types/src/capabilities/{app-graph-builder/app-graph-builder.d.ts → app-graph-builder.d.ts} +0 -0
- /package/dist/types/src/capabilities/{migrations/migrations.d.ts → migrations.d.ts} +0 -0
- /package/dist/types/src/capabilities/{react-context/react-context.d.ts → react-context.d.ts} +0 -0
- /package/dist/types/src/capabilities/{schema-defs/schema-defs.d.ts → schema-defs.d.ts} +0 -0
|
@@ -16,7 +16,6 @@ describe('device list', () => {
|
|
|
16
16
|
Effect.gen(function* () {
|
|
17
17
|
const client = yield* ClientService;
|
|
18
18
|
yield* Effect.tryPromise(() => client.halo.createIdentity());
|
|
19
|
-
yield* Effect.tryPromise(() => client.spaces.waitUntilReady());
|
|
20
19
|
yield* handler();
|
|
21
20
|
const logger = yield* TestConsole.TestConsole;
|
|
22
21
|
const logs = logger.logs;
|
|
@@ -15,8 +15,6 @@ import { mapDevices, printDevices } from '../util';
|
|
|
15
15
|
export const handler = Effect.fn(function* () {
|
|
16
16
|
const { json } = yield* CommandConfig;
|
|
17
17
|
const client = yield* ClientService;
|
|
18
|
-
yield* Effect.tryPromise(() => client.spaces.waitUntilReady());
|
|
19
|
-
|
|
20
18
|
const devices = client.halo.devices.get();
|
|
21
19
|
|
|
22
20
|
if (json) {
|
|
@@ -16,8 +16,6 @@ import { printDevice } from '../util';
|
|
|
16
16
|
export const handler = Effect.fn(function* ({ label }: { label: string }) {
|
|
17
17
|
const { json } = yield* CommandConfig;
|
|
18
18
|
const client = yield* ClientService;
|
|
19
|
-
yield* Effect.tryPromise(() => client.spaces.waitUntilReady());
|
|
20
|
-
|
|
21
19
|
const device = client.halo.device;
|
|
22
20
|
if (!device) {
|
|
23
21
|
if (json) {
|
|
@@ -10,13 +10,14 @@ import * as Option from 'effect/Option';
|
|
|
10
10
|
import { CommandConfig } from '@dxos/cli-util';
|
|
11
11
|
import { ClientService } from '@dxos/client';
|
|
12
12
|
import { createEdgeIdentity } from '@dxos/client/edge';
|
|
13
|
+
import { Context } from '@dxos/context';
|
|
13
14
|
|
|
14
15
|
export const getStatus = () =>
|
|
15
16
|
Effect.gen(function* () {
|
|
16
17
|
const client = yield* ClientService;
|
|
17
18
|
const identity = createEdgeIdentity(client);
|
|
18
19
|
client.edge.http.setIdentity(identity);
|
|
19
|
-
const status = yield* Effect.tryPromise(() => client.edge.http.getStatus());
|
|
20
|
+
const status = yield* Effect.tryPromise(() => client.edge.http.getStatus(Context.default()));
|
|
20
21
|
|
|
21
22
|
if (yield* CommandConfig.isJson) {
|
|
22
23
|
yield* Console.log(JSON.stringify(status, null, 2));
|
|
@@ -15,7 +15,6 @@ import { runAndForwardErrors } from '@dxos/effect';
|
|
|
15
15
|
import { ObservabilityPlugin } from '@dxos/plugin-observability/cli';
|
|
16
16
|
|
|
17
17
|
import { ClientPlugin } from '../../../plugin';
|
|
18
|
-
|
|
19
18
|
import { handler } from './create';
|
|
20
19
|
|
|
21
20
|
const layer = Layer.merge(TestLayer, fromPlugins([ClientPlugin({}), OperationPlugin(), ObservabilityPlugin()]));
|
|
@@ -9,12 +9,16 @@ import * as Effect from 'effect/Effect';
|
|
|
9
9
|
import * as Option from 'effect/Option';
|
|
10
10
|
|
|
11
11
|
import { Capabilities, Plugin } from '@dxos/app-framework';
|
|
12
|
+
import { PERSONAL_SPACE_TAG } from '@dxos/app-toolkit';
|
|
12
13
|
import { CommandConfig, flushAndSync, spaceLayer } from '@dxos/cli-util';
|
|
13
14
|
import { print } from '@dxos/cli-util';
|
|
14
15
|
import { ClientService } from '@dxos/client';
|
|
15
16
|
import { invariant } from '@dxos/invariant';
|
|
17
|
+
import { EdgeReplicationSetting } from '@dxos/protocols/proto/dxos/echo/metadata';
|
|
18
|
+
import { MembershipPolicy } from '@dxos/protocols/proto/dxos/halo/credentials';
|
|
19
|
+
|
|
20
|
+
import { ClientOperation } from '#operations';
|
|
16
21
|
|
|
17
|
-
import { ClientOperation } from '../../../../types';
|
|
18
22
|
import { printIdentity } from '../util';
|
|
19
23
|
|
|
20
24
|
export const handler = Effect.fn(function* ({
|
|
@@ -39,9 +43,12 @@ export const handler = Effect.fn(function* ({
|
|
|
39
43
|
yield* invoke(ClientOperation.CreateAgent);
|
|
40
44
|
}
|
|
41
45
|
|
|
42
|
-
|
|
43
|
-
yield* Effect.promise(() =>
|
|
44
|
-
|
|
46
|
+
// Create personal space for the CLI identity.
|
|
47
|
+
const space = yield* Effect.promise(() =>
|
|
48
|
+
client.spaces.create({}, { tags: [PERSONAL_SPACE_TAG], membershipPolicy: MembershipPolicy.LOCKED }),
|
|
49
|
+
);
|
|
50
|
+
yield* Effect.promise(() => space.waitUntilReady());
|
|
51
|
+
yield* Effect.promise(() => space.internal.setEdgeReplicationPreference(EdgeReplicationSetting.ENABLED));
|
|
45
52
|
yield* flushAndSync({ indexes: true }).pipe(Effect.provide(spaceLayer(Option.some(space.id))));
|
|
46
53
|
|
|
47
54
|
if (json) {
|
|
@@ -17,7 +17,6 @@ describe('halo credential list', () => {
|
|
|
17
17
|
Effect.gen(function* () {
|
|
18
18
|
const client = yield* ClientService;
|
|
19
19
|
yield* Effect.tryPromise(() => client.halo.createIdentity());
|
|
20
|
-
yield* Effect.tryPromise(() => client.spaces.waitUntilReady());
|
|
21
20
|
yield* handler({ type: Option.none(), spaceId: Option.none(), timeout: 500, delay: 250 });
|
|
22
21
|
const logger = yield* TestConsole.TestConsole;
|
|
23
22
|
const logs = logger.logs;
|
|
@@ -9,7 +9,7 @@ import * as Duration from 'effect/Duration';
|
|
|
9
9
|
import * as Effect from 'effect/Effect';
|
|
10
10
|
import * as Option from 'effect/Option';
|
|
11
11
|
|
|
12
|
-
import { CommandConfig, Common, FormBuilder, getSpace, printList
|
|
12
|
+
import { CommandConfig, Common, FormBuilder, getSpace, printList } from '@dxos/cli-util';
|
|
13
13
|
import { ClientService } from '@dxos/client';
|
|
14
14
|
import type { Credential } from '@dxos/client/halo';
|
|
15
15
|
import { type Key } from '@dxos/echo';
|
|
@@ -41,20 +41,17 @@ export const handler = Effect.fn(function* ({
|
|
|
41
41
|
delay,
|
|
42
42
|
}: {
|
|
43
43
|
type: Option.Option<string>;
|
|
44
|
-
spaceId: Option.Option<
|
|
44
|
+
spaceId: Option.Option<Key.SpaceId>;
|
|
45
45
|
timeout: number;
|
|
46
46
|
delay: number;
|
|
47
47
|
}) {
|
|
48
48
|
const { json } = yield* CommandConfig;
|
|
49
49
|
const client = yield* ClientService;
|
|
50
|
-
yield* Effect.tryPromise(() => client.spaces.waitUntilReady());
|
|
51
|
-
|
|
52
50
|
let credentials: Credential[];
|
|
53
51
|
|
|
54
|
-
const resolvedSpaceId = yield* spaceIdWithDefault(spaceId as Option.Option<Key.SpaceId>);
|
|
55
52
|
if (Option.isSome(spaceId)) {
|
|
56
|
-
// If space ID was provided, get credentials from that space
|
|
57
|
-
const space = yield* getSpace(
|
|
53
|
+
// If space ID was provided, get credentials from that space.
|
|
54
|
+
const space = yield* getSpace(spaceId.value);
|
|
58
55
|
credentials = yield* Effect.tryPromise(() => space.internal.getCredentials());
|
|
59
56
|
} else {
|
|
60
57
|
// Get credentials from HALO
|
|
@@ -14,8 +14,6 @@ import { ClientService } from '@dxos/client';
|
|
|
14
14
|
export const handler = Effect.fn(function* () {
|
|
15
15
|
const { json } = yield* CommandConfig;
|
|
16
16
|
const client = yield* ClientService;
|
|
17
|
-
yield* Effect.tryPromise(() => client.spaces.waitUntilReady());
|
|
18
|
-
|
|
19
17
|
const identity = client.halo.identity.get();
|
|
20
18
|
const device = client.halo.device;
|
|
21
19
|
|
|
@@ -12,8 +12,6 @@ import { ClientService } from '@dxos/client';
|
|
|
12
12
|
export const handler = Effect.fn(function* () {
|
|
13
13
|
const { json } = yield* CommandConfig;
|
|
14
14
|
const client = yield* ClientService;
|
|
15
|
-
yield* Effect.tryPromise(() => client.spaces.waitUntilReady());
|
|
16
|
-
|
|
17
15
|
const identityService = client.services.services.IdentityService;
|
|
18
16
|
if (!identityService) {
|
|
19
17
|
if (json) {
|
|
@@ -16,7 +16,6 @@ describe('halo update', () => {
|
|
|
16
16
|
Effect.gen(function* () {
|
|
17
17
|
const client = yield* ClientService;
|
|
18
18
|
yield* Effect.tryPromise(() => client.halo.createIdentity());
|
|
19
|
-
yield* Effect.tryPromise(() => client.spaces.waitUntilReady());
|
|
20
19
|
yield* handler({ displayName: 'Updated Name' });
|
|
21
20
|
const logger = yield* TestConsole.TestConsole;
|
|
22
21
|
const logs = logger.logs;
|
|
@@ -16,8 +16,6 @@ import { printIdentity } from '../util';
|
|
|
16
16
|
export const handler = Effect.fn(function* ({ displayName }: { displayName: string }) {
|
|
17
17
|
const { json } = yield* CommandConfig;
|
|
18
18
|
const client = yield* ClientService;
|
|
19
|
-
yield* Effect.tryPromise(() => client.spaces.waitUntilReady());
|
|
20
|
-
|
|
21
19
|
const identity = client.halo.identity.get();
|
|
22
20
|
if (!identity) {
|
|
23
21
|
if (json) {
|
|
@@ -5,13 +5,14 @@
|
|
|
5
5
|
import * as Command from '@effect/cli/Command';
|
|
6
6
|
import * as Options from '@effect/cli/Options';
|
|
7
7
|
import * as FileSystem from '@effect/platform/FileSystem';
|
|
8
|
+
import * as Path from '@effect/platform/Path';
|
|
8
9
|
import * as Console from 'effect/Console';
|
|
9
10
|
import * as Effect from 'effect/Effect';
|
|
10
11
|
import * as Option from 'effect/Option';
|
|
11
12
|
import * as Record from 'effect/Record';
|
|
12
13
|
|
|
13
14
|
import { CommandConfig, print } from '@dxos/cli-util';
|
|
14
|
-
import { DX_CONFIG,
|
|
15
|
+
import { DX_CONFIG, getProfileConfigPath } from '@dxos/client-protocol';
|
|
15
16
|
import { trim } from '@dxos/util';
|
|
16
17
|
|
|
17
18
|
import { printProfileCreated } from './util';
|
|
@@ -71,17 +72,19 @@ export const create = Command.make(
|
|
|
71
72
|
Effect.fnUntraced(function* ({ template, name }) {
|
|
72
73
|
const { json } = yield* CommandConfig;
|
|
73
74
|
const fs = yield* FileSystem.FileSystem;
|
|
75
|
+
const path = yield* Path.Path;
|
|
74
76
|
const profileName = name.pipe(Option.getOrElse(() => template));
|
|
75
|
-
const
|
|
76
|
-
if (yield* fs.exists(
|
|
77
|
+
const configPath = getProfileConfigPath(DX_CONFIG, profileName);
|
|
78
|
+
if (yield* fs.exists(configPath)) {
|
|
77
79
|
throw new Error(`Profile ${profileName} already exists`);
|
|
78
80
|
}
|
|
79
81
|
|
|
80
|
-
yield* fs.
|
|
82
|
+
yield* fs.makeDirectory(path.dirname(configPath), { recursive: true });
|
|
83
|
+
yield* fs.writeFileString(configPath, TEMPLATES[template]);
|
|
81
84
|
if (json) {
|
|
82
|
-
yield* Console.log(JSON.stringify({ name: profileName, path:
|
|
85
|
+
yield* Console.log(JSON.stringify({ name: profileName, path: configPath }, null, 2));
|
|
83
86
|
} else {
|
|
84
|
-
yield* Console.log(print(printProfileCreated(profileName,
|
|
87
|
+
yield* Console.log(print(printProfileCreated(profileName, configPath)));
|
|
85
88
|
}
|
|
86
89
|
}),
|
|
87
90
|
);
|
|
@@ -10,7 +10,7 @@ import * as Effect from 'effect/Effect';
|
|
|
10
10
|
import * as Option from 'effect/Option';
|
|
11
11
|
|
|
12
12
|
import { CommandConfig, print } from '@dxos/cli-util';
|
|
13
|
-
import { DX_CONFIG,
|
|
13
|
+
import { DX_CONFIG, getProfileConfigPath } from '@dxos/client-protocol';
|
|
14
14
|
|
|
15
15
|
import { printProfileDeleted } from './util';
|
|
16
16
|
|
|
@@ -23,7 +23,10 @@ export const del = Command.make(
|
|
|
23
23
|
const { json } = yield* CommandConfig;
|
|
24
24
|
const fs = yield* FileSystem.FileSystem;
|
|
25
25
|
const profileName = name.pipe(Option.getOrElse(() => 'default'));
|
|
26
|
-
|
|
26
|
+
const configPath = getProfileConfigPath(DX_CONFIG, profileName);
|
|
27
|
+
const pluginsPath = `${DX_CONFIG}/plugins/${profileName}.yml`;
|
|
28
|
+
yield* fs.remove(configPath).pipe(Effect.ignore);
|
|
29
|
+
yield* fs.remove(pluginsPath).pipe(Effect.ignore);
|
|
27
30
|
if (json) {
|
|
28
31
|
yield* Console.log(JSON.stringify({ name: profileName, deleted: true }, null, 2));
|
|
29
32
|
} else {
|
|
@@ -23,21 +23,22 @@ export const list = Command.make(
|
|
|
23
23
|
const fs = yield* FileSystem.FileSystem;
|
|
24
24
|
const path = yield* Path.Path;
|
|
25
25
|
const profileDir = path.join(DX_CONFIG, 'profile');
|
|
26
|
-
const
|
|
27
|
-
const
|
|
28
|
-
|
|
29
|
-
Effect.
|
|
30
|
-
const
|
|
31
|
-
const
|
|
32
|
-
const
|
|
33
|
-
|
|
34
|
-
|
|
26
|
+
const entries = yield* fs.readDirectory(profileDir);
|
|
27
|
+
const profileFiles = entries.filter((entry) => entry.endsWith('.yml'));
|
|
28
|
+
const profiles = yield* Effect.forEach(profileFiles, (filename) =>
|
|
29
|
+
Effect.gen(function* () {
|
|
30
|
+
const name = filename.slice(0, -4);
|
|
31
|
+
const configPath = path.join(profileDir, filename);
|
|
32
|
+
const configContent = yield* fs
|
|
33
|
+
.readFileString(configPath)
|
|
34
|
+
.pipe(Effect.catchTag('SystemError', () => Effect.succeed('{}')));
|
|
35
|
+
const configValues = Yaml.parse(configContent) ?? {};
|
|
35
36
|
const config = new Config(configValues);
|
|
36
37
|
return {
|
|
37
38
|
name,
|
|
38
39
|
isCurrent: name === currentProfile,
|
|
39
|
-
fullPath,
|
|
40
|
-
storagePath: getProfilePath(configValues?.runtime?.client?.storage
|
|
40
|
+
fullPath: configPath,
|
|
41
|
+
storagePath: getProfilePath(configValues?.runtime?.client?.storage?.dataRoot ?? DX_DATA, name),
|
|
41
42
|
edge: config.values.runtime?.services?.edge?.url,
|
|
42
43
|
};
|
|
43
44
|
}),
|
package/src/cli/plugin.ts
CHANGED
|
@@ -5,29 +5,26 @@
|
|
|
5
5
|
import { ActivationEvents, Capability, Plugin } from '@dxos/app-framework';
|
|
6
6
|
import { AppActivationEvents, AppPlugin } from '@dxos/app-toolkit';
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import { meta } from '../meta';
|
|
13
|
-
import { ClientEvents } from '../types';
|
|
14
|
-
import { type ClientPluginOptions } from '../types';
|
|
8
|
+
import { Client, OperationHandler, SchemaDefs } from '#capabilities';
|
|
9
|
+
import { meta } from '#meta';
|
|
10
|
+
import { ClientEvents } from '#types';
|
|
11
|
+
import { type ClientPluginOptions } from '#types';
|
|
15
12
|
|
|
16
13
|
import { config, device, edge, halo, profile } from './commands';
|
|
17
14
|
|
|
18
15
|
export const ClientPlugin = Plugin.define<ClientPluginOptions>(meta).pipe(
|
|
19
16
|
// TODO(wittjosiah): Could some of these commands make use of operations?
|
|
20
17
|
AppPlugin.addCommandModule({ commands: [config, device, edge, halo, profile] }),
|
|
21
|
-
AppPlugin.
|
|
18
|
+
AppPlugin.addOperationHandlerModule({ activate: OperationHandler }),
|
|
22
19
|
Plugin.addModule((options) => ({
|
|
23
20
|
id: Capability.getModuleTag(Client),
|
|
24
21
|
activatesOn: ActivationEvents.Startup,
|
|
25
|
-
|
|
22
|
+
firesAfterActivation: [ClientEvents.ClientReady],
|
|
26
23
|
activate: () => Client(options),
|
|
27
24
|
})),
|
|
28
25
|
Plugin.addModule({
|
|
29
26
|
activatesOn: ClientEvents.ClientReady,
|
|
30
|
-
|
|
27
|
+
firesBeforeActivation: [AppActivationEvents.SetupSchema],
|
|
31
28
|
activate: SchemaDefs,
|
|
32
29
|
}),
|
|
33
30
|
Plugin.make,
|
|
@@ -2,12 +2,11 @@
|
|
|
2
2
|
// Copyright 2025 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import { inspect } from 'node:util';
|
|
6
|
-
|
|
7
5
|
import * as Console from 'effect/Console';
|
|
8
6
|
import * as Context from 'effect/Context';
|
|
9
7
|
import * as Effect from 'effect/Effect';
|
|
10
8
|
import * as Layer from 'effect/Layer';
|
|
9
|
+
import { inspect } from 'node:util';
|
|
11
10
|
|
|
12
11
|
function logToString(...args: any[]): string {
|
|
13
12
|
return args
|
package/src/constants.ts
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
// Copyright 2025 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import { meta } from '
|
|
5
|
+
import { meta } from '#meta';
|
|
6
6
|
|
|
7
|
-
export const JOIN_DIALOG = `${meta.id}
|
|
8
|
-
export const RECOVERY_CODE_DIALOG = `${meta.id}
|
|
9
|
-
export const RESET_DIALOG = `${meta.id}
|
|
7
|
+
export const JOIN_DIALOG = `${meta.id}.JoinDialog`;
|
|
8
|
+
export const RECOVERY_CODE_DIALOG = `${meta.id}.RecoveryCodeDialog`;
|
|
9
|
+
export const RESET_DIALOG = `${meta.id}.ResetDialog`;
|
|
@@ -10,9 +10,10 @@ import { withPluginManager } from '@dxos/app-framework/testing';
|
|
|
10
10
|
import { withLayout, withTheme } from '@dxos/react-ui/testing';
|
|
11
11
|
import { translations as shellTranslations } from '@dxos/shell/react';
|
|
12
12
|
|
|
13
|
-
import {
|
|
14
|
-
import { translations } from '
|
|
13
|
+
import { initializeIdentity } from '#testing';
|
|
14
|
+
import { translations } from '#translations';
|
|
15
15
|
|
|
16
|
+
import { ClientPlugin } from '../../ClientPlugin';
|
|
16
17
|
import { DevicesContainer } from './DevicesContainer';
|
|
17
18
|
|
|
18
19
|
const meta = {
|
|
@@ -26,7 +27,7 @@ const meta = {
|
|
|
26
27
|
ClientPlugin({
|
|
27
28
|
onClientInitialized: ({ client }) =>
|
|
28
29
|
Effect.gen(function* () {
|
|
29
|
-
yield*
|
|
30
|
+
yield* initializeIdentity(client);
|
|
30
31
|
}),
|
|
31
32
|
}),
|
|
32
33
|
OperationPlugin(),
|
|
@@ -13,19 +13,19 @@ import { type CancellableInvitationObservable, Invitation, InvitationEncoder } f
|
|
|
13
13
|
import { useNetworkStatus } from '@dxos/react-client/mesh';
|
|
14
14
|
import { Button, Clipboard, Icon, IconButton, List, useId, useTranslation } from '@dxos/react-ui';
|
|
15
15
|
import { Settings } from '@dxos/react-ui-form';
|
|
16
|
-
import { AuthCode, Centered, DeviceListItem, Emoji, Viewport
|
|
16
|
+
import { AuthCode, Centered, DeviceListItem, Emoji, Viewport } from '@dxos/shell/react';
|
|
17
17
|
import { osTranslations } from '@dxos/ui-theme';
|
|
18
18
|
import { hexToEmoji } from '@dxos/util';
|
|
19
19
|
|
|
20
|
-
import { meta } from '
|
|
21
|
-
import { ClientOperation } from '
|
|
20
|
+
import { meta } from '#meta';
|
|
21
|
+
import { ClientOperation } from '#operations';
|
|
22
22
|
|
|
23
23
|
export type DevicesContainerProps = {
|
|
24
24
|
createInvitationUrl?: (invitationCode: string) => string;
|
|
25
25
|
};
|
|
26
26
|
|
|
27
27
|
export const DevicesContainer = ({ createInvitationUrl }: DevicesContainerProps) => {
|
|
28
|
-
const { t } = useTranslation(
|
|
28
|
+
const { t } = useTranslation(meta.id);
|
|
29
29
|
const { invokePromise } = useOperationInvoker();
|
|
30
30
|
const devices = useDevices();
|
|
31
31
|
const { swarm: connectionState } = useNetworkStatus();
|
|
@@ -38,61 +38,61 @@ export const DevicesContainer = ({ createInvitationUrl }: DevicesContainerProps)
|
|
|
38
38
|
);
|
|
39
39
|
|
|
40
40
|
const handleJoinNewIdentity = useCallback(
|
|
41
|
-
() => invokePromise(ClientOperation.ResetStorage, { mode: 'join
|
|
41
|
+
() => invokePromise(ClientOperation.ResetStorage, { mode: 'join-new-identity' }),
|
|
42
42
|
[invokePromise],
|
|
43
43
|
);
|
|
44
44
|
|
|
45
45
|
return (
|
|
46
46
|
<Clipboard.Provider>
|
|
47
|
-
<Settings.
|
|
47
|
+
<Settings.Viewport>
|
|
48
48
|
<Settings.Section
|
|
49
|
-
title={t('devices
|
|
50
|
-
description={t('devices
|
|
49
|
+
title={t('devices-verbose.label', { ns: meta.id })}
|
|
50
|
+
description={t('devices.description', { ns: meta.id })}
|
|
51
51
|
>
|
|
52
|
-
<Settings.
|
|
53
|
-
<
|
|
52
|
+
<Settings.Panel>
|
|
53
|
+
<div role='group' className='min-w-0'>
|
|
54
|
+
<h3 className='text-lg mb-2'>{t('devices.label', { ns: meta.id })}</h3>
|
|
54
55
|
<List>
|
|
55
56
|
{devices.map((device: Device) => (
|
|
56
57
|
<DeviceListItem key={device.deviceKey.toHex()} device={device} connectionState={connectionState} />
|
|
57
58
|
))}
|
|
58
59
|
</List>
|
|
59
|
-
</
|
|
60
|
+
</div>
|
|
60
61
|
{createInvitationUrl && (
|
|
61
|
-
<
|
|
62
|
+
<div role='group' className='min-w-0'>
|
|
63
|
+
<h3 className='text-lg mb-2'>{t('add-device.label')}</h3>
|
|
62
64
|
<DeviceInvitation createInvitationUrl={createInvitationUrl} />
|
|
63
|
-
</
|
|
65
|
+
</div>
|
|
64
66
|
)}
|
|
65
|
-
</Settings.
|
|
67
|
+
</Settings.Panel>
|
|
66
68
|
</Settings.Section>
|
|
67
69
|
<Settings.Section
|
|
68
|
-
title={t('danger
|
|
69
|
-
description={t('danger
|
|
70
|
+
title={t('danger-zone.title', { ns: meta.id })}
|
|
71
|
+
description={t('danger-zone.description', { ns: meta.id })}
|
|
70
72
|
>
|
|
71
|
-
<Settings.
|
|
72
|
-
<
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
>
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
>
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
</Settings.Item>
|
|
93
|
-
</Settings.Group>
|
|
73
|
+
<Settings.Item title={t('reset-device.label')} description={t('reset-device.description', { ns: meta.id })}>
|
|
74
|
+
<Button variant='destructive' onClick={handleResetStorage} data-testid='devicesContainer.reset'>
|
|
75
|
+
{t('reset-device.label')}
|
|
76
|
+
</Button>
|
|
77
|
+
</Settings.Item>
|
|
78
|
+
<Settings.Item
|
|
79
|
+
title={t('recover-identity.label')}
|
|
80
|
+
description={t('recover-identity.description', { ns: meta.id })}
|
|
81
|
+
>
|
|
82
|
+
<Button variant='destructive' onClick={handleRecover} data-testid='devicesContainer.recover'>
|
|
83
|
+
{t('recover-identity.label')}
|
|
84
|
+
</Button>
|
|
85
|
+
</Settings.Item>
|
|
86
|
+
<Settings.Item
|
|
87
|
+
title={t('join-new-identity.label')}
|
|
88
|
+
description={t('join-new-identity.description', { ns: meta.id })}
|
|
89
|
+
>
|
|
90
|
+
<Button variant='destructive' onClick={handleJoinNewIdentity} data-testid='devicesContainer.joinExisting'>
|
|
91
|
+
{t('join-new-identity.label')}
|
|
92
|
+
</Button>
|
|
93
|
+
</Settings.Item>
|
|
94
94
|
</Settings.Section>
|
|
95
|
-
</Settings.
|
|
95
|
+
</Settings.Viewport>
|
|
96
96
|
</Clipboard.Provider>
|
|
97
97
|
);
|
|
98
98
|
};
|
|
@@ -176,12 +176,13 @@ const InvitationSection = ({
|
|
|
176
176
|
: state >= Invitation.State.READY_FOR_AUTHENTICATION && authCode
|
|
177
177
|
? 'auth-code'
|
|
178
178
|
: 'qr-code';
|
|
179
|
+
|
|
179
180
|
return activeView === 'init' ? (
|
|
180
181
|
<>
|
|
181
|
-
<p className='text-description mb-2'>{t('add
|
|
182
|
+
<p className='text-description mb-2'>{t('add-device.description')}</p>
|
|
182
183
|
<IconButton
|
|
183
184
|
icon='ph--plus--regular'
|
|
184
|
-
label={t('create
|
|
185
|
+
label={t('create-device-invitation.label')}
|
|
185
186
|
disabled={state >= 0}
|
|
186
187
|
classNames='w-full'
|
|
187
188
|
data-testid='devicesContainer.createInvitation'
|
|
@@ -214,7 +215,7 @@ const InvitationQR = ({ id, url, onCancel }: { id: string; url: string; onCancel
|
|
|
214
215
|
const emoji = hexToEmoji(id);
|
|
215
216
|
return (
|
|
216
217
|
<>
|
|
217
|
-
<p className='text-description'>{t('qr
|
|
218
|
+
<p className='text-description'>{t('qr-code.description', { ns: meta.id })}</p>
|
|
218
219
|
<div role='group' className='grid grid-cols-[1fr_min-content]'>
|
|
219
220
|
<div className='flex justify-center py-4'>
|
|
220
221
|
<div role='none' className='w-full md:max-w-80 aspect-square relative text-description'>
|
|
@@ -234,7 +235,7 @@ const InvitationQR = ({ id, url, onCancel }: { id: string; url: string; onCancel
|
|
|
234
235
|
</div>
|
|
235
236
|
</div>
|
|
236
237
|
<span id={qrLabel} className='sr-only'>
|
|
237
|
-
{t('qr
|
|
238
|
+
{t('qr.label')}
|
|
238
239
|
</span>
|
|
239
240
|
</div>
|
|
240
241
|
{/* TODO(burdon): Factor out button bar */}
|
|
@@ -242,7 +243,7 @@ const InvitationQR = ({ id, url, onCancel }: { id: string; url: string; onCancel
|
|
|
242
243
|
<div className='flex gap-2'>
|
|
243
244
|
<Clipboard.Button value={url ?? 'never'} />
|
|
244
245
|
<Button variant='ghost' onClick={onCancel}>
|
|
245
|
-
{t('cancel
|
|
246
|
+
{t('cancel.label')}
|
|
246
247
|
</Button>
|
|
247
248
|
</div>
|
|
248
249
|
</div>
|
|
@@ -256,12 +257,12 @@ const InvitationAuthCode = ({ id, code, onCancel }: { id: string; code: string;
|
|
|
256
257
|
|
|
257
258
|
return (
|
|
258
259
|
<>
|
|
259
|
-
<p className='text-description'>{t('auth
|
|
260
|
+
<p className='text-description'>{t('auth-other-device-emoji.message')}</p>
|
|
260
261
|
{emoji && <Emoji text={emoji} className='mx-auto my-2 text-center' />}
|
|
261
|
-
<p className='text-description'>{t('auth
|
|
262
|
+
<p className='text-description'>{t('auth-code.message')}</p>
|
|
262
263
|
<AuthCode code={code} large classNames='mx-auto my-2 text-center grow' />
|
|
263
264
|
<Button variant='ghost' onClick={onCancel}>
|
|
264
|
-
{t('cancel
|
|
265
|
+
{t('cancel.label')}
|
|
265
266
|
</Button>
|
|
266
267
|
</>
|
|
267
268
|
);
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import { type Meta, type StoryObj } from '@storybook/react-vite';
|
|
6
|
+
import React from 'react';
|
|
7
|
+
|
|
8
|
+
import { withPluginManager } from '@dxos/app-framework/testing';
|
|
9
|
+
import { corePlugins } from '@dxos/plugin-testing';
|
|
10
|
+
import { Dialog } from '@dxos/react-ui';
|
|
11
|
+
|
|
12
|
+
import { translations } from '#translations';
|
|
13
|
+
|
|
14
|
+
import { ClientPlugin } from '../../ClientPlugin';
|
|
15
|
+
import { JoinDialog } from './JoinDialog';
|
|
16
|
+
|
|
17
|
+
const DefaultStory = () => (
|
|
18
|
+
<Dialog.Root defaultOpen>
|
|
19
|
+
<Dialog.Overlay>
|
|
20
|
+
<JoinDialog />
|
|
21
|
+
</Dialog.Overlay>
|
|
22
|
+
</Dialog.Root>
|
|
23
|
+
);
|
|
24
|
+
|
|
25
|
+
const meta = {
|
|
26
|
+
title: 'plugins/plugin-client/containers/JoinDialog',
|
|
27
|
+
component: JoinDialog,
|
|
28
|
+
render: DefaultStory,
|
|
29
|
+
decorators: [
|
|
30
|
+
withPluginManager({
|
|
31
|
+
plugins: [...corePlugins(), ClientPlugin({})],
|
|
32
|
+
}),
|
|
33
|
+
],
|
|
34
|
+
parameters: {
|
|
35
|
+
translations,
|
|
36
|
+
},
|
|
37
|
+
} satisfies Meta<typeof JoinDialog>;
|
|
38
|
+
|
|
39
|
+
export default meta;
|
|
40
|
+
|
|
41
|
+
type Story = StoryObj<typeof meta>;
|
|
42
|
+
|
|
43
|
+
export const Default: Story = {};
|