@dxos/app-framework 0.8.4-main.c85a9c8dae → 0.8.4-main.cb12b3f963
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/{capability-7RLVE42K.mjs → capability-5RRH3WIB.mjs} +11 -10
- package/dist/lib/browser/capability-5RRH3WIB.mjs.map +7 -0
- package/dist/lib/browser/{capability-2GL5JAGJ.mjs → capability-LUKGKUQH.mjs} +10 -9
- package/dist/lib/browser/{chunk-5RJNZV7K.mjs → chunk-23D4SJUE.mjs} +11 -13
- package/dist/lib/browser/{chunk-5RJNZV7K.mjs.map → chunk-23D4SJUE.mjs.map} +3 -3
- package/dist/lib/browser/{chunk-YNFPIQGB.mjs → chunk-3JWJXGLK.mjs} +5 -2
- package/dist/lib/browser/chunk-3JWJXGLK.mjs.map +7 -0
- package/dist/lib/browser/chunk-45CHLTBV.mjs +34 -0
- package/dist/lib/browser/chunk-45CHLTBV.mjs.map +7 -0
- package/dist/lib/browser/{chunk-PKQT6C53.mjs → chunk-66IXTIVK.mjs} +3 -2
- package/dist/lib/browser/chunk-66IXTIVK.mjs.map +7 -0
- package/dist/lib/browser/chunk-CZ4BIAHH.mjs +422 -0
- package/dist/lib/browser/chunk-CZ4BIAHH.mjs.map +7 -0
- package/dist/lib/browser/chunk-FJ4765WW.mjs +8 -0
- package/dist/lib/browser/{chunk-FHQTHCX7.mjs.map → chunk-FJ4765WW.mjs.map} +3 -3
- package/dist/lib/browser/chunk-FO3IYSLV.mjs +68 -0
- package/dist/lib/browser/chunk-FO3IYSLV.mjs.map +7 -0
- package/dist/lib/browser/chunk-MX5DKEJH.mjs +584 -0
- package/dist/lib/browser/chunk-MX5DKEJH.mjs.map +7 -0
- package/dist/lib/browser/chunk-NBXPP7JR.mjs +1174 -0
- package/dist/lib/browser/chunk-NBXPP7JR.mjs.map +7 -0
- package/dist/lib/browser/chunk-PC4NOADA.mjs +471 -0
- package/dist/lib/browser/chunk-PC4NOADA.mjs.map +7 -0
- package/dist/lib/browser/{chunk-REORGDJT.mjs → chunk-WBHCSOBW.mjs} +18 -18
- package/dist/lib/browser/chunk-WBHCSOBW.mjs.map +7 -0
- package/dist/lib/browser/{chunk-FNKT2QQ2.mjs → chunk-Z55LVAGN.mjs} +85 -17
- package/dist/lib/browser/chunk-Z55LVAGN.mjs.map +7 -0
- package/dist/lib/browser/{chunk-ZRWBPIZG.mjs → chunk-ZGJAZSNE.mjs} +9 -37
- package/dist/lib/browser/chunk-ZGJAZSNE.mjs.map +7 -0
- package/dist/lib/browser/cli/index.mjs +16 -29
- package/dist/lib/browser/cli/index.mjs.map +3 -3
- package/dist/lib/browser/common/activation-events.mjs +9 -8
- package/dist/lib/browser/common/capabilities.mjs +9 -8
- package/dist/lib/browser/core/activation-event.mjs +1 -1
- package/dist/lib/browser/core/capability.mjs +3 -1
- package/dist/lib/browser/core/plugin-manager.mjs +8 -4
- package/dist/lib/browser/core/plugin.mjs +14 -4
- package/dist/lib/browser/core/url-loader.mjs +24 -0
- package/dist/lib/browser/index.mjs +37 -22
- package/dist/lib/browser/index.mjs.map +3 -3
- package/dist/lib/browser/{invoker-capability-BNLVNYHU.mjs → invoker-capability-K4GHUFXF.mjs} +22 -14
- package/dist/lib/browser/invoker-capability-K4GHUFXF.mjs.map +7 -0
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/testing/index.mjs +184 -49
- package/dist/lib/browser/testing/index.mjs.map +4 -4
- package/dist/lib/browser/testing/react.mjs +78 -0
- package/dist/lib/browser/testing/react.mjs.map +7 -0
- package/dist/lib/browser/ui/index.mjs +18 -15
- package/dist/lib/node-esm/{capability-CHIMU6LX.mjs → capability-FCGZVIEG.mjs} +10 -9
- package/dist/lib/{browser/capability-2GL5JAGJ.mjs.map → node-esm/capability-FCGZVIEG.mjs.map} +1 -1
- package/dist/lib/node-esm/{capability-EVZK4REM.mjs → capability-JOIQ2MQE.mjs} +11 -10
- package/dist/lib/node-esm/capability-JOIQ2MQE.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-UEWJDI2L.mjs → chunk-37Z53PXZ.mjs} +2 -2
- package/dist/lib/node-esm/{chunk-UEWJDI2L.mjs.map → chunk-37Z53PXZ.mjs.map} +3 -3
- package/dist/lib/node-esm/chunk-42J2ZUQQ.mjs +472 -0
- package/dist/lib/node-esm/chunk-42J2ZUQQ.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-6XW6LET6.mjs +35 -0
- package/dist/lib/node-esm/chunk-6XW6LET6.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-2A4PRBIX.mjs → chunk-D347W3KO.mjs} +9 -37
- package/dist/lib/node-esm/chunk-D347W3KO.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-CJCQS2YL.mjs → chunk-HTBJU5FX.mjs} +85 -17
- package/dist/lib/node-esm/chunk-HTBJU5FX.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-M3HKPRPO.mjs +423 -0
- package/dist/lib/node-esm/chunk-M3HKPRPO.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-MUVUQC3G.mjs +1175 -0
- package/dist/lib/node-esm/chunk-MUVUQC3G.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-VUIUFIGT.mjs → chunk-SBS2YMPT.mjs} +11 -13
- package/dist/lib/node-esm/{chunk-VUIUFIGT.mjs.map → chunk-SBS2YMPT.mjs.map} +3 -3
- package/dist/lib/node-esm/{chunk-SB5ODNPX.mjs → chunk-SDJ4B2LU.mjs} +5 -2
- package/dist/lib/node-esm/chunk-SDJ4B2LU.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-UFW652GS.mjs → chunk-WFSRZKBP.mjs} +18 -18
- package/dist/lib/node-esm/chunk-WFSRZKBP.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-WK7OIQKI.mjs +70 -0
- package/dist/lib/node-esm/chunk-WK7OIQKI.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-WKTLE7MG.mjs +585 -0
- package/dist/lib/node-esm/chunk-WKTLE7MG.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-7OWSHPYK.mjs → chunk-XOCUANHO.mjs} +3 -2
- package/dist/lib/node-esm/chunk-XOCUANHO.mjs.map +7 -0
- package/dist/lib/node-esm/cli/index.mjs +16 -29
- package/dist/lib/node-esm/cli/index.mjs.map +3 -3
- package/dist/lib/node-esm/common/activation-events.mjs +9 -8
- package/dist/lib/node-esm/common/capabilities.mjs +9 -8
- package/dist/lib/node-esm/core/activation-event.mjs +1 -1
- package/dist/lib/node-esm/core/capability.mjs +3 -1
- package/dist/lib/node-esm/core/plugin-manager.mjs +8 -4
- package/dist/lib/node-esm/core/plugin.mjs +14 -4
- package/dist/lib/node-esm/core/url-loader.mjs +25 -0
- package/dist/lib/node-esm/index.mjs +37 -22
- package/dist/lib/node-esm/index.mjs.map +3 -3
- package/dist/lib/node-esm/{invoker-capability-VF6SP44V.mjs → invoker-capability-XEPW5LMJ.mjs} +22 -14
- package/dist/lib/node-esm/invoker-capability-XEPW5LMJ.mjs.map +7 -0
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/testing/index.mjs +184 -49
- package/dist/lib/node-esm/testing/index.mjs.map +4 -4
- package/dist/lib/node-esm/testing/react.mjs +79 -0
- package/dist/lib/node-esm/testing/react.mjs.map +7 -0
- package/dist/lib/node-esm/ui/index.mjs +18 -15
- package/dist/plugin/node-esm/index.mjs +875 -0
- package/dist/plugin/node-esm/index.mjs.map +7 -0
- package/dist/plugin/node-esm/meta.json +1 -0
- package/dist/types/src/common/activation-events.d.ts +1 -1
- package/dist/types/src/common/activation-events.d.ts.map +1 -1
- package/dist/types/src/common/annotations.d.ts +1 -0
- package/dist/types/src/common/annotations.d.ts.map +1 -0
- package/dist/types/src/common/capabilities.d.ts +4 -8
- package/dist/types/src/common/capabilities.d.ts.map +1 -1
- package/dist/types/src/common/operations.d.ts +8 -22
- package/dist/types/src/common/operations.d.ts.map +1 -1
- package/dist/types/src/core/activation-event.d.ts +5 -5
- package/dist/types/src/core/activation-event.d.ts.map +1 -1
- package/dist/types/src/core/capability-manager.d.ts +5 -0
- package/dist/types/src/core/capability-manager.d.ts.map +1 -1
- package/dist/types/src/core/capability.d.ts +8 -2
- package/dist/types/src/core/capability.d.ts.map +1 -1
- package/dist/types/src/core/edge-registry-plugin-provider.d.ts +30 -0
- package/dist/types/src/core/edge-registry-plugin-provider.d.ts.map +1 -0
- package/dist/types/src/core/index.d.ts +6 -0
- package/dist/types/src/core/index.d.ts.map +1 -1
- package/dist/types/src/core/plugin-asset-cache.d.ts +71 -0
- package/dist/types/src/core/plugin-asset-cache.d.ts.map +1 -0
- package/dist/types/src/core/plugin-manager.d.ts +177 -4
- package/dist/types/src/core/plugin-manager.d.ts.map +1 -1
- package/dist/types/src/core/plugin-manifest.d.ts +101 -0
- package/dist/types/src/core/plugin-manifest.d.ts.map +1 -0
- package/dist/types/src/core/plugin-manifest.test.d.ts +2 -0
- package/dist/types/src/core/plugin-manifest.test.d.ts.map +1 -0
- package/dist/types/src/core/plugin.d.ts +113 -7
- package/dist/types/src/core/plugin.d.ts.map +1 -1
- package/dist/types/src/core/registry.d.ts +101 -0
- package/dist/types/src/core/registry.d.ts.map +1 -0
- package/dist/types/src/core/url-loader.d.ts +127 -0
- package/dist/types/src/core/url-loader.d.ts.map +1 -0
- package/dist/types/src/core/url-loader.test.d.ts +2 -0
- package/dist/types/src/core/url-loader.test.d.ts.map +1 -0
- package/dist/types/src/helpers.d.ts.map +1 -1
- package/dist/types/src/plugin-operation/OperationPlugin.d.ts.map +1 -1
- package/dist/types/src/plugin-operation/history/capability.d.ts.map +1 -1
- package/dist/types/src/plugin-operation/history/errors.d.ts +30 -3
- package/dist/types/src/plugin-operation/history/errors.d.ts.map +1 -1
- package/dist/types/src/plugin-operation/history/history-tracker.d.ts +1 -1
- package/dist/types/src/plugin-operation/history/history-tracker.d.ts.map +1 -1
- package/dist/types/src/plugin-operation/history/types.d.ts +1 -1
- package/dist/types/src/plugin-operation/history/types.d.ts.map +1 -1
- package/dist/types/src/plugin-operation/history/undo-mapping.d.ts +1 -1
- package/dist/types/src/plugin-operation/history/undo-mapping.d.ts.map +1 -1
- package/dist/types/src/plugin-operation/history/undo-registry.d.ts +1 -1
- package/dist/types/src/plugin-operation/history/undo-registry.d.ts.map +1 -1
- package/dist/types/src/plugin-operation/invoker-capability.d.ts +1 -1
- package/dist/types/src/plugin-operation/invoker-capability.d.ts.map +1 -1
- package/dist/types/src/plugin-operation/testing.d.ts +27 -77
- package/dist/types/src/plugin-operation/testing.d.ts.map +1 -1
- package/dist/types/src/plugin-runtime/RuntimePlugin.d.ts.map +1 -1
- package/dist/types/src/plugin-runtime/capability.d.ts +1 -1
- package/dist/types/src/plugin-runtime/capability.d.ts.map +1 -1
- package/dist/types/src/testing/harness.d.ts +67 -0
- package/dist/types/src/testing/harness.d.ts.map +1 -0
- package/dist/types/src/testing/index.d.ts +1 -0
- package/dist/types/src/testing/index.d.ts.map +1 -1
- package/dist/types/src/testing/react.d.ts +27 -0
- package/dist/types/src/testing/react.d.ts.map +1 -0
- package/dist/types/src/testing/react.test.d.ts +2 -0
- package/dist/types/src/testing/react.test.d.ts.map +1 -0
- package/dist/types/src/testing/service.d.ts.map +1 -1
- package/dist/types/src/testing/withPluginManager.d.ts.map +1 -1
- package/dist/types/src/testing/withPluginManager.stories.d.ts.map +1 -1
- package/dist/types/src/ui/components/App/App.d.ts +3 -2
- package/dist/types/src/ui/components/App/App.d.ts.map +1 -1
- package/dist/types/src/ui/components/App/App.stories.d.ts +2 -2
- package/dist/types/src/ui/components/App/App.stories.d.ts.map +1 -1
- package/dist/types/src/ui/components/Placeholder/Placeholder.d.ts +64 -0
- package/dist/types/src/ui/components/Placeholder/Placeholder.d.ts.map +1 -0
- package/dist/types/src/ui/components/Placeholder/Placeholder.stories.d.ts +19 -0
- package/dist/types/src/ui/components/Placeholder/Placeholder.stories.d.ts.map +1 -0
- package/dist/types/src/ui/components/Placeholder/index.d.ts +2 -0
- package/dist/types/src/ui/components/Placeholder/index.d.ts.map +1 -0
- package/dist/types/src/ui/components/PluginManager/PluginManagerContext.stories.d.ts.map +1 -1
- package/dist/types/src/ui/components/Surface/SurfaceComponent.d.ts +16 -4
- package/dist/types/src/ui/components/Surface/SurfaceComponent.d.ts.map +1 -1
- package/dist/types/src/ui/components/Surface/SurfaceComponent.stories.d.ts.map +1 -1
- package/dist/types/src/ui/components/Surface/SurfaceProfilerContext.d.ts +48 -0
- package/dist/types/src/ui/components/Surface/SurfaceProfilerContext.d.ts.map +1 -0
- package/dist/types/src/ui/components/Surface/index.d.ts +22 -6
- package/dist/types/src/ui/components/Surface/index.d.ts.map +1 -1
- package/dist/types/src/ui/components/Surface/types.d.ts +110 -9
- package/dist/types/src/ui/components/Surface/types.d.ts.map +1 -1
- package/dist/types/src/ui/components/Surface/types.test.d.ts +2 -0
- package/dist/types/src/ui/components/Surface/types.test.d.ts.map +1 -0
- package/dist/types/src/ui/components/index.d.ts +1 -0
- package/dist/types/src/ui/components/index.d.ts.map +1 -1
- package/dist/types/src/ui/hooks/index.d.ts +0 -1
- package/dist/types/src/ui/hooks/index.d.ts.map +1 -1
- package/dist/types/src/ui/hooks/useApp.d.ts +43 -4
- package/dist/types/src/ui/hooks/useApp.d.ts.map +1 -1
- package/dist/types/src/ui/hooks/useApp.test.d.ts +2 -0
- package/dist/types/src/ui/hooks/useApp.test.d.ts.map +1 -0
- package/dist/types/src/ui/hooks/useCapabilities.d.ts.map +1 -1
- package/dist/types/src/ui/hooks/useLoading.d.ts.map +1 -1
- package/dist/types/src/ui/hooks/useSettingsState.d.ts.map +1 -1
- package/dist/types/src/vite-plugin/boot-loader/BootLoader.stories.d.ts +34 -0
- package/dist/types/src/vite-plugin/boot-loader/BootLoader.stories.d.ts.map +1 -0
- package/dist/types/src/vite-plugin/boot-loader/index.d.ts +52 -0
- package/dist/types/src/vite-plugin/boot-loader/index.d.ts.map +1 -0
- package/dist/types/src/vite-plugin/composer/index.d.ts +34 -0
- package/dist/types/src/vite-plugin/composer/index.d.ts.map +1 -0
- package/dist/types/src/vite-plugin/import-map/index.d.ts +28 -0
- package/dist/types/src/vite-plugin/import-map/index.d.ts.map +1 -0
- package/dist/types/src/vite-plugin/index.d.ts +5 -0
- package/dist/types/src/vite-plugin/index.d.ts.map +1 -0
- package/dist/types/src/vite-plugin/manifest.d.ts +41 -0
- package/dist/types/src/vite-plugin/manifest.d.ts.map +1 -0
- package/dist/types/src/vite-plugin/manifest.test.d.ts +2 -0
- package/dist/types/src/vite-plugin/manifest.test.d.ts.map +1 -0
- package/dist/types/src/vite-plugin/packages.d.ts +13 -0
- package/dist/types/src/vite-plugin/packages.d.ts.map +1 -0
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/moon.yml +15 -0
- package/package.json +48 -53
- package/src/cli/cli.ts +3 -3
- package/src/common/activation-events.ts +6 -6
- package/src/common/annotations.ts +3 -0
- package/src/common/capabilities.ts +18 -23
- package/src/common/operations.ts +7 -10
- package/src/context.ts +1 -1
- package/src/core/activation-event.ts +5 -2
- package/src/core/capability-manager.test.ts +1 -1
- package/src/core/capability-manager.ts +22 -1
- package/src/core/capability.ts +13 -2
- package/src/core/edge-registry-plugin-provider.ts +92 -0
- package/src/core/index.ts +6 -0
- package/src/core/plugin-asset-cache.ts +60 -0
- package/src/core/plugin-manager.test.ts +855 -29
- package/src/core/plugin-manager.ts +808 -188
- package/src/core/plugin-manifest.test.ts +75 -0
- package/src/core/plugin-manifest.ts +134 -0
- package/src/core/plugin.ts +144 -12
- package/src/core/registry.ts +157 -0
- package/src/core/url-loader.test.ts +221 -0
- package/src/core/url-loader.ts +388 -0
- package/src/plugin-operation/OperationPlugin.ts +2 -3
- package/src/plugin-operation/history/capability.ts +1 -2
- package/src/plugin-operation/history/errors.ts +2 -6
- package/src/plugin-operation/history/history-tracker.test.ts +37 -43
- package/src/plugin-operation/history/history-tracker.ts +1 -2
- package/src/plugin-operation/history/types.ts +1 -1
- package/src/plugin-operation/history/undo-mapping.ts +1 -1
- package/src/plugin-operation/history/undo-registry.test.ts +3 -4
- package/src/plugin-operation/history/undo-registry.ts +1 -1
- package/src/plugin-operation/invoker-capability.ts +19 -4
- package/src/plugin-operation/meta.ts +1 -1
- package/src/plugin-operation/testing.ts +26 -45
- package/src/plugin-runtime/RuntimePlugin.ts +2 -3
- package/src/plugin-runtime/meta.ts +1 -1
- package/src/testing/harness.ts +229 -0
- package/src/testing/index.ts +1 -0
- package/src/testing/react.test.tsx +48 -0
- package/src/testing/react.tsx +113 -0
- package/src/testing/service.ts +3 -3
- package/src/testing/withPluginManager.stories.tsx +1 -2
- package/src/testing/withPluginManager.tsx +40 -18
- package/src/ui/components/App/App.stories.tsx +5 -5
- package/src/ui/components/App/App.tsx +29 -5
- package/src/ui/components/Placeholder/Placeholder.stories.tsx +77 -0
- package/src/ui/components/Placeholder/Placeholder.tsx +155 -0
- package/src/ui/components/Placeholder/index.ts +5 -0
- package/src/ui/components/PluginManager/PluginManagerContext.stories.tsx +8 -6
- package/src/ui/components/Surface/SurfaceComponent.stories.tsx +16 -15
- package/src/ui/components/Surface/SurfaceComponent.tsx +109 -53
- package/src/ui/components/Surface/SurfaceProfilerContext.tsx +207 -0
- package/src/ui/components/Surface/index.ts +35 -1
- package/src/ui/components/Surface/types.test.ts +126 -0
- package/src/ui/components/Surface/types.ts +164 -12
- package/src/ui/components/index.ts +1 -0
- package/src/ui/hooks/index.ts +0 -1
- package/src/ui/hooks/useApp.test.tsx +159 -0
- package/src/ui/hooks/useApp.tsx +226 -15
- package/src/ui/hooks/useLoading.tsx +14 -6
- package/src/vite-plugin/boot-loader/BootLoader.stories.tsx +263 -0
- package/src/vite-plugin/boot-loader/boot-loader.css +294 -0
- package/src/vite-plugin/boot-loader/boot-loader.js +274 -0
- package/src/vite-plugin/boot-loader/index.ts +112 -0
- package/src/vite-plugin/composer/index.ts +306 -0
- package/src/vite-plugin/import-map/index.ts +524 -0
- package/src/vite-plugin/index.ts +10 -0
- package/src/vite-plugin/manifest.test.ts +46 -0
- package/src/vite-plugin/manifest.ts +57 -0
- package/src/vite-plugin/packages.ts +188 -0
- package/tsconfig.json +19 -1
- package/tsconfig.node.json +1 -1
- package/vitest.config.ts +1 -1
- package/.swc/plugins/linux_x86_64_19.0.0/727453fb3a62f7f1d952a41e051ca8a6f88cadc45cee43c6a4d1aa45f9b75665.wasmer-v7 +0 -0
- package/dist/lib/browser/capability-7RLVE42K.mjs.map +0 -7
- package/dist/lib/browser/chunk-4CTRO67U.mjs +0 -703
- package/dist/lib/browser/chunk-4CTRO67U.mjs.map +0 -7
- package/dist/lib/browser/chunk-FHQTHCX7.mjs +0 -8
- package/dist/lib/browser/chunk-FNKT2QQ2.mjs.map +0 -7
- package/dist/lib/browser/chunk-HE27PNNQ.mjs +0 -824
- package/dist/lib/browser/chunk-HE27PNNQ.mjs.map +0 -7
- package/dist/lib/browser/chunk-NPUEVX42.mjs +0 -34
- package/dist/lib/browser/chunk-NPUEVX42.mjs.map +0 -7
- package/dist/lib/browser/chunk-PKQT6C53.mjs.map +0 -7
- package/dist/lib/browser/chunk-REORGDJT.mjs.map +0 -7
- package/dist/lib/browser/chunk-YAFEA4GV.mjs +0 -1
- package/dist/lib/browser/chunk-YNFPIQGB.mjs.map +0 -7
- package/dist/lib/browser/chunk-ZRWBPIZG.mjs.map +0 -7
- package/dist/lib/browser/invoker-capability-BNLVNYHU.mjs.map +0 -7
- package/dist/lib/node-esm/capability-EVZK4REM.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-2A4PRBIX.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-7CPNAEGV.mjs +0 -704
- package/dist/lib/node-esm/chunk-7CPNAEGV.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-7OWSHPYK.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-CJCQS2YL.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-DTCHT2X2.mjs +0 -825
- package/dist/lib/node-esm/chunk-DTCHT2X2.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-JAZVHID3.mjs +0 -35
- package/dist/lib/node-esm/chunk-JAZVHID3.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-SB5ODNPX.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-UFW652GS.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-Z4TJPSMP.mjs +0 -2
- package/dist/lib/node-esm/invoker-capability-VF6SP44V.mjs.map +0 -7
- package/dist/types/src/ui/hooks/useOperationResolver.d.ts +0 -19
- package/dist/types/src/ui/hooks/useOperationResolver.d.ts.map +0 -1
- package/src/ui/hooks/useOperationResolver.ts +0 -40
- /package/dist/lib/{node-esm/capability-CHIMU6LX.mjs.map → browser/capability-LUKGKUQH.mjs.map} +0 -0
- /package/dist/lib/browser/{chunk-YAFEA4GV.mjs.map → core/url-loader.mjs.map} +0 -0
- /package/dist/lib/node-esm/{chunk-Z4TJPSMP.mjs.map → core/url-loader.mjs.map} +0 -0
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
import { Atom, type Registry as AtomRegistry } from '@effect-atom/atom-react';
|
|
2
|
+
import * as Effect from 'effect/Effect';
|
|
3
|
+
/**
|
|
4
|
+
* A registry plugin entry as seen by the plugin manager layer.
|
|
5
|
+
* Populated from the registry catalog; represents the latest available version of a plugin.
|
|
6
|
+
*
|
|
7
|
+
* Independently defined from @dxos/protocols PluginEntry — similar shape but not the same type.
|
|
8
|
+
* Implementations of {@link PluginProvider} (e.g. {@link EdgeRegistryPluginProvider})
|
|
9
|
+
* are responsible for mapping their wire-format entries to this shape.
|
|
10
|
+
*/
|
|
11
|
+
export type Plugin = {
|
|
12
|
+
id: string;
|
|
13
|
+
name: string;
|
|
14
|
+
description?: string;
|
|
15
|
+
homePage?: string;
|
|
16
|
+
source?: string;
|
|
17
|
+
screenshots?: string[];
|
|
18
|
+
tags?: string[];
|
|
19
|
+
icon?: string;
|
|
20
|
+
iconHue?: string;
|
|
21
|
+
/** URL to dynamic-import the latest version of this plugin module. */
|
|
22
|
+
moduleUrl: string;
|
|
23
|
+
/** GitHub repository slug, e.g. `owner/name`. Used to fetch version history. */
|
|
24
|
+
repo: string;
|
|
25
|
+
/**
|
|
26
|
+
* Latest known version string, e.g. `v1.2.0`.
|
|
27
|
+
* Corresponds to releaseTag in the wire-format PluginEntry; named `version` here
|
|
28
|
+
* because the plugin manager layer speaks versions, not release tags.
|
|
29
|
+
*/
|
|
30
|
+
version: string;
|
|
31
|
+
};
|
|
32
|
+
/**
|
|
33
|
+
* A single installable version of a registry plugin.
|
|
34
|
+
*/
|
|
35
|
+
export type PluginVersion = {
|
|
36
|
+
/** Version string, e.g. `v1.2.0`. */
|
|
37
|
+
tag: string;
|
|
38
|
+
/** URL to dynamic-import this specific version of the plugin module. */
|
|
39
|
+
moduleUrl: string;
|
|
40
|
+
/** Unix ms of when this version was published (optional; omitted when unknown). */
|
|
41
|
+
releasedAt?: number;
|
|
42
|
+
};
|
|
43
|
+
/**
|
|
44
|
+
* Abstraction over the plugin registry catalog backend.
|
|
45
|
+
* Implementations may call Edge, a local cache, or a stub.
|
|
46
|
+
*
|
|
47
|
+
* The interface itself is transport-agnostic; concrete implementations live
|
|
48
|
+
* alongside it in this package (see {@link EdgeRegistryPluginProvider}) so we
|
|
49
|
+
* avoid `app-framework ↔ edge-client` cycles, but they only need to satisfy
|
|
50
|
+
* this shape — callers can substitute their own.
|
|
51
|
+
*/
|
|
52
|
+
export interface PluginProvider {
|
|
53
|
+
/**
|
|
54
|
+
* Returns all healthy registry plugins (latest version of each).
|
|
55
|
+
*/
|
|
56
|
+
listPlugins(): Effect.Effect<readonly Plugin[], Error>;
|
|
57
|
+
/**
|
|
58
|
+
* Returns all known versions of a plugin identified by its GitHub repo slug.
|
|
59
|
+
* Until the backend implements a versions endpoint, implementations MUST
|
|
60
|
+
* return at least one entry representing the current/latest release.
|
|
61
|
+
*/
|
|
62
|
+
listVersions(repo: string): Effect.Effect<readonly PluginVersion[], Error>;
|
|
63
|
+
/**
|
|
64
|
+
* Returns a single plugin entry for the given repo.
|
|
65
|
+
* If `version` is omitted, returns the latest.
|
|
66
|
+
* Fails if the specified version is not found.
|
|
67
|
+
*/
|
|
68
|
+
getPlugin(repo: string, version?: string): Effect.Effect<Plugin, Error>;
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* Atomic snapshot of the registry catalog as observed by the host.
|
|
72
|
+
* Exposed via {@link Manager.plugins} so consumers can subscribe reactively
|
|
73
|
+
* (loading state, list contents, last error).
|
|
74
|
+
*/
|
|
75
|
+
export type PluginsState = {
|
|
76
|
+
entries: readonly Plugin[];
|
|
77
|
+
loading: boolean;
|
|
78
|
+
error: Error | null;
|
|
79
|
+
};
|
|
80
|
+
/**
|
|
81
|
+
* Owns the cached registry catalog state and forwards `listVersions` / `getPlugin`
|
|
82
|
+
* calls to the underlying {@link PluginProvider}. Lives on the `PluginManager`
|
|
83
|
+
* (as `manager.pluginRegistry`) so consumers can reach it through the manager
|
|
84
|
+
* without a separate capability lookup.
|
|
85
|
+
*
|
|
86
|
+
* On construction the manager kicks off a background fetch via `provider.listPlugins()`
|
|
87
|
+
* and writes the result into the {@link plugins} atom. Subscribers see `loading: true`
|
|
88
|
+
* during the fetch and `loading: false` once it settles.
|
|
89
|
+
*/
|
|
90
|
+
export declare class Manager {
|
|
91
|
+
#private;
|
|
92
|
+
readonly plugins: Atom.Writable<PluginsState>;
|
|
93
|
+
constructor(provider: PluginProvider | undefined, atomRegistry: AtomRegistry.Registry);
|
|
94
|
+
/** Forwards to the underlying provider. */
|
|
95
|
+
listPlugins(): Effect.Effect<readonly Plugin[], Error>;
|
|
96
|
+
/** Forwards to the underlying provider. */
|
|
97
|
+
listVersions(repo: string): Effect.Effect<readonly PluginVersion[], Error>;
|
|
98
|
+
/** Forwards to the underlying provider. */
|
|
99
|
+
getPlugin(repo: string, version?: string): Effect.Effect<Plugin, Error>;
|
|
100
|
+
}
|
|
101
|
+
//# sourceMappingURL=registry.d.ts.map
|
|
@@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IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;CACzE;AAED;;;;GAIG;AACH,MAAM,MAAM,YAAY,GAAG;IACzB,OAAO,EAAE,SAAS,MAAM,EAAE,CAAC;IAC3B,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,EAAE,KAAK,GAAG,IAAI,CAAC;CACrB,CAAC;AAgBF;;;;;;;;;GASG;AACH,qBAAa,OAAO;;IAClB,QAAQ,CAAC,OAAO,EAAE,IAAI,CAAC,QAAQ,CAAC,YAAY,CAAC,CAAC;IAG9C,YAAY,QAAQ,EAAE,cAAc,GAAG,SAAS,EAAE,YAAY,EAAE,YAAY,CAAC,QAAQ,EAmBpF;IAED,2CAA2C;IAC3C,WAAW,IAAI,MAAM,CAAC,MAAM,CAAC,SAAS,MAAM,EAAE,EAAE,KAAK,CAAC,CAErD;IAED,2CAA2C;IAC3C,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC,SAAS,aAAa,EAAE,EAAE,KAAK,CAAC,CAEzE;IAED,2CAA2C;IAC3C,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,CAEtE;CACF"}
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
import * as Effect from 'effect/Effect';
|
|
2
|
+
import { BaseError } from '@dxos/errors';
|
|
3
|
+
import * as Plugin from './plugin';
|
|
4
|
+
import * as PluginAssetCache from './plugin-asset-cache';
|
|
5
|
+
declare const RemotePluginLoadError_base: {
|
|
6
|
+
new (options?: import("@dxos/errors").BaseErrorOptions): {
|
|
7
|
+
cause?: unknown;
|
|
8
|
+
stack?: string;
|
|
9
|
+
name: "RemotePluginLoadError";
|
|
10
|
+
context: Record<string, unknown>;
|
|
11
|
+
readonly message: string;
|
|
12
|
+
readonly _tag: "RemotePluginLoadError";
|
|
13
|
+
};
|
|
14
|
+
isError(error: unknown): error is Error;
|
|
15
|
+
name: "RemotePluginLoadError";
|
|
16
|
+
is(error: unknown): error is BaseError;
|
|
17
|
+
wrap(options?: Omit<import("@dxos/errors").BaseErrorOptions, 'cause'> & {
|
|
18
|
+
ifTypeDiffers?: boolean;
|
|
19
|
+
}): (error: unknown) => {
|
|
20
|
+
cause?: unknown;
|
|
21
|
+
stack?: string;
|
|
22
|
+
name: "RemotePluginLoadError";
|
|
23
|
+
context: Record<string, unknown>;
|
|
24
|
+
readonly message: string;
|
|
25
|
+
readonly _tag: "RemotePluginLoadError";
|
|
26
|
+
};
|
|
27
|
+
extend<Name extends string = string>(name: Name, message?: string): any;
|
|
28
|
+
captureStackTrace(targetObject: object, constructorOpt?: Function): void;
|
|
29
|
+
prepareStackTrace?: ((err: Error, stackTraces: NodeJS.CallSite[]) => any) | undefined;
|
|
30
|
+
stackTraceLimit: number;
|
|
31
|
+
};
|
|
32
|
+
/**
|
|
33
|
+
* Tagged error for any failure during remote plugin loading. Construction sites
|
|
34
|
+
* set `context.locator` and `context.reason` (one of `'invalid-locator' |
|
|
35
|
+
* 'manifest-error' | 'cache-error' | 'import-failed' | 'meta-missing' |
|
|
36
|
+
* 'meta-mismatch' | 'duplicate-id'`) so handlers can route on the failure mode.
|
|
37
|
+
*/
|
|
38
|
+
export declare class RemotePluginLoadError extends RemotePluginLoadError_base {
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Abstraction over key-value storage (defaults to localStorage).
|
|
42
|
+
*/
|
|
43
|
+
export type Storage = {
|
|
44
|
+
get(key: string): string | null;
|
|
45
|
+
set(key: string, value: string): void;
|
|
46
|
+
};
|
|
47
|
+
/**
|
|
48
|
+
* Options for configuring the URL loader.
|
|
49
|
+
*/
|
|
50
|
+
export type Options = {
|
|
51
|
+
storage?: Storage;
|
|
52
|
+
key?: string;
|
|
53
|
+
/**
|
|
54
|
+
* Per-platform offline asset cache. Defaults to a no-op cache (no offline support).
|
|
55
|
+
*/
|
|
56
|
+
cache?: PluginAssetCache.Cache;
|
|
57
|
+
};
|
|
58
|
+
/**
|
|
59
|
+
* Options for the preload entry point. Adds an optional progress hook so hosts
|
|
60
|
+
* can drive a boot-loader counter (`Loading plugins (3/12)…`) as remote plugin
|
|
61
|
+
* manifests resolve. Resolution order is *not* deterministic — each entry races
|
|
62
|
+
* its own network fetch — so callers should treat `loaded` as a count, not an
|
|
63
|
+
* index. Failures are still swallowed; `loaded` advances on both success and
|
|
64
|
+
* recoverable failure so the counter always reaches `total`.
|
|
65
|
+
*/
|
|
66
|
+
export type PreloadOptions = Options & {
|
|
67
|
+
onPluginLoaded?: (loaded: number, total: number) => void;
|
|
68
|
+
};
|
|
69
|
+
/**
|
|
70
|
+
* Persisted record of a remote plugin that has been loaded previously.
|
|
71
|
+
*
|
|
72
|
+
* `url` is the URL of the plugin manifest (`plugin.json`), not the entry module.
|
|
73
|
+
*/
|
|
74
|
+
export type RemotePluginEntry = {
|
|
75
|
+
id: string;
|
|
76
|
+
url: string;
|
|
77
|
+
/** Installed version string, e.g. `v1.0.0`. Populated after install from a community catalog entry. */
|
|
78
|
+
version?: string;
|
|
79
|
+
};
|
|
80
|
+
/**
|
|
81
|
+
* Returns true when the URL's hostname is the local host (localhost, 127.0.0.1, or ::1).
|
|
82
|
+
*/
|
|
83
|
+
export declare const isLocalUrl: (locator: string) => boolean;
|
|
84
|
+
/**
|
|
85
|
+
* Returns the list of remote plugin entries previously persisted by {@link make}.
|
|
86
|
+
* Useful for UI code that needs to know which loaded plugins were installed from a URL
|
|
87
|
+
* (e.g. to surface a tag on remote or localhost-hosted plugins).
|
|
88
|
+
*/
|
|
89
|
+
export declare const getRemoteEntries: (options?: Options) => readonly RemotePluginEntry[];
|
|
90
|
+
/**
|
|
91
|
+
* Updates the persisted installed version for an already-stored remote plugin entry.
|
|
92
|
+
* Does nothing if the plugin has not been persisted yet.
|
|
93
|
+
*/
|
|
94
|
+
export declare const setInstalledVersion: (id: string, version: string, options?: Options) => void;
|
|
95
|
+
/**
|
|
96
|
+
* Returns the installed version string for the given plugin id, or `undefined` if
|
|
97
|
+
* the plugin was installed without version tracking (legacy install) or is not found.
|
|
98
|
+
*/
|
|
99
|
+
export declare const getInstalledVersion: (id: string, options?: Options) => string | undefined;
|
|
100
|
+
/**
|
|
101
|
+
* Preloads previously persisted remote plugins from storage. Per-entry failures
|
|
102
|
+
* are logged and swallowed — the returned effect always succeeds with whichever
|
|
103
|
+
* plugins loaded cleanly, so a single bad entry can't block the host's startup.
|
|
104
|
+
*/
|
|
105
|
+
export declare const preload: (options?: PreloadOptions) => Effect.Effect<Plugin.Plugin[], never>;
|
|
106
|
+
/**
|
|
107
|
+
* Creates a plugin loader that resolves built-in plugins by ID or loads remote plugins from URLs.
|
|
108
|
+
*
|
|
109
|
+
* Remote URLs must point at a plugin manifest (`plugin.json`). The loader fetches the manifest,
|
|
110
|
+
* eagerly persists every declared asset via the configured `PluginAssetCache`, then dynamic-imports
|
|
111
|
+
* the entry module.
|
|
112
|
+
*/
|
|
113
|
+
export declare const make: (builtinPlugins: Plugin.Plugin[], options?: Options) => (locator: string) => Effect.Effect<{
|
|
114
|
+
plugin: Plugin.Plugin;
|
|
115
|
+
dev?: boolean;
|
|
116
|
+
}, RemotePluginLoadError>;
|
|
117
|
+
/**
|
|
118
|
+
* Removes a previously installed remote plugin: drops the persisted entry, evicts cached
|
|
119
|
+
* assets, and removes any stylesheet `<link>` tags that {@link loadFromManifest} appended.
|
|
120
|
+
*
|
|
121
|
+
* Cache eviction failures are logged and swallowed — the persisted entry has already been
|
|
122
|
+
* dropped so the user-visible state is consistent regardless of whether the platform
|
|
123
|
+
* cache cooperated.
|
|
124
|
+
*/
|
|
125
|
+
export declare const uninstall: (pluginId: string, options?: Options) => Effect.Effect<void, never>;
|
|
126
|
+
export {};
|
|
127
|
+
//# sourceMappingURL=url-loader.d.ts.map
|
|
@@ -0,0 +1 @@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lF,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,mBAAmB,OAAQ,MAAM,WAAW,MAAM,YAAW,OAAO,KAAQ,IAcxF,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,mBAAmB,OAAQ,MAAM,YAAW,OAAO,KAAQ,MAAM,GAAG,SAIhF,CAAC;AA2GF;;;;GAIG;AACH,eAAO,MAAM,OAAO,aAAa,cAAc,KAAQ,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,EAAE,EAAE,KAAK,CA2CvF,CAAC;AAEL;;;;;;GAMG;AACH,eAAO,MAAM,IAAI,mBAAoB,MAAM,CAAC,MAAM,EAAE,YAAW,OAAO,eAKnD,MAAM,KAAG,MAAM,CAAC,MAAM,CAAC;IAAE,MAAM,EAAE,MAAM,CAAC,MAAM,CAAC;IAAC,GAAG,CAAC,EAAE,OAAO,CAAA;CAAE,EAAE,qBAAqB,CA0BxG,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,SAAS,aAAc,MAAM,YAAW,OAAO,KAAQ,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,KAAK,CAczF,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"url-loader.test.d.ts","sourceRoot":"","sources":["../../../../src/core/url-loader.test.ts"],"names":[],"mappings":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../../src/helpers.ts"],"names":[],"mappings":"AAIA,KAAK,cAAc,GAAG;IACpB,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,CAAC,EAAE,MAAM,EAAE,CAAC;CACtB,CAAC;AAEF;;GAEG;AAEH,eAAO,MAAM,eAAe,GAAI,CAAC,SAAS,cAAc,
|
|
1
|
+
{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../../src/helpers.ts"],"names":[],"mappings":"AAIA,KAAK,cAAc,GAAG;IACpB,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,CAAC,EAAE,MAAM,EAAE,CAAC;CACtB,CAAC;AAEF;;GAEG;AAEH,eAAO,MAAM,eAAe,GAAI,CAAC,SAAS,cAAc,SAAS,CAAC,EAAE,KAAG,CAAC,EA+BvE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OperationPlugin.d.ts","sourceRoot":"","sources":["../../../../src/plugin-operation/OperationPlugin.ts"],"names":[],"mappings":"AAKA,OAAO,EAAc,MAAM,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"OperationPlugin.d.ts","sourceRoot":"","sources":["../../../../src/plugin-operation/OperationPlugin.ts"],"names":[],"mappings":"AAKA,OAAO,EAAc,MAAM,EAAE,MAAM,SAAS,CAAC;AAM7C,eAAO,MAAM,eAAe,4BAY3B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"capability.d.ts","sourceRoot":"","sources":["../../../../../src/plugin-operation/history/capability.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAKxC,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"capability.d.ts","sourceRoot":"","sources":["../../../../../src/plugin-operation/history/capability.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAKxC,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AACxC,OAAO,KAAK,cAAc,MAAM,mBAAmB,CAAC;AACpD,OAAO,KAAK,YAAY,MAAM,iBAAiB,CAAC"}
|
|
@@ -1,5 +1,32 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import { BaseError } from '@dxos/errors';
|
|
2
|
+
declare const EmptyHistoryError_base: {
|
|
3
|
+
new (options?: import("@dxos/errors").BaseErrorOptions): {
|
|
4
|
+
cause?: unknown;
|
|
5
|
+
stack?: string;
|
|
6
|
+
name: "EmptyHistoryError";
|
|
7
|
+
context: Record<string, unknown>;
|
|
8
|
+
readonly message: string;
|
|
9
|
+
readonly _tag: "EmptyHistoryError";
|
|
10
|
+
};
|
|
11
|
+
isError(error: unknown): error is Error;
|
|
12
|
+
name: "EmptyHistoryError";
|
|
13
|
+
is(error: unknown): error is BaseError;
|
|
14
|
+
wrap(options?: Omit<import("@dxos/errors").BaseErrorOptions, 'cause'> & {
|
|
15
|
+
ifTypeDiffers?: boolean;
|
|
16
|
+
}): (error: unknown) => {
|
|
17
|
+
cause?: unknown;
|
|
18
|
+
stack?: string;
|
|
19
|
+
name: "EmptyHistoryError";
|
|
20
|
+
context: Record<string, unknown>;
|
|
21
|
+
readonly message: string;
|
|
22
|
+
readonly _tag: "EmptyHistoryError";
|
|
23
|
+
};
|
|
24
|
+
extend<Name extends string = string>(name: Name, message?: string): any;
|
|
25
|
+
captureStackTrace(targetObject: object, constructorOpt?: Function): void;
|
|
26
|
+
prepareStackTrace?: ((err: Error, stackTraces: NodeJS.CallSite[]) => any) | undefined;
|
|
27
|
+
stackTraceLimit: number;
|
|
28
|
+
};
|
|
29
|
+
export declare class EmptyHistoryError extends EmptyHistoryError_base {
|
|
4
30
|
}
|
|
31
|
+
export {};
|
|
5
32
|
//# sourceMappingURL=errors.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../../../../src/plugin-operation/history/errors.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../../../../src/plugin-operation/history/errors.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEzC,qBAAa,iBAAkB,SAAQ,sBAAuE;CAAG"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as Effect from 'effect/Effect';
|
|
2
|
-
import {
|
|
2
|
+
import { OperationInvoker } from '@dxos/operation';
|
|
3
3
|
import type { UndoRegistry } from './undo-registry';
|
|
4
4
|
/**
|
|
5
5
|
* HistoryTracker interface - tracks operation history and provides undo.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"history-tracker.d.ts","sourceRoot":"","sources":["../../../../../src/plugin-operation/history/history-tracker.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAKxC,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"history-tracker.d.ts","sourceRoot":"","sources":["../../../../../src/plugin-operation/history/history-tracker.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAKxC,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAMnD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAQpD;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,MAAM,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;IACvC,WAAW,EAAE,MAAM,OAAO,CAAC;QAAE,KAAK,CAAC,EAAE,KAAK,CAAA;KAAE,CAAC,CAAC;IAC9C,OAAO,EAAE,MAAM,OAAO,CAAC;CACxB;AAMD;;GAEG;AACH,eAAO,MAAM,IAAI,YACN,gBAAgB,CAAC,wBAAwB,gBACpC,YAAY,KACzB,cAqFF,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/plugin-operation/history/types.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/plugin-operation/history/types.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAE/C;;GAEG;AACH,MAAM,MAAM,YAAY,GAAG;IACzB,SAAS,EAAE,SAAS,CAAC,UAAU,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;IAC1C,KAAK,EAAE,GAAG,CAAC;IACX,MAAM,EAAE,GAAG,CAAC;IACZ,OAAO,EAAE,SAAS,CAAC,UAAU,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;IACxC,YAAY,EAAE,GAAG,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"undo-mapping.d.ts","sourceRoot":"","sources":["../../../../../src/plugin-operation/history/undo-mapping.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"undo-mapping.d.ts","sourceRoot":"","sources":["../../../../../src/plugin-operation/history/undo-mapping.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAE/C;;GAEG;AACH,KAAK,KAAK,GAAG,MAAM,GAAG,CAAC,MAAM,EAAE;IAAE,EAAE,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IAAC,YAAY,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC,CAAC;AAEtF;;GAEG;AACH,MAAM,MAAM,OAAO,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,CAAC,UAAU,CAAC,MAAM,CAAC,EAAE,GAAG,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC;AAElF;;GAEG;AACH,MAAM,MAAM,QAAQ,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,CAAC,UAAU,CAAC,GAAG,EAAE,MAAM,CAAC,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC;AAEnF;;;GAGG;AACH,MAAM,MAAM,eAAe,CAAC,EAAE,SAAS,SAAS,CAAC,UAAU,CAAC,GAAG,EAAE,GAAG,CAAC,IACjE,KAAK,GACL,CAAC,CAAC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CAAC,EAAE,eAAe,CAAC,EAAE,CAAC,CAAC;CAC/B;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,eAAO,MAAM,IAAI,GAAI,EAAE,SAAS,SAAS,CAAC,UAAU,CAAC,GAAG,EAAE,GAAG,CAAC,EAAE,GAAG,SAAS,SAAS,CAAC,UAAU,CAAC,GAAG,EAAE,GAAG,CAAC,SACjG,gBAAgB,CAAC,EAAE,EAAE,GAAG,CAAC,KAC/B,WAAW,CAAC,EAAE,EAAE,GAAG,CAAU,CAAC;AAEjC;;GAEG;AACH,eAAO,MAAM,cAAc,GAAI,EAAE,SAAS,SAAS,CAAC,UAAU,CAAC,GAAG,EAAE,GAAG,CAAC,WAC7D,eAAe,CAAC,EAAE,CAAC,GAAG,SAAS,SACjC,OAAO,CAAC,EAAE,CAAC,UACV,QAAQ,CAAC,EAAE,CAAC,KACnB,KAAK,GAAG,SAQV,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"undo-registry.d.ts","sourceRoot":"","sources":["../../../../../src/plugin-operation/history/undo-registry.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"undo-registry.d.ts","sourceRoot":"","sources":["../../../../../src/plugin-operation/history/undo-registry.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAE/C,OAAO,KAAK,KAAK,WAAW,MAAM,gBAAgB,CAAC;AAMnD;;GAEG;AACH,MAAM,MAAM,iBAAiB,GAAG;IAC9B,OAAO,EAAE,SAAS,CAAC,UAAU,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;IACxC,mEAAmE;IACnE,aAAa,EAAE,CAAC,KAAK,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,KAAK,GAAG,GAAG,SAAS,CAAC;IAC5D,8DAA8D;IAC9D,OAAO,CAAC,EAAE,WAAW,CAAC,eAAe,CAAC,SAAS,CAAC,UAAU,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC,CAAC;CACvE,CAAC;AAEF;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B,MAAM,EAAE,CAAC,SAAS,EAAE,SAAS,CAAC,UAAU,CAAC,GAAG,EAAE,GAAG,CAAC,KAAK,iBAAiB,GAAG,SAAS,CAAC;CACtF;AAMD;;GAEG;AACH,eAAO,MAAM,IAAI,gBAAiB,MAAM,WAAW,CAAC,WAAW,EAAE,KAAG,YAgBnE,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as Effect from 'effect/Effect';
|
|
2
2
|
import { OperationInvoker } from '@dxos/operation';
|
|
3
3
|
import { Capability, Plugin } from '../core';
|
|
4
|
-
declare const _default: (props: void) => Effect.Effect<Capability.Capability<Capability.InterfaceDef<OperationInvoker.OperationInvoker>>,
|
|
4
|
+
declare const _default: (props: void) => Effect.Effect<Capability.Capability<Capability.InterfaceDef<OperationInvoker.OperationInvoker>>, Error, Plugin.Service | Capability.Service>;
|
|
5
5
|
export default _default;
|
|
6
6
|
//# sourceMappingURL=invoker-capability.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"invoker-capability.d.ts","sourceRoot":"","sources":["../../../../src/plugin-operation/invoker-capability.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"invoker-capability.d.ts","sourceRoot":"","sources":["../../../../src/plugin-operation/invoker-capability.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAGxC,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAGnD,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC"}
|
|
@@ -1,90 +1,40 @@
|
|
|
1
1
|
import * as Effect from 'effect/Effect';
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
export declare const Compute:
|
|
5
|
-
readonly schema: {
|
|
6
|
-
readonly input: Schema.Struct<{
|
|
7
|
-
value: typeof Schema.Number;
|
|
8
|
-
}>;
|
|
9
|
-
readonly output: Schema.Struct<{
|
|
10
|
-
value: typeof Schema.Number;
|
|
11
|
-
}>;
|
|
12
|
-
};
|
|
13
|
-
readonly meta: {
|
|
14
|
-
readonly key: "test.compute";
|
|
15
|
-
};
|
|
16
|
-
}, "executionMode"> & import("effect/Pipeable").Pipeable & {
|
|
17
|
-
readonly executionMode: "sync" | "async";
|
|
18
|
-
};
|
|
19
|
-
export declare const HalveCompute: Omit<{
|
|
20
|
-
readonly schema: {
|
|
21
|
-
readonly input: Schema.Struct<{
|
|
22
|
-
value: typeof Schema.Number;
|
|
23
|
-
}>;
|
|
24
|
-
readonly output: Schema.Struct<{
|
|
25
|
-
value: typeof Schema.Number;
|
|
26
|
-
}>;
|
|
27
|
-
};
|
|
28
|
-
readonly meta: {
|
|
29
|
-
readonly key: "test.halve-compute";
|
|
30
|
-
};
|
|
31
|
-
}, "executionMode"> & import("effect/Pipeable").Pipeable & {
|
|
32
|
-
readonly executionMode: "sync" | "async";
|
|
33
|
-
};
|
|
34
|
-
export declare const ToString: Omit<{
|
|
35
|
-
readonly schema: {
|
|
36
|
-
readonly input: Schema.Struct<{
|
|
37
|
-
value: typeof Schema.Number;
|
|
38
|
-
}>;
|
|
39
|
-
readonly output: Schema.Struct<{
|
|
40
|
-
string: typeof Schema.String;
|
|
41
|
-
}>;
|
|
42
|
-
};
|
|
43
|
-
readonly meta: {
|
|
44
|
-
readonly key: "test.to-string";
|
|
45
|
-
};
|
|
46
|
-
}, "executionMode"> & import("effect/Pipeable").Pipeable & {
|
|
47
|
-
readonly executionMode: "sync" | "async";
|
|
48
|
-
};
|
|
49
|
-
export declare const Add: Omit<{
|
|
50
|
-
readonly schema: {
|
|
51
|
-
readonly input: Schema.Tuple2<typeof Schema.Number, typeof Schema.Number>;
|
|
52
|
-
readonly output: typeof Schema.Number;
|
|
53
|
-
};
|
|
54
|
-
readonly meta: {
|
|
55
|
-
readonly key: "test.add";
|
|
56
|
-
};
|
|
57
|
-
}, "executionMode"> & import("effect/Pipeable").Pipeable & {
|
|
58
|
-
readonly executionMode: "sync" | "async";
|
|
59
|
-
};
|
|
60
|
-
export declare const SideEffect: Omit<{
|
|
61
|
-
readonly schema: {
|
|
62
|
-
readonly input: typeof Schema.Void;
|
|
63
|
-
readonly output: typeof Schema.Void;
|
|
64
|
-
};
|
|
65
|
-
readonly meta: {
|
|
66
|
-
readonly key: "test.side-effect";
|
|
67
|
-
};
|
|
68
|
-
}, "executionMode"> & import("effect/Pipeable").Pipeable & {
|
|
69
|
-
readonly executionMode: "sync" | "async";
|
|
70
|
-
};
|
|
71
|
-
export declare const computeHandler: OperationResolver.OperationResolver<{
|
|
2
|
+
import { Operation } from '@dxos/compute';
|
|
3
|
+
import { OperationInvoker } from '@dxos/operation';
|
|
4
|
+
export declare const Compute: Operation.Definition<{
|
|
72
5
|
readonly value: number;
|
|
73
6
|
}, {
|
|
74
7
|
readonly value: number;
|
|
75
|
-
}, never
|
|
76
|
-
export declare const
|
|
8
|
+
}, never>;
|
|
9
|
+
export declare const HalveCompute: Operation.Definition<{
|
|
77
10
|
readonly value: number;
|
|
78
11
|
}, {
|
|
79
12
|
readonly value: number;
|
|
80
|
-
}, never
|
|
81
|
-
export declare const
|
|
13
|
+
}, never>;
|
|
14
|
+
export declare const ToString: Operation.Definition<{
|
|
82
15
|
readonly value: number;
|
|
83
16
|
}, {
|
|
84
17
|
readonly string: string;
|
|
85
|
-
}, never
|
|
86
|
-
export declare const
|
|
87
|
-
export declare const
|
|
18
|
+
}, never>;
|
|
19
|
+
export declare const Add: Operation.Definition<readonly [number, number], number, never>;
|
|
20
|
+
export declare const SideEffect: Operation.Definition<void, void, never>;
|
|
21
|
+
export declare const computeHandler: Operation.WithHandler<Operation.Definition<{
|
|
22
|
+
readonly value: number;
|
|
23
|
+
}, {
|
|
24
|
+
readonly value: number;
|
|
25
|
+
}, never>>;
|
|
26
|
+
export declare const halveComputeHandler: Operation.WithHandler<Operation.Definition<{
|
|
27
|
+
readonly value: number;
|
|
28
|
+
}, {
|
|
29
|
+
readonly value: number;
|
|
30
|
+
}, never>>;
|
|
31
|
+
export declare const toStringHandler: Operation.WithHandler<Operation.Definition<{
|
|
32
|
+
readonly value: number;
|
|
33
|
+
}, {
|
|
34
|
+
readonly string: string;
|
|
35
|
+
}, never>>;
|
|
36
|
+
export declare const addHandler: Operation.WithHandler<Operation.Definition<readonly [number, number], number, never>>;
|
|
37
|
+
export declare const sideEffectHandler: Operation.WithHandler<Operation.Definition<void, void, never>>;
|
|
88
38
|
/**
|
|
89
39
|
* Event collector for testing - provides deterministic event collection using Effect primitives.
|
|
90
40
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"testing.d.ts","sourceRoot":"","sources":["../../../../src/plugin-operation/testing.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"testing.d.ts","sourceRoot":"","sources":["../../../../src/plugin-operation/testing.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAMxC,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC1C,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAMnD,eAAO,MAAM,OAAO;;;;SAIlB,CAAC;AAEH,eAAO,MAAM,YAAY;;;;SAIvB,CAAC;AAEH,eAAO,MAAM,QAAQ;;;;SAInB,CAAC;AAEH,eAAO,MAAM,GAAG,gEAId,CAAC;AAEH,eAAO,MAAM,UAAU,yCAIrB,CAAC;AAMH,eAAO,MAAM,cAAc;;;;UAK1B,CAAC;AAEF,eAAO,MAAM,mBAAmB;;;;UAE/B,CAAC;AAEF,eAAO,MAAM,eAAe;;;;UAE3B,CAAC;AAEF,eAAO,MAAM,UAAU,uFAA0E,CAAC;AAElG,eAAO,MAAM,iBAAiB,gEAAqE,CAAC;AAMpG;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B,4BAA4B;IAC5B,QAAQ,CAAC,MAAM,EAAE,gBAAgB,CAAC,eAAe,EAAE,CAAC;IACpD,+CAA+C;IAC/C,aAAa,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;IACtD,uCAAuC;IACvC,OAAO,EAAE,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;CAC9B;AAED;;;GAGG;AACH,eAAO,MAAM,oBAAoB,YAAa,gBAAgB,CAAC,gBAAgB,KAAG,MAAM,CAAC,MAAM,CAAC,cAAc,CAoD1G,CAAC;AAEL;;;GAGG;AACH,eAAO,MAAM,SAAS,cAAe,MAAM,OAAO,KAAG,MAAM,CAAC,MAAM,CAAC,IAAI,CAKnE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RuntimePlugin.d.ts","sourceRoot":"","sources":["../../../../src/plugin-runtime/RuntimePlugin.ts"],"names":[],"mappings":"AAKA,OAAO,EAAc,MAAM,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"RuntimePlugin.d.ts","sourceRoot":"","sources":["../../../../src/plugin-runtime/RuntimePlugin.ts"],"names":[],"mappings":"AAKA,OAAO,EAAc,MAAM,EAAE,MAAM,SAAS,CAAC;AAK7C,eAAO,MAAM,aAAa,4BAQzB,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as Effect from 'effect/Effect';
|
|
2
2
|
import { Capabilities } from '../common';
|
|
3
3
|
import { Capability, Plugin } from '../core';
|
|
4
|
-
declare const _default: (props: void) => Effect.Effect<Capability.Capability<Capability.InterfaceDef<Capabilities.ManagedRuntime>>, Error,
|
|
4
|
+
declare const _default: (props: void) => Effect.Effect<Capability.Capability<Capability.InterfaceDef<Capabilities.ManagedRuntime>>, Error, Plugin.Service | Capability.Service>;
|
|
5
5
|
export default _default;
|
|
6
6
|
//# sourceMappingURL=capability.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"capability.d.ts","sourceRoot":"","sources":["../../../../src/plugin-runtime/capability.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAIxC,OAAO,EAAoB,YAAY,EAAE,MAAM,WAAW,CAAC;AAC3D,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC
|
|
1
|
+
{"version":3,"file":"capability.d.ts","sourceRoot":"","sources":["../../../../src/plugin-runtime/capability.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAIxC,OAAO,EAAoB,YAAY,EAAE,MAAM,WAAW,CAAC;AAC3D,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC"}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { type Registry } from '@effect-atom/atom-react';
|
|
2
|
+
import { type Operation } from '@dxos/compute';
|
|
3
|
+
import { ActivationEvent, type Capability, type CapabilityManager, type Plugin, PluginManager } from '../core';
|
|
4
|
+
export type TestAppOptions = {
|
|
5
|
+
/** Plugins to register. */
|
|
6
|
+
plugins: Plugin.Plugin[];
|
|
7
|
+
/** Plugin ids that are always enabled. Defaults to all provided plugin ids. */
|
|
8
|
+
core?: string[];
|
|
9
|
+
/** Plugin ids that are enabled by default in addition to core. */
|
|
10
|
+
enabled?: string[];
|
|
11
|
+
/** Additional activation events fired alongside SetupReactSurface. */
|
|
12
|
+
setupEvents?: ActivationEvent.ActivationEvent[];
|
|
13
|
+
/**
|
|
14
|
+
* Whether to automatically fire SetupReactSurface + Startup during setup.
|
|
15
|
+
* Defaults to true.
|
|
16
|
+
*/
|
|
17
|
+
autoStart?: boolean;
|
|
18
|
+
/**
|
|
19
|
+
* Whether to register the PluginManager + AtomRegistry framework capabilities.
|
|
20
|
+
* Defaults to true.
|
|
21
|
+
*/
|
|
22
|
+
registerFrameworkCapabilities?: boolean;
|
|
23
|
+
};
|
|
24
|
+
/**
|
|
25
|
+
* A running plugin manager plus helpers for driving it in tests.
|
|
26
|
+
*/
|
|
27
|
+
export interface TestHarness {
|
|
28
|
+
readonly manager: PluginManager.PluginManager;
|
|
29
|
+
readonly capabilities: CapabilityManager.CapabilityManager;
|
|
30
|
+
readonly registry: Registry.Registry;
|
|
31
|
+
/** Activate the given event. Equivalent to `manager.activate(event)`. */
|
|
32
|
+
fire(event: ActivationEvent.ActivationEvent | string): Promise<boolean>;
|
|
33
|
+
/** Re-activate all modules that were activated by the given event. */
|
|
34
|
+
reset(event: ActivationEvent.ActivationEvent | string): Promise<boolean>;
|
|
35
|
+
/** Returns the first contributed capability for the given interface. Throws if none are present. */
|
|
36
|
+
get<T>(iface: Capability.InterfaceDef<T>): T;
|
|
37
|
+
/** Returns all contributed capabilities for the given interface. */
|
|
38
|
+
getAll<T>(iface: Capability.InterfaceDef<T>): T[];
|
|
39
|
+
/** Waits until at least one capability is contributed for the given interface. */
|
|
40
|
+
waitForCapability<T>(iface: Capability.InterfaceDef<T>, opts?: {
|
|
41
|
+
timeout?: number;
|
|
42
|
+
}): Promise<T>;
|
|
43
|
+
/** Waits until the given activation event has completed. */
|
|
44
|
+
waitForEvent(event: ActivationEvent.ActivationEvent | string, opts?: {
|
|
45
|
+
timeout?: number;
|
|
46
|
+
}): Promise<void>;
|
|
47
|
+
/** Invokes an operation through the `Capabilities.OperationInvoker` capability. */
|
|
48
|
+
invoke<I, O>(op: Operation.Definition<I, O>, ...args: void extends I ? [input?: I] : [input: I]): Promise<O>;
|
|
49
|
+
enable(id: string): Promise<boolean>;
|
|
50
|
+
disable(id: string): Promise<boolean>;
|
|
51
|
+
/** Shuts down the underlying plugin manager. */
|
|
52
|
+
dispose(): Promise<void>;
|
|
53
|
+
/** Async-disposable support so tests can use `await using harness = ...`. */
|
|
54
|
+
[Symbol.asyncDispose](): Promise<void>;
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Creates a TestHarness with the same bootstrap sequence that `useApp` performs,
|
|
58
|
+
* minus the React provider tree.
|
|
59
|
+
*
|
|
60
|
+
* For Node-only tests, this is enough to fire activation events, read
|
|
61
|
+
* capabilities, and invoke operations.
|
|
62
|
+
*
|
|
63
|
+
* For React tests, pass the returned harness to `render` or `renderSurface`
|
|
64
|
+
* from `@dxos/app-framework/testing-react`.
|
|
65
|
+
*/
|
|
66
|
+
export declare const createTestApp: (opts: TestAppOptions) => Promise<TestHarness>;
|
|
67
|
+
//# sourceMappingURL=harness.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"harness.d.ts","sourceRoot":"","sources":["../../../../src/testing/harness.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AAMxD,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,eAAe,CAAC;AAK/C,OAAO,EAAE,eAAe,EAAE,KAAK,UAAU,EAAE,KAAK,iBAAiB,EAAE,KAAK,MAAM,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAE/G,MAAM,MAAM,cAAc,GAAG;IAC3B,2BAA2B;IAC3B,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,CAAC;IACzB,+EAA+E;IAC/E,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;IAChB,kEAAkE;IAClE,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB,sEAAsE;IACtE,WAAW,CAAC,EAAE,eAAe,CAAC,eAAe,EAAE,CAAC;IAChD;;;OAGG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;;OAGG;IACH,6BAA6B,CAAC,EAAE,OAAO,CAAC;CACzC,CAAC;AAEF;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B,QAAQ,CAAC,OAAO,EAAE,aAAa,CAAC,aAAa,CAAC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AAM,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IACrC,OAAO,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IAEtC,gDAAgD;IAChD,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IAEzB,6EAA6E;IAC7E,CAAC,MAAM,CAAC,YAAY,CAAC,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;CACxC;AAID;;;;;;;;;GASG;AACH,eAAO,MAAM,aAAa,SAAgB,cAAc,KAAG,OAAO,CAAC,WAAW,CAgD7E,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/testing/index.ts"],"names":[],"mappings":"AAIA,cAAc,WAAW,CAAC;AAC1B,cAAc,qBAAqB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/testing/index.ts"],"names":[],"mappings":"AAIA,cAAc,WAAW,CAAC;AAC1B,cAAc,WAAW,CAAC;AAC1B,cAAc,qBAAqB,CAAC"}
|