@bgord/bun 1.21.5 → 1.21.7

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.
@@ -1,7 +1,6 @@
1
1
  import * as v from "valibot";
2
2
  import type { ClockPort } from "./clock.port";
3
3
  import { type CommitShaValueType } from "./commit-sha-value.vo";
4
- import { type EventStreamType } from "./event-stream.vo";
5
4
  import type { IdProviderPort } from "./id-provider.port";
6
5
  import type { StaticConfigPort } from "./static-config.port";
7
6
  type Dependencies = {
@@ -13,11 +12,11 @@ export declare const EventEnvelopeSchema: {
13
12
  id: v.SchemaWithPipe<readonly [v.StringSchema<"uuid.type">, v.UuidAction<string, "uuid.type">]>;
14
13
  correlationId: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<"uuid.type">, v.UuidAction<string, "uuid.type">]>, v.BrandAction<string, "CorrelationId">]>;
15
14
  createdAt: v.SchemaWithPipe<readonly [v.NumberSchema<string>, v.SafeIntegerAction<number, string>, v.MinValueAction<number, 0, string>, v.BrandAction<number, "TimestampValue">]>;
16
- stream: v.SchemaWithPipe<readonly [v.StringSchema<string>, v.MinLengthAction<string, 1, string>, v.MaxLengthAction<string, 256, string>]>;
15
+ stream: v.SchemaWithPipe<readonly [v.StringSchema<string>, v.MinLengthAction<string, 1, string>, v.MaxLengthAction<string, 256, string>, v.BrandAction<string, "EventStream">]>;
17
16
  version: v.LiteralSchema<1, undefined>;
18
17
  revision: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<string>, v.IntegerAction<number, string>, v.MinValueAction<number, 0, string>, v.BrandAction<number, "RevisionValue">]>, undefined>;
19
18
  commit: v.SchemaWithPipe<readonly [v.StringSchema<string>, v.RegexAction<string, string>, v.BrandAction<string, "CommitShaValue">]>;
20
19
  };
21
- export declare function event<Schema extends v.ObjectSchema<any, any>>(schema: Schema, stream: EventStreamType, payload: v.InferOutput<Schema>["payload"], deps: Dependencies): v.InferOutput<Schema>;
20
+ export declare function event<Schema extends v.ObjectSchema<any, any>>(schema: Schema, stream: string, payload: v.InferOutput<Schema>["payload"], deps: Dependencies): v.InferOutput<Schema>;
22
21
  export {};
23
22
  //# sourceMappingURL=event-envelope.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"event-envelope.d.ts","sourceRoot":"","sources":["../src/event-envelope.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAC;AAC7B,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,EAAkB,KAAK,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAGhF,OAAO,EAAe,KAAK,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACtE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACzD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAG7D,KAAK,YAAY,GAAG;IAClB,UAAU,EAAE,cAAc,CAAC;IAC3B,KAAK,EAAE,SAAS,CAAC;IACjB,YAAY,EAAE,gBAAgB,CAAC,kBAAkB,CAAC,CAAC;CACpD,CAAC;AAEF,eAAO,MAAM,mBAAmB;IAC9B,EAAE;IACF,aAAa;IACb,SAAS;IACT,MAAM;IACN,OAAO;IACP,QAAQ;IACR,MAAM;CACP,CAAC;AAWF,wBAAgB,KAAK,CAAC,MAAM,SAAS,CAAC,CAAC,YAAY,CAAC,GAAG,EAAE,GAAG,CAAC,EAC3D,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,eAAe,EACvB,OAAO,EAAE,CAAC,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC,SAAS,CAAC,EACzC,IAAI,EAAE,YAAY,GACjB,CAAC,CAAC,WAAW,CAAC,MAAM,CAAC,CAOvB"}
1
+ {"version":3,"file":"event-envelope.d.ts","sourceRoot":"","sources":["../src/event-envelope.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAC;AA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EAAE,MAAM,+BAA+B,CAAC;AACnE,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAGhD,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAQjC,MAAM,CAAC,MAAM,mBAAmB,GAAG;IACjC,EAAE,EAAE,IAAI;IACR,aAAa,EAAE,aAAa;IAC5B,SAAS,EAAE,KAAK,CAAC,cAAc;IAC/B,MAAM,EAAE,WAAW;IACnB,OAAO,EAAE,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC;IACrB,QAAQ,EAAE,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,aAAa,CAAC;IACzC,MAAM,EAAE,cAAc;CACvB,CAAC;AAEF,MAAM,mBAAmB,GAAG,CAAC,MAAc,EAAE,IAAkB,EAAE,EAAE,CACjE,CAAC;IACC,EAAE,EAAE,IAAI,CAAC,UAAU,CAAC,QAAQ,EAAE;IAC9B,aAAa,EAAE,kBAAkB,CAAC,GAAG,EAAE;IACvC,SAAS,EAAE,IAAI,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,EAAE;IAC9B,MAAM;IACN,MAAM,EAAE,IAAI,CAAC,YAAY,CAAC,GAAG,EAAE;CAChC,CAAU,CAAC;AAEd,MAAM,UAAU,KAAK,CACnB,MAAc,EACd,MAAc,EACd,OAAyC,EACzC,IAAkB;IAElB,OAAO,CAAC,CAAC,KAAK,CAAC,MAAM,EAAE;QACrB,GAAG,mBAAmB,CAAC,MAAM,EAAE,IAAI,CAAC;QACpC,IAAI,EAAE,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO;QACjC,OAAO,EAAE,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,OAAO;QACvC,OAAO;KACR,CAAC,CAAC;AACL,CAAC"}
@@ -4,6 +4,6 @@ export declare const EventStreamError: {
4
4
  Empty: string;
5
5
  TooLong: string;
6
6
  };
7
- export declare const EventStream: v.SchemaWithPipe<readonly [v.StringSchema<string>, v.MinLengthAction<string, 1, string>, v.MaxLengthAction<string, 256, string>]>;
7
+ export declare const EventStream: v.SchemaWithPipe<readonly [v.StringSchema<string>, v.MinLengthAction<string, 1, string>, v.MaxLengthAction<string, 256, string>, v.BrandAction<string, "EventStream">]>;
8
8
  export type EventStreamType = v.InferOutput<typeof EventStream>;
9
9
  //# sourceMappingURL=event-stream.vo.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"event-stream.vo.d.ts","sourceRoot":"","sources":["../src/event-stream.vo.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAC;AAE7B,eAAO,MAAM,gBAAgB;IAC3B,IAAI;IACJ,KAAK;IACL,OAAO;CACR,CAAC;AAEF,eAAO,MAAM,WAAW,mIAIvB,CAAC;AAEF,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,WAAW,CAAC,CAAC"}
1
+ {"version":3,"file":"event-stream.vo.d.ts","sourceRoot":"","sources":["../src/event-stream.vo.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAC;AAE7B,eAAO,MAAM,gBAAgB;IAC3B,IAAI;IACJ,KAAK;IACL,OAAO;CACR,CAAC;AAEF,eAAO,MAAM,WAAW,yKAKvB,CAAC;AAEF,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,WAAW,CAAC,CAAC"}
@@ -4,5 +4,5 @@ export const EventStreamError = {
4
4
  Empty: "event.stream.empty",
5
5
  TooLong: "event.stream.too.long",
6
6
  };
7
- export const EventStream = v.pipe(v.string(EventStreamError.Type), v.minLength(1, EventStreamError.Empty), v.maxLength(256, EventStreamError.TooLong));
7
+ export const EventStream = v.pipe(v.string(EventStreamError.Type), v.minLength(1, EventStreamError.Empty), v.maxLength(256, EventStreamError.TooLong), v.brand("EventStream"));
8
8
  //# sourceMappingURL=event-stream.vo.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"event-stream.vo.js","sourceRoot":"","sources":["../src/event-stream.vo.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAC;AAE7B,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC9B,IAAI,EAAE,mBAAmB;IACzB,KAAK,EAAE,oBAAoB;IAC3B,OAAO,EAAE,uBAAuB;CACjC,CAAC;AAEF,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,CAAC,IAAI,CAC/B,CAAC,CAAC,MAAM,CAAC,gBAAgB,CAAC,IAAI,CAAC,EAC/B,CAAC,CAAC,SAAS,CAAC,CAAC,EAAE,gBAAgB,CAAC,KAAK,CAAC,EACtC,CAAC,CAAC,SAAS,CAAC,GAAG,EAAE,gBAAgB,CAAC,OAAO,CAAC,CAC3C,CAAC"}
1
+ {"version":3,"file":"event-stream.vo.js","sourceRoot":"","sources":["../src/event-stream.vo.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAC;AAE7B,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC9B,IAAI,EAAE,mBAAmB;IACzB,KAAK,EAAE,oBAAoB;IAC3B,OAAO,EAAE,uBAAuB;CACjC,CAAC;AAEF,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,CAAC,IAAI,CAC/B,CAAC,CAAC,MAAM,CAAC,gBAAgB,CAAC,IAAI,CAAC,EAC/B,CAAC,CAAC,SAAS,CAAC,CAAC,EAAE,gBAAgB,CAAC,KAAK,CAAC,EACtC,CAAC,CAAC,SAAS,CAAC,GAAG,EAAE,gBAAgB,CAAC,OAAO,CAAC,EAC1C,CAAC,CAAC,KAAK,CAAC,aAAa,CAAC,CACvB,CAAC"}
@@ -4,7 +4,7 @@ export declare const HistoryClearedEvent: v.ObjectSchema<{
4
4
  readonly id: v.SchemaWithPipe<readonly [v.StringSchema<"uuid.type">, v.UuidAction<string, "uuid.type">]>;
5
5
  readonly correlationId: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<"uuid.type">, v.UuidAction<string, "uuid.type">]>, v.BrandAction<string, "CorrelationId">]>;
6
6
  readonly createdAt: v.SchemaWithPipe<readonly [v.NumberSchema<string>, v.SafeIntegerAction<number, string>, v.MinValueAction<number, 0, string>, v.BrandAction<number, "TimestampValue">]>;
7
- readonly stream: v.SchemaWithPipe<readonly [v.StringSchema<string>, v.MinLengthAction<string, 1, string>, v.MaxLengthAction<string, 256, string>]>;
7
+ readonly stream: v.SchemaWithPipe<readonly [v.StringSchema<string>, v.MinLengthAction<string, 1, string>, v.MaxLengthAction<string, 256, string>, v.BrandAction<string, "EventStream">]>;
8
8
  readonly version: v.LiteralSchema<1, undefined>;
9
9
  readonly revision: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<string>, v.IntegerAction<number, string>, v.MinValueAction<number, 0, string>, v.BrandAction<number, "RevisionValue">]>, undefined>;
10
10
  readonly commit: v.SchemaWithPipe<readonly [v.StringSchema<string>, v.RegexAction<string, string>, v.BrandAction<string, "CommitShaValue">]>;
@@ -4,7 +4,7 @@ export declare const HistoryPopulatedEvent: v.ObjectSchema<{
4
4
  readonly id: v.SchemaWithPipe<readonly [v.StringSchema<"uuid.type">, v.UuidAction<string, "uuid.type">]>;
5
5
  readonly correlationId: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<"uuid.type">, v.UuidAction<string, "uuid.type">]>, v.BrandAction<string, "CorrelationId">]>;
6
6
  readonly createdAt: v.SchemaWithPipe<readonly [v.NumberSchema<string>, v.SafeIntegerAction<number, string>, v.MinValueAction<number, 0, string>, v.BrandAction<number, "TimestampValue">]>;
7
- readonly stream: v.SchemaWithPipe<readonly [v.StringSchema<string>, v.MinLengthAction<string, 1, string>, v.MaxLengthAction<string, 256, string>]>;
7
+ readonly stream: v.SchemaWithPipe<readonly [v.StringSchema<string>, v.MinLengthAction<string, 1, string>, v.MaxLengthAction<string, 256, string>, v.BrandAction<string, "EventStream">]>;
8
8
  readonly version: v.LiteralSchema<1, undefined>;
9
9
  readonly revision: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<string>, v.IntegerAction<number, string>, v.MinValueAction<number, 0, string>, v.BrandAction<number, "RevisionValue">]>, undefined>;
10
10
  readonly commit: v.SchemaWithPipe<readonly [v.StringSchema<string>, v.RegexAction<string, string>, v.BrandAction<string, "CommitShaValue">]>;
@@ -4,7 +4,7 @@ export declare const UserLanguageSetEvent: v.ObjectSchema<{
4
4
  readonly id: v.SchemaWithPipe<readonly [v.StringSchema<"uuid.type">, v.UuidAction<string, "uuid.type">]>;
5
5
  readonly correlationId: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<"uuid.type">, v.UuidAction<string, "uuid.type">]>, v.BrandAction<string, "CorrelationId">]>;
6
6
  readonly createdAt: v.SchemaWithPipe<readonly [v.NumberSchema<string>, v.SafeIntegerAction<number, string>, v.MinValueAction<number, 0, string>, v.BrandAction<number, "TimestampValue">]>;
7
- readonly stream: v.SchemaWithPipe<readonly [v.StringSchema<string>, v.MinLengthAction<string, 1, string>, v.MaxLengthAction<string, 256, string>]>;
7
+ readonly stream: v.SchemaWithPipe<readonly [v.StringSchema<string>, v.MinLengthAction<string, 1, string>, v.MaxLengthAction<string, 256, string>, v.BrandAction<string, "EventStream">]>;
8
8
  readonly version: v.LiteralSchema<1, undefined>;
9
9
  readonly revision: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<string>, v.IntegerAction<number, string>, v.MinValueAction<number, 0, string>, v.BrandAction<number, "RevisionValue">]>, undefined>;
10
10
  readonly commit: v.SchemaWithPipe<readonly [v.StringSchema<string>, v.RegexAction<string, string>, v.BrandAction<string, "CommitShaValue">]>;
@@ -4,7 +4,7 @@ export declare const HourHasPassedEvent: v.ObjectSchema<{
4
4
  readonly id: v.SchemaWithPipe<readonly [v.StringSchema<"uuid.type">, v.UuidAction<string, "uuid.type">]>;
5
5
  readonly correlationId: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<"uuid.type">, v.UuidAction<string, "uuid.type">]>, v.BrandAction<string, "CorrelationId">]>;
6
6
  readonly createdAt: v.SchemaWithPipe<readonly [v.NumberSchema<string>, v.SafeIntegerAction<number, string>, v.MinValueAction<number, 0, string>, v.BrandAction<number, "TimestampValue">]>;
7
- readonly stream: v.SchemaWithPipe<readonly [v.StringSchema<string>, v.MinLengthAction<string, 1, string>, v.MaxLengthAction<string, 256, string>]>;
7
+ readonly stream: v.SchemaWithPipe<readonly [v.StringSchema<string>, v.MinLengthAction<string, 1, string>, v.MaxLengthAction<string, 256, string>, v.BrandAction<string, "EventStream">]>;
8
8
  readonly version: v.LiteralSchema<1, undefined>;
9
9
  readonly revision: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<string>, v.IntegerAction<number, string>, v.MinValueAction<number, 0, string>, v.BrandAction<number, "RevisionValue">]>, undefined>;
10
10
  readonly commit: v.SchemaWithPipe<readonly [v.StringSchema<string>, v.RegexAction<string, string>, v.BrandAction<string, "CommitShaValue">]>;
@@ -4,7 +4,7 @@ export declare const MinuteHasPassedEvent: v.ObjectSchema<{
4
4
  readonly id: v.SchemaWithPipe<readonly [v.StringSchema<"uuid.type">, v.UuidAction<string, "uuid.type">]>;
5
5
  readonly correlationId: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<"uuid.type">, v.UuidAction<string, "uuid.type">]>, v.BrandAction<string, "CorrelationId">]>;
6
6
  readonly createdAt: v.SchemaWithPipe<readonly [v.NumberSchema<string>, v.SafeIntegerAction<number, string>, v.MinValueAction<number, 0, string>, v.BrandAction<number, "TimestampValue">]>;
7
- readonly stream: v.SchemaWithPipe<readonly [v.StringSchema<string>, v.MinLengthAction<string, 1, string>, v.MaxLengthAction<string, 256, string>]>;
7
+ readonly stream: v.SchemaWithPipe<readonly [v.StringSchema<string>, v.MinLengthAction<string, 1, string>, v.MaxLengthAction<string, 256, string>, v.BrandAction<string, "EventStream">]>;
8
8
  readonly version: v.LiteralSchema<1, undefined>;
9
9
  readonly revision: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<string>, v.IntegerAction<number, string>, v.MinValueAction<number, 0, string>, v.BrandAction<number, "RevisionValue">]>, undefined>;
10
10
  readonly commit: v.SchemaWithPipe<readonly [v.StringSchema<string>, v.RegexAction<string, string>, v.BrandAction<string, "CommitShaValue">]>;
@@ -4,7 +4,7 @@ export declare const SecurityViolationDetectedEvent: v.ObjectSchema<{
4
4
  readonly id: v.SchemaWithPipe<readonly [v.StringSchema<"uuid.type">, v.UuidAction<string, "uuid.type">]>;
5
5
  readonly correlationId: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<"uuid.type">, v.UuidAction<string, "uuid.type">]>, v.BrandAction<string, "CorrelationId">]>;
6
6
  readonly createdAt: v.SchemaWithPipe<readonly [v.NumberSchema<string>, v.SafeIntegerAction<number, string>, v.MinValueAction<number, 0, string>, v.BrandAction<number, "TimestampValue">]>;
7
- readonly stream: v.SchemaWithPipe<readonly [v.StringSchema<string>, v.MinLengthAction<string, 1, string>, v.MaxLengthAction<string, 256, string>]>;
7
+ readonly stream: v.SchemaWithPipe<readonly [v.StringSchema<string>, v.MinLengthAction<string, 1, string>, v.MaxLengthAction<string, 256, string>, v.BrandAction<string, "EventStream">]>;
8
8
  readonly version: v.LiteralSchema<1, undefined>;
9
9
  readonly revision: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<string>, v.IntegerAction<number, string>, v.MinValueAction<number, 0, string>, v.BrandAction<number, "RevisionValue">]>, undefined>;
10
10
  readonly commit: v.SchemaWithPipe<readonly [v.StringSchema<string>, v.RegexAction<string, string>, v.BrandAction<string, "CommitShaValue">]>;
@@ -3,7 +3,7 @@ import * as v from "valibot";
3
3
  import type { ReactiveConfigPort } from "./reactive-config.port";
4
4
  import type { HasRequestPath } from "./request-context.port";
5
5
  export declare const Maintenance: v.ObjectSchema<{
6
- readonly enabled: v.SchemaWithPipe<readonly [v.PicklistSchema<tools.FeatureFlagEnum[], string>, v.BrandAction<tools.FeatureFlagEnum, "FeatureFlagValue">]>;
6
+ readonly enabled: v.PicklistSchema<tools.FeatureFlagEnum[], string>;
7
7
  }, undefined>;
8
8
  export type MaintenanceType = v.InferOutput<typeof Maintenance>;
9
9
  export type ShieldMaintenanceConfig = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bgord/bun",
3
- "version": "1.21.5",
3
+ "version": "1.21.7",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "author": "Bartosz Gordon",
@@ -40,7 +40,7 @@
40
40
  "yazl": "3.3.1"
41
41
  },
42
42
  "dependencies": {
43
- "@bgord/tools": "1.6.5",
43
+ "@bgord/tools": "1.6.6",
44
44
  "emittery": "2.0.0",
45
45
  "hono": "4.13.1",
46
46
  "node-cache": "5.1.2"
@@ -4,7 +4,7 @@ import type { ClockPort } from "./clock.port";
4
4
  import { CommitShaValue, type CommitShaValueType } from "./commit-sha-value.vo";
5
5
  import { CorrelationId } from "./correlation-id.vo";
6
6
  import { CorrelationStorage } from "./correlation-storage.service";
7
- import { EventStream, type EventStreamType } from "./event-stream.vo";
7
+ import { EventStream } from "./event-stream.vo";
8
8
  import type { IdProviderPort } from "./id-provider.port";
9
9
  import type { StaticConfigPort } from "./static-config.port";
10
10
  import { UUID } from "./uuid.vo";
@@ -25,7 +25,7 @@ export const EventEnvelopeSchema = {
25
25
  commit: CommitShaValue,
26
26
  };
27
27
 
28
- const createEventEnvelope = (stream: EventStreamType, deps: Dependencies) =>
28
+ const createEventEnvelope = (stream: string, deps: Dependencies) =>
29
29
  ({
30
30
  id: deps.IdProvider.generate(),
31
31
  correlationId: CorrelationStorage.get(),
@@ -36,7 +36,7 @@ const createEventEnvelope = (stream: EventStreamType, deps: Dependencies) =>
36
36
 
37
37
  export function event<Schema extends v.ObjectSchema<any, any>>(
38
38
  schema: Schema,
39
- stream: EventStreamType,
39
+ stream: string,
40
40
  payload: v.InferOutput<Schema>["payload"],
41
41
  deps: Dependencies,
42
42
  ): v.InferOutput<Schema> {
@@ -10,6 +10,7 @@ export const EventStream = v.pipe(
10
10
  v.string(EventStreamError.Type),
11
11
  v.minLength(1, EventStreamError.Empty),
12
12
  v.maxLength(256, EventStreamError.TooLong),
13
+ v.brand("EventStream"),
13
14
  );
14
15
 
15
16
  export type EventStreamType = v.InferOutput<typeof EventStream>;