@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
|
@@ -1,19 +1,11 @@
|
|
|
1
|
-
import
|
|
2
|
-
Client,
|
|
3
|
-
OperationResolver,
|
|
4
|
-
SchemaDefs
|
|
5
|
-
} from "../chunk-4XYOOXAH.mjs";
|
|
6
|
-
import {
|
|
7
|
-
ClientEvents,
|
|
8
|
-
ClientOperation
|
|
9
|
-
} from "../chunk-DPAXDXMK.mjs";
|
|
10
|
-
import {
|
|
11
|
-
meta
|
|
12
|
-
} from "../chunk-N2GMSVDQ.mjs";
|
|
1
|
+
import "../chunk-J5LGTIGS.mjs";
|
|
13
2
|
|
|
14
3
|
// src/cli/plugin.ts
|
|
15
4
|
import { ActivationEvents, Capability, Plugin as Plugin2 } from "@dxos/app-framework";
|
|
16
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";
|
|
17
9
|
|
|
18
10
|
// src/cli/commands/config/index.ts
|
|
19
11
|
import * as Command2 from "@effect/cli/Command";
|
|
@@ -25,12 +17,15 @@ import * as Effect from "effect/Effect";
|
|
|
25
17
|
import * as Yaml from "yaml";
|
|
26
18
|
import { CommandConfig } from "@dxos/cli-util";
|
|
27
19
|
import { ConfigService } from "@dxos/client";
|
|
20
|
+
import { DX_CONFIG, getProfileConfigPath } from "@dxos/client-protocol";
|
|
28
21
|
var view = Command.make("view", {}, Effect.fnUntraced(function* () {
|
|
29
22
|
const config2 = yield* ConfigService;
|
|
30
|
-
const { json } = yield* CommandConfig;
|
|
23
|
+
const { json, profile: profile2 } = yield* CommandConfig;
|
|
24
|
+
const configPath = getProfileConfigPath(DX_CONFIG, profile2);
|
|
31
25
|
if (json) {
|
|
32
26
|
yield* Console.log(JSON.stringify(config2.values, null, 2));
|
|
33
27
|
} else {
|
|
28
|
+
yield* Console.log(`Path: ${configPath}`);
|
|
34
29
|
yield* Console.log(Yaml.stringify(config2.values));
|
|
35
30
|
}
|
|
36
31
|
}));
|
|
@@ -89,7 +84,6 @@ var printDevices = (devices) => {
|
|
|
89
84
|
var handler = Effect2.fn(function* () {
|
|
90
85
|
const { json } = yield* CommandConfig2;
|
|
91
86
|
const client = yield* ClientService;
|
|
92
|
-
yield* Effect2.tryPromise(() => client.spaces.waitUntilReady());
|
|
93
87
|
const device2 = client.halo.device;
|
|
94
88
|
if (!device2) {
|
|
95
89
|
if (json) {
|
|
@@ -125,7 +119,6 @@ import { ClientService as ClientService2 } from "@dxos/client";
|
|
|
125
119
|
var handler2 = Effect3.fn(function* () {
|
|
126
120
|
const { json } = yield* CommandConfig3;
|
|
127
121
|
const client = yield* ClientService2;
|
|
128
|
-
yield* Effect3.tryPromise(() => client.spaces.waitUntilReady());
|
|
129
122
|
const devices = client.halo.devices.get();
|
|
130
123
|
if (json) {
|
|
131
124
|
yield* Console3.log(JSON.stringify(mapDevices(devices), null, 2));
|
|
@@ -147,7 +140,6 @@ import { ClientService as ClientService3 } from "@dxos/client";
|
|
|
147
140
|
var handler3 = Effect4.fn(function* ({ label }) {
|
|
148
141
|
const { json } = yield* CommandConfig4;
|
|
149
142
|
const client = yield* ClientService3;
|
|
150
|
-
yield* Effect4.tryPromise(() => client.spaces.waitUntilReady());
|
|
151
143
|
const device2 = client.halo.device;
|
|
152
144
|
if (!device2) {
|
|
153
145
|
if (json) {
|
|
@@ -206,11 +198,13 @@ import * as Option from "effect/Option";
|
|
|
206
198
|
import { CommandConfig as CommandConfig5 } from "@dxos/cli-util";
|
|
207
199
|
import { ClientService as ClientService4 } from "@dxos/client";
|
|
208
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";
|
|
209
203
|
var getStatus = () => Effect5.gen(function* () {
|
|
210
204
|
const client = yield* ClientService4;
|
|
211
205
|
const identity2 = createEdgeIdentity(client);
|
|
212
206
|
client.edge.http.setIdentity(identity2);
|
|
213
|
-
const status2 = yield* Effect5.tryPromise(() => client.edge.http.getStatus());
|
|
207
|
+
const status2 = yield* Effect5.tryPromise(() => client.edge.http.getStatus(Context.default(void 0, { "~LogMeta": "~LogMeta", F: __dxlog_file, L: 16 })));
|
|
214
208
|
if (yield* CommandConfig5.isJson) {
|
|
215
209
|
yield* Console5.log(JSON.stringify(status2, null, 2));
|
|
216
210
|
} else if (status2.problems.length > 0) {
|
|
@@ -247,10 +241,14 @@ import * as Console6 from "effect/Console";
|
|
|
247
241
|
import * as Effect6 from "effect/Effect";
|
|
248
242
|
import * as Option2 from "effect/Option";
|
|
249
243
|
import { Capabilities, Plugin } from "@dxos/app-framework";
|
|
244
|
+
import { PERSONAL_SPACE_TAG } from "@dxos/app-toolkit";
|
|
250
245
|
import { CommandConfig as CommandConfig6, flushAndSync, spaceLayer } from "@dxos/cli-util";
|
|
251
246
|
import { print as print3 } from "@dxos/cli-util";
|
|
252
247
|
import { ClientService as ClientService5 } from "@dxos/client";
|
|
253
248
|
import { invariant } from "@dxos/invariant";
|
|
249
|
+
import { EdgeReplicationSetting } from "@dxos/protocols/proto/dxos/echo/metadata";
|
|
250
|
+
import { MembershipPolicy } from "@dxos/protocols/proto/dxos/halo/credentials";
|
|
251
|
+
import { ClientOperation } from "#operations";
|
|
254
252
|
|
|
255
253
|
// src/cli/commands/halo/util.ts
|
|
256
254
|
import { FormBuilder as FormBuilder2 } from "@dxos/cli-util";
|
|
@@ -259,19 +257,11 @@ var printIdentity = (identity2) => FormBuilder2.make({
|
|
|
259
257
|
}).pipe(FormBuilder2.set("identityKey", identity2.identityKey.truncate()), FormBuilder2.set("displayName", identity2.profile?.displayName ?? "<none>"), FormBuilder2.build);
|
|
260
258
|
|
|
261
259
|
// src/cli/commands/halo/create/create.ts
|
|
262
|
-
var
|
|
260
|
+
var __dxlog_file2 = "/__w/dxos/dxos/packages/plugins/plugin-client/src/cli/commands/halo/create/create.ts";
|
|
263
261
|
var handler4 = Effect6.fn(function* ({ agent, displayName }) {
|
|
264
262
|
const { json } = yield* CommandConfig6;
|
|
265
263
|
const client = yield* ClientService5;
|
|
266
|
-
invariant(!client.halo.identity.get(), "Identity already exists", {
|
|
267
|
-
F: __dxlog_file,
|
|
268
|
-
L: 30,
|
|
269
|
-
S: this,
|
|
270
|
-
A: [
|
|
271
|
-
"!client.halo.identity.get()",
|
|
272
|
-
"'Identity already exists'"
|
|
273
|
-
]
|
|
274
|
-
});
|
|
264
|
+
invariant(!client.halo.identity.get(), "Identity already exists", { "~LogMeta": "~LogMeta", F: __dxlog_file2, L: 23, S: this, A: ["!client.halo.identity.get()", "'Identity already exists'"] });
|
|
275
265
|
const manager = yield* Plugin.Service;
|
|
276
266
|
const { invoke } = manager.capabilities.get(Capabilities.OperationInvoker);
|
|
277
267
|
const identity2 = yield* invoke(ClientOperation.CreateIdentity, {
|
|
@@ -280,9 +270,14 @@ var handler4 = Effect6.fn(function* ({ agent, displayName }) {
|
|
|
280
270
|
if (agent) {
|
|
281
271
|
yield* invoke(ClientOperation.CreateAgent);
|
|
282
272
|
}
|
|
283
|
-
yield* Effect6.promise(() => client.spaces.
|
|
284
|
-
|
|
285
|
-
|
|
273
|
+
const space = yield* Effect6.promise(() => client.spaces.create({}, {
|
|
274
|
+
tags: [
|
|
275
|
+
PERSONAL_SPACE_TAG
|
|
276
|
+
],
|
|
277
|
+
membershipPolicy: MembershipPolicy.LOCKED
|
|
278
|
+
}));
|
|
279
|
+
yield* Effect6.promise(() => space.waitUntilReady());
|
|
280
|
+
yield* Effect6.promise(() => space.internal.setEdgeReplicationPreference(EdgeReplicationSetting.ENABLED));
|
|
286
281
|
yield* flushAndSync({
|
|
287
282
|
indexes: true
|
|
288
283
|
}).pipe(Effect6.provide(spaceLayer(Option2.some(space.id))));
|
|
@@ -316,7 +311,7 @@ import { CommandConfig as CommandConfig7 } from "@dxos/cli-util";
|
|
|
316
311
|
import { ClientService as ClientService6 } from "@dxos/client";
|
|
317
312
|
import { invariant as invariant2 } from "@dxos/invariant";
|
|
318
313
|
import { schema } from "@dxos/protocols/proto";
|
|
319
|
-
var
|
|
314
|
+
var __dxlog_file3 = "/__w/dxos/dxos/packages/plugins/plugin-client/src/cli/commands/halo/credential/add/add.ts";
|
|
320
315
|
var handler5 = Effect7.fn(function* ({ credential: credential2 }) {
|
|
321
316
|
const { json } = yield* CommandConfig7;
|
|
322
317
|
const client = yield* ClientService6;
|
|
@@ -326,15 +321,7 @@ var handler5 = Effect7.fn(function* ({ credential: credential2 }) {
|
|
|
326
321
|
message: "Enter credential (hex string)"
|
|
327
322
|
}).pipe(Prompt.run);
|
|
328
323
|
}
|
|
329
|
-
invariant2(credentialHex, "Invalid credential.", {
|
|
330
|
-
F: __dxlog_file2,
|
|
331
|
-
L: 26,
|
|
332
|
-
S: this,
|
|
333
|
-
A: [
|
|
334
|
-
"credentialHex",
|
|
335
|
-
"'Invalid credential.'"
|
|
336
|
-
]
|
|
337
|
-
});
|
|
324
|
+
invariant2(credentialHex, "Invalid credential.", { "~LogMeta": "~LogMeta", F: __dxlog_file3, L: 23, S: this, A: ["credentialHex", "'Invalid credential.'"] });
|
|
338
325
|
const identity2 = client.halo.identity;
|
|
339
326
|
if (!identity2) {
|
|
340
327
|
if (json) {
|
|
@@ -398,7 +385,7 @@ import * as Console8 from "effect/Console";
|
|
|
398
385
|
import * as Duration from "effect/Duration";
|
|
399
386
|
import * as Effect8 from "effect/Effect";
|
|
400
387
|
import * as Option4 from "effect/Option";
|
|
401
|
-
import { CommandConfig as CommandConfig8, Common, FormBuilder as FormBuilder3, getSpace, printList as printList2
|
|
388
|
+
import { CommandConfig as CommandConfig8, Common, FormBuilder as FormBuilder3, getSpace, printList as printList2 } from "@dxos/cli-util";
|
|
402
389
|
import { ClientService as ClientService7 } from "@dxos/client";
|
|
403
390
|
var mapCredentials = (credentials) => {
|
|
404
391
|
return credentials.map((credential2) => ({
|
|
@@ -418,11 +405,9 @@ var printCredential = (credential2) => {
|
|
|
418
405
|
var handler6 = Effect8.fn(function* ({ type, spaceId, timeout: timeout2, delay }) {
|
|
419
406
|
const { json } = yield* CommandConfig8;
|
|
420
407
|
const client = yield* ClientService7;
|
|
421
|
-
yield* Effect8.tryPromise(() => client.spaces.waitUntilReady());
|
|
422
408
|
let credentials;
|
|
423
|
-
const resolvedSpaceId = yield* spaceIdWithDefault(spaceId);
|
|
424
409
|
if (Option4.isSome(spaceId)) {
|
|
425
|
-
const space = yield* getSpace(
|
|
410
|
+
const space = yield* getSpace(spaceId.value);
|
|
426
411
|
credentials = yield* Effect8.tryPromise(() => space.internal.getCredentials());
|
|
427
412
|
} else {
|
|
428
413
|
const identity2 = client.halo.identity;
|
|
@@ -490,7 +475,6 @@ var handler7 = Effect9.fn(function* () {
|
|
|
490
475
|
yield* Console9.log("Identity not initialized.");
|
|
491
476
|
}
|
|
492
477
|
} else {
|
|
493
|
-
yield* Effect9.tryPromise(() => client.spaces.waitUntilReady());
|
|
494
478
|
if (json) {
|
|
495
479
|
yield* Console9.log(JSON.stringify({
|
|
496
480
|
identityKey: identity2.identityKey.toHex(),
|
|
@@ -514,7 +498,6 @@ import { ClientService as ClientService9 } from "@dxos/client";
|
|
|
514
498
|
var handler8 = Effect10.fn(function* () {
|
|
515
499
|
const { json } = yield* CommandConfig10;
|
|
516
500
|
const client = yield* ClientService9;
|
|
517
|
-
yield* Effect10.tryPromise(() => client.spaces.waitUntilReady());
|
|
518
501
|
const identity2 = client.halo.identity.get();
|
|
519
502
|
const device2 = client.halo.device;
|
|
520
503
|
if (json) {
|
|
@@ -539,7 +522,7 @@ import * as Effect11 from "effect/Effect";
|
|
|
539
522
|
import { CommandConfig as CommandConfig11, print as print6 } from "@dxos/cli-util";
|
|
540
523
|
import { ClientService as ClientService10 } from "@dxos/client";
|
|
541
524
|
import { invariant as invariant3 } from "@dxos/invariant";
|
|
542
|
-
var
|
|
525
|
+
var __dxlog_file4 = "/__w/dxos/dxos/packages/plugins/plugin-client/src/cli/commands/halo/recover/recover.ts";
|
|
543
526
|
var recover = Command15.make("recover", {
|
|
544
527
|
recoveryCode: Args2.text({
|
|
545
528
|
name: "recoveryCode"
|
|
@@ -547,15 +530,7 @@ var recover = Command15.make("recover", {
|
|
|
547
530
|
}, Effect11.fn(function* ({ recoveryCode }) {
|
|
548
531
|
const { json } = yield* CommandConfig11;
|
|
549
532
|
const client = yield* ClientService10;
|
|
550
|
-
invariant3(!client.halo.identity.get(), "Identity already exists", {
|
|
551
|
-
F: __dxlog_file3,
|
|
552
|
-
L: 25,
|
|
553
|
-
S: this,
|
|
554
|
-
A: [
|
|
555
|
-
"!client.halo.identity.get()",
|
|
556
|
-
"'Identity already exists'"
|
|
557
|
-
]
|
|
558
|
-
});
|
|
533
|
+
invariant3(!client.halo.identity.get(), "Identity already exists", { "~LogMeta": "~LogMeta", F: __dxlog_file4, L: 20, S: this, A: ["!client.halo.identity.get()", "'Identity already exists'"] });
|
|
559
534
|
const identity2 = yield* Effect11.tryPromise(() => client.halo.recoverIdentity({
|
|
560
535
|
recoveryCode
|
|
561
536
|
}));
|
|
@@ -579,7 +554,6 @@ import { ClientService as ClientService11 } from "@dxos/client";
|
|
|
579
554
|
var handler9 = Effect12.fn(function* () {
|
|
580
555
|
const { json } = yield* CommandConfig12;
|
|
581
556
|
const client = yield* ClientService11;
|
|
582
|
-
yield* Effect12.tryPromise(() => client.spaces.waitUntilReady());
|
|
583
557
|
const identityService = client.services.services.IdentityService;
|
|
584
558
|
if (!identityService) {
|
|
585
559
|
if (json) {
|
|
@@ -613,7 +587,6 @@ import { ClientService as ClientService12 } from "@dxos/client";
|
|
|
613
587
|
var handler10 = Effect13.fn(function* ({ displayName }) {
|
|
614
588
|
const { json } = yield* CommandConfig13;
|
|
615
589
|
const client = yield* ClientService12;
|
|
616
|
-
yield* Effect13.tryPromise(() => client.spaces.waitUntilReady());
|
|
617
590
|
const identity2 = client.halo.identity.get();
|
|
618
591
|
if (!identity2) {
|
|
619
592
|
if (json) {
|
|
@@ -670,12 +643,13 @@ import * as Command25 from "@effect/cli/Command";
|
|
|
670
643
|
import * as Command19 from "@effect/cli/Command";
|
|
671
644
|
import * as Options5 from "@effect/cli/Options";
|
|
672
645
|
import * as FileSystem from "@effect/platform/FileSystem";
|
|
646
|
+
import * as Path from "@effect/platform/Path";
|
|
673
647
|
import * as Console14 from "effect/Console";
|
|
674
648
|
import * as Effect14 from "effect/Effect";
|
|
675
649
|
import * as Option6 from "effect/Option";
|
|
676
650
|
import * as Record from "effect/Record";
|
|
677
651
|
import { CommandConfig as CommandConfig14, print as print8 } from "@dxos/cli-util";
|
|
678
|
-
import { DX_CONFIG,
|
|
652
|
+
import { DX_CONFIG as DX_CONFIG2, getProfileConfigPath as getProfileConfigPath2 } from "@dxos/client-protocol";
|
|
679
653
|
import { trim } from "@dxos/util";
|
|
680
654
|
|
|
681
655
|
// src/cli/commands/profile/util.ts
|
|
@@ -745,19 +719,23 @@ var create2 = Command19.make("create", {
|
|
|
745
719
|
}, Effect14.fnUntraced(function* ({ template, name }) {
|
|
746
720
|
const { json } = yield* CommandConfig14;
|
|
747
721
|
const fs = yield* FileSystem.FileSystem;
|
|
722
|
+
const path = yield* Path.Path;
|
|
748
723
|
const profileName = name.pipe(Option6.getOrElse(() => template));
|
|
749
|
-
const
|
|
750
|
-
if (yield* fs.exists(
|
|
724
|
+
const configPath = getProfileConfigPath2(DX_CONFIG2, profileName);
|
|
725
|
+
if (yield* fs.exists(configPath)) {
|
|
751
726
|
throw new Error(`Profile ${profileName} already exists`);
|
|
752
727
|
}
|
|
753
|
-
yield* fs.
|
|
728
|
+
yield* fs.makeDirectory(path.dirname(configPath), {
|
|
729
|
+
recursive: true
|
|
730
|
+
});
|
|
731
|
+
yield* fs.writeFileString(configPath, TEMPLATES[template]);
|
|
754
732
|
if (json) {
|
|
755
733
|
yield* Console14.log(JSON.stringify({
|
|
756
734
|
name: profileName,
|
|
757
|
-
path:
|
|
735
|
+
path: configPath
|
|
758
736
|
}, null, 2));
|
|
759
737
|
} else {
|
|
760
|
-
yield* Console14.log(print8(printProfileCreated(profileName,
|
|
738
|
+
yield* Console14.log(print8(printProfileCreated(profileName, configPath)));
|
|
761
739
|
}
|
|
762
740
|
}));
|
|
763
741
|
|
|
@@ -769,14 +747,17 @@ import * as Console15 from "effect/Console";
|
|
|
769
747
|
import * as Effect15 from "effect/Effect";
|
|
770
748
|
import * as Option7 from "effect/Option";
|
|
771
749
|
import { CommandConfig as CommandConfig15, print as print9 } from "@dxos/cli-util";
|
|
772
|
-
import { DX_CONFIG as
|
|
750
|
+
import { DX_CONFIG as DX_CONFIG3, getProfileConfigPath as getProfileConfigPath3 } from "@dxos/client-protocol";
|
|
773
751
|
var del = Command20.make("delete", {
|
|
774
752
|
name: Options6.text("name").pipe(Options6.withDescription("Profile name"), Options6.optional)
|
|
775
753
|
}, Effect15.fnUntraced(function* ({ name }) {
|
|
776
754
|
const { json } = yield* CommandConfig15;
|
|
777
755
|
const fs = yield* FileSystem3.FileSystem;
|
|
778
756
|
const profileName = name.pipe(Option7.getOrElse(() => "default"));
|
|
779
|
-
|
|
757
|
+
const configPath = getProfileConfigPath3(DX_CONFIG3, profileName);
|
|
758
|
+
const pluginsPath = `${DX_CONFIG3}/plugins/${profileName}.yml`;
|
|
759
|
+
yield* fs.remove(configPath).pipe(Effect15.ignore);
|
|
760
|
+
yield* fs.remove(pluginsPath).pipe(Effect15.ignore);
|
|
780
761
|
if (json) {
|
|
781
762
|
yield* Console15.log(JSON.stringify({
|
|
782
763
|
name: profileName,
|
|
@@ -792,19 +773,19 @@ import * as Command21 from "@effect/cli/Command";
|
|
|
792
773
|
import * as Options7 from "@effect/cli/Options";
|
|
793
774
|
import * as Prompt2 from "@effect/cli/Prompt";
|
|
794
775
|
import * as FileSystem5 from "@effect/platform/FileSystem";
|
|
795
|
-
import * as
|
|
776
|
+
import * as Path3 from "@effect/platform/Path";
|
|
796
777
|
import * as Console16 from "effect/Console";
|
|
797
778
|
import * as Effect16 from "effect/Effect";
|
|
798
779
|
import * as Option8 from "effect/Option";
|
|
799
780
|
import { CommandConfig as CommandConfig16 } from "@dxos/cli-util";
|
|
800
781
|
import { ConfigService as ConfigService2 } from "@dxos/config";
|
|
801
782
|
import { log as log17 } from "@dxos/log";
|
|
802
|
-
var
|
|
783
|
+
var __dxlog_file5 = "/__w/dxos/dxos/packages/plugins/plugin-client/src/cli/commands/profile/import.ts";
|
|
803
784
|
var handler11 = Effect16.fn(function* ({ file, dataDir, force }) {
|
|
804
785
|
const dataDirValue = Option8.getOrUndefined(dataDir);
|
|
805
786
|
const { json, profile: profile2 } = yield* CommandConfig16;
|
|
806
787
|
const fs = yield* FileSystem5.FileSystem;
|
|
807
|
-
const path = yield*
|
|
788
|
+
const path = yield* Path3.Path;
|
|
808
789
|
const config2 = yield* ConfigService2;
|
|
809
790
|
const { createLevel, createStorageObjects, importProfileData, decodeProfileArchive } = yield* Effect16.promise(() => import("@dxos/client-services"));
|
|
810
791
|
let storageConfig;
|
|
@@ -831,12 +812,7 @@ var handler11 = Effect16.fn(function* ({ file, dataDir, force }) {
|
|
|
831
812
|
if (yield* fs.exists(storageConfig.dataRoot)) {
|
|
832
813
|
log17.error("data directory already exists", {
|
|
833
814
|
path: storageConfig.dataRoot
|
|
834
|
-
}, {
|
|
835
|
-
F: __dxlog_file4,
|
|
836
|
-
L: 61,
|
|
837
|
-
S: this,
|
|
838
|
-
C: (f, a) => f(...a)
|
|
839
|
-
});
|
|
815
|
+
}, { "~LogMeta": "~LogMeta", F: __dxlog_file5, L: 44, S: this });
|
|
840
816
|
if (json) {
|
|
841
817
|
yield* Console16.log(JSON.stringify({
|
|
842
818
|
error: "Data directory already exists"
|
|
@@ -925,31 +901,31 @@ var inspect = Command22.make("inspect", {
|
|
|
925
901
|
// src/cli/commands/profile/list.ts
|
|
926
902
|
import * as Command23 from "@effect/cli/Command";
|
|
927
903
|
import * as FileSystem9 from "@effect/platform/FileSystem";
|
|
928
|
-
import * as
|
|
904
|
+
import * as Path5 from "@effect/platform/Path";
|
|
929
905
|
import * as Console18 from "effect/Console";
|
|
930
906
|
import * as Effect18 from "effect/Effect";
|
|
931
907
|
import * as Yaml2 from "yaml";
|
|
932
908
|
import { CommandConfig as CommandConfig18, printList as printList3 } from "@dxos/cli-util";
|
|
933
909
|
import { Config } from "@dxos/client";
|
|
934
|
-
import { DX_CONFIG as
|
|
910
|
+
import { DX_CONFIG as DX_CONFIG4, DX_DATA, getProfilePath } from "@dxos/client-protocol";
|
|
935
911
|
var list3 = Command23.make("list", {}, Effect18.fnUntraced(function* () {
|
|
936
912
|
const { profile: currentProfile } = yield* CommandConfig18;
|
|
937
913
|
const fs = yield* FileSystem9.FileSystem;
|
|
938
|
-
const path = yield*
|
|
939
|
-
const profileDir = path.join(
|
|
940
|
-
const
|
|
941
|
-
const
|
|
942
|
-
|
|
943
|
-
const name = filename.slice(0, -
|
|
944
|
-
const
|
|
945
|
-
const configContent = yield* fs.readFileString(
|
|
946
|
-
const configValues = Yaml2.parse(configContent);
|
|
914
|
+
const path = yield* Path5.Path;
|
|
915
|
+
const profileDir = path.join(DX_CONFIG4, "profile");
|
|
916
|
+
const entries = yield* fs.readDirectory(profileDir);
|
|
917
|
+
const profileFiles = entries.filter((entry) => entry.endsWith(".yml"));
|
|
918
|
+
const profiles = yield* Effect18.forEach(profileFiles, (filename) => Effect18.gen(function* () {
|
|
919
|
+
const name = filename.slice(0, -4);
|
|
920
|
+
const configPath = path.join(profileDir, filename);
|
|
921
|
+
const configContent = yield* fs.readFileString(configPath).pipe(Effect18.catchTag("SystemError", () => Effect18.succeed("{}")));
|
|
922
|
+
const configValues = Yaml2.parse(configContent) ?? {};
|
|
947
923
|
const config2 = new Config(configValues);
|
|
948
924
|
return {
|
|
949
925
|
name,
|
|
950
926
|
isCurrent: name === currentProfile,
|
|
951
|
-
fullPath,
|
|
952
|
-
storagePath:
|
|
927
|
+
fullPath: configPath,
|
|
928
|
+
storagePath: getProfilePath(configValues?.runtime?.client?.storage?.dataRoot ?? DX_DATA, name),
|
|
953
929
|
edge: config2.values.runtime?.services?.edge?.url
|
|
954
930
|
};
|
|
955
931
|
}));
|
|
@@ -970,7 +946,7 @@ import * as FileSystem11 from "@effect/platform/FileSystem";
|
|
|
970
946
|
import * as Console19 from "effect/Console";
|
|
971
947
|
import * as Effect19 from "effect/Effect";
|
|
972
948
|
import { CommandConfig as CommandConfig19, print as print11 } from "@dxos/cli-util";
|
|
973
|
-
import { DX_DATA as DX_DATA2, getProfilePath as
|
|
949
|
+
import { DX_DATA as DX_DATA2, getProfilePath as getProfilePath2 } from "@dxos/client-protocol";
|
|
974
950
|
import { ConfigService as ConfigService3 } from "@dxos/config";
|
|
975
951
|
var reset = Command24.make("reset", {
|
|
976
952
|
force: Options9.boolean("force", {
|
|
@@ -980,7 +956,7 @@ var reset = Command24.make("reset", {
|
|
|
980
956
|
const fs = yield* FileSystem11.FileSystem;
|
|
981
957
|
const config2 = yield* ConfigService3;
|
|
982
958
|
const { json, profile: profile2 } = yield* CommandConfig19;
|
|
983
|
-
const path = config2.values.runtime?.client?.storage?.dataRoot ??
|
|
959
|
+
const path = config2.values.runtime?.client?.storage?.dataRoot ?? getProfilePath2(DX_DATA2, profile2);
|
|
984
960
|
if (!force) {
|
|
985
961
|
const confirmed = yield* Prompt3.confirm({
|
|
986
962
|
message: `Are you sure you want to reset the profile (${profile2})?`,
|
|
@@ -1025,20 +1001,20 @@ var ClientPlugin = Plugin2.define(meta).pipe(
|
|
|
1025
1001
|
profile
|
|
1026
1002
|
]
|
|
1027
1003
|
}),
|
|
1028
|
-
AppPlugin.
|
|
1029
|
-
activate:
|
|
1004
|
+
AppPlugin.addOperationHandlerModule({
|
|
1005
|
+
activate: OperationHandler
|
|
1030
1006
|
}),
|
|
1031
1007
|
Plugin2.addModule((options) => ({
|
|
1032
1008
|
id: Capability.getModuleTag(Client),
|
|
1033
1009
|
activatesOn: ActivationEvents.Startup,
|
|
1034
|
-
|
|
1010
|
+
firesAfterActivation: [
|
|
1035
1011
|
ClientEvents.ClientReady
|
|
1036
1012
|
],
|
|
1037
1013
|
activate: () => Client(options)
|
|
1038
1014
|
})),
|
|
1039
1015
|
Plugin2.addModule({
|
|
1040
1016
|
activatesOn: ClientEvents.ClientReady,
|
|
1041
|
-
|
|
1017
|
+
firesBeforeActivation: [
|
|
1042
1018
|
AppActivationEvents.SetupSchema
|
|
1043
1019
|
],
|
|
1044
1020
|
activate: SchemaDefs
|