@ms-cloudpack/data-bus 0.4.3 → 0.5.1
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 +16 -32
- package/lib/addProvider.d.ts.map +1 -1
- package/lib/addProvider.js.map +1 -1
- package/lib/createDataPath.d.ts +4 -4
- package/lib/createDataPath.d.ts.map +1 -1
- package/lib/createDataPath.js.map +1 -1
- package/lib/types/DataBus.d.ts +4 -4
- package/lib/types/DataBus.d.ts.map +1 -1
- package/lib/types/DataBus.js.map +1 -1
- package/lib/types/DataBusPath.d.ts +2 -2
- package/lib/types/DataBusPath.d.ts.map +1 -1
- package/lib/types/DataBusPath.js.map +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -1,23 +1,17 @@
|
|
|
1
1
|
# @ms-cloudpack/data-bus
|
|
2
2
|
|
|
3
|
-
Provides a general
|
|
3
|
+
Provides a general API for subscribing/unsubscribing from data and defining providers to that data.
|
|
4
4
|
|
|
5
5
|
Examples of usage:
|
|
6
6
|
|
|
7
|
-
- Create a registry of NPM package metadata - a provider monitors needs and fetches data on demand. Many
|
|
8
|
-
|
|
9
|
-
centralize the cache expiration strategy, polling vs push notifications, etc. Consumers have a simple approach
|
|
10
|
-
for subscribing to data and get push notifications when the data changes.
|
|
11
|
-
|
|
12
|
-
- Create a unified logging system - Publishers can publish data from many distributed sources. Logging is published
|
|
13
|
-
in a hierarchy: `/logging/${app}/${severity}/${area}` Consumers can subscribe to any part of this tree. For example,
|
|
14
|
-
if a consumer subscribes to `/logging/my-app/error`, they will receive change events for all errors in `my-app`.
|
|
7
|
+
- Create a registry of NPM package metadata - a provider monitors needs and fetches data on demand. Many consumers can consume the metadata for any package; providers will automatically debounce many requests, centralize the cache expiration strategy, polling vs push notifications, etc. Consumers have a simple approach for subscribing to data and get push notifications when the data changes.
|
|
8
|
+
- Create a unified logging system - Publishers can publish data from many distributed sources. Logging is published in a hierarchy: `/logging/${app}/${severity}/${area}` Consumers can subscribe to any part of this tree. For example, if a consumer subscribes to `/logging/my-app/error`, they will receive change events for all errors in `my-app`.
|
|
15
9
|
|
|
16
10
|
## Usage
|
|
17
11
|
|
|
18
12
|
### Initialization
|
|
19
13
|
|
|
20
|
-
A data bus can be created using the `createDataBus`
|
|
14
|
+
A data bus can be created using the `createDataBus` API:
|
|
21
15
|
|
|
22
16
|
```js
|
|
23
17
|
import { createDataBus } from '@ms-cloudpack/data-bus';
|
|
@@ -34,7 +28,7 @@ The purpose of the `path` parameter is to define the path in the tree where the
|
|
|
34
28
|
Example of defining a data path:
|
|
35
29
|
|
|
36
30
|
```js
|
|
37
|
-
import z from 'zod';
|
|
31
|
+
import { z } from 'zod/v4-mini';
|
|
38
32
|
|
|
39
33
|
const itemCountPath = createDataPath({
|
|
40
34
|
path: ['items', 'itemCount'],
|
|
@@ -44,9 +38,7 @@ const itemCountPath = createDataPath({
|
|
|
44
38
|
|
|
45
39
|
### Subscribing to data
|
|
46
40
|
|
|
47
|
-
The data bus provides a method `subscribe` for consumers to subscribe to different types of data. As that data changes, consumers will be notified of changes. Any number of consumers can subscribe for the same data. Data is
|
|
48
|
-
hierarchical, so you can subscribe to a full branch, or to a leaf node within the tree. Paths are represented by
|
|
49
|
-
string arrays.
|
|
41
|
+
The data bus provides a method `subscribe` for consumers to subscribe to different types of data. As that data changes, consumers will be notified of changes. Any number of consumers can subscribe for the same data. Data is hierarchical, so you can subscribe to a full branch, or to a leaf node within the tree. Paths are represented by string arrays.
|
|
50
42
|
|
|
51
43
|
```js
|
|
52
44
|
import { itemCountPath } from './dataPaths';
|
|
@@ -73,8 +65,7 @@ bus.publish(itemCountPath, 42);
|
|
|
73
65
|
|
|
74
66
|
### Using providers to produce data on demand
|
|
75
67
|
|
|
76
|
-
Providers can also be registered with the bus to provide data on demand, so that data does not need
|
|
77
|
-
to be gathered unless it is being observed:
|
|
68
|
+
Providers can also be registered with the bus to provide data on demand, so that data does not need to be gathered unless it is being observed:
|
|
78
69
|
|
|
79
70
|
```js
|
|
80
71
|
import { itemCountPath } from './dataPaths';
|
|
@@ -101,10 +92,7 @@ bus.addProvider({
|
|
|
101
92
|
});
|
|
102
93
|
```
|
|
103
94
|
|
|
104
|
-
In this case, the counter will start counting only when subscribers care about a particular type, and will cease to count when
|
|
105
|
-
subscribers unsubscribe. Providers are activated when at least 1 subscriber becomes active for a path, and deactivate when all
|
|
106
|
-
subscribers have unsubscribed to that path. This ensures that providers don't do extra work to provide the same data
|
|
107
|
-
redundantly.
|
|
95
|
+
In this case, the counter will start counting only when subscribers care about a particular type, and will cease to count when subscribers unsubscribe. Providers are activated when at least 1 subscriber becomes active for a path, and deactivate when all subscribers have unsubscribed to that path. This ensures that providers don't do extra work to provide the same data redundantly.
|
|
108
96
|
|
|
109
97
|
### Reading data
|
|
110
98
|
|
|
@@ -118,28 +106,24 @@ const currentValue = bus.getData(itemCountPath);
|
|
|
118
106
|
|
|
119
107
|
## Motivation
|
|
120
108
|
|
|
121
|
-
Cloudpack runs a bundle
|
|
109
|
+
Cloudpack runs a bundle server which is accessed to generate and retrieve ESM package bundles on the fly. As dependencies are requested, the server produces assets into a cache folder.
|
|
122
110
|
|
|
123
111
|
Many consumers may request the same bundle at the same time. This implies 1. We need to dedupe redundant requests, and 2. We need to reuse the output to fulfill future requests.
|
|
124
112
|
|
|
125
|
-
In the original implementation, requests to the same resource would first check cache for results, find it missing, and start bundling by calling an imperative
|
|
113
|
+
In the original implementation, requests to the same resource would first check cache for results, find it missing, and start bundling by calling an imperative API like `async bundle(options: Options): Result`. This would write to a cache location, which would then fulfill future requests. But this left race conditions because we weren't deduping in-flight requests, nor were we re-populating bundles that changed inputs slightly. This led to the question: what kind of architecture would we need to essentially dedupe redundant requests, and provide a general architecture for caching content?
|
|
126
114
|
|
|
127
115
|
We ran into other similar scenarios:
|
|
128
116
|
|
|
129
|
-
-
|
|
130
|
-
-
|
|
117
|
+
- One or more dashboard pages need a list of packages installed. When the dependencies change, the page should be notified so that it can update UI.
|
|
118
|
+
- One or more dashboard instances needs metadata for a package. Metadata access is expensive, so we should dedupe requests and ensure the results go to all subscribers.
|
|
131
119
|
- Dashboards need to show the current build state for a session. Green for pass, red for fail, and should render errors when clicked. This also requires live updates, and may have multiple subscribers.
|
|
132
120
|
|
|
133
|
-
This led to the idea of a data
|
|
121
|
+
This led to the idea of a data bus: a general mediator for managing subscriptions and informing providers when results are available or have changed.
|
|
134
122
|
|
|
135
123
|
## Future considerations
|
|
136
124
|
|
|
137
|
-
|
|
125
|
+
**Is there existing tech to accomplish the goals?** What about Fluid? What about lage as a service?
|
|
138
126
|
|
|
139
|
-
|
|
127
|
+
**Should data be represented hierarchically, or is it tag based, or a mix?** Hierarchies are better than flat, but not as robust as tags. Scenario: the logging scenario; I want logging, this specific app, and these various levels, but for a specific area. Maybe this means subscribers/producers should have matchers. Values should just have tags. Maybe tags could have hierarchies (app areas, logging levels). This would be more expensive to resolve notifications - we'd have to linearly filter subscribers based on matchers. Same with producers for pre-publishing transforms. But it would enable more fine-tuned resolution.
|
|
140
128
|
|
|
141
|
-
|
|
142
|
-
data is available as it becomes available. For example, I might care about a list of sessions. One approach is to
|
|
143
|
-
maintain the list separately as an individual item - then get the items one at a time. A better approach would be for
|
|
144
|
-
the data-bus to allow subscribers to subscribe to all children in a node. This would return as a flat array of items.
|
|
145
|
-
We'd want to consider large lists and how they become paginated to avoid perf problems downstream.
|
|
129
|
+
**How do subscribers subscribe to collections rather than individual items?** In some cases, UX needs to list what data is available as it becomes available. For example, I might care about a list of sessions. One approach is to maintain the list separately as an individual item - then get the items one at a time. A better approach would be for the data-bus to allow subscribers to subscribe to all children in a node. This would return as a flat array of items. We'd want to consider large lists and how they become paginated to avoid perf problems downstream.
|
package/lib/addProvider.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"addProvider.d.ts","sourceRoot":"","sources":["../src/addProvider.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAClE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAE5D;;GAEG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,YAAY,EAAE,QAAQ,EAAE,eAAe,
|
|
1
|
+
{"version":3,"file":"addProvider.d.ts","sourceRoot":"","sources":["../src/addProvider.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAClE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAE5D;;GAEG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,YAAY,EAAE,QAAQ,EAAE,eAAe,GAAG,IAAI,CAKhF"}
|
package/lib/addProvider.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"addProvider.js","sourceRoot":"","sources":["../src/addProvider.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAIvC;;GAEG;AACH,MAAM,UAAU,WAAW,CAAC,KAAmB,EAAE,QAAyB;IACxE,MAAM,EAAE,IAAI,EAAE,GAAG,OAAO,CAAC,KAAK,EAAE,QAAQ,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IAErD,IAAI,CAAC,SAAS,KAAK,EAAE,CAAC;IACtB,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;AAChC,CAAC","sourcesContent":["import { getNode } from './getNode.js';\nimport type { DataBusProvider } from './types/DataBusProvider.js';\nimport type { DataBusState } from './types/DataBusState.js';\n\n/**\n * Adds a provider.\n */\nexport function addProvider(state: DataBusState, provider: DataBusProvider) {\n const { node } = getNode(state, provider.path, true);\n\n node.providers ??= [];\n node.providers.push(provider);\n}\n"]}
|
|
1
|
+
{"version":3,"file":"addProvider.js","sourceRoot":"","sources":["../src/addProvider.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAIvC;;GAEG;AACH,MAAM,UAAU,WAAW,CAAC,KAAmB,EAAE,QAAyB;IACxE,MAAM,EAAE,IAAI,EAAE,GAAG,OAAO,CAAC,KAAK,EAAE,QAAQ,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IAErD,IAAI,CAAC,SAAS,KAAK,EAAE,CAAC;IACtB,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;AAChC,CAAC","sourcesContent":["import { getNode } from './getNode.js';\nimport type { DataBusProvider } from './types/DataBusProvider.js';\nimport type { DataBusState } from './types/DataBusState.js';\n\n/**\n * Adds a provider.\n */\nexport function addProvider(state: DataBusState, provider: DataBusProvider): void {\n const { node } = getNode(state, provider.path, true);\n\n node.providers ??= [];\n node.providers.push(provider);\n}\n"]}
|
package/lib/createDataPath.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import type z from 'zod';
|
|
1
|
+
import type { z } from 'zod/v4-mini';
|
|
2
2
|
import type { DataBusPath } from './types/DataBusPath.js';
|
|
3
3
|
/**
|
|
4
4
|
* Helper to make source typing and paths joined in a structure.
|
|
5
5
|
*/
|
|
6
|
-
export declare function createDataPath<
|
|
6
|
+
export declare function createDataPath<TZodMiniType extends z.ZodMiniType>(options: {
|
|
7
7
|
path: string[];
|
|
8
|
-
type:
|
|
9
|
-
}): DataBusPath<
|
|
8
|
+
type: TZodMiniType;
|
|
9
|
+
}): DataBusPath<TZodMiniType>;
|
|
10
10
|
//# sourceMappingURL=createDataPath.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createDataPath.d.ts","sourceRoot":"","sources":["../src/createDataPath.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,
|
|
1
|
+
{"version":3,"file":"createDataPath.d.ts","sourceRoot":"","sources":["../src/createDataPath.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAE1D;;GAEG;AACH,wBAAgB,cAAc,CAAC,YAAY,SAAS,CAAC,CAAC,WAAW,EAAE,OAAO,EAAE;IAC1E,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,IAAI,EAAE,YAAY,CAAC;CACpB,GAAG,WAAW,CAAC,YAAY,CAAC,CAE5B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createDataPath.js","sourceRoot":"","sources":["../src/createDataPath.ts"],"names":[],"mappings":"AAGA;;GAEG;AACH,MAAM,UAAU,cAAc,
|
|
1
|
+
{"version":3,"file":"createDataPath.js","sourceRoot":"","sources":["../src/createDataPath.ts"],"names":[],"mappings":"AAGA;;GAEG;AACH,MAAM,UAAU,cAAc,CAAqC,OAGlE;IACC,OAAO,OAAO,CAAC;AACjB,CAAC","sourcesContent":["import type { z } from 'zod/v4-mini';\nimport type { DataBusPath } from './types/DataBusPath.js';\n\n/**\n * Helper to make source typing and paths joined in a structure.\n */\nexport function createDataPath<TZodMiniType extends z.ZodMiniType>(options: {\n path: string[];\n type: TZodMiniType;\n}): DataBusPath<TZodMiniType> {\n return options;\n}\n"]}
|
package/lib/types/DataBus.d.ts
CHANGED
|
@@ -2,14 +2,14 @@ import type { DataBusChangeFunction } from './DataBusChangeFunction.js';
|
|
|
2
2
|
import type { DisposeFunction } from './DisposeFunction.js';
|
|
3
3
|
import type { DataBusProvider } from './DataBusProvider.js';
|
|
4
4
|
import type { DataBusPath } from './DataBusPath.js';
|
|
5
|
-
import type z from 'zod';
|
|
5
|
+
import type { z } from 'zod/v4-mini';
|
|
6
6
|
export interface DataBus {
|
|
7
7
|
publish<TData = any>(path: string[], value: TData): void;
|
|
8
|
-
publish<TZodData extends z.
|
|
8
|
+
publish<TZodData extends z.ZodMiniType>(path: DataBusPath<TZodData>, value: z.infer<TZodData>): void;
|
|
9
9
|
subscribe<TData = any>(path: string[], callback: DataBusChangeFunction<TData>): DisposeFunction;
|
|
10
|
-
subscribe<TZodData extends z.
|
|
10
|
+
subscribe<TZodData extends z.ZodMiniType>(path: DataBusPath<TZodData>, callback: DataBusChangeFunction<z.infer<TZodData>>): DisposeFunction;
|
|
11
11
|
getData<TData = any>(path: string[]): TData | undefined;
|
|
12
|
-
getData<TZodData extends z.
|
|
12
|
+
getData<TZodData extends z.ZodMiniType>(path: DataBusPath<TZodData>): z.infer<TZodData> | undefined;
|
|
13
13
|
addProvider: (provider: DataBusProvider) => void;
|
|
14
14
|
dispose: () => void;
|
|
15
15
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DataBus.d.ts","sourceRoot":"","sources":["../../src/types/DataBus.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AACxE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAC5D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAC5D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,KAAK,CAAC,MAAM,
|
|
1
|
+
{"version":3,"file":"DataBus.d.ts","sourceRoot":"","sources":["../../src/types/DataBus.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AACxE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAC5D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAC5D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,aAAa,CAAC;AACrC,MAAM,WAAW,OAAO;IAEtB,OAAO,CAAC,KAAK,GAAG,GAAG,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,KAAK,EAAE,KAAK,GAAG,IAAI,CAAC;IACzD,OAAO,CAAC,QAAQ,SAAS,CAAC,CAAC,WAAW,EAAE,IAAI,EAAE,WAAW,CAAC,QAAQ,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC,KAAK,CAAC,QAAQ,CAAC,GAAG,IAAI,CAAC;IAGrG,SAAS,CAAC,KAAK,GAAG,GAAG,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,QAAQ,EAAE,qBAAqB,CAAC,KAAK,CAAC,GAAG,eAAe,CAAC;IAChG,SAAS,CAAC,QAAQ,SAAS,CAAC,CAAC,WAAW,EACtC,IAAI,EAAE,WAAW,CAAC,QAAQ,CAAC,EAC3B,QAAQ,EAAE,qBAAqB,CAAC,CAAC,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,GACjD,eAAe,CAAC;IAGnB,OAAO,CAAC,KAAK,GAAG,GAAG,EAAE,IAAI,EAAE,MAAM,EAAE,GAAG,KAAK,GAAG,SAAS,CAAC;IACxD,OAAO,CAAC,QAAQ,SAAS,CAAC,CAAC,WAAW,EAAE,IAAI,EAAE,WAAW,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,KAAK,CAAC,QAAQ,CAAC,GAAG,SAAS,CAAC;IAEpG,WAAW,EAAE,CAAC,QAAQ,EAAE,eAAe,KAAK,IAAI,CAAC;IAEjD,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB"}
|
package/lib/types/DataBus.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DataBus.js","sourceRoot":"","sources":["../../src/types/DataBus.ts"],"names":[],"mappings":"","sourcesContent":["import type { DataBusChangeFunction } from './DataBusChangeFunction.js';\nimport type { DisposeFunction } from './DisposeFunction.js';\nimport type { DataBusProvider } from './DataBusProvider.js';\nimport type { DataBusPath } from './DataBusPath.js';\nimport type z from 'zod';\nexport interface DataBus {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n publish<TData = any>(path: string[], value: TData): void;\n publish<TZodData extends z.
|
|
1
|
+
{"version":3,"file":"DataBus.js","sourceRoot":"","sources":["../../src/types/DataBus.ts"],"names":[],"mappings":"","sourcesContent":["import type { DataBusChangeFunction } from './DataBusChangeFunction.js';\nimport type { DisposeFunction } from './DisposeFunction.js';\nimport type { DataBusProvider } from './DataBusProvider.js';\nimport type { DataBusPath } from './DataBusPath.js';\nimport type { z } from 'zod/v4-mini';\nexport interface DataBus {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n publish<TData = any>(path: string[], value: TData): void;\n publish<TZodData extends z.ZodMiniType>(path: DataBusPath<TZodData>, value: z.infer<TZodData>): void;\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n subscribe<TData = any>(path: string[], callback: DataBusChangeFunction<TData>): DisposeFunction;\n subscribe<TZodData extends z.ZodMiniType>(\n path: DataBusPath<TZodData>,\n callback: DataBusChangeFunction<z.infer<TZodData>>,\n ): DisposeFunction;\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n getData<TData = any>(path: string[]): TData | undefined;\n getData<TZodData extends z.ZodMiniType>(path: DataBusPath<TZodData>): z.infer<TZodData> | undefined;\n\n addProvider: (provider: DataBusProvider) => void;\n\n dispose: () => void;\n}\n"]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type z from 'zod';
|
|
2
|
-
export type DataBusPath<TZodData extends z.
|
|
1
|
+
import type { z } from 'zod/v4-mini';
|
|
2
|
+
export type DataBusPath<TZodData extends z.ZodMiniType = z.ZodMiniUnknown> = {
|
|
3
3
|
/**
|
|
4
4
|
* Path to the data within the databus tree.
|
|
5
5
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DataBusPath.d.ts","sourceRoot":"","sources":["../../src/types/DataBusPath.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,
|
|
1
|
+
{"version":3,"file":"DataBusPath.d.ts","sourceRoot":"","sources":["../../src/types/DataBusPath.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,aAAa,CAAC;AAErC,MAAM,MAAM,WAAW,CAAC,QAAQ,SAAS,CAAC,CAAC,WAAW,GAAG,CAAC,CAAC,cAAc,IAAI;IAC3E;;OAEG;IACH,IAAI,EAAE,MAAM,EAAE,CAAC;IAEf;;OAEG;IACH,IAAI,EAAE,QAAQ,CAAC;CAChB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DataBusPath.js","sourceRoot":"","sources":["../../src/types/DataBusPath.ts"],"names":[],"mappings":"","sourcesContent":["import type z from 'zod';\n\nexport type DataBusPath<TZodData extends z.
|
|
1
|
+
{"version":3,"file":"DataBusPath.js","sourceRoot":"","sources":["../../src/types/DataBusPath.ts"],"names":[],"mappings":"","sourcesContent":["import type { z } from 'zod/v4-mini';\n\nexport type DataBusPath<TZodData extends z.ZodMiniType = z.ZodMiniUnknown> = {\n /**\n * Path to the data within the databus tree.\n */\n path: string[];\n\n /**\n * The type of the data, represented by a zod schema.\n */\n type: TZodData;\n};\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ms-cloudpack/data-bus",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.1",
|
|
4
4
|
"description": "A data bus implementation.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"test": "cloudpack-scripts test"
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"zod": "^
|
|
27
|
+
"zod": "^4.0.0"
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|
|
30
30
|
"@ms-cloudpack/eslint-plugin-internal": "^0.0.1",
|