You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-**configuration** — how to register modules and use `addConfig` / `configure`
13
+
-**cross-module deps** — `requireInstance` pattern for inter-module dependencies
14
+
-**events** — `event$` observable and event naming conventions
15
+
-**authoring modules** — step-by-step guide for creating a custom module
16
+
-**common mistakes** — FAQ-style pitfalls and how to avoid them
17
+
18
+
All pages are structured for retrieval (chunked sections, import paths, copy-pasteable examples) to improve Fusion Knowledge / Azure AI Search answer quality.
Copy file name to clipboardExpand all lines: .changeset/fusion-framework-module_register-plugin.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,7 +5,7 @@
5
5
6
6
Add `registerPlugin` to `IModulesConfigurator` and `ModulesConfigurator` for application-level side effects that run after modules are initialized and before application render.
7
7
8
-
Plugins receive the initialized module map through `FrameworkPluginArgs` and may return a teardown callback that runs during `dispose`. Plugin-related types and the `createPlugin(name, callback)` helper are available from the dedicated `@equinor/fusion-framework-module/plugins` entrypoint. Plugin registration and teardown failures are isolated so one failing plugin does not block other plugins or module disposal.
8
+
Plugins receive the initialized module map through `FrameworkPluginArgs` and may return a teardown callback that runs during `dispose`. Plugin-related types and the `createPlugin(name, callback)` helper are available from the dedicated `@equinor/fusion-framework-module/plugins` entrypoint. Plugin registration and teardown failures are isolated so one failing plugin does not block other plugins or module disposal.`ModuleConfiguratorEventName` and `ModuleConfiguratorEventBaseName` are available from the `@equinor/fusion-framework-module/configurator` entrypoint for filtering `ModuleConfigurator.{name}.{state}` lifecycle events without hard-coded strings.
Copy file name to clipboardExpand all lines: packages/modules/module/README.md
+55-1Lines changed: 55 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -17,6 +17,7 @@ A `Module` is a plain object that declares a name, an optional configuration fac
17
17
1.**Configure** – each module's `configure()` factory creates a config builder; registered callbacks mutate it; `postConfigure()` hooks run.
18
18
2.**Initialize** – modules are initialized concurrently; cross-module dependencies are resolved through `requireInstance()`.
19
19
3.**Post-initialize** – `postInitialize()` hooks and `onInitialized` callbacks run.
20
+
4.**Plugins** – registered plugins connect host-level side effects after every module is ready.
20
21
21
22
The result is a sealed `ModulesInstance` whose property names match the module keys and whose values are the initialized providers.
22
23
@@ -28,6 +29,19 @@ An abstract class for building module configuration declaratively. Subclasses ex
28
29
29
30
Abstract base class for module providers (the runtime instances returned by `initialize()`). It manages a `Subscription` container for automatic teardown and exposes a `SemanticVersion` for compatibility checks.
30
31
32
+
## Documentation
33
+
34
+
| Topic | Description |
35
+
|---|---|
36
+
|[Concepts](./docs/concepts.md)| Module system overview, roles, and mental model |
`configure` and `initialize` are the two required hooks. `postConfigure`, `postInitialize`, and `dispose` are optional.
163
198
199
+
### Plugins and host-level side effects
200
+
201
+
Use `registerPlugin` for application-owned wiring that needs the complete module instance before render. Plugins run after `postInitialize` and `onInitialized`, but before `initialize()` resolves. Return a teardown callback to clean up subscriptions, global listeners, timers, or telemetry bindings during dispose.
0 commit comments