@bloqz/relay 1.0.3
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/LICENSE +21 -0
- package/README.md +88 -0
- package/dist/create.d.ts +6 -0
- package/dist/create.js +83 -0
- package/dist/create.js.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +3 -0
- package/dist/index.js.map +1 -0
- package/dist/models.d.ts +80 -0
- package/dist/models.js +2 -0
- package/dist/models.js.map +1 -0
- package/package.json +49 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 shovelmn12
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
# @bloqz/relay
|
|
2
|
+
|
|
3
|
+
The `@bloqz/relay` package provides a lightweight, RxJS-powered event bus for enabling communication between different parts of an application. It uses a flexible subscription model that supports both simple string patterns and advanced predicate functions, making it a powerful solution for decoupled architectures.
|
|
4
|
+
|
|
5
|
+
## Core Concepts
|
|
6
|
+
|
|
7
|
+
- **Relay**: An event bus that allows for emitting and listening to events.
|
|
8
|
+
- **Topics**: Named channels for events (e.g., 'user', 'cart'), allowing for targeted communication.
|
|
9
|
+
- **Events**: The data payload associated with a topic, which must have a `type` property.
|
|
10
|
+
- **Pattern Matching**: A simple yet powerful syntax for subscribing to events based on their topic and type.
|
|
11
|
+
|
|
12
|
+
## Installation
|
|
13
|
+
|
|
14
|
+
This package is part of the Bloqz monorepo. To use it, add it as a dependency in your `package.json`:
|
|
15
|
+
|
|
16
|
+
```json
|
|
17
|
+
"dependencies": {
|
|
18
|
+
"@bloqz/relay": "1.0.0"
|
|
19
|
+
}
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
## Usage
|
|
23
|
+
|
|
24
|
+
### Creating a Relay
|
|
25
|
+
|
|
26
|
+
The primary export of this package is the `createRelay` function.
|
|
27
|
+
|
|
28
|
+
```typescript
|
|
29
|
+
import { createRelay } from '@bloqz/relay';
|
|
30
|
+
|
|
31
|
+
// Create a new relay instance
|
|
32
|
+
const appRelay = createRelay();
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
### Emitting Events
|
|
36
|
+
|
|
37
|
+
You can emit an event to a specific topic using the `emit` method. The event payload must be an object with a `type` property.
|
|
38
|
+
|
|
39
|
+
```typescript
|
|
40
|
+
appRelay.emit('user', { type: 'login', userId: '123' });
|
|
41
|
+
appRelay.emit('notifications', { type: 'new', message: 'Welcome!' });
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
### Listening with String Patterns
|
|
45
|
+
|
|
46
|
+
You can listen for events using a string pattern with the `on` method. This is the most common way to subscribe. The method returns an `unsubscribe` function.
|
|
47
|
+
|
|
48
|
+
```typescript
|
|
49
|
+
// Listen for login and logout events on the 'user' topic
|
|
50
|
+
const unsubscribe = appRelay.on('user.{login|logout}', (topic, event) => {
|
|
51
|
+
console.log(`Received event '${event.type}' on topic '${topic}'`);
|
|
52
|
+
});
|
|
53
|
+
|
|
54
|
+
// To stop listening
|
|
55
|
+
unsubscribe();
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
### Listening with a Predicate Function
|
|
59
|
+
|
|
60
|
+
For more complex scenarios, you can use a predicate function to filter events. The predicate receives the topic and event and should return `true` if the handler should be executed.
|
|
61
|
+
|
|
62
|
+
```typescript
|
|
63
|
+
const unsubscribe = appRelay.on((topic, event) => {
|
|
64
|
+
return topic === 'user' && event.type === 'login';
|
|
65
|
+
}, (topic, event) => {
|
|
66
|
+
console.log('User logged in:', event);
|
|
67
|
+
});
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
### Pattern Matching Syntax
|
|
71
|
+
|
|
72
|
+
The pattern matching syntax provides a concise way to subscribe to events:
|
|
73
|
+
|
|
74
|
+
| Pattern | Description |
|
|
75
|
+
| ----------------------- | ----------------------------------------------------- |
|
|
76
|
+
| `*` | Matches any topic and any event type. |
|
|
77
|
+
| `user` | Matches any event on the `user` topic. |
|
|
78
|
+
| `user|cart` | Matches any event on the `user` or `cart` topics. |
|
|
79
|
+
| `*.login` | Matches `login` events on any topic. |
|
|
80
|
+
| `user.{login|logout}` | Matches `login` or `logout` events on the `user` topic. |
|
|
81
|
+
|
|
82
|
+
### Disposing the Relay
|
|
83
|
+
|
|
84
|
+
When a relay is no longer needed, you can dispose of it to complete the underlying event stream and unsubscribe all listeners.
|
|
85
|
+
|
|
86
|
+
```typescript
|
|
87
|
+
appRelay.dispose();
|
|
88
|
+
```
|
package/dist/create.d.ts
ADDED
package/dist/create.js
ADDED
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import { Subject } from "rxjs";
|
|
2
|
+
import { filter } from "rxjs/operators";
|
|
3
|
+
/**
|
|
4
|
+
* Factory function to create a new Relay instance using RxJS.
|
|
5
|
+
* @returns A new Relay instance.
|
|
6
|
+
*/
|
|
7
|
+
export function createRelay() {
|
|
8
|
+
// The single, central stream for all events.
|
|
9
|
+
const eventStream$ = new Subject();
|
|
10
|
+
/**
|
|
11
|
+
* Parses a pattern and checks if it matches a given topic and event.
|
|
12
|
+
* (This helper function remains the same)
|
|
13
|
+
*/
|
|
14
|
+
const matchesPattern = (pattern, topic, event) => {
|
|
15
|
+
if (pattern === "*")
|
|
16
|
+
return true;
|
|
17
|
+
// Helper to split by '|' but ignore it inside '{}'
|
|
18
|
+
const splitSubPatterns = (p) => {
|
|
19
|
+
const patterns = [];
|
|
20
|
+
let lastSplit = 0;
|
|
21
|
+
let braceDepth = 0;
|
|
22
|
+
for (let i = 0; i < p.length; i++) {
|
|
23
|
+
if (p[i] === "{")
|
|
24
|
+
braceDepth++;
|
|
25
|
+
else if (p[i] === "}")
|
|
26
|
+
braceDepth--;
|
|
27
|
+
else if (p[i] === "|" && braceDepth === 0) {
|
|
28
|
+
patterns.push(p.substring(lastSplit, i));
|
|
29
|
+
lastSplit = i + 1;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
patterns.push(p.substring(lastSplit));
|
|
33
|
+
return patterns;
|
|
34
|
+
};
|
|
35
|
+
const subPatterns = splitSubPatterns(pattern);
|
|
36
|
+
return subPatterns.some((subPattern) => {
|
|
37
|
+
const [topicPattern, typePattern] = subPattern.split(".");
|
|
38
|
+
if (topicPattern !== "*" && topicPattern !== topic)
|
|
39
|
+
return false;
|
|
40
|
+
if (!typePattern)
|
|
41
|
+
return true;
|
|
42
|
+
if (typePattern === "*")
|
|
43
|
+
return true;
|
|
44
|
+
if (typePattern.startsWith("{") && typePattern.endsWith("}")) {
|
|
45
|
+
const types = typePattern.slice(1, -1).split("|");
|
|
46
|
+
return types.includes(event.type);
|
|
47
|
+
}
|
|
48
|
+
return typePattern === event.type;
|
|
49
|
+
});
|
|
50
|
+
};
|
|
51
|
+
return {
|
|
52
|
+
emit(topic, event) {
|
|
53
|
+
// Simply push the new event into the stream.
|
|
54
|
+
eventStream$.next({ topic, event });
|
|
55
|
+
},
|
|
56
|
+
on(patternOrPredicate, callback) {
|
|
57
|
+
// Create the filter predicate once, before subscribing.
|
|
58
|
+
const filterFn = ({ topic, event, }) => {
|
|
59
|
+
if (typeof patternOrPredicate === "string") {
|
|
60
|
+
return matchesPattern(patternOrPredicate, topic, event);
|
|
61
|
+
}
|
|
62
|
+
// For predicates, just execute them.
|
|
63
|
+
return patternOrPredicate(topic, event);
|
|
64
|
+
};
|
|
65
|
+
// Create a new subscription to the main stream.
|
|
66
|
+
const subscription = eventStream$
|
|
67
|
+
.pipe(
|
|
68
|
+
// Use the pre-built filter function. This is more efficient.
|
|
69
|
+
filter(filterFn))
|
|
70
|
+
.subscribe(({ topic, event }) => {
|
|
71
|
+
// When an event passes the filter, call the user's handler.
|
|
72
|
+
callback(topic, event);
|
|
73
|
+
});
|
|
74
|
+
// Return a function that tears down this specific subscription.
|
|
75
|
+
return () => subscription.unsubscribe();
|
|
76
|
+
},
|
|
77
|
+
dispose() {
|
|
78
|
+
// Complete the subject, which automatically unsubscribes all listeners.
|
|
79
|
+
eventStream$.complete();
|
|
80
|
+
},
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
//# sourceMappingURL=create.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create.js","sourceRoot":"","sources":["../src/create.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AAC/B,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAIxC;;;GAGG;AACH,MAAM,UAAU,WAAW;IACzB,6CAA6C;IAC7C,MAAM,YAAY,GAAG,IAAI,OAAO,EAAwC,CAAC;IAEzE;;;OAGG;IACH,MAAM,cAAc,GAAG,CACrB,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YAChE,OAAO,GAAG,EAAE,CAAC,YAAY,CAAC,WAAW,EAAE,CAAC;QAC1C,CAAC;QACD,OAAO;YACL,wEAAwE;YACxE,YAAY,CAAC,QAAQ,EAAE,CAAC;QAC1B,CAAC;KACF,CAAC;AACJ,CAAC"}
|
package/dist/index.d.ts
ADDED
package/dist/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC"}
|
package/dist/models.d.ts
ADDED
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The standard shape for any event payload passed through the relay.
|
|
3
|
+
* It must include a `type` string to allow for pattern-based filtering.
|
|
4
|
+
*
|
|
5
|
+
* @example
|
|
6
|
+
* const loginEvent: RelayEvent = { type: 'login', userId: '123' };
|
|
7
|
+
* const logoutEvent: RelayEvent = { type: 'logout' };
|
|
8
|
+
*/
|
|
9
|
+
export type RelayEvent = {
|
|
10
|
+
readonly type: string;
|
|
11
|
+
};
|
|
12
|
+
/**
|
|
13
|
+
* A handler function that receives the topic and event for a matched subscription.
|
|
14
|
+
*
|
|
15
|
+
* @param topic The topic the event was emitted on (e.g., 'user', 'cart').
|
|
16
|
+
* @param event The event payload.
|
|
17
|
+
*/
|
|
18
|
+
export type RelayHandler = (topic: string, event: RelayEvent) => void;
|
|
19
|
+
/**
|
|
20
|
+
* A predicate function used for advanced event filtering. It receives the full
|
|
21
|
+
* event context and returns `true` if the handler should be called.
|
|
22
|
+
*
|
|
23
|
+
* @param topic The topic of the event.
|
|
24
|
+
* @param event The event payload.
|
|
25
|
+
* @returns `true` if the subscription handler should be invoked.
|
|
26
|
+
*/
|
|
27
|
+
export type RelayPredicate = (topic: string, event: RelayEvent) => boolean;
|
|
28
|
+
/**
|
|
29
|
+
* A non-generic, RxJS-powered event bus that supports pattern-based
|
|
30
|
+
* and predicate-based subscriptions. It serves as a central hub for
|
|
31
|
+
* cross-cutting communication, such as between Blocs.
|
|
32
|
+
*/
|
|
33
|
+
export interface Relay {
|
|
34
|
+
/**
|
|
35
|
+
* Emits an event to a specific topic. All active subscriptions will be
|
|
36
|
+
* evaluated against the event, and matching handlers will be invoked.
|
|
37
|
+
*
|
|
38
|
+
* @param topic The topic to emit to (e.g., 'user', 'cart').
|
|
39
|
+
* @param event The event payload, which MUST include a `type` property
|
|
40
|
+
* (e.g., `{ type: 'login', userId: '123' }`).
|
|
41
|
+
*/
|
|
42
|
+
emit(topic: string, event: RelayEvent): void;
|
|
43
|
+
/**
|
|
44
|
+
* Disposes of the relay, completing its internal event stream and
|
|
45
|
+
* unsubscribing all listeners. After disposal, the relay can no longer
|
|
46
|
+
* be used.
|
|
47
|
+
*/
|
|
48
|
+
dispose(): void;
|
|
49
|
+
/**
|
|
50
|
+
* Registers a callback for events matching a specific string pattern.
|
|
51
|
+
* The pattern allows for filtering by topic and event type.
|
|
52
|
+
*
|
|
53
|
+
* @param pattern A string pattern to match against topics and event types.
|
|
54
|
+
* - `*`: Wildcard, matches any topic and event.
|
|
55
|
+
* - `topic.*`: Matches any event on a specific topic.
|
|
56
|
+
* - `*.{type1|type2}`: Matches specific event types on any topic.
|
|
57
|
+
* - `topic.{type1|type2}`: Matches specific event types on a specific topic.
|
|
58
|
+
* - `topic1|topic2`: Matches any event on a list of topics.
|
|
59
|
+
* @param callback The callback to execute when a matching event is emitted.
|
|
60
|
+
* @returns A function to unregister the callback and unsubscribe.
|
|
61
|
+
*
|
|
62
|
+
* @example
|
|
63
|
+
* on('user.{login|logout}', (topic, event) => { ... });
|
|
64
|
+
* on('cart', (topic, event) => { ... }); // same as cart.*
|
|
65
|
+
* on('*', (topic, event) => { ... });
|
|
66
|
+
*/
|
|
67
|
+
on(pattern: string, callback: RelayHandler): () => void;
|
|
68
|
+
/**
|
|
69
|
+
* Registers a callback for events that pass a custom predicate function.
|
|
70
|
+
* This allows for more complex filtering logic than string patterns.
|
|
71
|
+
*
|
|
72
|
+
* @param predicate A function that returns `true` for events to listen to.
|
|
73
|
+
* @param callback The callback to execute for events that pass the predicate.
|
|
74
|
+
* @returns A function to unregister the callback and unsubscribe.
|
|
75
|
+
*
|
|
76
|
+
* @example
|
|
77
|
+
* on((topic, event) => topic === 'user' && event.type === 'login', callback);
|
|
78
|
+
*/
|
|
79
|
+
on(predicate: RelayPredicate, callback: RelayHandler): () => void;
|
|
80
|
+
}
|
package/dist/models.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"models.js","sourceRoot":"","sources":["../src/models.ts"],"names":[],"mappings":""}
|
package/package.json
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@bloqz/relay",
|
|
3
|
+
"version": "1.0.3",
|
|
4
|
+
"description": "A package for enabling inter-bloc communication using an event relay system.",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"bloc",
|
|
7
|
+
"bloqz",
|
|
8
|
+
"state management",
|
|
9
|
+
"functional",
|
|
10
|
+
"rxjs",
|
|
11
|
+
"typescript",
|
|
12
|
+
"relay",
|
|
13
|
+
"event bus",
|
|
14
|
+
"events"
|
|
15
|
+
],
|
|
16
|
+
"homepage": "https://github.com/shovelmn12/bloqz#readme",
|
|
17
|
+
"bugs": {
|
|
18
|
+
"url": "https://github.com/shovelmn12/bloqz/issues"
|
|
19
|
+
},
|
|
20
|
+
"repository": {
|
|
21
|
+
"type": "git",
|
|
22
|
+
"url": "git+https://github.com/shovelmn12/bloqz.git"
|
|
23
|
+
},
|
|
24
|
+
"license": "MIT",
|
|
25
|
+
"author": "Shovel Maman",
|
|
26
|
+
"type": "module",
|
|
27
|
+
"exports": {
|
|
28
|
+
"main": "./dist/index.js",
|
|
29
|
+
"import": "./dist/index.js",
|
|
30
|
+
"types": "./dist/index.d.ts"
|
|
31
|
+
},
|
|
32
|
+
"files": [
|
|
33
|
+
"dist"
|
|
34
|
+
],
|
|
35
|
+
"publishConfig": {
|
|
36
|
+
"access": "public"
|
|
37
|
+
},
|
|
38
|
+
"dependencies": {
|
|
39
|
+
"rxjs": "^7.8.2"
|
|
40
|
+
},
|
|
41
|
+
"peerDependencies": {
|
|
42
|
+
"@bloqz/core": "1.0.3"
|
|
43
|
+
},
|
|
44
|
+
"scripts": {
|
|
45
|
+
"clean": "rm -rf dist",
|
|
46
|
+
"build": "npm run clean && tsc",
|
|
47
|
+
"test": "vitest --run"
|
|
48
|
+
}
|
|
49
|
+
}
|