@thi.ng/interceptors 3.1.26 → 3.2.0
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 +7 -1
- package/README.md +14 -19
- package/api.d.ts +7 -7
- package/package.json +17 -14
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Change Log
|
|
2
2
|
|
|
3
|
-
- **Last updated**: 2022-
|
|
3
|
+
- **Last updated**: 2022-12-16T12:52:25Z
|
|
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.
|
|
@@ -9,6 +9,12 @@ See [Conventional Commits](https://conventionalcommits.org/) for commit guidelin
|
|
|
9
9
|
**Note:** Unlisted _patch_ versions only involve non-code or otherwise excluded changes
|
|
10
10
|
and/or version bumps of transitive dependencies.
|
|
11
11
|
|
|
12
|
+
## [3.2.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/interceptors@3.2.0) (2022-12-16)
|
|
13
|
+
|
|
14
|
+
#### 🚀 Features
|
|
15
|
+
|
|
16
|
+
- fix [#358](https://github.com/thi-ng/umbrella/issues/358) add "completed" project status, update pkgs/readmes ([d35fa52](https://github.com/thi-ng/umbrella/commit/d35fa52))
|
|
17
|
+
|
|
12
18
|
## [3.1.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/interceptors@3.1.0) (2021-11-17)
|
|
13
19
|
|
|
14
20
|
#### 🚀 Features
|
package/README.md
CHANGED
|
@@ -1,14 +1,19 @@
|
|
|
1
1
|
<!-- This file is generated - DO NOT EDIT! -->
|
|
2
2
|
|
|
3
|
-
# 
|
|
3
|
+
# 
|
|
4
4
|
|
|
5
5
|
[](https://www.npmjs.com/package/@thi.ng/interceptors)
|
|
6
6
|

|
|
7
|
-
[](https://mastodon.thi.ng/@toxi)
|
|
8
8
|
|
|
9
9
|
This project is part of the
|
|
10
10
|
[@thi.ng/umbrella](https://github.com/thi-ng/umbrella/) monorepo.
|
|
11
11
|
|
|
12
|
+
**Update 12/2022: This package is considered completed and no longer being
|
|
13
|
+
updated with new features. Please consider using
|
|
14
|
+
[@thi.ng/rstream](https://github.com/thi-ng/umbrella/tree/develop/packages/rstream)
|
|
15
|
+
instead...**
|
|
16
|
+
|
|
12
17
|
- [About](#about)
|
|
13
18
|
- [Event bus, interceptors, side effects](#event-bus-interceptors-side-effects)
|
|
14
19
|
- [Interceptors: Event and Effect primitives](#interceptors-event-and-effect-primitives)
|
|
@@ -22,13 +27,11 @@ This project is part of the
|
|
|
22
27
|
- [Usage examples](#usage-examples)
|
|
23
28
|
- [API](#api)
|
|
24
29
|
- [Authors](#authors)
|
|
25
|
-
- [Maintainer](#maintainer)
|
|
26
|
-
- [Contributors](#contributors)
|
|
27
30
|
- [License](#license)
|
|
28
31
|
|
|
29
32
|
## About
|
|
30
33
|
|
|
31
|
-
Interceptor based event bus, side effect & immutable state handling
|
|
34
|
+
Interceptor based event bus, side effect & immutable state handling
|
|
32
35
|
|
|
33
36
|
## Event bus, interceptors, side effects
|
|
34
37
|
|
|
@@ -117,7 +120,7 @@ commented source code and examples for now:
|
|
|
117
120
|
|
|
118
121
|
## Status
|
|
119
122
|
|
|
120
|
-
**
|
|
123
|
+
**COMPLETED** - no further development planned
|
|
121
124
|
|
|
122
125
|
[Search or submit any issues for this package](https://github.com/thi-ng/umbrella/issues?q=%5Binterceptors%5D+in%3Atitle)
|
|
123
126
|
|
|
@@ -143,11 +146,8 @@ ES module import:
|
|
|
143
146
|
|
|
144
147
|
For Node.js REPL:
|
|
145
148
|
|
|
146
|
-
```
|
|
147
|
-
|
|
148
|
-
node --experimental-repl-await
|
|
149
|
-
|
|
150
|
-
> const interceptors = await import("@thi.ng/interceptors");
|
|
149
|
+
```js
|
|
150
|
+
const interceptors = await import("@thi.ng/interceptors");
|
|
151
151
|
```
|
|
152
152
|
|
|
153
153
|
Package sizes (brotli'd, pre-treeshake): ESM: 2.04 KB
|
|
@@ -188,13 +188,8 @@ TODO
|
|
|
188
188
|
|
|
189
189
|
## Authors
|
|
190
190
|
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
- Karsten Schmidt ([@postspectacular](https://github.com/postspectacular))
|
|
194
|
-
|
|
195
|
-
### Contributors
|
|
196
|
-
|
|
197
|
-
- Logan Powell ([@loganpowell](https://github.com/loganpowell))
|
|
191
|
+
- [Karsten Schmidt](https://thi.ng) (Main author)
|
|
192
|
+
- [Logan Powell](https://github.com/loganpowell)
|
|
198
193
|
|
|
199
194
|
If this project contributes to an academic publication, please cite it as:
|
|
200
195
|
|
|
@@ -209,4 +204,4 @@ If this project contributes to an academic publication, please cite it as:
|
|
|
209
204
|
|
|
210
205
|
## License
|
|
211
206
|
|
|
212
|
-
© 2016 - 2022 Karsten Schmidt // Apache
|
|
207
|
+
© 2016 - 2022 Karsten Schmidt // Apache License 2.0
|
package/api.d.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import type { ReadonlyAtom } from "@thi.ng/atom";
|
|
2
2
|
import type { ILogger } from "@thi.ng/logger";
|
|
3
|
-
export
|
|
4
|
-
export
|
|
5
|
-
export
|
|
6
|
-
export
|
|
7
|
-
export
|
|
8
|
-
export
|
|
9
|
-
export
|
|
3
|
+
export type InterceptorFn = (state: any, e: Event, bus: IDispatch, ctx: InterceptorContext) => InterceptorContext | void;
|
|
4
|
+
export type InterceptorPredicate = (state: any, e: Event, bus: IDispatch, ctx: InterceptorContext) => boolean;
|
|
5
|
+
export type SideEffect = (x: any, bus: IDispatch, ctx: InterceptorContext) => any;
|
|
6
|
+
export type EventDef = Interceptor | InterceptorFn | (Interceptor | InterceptorFn)[];
|
|
7
|
+
export type EffectDef = SideEffect | [SideEffect, number];
|
|
8
|
+
export type AsyncEffectDef = [string, any, string, string];
|
|
9
|
+
export type EffectPriority = [string, number];
|
|
10
10
|
export declare const EV_SET_VALUE = "--set-value";
|
|
11
11
|
export declare const EV_UPDATE_VALUE = "--update-value";
|
|
12
12
|
export declare const EV_TOGGLE_VALUE = "--toggle-value";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@thi.ng/interceptors",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.2.0",
|
|
4
4
|
"description": "Interceptor based event bus, side effect & immutable state handling",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "./index.js",
|
|
@@ -21,7 +21,10 @@
|
|
|
21
21
|
"url": "https://patreon.com/thing_umbrella"
|
|
22
22
|
}
|
|
23
23
|
],
|
|
24
|
-
"author": "Karsten Schmidt
|
|
24
|
+
"author": "Karsten Schmidt (https://thi.ng)",
|
|
25
|
+
"contributors": [
|
|
26
|
+
"Logan Powell (https://github.com/loganpowell)"
|
|
27
|
+
],
|
|
25
28
|
"license": "Apache-2.0",
|
|
26
29
|
"scripts": {
|
|
27
30
|
"build": "yarn clean && tsc --declaration",
|
|
@@ -34,20 +37,20 @@
|
|
|
34
37
|
"test": "testament test"
|
|
35
38
|
},
|
|
36
39
|
"dependencies": {
|
|
37
|
-
"@thi.ng/api": "^8.
|
|
38
|
-
"@thi.ng/atom": "^5.1.
|
|
39
|
-
"@thi.ng/checks": "^3.3.
|
|
40
|
-
"@thi.ng/errors": "^2.2.
|
|
41
|
-
"@thi.ng/logger": "^1.4.
|
|
42
|
-
"@thi.ng/paths": "^5.1.
|
|
40
|
+
"@thi.ng/api": "^8.6.0",
|
|
41
|
+
"@thi.ng/atom": "^5.1.25",
|
|
42
|
+
"@thi.ng/checks": "^3.3.5",
|
|
43
|
+
"@thi.ng/errors": "^2.2.6",
|
|
44
|
+
"@thi.ng/logger": "^1.4.5",
|
|
45
|
+
"@thi.ng/paths": "^5.1.25"
|
|
43
46
|
},
|
|
44
47
|
"devDependencies": {
|
|
45
|
-
"@microsoft/api-extractor": "^7.33.
|
|
46
|
-
"@thi.ng/testament": "^0.3.
|
|
48
|
+
"@microsoft/api-extractor": "^7.33.7",
|
|
49
|
+
"@thi.ng/testament": "^0.3.7",
|
|
47
50
|
"rimraf": "^3.0.2",
|
|
48
51
|
"tools": "^0.0.1",
|
|
49
|
-
"typedoc": "^0.23.
|
|
50
|
-
"typescript": "^4.
|
|
52
|
+
"typedoc": "^0.23.22",
|
|
53
|
+
"typescript": "^4.9.4"
|
|
51
54
|
},
|
|
52
55
|
"keywords": [
|
|
53
56
|
"async",
|
|
@@ -88,8 +91,8 @@
|
|
|
88
91
|
"hdom",
|
|
89
92
|
"rdom"
|
|
90
93
|
],
|
|
91
|
-
"status": "
|
|
94
|
+
"status": "completed",
|
|
92
95
|
"year": 2016
|
|
93
96
|
},
|
|
94
|
-
"gitHead": "
|
|
97
|
+
"gitHead": "f445a9cc8022bcdebbf6ff91fd66ced016d72f01\n"
|
|
95
98
|
}
|