@dxos/plugin-space 0.8.4-main.ae835ea → 0.8.4-main.bc674ce
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/CollectionArticle-OQMUVFVV.mjs +125 -0
- package/dist/lib/browser/CollectionArticle-OQMUVFVV.mjs.map +7 -0
- package/dist/lib/browser/ObjectCardStack-TWHN6C2Y.mjs +148 -0
- package/dist/lib/browser/ObjectCardStack-TWHN6C2Y.mjs.map +7 -0
- package/dist/lib/browser/ObjectDetails-GEDIISKK.mjs +142 -0
- package/dist/lib/browser/ObjectDetails-GEDIISKK.mjs.map +7 -0
- package/dist/lib/browser/RecordArticle-W57QE7QV.mjs +107 -0
- package/dist/lib/browser/RecordArticle-W57QE7QV.mjs.map +7 -0
- package/dist/lib/browser/app-graph-builder-SJHTZXZF.mjs +523 -0
- package/dist/lib/browser/app-graph-builder-SJHTZXZF.mjs.map +7 -0
- package/dist/lib/browser/app-graph-serializer-7AT7QMSK.mjs +84 -0
- package/dist/lib/browser/app-graph-serializer-7AT7QMSK.mjs.map +7 -0
- package/dist/lib/browser/chunk-4WZUGLQQ.mjs +117 -0
- package/dist/lib/browser/chunk-4WZUGLQQ.mjs.map +7 -0
- package/dist/lib/browser/chunk-ASV6DYFH.mjs +19 -0
- package/dist/lib/browser/chunk-ASV6DYFH.mjs.map +7 -0
- package/dist/lib/browser/chunk-AWVAX26X.mjs +13 -0
- package/dist/lib/browser/chunk-AWVAX26X.mjs.map +7 -0
- package/dist/lib/browser/chunk-CCRSHECL.mjs +714 -0
- package/dist/lib/browser/chunk-CCRSHECL.mjs.map +7 -0
- package/dist/lib/browser/{chunk-VZBIIYFM.mjs → chunk-HSMQFM57.mjs} +1 -1
- package/dist/lib/browser/chunk-HSMQFM57.mjs.map +7 -0
- package/dist/lib/browser/{chunk-OWNBEI5J.mjs → chunk-SUI34XSA.mjs} +318 -256
- package/dist/lib/browser/chunk-SUI34XSA.mjs.map +7 -0
- package/dist/lib/browser/chunk-TWUMNPG4.mjs +1898 -0
- package/dist/lib/browser/chunk-TWUMNPG4.mjs.map +7 -0
- package/dist/lib/browser/{chunk-4V4JNJ33.mjs → chunk-ZT2VPYRM.mjs} +62 -63
- package/dist/lib/browser/chunk-ZT2VPYRM.mjs.map +7 -0
- package/dist/lib/browser/cli/index.mjs +849 -0
- package/dist/lib/browser/cli/index.mjs.map +7 -0
- package/dist/lib/browser/identity-created-VCFYLSBB.mjs +23 -0
- package/dist/lib/browser/identity-created-VCFYLSBB.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +230 -236
- package/dist/lib/browser/index.mjs.map +4 -4
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/operation-resolver-SIRQT36Z.mjs +827 -0
- package/dist/lib/browser/operation-resolver-SIRQT36Z.mjs.map +7 -0
- package/dist/lib/browser/react-root-3SPMM45V.mjs +30 -0
- package/dist/lib/browser/react-root-3SPMM45V.mjs.map +7 -0
- package/dist/lib/browser/react-surface-UUS7NDHS.mjs +382 -0
- package/dist/lib/browser/react-surface-UUS7NDHS.mjs.map +7 -0
- package/dist/lib/browser/repair-CJG26D52.mjs +50 -0
- package/dist/lib/browser/repair-CJG26D52.mjs.map +7 -0
- package/dist/lib/browser/settings-ZS2AQ73E.mjs +33 -0
- package/dist/lib/browser/settings-ZS2AQ73E.mjs.map +7 -0
- package/dist/lib/browser/spaces-ready-OQDGWUOS.mjs +242 -0
- package/dist/lib/browser/spaces-ready-OQDGWUOS.mjs.map +7 -0
- package/dist/lib/browser/state-7YZQB2KY.mjs +58 -0
- package/dist/lib/browser/state-7YZQB2KY.mjs.map +7 -0
- package/dist/lib/browser/types/index.mjs +18 -10
- package/dist/lib/node-esm/CollectionArticle-V5OOJVJJ.mjs +126 -0
- package/dist/lib/node-esm/CollectionArticle-V5OOJVJJ.mjs.map +7 -0
- package/dist/lib/node-esm/ObjectCardStack-C5ZXRKP7.mjs +149 -0
- package/dist/lib/node-esm/ObjectCardStack-C5ZXRKP7.mjs.map +7 -0
- package/dist/lib/node-esm/ObjectDetails-6ZLDRKCO.mjs +143 -0
- package/dist/lib/node-esm/ObjectDetails-6ZLDRKCO.mjs.map +7 -0
- package/dist/lib/node-esm/RecordArticle-SSV74Z46.mjs +108 -0
- package/dist/lib/node-esm/RecordArticle-SSV74Z46.mjs.map +7 -0
- package/dist/lib/node-esm/app-graph-builder-HZ3XXDFZ.mjs +524 -0
- package/dist/lib/node-esm/app-graph-builder-HZ3XXDFZ.mjs.map +7 -0
- package/dist/lib/node-esm/app-graph-serializer-WJ2TIQG6.mjs +85 -0
- package/dist/lib/node-esm/app-graph-serializer-WJ2TIQG6.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-G4PDWB7G.mjs → chunk-2SW6S2BB.mjs} +62 -63
- package/dist/lib/node-esm/chunk-2SW6S2BB.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-XEVIWD3O.mjs → chunk-7KMYUWSR.mjs} +318 -256
- package/dist/lib/node-esm/chunk-7KMYUWSR.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-CVXULIYC.mjs +20 -0
- package/dist/lib/node-esm/chunk-CVXULIYC.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-FYSBFBSD.mjs +1899 -0
- package/dist/lib/node-esm/chunk-FYSBFBSD.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-HREWB23G.mjs +15 -0
- package/dist/lib/node-esm/chunk-HREWB23G.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-JOBIWCBC.mjs +118 -0
- package/dist/lib/node-esm/chunk-JOBIWCBC.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-MPL6NHQX.mjs +715 -0
- package/dist/lib/node-esm/chunk-MPL6NHQX.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-BDEFTL6K.mjs → chunk-SL4BJSUG.mjs} +1 -1
- package/dist/lib/node-esm/chunk-SL4BJSUG.mjs.map +7 -0
- package/dist/lib/node-esm/cli/index.mjs +850 -0
- package/dist/lib/node-esm/cli/index.mjs.map +7 -0
- package/dist/lib/node-esm/identity-created-2SJABVJD.mjs +25 -0
- package/dist/lib/node-esm/identity-created-2SJABVJD.mjs.map +7 -0
- package/dist/lib/node-esm/index.mjs +230 -236
- package/dist/lib/node-esm/index.mjs.map +4 -4
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/operation-resolver-ZE3XJL5J.mjs +828 -0
- package/dist/lib/node-esm/operation-resolver-ZE3XJL5J.mjs.map +7 -0
- package/dist/lib/node-esm/react-root-Y6JTGDTW.mjs +31 -0
- package/dist/lib/node-esm/react-root-Y6JTGDTW.mjs.map +7 -0
- package/dist/lib/node-esm/react-surface-SQ4SK3OK.mjs +383 -0
- package/dist/lib/node-esm/react-surface-SQ4SK3OK.mjs.map +7 -0
- package/dist/lib/node-esm/repair-G3ZW3VG3.mjs +51 -0
- package/dist/lib/node-esm/repair-G3ZW3VG3.mjs.map +7 -0
- package/dist/lib/node-esm/settings-PVI2VG56.mjs +34 -0
- package/dist/lib/node-esm/settings-PVI2VG56.mjs.map +7 -0
- package/dist/lib/node-esm/spaces-ready-R744OHQG.mjs +243 -0
- package/dist/lib/node-esm/spaces-ready-R744OHQG.mjs.map +7 -0
- package/dist/lib/node-esm/state-XE5YGPHM.mjs +59 -0
- package/dist/lib/node-esm/state-XE5YGPHM.mjs.map +7 -0
- package/dist/lib/node-esm/types/index.mjs +18 -10
- package/dist/types/src/SpacePlugin.d.ts +3 -15
- package/dist/types/src/SpacePlugin.d.ts.map +1 -1
- package/dist/types/src/capabilities/app-graph-builder/app-graph-builder.d.ts +6 -0
- package/dist/types/src/capabilities/app-graph-builder/app-graph-builder.d.ts.map +1 -0
- package/dist/types/src/capabilities/app-graph-builder/index.d.ts +3 -0
- package/dist/types/src/capabilities/app-graph-builder/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/app-graph-serializer/app-graph-serializer.d.ts +5 -0
- package/dist/types/src/capabilities/app-graph-serializer/app-graph-serializer.d.ts.map +1 -0
- package/dist/types/src/capabilities/app-graph-serializer/index.d.ts +3 -0
- package/dist/types/src/capabilities/app-graph-serializer/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/identity-created/identity-created.d.ts +5 -0
- package/dist/types/src/capabilities/identity-created/identity-created.d.ts.map +1 -0
- package/dist/types/src/capabilities/identity-created/index.d.ts +3 -0
- package/dist/types/src/capabilities/identity-created/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/index.d.ts +10 -20
- package/dist/types/src/capabilities/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/operation-resolver/index.d.ts +6 -0
- package/dist/types/src/capabilities/operation-resolver/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/operation-resolver/operation-resolver.d.ts +9 -0
- package/dist/types/src/capabilities/operation-resolver/operation-resolver.d.ts.map +1 -0
- package/dist/types/src/capabilities/react-root/index.d.ts +6 -0
- package/dist/types/src/capabilities/react-root/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/react-root/react-root.d.ts +9 -0
- package/dist/types/src/capabilities/react-root/react-root.d.ts.map +1 -0
- package/dist/types/src/capabilities/react-surface/index.d.ts +5 -0
- package/dist/types/src/capabilities/react-surface/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/react-surface/react-surface.d.ts +8 -0
- package/dist/types/src/capabilities/react-surface/react-surface.d.ts.map +1 -0
- package/dist/types/src/capabilities/repair/index.d.ts +3 -0
- package/dist/types/src/capabilities/repair/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/repair/repair.d.ts +6 -0
- package/dist/types/src/capabilities/repair/repair.d.ts.map +1 -0
- package/dist/types/src/capabilities/settings/index.d.ts +7 -0
- package/dist/types/src/capabilities/settings/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/settings/settings.d.ts +9 -0
- package/dist/types/src/capabilities/settings/settings.d.ts.map +1 -0
- package/dist/types/src/capabilities/spaces-ready/index.d.ts +3 -0
- package/dist/types/src/capabilities/spaces-ready/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/spaces-ready/spaces-ready.d.ts +5 -0
- package/dist/types/src/capabilities/spaces-ready/spaces-ready.d.ts.map +1 -0
- package/dist/types/src/capabilities/state/index.d.ts +13 -0
- package/dist/types/src/capabilities/state/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/state/state.d.ts +17 -0
- package/dist/types/src/capabilities/state/state.d.ts.map +1 -0
- package/dist/types/src/cli/commands/database/add.d.ts +17 -0
- package/dist/types/src/cli/commands/database/add.d.ts.map +1 -0
- package/dist/types/src/cli/commands/database/index.d.ts +3 -0
- package/dist/types/src/cli/commands/database/index.d.ts.map +1 -0
- package/dist/types/src/cli/commands/database/query/index.d.ts +2 -0
- package/dist/types/src/cli/commands/database/query/index.d.ts.map +1 -0
- package/dist/types/src/cli/commands/database/query/query.d.ts +13 -0
- package/dist/types/src/cli/commands/database/query/query.d.ts.map +1 -0
- package/dist/types/src/cli/commands/database/query/query.test.d.ts +2 -0
- package/dist/types/src/cli/commands/database/query/query.test.d.ts.map +1 -0
- package/dist/types/src/cli/commands/database/remove.d.ts +9 -0
- package/dist/types/src/cli/commands/database/remove.d.ts.map +1 -0
- package/dist/types/src/cli/commands/database/stats.d.ts +6 -0
- package/dist/types/src/cli/commands/database/stats.d.ts.map +1 -0
- package/dist/types/src/cli/commands/database/util.d.ts +14 -0
- package/dist/types/src/cli/commands/database/util.d.ts.map +1 -0
- package/dist/types/src/cli/commands/index.d.ts +4 -0
- package/dist/types/src/cli/commands/index.d.ts.map +1 -0
- package/dist/types/src/cli/commands/queue/index.d.ts +7 -0
- package/dist/types/src/cli/commands/queue/index.d.ts.map +1 -0
- package/dist/types/src/cli/commands/queue/query.d.ts +8 -0
- package/dist/types/src/cli/commands/queue/query.d.ts.map +1 -0
- package/dist/types/src/cli/commands/queue/util.d.ts +6 -0
- package/dist/types/src/cli/commands/queue/util.d.ts.map +1 -0
- package/dist/types/src/cli/commands/space/close/close.d.ts +12 -0
- package/dist/types/src/cli/commands/space/close/close.d.ts.map +1 -0
- package/dist/types/src/cli/commands/space/close/index.d.ts +2 -0
- package/dist/types/src/cli/commands/space/close/index.d.ts.map +1 -0
- package/dist/types/src/cli/commands/space/create/create.d.ts +12 -0
- package/dist/types/src/cli/commands/space/create/create.d.ts.map +1 -0
- package/dist/types/src/cli/commands/space/create/create.test.d.ts +2 -0
- package/dist/types/src/cli/commands/space/create/create.test.d.ts.map +1 -0
- package/dist/types/src/cli/commands/space/create/index.d.ts +2 -0
- package/dist/types/src/cli/commands/space/create/index.d.ts.map +1 -0
- package/dist/types/src/cli/commands/space/index.d.ts +31 -0
- package/dist/types/src/cli/commands/space/index.d.ts.map +1 -0
- package/dist/types/src/cli/commands/space/info/index.d.ts +2 -0
- package/dist/types/src/cli/commands/space/info/index.d.ts.map +1 -0
- package/dist/types/src/cli/commands/space/info/info.d.ts +13 -0
- package/dist/types/src/cli/commands/space/info/info.d.ts.map +1 -0
- package/dist/types/src/cli/commands/space/info/info.test.d.ts +2 -0
- package/dist/types/src/cli/commands/space/info/info.test.d.ts.map +1 -0
- package/dist/types/src/cli/commands/space/join/index.d.ts +2 -0
- package/dist/types/src/cli/commands/space/join/index.d.ts.map +1 -0
- package/dist/types/src/cli/commands/space/join/join.d.ts +14 -0
- package/dist/types/src/cli/commands/space/join/join.d.ts.map +1 -0
- package/dist/types/src/cli/commands/space/join/util.d.ts +17 -0
- package/dist/types/src/cli/commands/space/join/util.d.ts.map +1 -0
- package/dist/types/src/cli/commands/space/list/index.d.ts +2 -0
- package/dist/types/src/cli/commands/space/list/index.d.ts.map +1 -0
- package/dist/types/src/cli/commands/space/list/list.d.ts +7 -0
- package/dist/types/src/cli/commands/space/list/list.d.ts.map +1 -0
- package/dist/types/src/cli/commands/space/list/list.test.d.ts +2 -0
- package/dist/types/src/cli/commands/space/list/list.test.d.ts.map +1 -0
- package/dist/types/src/cli/commands/space/members/index.d.ts +2 -0
- package/dist/types/src/cli/commands/space/members/index.d.ts.map +1 -0
- package/dist/types/src/cli/commands/space/members/members.d.ts +13 -0
- package/dist/types/src/cli/commands/space/members/members.d.ts.map +1 -0
- package/dist/types/src/cli/commands/space/members/members.test.d.ts +2 -0
- package/dist/types/src/cli/commands/space/members/members.test.d.ts.map +1 -0
- package/dist/types/src/cli/commands/space/members/util.d.ts +9 -0
- package/dist/types/src/cli/commands/space/members/util.d.ts.map +1 -0
- package/dist/types/src/cli/commands/space/open/index.d.ts +2 -0
- package/dist/types/src/cli/commands/space/open/index.d.ts.map +1 -0
- package/dist/types/src/cli/commands/space/open/open.d.ts +12 -0
- package/dist/types/src/cli/commands/space/open/open.d.ts.map +1 -0
- package/dist/types/src/cli/commands/space/schema/index.d.ts +8 -0
- package/dist/types/src/cli/commands/space/schema/index.d.ts.map +1 -0
- package/dist/types/src/cli/commands/space/schema/list/index.d.ts +2 -0
- package/dist/types/src/cli/commands/space/schema/list/index.d.ts.map +1 -0
- package/dist/types/src/cli/commands/space/schema/list/list.d.ts +15 -0
- package/dist/types/src/cli/commands/space/schema/list/list.d.ts.map +1 -0
- package/dist/types/src/cli/commands/space/schema/list/list.test.d.ts +2 -0
- package/dist/types/src/cli/commands/space/schema/list/list.test.d.ts.map +1 -0
- package/dist/types/src/cli/commands/space/schema/list/util.d.ts +15 -0
- package/dist/types/src/cli/commands/space/schema/list/util.d.ts.map +1 -0
- package/dist/types/src/cli/commands/space/share/index.d.ts +2 -0
- package/dist/types/src/cli/commands/space/share/index.d.ts.map +1 -0
- package/dist/types/src/cli/commands/space/share/share.d.ts +19 -0
- package/dist/types/src/cli/commands/space/share/share.d.ts.map +1 -0
- package/dist/types/src/cli/commands/space/sync/index.d.ts +2 -0
- package/dist/types/src/cli/commands/space/sync/index.d.ts.map +1 -0
- package/dist/types/src/cli/commands/space/sync/sync.d.ts +6 -0
- package/dist/types/src/cli/commands/space/sync/sync.d.ts.map +1 -0
- package/dist/types/src/cli/commands/space/sync/sync.test.d.ts +2 -0
- package/dist/types/src/cli/commands/space/sync/sync.test.d.ts.map +1 -0
- package/dist/types/src/cli/index.d.ts +2 -0
- package/dist/types/src/cli/index.d.ts.map +1 -0
- package/dist/types/src/cli/plugin.d.ts +4 -0
- package/dist/types/src/cli/plugin.d.ts.map +1 -0
- package/dist/types/src/components/AwaitingObject.d.ts.map +1 -1
- package/dist/types/src/components/CollectionArticle.d.ts +9 -0
- package/dist/types/src/components/CollectionArticle.d.ts.map +1 -0
- package/dist/types/src/components/CollectionSection.d.ts +3 -4
- package/dist/types/src/components/CollectionSection.d.ts.map +1 -1
- package/dist/types/src/components/CreateDialog/CreateObjectDialog.d.ts +2 -2
- package/dist/types/src/components/CreateDialog/CreateObjectDialog.d.ts.map +1 -1
- package/dist/types/src/components/CreateDialog/CreateObjectDialog.stories.d.ts +163 -229
- package/dist/types/src/components/CreateDialog/CreateObjectDialog.stories.d.ts.map +1 -1
- package/dist/types/src/components/CreateDialog/CreateObjectPanel.d.ts +18 -10
- package/dist/types/src/components/CreateDialog/CreateObjectPanel.d.ts.map +1 -1
- package/dist/types/src/components/CreateDialog/CreateSpaceDialog.d.ts.map +1 -1
- package/dist/types/src/components/JoinDialog/JoinDialog.d.ts.map +1 -0
- package/dist/types/src/components/JoinDialog/index.d.ts +2 -0
- package/dist/types/src/components/JoinDialog/index.d.ts.map +1 -0
- package/dist/types/src/components/MembersContainer/MembersContainer.d.ts.map +1 -0
- package/dist/types/src/components/{RecordMain.stories.d.ts → MembersContainer/MembersContainer.stories.d.ts} +158 -225
- package/dist/types/src/components/{MembersContainer.stories.d.ts.map → MembersContainer/MembersContainer.stories.d.ts.map} +1 -1
- package/dist/types/src/components/MembersContainer/index.d.ts +2 -0
- package/dist/types/src/components/MembersContainer/index.d.ts.map +1 -0
- package/dist/types/src/components/MenuFooter.d.ts +1 -1
- package/dist/types/src/components/MenuFooter.d.ts.map +1 -1
- package/dist/types/src/components/ObjectCardStack/ObjectCardStack.d.ts +8 -0
- package/dist/types/src/components/ObjectCardStack/ObjectCardStack.d.ts.map +1 -0
- package/dist/types/src/components/{ObjectDetailsPanel → ObjectCardStack}/ObjectForm.d.ts +2 -3
- package/dist/types/src/components/ObjectCardStack/ObjectForm.d.ts.map +1 -0
- package/dist/types/src/components/ObjectCardStack/index.d.ts +3 -0
- package/dist/types/src/components/ObjectCardStack/index.d.ts.map +1 -0
- package/dist/types/src/components/{ObjectSettings → ObjectDetails}/BaseObjectSettings.d.ts +1 -1
- package/dist/types/src/components/ObjectDetails/BaseObjectSettings.d.ts.map +1 -0
- package/dist/types/src/components/{ObjectSettings → ObjectDetails}/BaseObjectSettings.stories.d.ts +156 -223
- package/dist/types/src/components/{ObjectSettings → ObjectDetails}/BaseObjectSettings.stories.d.ts.map +1 -1
- package/dist/types/src/components/ObjectDetails/ForeignKeys.d.ts +8 -0
- package/dist/types/src/components/ObjectDetails/ForeignKeys.d.ts.map +1 -0
- package/dist/types/src/components/ObjectDetails/ObjectDetails.d.ts +9 -0
- package/dist/types/src/components/ObjectDetails/ObjectDetails.d.ts.map +1 -0
- package/dist/types/src/components/ObjectDetails/index.d.ts +3 -0
- package/dist/types/src/components/ObjectDetails/index.d.ts.map +1 -0
- package/dist/types/src/components/ObjectRenamePopover/ObjectRenamePopover.d.ts +7 -0
- package/dist/types/src/components/ObjectRenamePopover/ObjectRenamePopover.d.ts.map +1 -0
- package/dist/types/src/components/ObjectRenamePopover/index.d.ts +2 -0
- package/dist/types/src/components/ObjectRenamePopover/index.d.ts.map +1 -0
- package/dist/types/src/components/RecordArticle.d.ts +5 -0
- package/dist/types/src/components/RecordArticle.d.ts.map +1 -0
- package/dist/types/src/components/{MembersContainer.stories.d.ts → RecordArticle.stories.d.ts} +158 -225
- package/dist/types/src/components/{RecordMain.stories.d.ts.map → RecordArticle.stories.d.ts.map} +1 -1
- package/dist/types/src/components/SchemaContainer.d.ts +2 -2
- package/dist/types/src/components/SchemaContainer.d.ts.map +1 -1
- package/dist/types/src/components/SpacePluginSettings.d.ts +4 -2
- package/dist/types/src/components/SpacePluginSettings.d.ts.map +1 -1
- package/dist/types/src/components/{SpacePresence.d.ts → SpacePresence/SpacePresence.d.ts} +7 -6
- package/dist/types/src/components/SpacePresence/SpacePresence.d.ts.map +1 -0
- package/dist/types/src/components/{SpacePresence.stories.d.ts → SpacePresence/SpacePresence.stories.d.ts} +156 -223
- package/dist/types/src/components/{SpacePresence.stories.d.ts.map → SpacePresence/SpacePresence.stories.d.ts.map} +1 -1
- package/dist/types/src/components/SpacePresence/index.d.ts +2 -0
- package/dist/types/src/components/SpacePresence/index.d.ts.map +1 -0
- package/dist/types/src/components/SpaceRenamePopover/SpaceRenamePopover.d.ts +7 -0
- package/dist/types/src/components/SpaceRenamePopover/SpaceRenamePopover.d.ts.map +1 -0
- package/dist/types/src/components/SpaceRenamePopover/index.d.ts +2 -0
- package/dist/types/src/components/SpaceRenamePopover/index.d.ts.map +1 -0
- package/dist/types/src/components/SpaceSettings/SpaceSettingsContainer.d.ts +1 -1
- package/dist/types/src/components/SpaceSettings/SpaceSettingsContainer.d.ts.map +1 -1
- package/dist/types/src/components/SpaceSettings/SpaceSettingsContainer.stories.d.ts +157 -224
- package/dist/types/src/components/SpaceSettings/SpaceSettingsContainer.stories.d.ts.map +1 -1
- package/dist/types/src/components/SyncStatus/SyncStatus.d.ts.map +1 -1
- package/dist/types/src/components/SyncStatus/SyncStatus.stories.d.ts +156 -223
- package/dist/types/src/components/SyncStatus/SyncStatus.stories.d.ts.map +1 -1
- package/dist/types/src/components/ViewEditor.d.ts +3 -4
- package/dist/types/src/components/ViewEditor.d.ts.map +1 -1
- package/dist/types/src/components/index.d.ts +15 -16
- package/dist/types/src/components/index.d.ts.map +1 -1
- package/dist/types/src/constants.d.ts +6 -0
- package/dist/types/src/constants.d.ts.map +1 -0
- package/dist/types/src/helpers/index.d.ts +2 -0
- package/dist/types/src/helpers/index.d.ts.map +1 -0
- package/dist/types/src/helpers/query.d.ts +7 -0
- package/dist/types/src/helpers/query.d.ts.map +1 -0
- package/dist/types/src/helpers/query.test.d.ts +2 -0
- package/dist/types/src/helpers/query.test.d.ts.map +1 -0
- package/dist/types/src/hooks/useActiveSpace.d.ts +2 -2
- package/dist/types/src/hooks/useActiveSpace.d.ts.map +1 -1
- package/dist/types/src/hooks/useInputSurfaceLookup.d.ts +2 -8
- package/dist/types/src/hooks/useInputSurfaceLookup.d.ts.map +1 -1
- package/dist/types/src/hooks/usePath.d.ts +2 -2
- package/dist/types/src/hooks/usePath.d.ts.map +1 -1
- package/dist/types/src/hooks/useTypeOptions.d.ts +2 -2
- package/dist/types/src/hooks/useTypeOptions.d.ts.map +1 -1
- package/dist/types/src/index.d.ts +2 -2
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/meta.d.ts +2 -2
- package/dist/types/src/meta.d.ts.map +1 -1
- package/dist/types/src/translations.d.ts +156 -223
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/src/types/capabilities.d.ts +71 -0
- package/dist/types/src/types/capabilities.d.ts.map +1 -0
- package/dist/types/src/types/events.d.ts +9 -0
- package/dist/types/src/types/events.d.ts.map +1 -0
- package/dist/types/src/types/form.d.ts +22 -0
- package/dist/types/src/types/form.d.ts.map +1 -0
- package/dist/types/src/types/index.d.ts +3 -0
- package/dist/types/src/types/index.d.ts.map +1 -1
- package/dist/types/src/types/types.d.ts +637 -397
- package/dist/types/src/types/types.d.ts.map +1 -1
- package/dist/types/src/util.d.ts +39 -51
- package/dist/types/src/util.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +82 -63
- package/src/SpacePlugin.ts +169 -227
- package/src/capabilities/app-graph-builder/app-graph-builder.ts +617 -0
- package/src/capabilities/app-graph-builder/index.ts +7 -0
- package/src/capabilities/app-graph-serializer/app-graph-serializer.ts +82 -0
- package/src/capabilities/app-graph-serializer/index.ts +7 -0
- package/src/capabilities/identity-created/identity-created.ts +29 -0
- package/src/capabilities/identity-created/index.ts +7 -0
- package/src/capabilities/index.ts +10 -14
- package/src/capabilities/operation-resolver/index.ts +7 -0
- package/src/capabilities/operation-resolver/operation-resolver.ts +760 -0
- package/src/capabilities/react-root/index.ts +7 -0
- package/src/capabilities/react-root/react-root.tsx +25 -0
- package/src/capabilities/react-surface/index.ts +7 -0
- package/src/capabilities/react-surface/react-surface.tsx +375 -0
- package/src/capabilities/repair/index.ts +7 -0
- package/src/capabilities/repair/repair.ts +67 -0
- package/src/capabilities/settings/index.ts +7 -0
- package/src/capabilities/settings/settings.ts +32 -0
- package/src/capabilities/spaces-ready/index.ts +7 -0
- package/src/capabilities/spaces-ready/spaces-ready.ts +289 -0
- package/src/capabilities/state/index.ts +7 -0
- package/src/capabilities/state/state.ts +64 -0
- package/src/cli/commands/database/add.ts +116 -0
- package/src/cli/commands/database/index.ts +16 -0
- package/src/cli/commands/database/query/index.ts +5 -0
- package/src/cli/commands/database/query/query.test.ts +55 -0
- package/src/cli/commands/database/query/query.ts +44 -0
- package/src/cli/commands/database/remove.ts +51 -0
- package/src/cli/commands/database/stats.ts +44 -0
- package/src/cli/commands/database/util.ts +32 -0
- package/src/cli/commands/index.ts +7 -0
- package/src/cli/commands/queue/index.ts +12 -0
- package/src/cli/commands/queue/query.ts +45 -0
- package/src/cli/commands/queue/util.ts +19 -0
- package/src/cli/commands/space/close/close.ts +40 -0
- package/src/cli/commands/space/close/index.ts +5 -0
- package/src/cli/commands/space/create/create.test.ts +67 -0
- package/src/cli/commands/space/create/create.ts +61 -0
- package/src/cli/commands/space/create/index.ts +5 -0
- package/src/cli/commands/space/index.ts +21 -0
- package/src/cli/commands/space/info/index.ts +5 -0
- package/src/cli/commands/space/info/info.test.ts +47 -0
- package/src/cli/commands/space/info/info.ts +37 -0
- package/src/cli/commands/space/join/index.ts +5 -0
- package/src/cli/commands/space/join/join.ts +122 -0
- package/src/cli/commands/space/join/util.ts +82 -0
- package/src/cli/commands/space/list/index.ts +5 -0
- package/src/cli/commands/space/list/list.test.ts +36 -0
- package/src/cli/commands/space/list/list.ts +30 -0
- package/src/cli/commands/space/members/index.ts +5 -0
- package/src/cli/commands/space/members/members.test.ts +46 -0
- package/src/cli/commands/space/members/members.ts +40 -0
- package/src/cli/commands/space/members/util.ts +29 -0
- package/src/cli/commands/space/open/index.ts +5 -0
- package/src/cli/commands/space/open/open.ts +39 -0
- package/src/cli/commands/space/schema/index.ts +12 -0
- package/src/cli/commands/space/schema/list/index.ts +5 -0
- package/src/cli/commands/space/schema/list/list.test.ts +42 -0
- package/src/cli/commands/space/schema/list/list.ts +64 -0
- package/src/cli/commands/space/schema/list/util.ts +39 -0
- package/src/cli/commands/space/share/index.ts +5 -0
- package/src/cli/commands/space/share/share.ts +112 -0
- package/src/cli/commands/space/sync/index.ts +5 -0
- package/src/cli/commands/space/sync/sync.test.ts +12 -0
- package/src/cli/commands/space/sync/sync.ts +33 -0
- package/src/cli/index.ts +5 -0
- package/src/cli/plugin.ts +81 -0
- package/src/components/AwaitingObject.tsx +21 -20
- package/src/components/CollectionArticle.tsx +153 -0
- package/src/components/CollectionSection.tsx +6 -4
- package/src/components/CreateDialog/CreateObjectDialog.stories.tsx +30 -24
- package/src/components/CreateDialog/CreateObjectDialog.tsx +66 -57
- package/src/components/CreateDialog/CreateObjectPanel.tsx +153 -91
- package/src/components/CreateDialog/CreateSpaceDialog.tsx +34 -29
- package/src/components/{JoinDialog.tsx → JoinDialog/JoinDialog.tsx} +26 -37
- package/src/components/JoinDialog/index.ts +5 -0
- package/src/components/{MembersContainer.stories.tsx → MembersContainer/MembersContainer.stories.tsx} +3 -3
- package/src/components/{MembersContainer.tsx → MembersContainer/MembersContainer.tsx} +41 -41
- package/src/components/MembersContainer/index.ts +5 -0
- package/src/components/MenuFooter.tsx +1 -1
- package/src/components/ObjectCardStack/ObjectCardStack.tsx +67 -0
- package/src/components/ObjectCardStack/ObjectForm.tsx +97 -0
- package/src/components/ObjectCardStack/index.ts +7 -0
- package/src/components/{ObjectSettings → ObjectDetails}/BaseObjectSettings.stories.tsx +7 -7
- package/src/components/ObjectDetails/BaseObjectSettings.tsx +122 -0
- package/src/components/{ObjectSettings → ObjectDetails}/ForeignKeys.tsx +6 -6
- package/src/components/ObjectDetails/ObjectDetails.tsx +32 -0
- package/src/components/ObjectDetails/index.ts +7 -0
- package/src/components/{PopoverRenameObject.tsx → ObjectRenamePopover/ObjectRenamePopover.tsx} +11 -15
- package/src/components/ObjectRenamePopover/index.ts +5 -0
- package/src/components/{RecordMain.stories.tsx → RecordArticle.stories.tsx} +30 -31
- package/src/components/RecordArticle.tsx +122 -0
- package/src/components/SchemaContainer.tsx +24 -27
- package/src/components/SpacePluginSettings.tsx +17 -7
- package/src/components/{SpacePresence.stories.tsx → SpacePresence/SpacePresence.stories.tsx} +1 -1
- package/src/components/{SpacePresence.tsx → SpacePresence/SpacePresence.tsx} +19 -16
- package/src/components/SpacePresence/index.ts +5 -0
- package/src/components/{PopoverRenameSpace.tsx → SpaceRenamePopover/SpaceRenamePopover.tsx} +15 -15
- package/src/components/SpaceRenamePopover/index.ts +5 -0
- package/src/components/SpaceSettings/SpaceSettingsContainer.stories.tsx +4 -4
- package/src/components/SpaceSettings/SpaceSettingsContainer.tsx +188 -153
- package/src/components/SyncStatus/InlineSyncStatus.tsx +1 -1
- package/src/components/SyncStatus/SyncStatus.tsx +26 -20
- package/src/components/SyncStatus/save-tracker.ts +2 -2
- package/src/components/ViewEditor.tsx +64 -21
- package/src/components/index.ts +7 -8
- package/src/constants.ts +11 -0
- package/src/helpers/index.ts +5 -0
- package/src/helpers/query.test.ts +24 -0
- package/src/helpers/query.ts +153 -0
- package/src/hooks/useActiveSpace.ts +7 -4
- package/src/hooks/useInputSurfaceLookup.tsx +9 -13
- package/src/hooks/usePath.ts +4 -4
- package/src/hooks/useTypeOptions.ts +3 -37
- package/src/index.ts +2 -2
- package/src/meta.ts +2 -2
- package/src/translations.ts +61 -59
- package/src/types/capabilities.ts +73 -0
- package/src/types/events.ts +15 -0
- package/src/types/form.ts +69 -0
- package/src/types/index.ts +3 -0
- package/src/types/types.ts +532 -261
- package/src/util.tsx +330 -282
- package/dist/lib/browser/CollectionMain-HTKSZCRR.mjs +0 -31
- package/dist/lib/browser/CollectionMain-HTKSZCRR.mjs.map +0 -7
- package/dist/lib/browser/ObjectDetailsPanel-5B45G744.mjs +0 -145
- package/dist/lib/browser/ObjectDetailsPanel-5B45G744.mjs.map +0 -7
- package/dist/lib/browser/ObjectSettings-UFTKBP7B.mjs +0 -146
- package/dist/lib/browser/ObjectSettings-UFTKBP7B.mjs.map +0 -7
- package/dist/lib/browser/RecordMain-BCSXTSEB.mjs +0 -99
- package/dist/lib/browser/RecordMain-BCSXTSEB.mjs.map +0 -7
- package/dist/lib/browser/app-graph-builder-QJFO4ANM.mjs +0 -520
- package/dist/lib/browser/app-graph-builder-QJFO4ANM.mjs.map +0 -7
- package/dist/lib/browser/app-graph-serializer-3R5NVV7U.mjs +0 -80
- package/dist/lib/browser/app-graph-serializer-3R5NVV7U.mjs.map +0 -7
- package/dist/lib/browser/chunk-2NS3VPSY.mjs +0 -20
- package/dist/lib/browser/chunk-2NS3VPSY.mjs.map +0 -7
- package/dist/lib/browser/chunk-4V4JNJ33.mjs.map +0 -7
- package/dist/lib/browser/chunk-ENBBJSNE.mjs +0 -1949
- package/dist/lib/browser/chunk-ENBBJSNE.mjs.map +0 -7
- package/dist/lib/browser/chunk-HS2VD6DN.mjs +0 -166
- package/dist/lib/browser/chunk-HS2VD6DN.mjs.map +0 -7
- package/dist/lib/browser/chunk-OWNBEI5J.mjs.map +0 -7
- package/dist/lib/browser/chunk-SLDQWMQ2.mjs +0 -349
- package/dist/lib/browser/chunk-SLDQWMQ2.mjs.map +0 -7
- package/dist/lib/browser/chunk-VZBIIYFM.mjs.map +0 -7
- package/dist/lib/browser/chunk-WJXU4GKV.mjs +0 -19
- package/dist/lib/browser/chunk-WJXU4GKV.mjs.map +0 -7
- package/dist/lib/browser/identity-created-PW2BA46S.mjs +0 -23
- package/dist/lib/browser/identity-created-PW2BA46S.mjs.map +0 -7
- package/dist/lib/browser/intent-resolver-MBVOLXFQ.mjs +0 -772
- package/dist/lib/browser/intent-resolver-MBVOLXFQ.mjs.map +0 -7
- package/dist/lib/browser/react-root-NKEKCEYM.mjs +0 -29
- package/dist/lib/browser/react-root-NKEKCEYM.mjs.map +0 -7
- package/dist/lib/browser/react-surface-PYSN2MBY.mjs +0 -354
- package/dist/lib/browser/react-surface-PYSN2MBY.mjs.map +0 -7
- package/dist/lib/browser/schema-defs-DWYK7TYW.mjs +0 -26
- package/dist/lib/browser/schema-defs-DWYK7TYW.mjs.map +0 -7
- package/dist/lib/browser/settings-ZUCC3ZLB.mjs +0 -24
- package/dist/lib/browser/settings-ZUCC3ZLB.mjs.map +0 -7
- package/dist/lib/browser/spaces-ready-HTWWJHLR.mjs +0 -201
- package/dist/lib/browser/spaces-ready-HTWWJHLR.mjs.map +0 -7
- package/dist/lib/browser/state-ISVAKMO7.mjs +0 -47
- package/dist/lib/browser/state-ISVAKMO7.mjs.map +0 -7
- package/dist/lib/node-esm/CollectionMain-OUHGG6OC.mjs +0 -32
- package/dist/lib/node-esm/CollectionMain-OUHGG6OC.mjs.map +0 -7
- package/dist/lib/node-esm/ObjectDetailsPanel-4SDHQVQU.mjs +0 -146
- package/dist/lib/node-esm/ObjectDetailsPanel-4SDHQVQU.mjs.map +0 -7
- package/dist/lib/node-esm/ObjectSettings-EU6F43RP.mjs +0 -147
- package/dist/lib/node-esm/ObjectSettings-EU6F43RP.mjs.map +0 -7
- package/dist/lib/node-esm/RecordMain-SD76DGOR.mjs +0 -100
- package/dist/lib/node-esm/RecordMain-SD76DGOR.mjs.map +0 -7
- package/dist/lib/node-esm/app-graph-builder-B23W62HY.mjs +0 -521
- package/dist/lib/node-esm/app-graph-builder-B23W62HY.mjs.map +0 -7
- package/dist/lib/node-esm/app-graph-serializer-3Z3EXEEF.mjs +0 -81
- package/dist/lib/node-esm/app-graph-serializer-3Z3EXEEF.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-BDEFTL6K.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-G4PDWB7G.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-H4JILUJK.mjs +0 -20
- package/dist/lib/node-esm/chunk-H4JILUJK.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-KKPCCA5O.mjs +0 -1950
- package/dist/lib/node-esm/chunk-KKPCCA5O.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-PM4ZIGKC.mjs +0 -167
- package/dist/lib/node-esm/chunk-PM4ZIGKC.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-XEVIWD3O.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-YFQXFQGT.mjs +0 -350
- package/dist/lib/node-esm/chunk-YFQXFQGT.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-ZLMFLI7G.mjs +0 -21
- package/dist/lib/node-esm/chunk-ZLMFLI7G.mjs.map +0 -7
- package/dist/lib/node-esm/identity-created-MWTLGQRU.mjs +0 -25
- package/dist/lib/node-esm/identity-created-MWTLGQRU.mjs.map +0 -7
- package/dist/lib/node-esm/intent-resolver-IWI47NTW.mjs +0 -773
- package/dist/lib/node-esm/intent-resolver-IWI47NTW.mjs.map +0 -7
- package/dist/lib/node-esm/react-root-LX7SIG6M.mjs +0 -30
- package/dist/lib/node-esm/react-root-LX7SIG6M.mjs.map +0 -7
- package/dist/lib/node-esm/react-surface-6SVGOZNJ.mjs +0 -355
- package/dist/lib/node-esm/react-surface-6SVGOZNJ.mjs.map +0 -7
- package/dist/lib/node-esm/schema-defs-EOG2UPJU.mjs +0 -27
- package/dist/lib/node-esm/schema-defs-EOG2UPJU.mjs.map +0 -7
- package/dist/lib/node-esm/settings-ZDJNLFGW.mjs +0 -25
- package/dist/lib/node-esm/settings-ZDJNLFGW.mjs.map +0 -7
- package/dist/lib/node-esm/spaces-ready-VUGYPF4L.mjs +0 -202
- package/dist/lib/node-esm/spaces-ready-VUGYPF4L.mjs.map +0 -7
- package/dist/lib/node-esm/state-QZ4Q6ZRL.mjs +0 -48
- package/dist/lib/node-esm/state-QZ4Q6ZRL.mjs.map +0 -7
- package/dist/types/src/capabilities/app-graph-builder.d.ts +0 -4
- package/dist/types/src/capabilities/app-graph-builder.d.ts.map +0 -1
- package/dist/types/src/capabilities/app-graph-serializer.d.ts +0 -4
- package/dist/types/src/capabilities/app-graph-serializer.d.ts.map +0 -1
- package/dist/types/src/capabilities/capabilities.d.ts +0 -29
- package/dist/types/src/capabilities/capabilities.d.ts.map +0 -1
- package/dist/types/src/capabilities/identity-created.d.ts +0 -4
- package/dist/types/src/capabilities/identity-created.d.ts.map +0 -1
- package/dist/types/src/capabilities/intent-resolver.d.ts +0 -9
- package/dist/types/src/capabilities/intent-resolver.d.ts.map +0 -1
- package/dist/types/src/capabilities/react-root.d.ts +0 -7
- package/dist/types/src/capabilities/react-root.d.ts.map +0 -1
- package/dist/types/src/capabilities/react-surface.d.ts +0 -7
- package/dist/types/src/capabilities/react-surface.d.ts.map +0 -1
- package/dist/types/src/capabilities/schema-defs.d.ts +0 -4
- package/dist/types/src/capabilities/schema-defs.d.ts.map +0 -1
- package/dist/types/src/capabilities/settings.d.ts +0 -4
- package/dist/types/src/capabilities/settings.d.ts.map +0 -1
- package/dist/types/src/capabilities/spaces-ready.d.ts +0 -4
- package/dist/types/src/capabilities/spaces-ready.d.ts.map +0 -1
- package/dist/types/src/capabilities/state.d.ts +0 -5
- package/dist/types/src/capabilities/state.d.ts.map +0 -1
- package/dist/types/src/components/CollectionMain.d.ts +0 -7
- package/dist/types/src/components/CollectionMain.d.ts.map +0 -1
- package/dist/types/src/components/JoinDialog.d.ts.map +0 -1
- package/dist/types/src/components/MembersContainer.d.ts.map +0 -1
- package/dist/types/src/components/ObjectDetailsPanel/ObjectDetailsPanel.d.ts +0 -9
- package/dist/types/src/components/ObjectDetailsPanel/ObjectDetailsPanel.d.ts.map +0 -1
- package/dist/types/src/components/ObjectDetailsPanel/ObjectForm.d.ts.map +0 -1
- package/dist/types/src/components/ObjectDetailsPanel/index.d.ts +0 -3
- package/dist/types/src/components/ObjectDetailsPanel/index.d.ts.map +0 -1
- package/dist/types/src/components/ObjectSettings/AdvancedObjectSettings.d.ts +0 -7
- package/dist/types/src/components/ObjectSettings/AdvancedObjectSettings.d.ts.map +0 -1
- package/dist/types/src/components/ObjectSettings/BaseObjectSettings.d.ts.map +0 -1
- package/dist/types/src/components/ObjectSettings/ForeignKeys.d.ts +0 -8
- package/dist/types/src/components/ObjectSettings/ForeignKeys.d.ts.map +0 -1
- package/dist/types/src/components/ObjectSettings/ObjectSettingsContainer.d.ts +0 -8
- package/dist/types/src/components/ObjectSettings/ObjectSettingsContainer.d.ts.map +0 -1
- package/dist/types/src/components/ObjectSettings/index.d.ts +0 -3
- package/dist/types/src/components/ObjectSettings/index.d.ts.map +0 -1
- package/dist/types/src/components/PersistenceStatus.d.ts +0 -6
- package/dist/types/src/components/PersistenceStatus.d.ts.map +0 -1
- package/dist/types/src/components/PopoverRenameObject.d.ts +0 -7
- package/dist/types/src/components/PopoverRenameObject.d.ts.map +0 -1
- package/dist/types/src/components/PopoverRenameSpace.d.ts +0 -7
- package/dist/types/src/components/PopoverRenameSpace.d.ts.map +0 -1
- package/dist/types/src/components/RecordMain.d.ts +0 -8
- package/dist/types/src/components/RecordMain.d.ts.map +0 -1
- package/dist/types/src/components/SpacePresence.d.ts.map +0 -1
- package/dist/types/src/events.d.ts +0 -8
- package/dist/types/src/events.d.ts.map +0 -1
- package/src/capabilities/app-graph-builder.ts +0 -757
- package/src/capabilities/app-graph-serializer.ts +0 -76
- package/src/capabilities/capabilities.ts +0 -35
- package/src/capabilities/identity-created.ts +0 -25
- package/src/capabilities/intent-resolver.ts +0 -711
- package/src/capabilities/react-root.tsx +0 -21
- package/src/capabilities/react-surface.tsx +0 -329
- package/src/capabilities/schema-defs.ts +0 -31
- package/src/capabilities/settings.ts +0 -21
- package/src/capabilities/spaces-ready.ts +0 -234
- package/src/capabilities/state.ts +0 -46
- package/src/components/CollectionMain.tsx +0 -32
- package/src/components/ObjectDetailsPanel/ObjectDetailsPanel.tsx +0 -52
- package/src/components/ObjectDetailsPanel/ObjectForm.tsx +0 -75
- package/src/components/ObjectDetailsPanel/index.ts +0 -7
- package/src/components/ObjectSettings/AdvancedObjectSettings.tsx +0 -81
- package/src/components/ObjectSettings/BaseObjectSettings.tsx +0 -107
- package/src/components/ObjectSettings/ObjectSettingsContainer.tsx +0 -37
- package/src/components/ObjectSettings/index.ts +0 -7
- package/src/components/PersistenceStatus.tsx +0 -83
- package/src/components/RecordMain.tsx +0 -83
- package/src/events.ts +0 -15
- /package/dist/types/src/components/{JoinDialog.d.ts → JoinDialog/JoinDialog.d.ts} +0 -0
- /package/dist/types/src/components/{MembersContainer.d.ts → MembersContainer/MembersContainer.d.ts} +0 -0
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import * as Command from '@effect/cli/Command';
|
|
6
|
+
import * as Options from '@effect/cli/Options';
|
|
7
|
+
import * as Array from 'effect/Array';
|
|
8
|
+
import * as Console from 'effect/Console';
|
|
9
|
+
import * as Effect from 'effect/Effect';
|
|
10
|
+
import * as Function from 'effect/Function';
|
|
11
|
+
import * as Record from 'effect/Record';
|
|
12
|
+
|
|
13
|
+
import { CommandConfig, Common, printList, spaceLayer } from '@dxos/cli-util';
|
|
14
|
+
import { Obj } from '@dxos/echo';
|
|
15
|
+
import { Database, Filter, Query } from '@dxos/echo';
|
|
16
|
+
|
|
17
|
+
import { printStats } from './util';
|
|
18
|
+
|
|
19
|
+
export const stats = Command.make(
|
|
20
|
+
'stats',
|
|
21
|
+
{
|
|
22
|
+
spaceId: Common.spaceId.pipe(Options.optional),
|
|
23
|
+
},
|
|
24
|
+
() =>
|
|
25
|
+
Effect.gen(function* () {
|
|
26
|
+
const { json } = yield* CommandConfig;
|
|
27
|
+
const objects = yield* Database.Service.runQuery(Query.select(Filter.everything()));
|
|
28
|
+
const stats = Function.pipe(
|
|
29
|
+
objects,
|
|
30
|
+
Array.groupBy((obj) => Obj.getTypename(obj) ?? '<empty>'),
|
|
31
|
+
Record.map((objs) => objs.length),
|
|
32
|
+
);
|
|
33
|
+
|
|
34
|
+
if (json) {
|
|
35
|
+
yield* Console.log(JSON.stringify(stats, null, 2));
|
|
36
|
+
} else {
|
|
37
|
+
const formatted = Record.toEntries(stats).map(([typename, count]) => printStats(typename, count));
|
|
38
|
+
yield* Console.log(printList(formatted));
|
|
39
|
+
}
|
|
40
|
+
}),
|
|
41
|
+
).pipe(
|
|
42
|
+
Command.withDescription('Query objects.'),
|
|
43
|
+
Command.provide(({ spaceId }) => spaceLayer(spaceId, true)),
|
|
44
|
+
);
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import { FormBuilder } from '@dxos/cli-util';
|
|
6
|
+
import { Entity } from '@dxos/echo';
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Pretty prints an object with ANSI colors.
|
|
10
|
+
*/
|
|
11
|
+
export const printObject = (obj: Entity.Unknown) => {
|
|
12
|
+
const typename = Entity.getTypename(obj) ?? '<unknown>';
|
|
13
|
+
|
|
14
|
+
// TODO(wittjosiah): Obj.getSchema and thus Obj.getLabel are coming back undefined for some reason.
|
|
15
|
+
return FormBuilder.make({ title: Entity.getLabel(obj) ?? typename }).pipe(
|
|
16
|
+
FormBuilder.set('id', obj.id),
|
|
17
|
+
FormBuilder.set('typename', typename),
|
|
18
|
+
FormBuilder.build,
|
|
19
|
+
);
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Pretty prints object stats with ANSI colors.
|
|
24
|
+
*/
|
|
25
|
+
export const printStats = (typename: string, count: number) =>
|
|
26
|
+
FormBuilder.make({ title: typename }).pipe(FormBuilder.set('count', count), FormBuilder.build);
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Pretty prints object removal result with ANSI colors.
|
|
30
|
+
*/
|
|
31
|
+
export const printObjectRemoved = (count: number) =>
|
|
32
|
+
FormBuilder.make({ title: 'Objects removed' }).pipe(FormBuilder.set('count', count), FormBuilder.build);
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import * as Command from '@effect/cli/Command';
|
|
6
|
+
|
|
7
|
+
import { query } from './query';
|
|
8
|
+
|
|
9
|
+
export const queue = Command.make('queue').pipe(
|
|
10
|
+
Command.withDescription('Manage queues.'),
|
|
11
|
+
Command.withSubcommands([query]),
|
|
12
|
+
);
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import * as Command from '@effect/cli/Command';
|
|
6
|
+
import * as Options from '@effect/cli/Options';
|
|
7
|
+
import * as Console from 'effect/Console';
|
|
8
|
+
import * as Effect from 'effect/Effect';
|
|
9
|
+
import * as Schema from 'effect/Schema';
|
|
10
|
+
|
|
11
|
+
import { CommandConfig, printList } from '@dxos/cli-util';
|
|
12
|
+
import { ClientService } from '@dxos/client';
|
|
13
|
+
import { type Queue } from '@dxos/client/echo';
|
|
14
|
+
import { DXN } from '@dxos/keys';
|
|
15
|
+
|
|
16
|
+
import { printQueueObject } from './util';
|
|
17
|
+
|
|
18
|
+
// TODO(dmaretskyi): Extract
|
|
19
|
+
const DXNSchema = Schema.String.pipe(
|
|
20
|
+
Schema.transform(Schema.instanceOf(DXN), {
|
|
21
|
+
decode: (value: string) => DXN.parse(value),
|
|
22
|
+
encode: (value: DXN) => value.toString(),
|
|
23
|
+
}),
|
|
24
|
+
);
|
|
25
|
+
|
|
26
|
+
export const query = Command.make(
|
|
27
|
+
'query',
|
|
28
|
+
{
|
|
29
|
+
dxn: Options.text('dxn').pipe(Options.withDescription('DXN of the queue.'), Options.withSchema(DXNSchema)),
|
|
30
|
+
},
|
|
31
|
+
Effect.fnUntraced(function* ({ dxn }) {
|
|
32
|
+
const { json } = yield* CommandConfig;
|
|
33
|
+
const client = yield* ClientService;
|
|
34
|
+
const queue = (yield* Effect.promise(() => client.graph.createRefResolver({}).resolve(dxn))) as Queue<any>;
|
|
35
|
+
const objects = yield* Effect.promise(() => queue.queryObjects());
|
|
36
|
+
|
|
37
|
+
if (json) {
|
|
38
|
+
yield* Console.log(JSON.stringify(objects, null, 2));
|
|
39
|
+
} else {
|
|
40
|
+
// TODO(wittjosiah): Interactive table of results.
|
|
41
|
+
const formatted = objects.map(printQueueObject);
|
|
42
|
+
yield* Console.log(printList(formatted));
|
|
43
|
+
}
|
|
44
|
+
}),
|
|
45
|
+
).pipe(Command.withDescription('Query objects in a queue.'));
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import { FormBuilder } from '@dxos/cli-util';
|
|
6
|
+
import { Entity } from '@dxos/echo';
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Pretty prints a queue object with ANSI colors.
|
|
10
|
+
*/
|
|
11
|
+
export const printQueueObject = (obj: Entity.Any) => {
|
|
12
|
+
const typename = Entity.getTypename(obj) ?? '<unknown>';
|
|
13
|
+
|
|
14
|
+
return FormBuilder.make({ title: typename }).pipe(
|
|
15
|
+
FormBuilder.set('id', obj.id),
|
|
16
|
+
FormBuilder.set('typename', typename),
|
|
17
|
+
FormBuilder.build,
|
|
18
|
+
);
|
|
19
|
+
};
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import * as Command from '@effect/cli/Command';
|
|
6
|
+
import * as Options from '@effect/cli/Options';
|
|
7
|
+
import * as Console from 'effect/Console';
|
|
8
|
+
import * as Effect from 'effect/Effect';
|
|
9
|
+
|
|
10
|
+
import { CommandConfig, Common, getSpace, waitForSync } from '@dxos/cli-util';
|
|
11
|
+
import { ClientService } from '@dxos/client';
|
|
12
|
+
import { type Key } from '@dxos/echo';
|
|
13
|
+
|
|
14
|
+
export const handler = ({ spaceId }: { spaceId: Key.SpaceId }) =>
|
|
15
|
+
Effect.gen(function* () {
|
|
16
|
+
const { json } = yield* CommandConfig;
|
|
17
|
+
const client = yield* ClientService;
|
|
18
|
+
|
|
19
|
+
const space = yield* getSpace(spaceId);
|
|
20
|
+
|
|
21
|
+
// Flush and sync before closing
|
|
22
|
+
yield* Effect.tryPromise(() => space.db.flush({ indexes: true }));
|
|
23
|
+
yield* waitForSync(space);
|
|
24
|
+
|
|
25
|
+
yield* Effect.tryPromise(() => space.close());
|
|
26
|
+
|
|
27
|
+
if (json) {
|
|
28
|
+
yield* Console.log(JSON.stringify({ success: true, spaceId }, null, 2));
|
|
29
|
+
} else {
|
|
30
|
+
yield* Console.log(`Space ${spaceId} closed successfully.`);
|
|
31
|
+
}
|
|
32
|
+
});
|
|
33
|
+
|
|
34
|
+
export const close = Command.make(
|
|
35
|
+
'close',
|
|
36
|
+
{
|
|
37
|
+
spaceId: Common.spaceId.pipe(Options.withDescription('Space ID to close.')),
|
|
38
|
+
},
|
|
39
|
+
handler,
|
|
40
|
+
).pipe(Command.withDescription('Close a space.'));
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import { describe, expect, it } from '@effect/vitest';
|
|
6
|
+
import * as Effect from 'effect/Effect';
|
|
7
|
+
import * as Option from 'effect/Option';
|
|
8
|
+
|
|
9
|
+
import { TestConsole, TestLayer } from '@dxos/cli-util/testing';
|
|
10
|
+
import { ClientService } from '@dxos/client';
|
|
11
|
+
import { runAndForwardErrors } from '@dxos/effect';
|
|
12
|
+
|
|
13
|
+
import { handler } from './create';
|
|
14
|
+
|
|
15
|
+
describe('space create', () => {
|
|
16
|
+
it('should create a space without a name', () =>
|
|
17
|
+
Effect.gen(function* () {
|
|
18
|
+
const client = yield* ClientService;
|
|
19
|
+
yield* Effect.tryPromise(() => client.halo.createIdentity());
|
|
20
|
+
const logger = yield* TestConsole.TestConsole;
|
|
21
|
+
// Catch timeout errors from sync, but still check output
|
|
22
|
+
yield* handler({ name: Option.none() }).pipe(Effect.catchAll(() => Effect.void));
|
|
23
|
+
const logs = logger.logs;
|
|
24
|
+
// Find the JSON output (should be logged before sync)
|
|
25
|
+
// log.args is an array, so we need to check the first element
|
|
26
|
+
const jsonLog = logs.find((log) => {
|
|
27
|
+
if (log.level === 'log' && Array.isArray(log.args) && log.args.length > 0) {
|
|
28
|
+
const firstArg = String(log.args[0]);
|
|
29
|
+
return firstArg.trim().startsWith('{');
|
|
30
|
+
}
|
|
31
|
+
return false;
|
|
32
|
+
});
|
|
33
|
+
expect(jsonLog).toBeDefined();
|
|
34
|
+
if (jsonLog && Array.isArray(jsonLog.args) && jsonLog.args.length > 0) {
|
|
35
|
+
const parsed = JSON.parse(String(jsonLog.args[0]));
|
|
36
|
+
expect(parsed).toHaveProperty('key');
|
|
37
|
+
expect(typeof parsed.key).toBe('string');
|
|
38
|
+
// name might be undefined and omitted from JSON, which is fine
|
|
39
|
+
}
|
|
40
|
+
expect(client.spaces.get().length).toBeGreaterThan(0);
|
|
41
|
+
}).pipe(Effect.provide(TestLayer), Effect.scoped, runAndForwardErrors));
|
|
42
|
+
|
|
43
|
+
it('should create a space with a name', () =>
|
|
44
|
+
Effect.gen(function* () {
|
|
45
|
+
const client = yield* ClientService;
|
|
46
|
+
yield* Effect.tryPromise(() => client.halo.createIdentity());
|
|
47
|
+
const logger = yield* TestConsole.TestConsole;
|
|
48
|
+
// Catch timeout errors from sync, but still check output
|
|
49
|
+
yield* handler({ name: Option.some('Test Space') }).pipe(Effect.catchAll(() => Effect.void));
|
|
50
|
+
const logs = logger.logs;
|
|
51
|
+
// Find the JSON output (should be logged before sync)
|
|
52
|
+
// log.args is an array, so we need to check the first element
|
|
53
|
+
const jsonLog = logs.find((log) => {
|
|
54
|
+
if (log.level === 'log' && Array.isArray(log.args) && log.args.length > 0) {
|
|
55
|
+
const firstArg = String(log.args[0]);
|
|
56
|
+
return firstArg.trim().startsWith('{');
|
|
57
|
+
}
|
|
58
|
+
return false;
|
|
59
|
+
});
|
|
60
|
+
expect(jsonLog).toBeDefined();
|
|
61
|
+
if (jsonLog && Array.isArray(jsonLog.args) && jsonLog.args.length > 0) {
|
|
62
|
+
const parsed = JSON.parse(String(jsonLog.args[0]));
|
|
63
|
+
expect(parsed).toHaveProperty('key');
|
|
64
|
+
expect(parsed).toHaveProperty('name', 'Test Space');
|
|
65
|
+
}
|
|
66
|
+
}).pipe(Effect.provide(TestLayer), Effect.scoped, runAndForwardErrors));
|
|
67
|
+
});
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import * as Command from '@effect/cli/Command';
|
|
6
|
+
import * as Options from '@effect/cli/Options';
|
|
7
|
+
import * as Console from 'effect/Console';
|
|
8
|
+
import * as Effect from 'effect/Effect';
|
|
9
|
+
import * as Option from 'effect/Option';
|
|
10
|
+
|
|
11
|
+
import { CommandConfig } from '@dxos/cli-util';
|
|
12
|
+
import { print, waitForSync } from '@dxos/cli-util';
|
|
13
|
+
import { FormBuilder } from '@dxos/cli-util';
|
|
14
|
+
import { ClientService } from '@dxos/client';
|
|
15
|
+
import { Obj } from '@dxos/echo';
|
|
16
|
+
|
|
17
|
+
export const handler = Effect.fn(function* ({ name }: { name: Option.Option<string> }) {
|
|
18
|
+
const { json } = yield* CommandConfig;
|
|
19
|
+
const client = yield* ClientService;
|
|
20
|
+
|
|
21
|
+
const space = yield* Effect.tryPromise(() => client.spaces.create());
|
|
22
|
+
yield* Effect.tryPromise(() => space.waitUntilReady());
|
|
23
|
+
|
|
24
|
+
if (Option.isSome(name)) {
|
|
25
|
+
Obj.change(space.properties, (p) => {
|
|
26
|
+
p.name = Option.getOrUndefined(name);
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
// Output first, then flush and sync
|
|
31
|
+
if (json) {
|
|
32
|
+
yield* Console.log(
|
|
33
|
+
JSON.stringify(
|
|
34
|
+
{
|
|
35
|
+
key: space.key.toHex(),
|
|
36
|
+
...(space.properties.name ? { name: space.properties.name } : {}),
|
|
37
|
+
},
|
|
38
|
+
null,
|
|
39
|
+
2,
|
|
40
|
+
),
|
|
41
|
+
);
|
|
42
|
+
} else {
|
|
43
|
+
const builder = FormBuilder.make({ title: 'Created Space' }).pipe(
|
|
44
|
+
FormBuilder.set('key', space.key.truncate()),
|
|
45
|
+
FormBuilder.set('name', space.properties.name ?? '<none>'),
|
|
46
|
+
);
|
|
47
|
+
yield* Console.log(print(FormBuilder.build(builder)));
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
// Flush and sync before completion
|
|
51
|
+
yield* Effect.tryPromise(() => space.db.flush({ indexes: true }));
|
|
52
|
+
yield* waitForSync(space);
|
|
53
|
+
});
|
|
54
|
+
|
|
55
|
+
export const create = Command.make(
|
|
56
|
+
'create',
|
|
57
|
+
{
|
|
58
|
+
name: Options.text('name').pipe(Options.withDescription('The name of the space.'), Options.optional),
|
|
59
|
+
},
|
|
60
|
+
handler,
|
|
61
|
+
).pipe(Command.withDescription('Create a new space.'));
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import * as Command from '@effect/cli/Command';
|
|
6
|
+
|
|
7
|
+
import { close } from './close';
|
|
8
|
+
import { create } from './create';
|
|
9
|
+
import { info } from './info';
|
|
10
|
+
import { join } from './join';
|
|
11
|
+
import { list } from './list';
|
|
12
|
+
import { members } from './members';
|
|
13
|
+
import { open } from './open';
|
|
14
|
+
import { schema } from './schema';
|
|
15
|
+
import { share } from './share';
|
|
16
|
+
import { sync } from './sync';
|
|
17
|
+
|
|
18
|
+
export const space = Command.make('space').pipe(
|
|
19
|
+
Command.withDescription('Manage ECHO spaces.'),
|
|
20
|
+
Command.withSubcommands([close, create, info, join, list, members, open, schema, share, sync]),
|
|
21
|
+
);
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import { describe, expect, it } from '@effect/vitest';
|
|
6
|
+
import * as Effect from 'effect/Effect';
|
|
7
|
+
import * as Option from 'effect/Option';
|
|
8
|
+
|
|
9
|
+
import { TestConsole, TestLayer } from '@dxos/cli-util/testing';
|
|
10
|
+
import { ClientService } from '@dxos/client';
|
|
11
|
+
import { runAndForwardErrors } from '@dxos/effect';
|
|
12
|
+
|
|
13
|
+
import { handler } from './info';
|
|
14
|
+
|
|
15
|
+
describe('space info', () => {
|
|
16
|
+
it('should show space info', () =>
|
|
17
|
+
Effect.gen(function* () {
|
|
18
|
+
const client = yield* ClientService;
|
|
19
|
+
yield* Effect.tryPromise(() => client.halo.createIdentity());
|
|
20
|
+
const space = yield* Effect.tryPromise(() => client.spaces.create());
|
|
21
|
+
yield* Effect.tryPromise(() => space.waitUntilReady());
|
|
22
|
+
yield* handler({ spaceId: Option.some(space.id) });
|
|
23
|
+
const logger = yield* TestConsole.TestConsole;
|
|
24
|
+
const logs = logger.logs;
|
|
25
|
+
expect(logs).toHaveLength(1);
|
|
26
|
+
const parsed = TestConsole.parseJson<{ id: string; state: string; key: string }>(logs[0]);
|
|
27
|
+
expect(parsed).toHaveProperty('id');
|
|
28
|
+
expect(parsed).toHaveProperty('state');
|
|
29
|
+
expect(parsed).toHaveProperty('key');
|
|
30
|
+
expect(parsed.id).toBe(space.id);
|
|
31
|
+
}).pipe(Effect.provide(TestLayer), Effect.scoped, runAndForwardErrors));
|
|
32
|
+
|
|
33
|
+
it('should show default space info when spaceId is not provided', () =>
|
|
34
|
+
Effect.gen(function* () {
|
|
35
|
+
const client = yield* ClientService;
|
|
36
|
+
yield* Effect.tryPromise(() => client.halo.createIdentity());
|
|
37
|
+
yield* Effect.tryPromise(() => client.spaces.waitUntilReady());
|
|
38
|
+
yield* handler({ spaceId: Option.none() });
|
|
39
|
+
const logger = yield* TestConsole.TestConsole;
|
|
40
|
+
const logs = logger.logs;
|
|
41
|
+
expect(logs).toHaveLength(1);
|
|
42
|
+
const parsed = TestConsole.parseJson<{ id: string; state: string; key: string }>(logs[0]);
|
|
43
|
+
expect(parsed).toHaveProperty('id');
|
|
44
|
+
expect(parsed).toHaveProperty('state');
|
|
45
|
+
expect(parsed).toHaveProperty('key');
|
|
46
|
+
}).pipe(Effect.provide(TestLayer), Effect.scoped, runAndForwardErrors));
|
|
47
|
+
});
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import * as Command from '@effect/cli/Command';
|
|
6
|
+
import * as Options from '@effect/cli/Options';
|
|
7
|
+
import * as Console from 'effect/Console';
|
|
8
|
+
import * as Effect from 'effect/Effect';
|
|
9
|
+
import type * as Option from 'effect/Option';
|
|
10
|
+
|
|
11
|
+
import { CommandConfig, Common, formatSpace, getSpace, print, printSpace, spaceIdWithDefault } from '@dxos/cli-util';
|
|
12
|
+
import { ClientService } from '@dxos/client';
|
|
13
|
+
import { type Key } from '@dxos/echo';
|
|
14
|
+
|
|
15
|
+
export const handler = Effect.fn(function* ({ spaceId }: { spaceId: Option.Option<string> }) {
|
|
16
|
+
const { json } = yield* CommandConfig;
|
|
17
|
+
const client = yield* ClientService;
|
|
18
|
+
|
|
19
|
+
const resolvedSpaceId = yield* spaceIdWithDefault(spaceId as Option.Option<Key.SpaceId>);
|
|
20
|
+
const space = yield* getSpace(resolvedSpaceId);
|
|
21
|
+
|
|
22
|
+
const formatted = yield* formatSpace(space);
|
|
23
|
+
|
|
24
|
+
if (json) {
|
|
25
|
+
yield* Console.log(JSON.stringify(formatted, null, 2));
|
|
26
|
+
} else {
|
|
27
|
+
yield* Console.log(print(printSpace(formatted)));
|
|
28
|
+
}
|
|
29
|
+
});
|
|
30
|
+
|
|
31
|
+
export const info = Command.make(
|
|
32
|
+
'info',
|
|
33
|
+
{
|
|
34
|
+
spaceId: Common.spaceId.pipe(Options.optional),
|
|
35
|
+
},
|
|
36
|
+
handler,
|
|
37
|
+
).pipe(Command.withDescription('Show space info.'));
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import * as Args from '@effect/cli/Args';
|
|
6
|
+
import * as Command from '@effect/cli/Command';
|
|
7
|
+
import * as Options from '@effect/cli/Options';
|
|
8
|
+
import * as Prompt from '@effect/cli/Prompt';
|
|
9
|
+
import * as Console from 'effect/Console';
|
|
10
|
+
import * as Duration from 'effect/Duration';
|
|
11
|
+
import * as Effect from 'effect/Effect';
|
|
12
|
+
import * as Option from 'effect/Option';
|
|
13
|
+
|
|
14
|
+
import { CommandConfig } from '@dxos/cli-util';
|
|
15
|
+
import { print, waitForSync } from '@dxos/cli-util';
|
|
16
|
+
import { FormBuilder } from '@dxos/cli-util';
|
|
17
|
+
import { ClientService } from '@dxos/client';
|
|
18
|
+
|
|
19
|
+
import { acceptInvitation } from './util';
|
|
20
|
+
|
|
21
|
+
export const handler = Effect.fn(function* ({
|
|
22
|
+
invitationCode,
|
|
23
|
+
authCode,
|
|
24
|
+
}: {
|
|
25
|
+
invitationCode: string;
|
|
26
|
+
authCode: Option.Option<string>;
|
|
27
|
+
}) {
|
|
28
|
+
const { json } = yield* CommandConfig;
|
|
29
|
+
const client = yield* ClientService;
|
|
30
|
+
|
|
31
|
+
let encoded = invitationCode;
|
|
32
|
+
if (encoded.startsWith('http') || encoded.startsWith('socket')) {
|
|
33
|
+
const searchProps = new URL(encoded).searchParams;
|
|
34
|
+
encoded = searchProps.get('spaceInvitationCode') ?? encoded;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
const invitation = yield* acceptInvitation({
|
|
38
|
+
observable: client.spaces.join(encoded),
|
|
39
|
+
callbacks: {
|
|
40
|
+
onReadyForAuth: (invitation) => {
|
|
41
|
+
if (Option.isSome(authCode)) {
|
|
42
|
+
return Effect.succeed(Option.getOrUndefined(authCode) ?? undefined) as Effect.Effect<
|
|
43
|
+
string | void,
|
|
44
|
+
never,
|
|
45
|
+
never
|
|
46
|
+
>;
|
|
47
|
+
}
|
|
48
|
+
return Prompt.text({ message: 'Enter the authentication code' })
|
|
49
|
+
.pipe(Prompt.run)
|
|
50
|
+
.pipe(Effect.mapError(() => undefined as never))
|
|
51
|
+
.pipe(Effect.catchAll(() => Effect.succeed(undefined))) as Effect.Effect<string | void, never, never>;
|
|
52
|
+
},
|
|
53
|
+
},
|
|
54
|
+
});
|
|
55
|
+
|
|
56
|
+
// Wait for space to be available with retry logic
|
|
57
|
+
const spaceKey = invitation.spaceKey;
|
|
58
|
+
if (!spaceKey) {
|
|
59
|
+
if (json) {
|
|
60
|
+
yield* Console.log(JSON.stringify({ error: 'No space key in invitation' }, null, 2));
|
|
61
|
+
} else {
|
|
62
|
+
yield* Console.log('No space key in invitation.');
|
|
63
|
+
}
|
|
64
|
+
return;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
let space = client.spaces.get(spaceKey);
|
|
68
|
+
if (!space) {
|
|
69
|
+
// Retry up to 5 times with increasing delays
|
|
70
|
+
const maxRetries = 5;
|
|
71
|
+
const retryDelays = [0.5, 1, 1.5, 2, 2.5].map((s) => Duration.seconds(s));
|
|
72
|
+
for (let i = 0; i < maxRetries; i++) {
|
|
73
|
+
yield* Effect.sleep(retryDelays[i]);
|
|
74
|
+
space = client.spaces.get(spaceKey);
|
|
75
|
+
if (space) {
|
|
76
|
+
break;
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
if (!space) {
|
|
82
|
+
if (json) {
|
|
83
|
+
yield* Console.log(JSON.stringify({ error: 'Space not found after joining' }, null, 2));
|
|
84
|
+
} else {
|
|
85
|
+
yield* Console.log('Space not found after joining.');
|
|
86
|
+
}
|
|
87
|
+
return;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
// Flush and sync after joining
|
|
91
|
+
yield* Effect.tryPromise(() => space.db.flush({ indexes: true }));
|
|
92
|
+
yield* waitForSync(space);
|
|
93
|
+
|
|
94
|
+
if (json) {
|
|
95
|
+
yield* Console.log(
|
|
96
|
+
JSON.stringify(
|
|
97
|
+
{
|
|
98
|
+
spaceId: space.id,
|
|
99
|
+
state: space.state.get(),
|
|
100
|
+
},
|
|
101
|
+
null,
|
|
102
|
+
2,
|
|
103
|
+
),
|
|
104
|
+
);
|
|
105
|
+
} else {
|
|
106
|
+
const builder = FormBuilder.make({ title: 'Joined Space' }).pipe(
|
|
107
|
+
FormBuilder.set('spaceId', space.id),
|
|
108
|
+
FormBuilder.set('key', space.key.truncate()),
|
|
109
|
+
FormBuilder.set('name', space.properties.name ?? '<none>'),
|
|
110
|
+
);
|
|
111
|
+
yield* Console.log(print(FormBuilder.build(builder)));
|
|
112
|
+
}
|
|
113
|
+
});
|
|
114
|
+
|
|
115
|
+
export const join = Command.make(
|
|
116
|
+
'join',
|
|
117
|
+
{
|
|
118
|
+
invitationCode: Args.text({ name: 'invitationCode' }).pipe(Args.withDescription('The invitation code.')),
|
|
119
|
+
authCode: Options.text('authCode').pipe(Options.withDescription('The authentication code.'), Options.optional),
|
|
120
|
+
},
|
|
121
|
+
handler,
|
|
122
|
+
).pipe(Command.withDescription('Join a space via invitation.'));
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import * as Effect from 'effect/Effect';
|
|
6
|
+
import * as Queue from 'effect/Queue';
|
|
7
|
+
|
|
8
|
+
import { type AuthenticatingInvitationObservable, Invitation } from '@dxos/client/invitations';
|
|
9
|
+
import { runAndForwardErrors } from '@dxos/effect';
|
|
10
|
+
import { invariant } from '@dxos/invariant';
|
|
11
|
+
import { AlreadyJoinedError } from '@dxos/protocols';
|
|
12
|
+
|
|
13
|
+
type AcceptInvitationProps = {
|
|
14
|
+
observable: AuthenticatingInvitationObservable;
|
|
15
|
+
callbacks?: {
|
|
16
|
+
onConnecting?: (invitation: Invitation) => Effect.Effect<void>;
|
|
17
|
+
onReadyForAuth?: (invitation: Invitation) => Effect.Effect<string | void, never, never>;
|
|
18
|
+
onSuccess?: (invitation: Invitation) => Effect.Effect<void>;
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Accept an invitation and handle authentication flow.
|
|
24
|
+
* Ported from cli-base to Effect-based approach.
|
|
25
|
+
*/
|
|
26
|
+
export const acceptInvitation = ({ observable, callbacks }: AcceptInvitationProps): Effect.Effect<Invitation, Error> =>
|
|
27
|
+
Effect.gen(function* () {
|
|
28
|
+
const doneQueue = yield* Queue.unbounded<Invitation>();
|
|
29
|
+
|
|
30
|
+
const runCallback = (effect: Effect.Effect<void> | undefined) => {
|
|
31
|
+
if (effect) {
|
|
32
|
+
runAndForwardErrors(effect).catch(() => {
|
|
33
|
+
// Ignore callback errors
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
const subscription = observable.subscribe(
|
|
39
|
+
(invitation) => {
|
|
40
|
+
switch (invitation.state) {
|
|
41
|
+
case Invitation.State.CONNECTING: {
|
|
42
|
+
runCallback(callbacks?.onConnecting?.(invitation));
|
|
43
|
+
break;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
case Invitation.State.READY_FOR_AUTHENTICATION: {
|
|
47
|
+
if (invitation.authMethod === Invitation.AuthMethod.SHARED_SECRET) {
|
|
48
|
+
const callbackEffect = callbacks?.onReadyForAuth?.(invitation) ?? Effect.succeed(undefined);
|
|
49
|
+
Effect.gen(function* () {
|
|
50
|
+
const callbackResult = yield* callbackEffect;
|
|
51
|
+
const code = invitation.authCode ?? callbackResult;
|
|
52
|
+
invariant(code, 'No code provided');
|
|
53
|
+
yield* Effect.tryPromise(() => observable.authenticate(code));
|
|
54
|
+
})
|
|
55
|
+
.pipe(runAndForwardErrors)
|
|
56
|
+
.catch(() => {
|
|
57
|
+
// Error handling
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
break;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
case Invitation.State.SUCCESS: {
|
|
64
|
+
runCallback(callbacks?.onSuccess?.(invitation));
|
|
65
|
+
runAndForwardErrors(Queue.offer(doneQueue, invitation)).catch(() => {});
|
|
66
|
+
break;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
},
|
|
70
|
+
(err) => {
|
|
71
|
+
if (err instanceof AlreadyJoinedError) {
|
|
72
|
+
runAndForwardErrors(Queue.offer(doneQueue, observable.get())).catch(() => {});
|
|
73
|
+
return;
|
|
74
|
+
}
|
|
75
|
+
throw err;
|
|
76
|
+
},
|
|
77
|
+
);
|
|
78
|
+
|
|
79
|
+
const invitation = yield* Queue.take(doneQueue);
|
|
80
|
+
subscription.unsubscribe();
|
|
81
|
+
return invitation;
|
|
82
|
+
});
|