zodbus 1.0.1 → 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/README.md ADDED
@@ -0,0 +1,7 @@
1
+ # ZodBus
2
+
3
+ ZodBus is a fully-typed event bus powered by [Zod](https://zod.dev), with multiple namespace/level support and payload validation.
4
+
5
+ > Work in progress.
6
+
7
+ https://github.com/3rd/zodbus/assets/59587503/08d2c13c-cccd-407f-b14c-957d7dd5115d
package/dist/types.d.ts CHANGED
@@ -14,7 +14,7 @@ export type SchemaPath<T, K extends keyof T = keyof T> = ZodTypePath<T, K> | Nam
14
14
  export type WildcardPath<T extends string> = T extends `${infer L}.${infer R}` ? `${L}.${WildcardPath<R>}` | `${L}.*` | `*.${WildcardPath<R>}` : T | "*";
15
15
  export type ExcludeDirectlyNestedKeys<T extends string> = T extends `${infer L}.${infer R}` ? L | ExcludeDirectlyNestedKeys<R> : never;
16
16
  export type Subscription<T extends Schema> = {
17
- [K in Exclude<WildcardPath<SchemaPath<T>>, ExcludeDirectlyNestedKeys<SchemaPath<T>>>]: {
17
+ [K in Exclude<WildcardPath<SchemaPath<T>>, ExcludeDirectlyNestedKeys<SchemaPath<T>>> | "*"]: {
18
18
  listener: InferSubscriptionListener<T, K>;
19
19
  payload: InferSubscriptionListenerPayload<T, K>;
20
20
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zodbus",
3
- "version": "1.0.1",
3
+ "version": "1.0.3",
4
4
  "repository": "https://github.com/3rd/zodbus",
5
5
  "description": "Type-safe event bus built around Zod.",
6
6
  "keywords": [