@dxos/app-framework 0.8.3-staging.0fa589b → 0.8.4-main.03d5cd7b56
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/.storybook/main.mts +9 -0
- package/.storybook/preview.mts +8 -0
- package/README.md +0 -8
- package/dist/lib/browser/capability-5RRH3WIB.mjs +35 -0
- package/dist/lib/browser/capability-5RRH3WIB.mjs.map +7 -0
- package/dist/lib/browser/capability-LUKGKUQH.mjs +38 -0
- package/dist/lib/browser/capability-LUKGKUQH.mjs.map +7 -0
- package/dist/lib/browser/chunk-23D4SJUE.mjs +42 -0
- package/dist/lib/browser/chunk-23D4SJUE.mjs.map +7 -0
- package/dist/lib/browser/chunk-3JWJXGLK.mjs +79 -0
- 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-66IXTIVK.mjs +48 -0
- package/dist/lib/browser/chunk-66IXTIVK.mjs.map +7 -0
- package/dist/lib/browser/chunk-7VZJR2OA.mjs +581 -0
- package/dist/lib/browser/chunk-7VZJR2OA.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-FJ4765WW.mjs.map +7 -0
- package/dist/lib/browser/chunk-FO3IYSLV.mjs +68 -0
- package/dist/lib/browser/chunk-FO3IYSLV.mjs.map +7 -0
- package/dist/lib/browser/chunk-J5LGTIGS.mjs +10 -0
- package/dist/lib/browser/chunk-JD3Z5NEF.mjs +469 -0
- package/dist/lib/browser/chunk-JD3Z5NEF.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-WBHCSOBW.mjs +80 -0
- package/dist/lib/browser/chunk-WBHCSOBW.mjs.map +7 -0
- package/dist/lib/browser/chunk-Z55LVAGN.mjs +213 -0
- package/dist/lib/browser/chunk-Z55LVAGN.mjs.map +7 -0
- package/dist/lib/browser/chunk-ZGJAZSNE.mjs +142 -0
- package/dist/lib/browser/chunk-ZGJAZSNE.mjs.map +7 -0
- package/dist/lib/browser/cli/index.mjs +76 -0
- package/dist/lib/browser/cli/index.mjs.map +7 -0
- package/dist/lib/browser/common/activation-events.mjs +24 -0
- package/dist/lib/browser/common/capabilities.mjs +46 -0
- package/dist/lib/browser/core/activation-event.mjs +20 -0
- package/dist/lib/browser/core/capability.mjs +30 -0
- package/dist/lib/browser/core/capability.mjs.map +7 -0
- package/dist/lib/browser/core/plugin-manager.mjs +19 -0
- package/dist/lib/browser/core/plugin-manager.mjs.map +7 -0
- package/dist/lib/browser/core/plugin.mjs +37 -0
- package/dist/lib/browser/core/plugin.mjs.map +7 -0
- package/dist/lib/browser/core/url-loader.mjs +24 -0
- package/dist/lib/browser/core/url-loader.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +108 -156
- package/dist/lib/browser/index.mjs.map +4 -4
- package/dist/lib/browser/invoker-capability-K4GHUFXF.mjs +44 -0
- 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 +237 -52
- 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 +48 -0
- package/dist/lib/browser/ui/index.mjs.map +7 -0
- package/dist/lib/node-esm/capability-FCGZVIEG.mjs +39 -0
- package/dist/lib/node-esm/capability-FCGZVIEG.mjs.map +7 -0
- package/dist/lib/node-esm/capability-JOIQ2MQE.mjs +36 -0
- package/dist/lib/node-esm/capability-JOIQ2MQE.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-37Z53PXZ.mjs +10 -0
- package/dist/lib/node-esm/chunk-37Z53PXZ.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-D347W3KO.mjs +143 -0
- package/dist/lib/node-esm/chunk-D347W3KO.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-DRZKO5UZ.mjs +470 -0
- package/dist/lib/node-esm/chunk-DRZKO5UZ.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-HSLMI22Q.mjs +11 -0
- package/dist/lib/node-esm/chunk-HSLMI22Q.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-HTBJU5FX.mjs +214 -0
- 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-SBS2YMPT.mjs +43 -0
- package/dist/lib/node-esm/chunk-SBS2YMPT.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-SDJ4B2LU.mjs +80 -0
- package/dist/lib/node-esm/chunk-SDJ4B2LU.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-V24UWT36.mjs +582 -0
- package/dist/lib/node-esm/chunk-V24UWT36.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-WFSRZKBP.mjs +81 -0
- 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-XOCUANHO.mjs +49 -0
- package/dist/lib/node-esm/chunk-XOCUANHO.mjs.map +7 -0
- package/dist/lib/node-esm/cli/index.mjs +77 -0
- package/dist/lib/node-esm/cli/index.mjs.map +7 -0
- package/dist/lib/node-esm/common/activation-events.mjs +25 -0
- package/dist/lib/node-esm/common/activation-events.mjs.map +7 -0
- package/dist/lib/node-esm/common/capabilities.mjs +47 -0
- package/dist/lib/node-esm/common/capabilities.mjs.map +7 -0
- package/dist/lib/node-esm/core/activation-event.mjs +21 -0
- package/dist/lib/node-esm/core/activation-event.mjs.map +7 -0
- package/dist/lib/node-esm/core/capability.mjs +31 -0
- package/dist/lib/node-esm/core/capability.mjs.map +7 -0
- package/dist/lib/node-esm/core/plugin-manager.mjs +20 -0
- package/dist/lib/node-esm/core/plugin-manager.mjs.map +7 -0
- package/dist/lib/node-esm/core/plugin.mjs +38 -0
- package/dist/lib/node-esm/core/plugin.mjs.map +7 -0
- package/dist/lib/node-esm/core/url-loader.mjs +25 -0
- package/dist/lib/node-esm/core/url-loader.mjs.map +7 -0
- package/dist/lib/node-esm/index.mjs +108 -156
- package/dist/lib/node-esm/index.mjs.map +4 -4
- package/dist/lib/node-esm/invoker-capability-XEPW5LMJ.mjs +45 -0
- 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 +237 -52
- 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 +49 -0
- package/dist/lib/node-esm/ui/index.mjs.map +7 -0
- package/dist/plugin/node-esm/index.mjs +893 -0
- package/dist/plugin/node-esm/index.mjs.map +7 -0
- package/dist/plugin/node-esm/meta.json +1 -0
- package/dist/types/src/cli/cli.d.ts +39 -0
- package/dist/types/src/cli/cli.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/common/activation-events.d.ts +27 -0
- package/dist/types/src/common/activation-events.d.ts.map +1 -0
- 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 +110 -121
- package/dist/types/src/common/capabilities.d.ts.map +1 -1
- package/dist/types/src/common/index.d.ts +4 -8
- package/dist/types/src/common/index.d.ts.map +1 -1
- package/dist/types/src/common/operations.d.ts +19 -0
- package/dist/types/src/common/operations.d.ts.map +1 -0
- package/dist/types/src/common/translations.d.ts +8 -8
- package/dist/types/src/common/translations.d.ts.map +1 -1
- package/dist/types/src/context.d.ts +5 -0
- package/dist/types/src/context.d.ts.map +1 -0
- package/dist/types/src/core/{events.d.ts → activation-event.d.ts} +11 -11
- package/dist/types/src/core/activation-event.d.ts.map +1 -0
- package/dist/types/src/core/capability-manager.d.ts +48 -0
- package/dist/types/src/core/capability-manager.d.ts.map +1 -0
- package/dist/types/src/core/capability-manager.test.d.ts +2 -0
- package/dist/types/src/core/capability-manager.test.d.ts.map +1 -0
- package/dist/types/src/core/capability.d.ts +156 -0
- package/dist/types/src/core/capability.d.ts.map +1 -0
- 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 +11 -4
- 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 +239 -0
- package/dist/types/src/core/plugin-manager.d.ts.map +1 -0
- package/dist/types/src/core/plugin-manager.test.d.ts +2 -0
- package/dist/types/src/core/plugin-manager.test.d.ts.map +1 -0
- 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 +208 -37
- 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/index.d.ts +3 -4
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/plugin-operation/OperationPlugin.d.ts +3 -0
- package/dist/types/src/plugin-operation/OperationPlugin.d.ts.map +1 -0
- package/dist/types/src/plugin-operation/history/capability.d.ts +7 -0
- package/dist/types/src/plugin-operation/history/capability.d.ts.map +1 -0
- package/dist/types/src/plugin-operation/history/errors.d.ts +32 -0
- package/dist/types/src/plugin-operation/history/errors.d.ts.map +1 -0
- package/dist/types/src/plugin-operation/history/history-tracker.d.ts +18 -0
- package/dist/types/src/plugin-operation/history/history-tracker.d.ts.map +1 -0
- package/dist/types/src/plugin-operation/history/history-tracker.test.d.ts +2 -0
- package/dist/types/src/plugin-operation/history/history-tracker.test.d.ts.map +1 -0
- package/dist/types/src/plugin-operation/history/index.d.ts +6 -0
- package/dist/types/src/plugin-operation/history/index.d.ts.map +1 -0
- package/dist/types/src/plugin-operation/history/types.d.ts +13 -0
- package/dist/types/src/plugin-operation/history/types.d.ts.map +1 -0
- package/dist/types/src/plugin-operation/history/undo-mapping.d.ts +101 -0
- package/dist/types/src/plugin-operation/history/undo-mapping.d.ts.map +1 -0
- package/dist/types/src/plugin-operation/history/undo-registry.d.ts +23 -0
- package/dist/types/src/plugin-operation/history/undo-registry.d.ts.map +1 -0
- package/dist/types/src/plugin-operation/history/undo-registry.test.d.ts +2 -0
- package/dist/types/src/plugin-operation/history/undo-registry.test.d.ts.map +1 -0
- package/dist/types/src/plugin-operation/index.d.ts +3 -0
- package/dist/types/src/plugin-operation/index.d.ts.map +1 -0
- package/dist/types/src/plugin-operation/invoker-capability.d.ts +6 -0
- package/dist/types/src/plugin-operation/invoker-capability.d.ts.map +1 -0
- package/dist/types/src/plugin-operation/meta.d.ts +3 -0
- package/dist/types/src/plugin-operation/meta.d.ts.map +1 -0
- package/dist/types/src/plugin-operation/testing.d.ts +59 -0
- package/dist/types/src/plugin-operation/testing.d.ts.map +1 -0
- package/dist/types/src/plugin-runtime/RuntimePlugin.d.ts +3 -0
- package/dist/types/src/plugin-runtime/RuntimePlugin.d.ts.map +1 -0
- package/dist/types/src/plugin-runtime/capability.d.ts +6 -0
- package/dist/types/src/plugin-runtime/capability.d.ts.map +1 -0
- package/dist/types/src/plugin-runtime/index.d.ts +2 -0
- package/dist/types/src/plugin-runtime/index.d.ts.map +1 -0
- package/dist/types/src/plugin-runtime/meta.d.ts +3 -0
- package/dist/types/src/plugin-runtime/meta.d.ts.map +1 -0
- 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 +2 -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 +8 -0
- package/dist/types/src/testing/service.d.ts.map +1 -0
- package/dist/types/src/testing/withPluginManager.d.ts +11 -10
- package/dist/types/src/testing/withPluginManager.d.ts.map +1 -1
- package/dist/types/src/testing/withPluginManager.stories.d.ts +9 -3
- package/dist/types/src/testing/withPluginManager.stories.d.ts.map +1 -1
- package/dist/types/src/ui/components/App/App.d.ts +9 -0
- package/dist/types/src/ui/components/App/App.d.ts.map +1 -0
- package/dist/types/src/ui/components/App/App.stories.d.ts +19 -0
- package/dist/types/src/ui/components/App/App.stories.d.ts.map +1 -0
- package/dist/types/src/ui/components/App/index.d.ts +2 -0
- package/dist/types/src/ui/components/App/index.d.ts.map +1 -0
- 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 +13 -0
- package/dist/types/src/ui/components/PluginManager/PluginManagerContext.stories.d.ts.map +1 -0
- package/dist/types/src/ui/components/PluginManager/PluginManagerProvider.d.ts +10 -0
- package/dist/types/src/ui/components/PluginManager/PluginManagerProvider.d.ts.map +1 -0
- package/dist/types/src/ui/components/PluginManager/index.d.ts +2 -0
- package/dist/types/src/ui/components/PluginManager/index.d.ts.map +1 -0
- package/dist/types/src/ui/components/Surface/SurfaceComponent.d.ts +24 -0
- package/dist/types/src/ui/components/Surface/SurfaceComponent.d.ts.map +1 -0
- package/dist/types/src/ui/components/Surface/SurfaceComponent.stories.d.ts +14 -0
- package/dist/types/src/ui/components/Surface/SurfaceComponent.stories.d.ts.map +1 -0
- package/dist/types/src/ui/components/Surface/SurfaceInfo.d.ts +11 -0
- package/dist/types/src/ui/components/Surface/SurfaceInfo.d.ts.map +1 -0
- 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/context.d.ts +5 -0
- package/dist/types/src/ui/components/Surface/context.d.ts.map +1 -0
- package/dist/types/src/ui/components/Surface/index.d.ts +36 -0
- package/dist/types/src/ui/components/Surface/index.d.ts.map +1 -0
- package/dist/types/src/ui/components/Surface/types.d.ts +197 -0
- package/dist/types/src/ui/components/Surface/types.d.ts.map +1 -0
- 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 +5 -0
- package/dist/types/src/ui/components/index.d.ts.map +1 -0
- package/dist/types/src/ui/hooks/index.d.ts +6 -0
- package/dist/types/src/ui/hooks/index.d.ts.map +1 -0
- package/dist/types/src/ui/hooks/useApp.d.ts +89 -0
- package/dist/types/src/ui/hooks/useApp.d.ts.map +1 -0
- 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 +31 -0
- package/dist/types/src/ui/hooks/useCapabilities.d.ts.map +1 -0
- package/dist/types/src/ui/hooks/useLoading.d.ts +18 -0
- package/dist/types/src/ui/hooks/useLoading.d.ts.map +1 -0
- package/dist/types/src/ui/hooks/useSettingsState.d.ts +10 -0
- package/dist/types/src/ui/hooks/useSettingsState.d.ts.map +1 -0
- package/dist/types/src/ui/hooks/useSurface.d.ts +3 -0
- package/dist/types/src/ui/hooks/useSurface.d.ts.map +1 -0
- package/dist/types/src/ui/index.d.ts +3 -0
- package/dist/types/src/ui/index.d.ts.map +1 -0
- 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 +2 -0
- package/dist/types/src/vite-plugin/boot-loader/index.d.ts.map +1 -0
- package/dist/types/src/vite-plugin/boot-loader/loader.d.ts +51 -0
- package/dist/types/src/vite-plugin/boot-loader/loader.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 +37 -0
- package/package.json +116 -52
- package/src/cli/cli.ts +107 -0
- package/src/{playground/layout → cli}/index.ts +1 -1
- package/src/common/activation-events.ts +44 -0
- package/src/{playground/debug/index.ts → common/annotations.ts} +0 -2
- package/src/common/capabilities.ts +169 -108
- package/src/common/index.ts +4 -8
- package/src/common/operations.ts +35 -0
- package/src/common/translations.ts +18 -10
- package/src/context.ts +9 -0
- package/src/core/{events.ts → activation-event.ts} +10 -7
- package/src/core/capability-manager.test.ts +151 -0
- package/src/core/capability-manager.ts +192 -0
- package/src/core/capability.ts +247 -0
- package/src/core/edge-registry-plugin-provider.ts +92 -0
- package/src/core/index.ts +11 -4
- package/src/core/plugin-asset-cache.ts +60 -0
- package/src/core/plugin-manager.test.ts +1671 -0
- package/src/core/plugin-manager.ts +1335 -0
- package/src/core/plugin-manifest.test.ts +75 -0
- package/src/core/plugin-manifest.ts +134 -0
- package/src/core/plugin.ts +369 -43
- 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/helpers.test.ts +1 -1
- package/src/index.ts +3 -4
- package/src/plugin-operation/OperationPlugin.ts +24 -0
- package/src/plugin-operation/history/capability.ts +36 -0
- package/src/plugin-operation/history/errors.ts +7 -0
- package/src/plugin-operation/history/history-tracker.test.ts +374 -0
- package/src/plugin-operation/history/history-tracker.ts +128 -0
- package/src/plugin-operation/history/index.ts +9 -0
- package/src/plugin-operation/history/types.ts +17 -0
- package/src/plugin-operation/history/undo-mapping.ts +135 -0
- package/src/plugin-operation/history/undo-registry.test.ts +72 -0
- package/src/plugin-operation/history/undo-registry.ts +54 -0
- package/src/plugin-operation/index.ts +6 -0
- package/src/plugin-operation/invoker-capability.ts +55 -0
- package/src/plugin-operation/meta.ts +12 -0
- package/src/plugin-operation/testing.ts +155 -0
- package/src/plugin-runtime/RuntimePlugin.ts +19 -0
- package/src/plugin-runtime/capability.ts +53 -0
- package/src/plugin-runtime/index.ts +5 -0
- package/src/plugin-runtime/meta.ts +12 -0
- package/src/testing/harness.ts +229 -0
- package/src/testing/index.ts +2 -0
- package/src/testing/react.test.tsx +48 -0
- package/src/testing/react.tsx +113 -0
- package/src/testing/service.ts +52 -0
- package/src/testing/withPluginManager.stories.tsx +15 -12
- package/src/testing/withPluginManager.tsx +78 -54
- package/src/ui/components/App/App.stories.tsx +88 -0
- package/src/ui/components/App/App.tsx +81 -0
- package/src/{playground/logger → ui/components/App}/index.ts +1 -1
- 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 +185 -0
- package/src/{react → ui/components/PluginManager}/PluginManagerProvider.ts +3 -3
- package/src/ui/components/PluginManager/index.ts +5 -0
- package/src/ui/components/Surface/SurfaceComponent.stories.tsx +144 -0
- package/src/ui/components/Surface/SurfaceComponent.tsx +303 -0
- package/src/ui/components/Surface/SurfaceInfo.tsx +106 -0
- package/src/ui/components/Surface/SurfaceProfilerContext.tsx +207 -0
- package/src/ui/components/Surface/context.ts +12 -0
- package/src/ui/components/Surface/index.ts +54 -0
- package/src/ui/components/Surface/types.test.ts +126 -0
- package/src/ui/components/Surface/types.ts +269 -0
- package/src/ui/components/index.ts +8 -0
- package/src/ui/hooks/index.ts +9 -0
- package/src/ui/hooks/useApp.test.tsx +159 -0
- package/src/ui/hooks/useApp.tsx +424 -0
- package/src/ui/hooks/useCapabilities.ts +67 -0
- package/src/ui/hooks/useLoading.tsx +76 -0
- package/src/ui/hooks/useSettingsState.ts +26 -0
- package/src/ui/hooks/useSurface.ts +13 -0
- package/src/ui/index.ts +6 -0
- package/src/vite-plugin/boot-loader/BootLoader.stories.tsx +270 -0
- package/src/vite-plugin/boot-loader/boot-loader.css +320 -0
- package/src/vite-plugin/boot-loader/boot-loader.js +325 -0
- package/src/vite-plugin/boot-loader/index.ts +5 -0
- package/src/vite-plugin/boot-loader/loader.ts +123 -0
- package/src/vite-plugin/composer/index.ts +306 -0
- package/src/vite-plugin/import-map/index.ts +527 -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 +187 -0
- package/tsconfig.json +27 -22
- package/tsconfig.node.json +2 -4
- package/typedoc.json +2 -4
- package/vitest.config.ts +8 -3
- package/.eslintrc.cjs +0 -9
- package/README.yml +0 -5
- package/dist/lib/browser/app-graph-builder-BI4VVKSW.mjs +0 -137
- package/dist/lib/browser/app-graph-builder-BI4VVKSW.mjs.map +0 -7
- package/dist/lib/browser/chunk-DIBVO47Z.mjs +0 -406
- package/dist/lib/browser/chunk-DIBVO47Z.mjs.map +0 -7
- package/dist/lib/browser/chunk-EHM4UI3V.mjs +0 -1518
- package/dist/lib/browser/chunk-EHM4UI3V.mjs.map +0 -7
- package/dist/lib/browser/chunk-WWEJRWFX.mjs +0 -32
- package/dist/lib/browser/chunk-WWEJRWFX.mjs.map +0 -7
- package/dist/lib/browser/intent-dispatcher-XVBOMF2Y.mjs +0 -11
- package/dist/lib/browser/intent-resolver-3QMBXLIY.mjs +0 -39
- package/dist/lib/browser/intent-resolver-3QMBXLIY.mjs.map +0 -7
- package/dist/lib/browser/store-5H7XPJGA.mjs +0 -30
- package/dist/lib/browser/store-5H7XPJGA.mjs.map +0 -7
- package/dist/lib/browser/worker.mjs +0 -79
- package/dist/lib/node/app-graph-builder-H7QVE4MJ.cjs +0 -146
- package/dist/lib/node/app-graph-builder-H7QVE4MJ.cjs.map +0 -7
- package/dist/lib/node/chunk-G774ASXO.cjs +0 -58
- package/dist/lib/node/chunk-G774ASXO.cjs.map +0 -7
- package/dist/lib/node/chunk-VSOSVDQ3.cjs +0 -1551
- package/dist/lib/node/chunk-VSOSVDQ3.cjs.map +0 -7
- package/dist/lib/node/chunk-YGAY3H34.cjs +0 -429
- package/dist/lib/node/chunk-YGAY3H34.cjs.map +0 -7
- package/dist/lib/node/index.cjs +0 -193
- package/dist/lib/node/index.cjs.map +0 -7
- package/dist/lib/node/intent-dispatcher-C3SVKJ62.cjs +0 -32
- package/dist/lib/node/intent-dispatcher-C3SVKJ62.cjs.map +0 -7
- package/dist/lib/node/intent-resolver-IOJDYO34.cjs +0 -46
- package/dist/lib/node/intent-resolver-IOJDYO34.cjs.map +0 -7
- package/dist/lib/node/meta.json +0 -1
- package/dist/lib/node/store-ESF5VR57.cjs +0 -45
- package/dist/lib/node/store-ESF5VR57.cjs.map +0 -7
- package/dist/lib/node/testing/index.cjs +0 -119
- package/dist/lib/node/testing/index.cjs.map +0 -7
- package/dist/lib/node/worker.cjs +0 -101
- package/dist/lib/node/worker.cjs.map +0 -7
- package/dist/lib/node-esm/app-graph-builder-NROP6RPQ.mjs +0 -138
- package/dist/lib/node-esm/app-graph-builder-NROP6RPQ.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-2J6FVECI.mjs +0 -1520
- package/dist/lib/node-esm/chunk-2J6FVECI.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-FHNZZWP4.mjs +0 -407
- package/dist/lib/node-esm/chunk-FHNZZWP4.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-I6BVZMAH.mjs +0 -34
- package/dist/lib/node-esm/chunk-I6BVZMAH.mjs.map +0 -7
- package/dist/lib/node-esm/intent-dispatcher-7JPGLCQ5.mjs +0 -12
- package/dist/lib/node-esm/intent-resolver-VY4X5UHN.mjs +0 -40
- package/dist/lib/node-esm/intent-resolver-VY4X5UHN.mjs.map +0 -7
- package/dist/lib/node-esm/store-UKD2R2KA.mjs +0 -31
- package/dist/lib/node-esm/store-UKD2R2KA.mjs.map +0 -7
- package/dist/lib/node-esm/worker.mjs +0 -80
- package/dist/types/src/App.d.ts +0 -43
- package/dist/types/src/App.d.ts.map +0 -1
- package/dist/types/src/common/collaboration.d.ts +0 -19
- package/dist/types/src/common/collaboration.d.ts.map +0 -1
- package/dist/types/src/common/events.d.ts +0 -52
- package/dist/types/src/common/events.d.ts.map +0 -1
- package/dist/types/src/common/file.d.ts +0 -14
- package/dist/types/src/common/file.d.ts.map +0 -1
- package/dist/types/src/common/graph.d.ts +0 -21
- package/dist/types/src/common/graph.d.ts.map +0 -1
- package/dist/types/src/common/layout.d.ts +0 -281
- package/dist/types/src/common/layout.d.ts.map +0 -1
- package/dist/types/src/common/surface.d.ts +0 -65
- package/dist/types/src/common/surface.d.ts.map +0 -1
- package/dist/types/src/core/capabilities.d.ts +0 -114
- package/dist/types/src/core/capabilities.d.ts.map +0 -1
- package/dist/types/src/core/capabilities.test.d.ts +0 -2
- package/dist/types/src/core/capabilities.test.d.ts.map +0 -1
- package/dist/types/src/core/events.d.ts.map +0 -1
- package/dist/types/src/core/manager.d.ts +0 -122
- package/dist/types/src/core/manager.d.ts.map +0 -1
- package/dist/types/src/core/manager.test.d.ts +0 -2
- package/dist/types/src/core/manager.test.d.ts.map +0 -1
- package/dist/types/src/playground/debug/Debug.d.ts +0 -6
- package/dist/types/src/playground/debug/Debug.d.ts.map +0 -1
- package/dist/types/src/playground/debug/index.d.ts +0 -2
- package/dist/types/src/playground/debug/index.d.ts.map +0 -1
- package/dist/types/src/playground/debug/plugin.d.ts +0 -2
- package/dist/types/src/playground/debug/plugin.d.ts.map +0 -1
- package/dist/types/src/playground/generator/Main.d.ts +0 -6
- package/dist/types/src/playground/generator/Main.d.ts.map +0 -1
- package/dist/types/src/playground/generator/Toolbar.d.ts +0 -6
- package/dist/types/src/playground/generator/Toolbar.d.ts.map +0 -1
- package/dist/types/src/playground/generator/generator.d.ts +0 -7
- package/dist/types/src/playground/generator/generator.d.ts.map +0 -1
- package/dist/types/src/playground/generator/index.d.ts +0 -3
- package/dist/types/src/playground/generator/index.d.ts.map +0 -1
- package/dist/types/src/playground/generator/plugin.d.ts +0 -2
- package/dist/types/src/playground/generator/plugin.d.ts.map +0 -1
- package/dist/types/src/playground/layout/Layout.d.ts +0 -8
- package/dist/types/src/playground/layout/Layout.d.ts.map +0 -1
- package/dist/types/src/playground/layout/index.d.ts +0 -2
- package/dist/types/src/playground/layout/index.d.ts.map +0 -1
- package/dist/types/src/playground/layout/plugin.d.ts +0 -2
- package/dist/types/src/playground/layout/plugin.d.ts.map +0 -1
- package/dist/types/src/playground/logger/Toolbar.d.ts +0 -6
- package/dist/types/src/playground/logger/Toolbar.d.ts.map +0 -1
- package/dist/types/src/playground/logger/index.d.ts +0 -2
- package/dist/types/src/playground/logger/index.d.ts.map +0 -1
- package/dist/types/src/playground/logger/plugin.d.ts +0 -2
- package/dist/types/src/playground/logger/plugin.d.ts.map +0 -1
- package/dist/types/src/playground/logger/schema.d.ts +0 -13
- package/dist/types/src/playground/logger/schema.d.ts.map +0 -1
- package/dist/types/src/playground/playground.stories.d.ts +0 -10
- package/dist/types/src/playground/playground.stories.d.ts.map +0 -1
- package/dist/types/src/plugin-intent/IntentPlugin.d.ts +0 -2
- package/dist/types/src/plugin-intent/IntentPlugin.d.ts.map +0 -1
- package/dist/types/src/plugin-intent/actions.d.ts +0 -38
- package/dist/types/src/plugin-intent/actions.d.ts.map +0 -1
- package/dist/types/src/plugin-intent/errors.d.ts +0 -16
- package/dist/types/src/plugin-intent/errors.d.ts.map +0 -1
- package/dist/types/src/plugin-intent/index.d.ts +0 -5
- package/dist/types/src/plugin-intent/index.d.ts.map +0 -1
- package/dist/types/src/plugin-intent/intent-dispatcher.d.ts +0 -139
- package/dist/types/src/plugin-intent/intent-dispatcher.d.ts.map +0 -1
- package/dist/types/src/plugin-intent/intent-dispatcher.test.d.ts +0 -2
- package/dist/types/src/plugin-intent/intent-dispatcher.test.d.ts.map +0 -1
- package/dist/types/src/plugin-intent/intent.d.ts +0 -63
- package/dist/types/src/plugin-intent/intent.d.ts.map +0 -1
- package/dist/types/src/plugin-settings/SettingsPlugin.d.ts +0 -2
- package/dist/types/src/plugin-settings/SettingsPlugin.d.ts.map +0 -1
- package/dist/types/src/plugin-settings/actions.d.ts +0 -27
- package/dist/types/src/plugin-settings/actions.d.ts.map +0 -1
- package/dist/types/src/plugin-settings/app-graph-builder.d.ts +0 -4
- package/dist/types/src/plugin-settings/app-graph-builder.d.ts.map +0 -1
- package/dist/types/src/plugin-settings/index.d.ts +0 -3
- package/dist/types/src/plugin-settings/index.d.ts.map +0 -1
- package/dist/types/src/plugin-settings/intent-resolver.d.ts +0 -4
- package/dist/types/src/plugin-settings/intent-resolver.d.ts.map +0 -1
- package/dist/types/src/plugin-settings/store.d.ts +0 -5
- package/dist/types/src/plugin-settings/store.d.ts.map +0 -1
- package/dist/types/src/plugin-settings/translations.d.ts +0 -11
- package/dist/types/src/plugin-settings/translations.d.ts.map +0 -1
- package/dist/types/src/react/ErrorBoundary.d.ts +0 -31
- package/dist/types/src/react/ErrorBoundary.d.ts.map +0 -1
- package/dist/types/src/react/IntentContext.d.ts +0 -8
- package/dist/types/src/react/IntentContext.d.ts.map +0 -1
- package/dist/types/src/react/PluginManagerProvider.d.ts +0 -10
- package/dist/types/src/react/PluginManagerProvider.d.ts.map +0 -1
- package/dist/types/src/react/Surface.d.ts +0 -12
- package/dist/types/src/react/Surface.d.ts.map +0 -1
- package/dist/types/src/react/Surface.stories.d.ts +0 -16
- package/dist/types/src/react/Surface.stories.d.ts.map +0 -1
- package/dist/types/src/react/common.d.ts +0 -13
- package/dist/types/src/react/common.d.ts.map +0 -1
- package/dist/types/src/react/index.d.ts +0 -7
- package/dist/types/src/react/index.d.ts.map +0 -1
- package/dist/types/src/react/useCapabilities.d.ts +0 -13
- package/dist/types/src/react/useCapabilities.d.ts.map +0 -1
- package/dist/types/src/react/useIntentResolver.d.ts +0 -3
- package/dist/types/src/react/useIntentResolver.d.ts.map +0 -1
- package/dist/types/src/worker.d.ts +0 -4
- package/dist/types/src/worker.d.ts.map +0 -1
- package/project.json +0 -29
- package/src/App.tsx +0 -276
- package/src/common/collaboration.ts +0 -21
- package/src/common/events.ts +0 -77
- package/src/common/file.ts +0 -22
- package/src/common/graph.ts +0 -30
- package/src/common/layout.ts +0 -278
- package/src/common/surface.ts +0 -86
- package/src/core/capabilities.test.ts +0 -136
- package/src/core/capabilities.ts +0 -254
- package/src/core/manager.test.ts +0 -516
- package/src/core/manager.ts +0 -519
- package/src/playground/debug/Debug.tsx +0 -39
- package/src/playground/debug/plugin.ts +0 -17
- package/src/playground/generator/Main.tsx +0 -71
- package/src/playground/generator/Toolbar.tsx +0 -46
- package/src/playground/generator/generator.ts +0 -48
- package/src/playground/generator/index.ts +0 -6
- package/src/playground/generator/plugin.ts +0 -23
- package/src/playground/layout/Layout.tsx +0 -33
- package/src/playground/layout/plugin.ts +0 -17
- package/src/playground/logger/Toolbar.tsx +0 -29
- package/src/playground/logger/plugin.ts +0 -36
- package/src/playground/logger/schema.ts +0 -12
- package/src/playground/playground.stories.tsx +0 -42
- package/src/plugin-intent/IntentPlugin.ts +0 -20
- package/src/plugin-intent/actions.ts +0 -33
- package/src/plugin-intent/errors.ts +0 -39
- package/src/plugin-intent/index.ts +0 -8
- package/src/plugin-intent/intent-dispatcher.test.ts +0 -279
- package/src/plugin-intent/intent-dispatcher.ts +0 -333
- package/src/plugin-intent/intent.ts +0 -154
- package/src/plugin-settings/SettingsPlugin.ts +0 -35
- package/src/plugin-settings/actions.ts +0 -29
- package/src/plugin-settings/app-graph-builder.ts +0 -157
- package/src/plugin-settings/index.ts +0 -6
- package/src/plugin-settings/intent-resolver.ts +0 -34
- package/src/plugin-settings/store.ts +0 -33
- package/src/plugin-settings/translations.ts +0 -17
- package/src/react/ErrorBoundary.tsx +0 -45
- package/src/react/IntentContext.tsx +0 -34
- package/src/react/Surface.stories.tsx +0 -96
- package/src/react/Surface.tsx +0 -77
- package/src/react/common.ts +0 -12
- package/src/react/index.ts +0 -10
- package/src/react/useCapabilities.ts +0 -30
- package/src/react/useIntentResolver.ts +0 -22
- package/src/worker.ts +0 -11
- package/typedoc/.nojekyll +0 -1
- package/typedoc/assets/hierarchy.js +0 -1
- package/typedoc/assets/highlight.css +0 -106
- package/typedoc/assets/icons.js +0 -18
- package/typedoc/assets/icons.svg +0 -1
- package/typedoc/assets/main.js +0 -60
- package/typedoc/assets/navigation.js +0 -1
- package/typedoc/assets/search.js +0 -1
- package/typedoc/assets/style.css +0 -1640
- package/typedoc/classes/CollaborationActions.InsertContent.html +0 -421
- package/typedoc/classes/ErrorBoundary.html +0 -125
- package/typedoc/classes/IntentAction.ShowUndo.html +0 -227
- package/typedoc/classes/IntentAction.Track.html +0 -266
- package/typedoc/classes/LayoutAction.AddToast.html +0 -265
- package/typedoc/classes/LayoutAction.Close.html +0 -382
- package/typedoc/classes/LayoutAction.Expose.html +0 -265
- package/typedoc/classes/LayoutAction.Open.html +0 -1123
- package/typedoc/classes/LayoutAction.RevertWorkspace.html +0 -343
- package/typedoc/classes/LayoutAction.ScrollIntoView.html +0 -460
- package/typedoc/classes/LayoutAction.Set.html +0 -460
- package/typedoc/classes/LayoutAction.SetLayoutMode.html +0 -499
- package/typedoc/classes/LayoutAction.SwitchWorkspace.html +0 -265
- package/typedoc/classes/LayoutAction.UpdateComplementary.html +0 -616
- package/typedoc/classes/LayoutAction.UpdateDialog.html +0 -1123
- package/typedoc/classes/LayoutAction.UpdateLayout.html +0 -461
- package/typedoc/classes/LayoutAction.UpdatePopover.html +0 -1435
- package/typedoc/classes/LayoutAction.UpdateSidebar.html +0 -616
- package/typedoc/classes/Plugin.html +0 -6
- package/typedoc/classes/PluginContext.html +0 -38
- package/typedoc/classes/PluginManager.html +0 -43
- package/typedoc/classes/PluginModule.html +0 -18
- package/typedoc/classes/SettingsAction.Open.html +0 -226
- package/typedoc/classes/SettingsAction.OpenPluginRegistry.html +0 -265
- package/typedoc/functions/Events.createStateEvent.html +0 -2
- package/typedoc/functions/IntentPlugin.html +0 -1
- package/typedoc/functions/SettingsPlugin.html +0 -1
- package/typedoc/functions/allOf.html +0 -2
- package/typedoc/functions/chain.html +0 -3
- package/typedoc/functions/contributes.html +0 -2
- package/typedoc/functions/createDispatcher.html +0 -3
- package/typedoc/functions/createIntent.html +0 -6
- package/typedoc/functions/createResolver.html +0 -2
- package/typedoc/functions/createSurface.html +0 -2
- package/typedoc/functions/defineCapability.html +0 -2
- package/typedoc/functions/defineEvent.html +0 -2
- package/typedoc/functions/defineModule.html +0 -2
- package/typedoc/functions/definePlugin.html +0 -2
- package/typedoc/functions/eventKey.html +0 -2
- package/typedoc/functions/getEvents.html +0 -2
- package/typedoc/functions/isAllOf.html +0 -2
- package/typedoc/functions/isOneOf.html +0 -2
- package/typedoc/functions/isSurfaceAvailable.html +0 -2
- package/typedoc/functions/lazy.html +0 -2
- package/typedoc/functions/oneOf.html +0 -2
- package/typedoc/functions/useApp.html +0 -6
- package/typedoc/functions/useAppGraph.html +0 -1
- package/typedoc/functions/useCapabilities.html +0 -3
- package/typedoc/functions/useCapability.html +0 -4
- package/typedoc/functions/useIntentDispatcher.html +0 -1
- package/typedoc/functions/useIntentResolver.html +0 -1
- package/typedoc/functions/useLayout.html +0 -1
- package/typedoc/functions/usePluginManager.html +0 -2
- package/typedoc/hierarchy.html +0 -1
- package/typedoc/index.html +0 -16
- package/typedoc/interfaces/LayoutAction.Toast.html +0 -10
- package/typedoc/media/LICENSE +0 -8
- package/typedoc/modules/Capabilities.html +0 -1
- package/typedoc/modules/CollaborationActions.html +0 -1
- package/typedoc/modules/Events.html +0 -1
- package/typedoc/modules/IntentAction.html +0 -1
- package/typedoc/modules/LayoutAction.html +0 -2
- package/typedoc/modules/SettingsAction.html +0 -1
- package/typedoc/modules.html +0 -1
- package/typedoc/types/ActivationEvent.html +0 -8
- package/typedoc/types/ActivationEvents.html +0 -2
- package/typedoc/types/AnyCapability.html +0 -1
- package/typedoc/types/AnyIntent.html +0 -1
- package/typedoc/types/AnyIntentChain.html +0 -1
- package/typedoc/types/AnyIntentEffectResult.html +0 -1
- package/typedoc/types/AnyIntentResolver.html +0 -1
- package/typedoc/types/AnyIntentResult.html +0 -1
- package/typedoc/types/Capabilities.FileUploader.html +0 -1
- package/typedoc/types/Capabilities.IntentResolver.html +0 -1
- package/typedoc/types/Capabilities.Layout.html +0 -1
- package/typedoc/types/Capabilities.Metadata.html +0 -1
- package/typedoc/types/Capabilities.ReactContext.html +0 -1
- package/typedoc/types/Capabilities.ReactRoot.html +0 -1
- package/typedoc/types/Capabilities.ReactSurface.html +0 -1
- package/typedoc/types/Capabilities.Settings.html +0 -4
- package/typedoc/types/Capability.html +0 -9
- package/typedoc/types/CreateAppOptions.html +0 -10
- package/typedoc/types/FileInfo.html +0 -1
- package/typedoc/types/Intent.html +0 -10
- package/typedoc/types/IntentChain.html +0 -6
- package/typedoc/types/IntentContext.html +0 -5
- package/typedoc/types/IntentData.html +0 -1
- package/typedoc/types/IntentDispatcher.html +0 -2
- package/typedoc/types/IntentDispatcherResult.html +0 -2
- package/typedoc/types/IntentEffectDefinition.html +0 -2
- package/typedoc/types/IntentEffectResult.html +0 -15
- package/typedoc/types/IntentParams.html +0 -3
- package/typedoc/types/IntentResolver.html +0 -2
- package/typedoc/types/IntentResultData.html +0 -1
- package/typedoc/types/IntentSchema.html +0 -1
- package/typedoc/types/IntentUndo.html +0 -2
- package/typedoc/types/InterfaceDef.html +0 -4
- package/typedoc/types/Label.html +0 -1
- package/typedoc/types/NodeSerializer.html +0 -8
- package/typedoc/types/PluginManagerOptions.html +0 -6
- package/typedoc/types/PluginMeta.html +0 -21
- package/typedoc/types/PromiseIntentDispatcher.html +0 -2
- package/typedoc/types/PromiseIntentUndo.html +0 -2
- package/typedoc/types/Resource.html +0 -1
- package/typedoc/types/ResourceKey.html +0 -1
- package/typedoc/types/ResourceLanguage.html +0 -1
- package/typedoc/types/SerializedNode.html +0 -4
- package/typedoc/types/SurfaceComponent.html +0 -2
- package/typedoc/types/SurfaceDefinition.html +0 -2
- package/typedoc/types/SurfaceProps.html +0 -4
- package/typedoc/variables/Capabilities.AnchorSort.html +0 -1
- package/typedoc/variables/Capabilities.AppGraph.html +0 -1
- package/typedoc/variables/Capabilities.AppGraphBuilder.html +0 -1
- package/typedoc/variables/Capabilities.AppGraphSerializer.html +0 -1
- package/typedoc/variables/Capabilities.ArtifactDefinition.html +0 -1
- package/typedoc/variables/Capabilities.FileUploader.html +0 -1
- package/typedoc/variables/Capabilities.IntentDispatcher.html +0 -1
- package/typedoc/variables/Capabilities.IntentResolver.html +0 -1
- package/typedoc/variables/Capabilities.Layout.html +0 -1
- package/typedoc/variables/Capabilities.Metadata.html +0 -1
- package/typedoc/variables/Capabilities.Null.html +0 -1
- package/typedoc/variables/Capabilities.PluginManager.html +0 -1
- package/typedoc/variables/Capabilities.ReactContext.html +0 -1
- package/typedoc/variables/Capabilities.ReactRoot.html +0 -1
- package/typedoc/variables/Capabilities.ReactSurface.html +0 -1
- package/typedoc/variables/Capabilities.RxRegistry.html +0 -1
- package/typedoc/variables/Capabilities.Settings.html +0 -1
- package/typedoc/variables/Capabilities.SettingsStore.html +0 -1
- package/typedoc/variables/Capabilities.Tools.html +0 -1
- package/typedoc/variables/Capabilities.Translations.html +0 -1
- package/typedoc/variables/Events.AppGraphReady.html +0 -2
- package/typedoc/variables/Events.DispatcherReady.html +0 -2
- package/typedoc/variables/Events.LayoutReady.html +0 -1
- package/typedoc/variables/Events.SettingsReady.html +0 -2
- package/typedoc/variables/Events.SetupAppGraph.html +0 -2
- package/typedoc/variables/Events.SetupArtifactDefinition.html +0 -2
- package/typedoc/variables/Events.SetupIntentResolver.html +0 -2
- package/typedoc/variables/Events.SetupMetadata.html +0 -2
- package/typedoc/variables/Events.SetupReactSurface.html +0 -2
- package/typedoc/variables/Events.SetupSettings.html +0 -2
- package/typedoc/variables/Events.SetupTranslations.html +0 -2
- package/typedoc/variables/Events.Startup.html +0 -2
- package/typedoc/variables/FileInfoSchema.html +0 -1
- package/typedoc/variables/INTENT_ACTION.html +0 -1
- package/typedoc/variables/INTENT_PLUGIN.html +0 -1
- package/typedoc/variables/LAYOUT_ACTION.html +0 -1
- package/typedoc/variables/LAYOUT_PLUGIN.html +0 -1
- package/typedoc/variables/Label.html +0 -1
- package/typedoc/variables/LayoutAction.Toast.html +0 -1
- package/typedoc/variables/LayoutAction.UPDATE_LAYOUT.html +0 -1
- package/typedoc/variables/PluginManagerProvider.html +0 -2
- package/typedoc/variables/Resource.html +0 -2
- package/typedoc/variables/ResourceKey.html +0 -1
- package/typedoc/variables/ResourceLanguage.html +0 -1
- package/typedoc/variables/SETTINGS_ACTION.html +0 -1
- package/typedoc/variables/SETTINGS_ID.html +0 -1
- package/typedoc/variables/SETTINGS_KEY.html +0 -1
- package/typedoc/variables/SETTINGS_PLUGIN.html +0 -1
- package/typedoc/variables/Surface.html +0 -2
- package/typedoc/variables/defaultFileTypes.html +0 -1
- /package/dist/lib/browser/{intent-dispatcher-XVBOMF2Y.mjs.map → chunk-J5LGTIGS.mjs.map} +0 -0
- /package/dist/lib/browser/{worker.mjs.map → common/activation-events.mjs.map} +0 -0
- /package/dist/lib/{node-esm/intent-dispatcher-7JPGLCQ5.mjs.map → browser/common/capabilities.mjs.map} +0 -0
- /package/dist/lib/{node-esm/worker.mjs.map → browser/core/activation-event.mjs.map} +0 -0
|
@@ -0,0 +1,1175 @@
|
|
|
1
|
+
import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
|
|
2
|
+
import {
|
|
3
|
+
eventKey,
|
|
4
|
+
getEvents,
|
|
5
|
+
isAllOf
|
|
6
|
+
} from "./chunk-XOCUANHO.mjs";
|
|
7
|
+
import {
|
|
8
|
+
LazyPluginError,
|
|
9
|
+
Service as Service2,
|
|
10
|
+
isLazy,
|
|
11
|
+
resolveLazy
|
|
12
|
+
} from "./chunk-HTBJU5FX.mjs";
|
|
13
|
+
import {
|
|
14
|
+
Service
|
|
15
|
+
} from "./chunk-SDJ4B2LU.mjs";
|
|
16
|
+
import {
|
|
17
|
+
__export
|
|
18
|
+
} from "./chunk-HSLMI22Q.mjs";
|
|
19
|
+
|
|
20
|
+
// src/core/plugin-manager.ts
|
|
21
|
+
var plugin_manager_exports = {};
|
|
22
|
+
__export(plugin_manager_exports, {
|
|
23
|
+
ManagerTypeId: () => ManagerTypeId,
|
|
24
|
+
PluginInitializationError: () => PluginInitializationError,
|
|
25
|
+
PluginTimeoutError: () => PluginTimeoutError,
|
|
26
|
+
isManager: () => isManager,
|
|
27
|
+
make: () => make5
|
|
28
|
+
});
|
|
29
|
+
import { Atom as Atom3, Registry } from "@effect-atom/atom-react";
|
|
30
|
+
import * as Array from "effect/Array";
|
|
31
|
+
import * as Cause from "effect/Cause";
|
|
32
|
+
import * as Deferred2 from "effect/Deferred";
|
|
33
|
+
import * as Duration from "effect/Duration";
|
|
34
|
+
import * as Effect3 from "effect/Effect";
|
|
35
|
+
import * as Fiber from "effect/Fiber";
|
|
36
|
+
import * as Function from "effect/Function";
|
|
37
|
+
import * as HashSet from "effect/HashSet";
|
|
38
|
+
import * as PubSub from "effect/PubSub";
|
|
39
|
+
import * as Ref from "effect/Ref";
|
|
40
|
+
import { runAndForwardErrors as runAndForwardErrors2 } from "@dxos/effect";
|
|
41
|
+
import { Performance } from "@dxos/effect";
|
|
42
|
+
import { BaseError } from "@dxos/errors";
|
|
43
|
+
import { log as log3 } from "@dxos/log";
|
|
44
|
+
|
|
45
|
+
// src/core/capability-manager.ts
|
|
46
|
+
var capability_manager_exports = {};
|
|
47
|
+
__export(capability_manager_exports, {
|
|
48
|
+
make: () => make2
|
|
49
|
+
});
|
|
50
|
+
import { Atom } from "@effect-atom/atom-react";
|
|
51
|
+
import * as Deferred from "effect/Deferred";
|
|
52
|
+
import * as Effect from "effect/Effect";
|
|
53
|
+
import { invariant } from "@dxos/invariant";
|
|
54
|
+
import { log } from "@dxos/log";
|
|
55
|
+
var __dxlog_file = "/__w/dxos/dxos/packages/sdk/app-framework/src/core/capability-manager.ts";
|
|
56
|
+
var CapabilityManagerImpl = class {
|
|
57
|
+
_registry;
|
|
58
|
+
_capabilityEntries = Atom.family(() => {
|
|
59
|
+
return Atom.make([]).pipe(Atom.keepAlive);
|
|
60
|
+
});
|
|
61
|
+
_capabilities = Atom.family((id) => {
|
|
62
|
+
return Atom.make((get2) => {
|
|
63
|
+
const current = get2(this._capabilityEntries(id));
|
|
64
|
+
return current.map((c) => c.implementation);
|
|
65
|
+
}).pipe(Atom.keepAlive);
|
|
66
|
+
});
|
|
67
|
+
_capabilitiesByModule = Atom.family((id) => {
|
|
68
|
+
return Atom.make((get2) => {
|
|
69
|
+
const entries = get2(this._capabilityEntries(id));
|
|
70
|
+
const result = {};
|
|
71
|
+
for (const entry of entries) {
|
|
72
|
+
(result[entry.moduleId] ??= []).push(entry.implementation);
|
|
73
|
+
}
|
|
74
|
+
return result;
|
|
75
|
+
}).pipe(Atom.keepAlive);
|
|
76
|
+
});
|
|
77
|
+
_capability = Atom.family((id) => {
|
|
78
|
+
return Atom.make((get2) => {
|
|
79
|
+
const current = get2(this._capabilities(id));
|
|
80
|
+
invariant(current.length > 0, `No capability found for ${id}`, { "~LogMeta": "~LogMeta", F: __dxlog_file, L: 35, S: this, A: ["current.length > 0", "`No capability found for ${id}`"] });
|
|
81
|
+
return current[0];
|
|
82
|
+
});
|
|
83
|
+
});
|
|
84
|
+
constructor({ registry }) {
|
|
85
|
+
this._registry = registry;
|
|
86
|
+
}
|
|
87
|
+
contribute({ module: moduleId, interface: interfaceDef, implementation }) {
|
|
88
|
+
const current = this._registry.get(this._capabilityEntries(interfaceDef.identifier));
|
|
89
|
+
const isDuplicate = current.some((c) => c.moduleId === moduleId && c.implementation === implementation);
|
|
90
|
+
if (isDuplicate) {
|
|
91
|
+
log("capability already contributed, skipping", {
|
|
92
|
+
id: interfaceDef.identifier,
|
|
93
|
+
moduleId
|
|
94
|
+
}, { "~LogMeta": "~LogMeta", F: __dxlog_file, L: 46, S: this });
|
|
95
|
+
return;
|
|
96
|
+
}
|
|
97
|
+
const entry = {
|
|
98
|
+
moduleId,
|
|
99
|
+
implementation
|
|
100
|
+
};
|
|
101
|
+
this._registry.set(this._capabilityEntries(interfaceDef.identifier), [
|
|
102
|
+
...current,
|
|
103
|
+
entry
|
|
104
|
+
]);
|
|
105
|
+
log("capability contributed", {
|
|
106
|
+
id: interfaceDef.identifier,
|
|
107
|
+
moduleId,
|
|
108
|
+
count: current.length
|
|
109
|
+
}, { "~LogMeta": "~LogMeta", F: __dxlog_file, L: 60, S: this });
|
|
110
|
+
}
|
|
111
|
+
remove(interfaceDef, implementation) {
|
|
112
|
+
const current = this._registry.get(this._capabilityEntries(interfaceDef.identifier));
|
|
113
|
+
if (current.length === 0) {
|
|
114
|
+
return;
|
|
115
|
+
}
|
|
116
|
+
const next = current.filter((c) => c.implementation !== implementation);
|
|
117
|
+
if (next.length !== current.length) {
|
|
118
|
+
this._registry.set(this._capabilityEntries(interfaceDef.identifier), next);
|
|
119
|
+
log("capability removed", {
|
|
120
|
+
id: interfaceDef.identifier,
|
|
121
|
+
count: current.length
|
|
122
|
+
}, { "~LogMeta": "~LogMeta", F: __dxlog_file, L: 74, S: this });
|
|
123
|
+
} else {
|
|
124
|
+
log.warn("capability not removed", {
|
|
125
|
+
id: interfaceDef.identifier
|
|
126
|
+
}, { "~LogMeta": "~LogMeta", F: __dxlog_file, L: 79, S: this });
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
atom(interfaceDef) {
|
|
130
|
+
return this._capabilities(interfaceDef.identifier);
|
|
131
|
+
}
|
|
132
|
+
getAll(interfaceDef) {
|
|
133
|
+
return this._registry.get(this.atom(interfaceDef));
|
|
134
|
+
}
|
|
135
|
+
get(interfaceDef) {
|
|
136
|
+
const capabilities = this.getAll(interfaceDef);
|
|
137
|
+
invariant(capabilities.length > 0, `No capability found for ${interfaceDef.identifier}`, { "~LogMeta": "~LogMeta", F: __dxlog_file, L: 93, S: this, A: ["capabilities.length > 0", "`No capability found for ${interfaceDef.identifier}`"] });
|
|
138
|
+
return capabilities[0];
|
|
139
|
+
}
|
|
140
|
+
waitFor(interfaceDef) {
|
|
141
|
+
return Effect.gen(this, function* () {
|
|
142
|
+
const [capability] = this.getAll(interfaceDef);
|
|
143
|
+
if (capability) {
|
|
144
|
+
return capability;
|
|
145
|
+
}
|
|
146
|
+
const deferred = yield* Deferred.make();
|
|
147
|
+
const cancel = this._registry.subscribe(this.atom(interfaceDef), (capabilities) => {
|
|
148
|
+
if (capabilities.length > 0) {
|
|
149
|
+
Effect.runSync(Deferred.succeed(deferred, capabilities[0]));
|
|
150
|
+
}
|
|
151
|
+
});
|
|
152
|
+
const result = yield* Deferred.await(deferred);
|
|
153
|
+
cancel();
|
|
154
|
+
return result;
|
|
155
|
+
});
|
|
156
|
+
}
|
|
157
|
+
atomByModule(interfaceDef) {
|
|
158
|
+
return this._capabilitiesByModule(interfaceDef.identifier);
|
|
159
|
+
}
|
|
160
|
+
};
|
|
161
|
+
var make2 = (options) => new CapabilityManagerImpl(options);
|
|
162
|
+
|
|
163
|
+
// src/core/registry.ts
|
|
164
|
+
var registry_exports = {};
|
|
165
|
+
__export(registry_exports, {
|
|
166
|
+
Manager: () => Manager
|
|
167
|
+
});
|
|
168
|
+
import { Atom as Atom2 } from "@effect-atom/atom-react";
|
|
169
|
+
import * as Effect2 from "effect/Effect";
|
|
170
|
+
import { runAndForwardErrors } from "@dxos/effect";
|
|
171
|
+
import { log as log2 } from "@dxos/log";
|
|
172
|
+
var __dxlog_file2 = "/__w/dxos/dxos/packages/sdk/app-framework/src/core/registry.ts";
|
|
173
|
+
var NULL_PROVIDER = {
|
|
174
|
+
listPlugins: () => Effect2.succeed([]),
|
|
175
|
+
listVersions: () => Effect2.fail(new Error("No plugin registry provider configured")),
|
|
176
|
+
getPlugin: () => Effect2.fail(new Error("No plugin registry provider configured"))
|
|
177
|
+
};
|
|
178
|
+
var Manager = class {
|
|
179
|
+
plugins;
|
|
180
|
+
#provider;
|
|
181
|
+
constructor(provider, atomRegistry) {
|
|
182
|
+
this.#provider = provider ?? NULL_PROVIDER;
|
|
183
|
+
const initialLoading = provider !== void 0;
|
|
184
|
+
this.plugins = Atom2.make({
|
|
185
|
+
entries: [],
|
|
186
|
+
loading: initialLoading,
|
|
187
|
+
error: null
|
|
188
|
+
}).pipe(Atom2.keepAlive);
|
|
189
|
+
if (provider !== void 0) {
|
|
190
|
+
void runAndForwardErrors(provider.listPlugins().pipe(Effect2.match({
|
|
191
|
+
onSuccess: (entries) => atomRegistry.set(this.plugins, {
|
|
192
|
+
entries,
|
|
193
|
+
loading: false,
|
|
194
|
+
error: null
|
|
195
|
+
}),
|
|
196
|
+
onFailure: (error) => {
|
|
197
|
+
log2.catch(error, void 0, { "~LogMeta": "~LogMeta", F: __dxlog_file2, L: 49, S: this });
|
|
198
|
+
atomRegistry.set(this.plugins, {
|
|
199
|
+
entries: [],
|
|
200
|
+
loading: false,
|
|
201
|
+
error
|
|
202
|
+
});
|
|
203
|
+
}
|
|
204
|
+
})));
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
/** Forwards to the underlying provider. */
|
|
208
|
+
listPlugins() {
|
|
209
|
+
return this.#provider.listPlugins();
|
|
210
|
+
}
|
|
211
|
+
/** Forwards to the underlying provider. */
|
|
212
|
+
listVersions(repo) {
|
|
213
|
+
return this.#provider.listVersions(repo);
|
|
214
|
+
}
|
|
215
|
+
/** Forwards to the underlying provider. */
|
|
216
|
+
getPlugin(repo, version) {
|
|
217
|
+
return this.#provider.getPlugin(repo, version);
|
|
218
|
+
}
|
|
219
|
+
};
|
|
220
|
+
|
|
221
|
+
// src/core/plugin-manager.ts
|
|
222
|
+
var __dxlog_file3 = "/__w/dxos/dxos/packages/sdk/app-framework/src/core/plugin-manager.ts";
|
|
223
|
+
var PluginInitializationError = class extends BaseError.extend("PluginInitializationError", "Plugin manager initialization failed") {
|
|
224
|
+
};
|
|
225
|
+
var PluginTimeoutError = class extends BaseError.extend("PluginTimeoutError", "Plugin operation timed out") {
|
|
226
|
+
};
|
|
227
|
+
var DEFAULT_LOAD_TIMEOUT = Duration.seconds(30);
|
|
228
|
+
var DEFAULT_ACTIVATION_TIMEOUT = Duration.seconds(30);
|
|
229
|
+
var ManagerTypeId = /* @__PURE__ */ Symbol.for("@dxos/app-framework/Manager");
|
|
230
|
+
var isManager = (value) => {
|
|
231
|
+
return typeof value === "object" && value !== null && ManagerTypeId in value;
|
|
232
|
+
};
|
|
233
|
+
var ManagerImpl = class {
|
|
234
|
+
[ManagerTypeId] = ManagerTypeId;
|
|
235
|
+
activation = Effect3.runSync(PubSub.unbounded());
|
|
236
|
+
capabilities;
|
|
237
|
+
registry;
|
|
238
|
+
pluginRegistry;
|
|
239
|
+
_pluginsAtom;
|
|
240
|
+
_coreAtom;
|
|
241
|
+
_enabledAtom;
|
|
242
|
+
_modulesAtom;
|
|
243
|
+
_activeAtom;
|
|
244
|
+
_eventsFiredAtom;
|
|
245
|
+
_pendingResetAtom;
|
|
246
|
+
_failedAtom;
|
|
247
|
+
_pluginLoader;
|
|
248
|
+
_onRemove;
|
|
249
|
+
_loadTimeout;
|
|
250
|
+
_activationTimeout;
|
|
251
|
+
_capabilities = /* @__PURE__ */ new Map();
|
|
252
|
+
_moduleMemoMap = /* @__PURE__ */ new Map();
|
|
253
|
+
_moduleSemaphores = /* @__PURE__ */ new Map();
|
|
254
|
+
// Coalesces concurrent `_resolveLazyPlugin` calls per plugin id. Without
|
|
255
|
+
// this, two callers entering `enable(id)` before the swap completes would
|
|
256
|
+
// each invoke `mod.default(options)` and produce distinct module objects,
|
|
257
|
+
// defeating `_addModule`'s reference-equality dedupe and racing the
|
|
258
|
+
// `_pluginsAtom` swap.
|
|
259
|
+
_resolvingPlugins = /* @__PURE__ */ new Map();
|
|
260
|
+
// Tracks dev-source plugins (loaded via a Vite dev server) keyed by id.
|
|
261
|
+
// When `shadow` is present, the entry has displaced an existing plugin —
|
|
262
|
+
// `remove` reinstates it and re-enables iff `wasEnabled`. Entries without a
|
|
263
|
+
// shadow are dev plugins with no underlying registry/builtin to restore.
|
|
264
|
+
// The atom mirrors the map's keys for UI subscribers (they don't need the
|
|
265
|
+
// shadow internals); the two stay in sync via {@link _markDev}/{@link _unmarkDev}.
|
|
266
|
+
_devPlugins = /* @__PURE__ */ new Map();
|
|
267
|
+
_devPluginIdsAtom;
|
|
268
|
+
_activatingEvents = Effect3.runSync(Ref.make([]));
|
|
269
|
+
_activatingModules = Effect3.runSync(Ref.make([]));
|
|
270
|
+
_inFlightFibers = Effect3.runSync(Ref.make([]));
|
|
271
|
+
_shutdownSemaphore = Effect3.runSync(Effect3.makeSemaphore(1));
|
|
272
|
+
_shuttingDown = Effect3.runSync(Ref.make(false));
|
|
273
|
+
// Tracks the constructor-launched core/enabled `enable()` calls so that
|
|
274
|
+
// `activate` can wait for module registration before dispatching events.
|
|
275
|
+
// Lazy plugins make `enable` asynchronous (a dynamic `import()` happens
|
|
276
|
+
// inside it), so without this synchronization an `activate` triggered
|
|
277
|
+
// immediately after `make` could fire on an empty module set. Failures
|
|
278
|
+
// are wrapped in `PluginInitializationError` so awaiters get a tagged
|
|
279
|
+
// error rather than the wide `Error` produced by the underlying chain.
|
|
280
|
+
_initialization = Effect3.runSync(Deferred2.make());
|
|
281
|
+
constructor({ pluginLoader, plugins = [], core = plugins.map(({ meta }) => meta.id), enabled = [], registry, pluginRegistryProvider, onRemove, loadTimeout = DEFAULT_LOAD_TIMEOUT, activationTimeout = DEFAULT_ACTIVATION_TIMEOUT }) {
|
|
282
|
+
this.registry = registry ?? Registry.make();
|
|
283
|
+
this.capabilities = make2({
|
|
284
|
+
registry: this.registry
|
|
285
|
+
});
|
|
286
|
+
this.pluginRegistry = new Manager(pluginRegistryProvider, this.registry);
|
|
287
|
+
this._pluginLoader = pluginLoader;
|
|
288
|
+
this._onRemove = onRemove;
|
|
289
|
+
this._loadTimeout = loadTimeout;
|
|
290
|
+
this._activationTimeout = activationTimeout;
|
|
291
|
+
this._pluginsAtom = Atom3.make(plugins).pipe(Atom3.keepAlive);
|
|
292
|
+
this._coreAtom = Atom3.make(core).pipe(Atom3.keepAlive);
|
|
293
|
+
this._enabledAtom = Atom3.make(enabled).pipe(Atom3.keepAlive);
|
|
294
|
+
this._modulesAtom = Atom3.make([]).pipe(Atom3.keepAlive);
|
|
295
|
+
this._activeAtom = Atom3.make([]).pipe(Atom3.keepAlive);
|
|
296
|
+
this._eventsFiredAtom = Atom3.make([]).pipe(Atom3.keepAlive);
|
|
297
|
+
this._pendingResetAtom = Atom3.make([]).pipe(Atom3.keepAlive);
|
|
298
|
+
this._failedAtom = Atom3.make([]).pipe(Atom3.keepAlive);
|
|
299
|
+
this._devPluginIdsAtom = Atom3.make([]).pipe(Atom3.keepAlive);
|
|
300
|
+
plugins.forEach((plugin) => this._addPlugin(plugin));
|
|
301
|
+
const initialIds = [
|
|
302
|
+
.../* @__PURE__ */ new Set([
|
|
303
|
+
...core,
|
|
304
|
+
...enabled
|
|
305
|
+
])
|
|
306
|
+
];
|
|
307
|
+
void Effect3.all(initialIds.map((id) => this.enable(id))).pipe(Effect3.mapError((cause) => new PluginInitializationError({
|
|
308
|
+
cause
|
|
309
|
+
})), Effect3.tap(() => Deferred2.succeed(this._initialization, void 0)), Effect3.tapErrorCause((cause) => Deferred2.failCause(this._initialization, cause))).pipe(runAndForwardErrors2);
|
|
310
|
+
}
|
|
311
|
+
get plugins() {
|
|
312
|
+
return this._pluginsAtom;
|
|
313
|
+
}
|
|
314
|
+
get core() {
|
|
315
|
+
return this._coreAtom;
|
|
316
|
+
}
|
|
317
|
+
/**
|
|
318
|
+
* Ids of plugins that are currently enabled.
|
|
319
|
+
*/
|
|
320
|
+
get enabled() {
|
|
321
|
+
return this._enabledAtom;
|
|
322
|
+
}
|
|
323
|
+
/**
|
|
324
|
+
* Modules of plugins which are currently enabled.
|
|
325
|
+
*/
|
|
326
|
+
get modules() {
|
|
327
|
+
return this._modulesAtom;
|
|
328
|
+
}
|
|
329
|
+
/**
|
|
330
|
+
* Ids of modules which are currently active.
|
|
331
|
+
*/
|
|
332
|
+
get active() {
|
|
333
|
+
return this._activeAtom;
|
|
334
|
+
}
|
|
335
|
+
/**
|
|
336
|
+
* Ids of events which have been fired.
|
|
337
|
+
*/
|
|
338
|
+
get eventsFired() {
|
|
339
|
+
return this._eventsFiredAtom;
|
|
340
|
+
}
|
|
341
|
+
/**
|
|
342
|
+
* Ids of modules which are pending reset.
|
|
343
|
+
*/
|
|
344
|
+
get pendingReset() {
|
|
345
|
+
return this._pendingResetAtom;
|
|
346
|
+
}
|
|
347
|
+
/**
|
|
348
|
+
* Plugins that failed to load or activate.
|
|
349
|
+
*/
|
|
350
|
+
get failed() {
|
|
351
|
+
return this._failedAtom;
|
|
352
|
+
}
|
|
353
|
+
/**
|
|
354
|
+
* Ids of currently-registered plugins that came from a dev source.
|
|
355
|
+
*/
|
|
356
|
+
get devPluginIds() {
|
|
357
|
+
return this._devPluginIdsAtom;
|
|
358
|
+
}
|
|
359
|
+
getPlugins() {
|
|
360
|
+
return this._get(this._pluginsAtom);
|
|
361
|
+
}
|
|
362
|
+
getCore() {
|
|
363
|
+
return this._get(this._coreAtom);
|
|
364
|
+
}
|
|
365
|
+
getEnabled() {
|
|
366
|
+
return this._get(this._enabledAtom);
|
|
367
|
+
}
|
|
368
|
+
getModules() {
|
|
369
|
+
return this._get(this._modulesAtom);
|
|
370
|
+
}
|
|
371
|
+
getActive() {
|
|
372
|
+
return this._get(this._activeAtom);
|
|
373
|
+
}
|
|
374
|
+
getEventsFired() {
|
|
375
|
+
return this._get(this._eventsFiredAtom);
|
|
376
|
+
}
|
|
377
|
+
getPendingReset() {
|
|
378
|
+
return this._get(this._pendingResetAtom);
|
|
379
|
+
}
|
|
380
|
+
getFailed() {
|
|
381
|
+
return this._get(this._failedAtom);
|
|
382
|
+
}
|
|
383
|
+
getDevPluginIds() {
|
|
384
|
+
return this._get(this._devPluginIdsAtom);
|
|
385
|
+
}
|
|
386
|
+
/**
|
|
387
|
+
* Marks `id` as dev-sourced. If the plugin displaced an existing one, pass
|
|
388
|
+
* the shadow snapshot so `remove` can restore it. Repeat calls (e.g. a dev
|
|
389
|
+
* plugin reload) preserve the original shadow target — restoration always
|
|
390
|
+
* unwinds back to the real underlying plugin, never an intermediate dev build.
|
|
391
|
+
*/
|
|
392
|
+
_markDev(id, shadow) {
|
|
393
|
+
if (this._devPlugins.has(id)) {
|
|
394
|
+
return;
|
|
395
|
+
}
|
|
396
|
+
this._devPlugins.set(id, {
|
|
397
|
+
shadow
|
|
398
|
+
});
|
|
399
|
+
this._update(this._devPluginIdsAtom, (ids) => ids.includes(id) ? ids : [
|
|
400
|
+
...ids,
|
|
401
|
+
id
|
|
402
|
+
]);
|
|
403
|
+
}
|
|
404
|
+
/** Drops the dev-plugin entry and returns its shadow data (if any) for restoration. */
|
|
405
|
+
_unmarkDev(id) {
|
|
406
|
+
const entry = this._devPlugins.get(id);
|
|
407
|
+
this._devPlugins.delete(id);
|
|
408
|
+
this._update(this._devPluginIdsAtom, (ids) => ids.filter((existing) => existing !== id));
|
|
409
|
+
return entry?.shadow;
|
|
410
|
+
}
|
|
411
|
+
clearFailure(id) {
|
|
412
|
+
const current = this._get(this._failedAtom);
|
|
413
|
+
if (!current.some((failure) => failure.id === id)) {
|
|
414
|
+
return false;
|
|
415
|
+
}
|
|
416
|
+
this._set(this._failedAtom, current.filter((failure) => failure.id !== id));
|
|
417
|
+
return true;
|
|
418
|
+
}
|
|
419
|
+
/**
|
|
420
|
+
* Adds a plugin to the manager via the plugin loader.
|
|
421
|
+
* The plugin is registered but not enabled; call `enable` separately to activate it.
|
|
422
|
+
* @param id The id of the plugin.
|
|
423
|
+
*/
|
|
424
|
+
add(id) {
|
|
425
|
+
return Effect3.gen(this, function* () {
|
|
426
|
+
log3("add plugin", {
|
|
427
|
+
id
|
|
428
|
+
}, { "~LogMeta": "~LogMeta", F: __dxlog_file3, L: 242, S: this });
|
|
429
|
+
const { plugin, dev = false } = yield* this._pluginLoader(id);
|
|
430
|
+
const pluginId = plugin.meta.id;
|
|
431
|
+
const existing = this._getPlugin(pluginId);
|
|
432
|
+
if (dev && existing && existing !== plugin) {
|
|
433
|
+
const wasEnabled = this._get(this._enabledAtom).includes(pluginId);
|
|
434
|
+
if (wasEnabled) {
|
|
435
|
+
yield* this.disable(pluginId);
|
|
436
|
+
}
|
|
437
|
+
this._markDev(pluginId, {
|
|
438
|
+
plugin: existing,
|
|
439
|
+
wasEnabled
|
|
440
|
+
});
|
|
441
|
+
this._update(this._pluginsAtom, (plugins) => plugins.map((p) => p.meta.id === pluginId ? plugin : p));
|
|
442
|
+
} else {
|
|
443
|
+
this._addPlugin(plugin);
|
|
444
|
+
if (dev) {
|
|
445
|
+
this._markDev(pluginId);
|
|
446
|
+
}
|
|
447
|
+
}
|
|
448
|
+
return plugin;
|
|
449
|
+
});
|
|
450
|
+
}
|
|
451
|
+
/**
|
|
452
|
+
* Enables a plugin.
|
|
453
|
+
* @param id The id of the plugin.
|
|
454
|
+
*/
|
|
455
|
+
enable(id) {
|
|
456
|
+
return Effect3.gen(this, function* () {
|
|
457
|
+
log3("enable plugin", {
|
|
458
|
+
id
|
|
459
|
+
}, { "~LogMeta": "~LogMeta", F: __dxlog_file3, L: 279, S: this });
|
|
460
|
+
const stub = this._getPlugin(id);
|
|
461
|
+
if (!stub) {
|
|
462
|
+
return false;
|
|
463
|
+
}
|
|
464
|
+
this.clearFailure(id);
|
|
465
|
+
const plugin = yield* this._resolveLazyPlugin(stub);
|
|
466
|
+
this._update(this._enabledAtom, (enabled) => enabled.includes(id) ? enabled : [
|
|
467
|
+
...enabled,
|
|
468
|
+
id
|
|
469
|
+
]);
|
|
470
|
+
plugin.modules.forEach((module) => {
|
|
471
|
+
this._addModule(module);
|
|
472
|
+
this._setPendingResetByModule(module);
|
|
473
|
+
});
|
|
474
|
+
log3("pending reset", {
|
|
475
|
+
events: [
|
|
476
|
+
...this.getPendingReset()
|
|
477
|
+
]
|
|
478
|
+
}, { "~LogMeta": "~LogMeta", F: __dxlog_file3, L: 298, S: this });
|
|
479
|
+
yield* Effect3.all(this.getPendingReset().map((event) => this.activate(event)), {
|
|
480
|
+
concurrency: "unbounded"
|
|
481
|
+
});
|
|
482
|
+
return true;
|
|
483
|
+
});
|
|
484
|
+
}
|
|
485
|
+
/**
|
|
486
|
+
* Resolves a lazy plugin stub (returned by {@link Plugin.lazy}) to its
|
|
487
|
+
* loaded form and swaps it into `_pluginsAtom`. Returns the input unchanged
|
|
488
|
+
* when the plugin is already resolved, so callers can `yield*` this
|
|
489
|
+
* unconditionally. The lazy stub carries `meta` synchronously but its
|
|
490
|
+
* `modules` list is empty until the loader resolves; the swap ensures
|
|
491
|
+
* subsequent enable/disable operations see the resolved plugin.
|
|
492
|
+
*
|
|
493
|
+
* Concurrent calls for the same id are coalesced via `_resolvingPlugins`:
|
|
494
|
+
* the first caller starts the resolution, every subsequent caller awaits
|
|
495
|
+
* the same `Deferred`. On failure we publish a `lazy:<id>` error message
|
|
496
|
+
* and skip the atom swap so the failure is observable to the activation
|
|
497
|
+
* subscriber and a retry can be attempted.
|
|
498
|
+
*/
|
|
499
|
+
_resolveLazyPlugin(plugin) {
|
|
500
|
+
return Effect3.gen(this, function* () {
|
|
501
|
+
if (!isLazy(plugin)) {
|
|
502
|
+
return plugin;
|
|
503
|
+
}
|
|
504
|
+
const id = plugin.meta.id;
|
|
505
|
+
const existing = this._resolvingPlugins.get(id);
|
|
506
|
+
if (existing) {
|
|
507
|
+
return yield* Deferred2.await(existing);
|
|
508
|
+
}
|
|
509
|
+
const deferred = yield* Deferred2.make();
|
|
510
|
+
this._resolvingPlugins.set(id, deferred);
|
|
511
|
+
return yield* Effect3.gen(this, function* () {
|
|
512
|
+
log3("resolving lazy plugin", {
|
|
513
|
+
id
|
|
514
|
+
}, { "~LogMeta": "~LogMeta", F: __dxlog_file3, L: 335, S: this });
|
|
515
|
+
yield* PubSub.publish(this.activation, {
|
|
516
|
+
event: "",
|
|
517
|
+
state: "activating",
|
|
518
|
+
module: `lazy:${id}`
|
|
519
|
+
});
|
|
520
|
+
const resolvedPlugin = yield* resolveLazy(plugin).pipe(
|
|
521
|
+
// Cap how long a remote import can hang. Without this the host can
|
|
522
|
+
// sit on a pending dynamic `import()` indefinitely if the plugin's
|
|
523
|
+
// server is unreachable, which stalls every caller awaiting
|
|
524
|
+
// `enable(id)` and (transitively) the manager's initialization.
|
|
525
|
+
Effect3.timeoutFail({
|
|
526
|
+
duration: this._loadTimeout,
|
|
527
|
+
onTimeout: () => new LazyPluginError({
|
|
528
|
+
context: {
|
|
529
|
+
id,
|
|
530
|
+
reason: "load-failed"
|
|
531
|
+
},
|
|
532
|
+
cause: new PluginTimeoutError({
|
|
533
|
+
context: {
|
|
534
|
+
id,
|
|
535
|
+
phase: "load"
|
|
536
|
+
}
|
|
537
|
+
})
|
|
538
|
+
})
|
|
539
|
+
})
|
|
540
|
+
);
|
|
541
|
+
this._update(this._pluginsAtom, (plugins) => plugins.map((p) => p.meta.id === id ? resolvedPlugin : p));
|
|
542
|
+
yield* PubSub.publish(this.activation, {
|
|
543
|
+
event: "",
|
|
544
|
+
state: "activated",
|
|
545
|
+
module: `lazy:${id}`
|
|
546
|
+
});
|
|
547
|
+
return resolvedPlugin;
|
|
548
|
+
}).pipe(Effect3.tapError((error) => Effect3.gen(this, function* () {
|
|
549
|
+
yield* PubSub.publish(this.activation, {
|
|
550
|
+
event: "",
|
|
551
|
+
state: "error",
|
|
552
|
+
module: `lazy:${id}`,
|
|
553
|
+
error
|
|
554
|
+
});
|
|
555
|
+
this._recordFailure(id, "load", error);
|
|
556
|
+
this._scheduleAutoDisable(id);
|
|
557
|
+
})), Effect3.tap((value) => Deferred2.succeed(deferred, value)), Effect3.tapErrorCause((cause) => Deferred2.failCause(deferred, cause)), Effect3.ensuring(Effect3.sync(() => this._resolvingPlugins.delete(id))));
|
|
558
|
+
});
|
|
559
|
+
}
|
|
560
|
+
/**
|
|
561
|
+
* Removes a plugin from the manager.
|
|
562
|
+
* @param id The id of the plugin.
|
|
563
|
+
*/
|
|
564
|
+
remove(id) {
|
|
565
|
+
return Effect3.gen(this, function* () {
|
|
566
|
+
log3("remove plugin", {
|
|
567
|
+
id
|
|
568
|
+
}, { "~LogMeta": "~LogMeta", F: __dxlog_file3, L: 386, S: this });
|
|
569
|
+
const wasDev = this._devPlugins.has(id);
|
|
570
|
+
const disabled = yield* this.disable(id);
|
|
571
|
+
if (!disabled) {
|
|
572
|
+
return false;
|
|
573
|
+
}
|
|
574
|
+
this._removePlugin(id);
|
|
575
|
+
if (this._onRemove) {
|
|
576
|
+
this._runForkedFiber(this._onRemove(id).pipe(Effect3.tapError((error) => Effect3.sync(() => log3.warn("plugin remove hook failed", {
|
|
577
|
+
id,
|
|
578
|
+
error
|
|
579
|
+
}, { "~LogMeta": "~LogMeta", F: __dxlog_file3, L: 396, S: this }))), Effect3.ignore));
|
|
580
|
+
}
|
|
581
|
+
if (wasDev) {
|
|
582
|
+
const shadow = this._unmarkDev(id);
|
|
583
|
+
if (shadow) {
|
|
584
|
+
this._addPlugin(shadow.plugin);
|
|
585
|
+
if (shadow.wasEnabled) {
|
|
586
|
+
yield* this.enable(id);
|
|
587
|
+
}
|
|
588
|
+
}
|
|
589
|
+
}
|
|
590
|
+
return true;
|
|
591
|
+
});
|
|
592
|
+
}
|
|
593
|
+
/**
|
|
594
|
+
* Disables a plugin.
|
|
595
|
+
* @param id The id of the plugin.
|
|
596
|
+
*/
|
|
597
|
+
disable(id) {
|
|
598
|
+
return Effect3.gen(this, function* () {
|
|
599
|
+
log3("disable plugin", {
|
|
600
|
+
id
|
|
601
|
+
}, { "~LogMeta": "~LogMeta", F: __dxlog_file3, L: 423, S: this });
|
|
602
|
+
if (this._get(this._coreAtom).includes(id)) {
|
|
603
|
+
return false;
|
|
604
|
+
}
|
|
605
|
+
const plugin = this._getPlugin(id);
|
|
606
|
+
if (!plugin) {
|
|
607
|
+
return false;
|
|
608
|
+
}
|
|
609
|
+
const enabledIndex = this._get(this._enabledAtom).findIndex((enabled) => enabled === id);
|
|
610
|
+
if (enabledIndex !== -1) {
|
|
611
|
+
this._update(this._enabledAtom, (enabled) => enabled.filter((item) => item !== id));
|
|
612
|
+
yield* this.deactivate(id);
|
|
613
|
+
plugin.modules.forEach((module) => {
|
|
614
|
+
this._removeModule(module.id);
|
|
615
|
+
});
|
|
616
|
+
}
|
|
617
|
+
return true;
|
|
618
|
+
});
|
|
619
|
+
}
|
|
620
|
+
/**
|
|
621
|
+
* Activates plugins based on the activation event.
|
|
622
|
+
* @param event The activation event.
|
|
623
|
+
* @returns Whether the activation was successful.
|
|
624
|
+
*/
|
|
625
|
+
activate(event, params) {
|
|
626
|
+
const key = typeof event === "string" ? event : eventKey(event);
|
|
627
|
+
return Effect3.gen(this, function* () {
|
|
628
|
+
if (yield* this._isShuttingDown()) {
|
|
629
|
+
log3("skipping activation during shutdown", {
|
|
630
|
+
key,
|
|
631
|
+
...params
|
|
632
|
+
}, { "~LogMeta": "~LogMeta", F: __dxlog_file3, L: 452, S: this });
|
|
633
|
+
return false;
|
|
634
|
+
}
|
|
635
|
+
yield* Deferred2.await(this._initialization);
|
|
636
|
+
return yield* Effect3.withFiberRuntime((fiber) => this._activateEvent(key, params, fiber).pipe(together(Effect3.sleep(Duration.seconds(15)).pipe(Effect3.andThen(Effect3.sync(() => log3.warn("event activation is taking a long time", {
|
|
637
|
+
event: key
|
|
638
|
+
}, { "~LogMeta": "~LogMeta", F: __dxlog_file3, L: 463, S: this }))))), Performance.addTrackEntry({
|
|
639
|
+
name: typeof event === "string" ? event : eventKey(event),
|
|
640
|
+
devtools: {
|
|
641
|
+
dataType: "track-entry",
|
|
642
|
+
track: "Event Activation",
|
|
643
|
+
trackGroup: "Composer",
|
|
644
|
+
color: "primary"
|
|
645
|
+
}
|
|
646
|
+
})));
|
|
647
|
+
});
|
|
648
|
+
}
|
|
649
|
+
/**
|
|
650
|
+
* Deactivates all of the modules for a plugin.
|
|
651
|
+
* @param id The id of the plugin.
|
|
652
|
+
* @returns Whether the deactivation was successful.
|
|
653
|
+
*/
|
|
654
|
+
deactivate(id) {
|
|
655
|
+
return Effect3.gen(this, function* () {
|
|
656
|
+
const plugin = this._getPlugin(id);
|
|
657
|
+
if (!plugin) {
|
|
658
|
+
return false;
|
|
659
|
+
}
|
|
660
|
+
const modules = plugin.modules;
|
|
661
|
+
const results = yield* Effect3.all(modules.map((module) => this._deactivateModule(module)), {
|
|
662
|
+
concurrency: "unbounded"
|
|
663
|
+
});
|
|
664
|
+
return results.every((result) => result);
|
|
665
|
+
});
|
|
666
|
+
}
|
|
667
|
+
/**
|
|
668
|
+
* Re-activates the modules that were activated by the event.
|
|
669
|
+
* @param event The activation event.
|
|
670
|
+
* @returns Whether the reset was successful.
|
|
671
|
+
*/
|
|
672
|
+
reset(event) {
|
|
673
|
+
return Effect3.gen(this, function* () {
|
|
674
|
+
const key = typeof event === "string" ? event : eventKey(event);
|
|
675
|
+
log3("reset", {
|
|
676
|
+
key
|
|
677
|
+
}, { "~LogMeta": "~LogMeta", F: __dxlog_file3, L: 500, S: this });
|
|
678
|
+
const modules = this._getActiveModulesByEvent(key);
|
|
679
|
+
const results = yield* Effect3.all(modules.map((module) => this._deactivateModule(module)), {
|
|
680
|
+
concurrency: "unbounded"
|
|
681
|
+
});
|
|
682
|
+
if (results.every((result) => result)) {
|
|
683
|
+
return yield* this.activate(key);
|
|
684
|
+
} else {
|
|
685
|
+
return false;
|
|
686
|
+
}
|
|
687
|
+
});
|
|
688
|
+
}
|
|
689
|
+
shutdown() {
|
|
690
|
+
return this._shutdownSemaphore.withPermits(1)(Effect3.gen(this, function* () {
|
|
691
|
+
yield* Ref.set(this._shuttingDown, true);
|
|
692
|
+
log3("shutdown", void 0, { "~LogMeta": "~LogMeta", F: __dxlog_file3, L: 517, S: this });
|
|
693
|
+
yield* this._interruptInFlightActivations();
|
|
694
|
+
const activeIds = [
|
|
695
|
+
...this._get(this._activeAtom)
|
|
696
|
+
].reverse();
|
|
697
|
+
const allModules = this._get(this._modulesAtom);
|
|
698
|
+
const modulesToDeactivate = activeIds.map((id) => allModules.find((module) => module.id === id)).filter((module) => module != null);
|
|
699
|
+
for (const module of modulesToDeactivate) {
|
|
700
|
+
yield* this._deactivateModule(module);
|
|
701
|
+
}
|
|
702
|
+
this._set(this._eventsFiredAtom, []);
|
|
703
|
+
this._set(this._pendingResetAtom, []);
|
|
704
|
+
this._moduleMemoMap.clear();
|
|
705
|
+
yield* Ref.set(this._activatingEvents, []);
|
|
706
|
+
yield* Ref.set(this._activatingModules, []);
|
|
707
|
+
log3("shutdown complete", void 0, { "~LogMeta": "~LogMeta", F: __dxlog_file3, L: 532, S: this });
|
|
708
|
+
return true;
|
|
709
|
+
}).pipe(Effect3.ensuring(Ref.set(this._shuttingDown, false))));
|
|
710
|
+
}
|
|
711
|
+
//
|
|
712
|
+
// State helpers
|
|
713
|
+
//
|
|
714
|
+
_get(atom) {
|
|
715
|
+
return this.registry.get(atom);
|
|
716
|
+
}
|
|
717
|
+
_set(atom, value) {
|
|
718
|
+
this.registry.set(atom, value);
|
|
719
|
+
}
|
|
720
|
+
_update(atom, updater) {
|
|
721
|
+
this._set(atom, updater(this._get(atom)));
|
|
722
|
+
}
|
|
723
|
+
_isShuttingDown() {
|
|
724
|
+
return Ref.get(this._shuttingDown);
|
|
725
|
+
}
|
|
726
|
+
_getPlugin(id) {
|
|
727
|
+
return this._get(this._pluginsAtom).find((plugin) => plugin.meta.id === id);
|
|
728
|
+
}
|
|
729
|
+
_getPluginIdForModule(moduleId) {
|
|
730
|
+
return this._get(this._pluginsAtom).find((plugin) => plugin.modules.some((module) => module.id === moduleId))?.meta.id;
|
|
731
|
+
}
|
|
732
|
+
/**
|
|
733
|
+
* Records a failure for a plugin. Latest failure wins so the registry UI
|
|
734
|
+
* always sees the most recent reason. Walks the `cause` chain when checking
|
|
735
|
+
* for timeouts: lazy-load timeouts arrive wrapped in `LazyPluginError` (the
|
|
736
|
+
* timeout is the cause), but the operator-visible reason should still be
|
|
737
|
+
* `'timeout'`.
|
|
738
|
+
*/
|
|
739
|
+
_recordFailure(id, phase, error) {
|
|
740
|
+
const reason = isTimeoutCause(error) ? "timeout" : "error";
|
|
741
|
+
const failure = {
|
|
742
|
+
id,
|
|
743
|
+
phase,
|
|
744
|
+
reason,
|
|
745
|
+
error,
|
|
746
|
+
timestamp: Date.now()
|
|
747
|
+
};
|
|
748
|
+
log3.warn("plugin failed", {
|
|
749
|
+
id,
|
|
750
|
+
phase,
|
|
751
|
+
reason,
|
|
752
|
+
error: error.message
|
|
753
|
+
}, { "~LogMeta": "~LogMeta", F: __dxlog_file3, L: 572, S: this });
|
|
754
|
+
this._update(this._failedAtom, (current) => [
|
|
755
|
+
...current.filter((entry) => entry.id !== id),
|
|
756
|
+
failure
|
|
757
|
+
]);
|
|
758
|
+
}
|
|
759
|
+
/**
|
|
760
|
+
* Fire-and-forget disable of a failed plugin. Forked because a failure can
|
|
761
|
+
* happen mid-activation chain — yielding a `disable` inline would deadlock
|
|
762
|
+
* on the shared semaphores. Core plugins are skipped (the host opted into
|
|
763
|
+
* them being non-removable; the failure record is enough signal).
|
|
764
|
+
*/
|
|
765
|
+
_scheduleAutoDisable(id) {
|
|
766
|
+
if (this._get(this._coreAtom).includes(id)) {
|
|
767
|
+
return;
|
|
768
|
+
}
|
|
769
|
+
if (!this._get(this._enabledAtom).includes(id)) {
|
|
770
|
+
return;
|
|
771
|
+
}
|
|
772
|
+
this._runForkedFiber(this.disable(id).pipe(Effect3.tapError((error) => Effect3.sync(() => log3.warn("auto-disable failed", {
|
|
773
|
+
id,
|
|
774
|
+
error
|
|
775
|
+
}, { "~LogMeta": "~LogMeta", F: __dxlog_file3, L: 595, S: this }))), Effect3.ignore));
|
|
776
|
+
}
|
|
777
|
+
_getActiveModules() {
|
|
778
|
+
const active = this._get(this._activeAtom);
|
|
779
|
+
return this._get(this._modulesAtom).filter((module) => active.includes(module.id));
|
|
780
|
+
}
|
|
781
|
+
_getInactiveModules() {
|
|
782
|
+
const active = this._get(this._activeAtom);
|
|
783
|
+
return this._get(this._modulesAtom).filter((module) => !active.includes(module.id));
|
|
784
|
+
}
|
|
785
|
+
_getActiveModulesByEvent(key) {
|
|
786
|
+
return this._getActiveModules().filter((module) => getEvents(module.activatesOn).map(eventKey).includes(key));
|
|
787
|
+
}
|
|
788
|
+
_getInactiveModulesByEvent(key) {
|
|
789
|
+
return this._getInactiveModules().filter((module) => getEvents(module.activatesOn).map(eventKey).includes(key));
|
|
790
|
+
}
|
|
791
|
+
_setPendingResetByModule(module) {
|
|
792
|
+
const activationEvents = getEvents(module.activatesOn).map(eventKey).filter((key) => this._get(this._eventsFiredAtom).includes(key));
|
|
793
|
+
const pendingReset = Array.fromIterable(new Set(activationEvents)).filter((event) => {
|
|
794
|
+
const pending = this._get(this._pendingResetAtom);
|
|
795
|
+
return !pending.includes(event);
|
|
796
|
+
});
|
|
797
|
+
if (pendingReset.length > 0) {
|
|
798
|
+
log3("pending reset", {
|
|
799
|
+
events: pendingReset
|
|
800
|
+
}, { "~LogMeta": "~LogMeta", F: __dxlog_file3, L: 621, S: this });
|
|
801
|
+
this._update(this._pendingResetAtom, (current) => [
|
|
802
|
+
...current,
|
|
803
|
+
...pendingReset
|
|
804
|
+
]);
|
|
805
|
+
}
|
|
806
|
+
}
|
|
807
|
+
_clearPendingReset(key) {
|
|
808
|
+
const pendingIndex = this._get(this._pendingResetAtom).findIndex((event) => event === key);
|
|
809
|
+
if (pendingIndex !== -1) {
|
|
810
|
+
this._update(this._pendingResetAtom, (pending) => pending.filter((event) => event !== key));
|
|
811
|
+
}
|
|
812
|
+
}
|
|
813
|
+
//
|
|
814
|
+
// Fiber helpers
|
|
815
|
+
//
|
|
816
|
+
_interruptInFlightActivations() {
|
|
817
|
+
return Effect3.gen(this, function* () {
|
|
818
|
+
const inFlightFibers = yield* Ref.get(this._inFlightFibers);
|
|
819
|
+
yield* Effect3.forEach(inFlightFibers, (fiber) => Fiber.interrupt(fiber), {
|
|
820
|
+
concurrency: "unbounded"
|
|
821
|
+
});
|
|
822
|
+
});
|
|
823
|
+
}
|
|
824
|
+
_trackFiber(ref, fiber) {
|
|
825
|
+
return Ref.update(ref, (fibers) => [
|
|
826
|
+
...fibers,
|
|
827
|
+
fiber
|
|
828
|
+
]);
|
|
829
|
+
}
|
|
830
|
+
_untrackFiber(ref, fiber) {
|
|
831
|
+
return Ref.update(ref, (fibers) => fibers.filter((trackedFiber) => trackedFiber !== fiber));
|
|
832
|
+
}
|
|
833
|
+
/**
|
|
834
|
+
* Spawns an effect on the default runtime and registers the resulting fiber in
|
|
835
|
+
* `_inFlightFibers` so {@link shutdown} can interrupt it. Used from sync entry
|
|
836
|
+
* points like {@link remove} where there is no enclosing Effect to fork from;
|
|
837
|
+
* inside an Effect chain prefer the existing track/await/untrack pattern.
|
|
838
|
+
*/
|
|
839
|
+
_runForkedFiber(effect) {
|
|
840
|
+
const fiber = Effect3.runFork(effect);
|
|
841
|
+
Effect3.runSync(this._trackFiber(this._inFlightFibers, fiber));
|
|
842
|
+
Effect3.runFork(Fiber.await(fiber).pipe(Effect3.andThen(() => this._untrackFiber(this._inFlightFibers, fiber))));
|
|
843
|
+
}
|
|
844
|
+
//
|
|
845
|
+
// Registration helpers
|
|
846
|
+
//
|
|
847
|
+
_addPlugin(plugin) {
|
|
848
|
+
log3("add plugin", {
|
|
849
|
+
id: plugin.meta.id
|
|
850
|
+
}, { "~LogMeta": "~LogMeta", F: __dxlog_file3, L: 670, S: this });
|
|
851
|
+
this._update(this._pluginsAtom, (plugins) => plugins.includes(plugin) ? plugins : [
|
|
852
|
+
...plugins,
|
|
853
|
+
plugin
|
|
854
|
+
]);
|
|
855
|
+
}
|
|
856
|
+
_removePlugin(id) {
|
|
857
|
+
log3("remove plugin", {
|
|
858
|
+
id
|
|
859
|
+
}, { "~LogMeta": "~LogMeta", F: __dxlog_file3, L: 680, S: this });
|
|
860
|
+
this._update(this._pluginsAtom, (plugins) => plugins.filter((plugin) => plugin.meta.id !== id));
|
|
861
|
+
}
|
|
862
|
+
_addModule(module) {
|
|
863
|
+
log3("add module", {
|
|
864
|
+
id: module.id
|
|
865
|
+
}, { "~LogMeta": "~LogMeta", F: __dxlog_file3, L: 686, S: this });
|
|
866
|
+
this._update(this._modulesAtom, (modules) => modules.includes(module) ? modules : [
|
|
867
|
+
...modules,
|
|
868
|
+
module
|
|
869
|
+
]);
|
|
870
|
+
}
|
|
871
|
+
_removeModule(id) {
|
|
872
|
+
log3("remove module", {
|
|
873
|
+
id
|
|
874
|
+
}, { "~LogMeta": "~LogMeta", F: __dxlog_file3, L: 696, S: this });
|
|
875
|
+
this._update(this._modulesAtom, (modules) => modules.filter((module) => module.id !== id));
|
|
876
|
+
}
|
|
877
|
+
//
|
|
878
|
+
// Activation helpers
|
|
879
|
+
//
|
|
880
|
+
_activateEvent(key, params, fiber) {
|
|
881
|
+
return Effect3.gen(this, function* () {
|
|
882
|
+
yield* this._trackFiber(this._inFlightFibers, fiber);
|
|
883
|
+
log3("activating", {
|
|
884
|
+
key,
|
|
885
|
+
...params
|
|
886
|
+
}, { "~LogMeta": "~LogMeta", F: __dxlog_file3, L: 707, S: this });
|
|
887
|
+
yield* Ref.update(this._activatingEvents, (activating) => Array.append(activating, key));
|
|
888
|
+
this._clearPendingReset(key);
|
|
889
|
+
const activatingEvents = yield* this._activatingEvents;
|
|
890
|
+
const activatingModules = yield* this._activatingModules;
|
|
891
|
+
const modules = this._getModulesForActivation(key, activatingEvents, activatingModules);
|
|
892
|
+
if (modules.length === 0) {
|
|
893
|
+
log3("no modules to activate", {
|
|
894
|
+
key
|
|
895
|
+
}, { "~LogMeta": "~LogMeta", F: __dxlog_file3, L: 717, S: this });
|
|
896
|
+
if (!this._get(this._eventsFiredAtom).includes(key)) {
|
|
897
|
+
this._update(this._eventsFiredAtom, (events) => [
|
|
898
|
+
...events,
|
|
899
|
+
key
|
|
900
|
+
]);
|
|
901
|
+
}
|
|
902
|
+
return false;
|
|
903
|
+
}
|
|
904
|
+
return yield* this._activateModulesForEvent(key, modules, activatingEvents);
|
|
905
|
+
}).pipe(Effect3.ensuring(Effect3.all([
|
|
906
|
+
this._untrackFiber(this._inFlightFibers, fiber),
|
|
907
|
+
Ref.update(this._activatingEvents, (activating) => Array.filter(activating, (event) => event !== key))
|
|
908
|
+
])));
|
|
909
|
+
}
|
|
910
|
+
_activateModulesForEvent(key, modules, activatingEvents) {
|
|
911
|
+
const activatingModuleIds = modules.map((module) => module.id);
|
|
912
|
+
return Effect3.gen(this, function* () {
|
|
913
|
+
yield* Ref.update(this._activatingModules, (activating) => Array.appendAll(activating, activatingModuleIds));
|
|
914
|
+
log3("activating modules", {
|
|
915
|
+
key,
|
|
916
|
+
modules: activatingModuleIds
|
|
917
|
+
}, { "~LogMeta": "~LogMeta", F: __dxlog_file3, L: 738, S: this });
|
|
918
|
+
performance.mark(`event:${key}:start`);
|
|
919
|
+
yield* PubSub.publish(this.activation, {
|
|
920
|
+
event: key,
|
|
921
|
+
state: "activating"
|
|
922
|
+
});
|
|
923
|
+
yield* this._activateRelatedEvents(key, this._getBeforeEvents(modules, activatingEvents), "before");
|
|
924
|
+
const capabilities = yield* this._loadCapabilitiesForModules(key, modules);
|
|
925
|
+
yield* this._contributeCapabilitiesForModules(modules, capabilities);
|
|
926
|
+
yield* this._activateRelatedEvents(key, this._getAfterEvents(modules, activatingEvents), "after");
|
|
927
|
+
if (!this._get(this._eventsFiredAtom).includes(key)) {
|
|
928
|
+
this._update(this._eventsFiredAtom, (events) => [
|
|
929
|
+
...events,
|
|
930
|
+
key
|
|
931
|
+
]);
|
|
932
|
+
}
|
|
933
|
+
performance.mark(`event:${key}:end`);
|
|
934
|
+
performance.measure(`event:${key}`, `event:${key}:start`, `event:${key}:end`);
|
|
935
|
+
yield* PubSub.publish(this.activation, {
|
|
936
|
+
event: key,
|
|
937
|
+
state: "activated"
|
|
938
|
+
});
|
|
939
|
+
log3("activated", {
|
|
940
|
+
key
|
|
941
|
+
}, { "~LogMeta": "~LogMeta", F: __dxlog_file3, L: 763, S: this });
|
|
942
|
+
return true;
|
|
943
|
+
}).pipe(Effect3.ensuring(Ref.update(this._activatingModules, (activating) => Array.filter(activating, (module) => !activatingModuleIds.includes(module)))));
|
|
944
|
+
}
|
|
945
|
+
_getModulesForActivation(key, activatingEvents, activatingModules) {
|
|
946
|
+
return this._getInactiveModulesByEvent(key).filter((module) => {
|
|
947
|
+
const allOf = isAllOf(module.activatesOn);
|
|
948
|
+
if (!allOf) {
|
|
949
|
+
return true;
|
|
950
|
+
}
|
|
951
|
+
const events = getEvents(module.activatesOn).filter((event) => eventKey(event) !== key);
|
|
952
|
+
return events.every((event) => this._get(this._eventsFiredAtom).includes(eventKey(event)) || activatingEvents.includes(eventKey(event))) && !activatingModules.includes(module.id);
|
|
953
|
+
});
|
|
954
|
+
}
|
|
955
|
+
_getBeforeEvents(modules, activatingEvents) {
|
|
956
|
+
return Function.pipe(modules, Array.flatMap((module) => module.firesBeforeActivation ?? []), HashSet.fromIterable, HashSet.toValues, Array.filter((event) => !activatingEvents.includes(eventKey(event))));
|
|
957
|
+
}
|
|
958
|
+
_getAfterEvents(modules, activatingEvents) {
|
|
959
|
+
return Function.pipe(modules, Array.flatMap((module) => module.firesAfterActivation ?? []), HashSet.fromIterable, HashSet.toValues, Array.filter((event) => !activatingEvents.includes(eventKey(event))));
|
|
960
|
+
}
|
|
961
|
+
_activateRelatedEvents(key, events, phase) {
|
|
962
|
+
const logLabel = phase === "before" ? "firesBeforeActivation" : "firesAfterActivation";
|
|
963
|
+
const eventKey2 = phase === "before" ? "beforeEvents" : "afterEvents";
|
|
964
|
+
return Function.pipe(events, Array.map((event) => this.activate(event, phase === "before" ? {
|
|
965
|
+
before: key
|
|
966
|
+
} : {
|
|
967
|
+
after: key
|
|
968
|
+
})), Effect3.allWith({
|
|
969
|
+
concurrency: "unbounded"
|
|
970
|
+
}), together(Effect3.sleep(Duration.seconds(10)).pipe(Effect3.andThen(Effect3.sync(() => log3.warn(`${logLabel} is taking a long time`, {
|
|
971
|
+
event: key,
|
|
972
|
+
[eventKey2]: events.map(eventKey)
|
|
973
|
+
}, { "~LogMeta": "~LogMeta", F: __dxlog_file3, L: 796, S: this }))))), Effect3.asVoid);
|
|
974
|
+
}
|
|
975
|
+
//
|
|
976
|
+
// Module lifecycle helpers
|
|
977
|
+
//
|
|
978
|
+
_loadCapabilitiesForModules(key, modules) {
|
|
979
|
+
return Function.pipe(modules, Array.map((mod) => this._loadModule(mod, key)), Effect3.allWith({
|
|
980
|
+
concurrency: "unbounded"
|
|
981
|
+
}), Effect3.catchAll((error) => {
|
|
982
|
+
return Effect3.gen(this, function* () {
|
|
983
|
+
yield* PubSub.publish(this.activation, {
|
|
984
|
+
event: key,
|
|
985
|
+
state: "error",
|
|
986
|
+
error
|
|
987
|
+
});
|
|
988
|
+
return yield* Effect3.fail(error);
|
|
989
|
+
});
|
|
990
|
+
}));
|
|
991
|
+
}
|
|
992
|
+
_contributeCapabilitiesForModules(modules, capabilities) {
|
|
993
|
+
return Function.pipe(
|
|
994
|
+
modules,
|
|
995
|
+
Array.zip(capabilities),
|
|
996
|
+
Array.map(([module, capabilitySet]) => this._contributeCapabilities(module, capabilitySet)),
|
|
997
|
+
Effect3.all,
|
|
998
|
+
Effect3.asVoid
|
|
999
|
+
);
|
|
1000
|
+
}
|
|
1001
|
+
_getModuleSemaphore(moduleId) {
|
|
1002
|
+
let semaphore = this._moduleSemaphores.get(moduleId);
|
|
1003
|
+
if (!semaphore) {
|
|
1004
|
+
semaphore = Effect3.runSync(Effect3.makeSemaphore(1));
|
|
1005
|
+
this._moduleSemaphores.set(moduleId, semaphore);
|
|
1006
|
+
}
|
|
1007
|
+
return semaphore;
|
|
1008
|
+
}
|
|
1009
|
+
// `parentEvent` is the activation event that first triggered this module
|
|
1010
|
+
// load — included in `activating`/`activated` PubSub messages so subscribers
|
|
1011
|
+
// (e.g. the boot loader's status listener) can associate a module with its
|
|
1012
|
+
// triggering event in the trace. The same module may be referenced by
|
|
1013
|
+
// multiple events, but module loads are memoized via `_moduleMemoMap`, so
|
|
1014
|
+
// only the first event to need it will appear here; later events await the
|
|
1015
|
+
// cached deferred without re-publishing.
|
|
1016
|
+
_loadModule = (module, parentEvent) => Effect3.gen(this, function* () {
|
|
1017
|
+
const semaphore = this._getModuleSemaphore(module.id);
|
|
1018
|
+
const deferredToAwait = yield* Effect3.gen(this, function* () {
|
|
1019
|
+
const existing = this._moduleMemoMap.get(module.id);
|
|
1020
|
+
if (existing) {
|
|
1021
|
+
return existing;
|
|
1022
|
+
}
|
|
1023
|
+
const deferred = yield* Deferred2.make();
|
|
1024
|
+
this._moduleMemoMap.set(module.id, deferred);
|
|
1025
|
+
const loadEffect = Effect3.gen(this, function* () {
|
|
1026
|
+
log3("loading module", {
|
|
1027
|
+
module: module.id,
|
|
1028
|
+
parentEvent
|
|
1029
|
+
}, { "~LogMeta": "~LogMeta", F: __dxlog_file3, L: 854, S: this });
|
|
1030
|
+
performance.mark(`module:${module.id}:start`);
|
|
1031
|
+
yield* PubSub.publish(this.activation, {
|
|
1032
|
+
event: parentEvent,
|
|
1033
|
+
state: "activating",
|
|
1034
|
+
module: module.id
|
|
1035
|
+
});
|
|
1036
|
+
const pluginId = this._getPluginIdForModule(module.id);
|
|
1037
|
+
const [duration, capabilities] = yield* module.activate().pipe(
|
|
1038
|
+
Effect3.provideService(Service, this.capabilities),
|
|
1039
|
+
Effect3.provideService(Service2, this),
|
|
1040
|
+
// Cap activation so a single misbehaving module can't hold the
|
|
1041
|
+
// event chain open. On timeout the failure is recorded against
|
|
1042
|
+
// the plugin and surfaced as `PluginTimeoutError`.
|
|
1043
|
+
Effect3.timeoutFail({
|
|
1044
|
+
duration: this._activationTimeout,
|
|
1045
|
+
onTimeout: () => new PluginTimeoutError({
|
|
1046
|
+
context: {
|
|
1047
|
+
id: pluginId ?? module.id,
|
|
1048
|
+
module: module.id,
|
|
1049
|
+
phase: "activation"
|
|
1050
|
+
}
|
|
1051
|
+
})
|
|
1052
|
+
}),
|
|
1053
|
+
Effect3.timed
|
|
1054
|
+
);
|
|
1055
|
+
const normalized = capabilities == null ? [] : Array.isArray(capabilities) ? capabilities : [
|
|
1056
|
+
capabilities
|
|
1057
|
+
];
|
|
1058
|
+
const elapsed = Duration.toMillis(duration);
|
|
1059
|
+
performance.mark(`module:${module.id}:end`);
|
|
1060
|
+
performance.measure(`module:${module.id}`, `module:${module.id}:start`, `module:${module.id}:end`);
|
|
1061
|
+
yield* PubSub.publish(this.activation, {
|
|
1062
|
+
event: parentEvent,
|
|
1063
|
+
state: "activated",
|
|
1064
|
+
module: module.id
|
|
1065
|
+
});
|
|
1066
|
+
log3("loaded module", {
|
|
1067
|
+
module: module.id,
|
|
1068
|
+
parentEvent,
|
|
1069
|
+
elapsed,
|
|
1070
|
+
failed: false
|
|
1071
|
+
}, { "~LogMeta": "~LogMeta", F: __dxlog_file3, L: 889, S: this });
|
|
1072
|
+
return normalized;
|
|
1073
|
+
}).pipe(Effect3.withSpan("PluginManager._loadModule"), together(Effect3.sleep(Duration.seconds(10)).pipe(Effect3.andThen(Effect3.sync(() => log3.warn(`module is taking a long time to activate`, {
|
|
1074
|
+
module: module.id
|
|
1075
|
+
}, { "~LogMeta": "~LogMeta", F: __dxlog_file3, L: 896, S: this }))))), Performance.addTrackEntry({
|
|
1076
|
+
name: module.id,
|
|
1077
|
+
devtools: {
|
|
1078
|
+
dataType: "track-entry",
|
|
1079
|
+
track: "Module Activation",
|
|
1080
|
+
trackGroup: "Composer",
|
|
1081
|
+
color: "primary"
|
|
1082
|
+
}
|
|
1083
|
+
}));
|
|
1084
|
+
const fiber = yield* Effect3.forkDaemon(loadEffect.pipe(Effect3.tap((result) => Deferred2.succeed(deferred, result)), Effect3.catchAllCause((cause) => {
|
|
1085
|
+
const error = Cause.squash(cause);
|
|
1086
|
+
log3.error("module failed to activate", {
|
|
1087
|
+
module: module.id,
|
|
1088
|
+
error: error instanceof Error ? error.message : String(error),
|
|
1089
|
+
stack: error instanceof Error ? error.stack : void 0,
|
|
1090
|
+
isDefect: !Cause.isFailure(cause)
|
|
1091
|
+
}, { "~LogMeta": "~LogMeta", F: __dxlog_file3, L: 910, S: this });
|
|
1092
|
+
const normalizedError = error instanceof Error ? error : new Error(String(error));
|
|
1093
|
+
const pluginId = this._getPluginIdForModule(module.id);
|
|
1094
|
+
if (pluginId !== void 0) {
|
|
1095
|
+
this._recordFailure(pluginId, "activation", normalizedError);
|
|
1096
|
+
this._scheduleAutoDisable(pluginId);
|
|
1097
|
+
}
|
|
1098
|
+
return Deferred2.fail(deferred, normalizedError);
|
|
1099
|
+
})));
|
|
1100
|
+
yield* this._trackFiber(this._inFlightFibers, fiber);
|
|
1101
|
+
yield* Effect3.forkDaemon(Fiber.await(fiber).pipe(Effect3.andThen(() => this._untrackFiber(this._inFlightFibers, fiber))));
|
|
1102
|
+
return deferred;
|
|
1103
|
+
}).pipe(semaphore.withPermits(1));
|
|
1104
|
+
return yield* Deferred2.await(deferredToAwait);
|
|
1105
|
+
});
|
|
1106
|
+
_contributeCapabilities(module, capabilities) {
|
|
1107
|
+
return Effect3.gen(this, function* () {
|
|
1108
|
+
capabilities.forEach((capability) => {
|
|
1109
|
+
this.capabilities.contribute({
|
|
1110
|
+
module: module.id,
|
|
1111
|
+
...capability
|
|
1112
|
+
});
|
|
1113
|
+
});
|
|
1114
|
+
this._update(this._activeAtom, (active) => [
|
|
1115
|
+
...active,
|
|
1116
|
+
module.id
|
|
1117
|
+
]);
|
|
1118
|
+
this._capabilities.set(module.id, capabilities);
|
|
1119
|
+
});
|
|
1120
|
+
}
|
|
1121
|
+
_deactivateModule(module) {
|
|
1122
|
+
return Effect3.gen(this, function* () {
|
|
1123
|
+
const id = module.id;
|
|
1124
|
+
log3("deactivating", {
|
|
1125
|
+
id
|
|
1126
|
+
}, { "~LogMeta": "~LogMeta", F: __dxlog_file3, L: 949, S: this });
|
|
1127
|
+
this._moduleMemoMap.delete(id);
|
|
1128
|
+
const capabilities = this._capabilities.get(id);
|
|
1129
|
+
if (capabilities) {
|
|
1130
|
+
for (const capability of capabilities) {
|
|
1131
|
+
this.capabilities.remove(capability.interface, capability.implementation);
|
|
1132
|
+
const program = capability.deactivate?.() ?? Effect3.succeed(void 0);
|
|
1133
|
+
yield* program;
|
|
1134
|
+
}
|
|
1135
|
+
this._capabilities.delete(id);
|
|
1136
|
+
}
|
|
1137
|
+
const activeIndex = this._get(this._activeAtom).findIndex((event) => event === id);
|
|
1138
|
+
if (activeIndex !== -1) {
|
|
1139
|
+
this._update(this._activeAtom, (active) => active.filter((event) => event !== id));
|
|
1140
|
+
}
|
|
1141
|
+
log3("deactivated", {
|
|
1142
|
+
id
|
|
1143
|
+
}, { "~LogMeta": "~LogMeta", F: __dxlog_file3, L: 966, S: this });
|
|
1144
|
+
return true;
|
|
1145
|
+
});
|
|
1146
|
+
}
|
|
1147
|
+
};
|
|
1148
|
+
var make5 = (options) => new ManagerImpl(options);
|
|
1149
|
+
var isTimeoutCause = (error, depth = 0) => {
|
|
1150
|
+
if (depth > 5 || !(error instanceof Error)) {
|
|
1151
|
+
return false;
|
|
1152
|
+
}
|
|
1153
|
+
if (PluginTimeoutError.is(error)) {
|
|
1154
|
+
return true;
|
|
1155
|
+
}
|
|
1156
|
+
return isTimeoutCause(error.cause, depth + 1);
|
|
1157
|
+
};
|
|
1158
|
+
var together = (togetherEffect) => (effect) => Effect3.gen(function* () {
|
|
1159
|
+
const togetherFiber = yield* Effect3.fork(togetherEffect);
|
|
1160
|
+
const result = yield* effect;
|
|
1161
|
+
yield* Fiber.interrupt(togetherFiber);
|
|
1162
|
+
return result;
|
|
1163
|
+
});
|
|
1164
|
+
|
|
1165
|
+
export {
|
|
1166
|
+
capability_manager_exports,
|
|
1167
|
+
registry_exports,
|
|
1168
|
+
PluginInitializationError,
|
|
1169
|
+
PluginTimeoutError,
|
|
1170
|
+
ManagerTypeId,
|
|
1171
|
+
isManager,
|
|
1172
|
+
make5 as make,
|
|
1173
|
+
plugin_manager_exports
|
|
1174
|
+
};
|
|
1175
|
+
//# sourceMappingURL=chunk-MUVUQC3G.mjs.map
|