@dxos/plugin-client 0.8.4-main.bc674ce → 0.8.4-main.bcb3aa67d6
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-ELAYKIQU.mjs +12 -0
- package/dist/lib/browser/chunk-ELAYKIQU.mjs.map +7 -0
- package/dist/lib/browser/chunk-J5LGTIGS.mjs +10 -0
- package/dist/lib/browser/chunk-J5LGTIGS.mjs.map +7 -0
- package/dist/lib/browser/chunk-M43LJQ5U.mjs +175 -0
- package/dist/lib/browser/chunk-M43LJQ5U.mjs.map +7 -0
- package/dist/lib/browser/chunk-WNJRYPGG.mjs +131 -0
- package/dist/lib/browser/chunk-WNJRYPGG.mjs.map +7 -0
- package/dist/lib/browser/cli/index.mjs +92 -80
- package/dist/lib/browser/cli/index.mjs.map +3 -3
- package/dist/lib/browser/create-agent-WXBNGUBQ.mjs +34 -0
- package/dist/lib/browser/create-agent-WXBNGUBQ.mjs.map +7 -0
- package/dist/lib/browser/create-identity-LIE4RCXJ.mjs +30 -0
- package/dist/lib/browser/create-identity-LIE4RCXJ.mjs.map +7 -0
- package/dist/lib/browser/create-passkey-PYZ47DJT.mjs +105 -0
- package/dist/lib/browser/create-passkey-PYZ47DJT.mjs.map +7 -0
- package/dist/lib/browser/create-recovery-code-NSRU3QDJ.mjs +44 -0
- package/dist/lib/browser/create-recovery-code-NSRU3QDJ.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +90 -93
- package/dist/lib/browser/index.mjs.map +4 -4
- package/dist/lib/browser/join-identity-B6DC2VW7.mjs +27 -0
- package/dist/lib/browser/join-identity-B6DC2VW7.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-Z3H4GJ3L.mjs +26 -0
- package/dist/lib/browser/recover-identity-Z3H4GJ3L.mjs.map +7 -0
- package/dist/lib/browser/redeem-passkey-ODK47PIR.mjs +82 -0
- package/dist/lib/browser/redeem-passkey-ODK47PIR.mjs.map +7 -0
- package/dist/lib/browser/redeem-token-OYXEFDM3.mjs +37 -0
- package/dist/lib/browser/redeem-token-OYXEFDM3.mjs.map +7 -0
- package/dist/lib/browser/reset-storage-JAU4CS2U.mjs +26 -0
- package/dist/lib/browser/reset-storage-JAU4CS2U.mjs.map +7 -0
- package/dist/lib/browser/share-identity-H2JNYYCP.mjs +31 -0
- package/dist/lib/browser/share-identity-H2JNYYCP.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/types/index.mjs +4 -5
- 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-IT5LAIV3.mjs +133 -0
- package/dist/lib/node-esm/chunk-IT5LAIV3.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-J5RWSQT6.mjs +14 -0
- package/dist/lib/node-esm/chunk-J5RWSQT6.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-SJ6FDER5.mjs +176 -0
- package/dist/lib/node-esm/chunk-SJ6FDER5.mjs.map +7 -0
- package/dist/lib/node-esm/cli/index.mjs +92 -80
- package/dist/lib/node-esm/cli/index.mjs.map +3 -3
- package/dist/lib/node-esm/create-agent-I7VGTH7O.mjs +35 -0
- package/dist/lib/node-esm/create-agent-I7VGTH7O.mjs.map +7 -0
- package/dist/lib/node-esm/create-identity-NWY3YT5C.mjs +31 -0
- package/dist/lib/node-esm/create-identity-NWY3YT5C.mjs.map +7 -0
- package/dist/lib/node-esm/create-passkey-2LQEEIAN.mjs +106 -0
- package/dist/lib/node-esm/create-passkey-2LQEEIAN.mjs.map +7 -0
- package/dist/lib/node-esm/create-recovery-code-2MVK5CVE.mjs +45 -0
- package/dist/lib/node-esm/create-recovery-code-2MVK5CVE.mjs.map +7 -0
- package/dist/lib/node-esm/index.mjs +90 -93
- package/dist/lib/node-esm/index.mjs.map +4 -4
- package/dist/lib/node-esm/join-identity-6NT75FSO.mjs +28 -0
- package/dist/lib/node-esm/join-identity-6NT75FSO.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-3UKCQ2M4.mjs +27 -0
- package/dist/lib/node-esm/recover-identity-3UKCQ2M4.mjs.map +7 -0
- package/dist/lib/node-esm/redeem-passkey-TDNEMVJJ.mjs +83 -0
- package/dist/lib/node-esm/redeem-passkey-TDNEMVJJ.mjs.map +7 -0
- package/dist/lib/node-esm/redeem-token-ZBYMFFKM.mjs +38 -0
- package/dist/lib/node-esm/redeem-token-ZBYMFFKM.mjs.map +7 -0
- package/dist/lib/node-esm/reset-storage-NY3ALG72.mjs +27 -0
- package/dist/lib/node-esm/reset-storage-NY3ALG72.mjs.map +7 -0
- package/dist/lib/node-esm/share-identity-FDIZWTDG.mjs +32 -0
- package/dist/lib/node-esm/share-identity-FDIZWTDG.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/types/index.mjs +4 -5
- 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 +6 -0
- package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -0
- package/dist/types/src/capabilities/client.d.ts +8 -0
- 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 +5 -0
- 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/{client/index.d.ts → node.d.ts} +7 -3
- 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/react-context.d.ts → react-context.d.ts} +1 -1
- package/dist/types/src/capabilities/react-context.d.ts.map +1 -0
- package/dist/types/src/capabilities/react-surface.d.ts +9 -0
- package/dist/types/src/capabilities/react-surface.d.ts.map +1 -0
- package/dist/types/src/capabilities/schema-defs.d.ts +5 -0
- package/dist/types/src/capabilities/schema-defs.d.ts.map +1 -0
- 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/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 +1 -1
- 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/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/profile/create.d.ts +2 -1
- 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/list.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/components/index.d.ts +0 -6
- package/dist/types/src/components/index.d.ts.map +1 -1
- package/dist/types/src/containers/DevicesContainer/DevicesContainer.d.ts.map +1 -0
- package/dist/types/src/containers/DevicesContainer/DevicesContainer.stories.d.ts +184 -0
- package/dist/types/src/containers/DevicesContainer/DevicesContainer.stories.d.ts.map +1 -0
- package/dist/types/src/containers/DevicesContainer/index.d.ts +3 -0
- package/dist/types/src/containers/DevicesContainer/index.d.ts.map +1 -0
- package/dist/types/src/containers/JoinDialog/JoinDialog.d.ts.map +1 -0
- 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 +3 -0
- package/dist/types/src/containers/JoinDialog/index.d.ts.map +1 -0
- package/dist/types/src/containers/ProfileContainer/ProfileContainer.d.ts.map +1 -0
- package/dist/types/src/containers/ProfileContainer/ProfileContainer.stories.d.ts.map +1 -0
- package/dist/types/src/containers/ProfileContainer/index.d.ts +3 -0
- package/dist/types/src/containers/ProfileContainer/index.d.ts.map +1 -0
- package/dist/types/src/containers/RecoveryCodeDialog/RecoveryCodeDialog.d.ts.map +1 -0
- package/dist/types/src/containers/RecoveryCodeDialog/RecoveryCodeDialog.stories.d.ts.map +1 -0
- package/dist/types/src/containers/RecoveryCodeDialog/index.d.ts +4 -0
- package/dist/types/src/containers/RecoveryCodeDialog/index.d.ts.map +1 -0
- package/dist/types/src/containers/RecoveryCredentialsContainer/RecoveryCredentialsContainer.d.ts.map +1 -0
- package/dist/types/src/containers/RecoveryCredentialsContainer/RecoveryCredentialsContainer.stories.d.ts.map +1 -0
- package/dist/types/src/containers/RecoveryCredentialsContainer/index.d.ts +3 -0
- package/dist/types/src/containers/RecoveryCredentialsContainer/index.d.ts.map +1 -0
- package/dist/types/src/{components → containers/ResetDialog}/ResetDialog.d.ts +1 -1
- package/dist/types/src/containers/ResetDialog/ResetDialog.d.ts.map +1 -0
- package/dist/types/src/{components → containers/ResetDialog}/ResetDialog.stories.d.ts +1 -1
- package/dist/types/src/containers/ResetDialog/ResetDialog.stories.d.ts.map +1 -0
- package/dist/types/src/containers/ResetDialog/index.d.ts +4 -0
- package/dist/types/src/containers/ResetDialog/index.d.ts.map +1 -0
- package/dist/types/src/containers/index.d.ts +10 -0
- package/dist/types/src/containers/index.d.ts.map +1 -0
- 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 -1
- package/dist/types/src/types/capabilities.d.ts.map +1 -1
- package/dist/types/src/types/schema.d.ts +26 -175
- package/dist/types/src/types/schema.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +72 -36
- package/src/ClientPlugin.ts +38 -25
- package/src/capabilities/{app-graph-builder/app-graph-builder.ts → app-graph-builder.ts} +21 -19
- package/src/capabilities/{client/client.ts → client.ts} +16 -12
- package/src/capabilities/index.ts +15 -7
- package/src/capabilities/{migrations/migrations.ts → migrations.ts} +4 -4
- 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} +7 -7
- package/src/capabilities/{react-surface/react-surface.tsx → react-surface.tsx} +13 -13
- package/src/capabilities/{schema-defs/schema-defs.ts → schema-defs.ts} +8 -7
- 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 +3 -2
- package/src/cli/commands/halo/create/create.ts +13 -6
- 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 +12 -13
- package/src/components/index.ts +0 -7
- package/src/constants.ts +4 -4
- package/src/{components → containers/DevicesContainer}/DevicesContainer.stories.tsx +10 -7
- package/src/{components → containers/DevicesContainer}/DevicesContainer.tsx +76 -83
- package/src/containers/DevicesContainer/index.ts +7 -0
- package/src/containers/JoinDialog/JoinDialog.stories.tsx +43 -0
- package/src/{components → containers/JoinDialog}/JoinDialog.tsx +20 -15
- package/src/containers/JoinDialog/index.ts +7 -0
- package/src/{components → containers/ProfileContainer}/ProfileContainer.stories.tsx +4 -4
- package/src/{components → containers/ProfileContainer}/ProfileContainer.tsx +21 -29
- package/src/containers/ProfileContainer/index.ts +7 -0
- package/src/{components → containers/RecoveryCodeDialog}/RecoveryCodeDialog.stories.tsx +4 -4
- package/src/{components → containers/RecoveryCodeDialog}/RecoveryCodeDialog.tsx +29 -26
- package/src/containers/RecoveryCodeDialog/index.ts +8 -0
- package/src/{components → containers/RecoveryCredentialsContainer}/RecoveryCredentialsContainer.stories.tsx +10 -7
- package/src/containers/RecoveryCredentialsContainer/RecoveryCredentialsContainer.tsx +66 -0
- package/src/containers/RecoveryCredentialsContainer/index.ts +7 -0
- package/src/{components → containers/ResetDialog}/ResetDialog.stories.tsx +27 -14
- package/src/{components → containers/ResetDialog}/ResetDialog.tsx +11 -11
- package/src/containers/ResetDialog/index.ts +8 -0
- package/src/containers/index.ts +15 -0
- package/src/index.ts +2 -5
- package/src/meta.ts +1 -1
- package/src/operations/create-agent.ts +27 -0
- package/src/operations/create-identity.ts +30 -0
- package/src/operations/create-passkey.ts +89 -0
- package/src/operations/create-recovery-code.ts +35 -0
- package/src/operations/definitions.ts +107 -0
- package/src/operations/index.ts +20 -0
- package/src/operations/join-identity.ts +29 -0
- package/src/operations/recover-identity.ts +29 -0
- package/src/operations/redeem-passkey.ts +86 -0
- package/src/operations/redeem-token.ts +32 -0
- package/src/operations/reset-storage.ts +28 -0
- package/src/operations/share-identity.ts +27 -0
- package/src/testing/index.ts +5 -0
- package/src/testing/initializeIdentity.ts +24 -0
- package/src/translations.ts +53 -42
- package/src/types/capabilities.ts +4 -4
- package/src/types/events.ts +6 -6
- package/src/types/schema.ts +18 -123
- package/dist/lib/browser/app-graph-builder-3FGBMLTF.mjs +0 -118
- package/dist/lib/browser/app-graph-builder-3FGBMLTF.mjs.map +0 -7
- package/dist/lib/browser/chunk-4BZGRIFS.mjs +0 -293
- package/dist/lib/browser/chunk-4BZGRIFS.mjs.map +0 -7
- package/dist/lib/browser/chunk-F7H2Y3Z2.mjs +0 -18
- package/dist/lib/browser/chunk-F7H2Y3Z2.mjs.map +0 -7
- package/dist/lib/browser/chunk-G7C3S2BE.mjs +0 -15
- package/dist/lib/browser/chunk-G7C3S2BE.mjs.map +0 -7
- package/dist/lib/browser/client-IX5LMWV4.mjs +0 -86
- package/dist/lib/browser/client-IX5LMWV4.mjs.map +0 -7
- package/dist/lib/browser/migrations-3EBTAW3N.mjs +0 -24
- package/dist/lib/browser/migrations-3EBTAW3N.mjs.map +0 -7
- package/dist/lib/browser/operation-resolver-2NT3ISVP.mjs +0 -298
- package/dist/lib/browser/operation-resolver-2NT3ISVP.mjs.map +0 -7
- package/dist/lib/browser/react-context-4UABG3GP.mjs +0 -24
- package/dist/lib/browser/react-context-4UABG3GP.mjs.map +0 -7
- package/dist/lib/browser/react-surface-RSQ74XCT.mjs +0 -675
- package/dist/lib/browser/react-surface-RSQ74XCT.mjs.map +0 -7
- package/dist/lib/browser/schema-defs-O7VLP745.mjs +0 -26
- package/dist/lib/browser/schema-defs-O7VLP745.mjs.map +0 -7
- package/dist/lib/node-esm/app-graph-builder-2PIYVUNC.mjs +0 -119
- package/dist/lib/node-esm/app-graph-builder-2PIYVUNC.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-BCELGXRI.mjs +0 -20
- package/dist/lib/node-esm/chunk-BCELGXRI.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-JAF64TFQ.mjs +0 -295
- package/dist/lib/node-esm/chunk-JAF64TFQ.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-PRAFFO54.mjs +0 -16
- package/dist/lib/node-esm/chunk-PRAFFO54.mjs.map +0 -7
- package/dist/lib/node-esm/client-FFPK5UFP.mjs +0 -87
- package/dist/lib/node-esm/client-FFPK5UFP.mjs.map +0 -7
- package/dist/lib/node-esm/migrations-WSZSFGDK.mjs +0 -25
- package/dist/lib/node-esm/migrations-WSZSFGDK.mjs.map +0 -7
- package/dist/lib/node-esm/operation-resolver-VW5R2BE4.mjs +0 -299
- package/dist/lib/node-esm/operation-resolver-VW5R2BE4.mjs.map +0 -7
- package/dist/lib/node-esm/react-context-UVXMGPW4.mjs +0 -25
- package/dist/lib/node-esm/react-context-UVXMGPW4.mjs.map +0 -7
- package/dist/lib/node-esm/react-surface-KBHANGGC.mjs +0 -676
- package/dist/lib/node-esm/react-surface-KBHANGGC.mjs.map +0 -7
- package/dist/lib/node-esm/schema-defs-QLRGBIKY.mjs +0 -27
- package/dist/lib/node-esm/schema-defs-QLRGBIKY.mjs.map +0 -7
- package/dist/types/src/capabilities/app-graph-builder/app-graph-builder.d.ts +0 -6
- 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 +0 -8
- package/dist/types/src/capabilities/client/client.d.ts.map +0 -1
- 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 +0 -5
- 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 +0 -9
- 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 +0 -5
- package/dist/types/src/capabilities/schema-defs/schema-defs.d.ts.map +0 -1
- package/dist/types/src/components/DevicesContainer.d.ts.map +0 -1
- package/dist/types/src/components/DevicesContainer.stories.d.ts +0 -181
- package/dist/types/src/components/DevicesContainer.stories.d.ts.map +0 -1
- package/dist/types/src/components/JoinDialog.d.ts.map +0 -1
- package/dist/types/src/components/ProfileContainer.d.ts.map +0 -1
- package/dist/types/src/components/ProfileContainer.stories.d.ts.map +0 -1
- package/dist/types/src/components/RecoveryCodeDialog.d.ts.map +0 -1
- package/dist/types/src/components/RecoveryCodeDialog.stories.d.ts.map +0 -1
- package/dist/types/src/components/RecoveryCredentialsContainer.d.ts.map +0 -1
- package/dist/types/src/components/RecoveryCredentialsContainer.stories.d.ts.map +0 -1
- package/dist/types/src/components/ResetDialog.d.ts.map +0 -1
- package/dist/types/src/components/ResetDialog.stories.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 -248
- 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/src/components/RecoveryCredentialsContainer.tsx +0 -68
- /package/dist/types/src/{components → containers/DevicesContainer}/DevicesContainer.d.ts +0 -0
- /package/dist/types/src/{components → containers/JoinDialog}/JoinDialog.d.ts +0 -0
- /package/dist/types/src/{components → containers/ProfileContainer}/ProfileContainer.d.ts +0 -0
- /package/dist/types/src/{components → containers/ProfileContainer}/ProfileContainer.stories.d.ts +0 -0
- /package/dist/types/src/{components → containers/RecoveryCodeDialog}/RecoveryCodeDialog.d.ts +0 -0
- /package/dist/types/src/{components → containers/RecoveryCodeDialog}/RecoveryCodeDialog.stories.d.ts +0 -0
- /package/dist/types/src/{components → containers/RecoveryCredentialsContainer}/RecoveryCredentialsContainer.d.ts +0 -0
- /package/dist/types/src/{components → containers/RecoveryCredentialsContainer}/RecoveryCredentialsContainer.stories.d.ts +0 -0
|
@@ -1,16 +1,11 @@
|
|
|
1
|
-
import
|
|
2
|
-
Client,
|
|
3
|
-
OperationResolver,
|
|
4
|
-
SchemaDefs
|
|
5
|
-
} from "../chunk-F7H2Y3Z2.mjs";
|
|
6
|
-
import {
|
|
7
|
-
ClientEvents,
|
|
8
|
-
ClientOperation,
|
|
9
|
-
meta
|
|
10
|
-
} from "../chunk-4BZGRIFS.mjs";
|
|
1
|
+
import "../chunk-J5LGTIGS.mjs";
|
|
11
2
|
|
|
12
3
|
// src/cli/plugin.ts
|
|
13
|
-
import {
|
|
4
|
+
import { ActivationEvents, Capability, Plugin as Plugin2 } from "@dxos/app-framework";
|
|
5
|
+
import { AppActivationEvents, AppPlugin } from "@dxos/app-toolkit";
|
|
6
|
+
import { Client, OperationHandler, SchemaDefs } from "#capabilities";
|
|
7
|
+
import { meta } from "#meta";
|
|
8
|
+
import { ClientEvents } from "#types";
|
|
14
9
|
|
|
15
10
|
// src/cli/commands/config/index.ts
|
|
16
11
|
import * as Command2 from "@effect/cli/Command";
|
|
@@ -22,12 +17,15 @@ import * as Effect from "effect/Effect";
|
|
|
22
17
|
import * as Yaml from "yaml";
|
|
23
18
|
import { CommandConfig } from "@dxos/cli-util";
|
|
24
19
|
import { ConfigService } from "@dxos/client";
|
|
20
|
+
import { DX_CONFIG, getProfileConfigPath } from "@dxos/client-protocol";
|
|
25
21
|
var view = Command.make("view", {}, Effect.fnUntraced(function* () {
|
|
26
22
|
const config2 = yield* ConfigService;
|
|
27
|
-
const { json } = yield* CommandConfig;
|
|
23
|
+
const { json, profile: profile2 } = yield* CommandConfig;
|
|
24
|
+
const configPath = getProfileConfigPath(DX_CONFIG, profile2);
|
|
28
25
|
if (json) {
|
|
29
26
|
yield* Console.log(JSON.stringify(config2.values, null, 2));
|
|
30
27
|
} else {
|
|
28
|
+
yield* Console.log(`Path: ${configPath}`);
|
|
31
29
|
yield* Console.log(Yaml.stringify(config2.values));
|
|
32
30
|
}
|
|
33
31
|
}));
|
|
@@ -86,7 +84,6 @@ var printDevices = (devices) => {
|
|
|
86
84
|
var handler = Effect2.fn(function* () {
|
|
87
85
|
const { json } = yield* CommandConfig2;
|
|
88
86
|
const client = yield* ClientService;
|
|
89
|
-
yield* Effect2.tryPromise(() => client.spaces.waitUntilReady());
|
|
90
87
|
const device2 = client.halo.device;
|
|
91
88
|
if (!device2) {
|
|
92
89
|
if (json) {
|
|
@@ -122,7 +119,6 @@ import { ClientService as ClientService2 } from "@dxos/client";
|
|
|
122
119
|
var handler2 = Effect3.fn(function* () {
|
|
123
120
|
const { json } = yield* CommandConfig3;
|
|
124
121
|
const client = yield* ClientService2;
|
|
125
|
-
yield* Effect3.tryPromise(() => client.spaces.waitUntilReady());
|
|
126
122
|
const devices = client.halo.devices.get();
|
|
127
123
|
if (json) {
|
|
128
124
|
yield* Console3.log(JSON.stringify(mapDevices(devices), null, 2));
|
|
@@ -144,7 +140,6 @@ import { ClientService as ClientService3 } from "@dxos/client";
|
|
|
144
140
|
var handler3 = Effect4.fn(function* ({ label }) {
|
|
145
141
|
const { json } = yield* CommandConfig4;
|
|
146
142
|
const client = yield* ClientService3;
|
|
147
|
-
yield* Effect4.tryPromise(() => client.spaces.waitUntilReady());
|
|
148
143
|
const device2 = client.halo.device;
|
|
149
144
|
if (!device2) {
|
|
150
145
|
if (json) {
|
|
@@ -203,11 +198,16 @@ import * as Option from "effect/Option";
|
|
|
203
198
|
import { CommandConfig as CommandConfig5 } from "@dxos/cli-util";
|
|
204
199
|
import { ClientService as ClientService4 } from "@dxos/client";
|
|
205
200
|
import { createEdgeIdentity } from "@dxos/client/edge";
|
|
201
|
+
import { Context } from "@dxos/context";
|
|
202
|
+
var __dxlog_file = "/__w/dxos/dxos/packages/plugins/plugin-client/src/cli/commands/edge/status.ts";
|
|
206
203
|
var getStatus = () => Effect5.gen(function* () {
|
|
207
204
|
const client = yield* ClientService4;
|
|
208
205
|
const identity2 = createEdgeIdentity(client);
|
|
209
|
-
client.edge.setIdentity(identity2);
|
|
210
|
-
const status2 = yield* Effect5.tryPromise(() => client.edge.getStatus(
|
|
206
|
+
client.edge.http.setIdentity(identity2);
|
|
207
|
+
const status2 = yield* Effect5.tryPromise(() => client.edge.http.getStatus(Context.default(void 0, {
|
|
208
|
+
F: __dxlog_file,
|
|
209
|
+
L: 20
|
|
210
|
+
})));
|
|
211
211
|
if (yield* CommandConfig5.isJson) {
|
|
212
212
|
yield* Console5.log(JSON.stringify(status2, null, 2));
|
|
213
213
|
} else if (status2.problems.length > 0) {
|
|
@@ -243,11 +243,14 @@ import * as Options2 from "@effect/cli/Options";
|
|
|
243
243
|
import * as Console6 from "effect/Console";
|
|
244
244
|
import * as Effect6 from "effect/Effect";
|
|
245
245
|
import * as Option2 from "effect/Option";
|
|
246
|
-
import {
|
|
246
|
+
import { Capabilities, Plugin } from "@dxos/app-framework";
|
|
247
247
|
import { CommandConfig as CommandConfig6, flushAndSync, spaceLayer } from "@dxos/cli-util";
|
|
248
248
|
import { print as print3 } from "@dxos/cli-util";
|
|
249
249
|
import { ClientService as ClientService5 } from "@dxos/client";
|
|
250
250
|
import { invariant } from "@dxos/invariant";
|
|
251
|
+
import { EdgeReplicationSetting } from "@dxos/protocols/proto/dxos/echo/metadata";
|
|
252
|
+
import { MembershipPolicy } from "@dxos/protocols/proto/dxos/halo/credentials";
|
|
253
|
+
import { ClientOperation } from "#operations";
|
|
251
254
|
|
|
252
255
|
// src/cli/commands/halo/util.ts
|
|
253
256
|
import { FormBuilder as FormBuilder2 } from "@dxos/cli-util";
|
|
@@ -256,13 +259,13 @@ var printIdentity = (identity2) => FormBuilder2.make({
|
|
|
256
259
|
}).pipe(FormBuilder2.set("identityKey", identity2.identityKey.truncate()), FormBuilder2.set("displayName", identity2.profile?.displayName ?? "<none>"), FormBuilder2.build);
|
|
257
260
|
|
|
258
261
|
// src/cli/commands/halo/create/create.ts
|
|
259
|
-
var
|
|
262
|
+
var __dxlog_file2 = "/__w/dxos/dxos/packages/plugins/plugin-client/src/cli/commands/halo/create/create.ts";
|
|
260
263
|
var handler4 = Effect6.fn(function* ({ agent, displayName }) {
|
|
261
264
|
const { json } = yield* CommandConfig6;
|
|
262
265
|
const client = yield* ClientService5;
|
|
263
266
|
invariant(!client.halo.identity.get(), "Identity already exists", {
|
|
264
|
-
F:
|
|
265
|
-
L:
|
|
267
|
+
F: __dxlog_file2,
|
|
268
|
+
L: 32,
|
|
266
269
|
S: this,
|
|
267
270
|
A: [
|
|
268
271
|
"!client.halo.identity.get()",
|
|
@@ -270,16 +273,23 @@ var handler4 = Effect6.fn(function* ({ agent, displayName }) {
|
|
|
270
273
|
]
|
|
271
274
|
});
|
|
272
275
|
const manager = yield* Plugin.Service;
|
|
273
|
-
const { invoke } = manager.capabilities.get(
|
|
276
|
+
const { invoke } = manager.capabilities.get(Capabilities.OperationInvoker);
|
|
274
277
|
const identity2 = yield* invoke(ClientOperation.CreateIdentity, {
|
|
275
278
|
displayName: Option2.getOrUndefined(displayName)
|
|
276
279
|
});
|
|
277
280
|
if (agent) {
|
|
278
281
|
yield* invoke(ClientOperation.CreateAgent);
|
|
279
282
|
}
|
|
280
|
-
yield* Effect6.
|
|
281
|
-
yield* Effect6.promise(() => client.spaces.
|
|
282
|
-
|
|
283
|
+
const { PERSONAL_SPACE_TAG, setPersonalSpace } = yield* Effect6.tryPromise(() => import("@dxos/app-toolkit"));
|
|
284
|
+
const space = yield* Effect6.promise(() => client.spaces.create({}, {
|
|
285
|
+
tags: [
|
|
286
|
+
PERSONAL_SPACE_TAG
|
|
287
|
+
],
|
|
288
|
+
membershipPolicy: MembershipPolicy.LOCKED
|
|
289
|
+
}));
|
|
290
|
+
yield* Effect6.promise(() => space.waitUntilReady());
|
|
291
|
+
yield* Effect6.promise(() => space.internal.setEdgeReplicationPreference(EdgeReplicationSetting.ENABLED));
|
|
292
|
+
setPersonalSpace(space);
|
|
283
293
|
yield* flushAndSync({
|
|
284
294
|
indexes: true
|
|
285
295
|
}).pipe(Effect6.provide(spaceLayer(Option2.some(space.id))));
|
|
@@ -313,7 +323,7 @@ import { CommandConfig as CommandConfig7 } from "@dxos/cli-util";
|
|
|
313
323
|
import { ClientService as ClientService6 } from "@dxos/client";
|
|
314
324
|
import { invariant as invariant2 } from "@dxos/invariant";
|
|
315
325
|
import { schema } from "@dxos/protocols/proto";
|
|
316
|
-
var
|
|
326
|
+
var __dxlog_file3 = "/__w/dxos/dxos/packages/plugins/plugin-client/src/cli/commands/halo/credential/add/add.ts";
|
|
317
327
|
var handler5 = Effect7.fn(function* ({ credential: credential2 }) {
|
|
318
328
|
const { json } = yield* CommandConfig7;
|
|
319
329
|
const client = yield* ClientService6;
|
|
@@ -324,7 +334,7 @@ var handler5 = Effect7.fn(function* ({ credential: credential2 }) {
|
|
|
324
334
|
}).pipe(Prompt.run);
|
|
325
335
|
}
|
|
326
336
|
invariant2(credentialHex, "Invalid credential.", {
|
|
327
|
-
F:
|
|
337
|
+
F: __dxlog_file3,
|
|
328
338
|
L: 26,
|
|
329
339
|
S: this,
|
|
330
340
|
A: [
|
|
@@ -395,7 +405,7 @@ import * as Console8 from "effect/Console";
|
|
|
395
405
|
import * as Duration from "effect/Duration";
|
|
396
406
|
import * as Effect8 from "effect/Effect";
|
|
397
407
|
import * as Option4 from "effect/Option";
|
|
398
|
-
import { CommandConfig as CommandConfig8, Common
|
|
408
|
+
import { CommandConfig as CommandConfig8, Common, FormBuilder as FormBuilder3, getSpace, printList as printList2 } from "@dxos/cli-util";
|
|
399
409
|
import { ClientService as ClientService7 } from "@dxos/client";
|
|
400
410
|
var mapCredentials = (credentials) => {
|
|
401
411
|
return credentials.map((credential2) => ({
|
|
@@ -415,11 +425,9 @@ var printCredential = (credential2) => {
|
|
|
415
425
|
var handler6 = Effect8.fn(function* ({ type, spaceId, timeout: timeout2, delay }) {
|
|
416
426
|
const { json } = yield* CommandConfig8;
|
|
417
427
|
const client = yield* ClientService7;
|
|
418
|
-
yield* Effect8.tryPromise(() => client.spaces.waitUntilReady());
|
|
419
428
|
let credentials;
|
|
420
|
-
const resolvedSpaceId = yield* spaceIdWithDefault(spaceId);
|
|
421
429
|
if (Option4.isSome(spaceId)) {
|
|
422
|
-
const space = yield* getSpace(
|
|
430
|
+
const space = yield* getSpace(spaceId.value);
|
|
423
431
|
credentials = yield* Effect8.tryPromise(() => space.internal.getCredentials());
|
|
424
432
|
} else {
|
|
425
433
|
const identity2 = client.halo.identity;
|
|
@@ -456,7 +464,7 @@ var handler6 = Effect8.fn(function* ({ type, spaceId, timeout: timeout2, delay }
|
|
|
456
464
|
});
|
|
457
465
|
var list2 = Command11.make("list", {
|
|
458
466
|
type: Options3.text("type").pipe(Options3.withDescription("Filter by credential type."), Options3.optional),
|
|
459
|
-
spaceId:
|
|
467
|
+
spaceId: Common.spaceId.pipe(Options3.withDescription("Space ID to show credentials from."), Options3.optional),
|
|
460
468
|
timeout: Options3.integer("timeout").pipe(Options3.withDescription("Time in milliseconds to wait for at least one credential before listing."), Options3.withDefault(500)),
|
|
461
469
|
delay: Options3.integer("delay").pipe(Options3.withDescription("Delay in milliseconds before listing."), Options3.withDefault(250))
|
|
462
470
|
}, handler6).pipe(Command11.withDescription("List HALO credentials."));
|
|
@@ -487,7 +495,6 @@ var handler7 = Effect9.fn(function* () {
|
|
|
487
495
|
yield* Console9.log("Identity not initialized.");
|
|
488
496
|
}
|
|
489
497
|
} else {
|
|
490
|
-
yield* Effect9.tryPromise(() => client.spaces.waitUntilReady());
|
|
491
498
|
if (json) {
|
|
492
499
|
yield* Console9.log(JSON.stringify({
|
|
493
500
|
identityKey: identity2.identityKey.toHex(),
|
|
@@ -511,7 +518,6 @@ import { ClientService as ClientService9 } from "@dxos/client";
|
|
|
511
518
|
var handler8 = Effect10.fn(function* () {
|
|
512
519
|
const { json } = yield* CommandConfig10;
|
|
513
520
|
const client = yield* ClientService9;
|
|
514
|
-
yield* Effect10.tryPromise(() => client.spaces.waitUntilReady());
|
|
515
521
|
const identity2 = client.halo.identity.get();
|
|
516
522
|
const device2 = client.halo.device;
|
|
517
523
|
if (json) {
|
|
@@ -536,7 +542,7 @@ import * as Effect11 from "effect/Effect";
|
|
|
536
542
|
import { CommandConfig as CommandConfig11, print as print6 } from "@dxos/cli-util";
|
|
537
543
|
import { ClientService as ClientService10 } from "@dxos/client";
|
|
538
544
|
import { invariant as invariant3 } from "@dxos/invariant";
|
|
539
|
-
var
|
|
545
|
+
var __dxlog_file4 = "/__w/dxos/dxos/packages/plugins/plugin-client/src/cli/commands/halo/recover/recover.ts";
|
|
540
546
|
var recover = Command15.make("recover", {
|
|
541
547
|
recoveryCode: Args2.text({
|
|
542
548
|
name: "recoveryCode"
|
|
@@ -545,7 +551,7 @@ var recover = Command15.make("recover", {
|
|
|
545
551
|
const { json } = yield* CommandConfig11;
|
|
546
552
|
const client = yield* ClientService10;
|
|
547
553
|
invariant3(!client.halo.identity.get(), "Identity already exists", {
|
|
548
|
-
F:
|
|
554
|
+
F: __dxlog_file4,
|
|
549
555
|
L: 25,
|
|
550
556
|
S: this,
|
|
551
557
|
A: [
|
|
@@ -576,7 +582,6 @@ import { ClientService as ClientService11 } from "@dxos/client";
|
|
|
576
582
|
var handler9 = Effect12.fn(function* () {
|
|
577
583
|
const { json } = yield* CommandConfig12;
|
|
578
584
|
const client = yield* ClientService11;
|
|
579
|
-
yield* Effect12.tryPromise(() => client.spaces.waitUntilReady());
|
|
580
585
|
const identityService = client.services.services.IdentityService;
|
|
581
586
|
if (!identityService) {
|
|
582
587
|
if (json) {
|
|
@@ -610,7 +615,6 @@ import { ClientService as ClientService12 } from "@dxos/client";
|
|
|
610
615
|
var handler10 = Effect13.fn(function* ({ displayName }) {
|
|
611
616
|
const { json } = yield* CommandConfig13;
|
|
612
617
|
const client = yield* ClientService12;
|
|
613
|
-
yield* Effect13.tryPromise(() => client.spaces.waitUntilReady());
|
|
614
618
|
const identity2 = client.halo.identity.get();
|
|
615
619
|
if (!identity2) {
|
|
616
620
|
if (json) {
|
|
@@ -667,12 +671,13 @@ import * as Command25 from "@effect/cli/Command";
|
|
|
667
671
|
import * as Command19 from "@effect/cli/Command";
|
|
668
672
|
import * as Options5 from "@effect/cli/Options";
|
|
669
673
|
import * as FileSystem from "@effect/platform/FileSystem";
|
|
674
|
+
import * as Path from "@effect/platform/Path";
|
|
670
675
|
import * as Console14 from "effect/Console";
|
|
671
676
|
import * as Effect14 from "effect/Effect";
|
|
672
677
|
import * as Option6 from "effect/Option";
|
|
673
678
|
import * as Record from "effect/Record";
|
|
674
679
|
import { CommandConfig as CommandConfig14, print as print8 } from "@dxos/cli-util";
|
|
675
|
-
import { DX_CONFIG,
|
|
680
|
+
import { DX_CONFIG as DX_CONFIG2, getProfileConfigPath as getProfileConfigPath2 } from "@dxos/client-protocol";
|
|
676
681
|
import { trim } from "@dxos/util";
|
|
677
682
|
|
|
678
683
|
// src/cli/commands/profile/util.ts
|
|
@@ -742,19 +747,23 @@ var create2 = Command19.make("create", {
|
|
|
742
747
|
}, Effect14.fnUntraced(function* ({ template, name }) {
|
|
743
748
|
const { json } = yield* CommandConfig14;
|
|
744
749
|
const fs = yield* FileSystem.FileSystem;
|
|
750
|
+
const path = yield* Path.Path;
|
|
745
751
|
const profileName = name.pipe(Option6.getOrElse(() => template));
|
|
746
|
-
const
|
|
747
|
-
if (yield* fs.exists(
|
|
752
|
+
const configPath = getProfileConfigPath2(DX_CONFIG2, profileName);
|
|
753
|
+
if (yield* fs.exists(configPath)) {
|
|
748
754
|
throw new Error(`Profile ${profileName} already exists`);
|
|
749
755
|
}
|
|
750
|
-
yield* fs.
|
|
756
|
+
yield* fs.makeDirectory(path.dirname(configPath), {
|
|
757
|
+
recursive: true
|
|
758
|
+
});
|
|
759
|
+
yield* fs.writeFileString(configPath, TEMPLATES[template]);
|
|
751
760
|
if (json) {
|
|
752
761
|
yield* Console14.log(JSON.stringify({
|
|
753
762
|
name: profileName,
|
|
754
|
-
path:
|
|
763
|
+
path: configPath
|
|
755
764
|
}, null, 2));
|
|
756
765
|
} else {
|
|
757
|
-
yield* Console14.log(print8(printProfileCreated(profileName,
|
|
766
|
+
yield* Console14.log(print8(printProfileCreated(profileName, configPath)));
|
|
758
767
|
}
|
|
759
768
|
}));
|
|
760
769
|
|
|
@@ -766,14 +775,17 @@ import * as Console15 from "effect/Console";
|
|
|
766
775
|
import * as Effect15 from "effect/Effect";
|
|
767
776
|
import * as Option7 from "effect/Option";
|
|
768
777
|
import { CommandConfig as CommandConfig15, print as print9 } from "@dxos/cli-util";
|
|
769
|
-
import { DX_CONFIG as
|
|
778
|
+
import { DX_CONFIG as DX_CONFIG3, getProfileConfigPath as getProfileConfigPath3 } from "@dxos/client-protocol";
|
|
770
779
|
var del = Command20.make("delete", {
|
|
771
780
|
name: Options6.text("name").pipe(Options6.withDescription("Profile name"), Options6.optional)
|
|
772
781
|
}, Effect15.fnUntraced(function* ({ name }) {
|
|
773
782
|
const { json } = yield* CommandConfig15;
|
|
774
783
|
const fs = yield* FileSystem3.FileSystem;
|
|
775
784
|
const profileName = name.pipe(Option7.getOrElse(() => "default"));
|
|
776
|
-
|
|
785
|
+
const configPath = getProfileConfigPath3(DX_CONFIG3, profileName);
|
|
786
|
+
const pluginsPath = `${DX_CONFIG3}/plugins/${profileName}.yml`;
|
|
787
|
+
yield* fs.remove(configPath).pipe(Effect15.ignore);
|
|
788
|
+
yield* fs.remove(pluginsPath).pipe(Effect15.ignore);
|
|
777
789
|
if (json) {
|
|
778
790
|
yield* Console15.log(JSON.stringify({
|
|
779
791
|
name: profileName,
|
|
@@ -789,19 +801,19 @@ import * as Command21 from "@effect/cli/Command";
|
|
|
789
801
|
import * as Options7 from "@effect/cli/Options";
|
|
790
802
|
import * as Prompt2 from "@effect/cli/Prompt";
|
|
791
803
|
import * as FileSystem5 from "@effect/platform/FileSystem";
|
|
792
|
-
import * as
|
|
804
|
+
import * as Path3 from "@effect/platform/Path";
|
|
793
805
|
import * as Console16 from "effect/Console";
|
|
794
806
|
import * as Effect16 from "effect/Effect";
|
|
795
807
|
import * as Option8 from "effect/Option";
|
|
796
808
|
import { CommandConfig as CommandConfig16 } from "@dxos/cli-util";
|
|
797
809
|
import { ConfigService as ConfigService2 } from "@dxos/config";
|
|
798
810
|
import { log as log17 } from "@dxos/log";
|
|
799
|
-
var
|
|
811
|
+
var __dxlog_file5 = "/__w/dxos/dxos/packages/plugins/plugin-client/src/cli/commands/profile/import.ts";
|
|
800
812
|
var handler11 = Effect16.fn(function* ({ file, dataDir, force }) {
|
|
801
813
|
const dataDirValue = Option8.getOrUndefined(dataDir);
|
|
802
814
|
const { json, profile: profile2 } = yield* CommandConfig16;
|
|
803
815
|
const fs = yield* FileSystem5.FileSystem;
|
|
804
|
-
const path = yield*
|
|
816
|
+
const path = yield* Path3.Path;
|
|
805
817
|
const config2 = yield* ConfigService2;
|
|
806
818
|
const { createLevel, createStorageObjects, importProfileData, decodeProfileArchive } = yield* Effect16.promise(() => import("@dxos/client-services"));
|
|
807
819
|
let storageConfig;
|
|
@@ -829,7 +841,7 @@ var handler11 = Effect16.fn(function* ({ file, dataDir, force }) {
|
|
|
829
841
|
log17.error("data directory already exists", {
|
|
830
842
|
path: storageConfig.dataRoot
|
|
831
843
|
}, {
|
|
832
|
-
F:
|
|
844
|
+
F: __dxlog_file5,
|
|
833
845
|
L: 61,
|
|
834
846
|
S: this,
|
|
835
847
|
C: (f, a) => f(...a)
|
|
@@ -922,31 +934,31 @@ var inspect = Command22.make("inspect", {
|
|
|
922
934
|
// src/cli/commands/profile/list.ts
|
|
923
935
|
import * as Command23 from "@effect/cli/Command";
|
|
924
936
|
import * as FileSystem9 from "@effect/platform/FileSystem";
|
|
925
|
-
import * as
|
|
937
|
+
import * as Path5 from "@effect/platform/Path";
|
|
926
938
|
import * as Console18 from "effect/Console";
|
|
927
939
|
import * as Effect18 from "effect/Effect";
|
|
928
940
|
import * as Yaml2 from "yaml";
|
|
929
941
|
import { CommandConfig as CommandConfig18, printList as printList3 } from "@dxos/cli-util";
|
|
930
942
|
import { Config } from "@dxos/client";
|
|
931
|
-
import { DX_CONFIG as
|
|
943
|
+
import { DX_CONFIG as DX_CONFIG4, DX_DATA, getProfilePath } from "@dxos/client-protocol";
|
|
932
944
|
var list3 = Command23.make("list", {}, Effect18.fnUntraced(function* () {
|
|
933
945
|
const { profile: currentProfile } = yield* CommandConfig18;
|
|
934
946
|
const fs = yield* FileSystem9.FileSystem;
|
|
935
|
-
const path = yield*
|
|
936
|
-
const profileDir = path.join(
|
|
937
|
-
const
|
|
938
|
-
const
|
|
939
|
-
|
|
940
|
-
const name = filename.slice(0, -
|
|
941
|
-
const
|
|
942
|
-
const configContent = yield* fs.readFileString(
|
|
943
|
-
const configValues = Yaml2.parse(configContent);
|
|
947
|
+
const path = yield* Path5.Path;
|
|
948
|
+
const profileDir = path.join(DX_CONFIG4, "profile");
|
|
949
|
+
const entries = yield* fs.readDirectory(profileDir);
|
|
950
|
+
const profileFiles = entries.filter((entry) => entry.endsWith(".yml"));
|
|
951
|
+
const profiles = yield* Effect18.forEach(profileFiles, (filename) => Effect18.gen(function* () {
|
|
952
|
+
const name = filename.slice(0, -4);
|
|
953
|
+
const configPath = path.join(profileDir, filename);
|
|
954
|
+
const configContent = yield* fs.readFileString(configPath).pipe(Effect18.catchTag("SystemError", () => Effect18.succeed("{}")));
|
|
955
|
+
const configValues = Yaml2.parse(configContent) ?? {};
|
|
944
956
|
const config2 = new Config(configValues);
|
|
945
957
|
return {
|
|
946
958
|
name,
|
|
947
959
|
isCurrent: name === currentProfile,
|
|
948
|
-
fullPath,
|
|
949
|
-
storagePath:
|
|
960
|
+
fullPath: configPath,
|
|
961
|
+
storagePath: getProfilePath(configValues?.runtime?.client?.storage?.dataRoot ?? DX_DATA, name),
|
|
950
962
|
edge: config2.values.runtime?.services?.edge?.url
|
|
951
963
|
};
|
|
952
964
|
}));
|
|
@@ -967,7 +979,7 @@ import * as FileSystem11 from "@effect/platform/FileSystem";
|
|
|
967
979
|
import * as Console19 from "effect/Console";
|
|
968
980
|
import * as Effect19 from "effect/Effect";
|
|
969
981
|
import { CommandConfig as CommandConfig19, print as print11 } from "@dxos/cli-util";
|
|
970
|
-
import { DX_DATA as DX_DATA2, getProfilePath as
|
|
982
|
+
import { DX_DATA as DX_DATA2, getProfilePath as getProfilePath2 } from "@dxos/client-protocol";
|
|
971
983
|
import { ConfigService as ConfigService3 } from "@dxos/config";
|
|
972
984
|
var reset = Command24.make("reset", {
|
|
973
985
|
force: Options9.boolean("force", {
|
|
@@ -977,7 +989,7 @@ var reset = Command24.make("reset", {
|
|
|
977
989
|
const fs = yield* FileSystem11.FileSystem;
|
|
978
990
|
const config2 = yield* ConfigService3;
|
|
979
991
|
const { json, profile: profile2 } = yield* CommandConfig19;
|
|
980
|
-
const path = config2.values.runtime?.client?.storage?.dataRoot ??
|
|
992
|
+
const path = config2.values.runtime?.client?.storage?.dataRoot ?? getProfilePath2(DX_DATA2, profile2);
|
|
981
993
|
if (!force) {
|
|
982
994
|
const confirmed = yield* Prompt3.confirm({
|
|
983
995
|
message: `Are you sure you want to reset the profile (${profile2})?`,
|
|
@@ -1012,9 +1024,22 @@ var profile = Command25.make("profile").pipe(Command25.withDescription("Profile
|
|
|
1012
1024
|
|
|
1013
1025
|
// src/cli/plugin.ts
|
|
1014
1026
|
var ClientPlugin = Plugin2.define(meta).pipe(
|
|
1027
|
+
// TODO(wittjosiah): Could some of these commands make use of operations?
|
|
1028
|
+
AppPlugin.addCommandModule({
|
|
1029
|
+
commands: [
|
|
1030
|
+
config,
|
|
1031
|
+
device,
|
|
1032
|
+
edge,
|
|
1033
|
+
halo,
|
|
1034
|
+
profile
|
|
1035
|
+
]
|
|
1036
|
+
}),
|
|
1037
|
+
AppPlugin.addOperationHandlerModule({
|
|
1038
|
+
activate: OperationHandler
|
|
1039
|
+
}),
|
|
1015
1040
|
Plugin2.addModule((options) => ({
|
|
1016
1041
|
id: Capability.getModuleTag(Client),
|
|
1017
|
-
activatesOn:
|
|
1042
|
+
activatesOn: ActivationEvents.Startup,
|
|
1018
1043
|
activatesAfter: [
|
|
1019
1044
|
ClientEvents.ClientReady
|
|
1020
1045
|
],
|
|
@@ -1023,23 +1048,10 @@ var ClientPlugin = Plugin2.define(meta).pipe(
|
|
|
1023
1048
|
Plugin2.addModule({
|
|
1024
1049
|
activatesOn: ClientEvents.ClientReady,
|
|
1025
1050
|
activatesBefore: [
|
|
1026
|
-
|
|
1051
|
+
AppActivationEvents.SetupSchema
|
|
1027
1052
|
],
|
|
1028
1053
|
activate: SchemaDefs
|
|
1029
1054
|
}),
|
|
1030
|
-
// TODO(wittjosiah): Could some of these commands make use of operations?
|
|
1031
|
-
Common3.Plugin.addCommandModule({
|
|
1032
|
-
commands: [
|
|
1033
|
-
config,
|
|
1034
|
-
device,
|
|
1035
|
-
edge,
|
|
1036
|
-
halo,
|
|
1037
|
-
profile
|
|
1038
|
-
]
|
|
1039
|
-
}),
|
|
1040
|
-
Common3.Plugin.addOperationResolverModule({
|
|
1041
|
-
activate: () => OperationResolver()
|
|
1042
|
-
}),
|
|
1043
1055
|
Plugin2.make
|
|
1044
1056
|
);
|
|
1045
1057
|
export {
|