@dxos/app-framework 0.8.4-main.9be5663bfe → 0.8.4-main.abd8ff62ef
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/lib/browser/{capability-BBBBAPDI.mjs → capability-Q5XRXRD2.mjs} +10 -10
- package/dist/lib/browser/{capability-OP63CD5N.mjs → capability-V7LR4LQN.mjs} +11 -11
- package/dist/lib/browser/capability-V7LR4LQN.mjs.map +7 -0
- package/dist/lib/browser/{chunk-T3Y4AEKX.mjs → chunk-23D4SJUE.mjs} +3 -3
- package/dist/lib/browser/{chunk-T3Y4AEKX.mjs.map → chunk-23D4SJUE.mjs.map} +1 -1
- package/dist/lib/browser/{chunk-2CKCJ6PN.mjs → chunk-3JWJXGLK.mjs} +1 -1
- package/dist/lib/browser/{chunk-2CKCJ6PN.mjs.map → chunk-3JWJXGLK.mjs.map} +1 -1
- package/dist/lib/browser/{chunk-GX4TUNM6.mjs → chunk-3ZS2A3DN.mjs} +170 -226
- package/dist/lib/browser/chunk-3ZS2A3DN.mjs.map +7 -0
- package/dist/lib/browser/{chunk-I34GF4NG.mjs → chunk-45CHLTBV.mjs} +2 -2
- package/dist/lib/browser/chunk-5LAIGWLU.mjs +467 -0
- package/dist/lib/browser/chunk-5LAIGWLU.mjs.map +7 -0
- package/dist/lib/browser/{chunk-QSXYHXCE.mjs → chunk-66IXTIVK.mjs} +1 -1
- package/dist/lib/browser/{chunk-QSXYHXCE.mjs.map → chunk-66IXTIVK.mjs.map} +2 -2
- package/dist/lib/browser/{chunk-TGX63LTL.mjs → chunk-FJ4765WW.mjs} +1 -1
- package/dist/lib/browser/{chunk-TGX63LTL.mjs.map → chunk-FJ4765WW.mjs.map} +2 -2
- package/dist/lib/browser/chunk-G7SDBRKH.mjs +1 -0
- package/dist/lib/browser/chunk-JXCBZSBJ.mjs +372 -0
- package/dist/lib/browser/chunk-JXCBZSBJ.mjs.map +7 -0
- package/dist/lib/browser/chunk-MX5DKEJH.mjs +584 -0
- package/dist/lib/browser/chunk-MX5DKEJH.mjs.map +7 -0
- package/dist/lib/browser/{chunk-JKWMHZP6.mjs → chunk-WBHCSOBW.mjs} +2 -2
- package/dist/lib/browser/chunk-WBHCSOBW.mjs.map +7 -0
- package/dist/lib/browser/{chunk-FU4GAFUQ.mjs → chunk-Z55LVAGN.mjs} +80 -15
- package/dist/lib/browser/chunk-Z55LVAGN.mjs.map +7 -0
- package/dist/lib/browser/{chunk-F7FW2RK2.mjs → chunk-ZGJAZSNE.mjs} +7 -32
- package/dist/lib/browser/chunk-ZGJAZSNE.mjs.map +7 -0
- package/dist/lib/browser/cli/index.mjs +11 -27
- package/dist/lib/browser/cli/index.mjs.map +2 -2
- package/dist/lib/browser/common/activation-events.mjs +7 -7
- package/dist/lib/browser/common/capabilities.mjs +7 -7
- package/dist/lib/browser/core/activation-event.mjs +1 -1
- package/dist/lib/browser/core/capability.mjs +1 -1
- package/dist/lib/browser/core/plugin-manager.mjs +6 -4
- package/dist/lib/browser/core/plugin.mjs +10 -2
- package/dist/lib/browser/core/url-loader.mjs +13 -5
- package/dist/lib/browser/index.mjs +22 -18
- package/dist/lib/browser/index.mjs.map +3 -3
- package/dist/lib/browser/{invoker-capability-H5PPENOC.mjs → invoker-capability-LNX4CGIV.mjs} +12 -11
- package/dist/lib/browser/invoker-capability-LNX4CGIV.mjs.map +7 -0
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/testing/index.mjs +144 -27
- package/dist/lib/browser/testing/index.mjs.map +4 -4
- package/dist/lib/browser/testing/react.mjs +78 -0
- package/dist/lib/browser/testing/react.mjs.map +7 -0
- package/dist/lib/browser/ui/index.mjs +18 -14
- package/dist/lib/node-esm/{capability-AWBEMRYR.mjs → capability-EW5GJCI6.mjs} +10 -10
- package/dist/lib/node-esm/{capability-WFEG6CIZ.mjs → capability-YKBMMD53.mjs} +11 -11
- package/dist/lib/node-esm/capability-YKBMMD53.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-FKE4Z3D6.mjs → chunk-37Z53PXZ.mjs} +1 -1
- package/dist/lib/node-esm/{chunk-FKE4Z3D6.mjs.map → chunk-37Z53PXZ.mjs.map} +2 -2
- package/dist/lib/node-esm/{chunk-WZCSOX5Q.mjs → chunk-6XW6LET6.mjs} +2 -2
- package/dist/lib/node-esm/{chunk-URWHJQT2.mjs → chunk-D347W3KO.mjs} +7 -32
- package/dist/lib/node-esm/chunk-D347W3KO.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-D5PO2WXX.mjs +373 -0
- package/dist/lib/node-esm/chunk-D5PO2WXX.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-ULUEXB7Q.mjs → chunk-HTBJU5FX.mjs} +80 -15
- package/dist/lib/node-esm/chunk-HTBJU5FX.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-KM2F6GH6.mjs +468 -0
- package/dist/lib/node-esm/chunk-KM2F6GH6.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-EL3R25OQ.mjs → chunk-OZ7DZA5Z.mjs} +1 -1
- package/dist/lib/node-esm/{chunk-BCEOLX47.mjs → chunk-Q7XBFII4.mjs} +170 -226
- package/dist/lib/node-esm/chunk-Q7XBFII4.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-VKHGNEDB.mjs → chunk-SBS2YMPT.mjs} +3 -3
- package/dist/lib/node-esm/{chunk-VKHGNEDB.mjs.map → chunk-SBS2YMPT.mjs.map} +1 -1
- package/dist/lib/node-esm/{chunk-42KBWDE4.mjs → chunk-SDJ4B2LU.mjs} +1 -1
- package/dist/lib/node-esm/{chunk-42KBWDE4.mjs.map → chunk-SDJ4B2LU.mjs.map} +1 -1
- package/dist/lib/node-esm/{chunk-G3RTFSNG.mjs → chunk-WFSRZKBP.mjs} +2 -2
- package/dist/lib/node-esm/chunk-WFSRZKBP.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-WKTLE7MG.mjs +585 -0
- package/dist/lib/node-esm/chunk-WKTLE7MG.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-ZZ7CKK6W.mjs → chunk-XOCUANHO.mjs} +1 -1
- package/dist/lib/node-esm/{chunk-ZZ7CKK6W.mjs.map → chunk-XOCUANHO.mjs.map} +2 -2
- package/dist/lib/node-esm/cli/index.mjs +11 -27
- package/dist/lib/node-esm/cli/index.mjs.map +2 -2
- package/dist/lib/node-esm/common/activation-events.mjs +7 -7
- package/dist/lib/node-esm/common/capabilities.mjs +7 -7
- package/dist/lib/node-esm/core/activation-event.mjs +1 -1
- package/dist/lib/node-esm/core/capability.mjs +1 -1
- package/dist/lib/node-esm/core/plugin-manager.mjs +6 -4
- package/dist/lib/node-esm/core/plugin.mjs +10 -2
- package/dist/lib/node-esm/core/url-loader.mjs +13 -5
- package/dist/lib/node-esm/index.mjs +22 -18
- package/dist/lib/node-esm/index.mjs.map +3 -3
- package/dist/lib/node-esm/{invoker-capability-S3ZA527J.mjs → invoker-capability-O4T5PHLA.mjs} +12 -11
- package/dist/lib/node-esm/invoker-capability-O4T5PHLA.mjs.map +7 -0
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/testing/index.mjs +144 -27
- package/dist/lib/node-esm/testing/index.mjs.map +4 -4
- package/dist/lib/node-esm/testing/react.mjs +79 -0
- package/dist/lib/node-esm/testing/react.mjs.map +7 -0
- package/dist/lib/node-esm/ui/index.mjs +18 -14
- package/dist/plugin/node-esm/index.mjs +480 -32
- package/dist/plugin/node-esm/index.mjs.map +4 -4
- package/dist/plugin/node-esm/meta.json +1 -1
- package/dist/types/src/common/capabilities.d.ts +2 -1
- package/dist/types/src/common/capabilities.d.ts.map +1 -1
- package/dist/types/src/common/operations.d.ts +1 -1
- package/dist/types/src/common/operations.d.ts.map +1 -1
- package/dist/types/src/core/activation-event.d.ts +4 -4
- package/dist/types/src/core/activation-event.d.ts.map +1 -1
- package/dist/types/src/core/capability-manager.d.ts.map +1 -1
- package/dist/types/src/core/capability.d.ts +2 -2
- package/dist/types/src/core/capability.d.ts.map +1 -1
- package/dist/types/src/core/index.d.ts +2 -0
- package/dist/types/src/core/index.d.ts.map +1 -1
- package/dist/types/src/core/plugin-asset-cache.d.ts +71 -0
- package/dist/types/src/core/plugin-asset-cache.d.ts.map +1 -0
- package/dist/types/src/core/plugin-manager.d.ts +51 -2
- package/dist/types/src/core/plugin-manager.d.ts.map +1 -1
- package/dist/types/src/core/plugin-manifest.d.ts +76 -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 +107 -6
- package/dist/types/src/core/plugin.d.ts.map +1 -1
- package/dist/types/src/core/url-loader.d.ts +90 -3
- package/dist/types/src/core/url-loader.d.ts.map +1 -1
- package/dist/types/src/helpers.d.ts.map +1 -1
- package/dist/types/src/plugin-operation/history/capability.d.ts.map +1 -1
- package/dist/types/src/plugin-operation/history/errors.d.ts +6 -6
- package/dist/types/src/plugin-operation/history/errors.d.ts.map +1 -1
- package/dist/types/src/plugin-operation/history/history-tracker.d.ts +1 -1
- package/dist/types/src/plugin-operation/history/history-tracker.d.ts.map +1 -1
- package/dist/types/src/plugin-operation/history/types.d.ts +1 -1
- package/dist/types/src/plugin-operation/history/types.d.ts.map +1 -1
- package/dist/types/src/plugin-operation/history/undo-mapping.d.ts +1 -1
- package/dist/types/src/plugin-operation/history/undo-mapping.d.ts.map +1 -1
- package/dist/types/src/plugin-operation/history/undo-registry.d.ts +1 -1
- package/dist/types/src/plugin-operation/history/undo-registry.d.ts.map +1 -1
- package/dist/types/src/plugin-operation/invoker-capability.d.ts +1 -1
- package/dist/types/src/plugin-operation/invoker-capability.d.ts.map +1 -1
- package/dist/types/src/plugin-operation/testing.d.ts +2 -1
- package/dist/types/src/plugin-operation/testing.d.ts.map +1 -1
- package/dist/types/src/plugin-runtime/capability.d.ts +1 -1
- package/dist/types/src/plugin-runtime/capability.d.ts.map +1 -1
- package/dist/types/src/testing/harness.d.ts +67 -0
- package/dist/types/src/testing/harness.d.ts.map +1 -0
- package/dist/types/src/testing/index.d.ts +1 -0
- package/dist/types/src/testing/index.d.ts.map +1 -1
- package/dist/types/src/testing/react.d.ts +27 -0
- package/dist/types/src/testing/react.d.ts.map +1 -0
- package/dist/types/src/testing/react.test.d.ts +2 -0
- package/dist/types/src/testing/react.test.d.ts.map +1 -0
- package/dist/types/src/testing/service.d.ts.map +1 -1
- package/dist/types/src/testing/withPluginManager.d.ts.map +1 -1
- package/dist/types/src/testing/withPluginManager.stories.d.ts.map +1 -1
- package/dist/types/src/ui/components/App/App.d.ts.map +1 -1
- package/dist/types/src/ui/components/App/App.stories.d.ts.map +1 -1
- package/dist/types/src/ui/components/Placeholder/Placeholder.d.ts +64 -0
- package/dist/types/src/ui/components/Placeholder/Placeholder.d.ts.map +1 -0
- package/dist/types/src/ui/components/Placeholder/Placeholder.stories.d.ts +19 -0
- package/dist/types/src/ui/components/Placeholder/Placeholder.stories.d.ts.map +1 -0
- package/dist/types/src/ui/components/Placeholder/index.d.ts +2 -0
- package/dist/types/src/ui/components/Placeholder/index.d.ts.map +1 -0
- package/dist/types/src/ui/components/PluginManager/PluginManagerContext.stories.d.ts.map +1 -1
- package/dist/types/src/ui/components/Surface/SurfaceComponent.d.ts +16 -4
- package/dist/types/src/ui/components/Surface/SurfaceComponent.d.ts.map +1 -1
- package/dist/types/src/ui/components/Surface/SurfaceComponent.stories.d.ts.map +1 -1
- package/dist/types/src/ui/components/Surface/SurfaceProfilerContext.d.ts.map +1 -1
- package/dist/types/src/ui/components/Surface/index.d.ts +16 -6
- package/dist/types/src/ui/components/Surface/index.d.ts.map +1 -1
- package/dist/types/src/ui/components/Surface/types.d.ts +110 -9
- package/dist/types/src/ui/components/Surface/types.d.ts.map +1 -1
- package/dist/types/src/ui/components/Surface/types.test.d.ts +2 -0
- package/dist/types/src/ui/components/Surface/types.test.d.ts.map +1 -0
- package/dist/types/src/ui/components/index.d.ts +1 -0
- package/dist/types/src/ui/components/index.d.ts.map +1 -1
- package/dist/types/src/ui/hooks/useApp.d.ts +29 -3
- package/dist/types/src/ui/hooks/useApp.d.ts.map +1 -1
- package/dist/types/src/ui/hooks/useCapabilities.d.ts.map +1 -1
- package/dist/types/src/ui/hooks/useLoading.d.ts.map +1 -1
- package/dist/types/src/ui/hooks/useSettingsState.d.ts.map +1 -1
- package/dist/types/src/vite-plugin/boot-loader/BootLoader.stories.d.ts +34 -0
- package/dist/types/src/vite-plugin/boot-loader/BootLoader.stories.d.ts.map +1 -0
- package/dist/types/src/vite-plugin/boot-loader/index.d.ts +52 -0
- package/dist/types/src/vite-plugin/boot-loader/index.d.ts.map +1 -0
- package/dist/types/src/vite-plugin/composer/index.d.ts +34 -0
- package/dist/types/src/vite-plugin/composer/index.d.ts.map +1 -0
- package/dist/types/src/vite-plugin/import-map/index.d.ts +28 -0
- package/dist/types/src/vite-plugin/import-map/index.d.ts.map +1 -0
- package/dist/types/src/vite-plugin/index.d.ts +4 -2
- package/dist/types/src/vite-plugin/index.d.ts.map +1 -1
- package/dist/types/src/vite-plugin/manifest.d.ts +37 -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 +10 -4
- package/dist/types/src/vite-plugin/packages.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/moon.yml +1 -0
- package/package.json +33 -59
- package/src/common/capabilities.ts +2 -1
- package/src/common/operations.ts +1 -1
- package/src/core/capability.ts +1 -1
- package/src/core/index.ts +2 -0
- package/src/core/plugin-asset-cache.ts +60 -0
- package/src/core/plugin-manager.test.ts +246 -5
- package/src/core/plugin-manager.ts +167 -25
- package/src/core/plugin-manifest.test.ts +48 -0
- package/src/core/plugin-manifest.ts +102 -0
- package/src/core/plugin.ts +135 -10
- package/src/core/url-loader.test.ts +104 -5
- package/src/core/url-loader.ts +226 -37
- package/src/plugin-operation/OperationPlugin.ts +2 -2
- package/src/plugin-operation/history/capability.ts +1 -1
- package/src/plugin-operation/history/history-tracker.test.ts +2 -1
- package/src/plugin-operation/history/history-tracker.ts +1 -1
- package/src/plugin-operation/history/types.ts +1 -1
- package/src/plugin-operation/history/undo-mapping.ts +1 -1
- package/src/plugin-operation/history/undo-registry.ts +1 -1
- package/src/plugin-operation/invoker-capability.ts +2 -1
- package/src/plugin-operation/testing.ts +2 -1
- package/src/plugin-runtime/RuntimePlugin.ts +2 -2
- package/src/testing/harness.ts +229 -0
- package/src/testing/index.ts +1 -0
- package/src/testing/react.test.tsx +48 -0
- package/src/testing/react.tsx +113 -0
- package/src/testing/withPluginManager.stories.tsx +1 -1
- package/src/ui/components/App/App.stories.tsx +1 -1
- package/src/ui/components/App/App.tsx +25 -2
- 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 +4 -2
- package/src/ui/components/Surface/SurfaceComponent.stories.tsx +1 -1
- package/src/ui/components/Surface/SurfaceComponent.tsx +83 -46
- package/src/ui/components/Surface/index.ts +20 -1
- package/src/ui/components/Surface/types.test.ts +126 -0
- package/src/ui/components/Surface/types.ts +164 -12
- package/src/ui/components/index.ts +1 -0
- package/src/ui/hooks/useApp.tsx +165 -41
- package/src/ui/hooks/useLoading.tsx +14 -6
- package/src/vite-plugin/boot-loader/BootLoader.stories.tsx +263 -0
- package/src/vite-plugin/boot-loader/boot-loader.css +294 -0
- package/src/vite-plugin/boot-loader/boot-loader.js +274 -0
- package/src/vite-plugin/boot-loader/index.ts +112 -0
- package/src/vite-plugin/composer/index.ts +277 -0
- package/src/vite-plugin/import-map/index.ts +524 -0
- package/src/vite-plugin/index.ts +6 -2
- package/src/vite-plugin/manifest.test.ts +24 -0
- package/src/vite-plugin/manifest.ts +50 -0
- package/src/vite-plugin/packages.ts +169 -10
- package/tsconfig.json +9 -0
- package/.swc/plugins/linux_x86_64_19.0.0/727453fb3a62f7f1d952a41e051ca8a6f88cadc45cee43c6a4d1aa45f9b75665.wasmer-v7 +0 -0
- package/dist/lib/browser/capability-OP63CD5N.mjs.map +0 -7
- package/dist/lib/browser/chunk-F7FW2RK2.mjs.map +0 -7
- package/dist/lib/browser/chunk-FU4GAFUQ.mjs.map +0 -7
- package/dist/lib/browser/chunk-GX4TUNM6.mjs.map +0 -7
- package/dist/lib/browser/chunk-JKWMHZP6.mjs.map +0 -7
- package/dist/lib/browser/chunk-LVJW5EFU.mjs +0 -157
- package/dist/lib/browser/chunk-LVJW5EFU.mjs.map +0 -7
- package/dist/lib/browser/chunk-RFSO3JRG.mjs +0 -1
- package/dist/lib/browser/chunk-WPE6AL7I.mjs +0 -905
- package/dist/lib/browser/chunk-WPE6AL7I.mjs.map +0 -7
- package/dist/lib/browser/invoker-capability-H5PPENOC.mjs.map +0 -7
- package/dist/lib/node-esm/capability-WFEG6CIZ.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-4A3ZCMI3.mjs +0 -158
- package/dist/lib/node-esm/chunk-4A3ZCMI3.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-BCEOLX47.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-G3RTFSNG.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-LQKOTNJW.mjs +0 -906
- package/dist/lib/node-esm/chunk-LQKOTNJW.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-ULUEXB7Q.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-URWHJQT2.mjs.map +0 -7
- package/dist/lib/node-esm/invoker-capability-S3ZA527J.mjs.map +0 -7
- package/dist/types/src/vite-plugin/composer-plugin.d.ts +0 -18
- package/dist/types/src/vite-plugin/composer-plugin.d.ts.map +0 -1
- package/dist/types/src/vite-plugin/import-map-plugin.d.ts +0 -16
- package/dist/types/src/vite-plugin/import-map-plugin.d.ts.map +0 -1
- package/src/vite-plugin/composer-plugin.ts +0 -128
- package/src/vite-plugin/import-map-plugin.ts +0 -314
- /package/dist/lib/browser/{capability-BBBBAPDI.mjs.map → capability-Q5XRXRD2.mjs.map} +0 -0
- /package/dist/lib/browser/{chunk-I34GF4NG.mjs.map → chunk-45CHLTBV.mjs.map} +0 -0
- /package/dist/lib/browser/{chunk-RFSO3JRG.mjs.map → chunk-G7SDBRKH.mjs.map} +0 -0
- /package/dist/lib/node-esm/{capability-AWBEMRYR.mjs.map → capability-EW5GJCI6.mjs.map} +0 -0
- /package/dist/lib/node-esm/{chunk-WZCSOX5Q.mjs.map → chunk-6XW6LET6.mjs.map} +0 -0
- /package/dist/lib/node-esm/{chunk-EL3R25OQ.mjs.map → chunk-OZ7DZA5Z.mjs.map} +0 -0
|
@@ -1,9 +1,46 @@
|
|
|
1
1
|
import { Atom, Registry } from '@effect-atom/atom-react';
|
|
2
2
|
import * as Effect from 'effect/Effect';
|
|
3
3
|
import * as PubSub from 'effect/PubSub';
|
|
4
|
+
import { BaseError } from '@dxos/errors';
|
|
4
5
|
import * as ActivationEvent from './activation-event';
|
|
5
6
|
import * as CapabilityManager from './capability-manager';
|
|
6
7
|
import * as Plugin from './plugin';
|
|
8
|
+
declare const PluginInitializationError_base: {
|
|
9
|
+
new (options?: import("@dxos/errors").BaseErrorOptions): {
|
|
10
|
+
cause?: unknown;
|
|
11
|
+
stack?: string;
|
|
12
|
+
name: "PluginInitializationError";
|
|
13
|
+
context: Record<string, unknown>;
|
|
14
|
+
readonly message: string;
|
|
15
|
+
readonly _tag: "PluginInitializationError";
|
|
16
|
+
};
|
|
17
|
+
isError(error: unknown): error is Error;
|
|
18
|
+
name: "PluginInitializationError";
|
|
19
|
+
is(error: unknown): error is BaseError;
|
|
20
|
+
wrap(options?: Omit<import("@dxos/errors").BaseErrorOptions, 'cause'> & {
|
|
21
|
+
ifTypeDiffers?: boolean;
|
|
22
|
+
}): (error: unknown) => {
|
|
23
|
+
cause?: unknown;
|
|
24
|
+
stack?: string;
|
|
25
|
+
name: "PluginInitializationError";
|
|
26
|
+
context: Record<string, unknown>;
|
|
27
|
+
readonly message: string;
|
|
28
|
+
readonly _tag: "PluginInitializationError";
|
|
29
|
+
};
|
|
30
|
+
extend<Name extends string = string>(name: Name, message?: string): any;
|
|
31
|
+
captureStackTrace(targetObject: object, constructorOpt?: Function): void;
|
|
32
|
+
prepareStackTrace?: ((err: Error, stackTraces: NodeJS.CallSite[]) => any) | undefined;
|
|
33
|
+
stackTraceLimit: number;
|
|
34
|
+
};
|
|
35
|
+
/**
|
|
36
|
+
* Tagged error for failures during the constructor-launched core/enabled
|
|
37
|
+
* `enable()` chain. Surfaces via {@link PluginManager.activate}'s wait on
|
|
38
|
+
* `_initialization` so a caller blocked on initialization gets a typed
|
|
39
|
+
* failure (with the original error preserved as `cause`) instead of an
|
|
40
|
+
* untyped `Error`.
|
|
41
|
+
*/
|
|
42
|
+
export declare class PluginInitializationError extends PluginInitializationError_base {
|
|
43
|
+
}
|
|
7
44
|
/**
|
|
8
45
|
* Identifier denoting a Manager.
|
|
9
46
|
*/
|
|
@@ -15,6 +52,12 @@ export type ManagerOptions = {
|
|
|
15
52
|
core?: string[];
|
|
16
53
|
enabled?: string[];
|
|
17
54
|
registry?: Registry.Registry;
|
|
55
|
+
/**
|
|
56
|
+
* Hook called when a plugin is removed via {@link PluginManager.remove}. Used by the
|
|
57
|
+
* host app to clean up persisted state (e.g. evict offline-cached plugin assets).
|
|
58
|
+
* Failures are logged and swallowed; removal still succeeds even if the hook fails.
|
|
59
|
+
*/
|
|
60
|
+
onRemove?: (id: string) => Effect.Effect<void, unknown>;
|
|
18
61
|
};
|
|
19
62
|
export type ActivationMessage = {
|
|
20
63
|
event: string;
|
|
@@ -45,9 +88,14 @@ export interface PluginManager {
|
|
|
45
88
|
getActive(): readonly string[];
|
|
46
89
|
getEventsFired(): readonly string[];
|
|
47
90
|
getPendingReset(): readonly string[];
|
|
48
|
-
|
|
91
|
+
/**
|
|
92
|
+
* Loads a plugin via the plugin loader and registers it without enabling it.
|
|
93
|
+
* Returns the loaded plugin so callers can enable it by its canonical id
|
|
94
|
+
* (which may differ from the locator used to load it, e.g. URL loaders).
|
|
95
|
+
*/
|
|
96
|
+
add(id: string): Effect.Effect<Plugin.Plugin, Error>;
|
|
49
97
|
enable(id: string): Effect.Effect<boolean, Error>;
|
|
50
|
-
remove(id: string): boolean
|
|
98
|
+
remove(id: string): Effect.Effect<boolean, Error>;
|
|
51
99
|
disable(id: string): Effect.Effect<boolean, Error>;
|
|
52
100
|
activate(event: ActivationEvent.ActivationEvent | string, params?: {
|
|
53
101
|
before?: string;
|
|
@@ -70,4 +118,5 @@ export declare const isManager: (value: unknown) => value is PluginManager;
|
|
|
70
118
|
* Creates a new Plugin Manager instance.
|
|
71
119
|
*/
|
|
72
120
|
export declare const make: (options: ManagerOptions) => PluginManager;
|
|
121
|
+
export {};
|
|
73
122
|
//# sourceMappingURL=plugin-manager.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin-manager.d.ts","sourceRoot":"","sources":["../../../../src/core/plugin-manager.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AAKzD,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAIxC,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"plugin-manager.d.ts","sourceRoot":"","sources":["../../../../src/core/plugin-manager.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AAKzD,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAIxC,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAKxC,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAGzC,OAAO,KAAK,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C,CAAC;IAClD,MAAM,CAAC,EAAE,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;IAClD,OAAO,CAAC,EAAE,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;IAEnD,QAAQ,CACN,KAAK,EAAE,eAAe,CAAC,eAAe,GAAG,MAAM,EAC/C,MAAM,CAAC,EAAE;QAAE,MAAM,CAAC,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAA;KAAE,GAC3C,MAAM,CAAC,MAAM,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;IACjC,UAAU,CAAC,EAAE,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;IACtD,KAAK,CAAC,KAAK,EAAE,eAAe,CAAC,eAAe,GAAG,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;IAEtF;;;;OAIG;IACH,QAAQ,IAAI,MAAM,CAAC,MAAM,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;CAC3C;AAED;;GAEG;AACH,eAAO,MAAM,SAAS,UAAW,OAAO,KAAG,KAAK,IAAI,aAEnD,CAAC;AAq3BF;;GAEG;AACH,eAAO,MAAM,IAAI,YAAa,cAAc,KAAG,aAAyC,CAAC"}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import * as Effect from 'effect/Effect';
|
|
2
|
+
import * as Schema from 'effect/Schema';
|
|
3
|
+
import { BaseError } from '@dxos/errors';
|
|
4
|
+
declare const PluginManifestError_base: {
|
|
5
|
+
new (options?: import("@dxos/errors").BaseErrorOptions): {
|
|
6
|
+
cause?: unknown;
|
|
7
|
+
stack?: string;
|
|
8
|
+
name: "PluginManifestError";
|
|
9
|
+
context: Record<string, unknown>;
|
|
10
|
+
readonly message: string;
|
|
11
|
+
readonly _tag: "PluginManifestError";
|
|
12
|
+
};
|
|
13
|
+
isError(error: unknown): error is Error;
|
|
14
|
+
name: "PluginManifestError";
|
|
15
|
+
is(error: unknown): error is BaseError;
|
|
16
|
+
wrap(options?: Omit<import("@dxos/errors").BaseErrorOptions, 'cause'> & {
|
|
17
|
+
ifTypeDiffers?: boolean;
|
|
18
|
+
}): (error: unknown) => {
|
|
19
|
+
cause?: unknown;
|
|
20
|
+
stack?: string;
|
|
21
|
+
name: "PluginManifestError";
|
|
22
|
+
context: Record<string, unknown>;
|
|
23
|
+
readonly message: string;
|
|
24
|
+
readonly _tag: "PluginManifestError";
|
|
25
|
+
};
|
|
26
|
+
extend<Name extends string = string>(name: Name, message?: string): any;
|
|
27
|
+
captureStackTrace(targetObject: object, constructorOpt?: Function): void;
|
|
28
|
+
prepareStackTrace?: ((err: Error, stackTraces: NodeJS.CallSite[]) => any) | undefined;
|
|
29
|
+
stackTraceLimit: number;
|
|
30
|
+
};
|
|
31
|
+
/**
|
|
32
|
+
* Tagged error for manifest fetch / parse failures. Construction sites set
|
|
33
|
+
* `context.manifestUrl` and `context.reason` (one of `'fetch-failed' |
|
|
34
|
+
* 'http-error' | 'parse-failed' | 'invalid'`) so handlers can route on the
|
|
35
|
+
* specific failure mode.
|
|
36
|
+
*/
|
|
37
|
+
export declare class PluginManifestError extends PluginManifestError_base {
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Schema for a third-party plugin manifest.
|
|
41
|
+
*
|
|
42
|
+
* The manifest is published as a sibling of the plugin's entry module
|
|
43
|
+
* ({@link PLUGIN_ENTRY_FILENAME}) and advertises every file the plugin needs at
|
|
44
|
+
* runtime so the host can eagerly cache them for offline use.
|
|
45
|
+
*/
|
|
46
|
+
export declare const Manifest: Schema.Struct<{
|
|
47
|
+
id: typeof Schema.String;
|
|
48
|
+
name: typeof Schema.String;
|
|
49
|
+
version: typeof Schema.String;
|
|
50
|
+
assets: Schema.Array$<typeof Schema.String>;
|
|
51
|
+
}>;
|
|
52
|
+
export type Manifest = Schema.Schema.Type<typeof Manifest>;
|
|
53
|
+
/**
|
|
54
|
+
* Resolved manifest with all asset paths converted to absolute URLs.
|
|
55
|
+
*/
|
|
56
|
+
export type ResolvedManifest = {
|
|
57
|
+
id: string;
|
|
58
|
+
name: string;
|
|
59
|
+
version: string;
|
|
60
|
+
entryUrl: string;
|
|
61
|
+
assetUrls: readonly string[];
|
|
62
|
+
};
|
|
63
|
+
/**
|
|
64
|
+
* Synchronous decode + validate + resolve for an in-memory manifest payload. Used
|
|
65
|
+
* by tests and tooling that have the manifest body already loaded; the runtime
|
|
66
|
+
* path goes through {@link fetchManifest}.
|
|
67
|
+
*/
|
|
68
|
+
export declare const parse: (manifestUrl: string, payload: unknown) => ResolvedManifest;
|
|
69
|
+
/**
|
|
70
|
+
* Fetches and parses a manifest from the given URL via Effect's HTTP client and
|
|
71
|
+
* Schema-driven JSON decoding. All failure modes surface as a single tagged
|
|
72
|
+
* {@link PluginManifestError}; callers route on `error.context.reason`.
|
|
73
|
+
*/
|
|
74
|
+
export declare const fetchManifest: (manifestUrl: string) => Effect.Effect<ResolvedManifest, PluginManifestError>;
|
|
75
|
+
export {};
|
|
76
|
+
//# sourceMappingURL=plugin-manifest.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plugin-manifest.d.ts","sourceRoot":"","sources":["../../../../src/core/plugin-manifest.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAExC,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGzC;;;;;GAKG;AACH,qBAAa,mBAAoB,SAAQ,wBAAqE;CAAG;AAEjH;;;;;;GAMG;AACH,eAAO,MAAM,QAAQ;;;;;EAKnB,CAAC;AAEH,MAAM,MAAM,QAAQ,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,QAAQ,CAAC,CAAC;AAE3D;;GAEG;AACH,MAAM,MAAM,gBAAgB,GAAG;IAC7B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,SAAS,MAAM,EAAE,CAAC;CAC9B,CAAC;AAaF;;;;GAIG;AACH,eAAO,MAAM,KAAK,gBAAiB,MAAM,WAAW,OAAO,KAAG,gBAM7D,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,aAAa,gBAAiB,MAAM,KAAG,MAAM,CAAC,MAAM,CAAC,gBAAgB,EAAE,mBAAmB,CAuBxC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plugin-manifest.test.d.ts","sourceRoot":"","sources":["../../../../src/core/plugin-manifest.test.ts"],"names":[],"mappings":""}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import * as Context from 'effect/Context';
|
|
2
2
|
import * as Effect from 'effect/Effect';
|
|
3
3
|
import * as Pipeable from 'effect/Pipeable';
|
|
4
|
+
import { BaseError } from '@dxos/errors';
|
|
4
5
|
import type * as ActivationEvent from './activation-event';
|
|
5
6
|
import * as Capability from './capability';
|
|
6
7
|
import type * as PluginManager from './plugin-manager';
|
|
@@ -54,15 +55,32 @@ export interface PluginModule {
|
|
|
54
55
|
*/
|
|
55
56
|
activatesOn: ActivationEvent.Events;
|
|
56
57
|
/**
|
|
57
|
-
* Events
|
|
58
|
-
*
|
|
59
|
-
*
|
|
58
|
+
* Events that this module fires *before* its own activation runs.
|
|
59
|
+
*
|
|
60
|
+
* When this module is asked to activate (via {@link activatesOn}), the
|
|
61
|
+
* plugin manager first activates every event listed here, ensuring any
|
|
62
|
+
* other modules that contribute to those events have completed before
|
|
63
|
+
* this module's {@link activate} body executes. These events are fired
|
|
64
|
+
* by the framework on this module's behalf — the module does not need
|
|
65
|
+
* to wait for some other code to fire them.
|
|
66
|
+
*
|
|
67
|
+
* The module is marked as needing reset if a module activated by one
|
|
68
|
+
* of these events is later removed.
|
|
69
|
+
*
|
|
70
|
+
* Read as: "this module fires these events before [its] activation".
|
|
60
71
|
*/
|
|
61
|
-
|
|
72
|
+
firesBeforeActivation?: ActivationEvent.ActivationEvent[];
|
|
62
73
|
/**
|
|
63
|
-
* Events
|
|
74
|
+
* Events that this module fires *after* its own activation completes.
|
|
75
|
+
*
|
|
76
|
+
* Once this module's {@link activate} body has finished executing, the
|
|
77
|
+
* plugin manager activates every event listed here, causing any modules
|
|
78
|
+
* listening on those events to run. These events are fired by the
|
|
79
|
+
* framework on this module's behalf as part of this module's lifecycle.
|
|
80
|
+
*
|
|
81
|
+
* Read as: "this module fires these events after [its] activation".
|
|
64
82
|
*/
|
|
65
|
-
|
|
83
|
+
firesAfterActivation?: ActivationEvent.ActivationEvent[];
|
|
66
84
|
/**
|
|
67
85
|
* Called when the module is activated.
|
|
68
86
|
* CapabilityManager is accessed via the Effect layer system (Capability.Service).
|
|
@@ -92,6 +110,10 @@ export type Meta = {
|
|
|
92
110
|
* Short description of plugin functionality.
|
|
93
111
|
*/
|
|
94
112
|
description?: string;
|
|
113
|
+
/**
|
|
114
|
+
* Name of the author or organization that created the plugin.
|
|
115
|
+
*/
|
|
116
|
+
author?: string;
|
|
95
117
|
/**
|
|
96
118
|
* URL of home page.
|
|
97
119
|
*/
|
|
@@ -164,5 +186,84 @@ export type PluginFactory<T = void> = ((options: T) => Plugin) & {
|
|
|
164
186
|
* When T is void, the function takes no arguments: () => Plugin.
|
|
165
187
|
*/
|
|
166
188
|
export declare function make<T>(builder: PluginBuilder<T>): PluginFactory<T>;
|
|
189
|
+
/**
|
|
190
|
+
* Async loader for a lazy plugin's real implementation.
|
|
191
|
+
* The default export of the loaded module must be a `PluginFactory<T>` —
|
|
192
|
+
* i.e. the same shape `Plugin.make` produces.
|
|
193
|
+
*/
|
|
194
|
+
export type LazyLoader<T = void> = () => Promise<{
|
|
195
|
+
default: PluginFactory<T>;
|
|
196
|
+
}>;
|
|
197
|
+
/**
|
|
198
|
+
* Defines a lazy plugin whose body is loaded on first enable.
|
|
199
|
+
*
|
|
200
|
+
* The returned factory produces a stub `Plugin` that exposes `meta`
|
|
201
|
+
* synchronously (so callers can read `Plugin.meta.id` for free) but defers
|
|
202
|
+
* loading the real plugin's modules until the manager calls
|
|
203
|
+
* `Plugin.resolveLazy`. This lets the plugin's main entry point ship as a
|
|
204
|
+
* tiny meta-only chunk — the heavy capabilities, schema, React surfaces,
|
|
205
|
+
* etc. live behind the dynamic `import()` and become a separate Rollup
|
|
206
|
+
* chunk that is only fetched when the plugin is enabled.
|
|
207
|
+
*
|
|
208
|
+
* @example
|
|
209
|
+
* ```ts
|
|
210
|
+
* // plugin-markdown/src/index.ts
|
|
211
|
+
* import { Plugin } from '@dxos/app-framework';
|
|
212
|
+
* import { meta } from './meta';
|
|
213
|
+
*
|
|
214
|
+
* export const MarkdownPlugin = Plugin.lazy(meta, () => import('./MarkdownPlugin'));
|
|
215
|
+
*
|
|
216
|
+
* // plugin-markdown/src/MarkdownPlugin.tsx
|
|
217
|
+
* export const MarkdownPlugin = Plugin.define(meta).pipe(...heavy modules..., Plugin.make);
|
|
218
|
+
* export default MarkdownPlugin;
|
|
219
|
+
* ```
|
|
220
|
+
*/
|
|
221
|
+
export declare const lazy: <T = void>(meta: Meta, loader: LazyLoader<T>) => PluginFactory<T>;
|
|
222
|
+
/**
|
|
223
|
+
* Type guard for lazy plugin stubs produced by {@link lazy}.
|
|
224
|
+
*/
|
|
225
|
+
export declare const isLazy: (plugin: Plugin) => boolean;
|
|
226
|
+
declare const LazyPluginError_base: {
|
|
227
|
+
new (options?: import("@dxos/errors").BaseErrorOptions): {
|
|
228
|
+
cause?: unknown;
|
|
229
|
+
stack?: string;
|
|
230
|
+
name: "LazyPluginError";
|
|
231
|
+
context: Record<string, unknown>;
|
|
232
|
+
readonly message: string;
|
|
233
|
+
readonly _tag: "LazyPluginError";
|
|
234
|
+
};
|
|
235
|
+
isError(error: unknown): error is Error;
|
|
236
|
+
name: "LazyPluginError";
|
|
237
|
+
is(error: unknown): error is BaseError;
|
|
238
|
+
wrap(options?: Omit<import("@dxos/errors").BaseErrorOptions, 'cause'> & {
|
|
239
|
+
ifTypeDiffers?: boolean;
|
|
240
|
+
}): (error: unknown) => {
|
|
241
|
+
cause?: unknown;
|
|
242
|
+
stack?: string;
|
|
243
|
+
name: "LazyPluginError";
|
|
244
|
+
context: Record<string, unknown>;
|
|
245
|
+
readonly message: string;
|
|
246
|
+
readonly _tag: "LazyPluginError";
|
|
247
|
+
};
|
|
248
|
+
extend<Name extends string = string>(name: Name, message?: string): any;
|
|
249
|
+
captureStackTrace(targetObject: object, constructorOpt?: Function): void;
|
|
250
|
+
prepareStackTrace?: ((err: Error, stackTraces: NodeJS.CallSite[]) => any) | undefined;
|
|
251
|
+
stackTraceLimit: number;
|
|
252
|
+
};
|
|
253
|
+
/**
|
|
254
|
+
* Tagged error for failures during lazy plugin resolution. `context.id` is
|
|
255
|
+
* the lazy plugin's `meta.id`; `context.reason` discriminates the failure
|
|
256
|
+
* mode (`'load-failed' | 'missing-default' | 'invalid-plugin' |
|
|
257
|
+
* 'meta-mismatch'`) so callers can route on it.
|
|
258
|
+
*/
|
|
259
|
+
export declare class LazyPluginError extends LazyPluginError_base {
|
|
260
|
+
}
|
|
261
|
+
/**
|
|
262
|
+
* Resolves a lazy plugin stub to its real plugin.
|
|
263
|
+
* Returns the plugin unchanged if it is not lazy. Failures surface as
|
|
264
|
+
* {@link LazyPluginError} with `context.reason` indicating the failure mode
|
|
265
|
+
* and (for loader failures) `cause` set to the original error.
|
|
266
|
+
*/
|
|
267
|
+
export declare const resolveLazy: (plugin: Plugin) => Effect.Effect<Plugin, LazyPluginError>;
|
|
167
268
|
export {};
|
|
168
269
|
//# sourceMappingURL=plugin.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../../../../src/core/plugin.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,OAAO,MAAM,gBAAgB,CAAC;AAC1C,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAExC,OAAO,KAAK,QAAQ,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../../../../src/core/plugin.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,OAAO,MAAM,gBAAgB,CAAC;AAC1C,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAExC,OAAO,KAAK,QAAQ,MAAM,iBAAiB,CAAC;AAE5C,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAGzC,OAAO,KAAK,KAAK,eAAe,MAAM,oBAAoB,CAAC;AAC3D,OAAO,KAAK,UAAU,MAAM,cAAc,CAAC;AAC3C,OAAO,KAAK,KAAK,aAAa,MAAM,kBAAkB,CAAC;;AAMvD;;;GAGG;AACH,qBAAa,OAAQ,SAAQ,YAAwF;CAAG;AAMxH;;;;;GAKG;AACH,eAAO,MAAM,QAAQ,UAAW,eAAe,CAAC,eAAe,KAAG,MAAM,CAAC,MAAM,CAAC,OAAO,EAAE,KAAK,EAAE,OAAO,CACxC,CAAC;AAEhE;;;;;GAKG;AACH,eAAO,MAAM,KAAK,UAAW,eAAe,CAAC,eAAe,KAAG,MAAM,CAAC,MAAM,CAAC,OAAO,EAAE,KAAK,EAAE,OAAO,CACxC,CAAC;AAE7D;;;GAGG;AACH,eAAO,MAAM,QAAQ,QAAO,MAAM,CAAC,MAAM,CAAC,OAAO,EAAE,KAAK,EAAE,OAAO,CACP,CAAC;AAS3D;;GAEG;AACH,eAAO,MAAM,kBAAkB,EAAE,OAAO,MAAuD,CAAC;AAChG,MAAM,MAAM,kBAAkB,GAAG,OAAO,kBAAkB,CAAC;AAE3D;;GAEG;AACH,eAAO,MAAM,cAAc,UAAW,OAAO,KAAG,KAA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EACzB,aAAa,EAAE,mBAAmB,GAAG,CAAC,CAAC,OAAO,EAAE,CAAC,KAAK,mBAAmB,CAAC,GACzE,aAAa,CAAC,CAAC,CAAC,CAAC;AAcpB,MAAM,MAAM,aAAa,CAAC,CAAC,GAAG,IAAI,IAAI,CAAC,CAAC,OAAO,EAAE,CAAC,KAAK,MAAM,CAAC,GAAG;IAAE,IAAI,EAAE,IAAI,CAAA;CAAE,CAAC;AAwBhF;;;;;GAKG;AACH,wBAAgB,IAAI,CAAC,CAAC,EAAE,OAAO,EAAE,aAAa,CAAC,CAAC,CAAC,GAAG,aAAa,CAAC,CAAC,CAAC,CAAC;AAuBrE;;;;GAIG;AACH,MAAM,MAAM,UAAU,CAAC,CAAC,GAAG,IAAI,IAAI,MAAM,OAAO,CAAC;IAAE,OAAO,EAAE,aAAa,CAAC,CAAC,CAAC,CAAA;CAAE,CAAC,CAAC;AAKhF;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,eAAO,MAAM,IAAI,GAAI,CAAC,GAAG,IAAI,QAAQ,IAAI,UAAU,UAAU,CAAC,CAAC,CAAC,KAAG,aAAa,CAAC,CAAC,CAUjF,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,MAAM,WAAY,MAAM,KAAG,OAA4B,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAErE;;;;;GAKG;AACH,qBAAa,eAAgB,SAAQ,oBAAoE;CAAG;AAE5G;;;;;GAKG;AACH,eAAO,MAAM,WAAW,WAAY,MAAM,KAAG,MAAM,CAAC,MAAM,CAAC,MAAM,EAAE,eAAe,CAwB9E,CAAC"}
|
|
@@ -1,5 +1,42 @@
|
|
|
1
1
|
import * as Effect from 'effect/Effect';
|
|
2
|
+
import { BaseError } from '@dxos/errors';
|
|
2
3
|
import * as Plugin from './plugin';
|
|
4
|
+
import * as PluginAssetCache from './plugin-asset-cache';
|
|
5
|
+
declare const RemotePluginLoadError_base: {
|
|
6
|
+
new (options?: import("@dxos/errors").BaseErrorOptions): {
|
|
7
|
+
cause?: unknown;
|
|
8
|
+
stack?: string;
|
|
9
|
+
name: "RemotePluginLoadError";
|
|
10
|
+
context: Record<string, unknown>;
|
|
11
|
+
readonly message: string;
|
|
12
|
+
readonly _tag: "RemotePluginLoadError";
|
|
13
|
+
};
|
|
14
|
+
isError(error: unknown): error is Error;
|
|
15
|
+
name: "RemotePluginLoadError";
|
|
16
|
+
is(error: unknown): error is BaseError;
|
|
17
|
+
wrap(options?: Omit<import("@dxos/errors").BaseErrorOptions, 'cause'> & {
|
|
18
|
+
ifTypeDiffers?: boolean;
|
|
19
|
+
}): (error: unknown) => {
|
|
20
|
+
cause?: unknown;
|
|
21
|
+
stack?: string;
|
|
22
|
+
name: "RemotePluginLoadError";
|
|
23
|
+
context: Record<string, unknown>;
|
|
24
|
+
readonly message: string;
|
|
25
|
+
readonly _tag: "RemotePluginLoadError";
|
|
26
|
+
};
|
|
27
|
+
extend<Name extends string = string>(name: Name, message?: string): any;
|
|
28
|
+
captureStackTrace(targetObject: object, constructorOpt?: Function): void;
|
|
29
|
+
prepareStackTrace?: ((err: Error, stackTraces: NodeJS.CallSite[]) => any) | undefined;
|
|
30
|
+
stackTraceLimit: number;
|
|
31
|
+
};
|
|
32
|
+
/**
|
|
33
|
+
* Tagged error for any failure during remote plugin loading. Construction sites
|
|
34
|
+
* set `context.locator` and `context.reason` (one of `'invalid-locator' |
|
|
35
|
+
* 'manifest-error' | 'cache-error' | 'import-failed' | 'meta-missing' |
|
|
36
|
+
* 'meta-mismatch' | 'duplicate-id'`) so handlers can route on the failure mode.
|
|
37
|
+
*/
|
|
38
|
+
export declare class RemotePluginLoadError extends RemotePluginLoadError_base {
|
|
39
|
+
}
|
|
3
40
|
/**
|
|
4
41
|
* Abstraction over key-value storage (defaults to localStorage).
|
|
5
42
|
*/
|
|
@@ -13,13 +50,63 @@ export type Storage = {
|
|
|
13
50
|
export type Options = {
|
|
14
51
|
storage?: Storage;
|
|
15
52
|
key?: string;
|
|
53
|
+
/**
|
|
54
|
+
* Per-platform offline asset cache. Defaults to a no-op cache (no offline support).
|
|
55
|
+
*/
|
|
56
|
+
cache?: PluginAssetCache.Cache;
|
|
57
|
+
};
|
|
58
|
+
/**
|
|
59
|
+
* Options for the preload entry point. Adds an optional progress hook so hosts
|
|
60
|
+
* can drive a boot-loader counter (`Loading plugins (3/12)…`) as remote plugin
|
|
61
|
+
* manifests resolve. Resolution order is *not* deterministic — each entry races
|
|
62
|
+
* its own network fetch — so callers should treat `loaded` as a count, not an
|
|
63
|
+
* index. Failures are still swallowed; `loaded` advances on both success and
|
|
64
|
+
* recoverable failure so the counter always reaches `total`.
|
|
65
|
+
*/
|
|
66
|
+
export type PreloadOptions = Options & {
|
|
67
|
+
onPluginLoaded?: (loaded: number, total: number) => void;
|
|
16
68
|
};
|
|
17
69
|
/**
|
|
18
|
-
*
|
|
70
|
+
* Persisted record of a remote plugin that has been loaded previously.
|
|
71
|
+
*
|
|
72
|
+
* `url` is the URL of the plugin manifest (`plugin.json`), not the entry module.
|
|
19
73
|
*/
|
|
20
|
-
export
|
|
74
|
+
export type RemotePluginEntry = {
|
|
75
|
+
id: string;
|
|
76
|
+
url: string;
|
|
77
|
+
};
|
|
78
|
+
/**
|
|
79
|
+
* Returns true when the URL's hostname is the local host (localhost, 127.0.0.1, or ::1).
|
|
80
|
+
*/
|
|
81
|
+
export declare const isLocalUrl: (locator: string) => boolean;
|
|
82
|
+
/**
|
|
83
|
+
* Returns the list of remote plugin entries previously persisted by {@link make}.
|
|
84
|
+
* Useful for UI code that needs to know which loaded plugins were installed from a URL
|
|
85
|
+
* (e.g. to surface a tag on remote or localhost-hosted plugins).
|
|
86
|
+
*/
|
|
87
|
+
export declare const getRemoteEntries: (options?: Options) => readonly RemotePluginEntry[];
|
|
88
|
+
/**
|
|
89
|
+
* Preloads previously persisted remote plugins from storage. Per-entry failures
|
|
90
|
+
* are logged and swallowed — the returned effect always succeeds with whichever
|
|
91
|
+
* plugins loaded cleanly, so a single bad entry can't block the host's startup.
|
|
92
|
+
*/
|
|
93
|
+
export declare const preload: (options?: PreloadOptions) => Effect.Effect<Plugin.Plugin[], never>;
|
|
21
94
|
/**
|
|
22
95
|
* Creates a plugin loader that resolves built-in plugins by ID or loads remote plugins from URLs.
|
|
96
|
+
*
|
|
97
|
+
* Remote URLs must point at a plugin manifest (`plugin.json`). The loader fetches the manifest,
|
|
98
|
+
* eagerly persists every declared asset via the configured `PluginAssetCache`, then dynamic-imports
|
|
99
|
+
* the entry module.
|
|
100
|
+
*/
|
|
101
|
+
export declare const make: (builtinPlugins: Plugin.Plugin[], options?: Options) => (locator: string) => Effect.Effect<Plugin.Plugin, RemotePluginLoadError>;
|
|
102
|
+
/**
|
|
103
|
+
* Removes a previously installed remote plugin: drops the persisted entry, evicts cached
|
|
104
|
+
* assets, and removes any stylesheet `<link>` tags that {@link loadFromManifest} appended.
|
|
105
|
+
*
|
|
106
|
+
* Cache eviction failures are logged and swallowed — the persisted entry has already been
|
|
107
|
+
* dropped so the user-visible state is consistent regardless of whether the platform
|
|
108
|
+
* cache cooperated.
|
|
23
109
|
*/
|
|
24
|
-
export declare const
|
|
110
|
+
export declare const uninstall: (pluginId: string, options?: Options) => Effect.Effect<void, never>;
|
|
111
|
+
export {};
|
|
25
112
|
//# sourceMappingURL=url-loader.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"url-loader.d.ts","sourceRoot":"","sources":["../../../../src/core/url-loader.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"url-loader.d.ts","sourceRoot":"","sources":["../../../../src/core/url-loader.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAGxC,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAGzC,OAAO,KAAK,MAAM,MAAM,UAAU,CAAC;AACnC,OAAO,KAAK,gBAAgB,MAAM,sBAAsB,C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;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,SAAS,aAAc,MAAM,YAAW,OAAO,KAAQ,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,KAAK,CAczF,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../../src/helpers.ts"],"names":[],"mappings":"AAIA,KAAK,cAAc,GAAG;IACpB,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,CAAC,EAAE,MAAM,EAAE,CAAC;CACtB,CAAC;AAEF;;GAEG;AAEH,eAAO,MAAM,eAAe,GAAI,CAAC,SAAS,cAAc,
|
|
1
|
+
{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../../src/helpers.ts"],"names":[],"mappings":"AAIA,KAAK,cAAc,GAAG;IACpB,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,CAAC,EAAE,MAAM,EAAE,CAAC;CACtB,CAAC;AAEF;;GAEG;AAEH,eAAO,MAAM,eAAe,GAAI,CAAC,SAAS,cAAc,SAAS,CAAC,EAAE,KAAG,CAAC,EA+BvE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"capability.d.ts","sourceRoot":"","sources":["../../../../../src/plugin-operation/history/capability.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAKxC,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AACxC,OAAO,KAAK,cAAc,MAAM,mBAAmB,CAAC;AACpD,OAAO,KAAK,YAAY,MAAM,iBAAiB,CAAC
|
|
1
|
+
{"version":3,"file":"capability.d.ts","sourceRoot":"","sources":["../../../../../src/plugin-operation/history/capability.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAKxC,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AACxC,OAAO,KAAK,cAAc,MAAM,mBAAmB,CAAC;AACpD,OAAO,KAAK,YAAY,MAAM,iBAAiB,CAAC"}
|
|
@@ -1,27 +1,27 @@
|
|
|
1
1
|
import { BaseError } from '@dxos/errors';
|
|
2
2
|
declare const EmptyHistoryError_base: {
|
|
3
3
|
new (options?: import("@dxos/errors").BaseErrorOptions): {
|
|
4
|
+
cause?: unknown;
|
|
5
|
+
stack?: string;
|
|
4
6
|
name: "EmptyHistoryError";
|
|
5
7
|
context: Record<string, unknown>;
|
|
6
8
|
readonly message: string;
|
|
7
9
|
readonly _tag: "EmptyHistoryError";
|
|
8
|
-
stack?: string;
|
|
9
|
-
cause?: unknown;
|
|
10
10
|
};
|
|
11
|
+
isError(error: unknown): error is Error;
|
|
11
12
|
name: "EmptyHistoryError";
|
|
12
13
|
is(error: unknown): error is BaseError;
|
|
13
|
-
wrap(options?: Omit<import("@dxos/errors").BaseErrorOptions,
|
|
14
|
+
wrap(options?: Omit<import("@dxos/errors").BaseErrorOptions, 'cause'> & {
|
|
14
15
|
ifTypeDiffers?: boolean;
|
|
15
16
|
}): (error: unknown) => {
|
|
17
|
+
cause?: unknown;
|
|
18
|
+
stack?: string;
|
|
16
19
|
name: "EmptyHistoryError";
|
|
17
20
|
context: Record<string, unknown>;
|
|
18
21
|
readonly message: string;
|
|
19
22
|
readonly _tag: "EmptyHistoryError";
|
|
20
|
-
stack?: string;
|
|
21
|
-
cause?: unknown;
|
|
22
23
|
};
|
|
23
24
|
extend<Name extends string = string>(name: Name, message?: string): any;
|
|
24
|
-
isError(error: unknown): error is Error;
|
|
25
25
|
captureStackTrace(targetObject: object, constructorOpt?: Function): void;
|
|
26
26
|
prepareStackTrace?: ((err: Error, stackTraces: NodeJS.CallSite[]) => any) | undefined;
|
|
27
27
|
stackTraceLimit: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../../../../src/plugin-operation/history/errors.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC
|
|
1
|
+
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../../../../src/plugin-operation/history/errors.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEzC,qBAAa,iBAAkB,SAAQ,sBAAuE;CAAG"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as Effect from 'effect/Effect';
|
|
2
|
-
import {
|
|
2
|
+
import { OperationInvoker } from '@dxos/operation';
|
|
3
3
|
import type { UndoRegistry } from './undo-registry';
|
|
4
4
|
/**
|
|
5
5
|
* HistoryTracker interface - tracks operation history and provides undo.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"history-tracker.d.ts","sourceRoot":"","sources":["../../../../../src/plugin-operation/history/history-tracker.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAKxC,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"history-tracker.d.ts","sourceRoot":"","sources":["../../../../../src/plugin-operation/history/history-tracker.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAKxC,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAMnD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAQpD;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,MAAM,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;IACvC,WAAW,EAAE,MAAM,OAAO,CAAC;QAAE,KAAK,CAAC,EAAE,KAAK,CAAA;KAAE,CAAC,CAAC;IAC9C,OAAO,EAAE,MAAM,OAAO,CAAC;CACxB;AAMD;;GAEG;AACH,eAAO,MAAM,IAAI,YACN,gBAAgB,CAAC,wBAAwB,gBACpC,YAAY,KACzB,cAqFF,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/plugin-operation/history/types.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/plugin-operation/history/types.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAE/C;;GAEG;AACH,MAAM,MAAM,YAAY,GAAG;IACzB,SAAS,EAAE,SAAS,CAAC,UAAU,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;IAC1C,KAAK,EAAE,GAAG,CAAC;IACX,MAAM,EAAE,GAAG,CAAC;IACZ,OAAO,EAAE,SAAS,CAAC,UAAU,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;IACxC,YAAY,EAAE,GAAG,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"undo-mapping.d.ts","sourceRoot":"","sources":["../../../../../src/plugin-operation/history/undo-mapping.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"undo-mapping.d.ts","sourceRoot":"","sources":["../../../../../src/plugin-operation/history/undo-mapping.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAE/C;;GAEG;AACH,KAAK,KAAK,GAAG,MAAM,GAAG,CAAC,MAAM,EAAE;IAAE,EAAE,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IAAC,YAAY,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC,CAAC;AAEtF;;GAEG;AACH,MAAM,MAAM,OAAO,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,CAAC,UAAU,CAAC,MAAM,CAAC,EAAE,GAAG,CAAC,GAAG,CAAC,GAAG,KA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AAG,CAAC;IAE1C,6BAA6B;IAC7B,SAAS,EAAE,EAAE,CAAC;IAEd,gDAAgD;IAChD,OAAO,EAAE,GAAG,CAAC;IAEb;;;OAGG;IACH,aAAa,EAAE,CAAC,KAAK,EAAE,OAAO,CAAC,EAAE,CAAC,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,CAAC,KAAK,OAAO,CAAC,GAAG,CAAC,GAAG,SAAS,CAAC;IAEtF;;;OAGG;IACH,OAAO,CAAC,EAAE,eAAe,CAAC,EAAE,CAAC,CAAC;CAC/B;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,eAAO,MAAM,IAAI,GAAI,EAAE,SAAS,SAAS,CAAC,UAAU,CAAC,GAAG,EAAE,GAAG,CAAC,EAAE,GAAG,SAAS,SAAS,CAAC,UAAU,CAAC,GAAG,EAAE,GAAG,CAAC,SACjG,gBAAgB,CAAC,EAAE,EAAE,GAAG,CAAC,KAC/B,WAAW,CAAC,EAAE,EAAE,GAAG,CAAU,CAAC;AAEjC;;GAEG;AACH,eAAO,MAAM,cAAc,GAAI,EAAE,SAAS,SAAS,CAAC,UAAU,CAAC,GAAG,EAAE,GAAG,CAAC,WAC7D,eAAe,CAAC,EAAE,CAAC,GAAG,SAAS,SACjC,OAAO,CAAC,EAAE,CAAC,UACV,QAAQ,CAAC,EAAE,CAAC,KACnB,KAAK,GAAG,SAQV,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"undo-registry.d.ts","sourceRoot":"","sources":["../../../../../src/plugin-operation/history/undo-registry.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"undo-registry.d.ts","sourceRoot":"","sources":["../../../../../src/plugin-operation/history/undo-registry.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAE/C,OAAO,KAAK,KAAK,WAAW,MAAM,gBAAgB,CAAC;AAMnD;;GAEG;AACH,MAAM,MAAM,iBAAiB,GAAG;IAC9B,OAAO,EAAE,SAAS,CAAC,UAAU,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;IACxC,mEAAmE;IACnE,aAAa,EAAE,CAAC,KAAK,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,KAAK,GAAG,GAAG,SAAS,CAAC;IAC5D,8DAA8D;IAC9D,OAAO,CAAC,EAAE,WAAW,CAAC,eAAe,CAAC,SAAS,CAAC,UAAU,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC,CAAC;CACvE,CAAC;AAEF;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B,MAAM,EAAE,CAAC,SAAS,EAAE,SAAS,CAAC,UAAU,CAAC,GAAG,EAAE,GAAG,CAAC,KAAK,iBAAiB,GAAG,SAAS,CAAC;CACtF;AAMD;;GAEG;AACH,eAAO,MAAM,IAAI,gBAAiB,MAAM,WAAW,CAAC,WAAW,EAAE,KAAG,YAgBnE,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as Effect from 'effect/Effect';
|
|
2
2
|
import { OperationInvoker } from '@dxos/operation';
|
|
3
3
|
import { Capability, Plugin } from '../core';
|
|
4
|
-
declare const _default: (props: void) => Effect.Effect<Capability.Capability<Capability.InterfaceDef<OperationInvoker.OperationInvoker>>, Error,
|
|
4
|
+
declare const _default: (props: void) => Effect.Effect<Capability.Capability<Capability.InterfaceDef<OperationInvoker.OperationInvoker>>, Error, Plugin.Service | Capability.Service>;
|
|
5
5
|
export default _default;
|
|
6
6
|
//# sourceMappingURL=invoker-capability.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"invoker-capability.d.ts","sourceRoot":"","sources":["../../../../src/plugin-operation/invoker-capability.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"invoker-capability.d.ts","sourceRoot":"","sources":["../../../../src/plugin-operation/invoker-capability.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAGxC,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAGnD,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import * as Effect from 'effect/Effect';
|
|
2
|
-
import { Operation
|
|
2
|
+
import { Operation } from '@dxos/compute';
|
|
3
|
+
import { OperationInvoker } from '@dxos/operation';
|
|
3
4
|
export declare const Compute: Operation.Definition<{
|
|
4
5
|
readonly value: number;
|
|
5
6
|
}, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"testing.d.ts","sourceRoot":"","sources":["../../../../src/plugin-operation/testing.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAMxC,OAAO,EAAE,SAAS,EAAE,
|
|
1
|
+
{"version":3,"file":"testing.d.ts","sourceRoot":"","sources":["../../../../src/plugin-operation/testing.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAMxC,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC1C,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAMnD,eAAO,MAAM,OAAO;;;;SAIlB,CAAC;AAEH,eAAO,MAAM,YAAY;;;;SAIvB,CAAC;AAEH,eAAO,MAAM,QAAQ;;;;SAInB,CAAC;AAEH,eAAO,MAAM,GAAG,gEAId,CAAC;AAEH,eAAO,MAAM,UAAU,yCAIrB,CAAC;AAMH,eAAO,MAAM,cAAc;;;;UAK1B,CAAC;AAEF,eAAO,MAAM,mBAAmB;;;;UAE/B,CAAC;AAEF,eAAO,MAAM,eAAe;;;;UAE3B,CAAC;AAEF,eAAO,MAAM,UAAU,uFAA0E,CAAC;AAElG,eAAO,MAAM,iBAAiB,gEAAqE,CAAC;AAMpG;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B,4BAA4B;IAC5B,QAAQ,CAAC,MAAM,EAAE,gBAAgB,CAAC,eAAe,EAAE,CAAC;IACpD,+CAA+C;IAC/C,aAAa,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;IACtD,uCAAuC;IACvC,OAAO,EAAE,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;CAC9B;AAED;;;GAGG;AACH,eAAO,MAAM,oBAAoB,YAAa,gBAAgB,CAAC,gBAAgB,KAAG,MAAM,CAAC,MAAM,CAAC,cAAc,CAoD1G,CAAC;AAEL;;;GAGG;AACH,eAAO,MAAM,SAAS,cAAe,MAAM,OAAO,KAAG,MAAM,CAAC,MAAM,CAAC,IAAI,CAKnE,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as Effect from 'effect/Effect';
|
|
2
2
|
import { Capabilities } from '../common';
|
|
3
3
|
import { Capability, Plugin } from '../core';
|
|
4
|
-
declare const _default: (props: void) => Effect.Effect<Capability.Capability<Capability.InterfaceDef<Capabilities.ManagedRuntime>>, Error,
|
|
4
|
+
declare const _default: (props: void) => Effect.Effect<Capability.Capability<Capability.InterfaceDef<Capabilities.ManagedRuntime>>, Error, Plugin.Service | Capability.Service>;
|
|
5
5
|
export default _default;
|
|
6
6
|
//# sourceMappingURL=capability.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"capability.d.ts","sourceRoot":"","sources":["../../../../src/plugin-runtime/capability.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAIxC,OAAO,EAAoB,YAAY,EAAE,MAAM,WAAW,CAAC;AAC3D,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC
|
|
1
|
+
{"version":3,"file":"capability.d.ts","sourceRoot":"","sources":["../../../../src/plugin-runtime/capability.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAIxC,OAAO,EAAoB,YAAY,EAAE,MAAM,WAAW,CAAC;AAC3D,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC"}
|