@thi.ng/interceptors 3.2.78 → 3.2.80

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/CHANGELOG.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Change Log
2
2
 
3
- - **Last updated**: 2025-01-29T16:25:48Z
3
+ - **Last updated**: 2025-02-13T16:03:11Z
4
4
  - **Generator**: [thi.ng/monopub](https://thi.ng/monopub)
5
5
 
6
6
  All notable changes to this project will be documented in this file.
package/event-bus.d.ts CHANGED
@@ -2,32 +2,30 @@ import type { IDeref, IObjectOf, Maybe } from "@thi.ng/api";
2
2
  import type { IAtom } from "@thi.ng/atom";
3
3
  import { type EffectDef, type EffectPriority, type Event, type EventDef, type IDispatch, type Interceptor, type InterceptorContext, type InterceptorFn, type SideEffect } from "./api.js";
4
4
  /**
5
- * Batched event processor for using composable interceptors for event
6
- * handling and side effects to execute the result of handled events.
5
+ * Batched event processor for using composable interceptors for event handling
6
+ * and side effects to execute the result of handled events.
7
7
  *
8
8
  * @remarks
9
- * Events processed by this class are simple 2-element tuples/arrays of
10
- * this form: `["event-id", payload?]`, where the `payload` is optional
11
- * and can be of any type.
9
+ * Events processed by this class are simple 2-element tuples/arrays of this
10
+ * form: `["event-id", payload?]`, where the `payload` is optional and can be of
11
+ * any type.
12
12
  *
13
- * Events are processed by registered handlers which transform each
14
- * event into a number of side effect descriptions to be executed later.
15
- * This separation ensures event handlers themselves are pure functions
16
- * and leads to more efficient reuse of side effecting operations. The
17
- * pure data nature until the last stage of processing (the application
18
- * side effects) too means that event flow can be much easier inspected
19
- * and debugged.
13
+ * Events are processed by registered handlers which transform each event into a
14
+ * number of side effect descriptions to be executed later. This separation
15
+ * ensures event handlers themselves are pure functions and leads to more
16
+ * efficient reuse of side effecting operations. The pure data nature until the
17
+ * last stage of processing (the application side effects) too means that event
18
+ * flow can be much easier inspected and debugged.
20
19
  *
21
- * In this model a single event handler itself is an array of objects
22
- * with `pre` and/or `post` keys and functions attached to each key.
23
- * These functions are called interceptors, since each intercepts the
24
- * processing of an event and can contribute their own side effects.
25
- * Each event's interceptor chain is processed bi-directionally (`pre`
26
- * in forward, `post` in reverse order) and the effects returned from
27
- * each interceptor are merged/collected. The outcome of this setup is a
28
- * more aspect-oriented, composable approach to event handling and
29
- * allows to inject common, re-usable behaviors for multiple event types
30
- * (logging, validation, undo/redo triggers etc.).
20
+ * In this model a single event handler itself is an array of objects with `pre`
21
+ * and/or `post` keys and functions attached to each key. These functions are
22
+ * called interceptors, since each intercepts the processing of an event and can
23
+ * contribute their own side effects. Each event's interceptor chain is
24
+ * processed bi-directionally (`pre` in forward, `post` in reverse order) and
25
+ * the effects returned from each interceptor are merged/collected. The outcome
26
+ * of this setup is a more aspect-oriented, composable approach to event
27
+ * handling and allows to inject common, re-usable behaviors for multiple event
28
+ * types (logging, validation, undo/redo triggers etc.).
31
29
  *
32
30
  * Side effects are only processed after all event handlers have run.
33
31
  * Furthermore, their order of execution can be configured with optional
@@ -40,18 +38,17 @@ import { type EffectDef, type EffectPriority, type Event, type EventDef, type ID
40
38
  * - {@link StatelessEventBus.processEffects}
41
39
  * - {@link StatelessEventBus.mergeEffects}
42
40
  *
43
- * The overall approach of this type of event processing is heavily
44
- * based on the pattern initially pioneered by @Day8/re-frame, with the
45
- * following differences:
41
+ * The overall approach of this type of event processing is heavily based on the
42
+ * pattern initially pioneered by @Day8/re-frame, with the following
43
+ * differences:
46
44
  *
47
- * - stateless (see {@link EventBus} for the more common stateful
48
- * alternative)
45
+ * - stateless (see {@link EventBus} for the more common stateful alternative)
49
46
  * - standalone implementation (no assumptions about surrounding
50
47
  * context/framework)
51
48
  * - manual control over event queue processing
52
49
  * - supports event cancellation (via FX_CANCEL side effect)
53
- * - side effect collection (multiple side effects for same effect type
54
- * per frame)
50
+ * - side effect collection (multiple side effects for same effect type per
51
+ * frame)
55
52
  * - side effect priorities (to control execution order)
56
53
  * - dynamic addition/removal of handlers & effects
57
54
  */
@@ -345,7 +342,7 @@ export declare class EventBus extends StatelessEventBus implements IDeref<any>,
345
342
  * #### `EV_SET_VALUE`
346
343
  *
347
344
  * Resets state path to provided value. See
348
- * [`setIn()`](https://docs.thi.ng/umbrella/paths/functions/setIn.html).
345
+ * [`setIn`](https://docs.thi.ng/umbrella/paths/functions/setIn.html).
349
346
  *
350
347
  * Example event definition:
351
348
  * ```js
@@ -358,7 +355,7 @@ export declare class EventBus extends StatelessEventBus implements IDeref<any>,
358
355
  *
359
356
  * Updates a state path's value with provided function and optional extra
360
357
  * arguments. See
361
- * [`updateIn()`](https://docs.thi.ng/umbrella/paths/functions/updateIn.html).
358
+ * [`updateIn`](https://docs.thi.ng/umbrella/paths/functions/updateIn.html).
362
359
  *
363
360
  * Example event definition:
364
361
  * ```js
package/event-bus.js CHANGED
@@ -517,7 +517,7 @@ class EventBus extends StatelessEventBus {
517
517
  * #### `EV_SET_VALUE`
518
518
  *
519
519
  * Resets state path to provided value. See
520
- * [`setIn()`](https://docs.thi.ng/umbrella/paths/functions/setIn.html).
520
+ * [`setIn`](https://docs.thi.ng/umbrella/paths/functions/setIn.html).
521
521
  *
522
522
  * Example event definition:
523
523
  * ```js
@@ -530,7 +530,7 @@ class EventBus extends StatelessEventBus {
530
530
  *
531
531
  * Updates a state path's value with provided function and optional extra
532
532
  * arguments. See
533
- * [`updateIn()`](https://docs.thi.ng/umbrella/paths/functions/updateIn.html).
533
+ * [`updateIn`](https://docs.thi.ng/umbrella/paths/functions/updateIn.html).
534
534
  *
535
535
  * Example event definition:
536
536
  * ```js
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thi.ng/interceptors",
3
- "version": "3.2.78",
3
+ "version": "3.2.80",
4
4
  "description": "Interceptor based event bus, side effect & immutable state handling",
5
5
  "type": "module",
6
6
  "module": "./index.js",
@@ -42,16 +42,16 @@
42
42
  "tool:tangle": "../../node_modules/.bin/tangle src/**/*.ts"
43
43
  },
44
44
  "dependencies": {
45
- "@thi.ng/api": "^8.11.19",
46
- "@thi.ng/atom": "^5.3.20",
47
- "@thi.ng/checks": "^3.6.22",
48
- "@thi.ng/errors": "^2.5.25",
49
- "@thi.ng/logger": "^3.0.30",
50
- "@thi.ng/paths": "^5.2.0"
45
+ "@thi.ng/api": "^8.11.20",
46
+ "@thi.ng/atom": "^5.3.21",
47
+ "@thi.ng/checks": "^3.6.23",
48
+ "@thi.ng/errors": "^2.5.26",
49
+ "@thi.ng/logger": "^3.1.1",
50
+ "@thi.ng/paths": "^5.2.1"
51
51
  },
52
52
  "devDependencies": {
53
- "esbuild": "^0.24.2",
54
- "typedoc": "^0.27.6",
53
+ "esbuild": "^0.25.0",
54
+ "typedoc": "^0.27.7",
55
55
  "typescript": "^5.7.3"
56
56
  },
57
57
  "keywords": [
@@ -97,5 +97,5 @@
97
97
  "status": "completed",
98
98
  "year": 2016
99
99
  },
100
- "gitHead": "fc1d498e8d4b690db873c30cc594352a804e7a65\n"
100
+ "gitHead": "9a0b33253fef092aaf301decf6ecd54317874d4c\n"
101
101
  }