@dxos/app-framework 0.8.4-main.422d1c7879 → 0.8.4-main.51f1e5ca51
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/lib/browser/{capability-KSNT34SN.mjs → capability-FU2RXY4V.mjs} +10 -10
- package/dist/lib/browser/{capability-DOMNPRJP.mjs → capability-UZNIX34E.mjs} +11 -11
- package/dist/lib/browser/capability-UZNIX34E.mjs.map +7 -0
- package/dist/lib/browser/{chunk-JKWMHZP6.mjs → chunk-2F5RSEOR.mjs} +2 -2
- package/dist/lib/browser/chunk-2F5RSEOR.mjs.map +7 -0
- package/dist/lib/browser/{chunk-7B6AJK4D.mjs → chunk-2FUSTGNO.mjs} +79 -215
- package/dist/lib/browser/chunk-2FUSTGNO.mjs.map +7 -0
- package/dist/lib/browser/{chunk-I34GF4NG.mjs → chunk-45CHLTBV.mjs} +2 -2
- package/dist/lib/browser/{chunk-T3Y4AEKX.mjs → chunk-5GNRIKCE.mjs} +3 -3
- package/dist/lib/browser/{chunk-T3Y4AEKX.mjs.map → chunk-5GNRIKCE.mjs.map} +1 -1
- 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-QRTB4Q3U.mjs → chunk-ASHDB736.mjs} +4 -14
- package/dist/lib/browser/{chunk-QRTB4Q3U.mjs.map → chunk-ASHDB736.mjs.map} +2 -2
- package/dist/lib/browser/{chunk-F7FW2RK2.mjs → chunk-EV4VOV4X.mjs} +7 -32
- package/dist/lib/browser/chunk-EV4VOV4X.mjs.map +7 -0
- 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-GDWTW4ZW.mjs → chunk-GUJTQEK7.mjs} +3 -11
- package/dist/lib/browser/{chunk-GDWTW4ZW.mjs.map → chunk-GUJTQEK7.mjs.map} +2 -2
- package/dist/lib/browser/{chunk-2CKCJ6PN.mjs → chunk-TZGMTFCT.mjs} +1 -1
- package/dist/lib/browser/chunk-UNGY3SDY.mjs +354 -0
- package/dist/lib/browser/chunk-UNGY3SDY.mjs.map +7 -0
- package/dist/lib/browser/{chunk-BMIAYUWT.mjs → chunk-WSKPCXZC.mjs} +144 -74
- package/dist/lib/browser/chunk-WSKPCXZC.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 +4 -4
- package/dist/lib/browser/core/plugin.mjs +2 -2
- package/dist/lib/browser/core/url-loader.mjs +9 -5
- package/dist/lib/browser/index.mjs +18 -14
- package/dist/lib/browser/index.mjs.map +1 -1
- package/dist/lib/browser/{invoker-capability-VCMPQOIA.mjs → invoker-capability-GQJP42KT.mjs} +11 -11
- package/dist/lib/browser/invoker-capability-GQJP42KT.mjs.map +7 -0
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/testing/index.mjs +14 -30
- package/dist/lib/browser/testing/index.mjs.map +3 -3
- package/dist/lib/browser/testing/react.mjs +11 -11
- package/dist/lib/browser/ui/index.mjs +14 -12
- package/dist/lib/node-esm/{capability-KJTQIWDK.mjs → capability-4URDTXWH.mjs} +11 -11
- package/dist/lib/node-esm/capability-4URDTXWH.mjs.map +7 -0
- package/dist/lib/node-esm/{capability-EOQTORML.mjs → capability-HLUG6SDI.mjs} +10 -10
- 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-JPWVIQ5I.mjs → chunk-ATESWMED.mjs} +4 -14
- package/dist/lib/node-esm/{chunk-JPWVIQ5I.mjs.map → chunk-ATESWMED.mjs.map} +2 -2
- package/dist/lib/node-esm/{chunk-G3RTFSNG.mjs → chunk-FZLRFRYV.mjs} +2 -2
- package/dist/lib/node-esm/chunk-FZLRFRYV.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-HI3YBICQ.mjs → chunk-GLBO7FJP.mjs} +3 -11
- package/dist/lib/node-esm/{chunk-HI3YBICQ.mjs.map → chunk-GLBO7FJP.mjs.map} +2 -2
- package/dist/lib/node-esm/{chunk-7PJ5OKRB.mjs → chunk-IEAO4CAC.mjs} +79 -215
- package/dist/lib/node-esm/chunk-IEAO4CAC.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-KLDFWTG3.mjs +355 -0
- package/dist/lib/node-esm/chunk-KLDFWTG3.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-VKHGNEDB.mjs → chunk-MEX6YYWJ.mjs} +3 -3
- package/dist/lib/node-esm/{chunk-VKHGNEDB.mjs.map → chunk-MEX6YYWJ.mjs.map} +1 -1
- package/dist/lib/node-esm/{chunk-EL3R25OQ.mjs → chunk-OZ7DZA5Z.mjs} +1 -1
- package/dist/lib/node-esm/{chunk-42KBWDE4.mjs → chunk-TC5FX6VR.mjs} +1 -1
- package/dist/lib/node-esm/{chunk-URWHJQT2.mjs → chunk-X7AFIYKJ.mjs} +7 -32
- package/dist/lib/node-esm/chunk-X7AFIYKJ.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/{chunk-WZ6DHQER.mjs → chunk-Y7QUMO53.mjs} +144 -74
- package/dist/lib/node-esm/chunk-Y7QUMO53.mjs.map +7 -0
- 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 +4 -4
- package/dist/lib/node-esm/core/plugin.mjs +2 -2
- package/dist/lib/node-esm/core/url-loader.mjs +9 -5
- package/dist/lib/node-esm/index.mjs +18 -14
- package/dist/lib/node-esm/index.mjs.map +1 -1
- package/dist/lib/node-esm/{invoker-capability-EGA3XW6J.mjs → invoker-capability-O4OTEP24.mjs} +11 -11
- package/dist/lib/node-esm/invoker-capability-O4OTEP24.mjs.map +7 -0
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/testing/index.mjs +14 -30
- package/dist/lib/node-esm/testing/index.mjs.map +3 -3
- package/dist/lib/node-esm/testing/react.mjs +11 -11
- package/dist/lib/node-esm/ui/index.mjs +14 -12
- package/dist/plugin/node-esm/index.mjs +58 -33
- 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 +1 -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 +1 -1
- 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 +7 -1
- 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.map +1 -1
- package/dist/types/src/core/url-loader.d.ts +62 -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 +2 -2
- package/dist/types/src/plugin-operation/invoker-capability.d.ts.map +1 -1
- package/dist/types/src/plugin-operation/testing.d.ts +1 -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 +1 -1
- package/dist/types/src/testing/harness.d.ts.map +1 -1
- package/dist/types/src/testing/react.d.ts.map +1 -1
- 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.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 +1 -1
- package/dist/types/src/ui/components/Surface/index.d.ts.map +1 -1
- package/dist/types/src/ui/components/Surface/types.d.ts.map +1 -1
- 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 +20 -36
- package/dist/types/src/vite-plugin/boot-loader/BootLoader.stories.d.ts.map +1 -1
- package/dist/types/src/vite-plugin/boot-loader/index.d.ts +9 -8
- package/dist/types/src/vite-plugin/boot-loader/index.d.ts.map +1 -1
- package/dist/types/src/vite-plugin/composer/index.d.ts +11 -11
- package/dist/types/src/vite-plugin/composer/index.d.ts.map +1 -1
- package/dist/types/src/vite-plugin/import-map/index.d.ts.map +1 -1
- package/dist/types/src/vite-plugin/manifest.d.ts +26 -5
- package/dist/types/src/vite-plugin/manifest.d.ts.map +1 -1
- package/dist/types/src/vite-plugin/packages.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +24 -23
- package/src/common/capabilities.ts +1 -1
- package/src/common/operations.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 +2 -2
- package/src/core/plugin-manager.ts +53 -14
- package/src/core/plugin-manifest.test.ts +48 -0
- package/src/core/plugin-manifest.ts +102 -0
- package/src/core/url-loader.test.ts +71 -5
- package/src/core/url-loader.ts +166 -36
- package/src/plugin-operation/history/capability.ts +1 -1
- package/src/plugin-operation/history/history-tracker.test.ts +1 -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 +1 -1
- package/src/plugin-operation/testing.ts +1 -1
- package/src/testing/harness.ts +1 -1
- 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 +12 -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 +4 -2
- package/src/ui/components/Surface/SurfaceComponent.stories.tsx +1 -1
- package/src/ui/components/index.ts +1 -0
- package/src/ui/hooks/useApp.tsx +149 -25
- package/src/ui/hooks/useLoading.tsx +14 -6
- package/src/vite-plugin/boot-loader/BootLoader.stories.tsx +201 -100
- package/src/vite-plugin/boot-loader/boot-loader.css +221 -44
- package/src/vite-plugin/boot-loader/boot-loader.js +259 -40
- package/src/vite-plugin/boot-loader/index.ts +27 -14
- package/src/vite-plugin/composer/index.ts +30 -37
- package/src/vite-plugin/import-map/index.ts +12 -3
- package/src/vite-plugin/manifest.test.ts +5 -4
- package/src/vite-plugin/manifest.ts +35 -5
- package/src/vite-plugin/packages.ts +7 -0
- package/tsconfig.json +7 -1
- package/.swc/plugins/linux_x86_64_19.0.0/727453fb3a62f7f1d952a41e051ca8a6f88cadc45cee43c6a4d1aa45f9b75665.wasmer-v7 +0 -0
- package/dist/lib/browser/capability-DOMNPRJP.mjs.map +0 -7
- package/dist/lib/browser/chunk-7B6AJK4D.mjs.map +0 -7
- package/dist/lib/browser/chunk-BMIAYUWT.mjs.map +0 -7
- package/dist/lib/browser/chunk-F7FW2RK2.mjs.map +0 -7
- package/dist/lib/browser/chunk-JKWMHZP6.mjs.map +0 -7
- package/dist/lib/browser/chunk-RFSO3JRG.mjs +0 -1
- package/dist/lib/browser/chunk-Y543KCO7.mjs +0 -174
- package/dist/lib/browser/chunk-Y543KCO7.mjs.map +0 -7
- package/dist/lib/browser/invoker-capability-VCMPQOIA.mjs.map +0 -7
- package/dist/lib/node-esm/capability-KJTQIWDK.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-7PJ5OKRB.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-DXVXOGJ7.mjs +0 -175
- package/dist/lib/node-esm/chunk-DXVXOGJ7.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-G3RTFSNG.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-URWHJQT2.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-WZ6DHQER.mjs.map +0 -7
- package/dist/lib/node-esm/invoker-capability-EGA3XW6J.mjs.map +0 -7
- /package/dist/lib/browser/{capability-KSNT34SN.mjs.map → capability-FU2RXY4V.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/browser/{chunk-2CKCJ6PN.mjs.map → chunk-TZGMTFCT.mjs.map} +0 -0
- /package/dist/lib/node-esm/{capability-EOQTORML.mjs.map → capability-HLUG6SDI.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
- /package/dist/lib/node-esm/{chunk-42KBWDE4.mjs.map → chunk-TC5FX6VR.mjs.map} +0 -0
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import "./chunk-
|
|
1
|
+
import "./chunk-5GNRIKCE.mjs";
|
|
2
2
|
import {
|
|
3
3
|
capabilities_exports
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-2F5RSEOR.mjs";
|
|
5
5
|
import {
|
|
6
6
|
activation_events_exports
|
|
7
|
-
} from "./chunk-
|
|
8
|
-
import "./chunk-
|
|
9
|
-
import "./chunk-
|
|
10
|
-
import "./chunk-
|
|
11
|
-
import "./chunk-
|
|
7
|
+
} from "./chunk-45CHLTBV.mjs";
|
|
8
|
+
import "./chunk-G7SDBRKH.mjs";
|
|
9
|
+
import "./chunk-UNGY3SDY.mjs";
|
|
10
|
+
import "./chunk-2FUSTGNO.mjs";
|
|
11
|
+
import "./chunk-66IXTIVK.mjs";
|
|
12
12
|
import {
|
|
13
13
|
plugin_exports
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-GUJTQEK7.mjs";
|
|
15
15
|
import {
|
|
16
16
|
capability_exports
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-TZGMTFCT.mjs";
|
|
18
18
|
import "./chunk-J5LGTIGS.mjs";
|
|
19
19
|
|
|
20
20
|
// src/plugin-runtime/capability.ts
|
|
@@ -35,4 +35,4 @@ var capability_default = capability_exports.makeModule(Effect.fnUntraced(functio
|
|
|
35
35
|
export {
|
|
36
36
|
capability_default as default
|
|
37
37
|
};
|
|
38
|
-
//# sourceMappingURL=capability-
|
|
38
|
+
//# sourceMappingURL=capability-FU2RXY4V.mjs.map
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import {
|
|
2
2
|
make,
|
|
3
3
|
make2
|
|
4
|
-
} from "./chunk-
|
|
5
|
-
import "./chunk-
|
|
4
|
+
} from "./chunk-EV4VOV4X.mjs";
|
|
5
|
+
import "./chunk-5GNRIKCE.mjs";
|
|
6
6
|
import {
|
|
7
7
|
capabilities_exports
|
|
8
|
-
} from "./chunk-
|
|
9
|
-
import "./chunk-
|
|
10
|
-
import "./chunk-
|
|
11
|
-
import "./chunk-
|
|
12
|
-
import "./chunk-
|
|
13
|
-
import "./chunk-
|
|
14
|
-
import "./chunk-
|
|
8
|
+
} from "./chunk-2F5RSEOR.mjs";
|
|
9
|
+
import "./chunk-45CHLTBV.mjs";
|
|
10
|
+
import "./chunk-G7SDBRKH.mjs";
|
|
11
|
+
import "./chunk-UNGY3SDY.mjs";
|
|
12
|
+
import "./chunk-2FUSTGNO.mjs";
|
|
13
|
+
import "./chunk-66IXTIVK.mjs";
|
|
14
|
+
import "./chunk-GUJTQEK7.mjs";
|
|
15
15
|
import {
|
|
16
16
|
capability_exports
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-TZGMTFCT.mjs";
|
|
18
18
|
import "./chunk-J5LGTIGS.mjs";
|
|
19
19
|
|
|
20
20
|
// src/plugin-operation/history/capability.ts
|
|
@@ -32,4 +32,4 @@ var capability_default = capability_exports.makeModule(Effect.fnUntraced(functio
|
|
|
32
32
|
export {
|
|
33
33
|
capability_default as default
|
|
34
34
|
};
|
|
35
|
-
//# sourceMappingURL=capability-
|
|
35
|
+
//# sourceMappingURL=capability-UZNIX34E.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/plugin-operation/history/capability.ts"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\n\nimport { type OperationInvoker } from '@dxos/compute';\n\nimport { Capabilities } from '../../common';\nimport { Capability } from '../../core';\nimport * as HistoryTracker from './history-tracker';\nimport * as UndoRegistry from './undo-registry';\n\n//\n// Capability Module - contributes both UndoRegistry and HistoryTracker.\n//\n\nexport default Capability.makeModule(\n Effect.fnUntraced(function* () {\n // Get the context for synchronous access in callbacks.\n const capabilities = yield* Capability.Service;\n\n // Create UndoRegistry.\n const undoRegistry = UndoRegistry.make(() => capabilities.getAll(Capabilities.UndoMapping).flat());\n\n // Create HistoryTracker (depends on UndoRegistry and OperationInvoker).\n const invoker = yield* Capability.get(Capabilities.OperationInvoker);\n // Cast to internal type - the factory always returns OperationInvokerInternal.\n const historyTracker = HistoryTracker.make(invoker as OperationInvoker.OperationInvokerInternal, undoRegistry);\n\n return [\n Capability.contributes(Capabilities.UndoRegistry, undoRegistry),\n Capability.contributes(Capabilities.HistoryTracker, historyTracker),\n ];\n }),\n);\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;AAIA,YAAYA,YAAY;AAaxB,IAAA,qBAAeC,mBAAWC,WACjBC,kBAAW,aAAA;AAEhB,QAAMC,eAAe,OAAOH,mBAAWI;AAGvC,QAAMC,eAA4BC,KAAK,MAAMH,aAAaI,OAAOC,qBAAaC,WAAW,EAAEC,KAAI,CAAA;AAG/F,QAAMC,UAAU,OAAOX,mBAAWY,IAAIJ,qBAAaK,gBAAgB;AAEnE,QAAMC,iBAAgCR,MAAKK,SAAsDN,YAAAA;AAEjG,SAAO;IACLL,mBAAWe,YAAYP,qBAAaQ,cAAcX,YAAAA;IAClDL,mBAAWe,YAAYP,qBAAaS,gBAAgBH,cAAAA;;AAExD,CAAA,CAAA;",
|
|
6
|
+
"names": ["Effect", "Capability", "makeModule", "fnUntraced", "capabilities", "Service", "undoRegistry", "make", "getAll", "Capabilities", "UndoMapping", "flat", "invoker", "get", "OperationInvoker", "historyTracker", "contributes", "UndoRegistry", "HistoryTracker"]
|
|
7
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
capability_exports
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-TZGMTFCT.mjs";
|
|
4
4
|
import {
|
|
5
5
|
__export
|
|
6
6
|
} from "./chunk-J5LGTIGS.mjs";
|
|
@@ -77,4 +77,4 @@ export {
|
|
|
77
77
|
subscribeAtom,
|
|
78
78
|
capabilities_exports
|
|
79
79
|
};
|
|
80
|
-
//# sourceMappingURL=chunk-
|
|
80
|
+
//# sourceMappingURL=chunk-2F5RSEOR.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/common/capabilities.ts"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { type Atom, type Registry } from '@effect-atom/atom-react';\nimport type * as Command$ from '@effect/cli/Command';\nimport * as Effect from 'effect/Effect';\nimport type * as Layer$ from 'effect/Layer';\nimport type * as ManagedRuntime$ from 'effect/ManagedRuntime';\nimport type { FC, PropsWithChildren } from 'react';\n\nimport type { OperationInvoker as OperationInvoker$, OperationHandlerSet } from '@dxos/compute';\n\nimport { Capability as Capability$, type PluginManager as PluginManager$ } from '../core';\nimport type {\n HistoryTracker as HistoryTracker$,\n UndoMapping as UndoMapping$,\n UndoRegistry as UndoRegistry$,\n} from '../plugin-operation';\nimport type { Surface } from '../ui';\n\n/**\n * Null capability.\n * @category Capability\n */\nexport const Null = Capability$.make<null>('org.dxos.app-framework.capability.null');\n\n/**\n * @category Capability\n */\nexport const PluginManager = Capability$.make<PluginManager$.PluginManager>(\n 'org.dxos.app-framework.capability.plugin-manager',\n);\n\n/**\n * @category Capability\n */\nexport const AtomRegistry = Capability$.make<Registry.Registry>('org.dxos.app-framework.capability.atom-registry');\n\nexport type ReactContext = Readonly<{\n id: string;\n dependsOn?: string[];\n context: FC<PropsWithChildren>;\n}>;\n\n/**\n * @category Capability\n */\nexport const ReactContext = Capability$.make<ReactContext>('org.dxos.app-framework.capability.react-context');\n\nexport type ReactRoot = Readonly<{ id: string; root: FC<PropsWithChildren> }>;\n\n/**\n * @category Capability\n */\nexport const ReactRoot = Capability$.make<ReactRoot>('org.dxos.app-framework.capability.react-root');\n\n/**\n * Surface definitions that can be either React components or Web Components.\n */\nexport type ReactSurface = Surface.Definition | readonly Surface.Definition[];\n\n/**\n * @category Capability\n */\nexport const ReactSurface = Capability$.make<ReactSurface>('org.dxos.app-framework.common.react-surface');\n\nexport type AnyCommand = Command$.Command<any, any, any, any>;\n\n/**\n * @category Capability\n */\nexport const Command = Capability$.make<AnyCommand>('org.dxos.app-framework.capability.command');\n\n/**\n * @category Capability\n */\nexport const Layer = Capability$.make<Layer$.Layer<any, any, any>>('org.dxos.app-framework.capability.layer');\n\nexport type ManagedRuntime = ManagedRuntime$.ManagedRuntime<any, any>;\n\n/**\n * @category Capability\n */\nexport const ManagedRuntime = Capability$.make<ManagedRuntime>('org.dxos.app-framework.capability.managed-runtime');\n\n//\n// Operation System Capabilities\n//\n\nexport const OperationHandler = Capability$.make<OperationHandlerSet.OperationHandlerSet>(\n 'org.dxos.app-framework.capability.operation-handler',\n);\n\nexport type UndoMapping = UndoMapping$.UndoMapping;\n\n/**\n * Undo mapping registration - contributed by plugins.\n * @category Capability\n */\nexport const UndoMapping = Capability$.make<UndoMapping[]>('org.dxos.app-framework.capability.undo-mapping');\n\nexport type OperationInvoker = OperationInvoker$.OperationInvoker;\n\n/**\n * Operation invoker - provided by OperationPlugin.\n * @category Capability\n */\nexport const OperationInvoker = Capability$.make<OperationInvoker>(\n 'org.dxos.app-framework.capability.operation-invoker',\n);\n\nexport type UndoRegistry = UndoRegistry$.UndoRegistry;\n\n/**\n * Undo registry - provided by OperationPlugin.\n * @category Capability\n */\nexport const UndoRegistry = Capability$.make<UndoRegistry>('org.dxos.app-framework.capability.undo-registry');\n\nexport type HistoryTracker = HistoryTracker$.HistoryTracker;\n\n/**\n * History tracker - provided by OperationPlugin.\n * @category Capability\n */\nexport const HistoryTracker = Capability$.make<HistoryTracker>('org.dxos.app-framework.capability.history-tracker');\n\n//\n// Atom Capability Helpers\n//\n\n/**\n * Get the current value of an atom capability.\n * @example const settings = yield* Capabilities.getAtomValue(ThreadCapabilities.Settings);\n */\nexport const getAtomValue = <T>(\n atomCapability: Capability$.InterfaceDef<Atom.Atom<T>>,\n): Effect.Effect<T, Error, Capability$.Service> =>\n Effect.gen(function* () {\n const registry = yield* Capability$.get(AtomRegistry);\n const atom = yield* Capability$.get(atomCapability);\n return registry.get(atom);\n });\n\n/**\n * Update an atom capability value (requires writable atom).\n * @example yield* Capabilities.updateAtomValue(ThreadCapabilities.Settings, (s) => ({ ...s, foo: true }));\n */\nexport const updateAtomValue = <T>(\n atomCapability: Capability$.InterfaceDef<Atom.Writable<T>>,\n fn: (current: T) => T,\n): Effect.Effect<void, Error, Capability$.Service> =>\n Effect.gen(function* () {\n const registry = yield* Capability$.get(AtomRegistry);\n const atom = yield* Capability$.get(atomCapability);\n registry.set(atom, fn(registry.get(atom)));\n });\n\n/**\n * Subscribe to an atom capability.\n * @example const unsubscribe = yield* Capabilities.subscribeAtom(ThreadCapabilities.Settings, (value) => ...);\n */\nexport const subscribeAtom = <T>(\n atomCapability: Capability$.InterfaceDef<Atom.Atom<T>>,\n callback: (value: T) => void,\n): Effect.Effect<() => void, Error, Capability$.Service> =>\n Effect.gen(function* () {\n const registry = yield* Capability$.get(AtomRegistry);\n const atom = yield* Capability$.get(atomCapability);\n return registry.subscribe(atom, () => callback(registry.get(atom)));\n });\n"],
|
|
5
|
+
"mappings": ";;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;;AAMA,YAAYA,YAAY;AAmBjB,IAAMC,OAAOC,mBAAYC,KAAW,wCAAA;AAKpC,IAAMC,gBAAgBF,mBAAYC,KACvC,kDAAA;AAMK,IAAME,eAAeH,mBAAYC,KAAwB,iDAAA;AAWzD,IAAMG,eAAeJ,mBAAYC,KAAmB,iDAAA;AAOpD,IAAMI,YAAYL,mBAAYC,KAAgB,8CAAA;AAU9C,IAAMK,eAAeN,mBAAYC,KAAmB,6CAAA;AAOpD,IAAMM,UAAUP,mBAAYC,KAAiB,2CAAA;AAK7C,IAAMO,QAAQR,mBAAYC,KAAkC,yCAAA;AAO5D,IAAMQ,iBAAiBT,mBAAYC,KAAqB,mDAAA;AAMxD,IAAMS,mBAAmBV,mBAAYC,KAC1C,qDAAA;AASK,IAAMU,cAAcX,mBAAYC,KAAoB,gDAAA;AAQpD,IAAMW,mBAAmBZ,mBAAYC,KAC1C,qDAAA;AASK,IAAMY,eAAeb,mBAAYC,KAAmB,iDAAA;AAQpD,IAAMa,iBAAiBd,mBAAYC,KAAqB,mDAAA;AAUxD,IAAMc,eAAe,CAC1BC,mBAEOC,WAAI,aAAA;AACT,QAAMC,WAAW,OAAOlB,mBAAYmB,IAAIhB,YAAAA;AACxC,QAAMiB,OAAO,OAAOpB,mBAAYmB,IAAIH,cAAAA;AACpC,SAAOE,SAASC,IAAIC,IAAAA;AACtB,CAAA;AAMK,IAAMC,kBAAkB,CAC7BL,gBACAM,OAEOL,WAAI,aAAA;AACT,QAAMC,WAAW,OAAOlB,mBAAYmB,IAAIhB,YAAAA;AACxC,QAAMiB,OAAO,OAAOpB,mBAAYmB,IAAIH,cAAAA;AACpCE,WAASK,IAAIH,MAAME,GAAGJ,SAASC,IAAIC,IAAAA,CAAAA,CAAAA;AACrC,CAAA;AAMK,IAAMI,gBAAgB,CAC3BR,gBACAS,aAEOR,WAAI,aAAA;AACT,QAAMC,WAAW,OAAOlB,mBAAYmB,IAAIhB,YAAAA;AACxC,QAAMiB,OAAO,OAAOpB,mBAAYmB,IAAIH,cAAAA;AACpC,SAAOE,SAASQ,UAAUN,MAAM,MAAMK,SAASP,SAASC,IAAIC,IAAAA,CAAAA,CAAAA;AAC9D,CAAA;",
|
|
6
|
+
"names": ["Effect", "Null", "Capability$", "make", "PluginManager", "AtomRegistry", "ReactContext", "ReactRoot", "ReactSurface", "Command", "Layer", "ManagedRuntime", "OperationHandler", "UndoMapping", "OperationInvoker", "UndoRegistry", "HistoryTracker", "getAtomValue", "atomCapability", "gen", "registry", "get", "atom", "updateAtomValue", "fn", "set", "subscribeAtom", "callback", "subscribe"]
|
|
7
|
+
}
|
|
@@ -2,13 +2,13 @@ import {
|
|
|
2
2
|
eventKey,
|
|
3
3
|
getEvents,
|
|
4
4
|
isAllOf
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-66IXTIVK.mjs";
|
|
6
6
|
import {
|
|
7
7
|
Service as Service2
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-GUJTQEK7.mjs";
|
|
9
9
|
import {
|
|
10
10
|
Service
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-TZGMTFCT.mjs";
|
|
12
12
|
import {
|
|
13
13
|
__export
|
|
14
14
|
} from "./chunk-J5LGTIGS.mjs";
|
|
@@ -70,15 +70,7 @@ var CapabilityManagerImpl = class {
|
|
|
70
70
|
_capability = Atom.family((id) => {
|
|
71
71
|
return Atom.make((get2) => {
|
|
72
72
|
const current = get2(this._capabilities(id));
|
|
73
|
-
invariant(current.length > 0, `No capability found for ${id}`, {
|
|
74
|
-
F: __dxlog_file,
|
|
75
|
-
L: 101,
|
|
76
|
-
S: this,
|
|
77
|
-
A: [
|
|
78
|
-
"current.length > 0",
|
|
79
|
-
"`No capability found for ${id}`"
|
|
80
|
-
]
|
|
81
|
-
});
|
|
73
|
+
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}`"] });
|
|
82
74
|
return current[0];
|
|
83
75
|
});
|
|
84
76
|
});
|
|
@@ -92,12 +84,7 @@ var CapabilityManagerImpl = class {
|
|
|
92
84
|
log("capability already contributed, skipping", {
|
|
93
85
|
id: interfaceDef.identifier,
|
|
94
86
|
moduleId
|
|
95
|
-
}, {
|
|
96
|
-
F: __dxlog_file,
|
|
97
|
-
L: 122,
|
|
98
|
-
S: this,
|
|
99
|
-
C: (f, a) => f(...a)
|
|
100
|
-
});
|
|
87
|
+
}, { "~LogMeta": "~LogMeta", F: __dxlog_file, L: 46, S: this });
|
|
101
88
|
return;
|
|
102
89
|
}
|
|
103
90
|
const entry = {
|
|
@@ -112,12 +99,7 @@ var CapabilityManagerImpl = class {
|
|
|
112
99
|
id: interfaceDef.identifier,
|
|
113
100
|
moduleId,
|
|
114
101
|
count: current.length
|
|
115
|
-
}, {
|
|
116
|
-
F: __dxlog_file,
|
|
117
|
-
L: 128,
|
|
118
|
-
S: this,
|
|
119
|
-
C: (f, a) => f(...a)
|
|
120
|
-
});
|
|
102
|
+
}, { "~LogMeta": "~LogMeta", F: __dxlog_file, L: 60, S: this });
|
|
121
103
|
}
|
|
122
104
|
remove(interfaceDef, implementation) {
|
|
123
105
|
const current = this._registry.get(this._capabilityEntries(interfaceDef.identifier));
|
|
@@ -130,21 +112,11 @@ var CapabilityManagerImpl = class {
|
|
|
130
112
|
log("capability removed", {
|
|
131
113
|
id: interfaceDef.identifier,
|
|
132
114
|
count: current.length
|
|
133
|
-
}, {
|
|
134
|
-
F: __dxlog_file,
|
|
135
|
-
L: 144,
|
|
136
|
-
S: this,
|
|
137
|
-
C: (f, a) => f(...a)
|
|
138
|
-
});
|
|
115
|
+
}, { "~LogMeta": "~LogMeta", F: __dxlog_file, L: 74, S: this });
|
|
139
116
|
} else {
|
|
140
117
|
log.warn("capability not removed", {
|
|
141
118
|
id: interfaceDef.identifier
|
|
142
|
-
}, {
|
|
143
|
-
F: __dxlog_file,
|
|
144
|
-
L: 146,
|
|
145
|
-
S: this,
|
|
146
|
-
C: (f, a) => f(...a)
|
|
147
|
-
});
|
|
119
|
+
}, { "~LogMeta": "~LogMeta", F: __dxlog_file, L: 79, S: this });
|
|
148
120
|
}
|
|
149
121
|
}
|
|
150
122
|
atom(interfaceDef) {
|
|
@@ -155,15 +127,7 @@ var CapabilityManagerImpl = class {
|
|
|
155
127
|
}
|
|
156
128
|
get(interfaceDef) {
|
|
157
129
|
const capabilities = this.getAll(interfaceDef);
|
|
158
|
-
invariant(capabilities.length > 0, `No capability found for ${interfaceDef.identifier}`, {
|
|
159
|
-
F: __dxlog_file,
|
|
160
|
-
L: 161,
|
|
161
|
-
S: this,
|
|
162
|
-
A: [
|
|
163
|
-
"capabilities.length > 0",
|
|
164
|
-
"`No capability found for ${interfaceDef.identifier}`"
|
|
165
|
-
]
|
|
166
|
-
});
|
|
130
|
+
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}`"] });
|
|
167
131
|
return capabilities[0];
|
|
168
132
|
}
|
|
169
133
|
waitFor(interfaceDef) {
|
|
@@ -208,6 +172,7 @@ var ManagerImpl = class {
|
|
|
208
172
|
_eventsFiredAtom;
|
|
209
173
|
_pendingResetAtom;
|
|
210
174
|
_pluginLoader;
|
|
175
|
+
_onRemove;
|
|
211
176
|
_capabilities = /* @__PURE__ */ new Map();
|
|
212
177
|
_moduleMemoMap = /* @__PURE__ */ new Map();
|
|
213
178
|
_moduleSemaphores = /* @__PURE__ */ new Map();
|
|
@@ -216,12 +181,13 @@ var ManagerImpl = class {
|
|
|
216
181
|
_inFlightFibers = Effect2.runSync(Ref.make([]));
|
|
217
182
|
_shutdownSemaphore = Effect2.runSync(Effect2.makeSemaphore(1));
|
|
218
183
|
_shuttingDown = Effect2.runSync(Ref.make(false));
|
|
219
|
-
constructor({ pluginLoader, plugins = [], core = plugins.map(({ meta }) => meta.id), enabled = [], registry }) {
|
|
184
|
+
constructor({ pluginLoader, plugins = [], core = plugins.map(({ meta }) => meta.id), enabled = [], registry, onRemove }) {
|
|
220
185
|
this.registry = registry ?? Registry.make();
|
|
221
186
|
this.capabilities = make2({
|
|
222
187
|
registry: this.registry
|
|
223
188
|
});
|
|
224
189
|
this._pluginLoader = pluginLoader;
|
|
190
|
+
this._onRemove = onRemove;
|
|
225
191
|
this._pluginsAtom = Atom2.make(plugins).pipe(Atom2.keepAlive);
|
|
226
192
|
this._coreAtom = Atom2.make(core).pipe(Atom2.keepAlive);
|
|
227
193
|
this._enabledAtom = Atom2.make(enabled).pipe(Atom2.keepAlive);
|
|
@@ -301,12 +267,7 @@ var ManagerImpl = class {
|
|
|
301
267
|
return Effect2.gen(this, function* () {
|
|
302
268
|
log2("add plugin", {
|
|
303
269
|
id
|
|
304
|
-
}, {
|
|
305
|
-
F: __dxlog_file2,
|
|
306
|
-
L: 233,
|
|
307
|
-
S: this,
|
|
308
|
-
C: (f, a) => f(...a)
|
|
309
|
-
});
|
|
270
|
+
}, { "~LogMeta": "~LogMeta", F: __dxlog_file2, L: 132, S: this });
|
|
310
271
|
const plugin = yield* this._pluginLoader(id);
|
|
311
272
|
this._addPlugin(plugin);
|
|
312
273
|
return plugin;
|
|
@@ -320,12 +281,7 @@ var ManagerImpl = class {
|
|
|
320
281
|
return Effect2.gen(this, function* () {
|
|
321
282
|
log2("enable plugin", {
|
|
322
283
|
id
|
|
323
|
-
}, {
|
|
324
|
-
F: __dxlog_file2,
|
|
325
|
-
L: 246,
|
|
326
|
-
S: this,
|
|
327
|
-
C: (f, a) => f(...a)
|
|
328
|
-
});
|
|
284
|
+
}, { "~LogMeta": "~LogMeta", F: __dxlog_file2, L: 145, S: this });
|
|
329
285
|
const plugin = this._getPlugin(id);
|
|
330
286
|
if (!plugin) {
|
|
331
287
|
return false;
|
|
@@ -342,12 +298,7 @@ var ManagerImpl = class {
|
|
|
342
298
|
events: [
|
|
343
299
|
...this.getPendingReset()
|
|
344
300
|
]
|
|
345
|
-
}, {
|
|
346
|
-
F: __dxlog_file2,
|
|
347
|
-
L: 259,
|
|
348
|
-
S: this,
|
|
349
|
-
C: (f, a) => f(...a)
|
|
350
|
-
});
|
|
301
|
+
}, { "~LogMeta": "~LogMeta", F: __dxlog_file2, L: 160, S: this });
|
|
351
302
|
yield* Effect2.all(this.getPendingReset().map((event) => this.activate(event)), {
|
|
352
303
|
concurrency: "unbounded"
|
|
353
304
|
});
|
|
@@ -359,20 +310,23 @@ var ManagerImpl = class {
|
|
|
359
310
|
* @param id The id of the plugin.
|
|
360
311
|
*/
|
|
361
312
|
remove(id) {
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
F: __dxlog_file2,
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
313
|
+
return Effect2.gen(this, function* () {
|
|
314
|
+
log2("remove plugin", {
|
|
315
|
+
id
|
|
316
|
+
}, { "~LogMeta": "~LogMeta", F: __dxlog_file2, L: 176, S: this });
|
|
317
|
+
const disabled = yield* this.disable(id);
|
|
318
|
+
if (!disabled) {
|
|
319
|
+
return false;
|
|
320
|
+
}
|
|
321
|
+
this._removePlugin(id);
|
|
322
|
+
if (this._onRemove) {
|
|
323
|
+
this._runForkedFiber(this._onRemove(id).pipe(Effect2.tapError((error) => Effect2.sync(() => log2.warn("plugin remove hook failed", {
|
|
324
|
+
id,
|
|
325
|
+
error
|
|
326
|
+
}, { "~LogMeta": "~LogMeta", F: __dxlog_file2, L: 185, S: this }))), Effect2.ignore));
|
|
327
|
+
}
|
|
328
|
+
return true;
|
|
369
329
|
});
|
|
370
|
-
const result = this.disable(id);
|
|
371
|
-
if (!result) {
|
|
372
|
-
return false;
|
|
373
|
-
}
|
|
374
|
-
this._removePlugin(id);
|
|
375
|
-
return true;
|
|
376
330
|
}
|
|
377
331
|
/**
|
|
378
332
|
* Disables a plugin.
|
|
@@ -382,12 +336,7 @@ var ManagerImpl = class {
|
|
|
382
336
|
return Effect2.gen(this, function* () {
|
|
383
337
|
log2("disable plugin", {
|
|
384
338
|
id
|
|
385
|
-
}, {
|
|
386
|
-
F: __dxlog_file2,
|
|
387
|
-
L: 290,
|
|
388
|
-
S: this,
|
|
389
|
-
C: (f, a) => f(...a)
|
|
390
|
-
});
|
|
339
|
+
}, { "~LogMeta": "~LogMeta", F: __dxlog_file2, L: 198, S: this });
|
|
391
340
|
if (this._get(this._coreAtom).includes(id)) {
|
|
392
341
|
return false;
|
|
393
342
|
}
|
|
@@ -418,22 +367,12 @@ var ManagerImpl = class {
|
|
|
418
367
|
log2("skipping activation during shutdown", {
|
|
419
368
|
key,
|
|
420
369
|
...params
|
|
421
|
-
}, {
|
|
422
|
-
F: __dxlog_file2,
|
|
423
|
-
L: 326,
|
|
424
|
-
S: this,
|
|
425
|
-
C: (f, a) => f(...a)
|
|
426
|
-
});
|
|
370
|
+
}, { "~LogMeta": "~LogMeta", F: __dxlog_file2, L: 227, S: this });
|
|
427
371
|
return false;
|
|
428
372
|
}
|
|
429
373
|
return yield* Effect2.withFiberRuntime((fiber) => this._activateEvent(key, params, fiber).pipe(together(Effect2.sleep(Duration.seconds(15)).pipe(Effect2.andThen(Effect2.sync(() => log2.warn("event activation is taking a long time", {
|
|
430
374
|
event: key
|
|
431
|
-
}, {
|
|
432
|
-
F: __dxlog_file2,
|
|
433
|
-
L: 334,
|
|
434
|
-
S: this,
|
|
435
|
-
C: (f, a) => f(...a)
|
|
436
|
-
}))))), Performance.addTrackEntry({
|
|
375
|
+
}, { "~LogMeta": "~LogMeta", F: __dxlog_file2, L: 233, S: this }))))), Performance.addTrackEntry({
|
|
437
376
|
name: typeof event === "string" ? event : eventKey(event),
|
|
438
377
|
devtools: {
|
|
439
378
|
dataType: "track-entry",
|
|
@@ -472,12 +411,7 @@ var ManagerImpl = class {
|
|
|
472
411
|
const key = typeof event === "string" ? event : eventKey(event);
|
|
473
412
|
log2("reset", {
|
|
474
413
|
key
|
|
475
|
-
}, {
|
|
476
|
-
F: __dxlog_file2,
|
|
477
|
-
L: 380,
|
|
478
|
-
S: this,
|
|
479
|
-
C: (f, a) => f(...a)
|
|
480
|
-
});
|
|
414
|
+
}, { "~LogMeta": "~LogMeta", F: __dxlog_file2, L: 270, S: this });
|
|
481
415
|
const modules = this._getActiveModulesByEvent(key);
|
|
482
416
|
const results = yield* Effect2.all(modules.map((module) => this._deactivateModule(module)), {
|
|
483
417
|
concurrency: "unbounded"
|
|
@@ -492,12 +426,7 @@ var ManagerImpl = class {
|
|
|
492
426
|
shutdown() {
|
|
493
427
|
return this._shutdownSemaphore.withPermits(1)(Effect2.gen(this, function* () {
|
|
494
428
|
yield* Ref.set(this._shuttingDown, true);
|
|
495
|
-
log2("shutdown", void 0, {
|
|
496
|
-
F: __dxlog_file2,
|
|
497
|
-
L: 399,
|
|
498
|
-
S: this,
|
|
499
|
-
C: (f, a) => f(...a)
|
|
500
|
-
});
|
|
429
|
+
log2("shutdown", void 0, { "~LogMeta": "~LogMeta", F: __dxlog_file2, L: 287, S: this });
|
|
501
430
|
yield* this._interruptInFlightActivations();
|
|
502
431
|
const activeIds = [
|
|
503
432
|
...this._get(this._activeAtom)
|
|
@@ -512,12 +441,7 @@ var ManagerImpl = class {
|
|
|
512
441
|
this._moduleMemoMap.clear();
|
|
513
442
|
yield* Ref.set(this._activatingEvents, []);
|
|
514
443
|
yield* Ref.set(this._activatingModules, []);
|
|
515
|
-
log2("shutdown complete", void 0, {
|
|
516
|
-
F: __dxlog_file2,
|
|
517
|
-
L: 419,
|
|
518
|
-
S: this,
|
|
519
|
-
C: (f, a) => f(...a)
|
|
520
|
-
});
|
|
444
|
+
log2("shutdown complete", void 0, { "~LogMeta": "~LogMeta", F: __dxlog_file2, L: 302, S: this });
|
|
521
445
|
return true;
|
|
522
446
|
}).pipe(Effect2.ensuring(Ref.set(this._shuttingDown, false))));
|
|
523
447
|
}
|
|
@@ -562,12 +486,7 @@ var ManagerImpl = class {
|
|
|
562
486
|
if (pendingReset.length > 0) {
|
|
563
487
|
log2("pending reset", {
|
|
564
488
|
events: pendingReset
|
|
565
|
-
}, {
|
|
566
|
-
F: __dxlog_file2,
|
|
567
|
-
L: 481,
|
|
568
|
-
S: this,
|
|
569
|
-
C: (f, a) => f(...a)
|
|
570
|
-
});
|
|
489
|
+
}, { "~LogMeta": "~LogMeta", F: __dxlog_file2, L: 345, S: this });
|
|
571
490
|
this._update(this._pendingResetAtom, (current) => [
|
|
572
491
|
...current,
|
|
573
492
|
...pendingReset
|
|
@@ -600,18 +519,24 @@ var ManagerImpl = class {
|
|
|
600
519
|
_untrackFiber(ref, fiber) {
|
|
601
520
|
return Ref.update(ref, (fibers) => fibers.filter((trackedFiber) => trackedFiber !== fiber));
|
|
602
521
|
}
|
|
522
|
+
/**
|
|
523
|
+
* Spawns an effect on the default runtime and registers the resulting fiber in
|
|
524
|
+
* `_inFlightFibers` so {@link shutdown} can interrupt it. Used from sync entry
|
|
525
|
+
* points like {@link remove} where there is no enclosing Effect to fork from;
|
|
526
|
+
* inside an Effect chain prefer the existing track/await/untrack pattern.
|
|
527
|
+
*/
|
|
528
|
+
_runForkedFiber(effect) {
|
|
529
|
+
const fiber = Effect2.runFork(effect);
|
|
530
|
+
Effect2.runSync(this._trackFiber(this._inFlightFibers, fiber));
|
|
531
|
+
Effect2.runFork(Fiber.await(fiber).pipe(Effect2.andThen(() => this._untrackFiber(this._inFlightFibers, fiber))));
|
|
532
|
+
}
|
|
603
533
|
//
|
|
604
534
|
// Registration helpers
|
|
605
535
|
//
|
|
606
536
|
_addPlugin(plugin) {
|
|
607
537
|
log2("add plugin", {
|
|
608
538
|
id: plugin.meta.id
|
|
609
|
-
}, {
|
|
610
|
-
F: __dxlog_file2,
|
|
611
|
-
L: 525,
|
|
612
|
-
S: this,
|
|
613
|
-
C: (f, a) => f(...a)
|
|
614
|
-
});
|
|
539
|
+
}, { "~LogMeta": "~LogMeta", F: __dxlog_file2, L: 394, S: this });
|
|
615
540
|
this._update(this._pluginsAtom, (plugins) => plugins.includes(plugin) ? plugins : [
|
|
616
541
|
...plugins,
|
|
617
542
|
plugin
|
|
@@ -620,23 +545,13 @@ var ManagerImpl = class {
|
|
|
620
545
|
_removePlugin(id) {
|
|
621
546
|
log2("remove plugin", {
|
|
622
547
|
id
|
|
623
|
-
}, {
|
|
624
|
-
F: __dxlog_file2,
|
|
625
|
-
L: 531,
|
|
626
|
-
S: this,
|
|
627
|
-
C: (f, a) => f(...a)
|
|
628
|
-
});
|
|
548
|
+
}, { "~LogMeta": "~LogMeta", F: __dxlog_file2, L: 404, S: this });
|
|
629
549
|
this._update(this._pluginsAtom, (plugins) => plugins.filter((plugin) => plugin.meta.id !== id));
|
|
630
550
|
}
|
|
631
551
|
_addModule(module) {
|
|
632
552
|
log2("add module", {
|
|
633
553
|
id: module.id
|
|
634
|
-
}, {
|
|
635
|
-
F: __dxlog_file2,
|
|
636
|
-
L: 536,
|
|
637
|
-
S: this,
|
|
638
|
-
C: (f, a) => f(...a)
|
|
639
|
-
});
|
|
554
|
+
}, { "~LogMeta": "~LogMeta", F: __dxlog_file2, L: 410, S: this });
|
|
640
555
|
this._update(this._modulesAtom, (modules) => modules.includes(module) ? modules : [
|
|
641
556
|
...modules,
|
|
642
557
|
module
|
|
@@ -645,12 +560,7 @@ var ManagerImpl = class {
|
|
|
645
560
|
_removeModule(id) {
|
|
646
561
|
log2("remove module", {
|
|
647
562
|
id
|
|
648
|
-
}, {
|
|
649
|
-
F: __dxlog_file2,
|
|
650
|
-
L: 542,
|
|
651
|
-
S: this,
|
|
652
|
-
C: (f, a) => f(...a)
|
|
653
|
-
});
|
|
563
|
+
}, { "~LogMeta": "~LogMeta", F: __dxlog_file2, L: 420, S: this });
|
|
654
564
|
this._update(this._modulesAtom, (modules) => modules.filter((module) => module.id !== id));
|
|
655
565
|
}
|
|
656
566
|
//
|
|
@@ -662,12 +572,7 @@ var ManagerImpl = class {
|
|
|
662
572
|
log2("activating", {
|
|
663
573
|
key,
|
|
664
574
|
...params
|
|
665
|
-
}, {
|
|
666
|
-
F: __dxlog_file2,
|
|
667
|
-
L: 557,
|
|
668
|
-
S: this,
|
|
669
|
-
C: (f, a) => f(...a)
|
|
670
|
-
});
|
|
575
|
+
}, { "~LogMeta": "~LogMeta", F: __dxlog_file2, L: 431, S: this });
|
|
671
576
|
yield* Ref.update(this._activatingEvents, (activating) => Array.append(activating, key));
|
|
672
577
|
this._clearPendingReset(key);
|
|
673
578
|
const activatingEvents = yield* this._activatingEvents;
|
|
@@ -676,12 +581,7 @@ var ManagerImpl = class {
|
|
|
676
581
|
if (modules.length === 0) {
|
|
677
582
|
log2("no modules to activate", {
|
|
678
583
|
key
|
|
679
|
-
}, {
|
|
680
|
-
F: __dxlog_file2,
|
|
681
|
-
L: 565,
|
|
682
|
-
S: this,
|
|
683
|
-
C: (f, a) => f(...a)
|
|
684
|
-
});
|
|
584
|
+
}, { "~LogMeta": "~LogMeta", F: __dxlog_file2, L: 441, S: this });
|
|
685
585
|
if (!this._get(this._eventsFiredAtom).includes(key)) {
|
|
686
586
|
this._update(this._eventsFiredAtom, (events) => [
|
|
687
587
|
...events,
|
|
@@ -703,12 +603,7 @@ var ManagerImpl = class {
|
|
|
703
603
|
log2("activating modules", {
|
|
704
604
|
key,
|
|
705
605
|
modules: activatingModuleIds
|
|
706
|
-
}, {
|
|
707
|
-
F: __dxlog_file2,
|
|
708
|
-
L: 592,
|
|
709
|
-
S: this,
|
|
710
|
-
C: (f, a) => f(...a)
|
|
711
|
-
});
|
|
606
|
+
}, { "~LogMeta": "~LogMeta", F: __dxlog_file2, L: 462, S: this });
|
|
712
607
|
performance.mark(`event:${key}:start`);
|
|
713
608
|
yield* PubSub.publish(this.activation, {
|
|
714
609
|
event: key,
|
|
@@ -732,12 +627,7 @@ var ManagerImpl = class {
|
|
|
732
627
|
});
|
|
733
628
|
log2("activated", {
|
|
734
629
|
key
|
|
735
|
-
}, {
|
|
736
|
-
F: __dxlog_file2,
|
|
737
|
-
L: 610,
|
|
738
|
-
S: this,
|
|
739
|
-
C: (f, a) => f(...a)
|
|
740
|
-
});
|
|
630
|
+
}, { "~LogMeta": "~LogMeta", F: __dxlog_file2, L: 487, S: this });
|
|
741
631
|
return true;
|
|
742
632
|
}).pipe(Effect2.ensuring(Ref.update(this._activatingModules, (activating) => Array.filter(activating, (module) => !activatingModuleIds.includes(module)))));
|
|
743
633
|
}
|
|
@@ -769,18 +659,13 @@ var ManagerImpl = class {
|
|
|
769
659
|
}), together(Effect2.sleep(Duration.seconds(10)).pipe(Effect2.andThen(Effect2.sync(() => log2.warn(`${logLabel} is taking a long time`, {
|
|
770
660
|
event: key,
|
|
771
661
|
[eventKey2]: events.map(eventKey)
|
|
772
|
-
}, {
|
|
773
|
-
F: __dxlog_file2,
|
|
774
|
-
L: 689,
|
|
775
|
-
S: this,
|
|
776
|
-
C: (f, a) => f(...a)
|
|
777
|
-
}))))), Effect2.asVoid);
|
|
662
|
+
}, { "~LogMeta": "~LogMeta", F: __dxlog_file2, L: 520, S: this }))))), Effect2.asVoid);
|
|
778
663
|
}
|
|
779
664
|
//
|
|
780
665
|
// Module lifecycle helpers
|
|
781
666
|
//
|
|
782
667
|
_loadCapabilitiesForModules(key, modules) {
|
|
783
|
-
return Function.pipe(modules, Array.map((mod) => this._loadModule(mod)), Effect2.allWith({
|
|
668
|
+
return Function.pipe(modules, Array.map((mod) => this._loadModule(mod, key)), Effect2.allWith({
|
|
784
669
|
concurrency: "unbounded"
|
|
785
670
|
}), Effect2.catchAll((error) => {
|
|
786
671
|
return Effect2.gen(this, function* () {
|
|
@@ -810,7 +695,14 @@ var ManagerImpl = class {
|
|
|
810
695
|
}
|
|
811
696
|
return semaphore;
|
|
812
697
|
}
|
|
813
|
-
|
|
698
|
+
// `parentEvent` is the activation event that first triggered this module
|
|
699
|
+
// load — included in `activating`/`activated` PubSub messages so subscribers
|
|
700
|
+
// (e.g. the boot loader's status listener) can associate a module with its
|
|
701
|
+
// triggering event in the trace. The same module may be referenced by
|
|
702
|
+
// multiple events, but module loads are memoized via `_moduleMemoMap`, so
|
|
703
|
+
// only the first event to need it will appear here; later events await the
|
|
704
|
+
// cached deferred without re-publishing.
|
|
705
|
+
_loadModule = (module, parentEvent) => Effect2.gen(this, function* () {
|
|
814
706
|
const semaphore = this._getModuleSemaphore(module.id);
|
|
815
707
|
const deferredToAwait = yield* Effect2.gen(this, function* () {
|
|
816
708
|
const existing = this._moduleMemoMap.get(module.id);
|
|
@@ -821,16 +713,12 @@ var ManagerImpl = class {
|
|
|
821
713
|
this._moduleMemoMap.set(module.id, deferred);
|
|
822
714
|
const loadEffect = Effect2.gen(this, function* () {
|
|
823
715
|
log2("loading module", {
|
|
824
|
-
module: module.id
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
L: 766,
|
|
828
|
-
S: this,
|
|
829
|
-
C: (f, a) => f(...a)
|
|
830
|
-
});
|
|
716
|
+
module: module.id,
|
|
717
|
+
parentEvent
|
|
718
|
+
}, { "~LogMeta": "~LogMeta", F: __dxlog_file2, L: 578, S: this });
|
|
831
719
|
performance.mark(`module:${module.id}:start`);
|
|
832
720
|
yield* PubSub.publish(this.activation, {
|
|
833
|
-
event:
|
|
721
|
+
event: parentEvent,
|
|
834
722
|
state: "activating",
|
|
835
723
|
module: module.id
|
|
836
724
|
});
|
|
@@ -842,29 +730,20 @@ var ManagerImpl = class {
|
|
|
842
730
|
performance.mark(`module:${module.id}:end`);
|
|
843
731
|
performance.measure(`module:${module.id}`, `module:${module.id}:start`, `module:${module.id}:end`);
|
|
844
732
|
yield* PubSub.publish(this.activation, {
|
|
845
|
-
event:
|
|
733
|
+
event: parentEvent,
|
|
846
734
|
state: "activated",
|
|
847
735
|
module: module.id
|
|
848
736
|
});
|
|
849
737
|
log2("loaded module", {
|
|
850
738
|
module: module.id,
|
|
739
|
+
parentEvent,
|
|
851
740
|
elapsed,
|
|
852
741
|
failed: false
|
|
853
|
-
}, {
|
|
854
|
-
F: __dxlog_file2,
|
|
855
|
-
L: 781,
|
|
856
|
-
S: this,
|
|
857
|
-
C: (f, a) => f(...a)
|
|
858
|
-
});
|
|
742
|
+
}, { "~LogMeta": "~LogMeta", F: __dxlog_file2, L: 600, S: this });
|
|
859
743
|
return normalized;
|
|
860
744
|
}).pipe(Effect2.withSpan("PluginManager._loadModule"), together(Effect2.sleep(Duration.seconds(10)).pipe(Effect2.andThen(Effect2.sync(() => log2.warn(`module is taking a long time to activate`, {
|
|
861
745
|
module: module.id
|
|
862
|
-
}, {
|
|
863
|
-
F: __dxlog_file2,
|
|
864
|
-
L: 792,
|
|
865
|
-
S: this,
|
|
866
|
-
C: (f, a) => f(...a)
|
|
867
|
-
}))))), Performance.addTrackEntry({
|
|
746
|
+
}, { "~LogMeta": "~LogMeta", F: __dxlog_file2, L: 607, S: this }))))), Performance.addTrackEntry({
|
|
868
747
|
name: module.id,
|
|
869
748
|
devtools: {
|
|
870
749
|
dataType: "track-entry",
|
|
@@ -880,12 +759,7 @@ var ManagerImpl = class {
|
|
|
880
759
|
error: error instanceof Error ? error.message : String(error),
|
|
881
760
|
stack: error instanceof Error ? error.stack : void 0,
|
|
882
761
|
isDefect: !Cause.isFailure(cause)
|
|
883
|
-
}, {
|
|
884
|
-
F: __dxlog_file2,
|
|
885
|
-
L: 813,
|
|
886
|
-
S: this,
|
|
887
|
-
C: (f, a) => f(...a)
|
|
888
|
-
});
|
|
762
|
+
}, { "~LogMeta": "~LogMeta", F: __dxlog_file2, L: 621, S: this });
|
|
889
763
|
return Deferred2.fail(deferred, error instanceof Error ? error : new Error(String(error)));
|
|
890
764
|
})));
|
|
891
765
|
yield* this._trackFiber(this._inFlightFibers, fiber);
|
|
@@ -914,12 +788,7 @@ var ManagerImpl = class {
|
|
|
914
788
|
const id = module.id;
|
|
915
789
|
log2("deactivating", {
|
|
916
790
|
id
|
|
917
|
-
}, {
|
|
918
|
-
F: __dxlog_file2,
|
|
919
|
-
L: 851,
|
|
920
|
-
S: this,
|
|
921
|
-
C: (f, a) => f(...a)
|
|
922
|
-
});
|
|
791
|
+
}, { "~LogMeta": "~LogMeta", F: __dxlog_file2, L: 654, S: this });
|
|
923
792
|
this._moduleMemoMap.delete(id);
|
|
924
793
|
const capabilities = this._capabilities.get(id);
|
|
925
794
|
if (capabilities) {
|
|
@@ -936,12 +805,7 @@ var ManagerImpl = class {
|
|
|
936
805
|
}
|
|
937
806
|
log2("deactivated", {
|
|
938
807
|
id
|
|
939
|
-
}, {
|
|
940
|
-
F: __dxlog_file2,
|
|
941
|
-
L: 869,
|
|
942
|
-
S: this,
|
|
943
|
-
C: (f, a) => f(...a)
|
|
944
|
-
});
|
|
808
|
+
}, { "~LogMeta": "~LogMeta", F: __dxlog_file2, L: 671, S: this });
|
|
945
809
|
return true;
|
|
946
810
|
});
|
|
947
811
|
}
|
|
@@ -961,4 +825,4 @@ export {
|
|
|
961
825
|
make5 as make,
|
|
962
826
|
plugin_manager_exports
|
|
963
827
|
};
|
|
964
|
-
//# sourceMappingURL=chunk-
|
|
828
|
+
//# sourceMappingURL=chunk-2FUSTGNO.mjs.map
|