@ooneex/pub-sub 0.0.18 → 1.0.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/README.md CHANGED
@@ -1,10 +1,8 @@
1
1
  # @ooneex/pub-sub
2
2
 
3
- A publish-subscribe messaging pattern implementation for TypeScript applications with Redis support. This package provides an abstract base class for creating pub/sub handlers and a Redis client for distributed messaging across application components.
3
+ Publish-subscribe messaging system for decoupled, event-driven communication between application components with typed event channels.
4
4
 
5
5
  ![Bun](https://img.shields.io/badge/Bun-Compatible-orange?style=flat-square&logo=bun)
6
- ![Deno](https://img.shields.io/badge/Deno-Compatible-blue?style=flat-square&logo=deno)
7
- ![Node.js](https://img.shields.io/badge/Node.js-Compatible-green?style=flat-square&logo=node.js)
8
6
  ![TypeScript](https://img.shields.io/badge/TypeScript-Ready-blue?style=flat-square&logo=typescript)
9
7
  ![MIT License](https://img.shields.io/badge/License-MIT-yellow?style=flat-square)
10
8
 
@@ -22,30 +20,14 @@ A publish-subscribe messaging pattern implementation for TypeScript applications
22
20
 
23
21
  ✅ **Auto Reconnection** - Redis client with automatic reconnection support
24
22
 
25
- ✅ **Key Support** - Optional message keys for routing and filtering
23
+ ✅ **WebSocket Support** - Built-in ServerWebSocket integration for real-time communication
26
24
 
27
25
  ## Installation
28
26
 
29
- ### Bun
30
27
  ```bash
31
28
  bun add @ooneex/pub-sub
32
29
  ```
33
30
 
34
- ### pnpm
35
- ```bash
36
- pnpm add @ooneex/pub-sub
37
- ```
38
-
39
- ### Yarn
40
- ```bash
41
- yarn add @ooneex/pub-sub
42
- ```
43
-
44
- ### npm
45
- ```bash
46
- npm install @ooneex/pub-sub
47
- ```
48
-
49
31
  ## Usage
50
32
 
51
33
  ### Basic Pub/Sub Handler
package/dist/index.d.ts CHANGED
@@ -4,7 +4,6 @@ import { ServerWebSocket } from "bun";
4
4
  type PubSubMessageHandlerType<Data extends Record<string, ScalarType> = Record<string, ScalarType>> = (context: {
5
5
  data: Data;
6
6
  channel: string;
7
- key?: string;
8
7
  }) => Promise<void> | void;
9
8
  type RedisPubSubOptionsType = {
10
9
  connectionString?: string;
@@ -20,7 +19,6 @@ interface IPubSubClient<Data extends Record<string, ScalarType> = Record<string,
20
19
  publish: (config: {
21
20
  channel: string;
22
21
  data: Data;
23
- key?: string;
24
22
  }) => Promise<void>;
25
23
  subscribe: (channel: string, handler: PubSubMessageHandlerType<Data>) => Promise<void>;
26
24
  unsubscribe: (channel: string) => Promise<void>;
@@ -31,11 +29,9 @@ interface IPubSub<Data extends Record<string, ScalarType> = Record<string, Scala
31
29
  handler: (context: {
32
30
  data: Data;
33
31
  channel: string;
34
- key?: string;
35
32
  }) => Promise<void> | void;
36
33
  publish: (data: Data, options?: {
37
34
  ws?: ServerWebSocket;
38
- key?: string;
39
35
  }) => Promise<void> | void;
40
36
  subscribe: (ws?: ServerWebSocket) => Promise<void> | void;
41
37
  unsubscribe: (ws?: ServerWebSocket) => Promise<void> | void;
@@ -54,11 +50,9 @@ declare abstract class PubSub<Data extends Record<string, ScalarType2> = Record<
54
50
  abstract handler(context: {
55
51
  data: Data;
56
52
  channel: string;
57
- key?: string;
58
53
  }): Promise<void> | void;
59
54
  publish(data: Data, options?: {
60
55
  ws?: ServerWebSocket2;
61
- key?: string;
62
56
  }): Promise<void>;
63
57
  subscribe(ws?: ServerWebSocket2): Promise<void>;
64
58
  unsubscribe(ws?: ServerWebSocket2): Promise<void>;
@@ -78,7 +72,6 @@ declare class RedisPubSubClient<Data extends Record<string, ScalarType3>> implem
78
72
  publish(config: {
79
73
  channel: string;
80
74
  data: Data;
81
- key?: string;
82
75
  }): Promise<void>;
83
76
  subscribe(channel: string, handler: PubSubMessageHandlerType<Data>): Promise<void>;
84
77
  unsubscribe(channel: string): Promise<void>;
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
1
  // @bun
2
- var u=function(e,t,i,s){var c=arguments.length,r=c<3?t:s===null?s=Object.getOwnPropertyDescriptor(t,i):s,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")r=Reflect.decorate(e,t,i,s);else for(var b=e.length-1;b>=0;b--)if(o=e[b])r=(c<3?o(r):c>3?o(t,i,r):o(t,i))||r;return c>3&&r&&Object.defineProperty(t,i,r),r};var l=(e,t)=>{if(typeof Reflect==="object"&&typeof Reflect.metadata==="function")return Reflect.metadata(e,t)};import{container as p,EContainerScope as d}from"@ooneex/container";var S={pubSub:(e=d.Singleton)=>{return(t)=>{p.add(t,e),p.get(t).subscribe()}}};class h{client;ws;constructor(e){this.client=e}async publish(e,t){this.ws=t?.ws,await this.client.publish({channel:await this.getChannel(),data:e,...t?.key!==void 0&&{key:t.key}})}async subscribe(e){this.ws=e,await this.client.subscribe(await this.getChannel(),this.handler.bind(this))}async unsubscribe(e){this.ws=e,await this.client.unsubscribe(await this.getChannel())}async unsubscribeAll(e){this.ws=e,await this.client.unsubscribeAll()}}import{Exception as m}from"@ooneex/exception";import{HttpStatus as y}from"@ooneex/http-status";class n extends m{constructor(e,t={}){super(e,{status:y.Code.InternalServerError,data:t});this.name="PubSubException"}}import{injectable as P}from"@ooneex/container";class a{client;subscriber=null;constructor(e={}){let t=e.connectionString||Bun.env.PUBSUB_REDIS_URL;if(!t)throw new n("Redis connection string is required. Please provide a connection string either through the constructor options or set the PUBSUB_REDIS_URL environment variable.");let{connectionString:i,...s}=e,r={...{connectionTimeout:1e4,idleTimeout:30000,autoReconnect:!0,maxRetries:3,enableOfflineQueue:!0,enableAutoPipelining:!0},...s};this.client=new Bun.RedisClient(t,r)}async connect(){if(!this.client.connected)await this.client.connect()}async connectSubscriber(){if(!this.subscriber)this.subscriber=await this.client.duplicate();if(!this.subscriber.connected)await this.subscriber.connect()}async publish(e){try{await this.connect();let t=JSON.stringify(e.data);await this.client.publish(e.channel,t)}catch(t){throw new n(`Failed to publish message to channel "${e.channel}": ${t}`)}finally{this.client.close()}}async subscribe(e,t){try{await this.connectSubscriber(),await this.subscriber?.subscribe(e,(i,s)=>{let c=JSON.parse(i);t({data:c,channel:s})})}catch(i){throw new n(`Failed to subscribe to channel "${e}": ${i}`)}}async unsubscribe(e){try{if(!this.subscriber)return;await this.subscriber.unsubscribe(e)}catch(t){throw new n(`Failed to unsubscribe from channel "${e}": ${t}`)}}async unsubscribeAll(){try{if(!this.subscriber)return;await this.subscriber.unsubscribe()}catch(e){throw new n(`Failed to unsubscribe from all channels: ${e}`)}}}a=u([P(),l("design:paramtypes",[typeof RedisPubSubOptionsType==="undefined"?Object:RedisPubSubOptionsType])],a);export{S as decorator,a as RedisPubSub,n as PubSubException,h as PubSub};
2
+ var u=function(e,t,i,s){var c=arguments.length,r=c<3?t:s===null?s=Object.getOwnPropertyDescriptor(t,i):s,a;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")r=Reflect.decorate(e,t,i,s);else for(var b=e.length-1;b>=0;b--)if(a=e[b])r=(c<3?a(r):c>3?a(t,i,r):a(t,i))||r;return c>3&&r&&Object.defineProperty(t,i,r),r};var l=(e,t)=>{if(typeof Reflect==="object"&&typeof Reflect.metadata==="function")return Reflect.metadata(e,t)};import{container as h,EContainerScope as d}from"@ooneex/container";var m={pubSub:(e=d.Singleton)=>{return(t)=>{h.add(t,e)}}};class p{client;ws;constructor(e){this.client=e}async publish(e,t){this.ws=t?.ws,await this.client.publish({channel:await this.getChannel(),data:e})}async subscribe(e){this.ws=e,await this.client.subscribe(await this.getChannel(),this.handler.bind(this))}async unsubscribe(e){this.ws=e,await this.client.unsubscribe(await this.getChannel())}async unsubscribeAll(e){this.ws=e,await this.client.unsubscribeAll()}}import{Exception as S}from"@ooneex/exception";import{HttpStatus as w}from"@ooneex/http-status";class n extends S{constructor(e,t={}){super(e,{status:w.Code.InternalServerError,data:t});this.name="PubSubException"}}import{injectable as y}from"@ooneex/container";class o{client;subscriber=null;constructor(e={}){let t=e.connectionString||Bun.env.PUBSUB_REDIS_URL;if(!t)throw new n("Redis connection string is required. Please provide a connection string either through the constructor options or set the PUBSUB_REDIS_URL environment variable.");let{connectionString:i,...s}=e,r={...{connectionTimeout:1e4,idleTimeout:30000,autoReconnect:!0,maxRetries:3,enableOfflineQueue:!0,enableAutoPipelining:!0},...s};this.client=new Bun.RedisClient(t,r)}async connect(){if(!this.client.connected)await this.client.connect()}async connectSubscriber(){if(!this.subscriber)this.subscriber=await this.client.duplicate();if(!this.subscriber.connected)await this.subscriber.connect()}async publish(e){try{await this.connect();let t=JSON.stringify(e.data);await this.client.publish(e.channel,t)}catch(t){throw new n(`Failed to publish message to channel "${e.channel}": ${t}`)}finally{this.client.close()}}async subscribe(e,t){try{await this.connectSubscriber(),await this.subscriber?.subscribe(e,(i,s)=>{let c=JSON.parse(i);t({data:c,channel:s})})}catch(i){throw new n(`Failed to subscribe to channel "${e}": ${i}`)}}async unsubscribe(e){try{if(!this.subscriber)return;await this.subscriber.unsubscribe(e)}catch(t){throw new n(`Failed to unsubscribe from channel "${e}": ${t}`)}}async unsubscribeAll(){try{if(!this.subscriber)return;await this.subscriber.unsubscribe()}catch(e){throw new n(`Failed to unsubscribe from all channels: ${e}`)}}}o=u([y(),l("design:paramtypes",[typeof RedisPubSubOptionsType==="undefined"?Object:RedisPubSubOptionsType])],o);export{m as decorator,o as RedisPubSub,n as PubSubException,p as PubSub};
3
3
 
4
- //# debugId=4F3417BC1E80EAE564756E2164756E21
4
+ //# debugId=AED5DFF2F526DF9B64756E2164756E21
package/dist/index.js.map CHANGED
@@ -2,12 +2,12 @@
2
2
  "version": 3,
3
3
  "sources": ["src/decorators.ts", "src/PubSub.ts", "src/PubSubException.ts", "src/RedisPubSubClient.ts"],
4
4
  "sourcesContent": [
5
- "import { container, EContainerScope } from \"@ooneex/container\";\nimport type { IPubSub, PubSubClassType } from \"./types\";\n\nexport const decorator = {\n pubSub: (scope: EContainerScope = EContainerScope.Singleton) => {\n return (target: PubSubClassType): void => {\n container.add(target, scope);\n const pubsub = container.get<IPubSub>(target);\n pubsub.subscribe();\n };\n },\n};\n",
6
- "import type { ScalarType } from \"@ooneex/types\";\nimport type { ServerWebSocket } from \"bun\";\nimport type { IPubSub, IPubSubClient } from \"./types\";\n\nexport abstract class PubSub<Data extends Record<string, ScalarType> = Record<string, ScalarType>>\n implements IPubSub<Data>\n{\n protected ws: ServerWebSocket | undefined;\n\n constructor(protected readonly client: IPubSubClient<Data>) {}\n\n public abstract getChannel(): string | Promise<string>;\n public abstract handler(context: { data: Data; channel: string; key?: string }): Promise<void> | void;\n\n public async publish(data: Data, options?: { ws?: ServerWebSocket; key?: string }): Promise<void> {\n this.ws = options?.ws;\n await this.client.publish({\n channel: await this.getChannel(),\n data,\n ...(options?.key !== undefined && { key: options.key }),\n });\n }\n\n public async subscribe(ws?: ServerWebSocket): Promise<void> {\n this.ws = ws;\n await this.client.subscribe(await this.getChannel(), this.handler.bind(this));\n }\n\n public async unsubscribe(ws?: ServerWebSocket): Promise<void> {\n this.ws = ws;\n await this.client.unsubscribe(await this.getChannel());\n }\n\n public async unsubscribeAll(ws?: ServerWebSocket): Promise<void> {\n this.ws = ws;\n await this.client.unsubscribeAll();\n }\n}\n",
5
+ "import { container, EContainerScope } from \"@ooneex/container\";\nimport type { PubSubClassType } from \"./types\";\n\nexport const decorator = {\n pubSub: (scope: EContainerScope = EContainerScope.Singleton) => {\n return (target: PubSubClassType): void => {\n container.add(target, scope);\n // const pubsub = container.get<IPubSub>(target);\n // pubsub.subscribe();\n };\n },\n};\n",
6
+ "import type { ScalarType } from \"@ooneex/types\";\nimport type { ServerWebSocket } from \"bun\";\nimport type { IPubSub, IPubSubClient } from \"./types\";\n\nexport abstract class PubSub<Data extends Record<string, ScalarType> = Record<string, ScalarType>>\n implements IPubSub<Data>\n{\n protected ws: ServerWebSocket | undefined;\n\n constructor(protected readonly client: IPubSubClient<Data>) {}\n\n public abstract getChannel(): string | Promise<string>;\n public abstract handler(context: { data: Data; channel: string }): Promise<void> | void;\n\n public async publish(data: Data, options?: { ws?: ServerWebSocket }): Promise<void> {\n this.ws = options?.ws;\n await this.client.publish({\n channel: await this.getChannel(),\n data,\n });\n }\n\n public async subscribe(ws?: ServerWebSocket): Promise<void> {\n this.ws = ws;\n await this.client.subscribe(await this.getChannel(), this.handler.bind(this));\n }\n\n public async unsubscribe(ws?: ServerWebSocket): Promise<void> {\n this.ws = ws;\n await this.client.unsubscribe(await this.getChannel());\n }\n\n public async unsubscribeAll(ws?: ServerWebSocket): Promise<void> {\n this.ws = ws;\n await this.client.unsubscribeAll();\n }\n}\n",
7
7
  "import { Exception } from \"@ooneex/exception\";\nimport { HttpStatus } from \"@ooneex/http-status\";\n\nexport class PubSubException extends Exception {\n constructor(message: string, data: Record<string, unknown> = {}) {\n super(message, {\n status: HttpStatus.Code.InternalServerError,\n data,\n });\n this.name = \"PubSubException\";\n }\n}\n",
8
- "import { injectable } from \"@ooneex/container\";\nimport type { ScalarType } from \"@ooneex/types\";\nimport { PubSubException } from \"./PubSubException\";\nimport type { IPubSubClient, PubSubMessageHandlerType, RedisPubSubOptionsType } from \"./types\";\n\n@injectable()\nexport class RedisPubSubClient<Data extends Record<string, ScalarType>> implements IPubSubClient<Data> {\n private client: Bun.RedisClient;\n private subscriber: Bun.RedisClient | null = null;\n\n constructor(options: RedisPubSubOptionsType = {}) {\n const connectionString = options.connectionString || Bun.env.PUBSUB_REDIS_URL;\n\n if (!connectionString) {\n throw new PubSubException(\n \"Redis connection string is required. Please provide a connection string either through the constructor options or set the PUBSUB_REDIS_URL environment variable.\",\n );\n }\n\n const { connectionString: _, ...userOptions } = options;\n\n const defaultOptions = {\n connectionTimeout: 10_000,\n idleTimeout: 30_000,\n autoReconnect: true,\n maxRetries: 3,\n enableOfflineQueue: true,\n enableAutoPipelining: true,\n };\n\n const clientOptions = { ...defaultOptions, ...userOptions };\n\n this.client = new Bun.RedisClient(connectionString, clientOptions);\n }\n\n private async connect(): Promise<void> {\n if (!this.client.connected) {\n await this.client.connect();\n }\n }\n\n private async connectSubscriber(): Promise<void> {\n if (!this.subscriber) {\n this.subscriber = await this.client.duplicate();\n }\n\n if (!this.subscriber.connected) {\n await this.subscriber.connect();\n }\n }\n\n public async publish(config: { channel: string; data: Data; key?: string }): Promise<void> {\n try {\n await this.connect();\n const message = JSON.stringify(config.data);\n await this.client.publish(config.channel, message);\n } catch (error) {\n throw new PubSubException(`Failed to publish message to channel \"${config.channel}\": ${error}`);\n } finally {\n this.client.close();\n }\n }\n\n public async subscribe(channel: string, handler: PubSubMessageHandlerType<Data>): Promise<void> {\n try {\n await this.connectSubscriber();\n await this.subscriber?.subscribe(channel, (message: string, ch: string) => {\n const data = JSON.parse(message) as Data;\n handler({ data, channel: ch });\n });\n } catch (error) {\n throw new PubSubException(`Failed to subscribe to channel \"${channel}\": ${error}`);\n }\n }\n\n public async unsubscribe(channel: string): Promise<void> {\n try {\n if (!this.subscriber) {\n return;\n }\n\n await this.subscriber.unsubscribe(channel);\n } catch (error) {\n throw new PubSubException(`Failed to unsubscribe from channel \"${channel}\": ${error}`);\n }\n }\n\n public async unsubscribeAll(): Promise<void> {\n try {\n if (!this.subscriber) {\n return;\n }\n\n await this.subscriber.unsubscribe();\n } catch (error) {\n throw new PubSubException(`Failed to unsubscribe from all channels: ${error}`);\n }\n }\n}\n"
8
+ "import { injectable } from \"@ooneex/container\";\nimport type { ScalarType } from \"@ooneex/types\";\nimport { PubSubException } from \"./PubSubException\";\nimport type { IPubSubClient, PubSubMessageHandlerType, RedisPubSubOptionsType } from \"./types\";\n\n@injectable()\nexport class RedisPubSubClient<Data extends Record<string, ScalarType>> implements IPubSubClient<Data> {\n private client: Bun.RedisClient;\n private subscriber: Bun.RedisClient | null = null;\n\n constructor(options: RedisPubSubOptionsType = {}) {\n const connectionString = options.connectionString || Bun.env.PUBSUB_REDIS_URL;\n\n if (!connectionString) {\n throw new PubSubException(\n \"Redis connection string is required. Please provide a connection string either through the constructor options or set the PUBSUB_REDIS_URL environment variable.\",\n );\n }\n\n const { connectionString: _, ...userOptions } = options;\n\n const defaultOptions = {\n connectionTimeout: 10_000,\n idleTimeout: 30_000,\n autoReconnect: true,\n maxRetries: 3,\n enableOfflineQueue: true,\n enableAutoPipelining: true,\n };\n\n const clientOptions = { ...defaultOptions, ...userOptions };\n\n this.client = new Bun.RedisClient(connectionString, clientOptions);\n }\n\n private async connect(): Promise<void> {\n if (!this.client.connected) {\n await this.client.connect();\n }\n }\n\n private async connectSubscriber(): Promise<void> {\n if (!this.subscriber) {\n this.subscriber = await this.client.duplicate();\n }\n\n if (!this.subscriber.connected) {\n await this.subscriber.connect();\n }\n }\n\n public async publish(config: { channel: string; data: Data }): Promise<void> {\n try {\n await this.connect();\n const message = JSON.stringify(config.data);\n await this.client.publish(config.channel, message);\n } catch (error) {\n throw new PubSubException(`Failed to publish message to channel \"${config.channel}\": ${error}`);\n } finally {\n this.client.close();\n }\n }\n\n public async subscribe(channel: string, handler: PubSubMessageHandlerType<Data>): Promise<void> {\n try {\n await this.connectSubscriber();\n await this.subscriber?.subscribe(channel, (message: string, ch: string) => {\n const data = JSON.parse(message) as Data;\n handler({ data, channel: ch });\n });\n } catch (error) {\n throw new PubSubException(`Failed to subscribe to channel \"${channel}\": ${error}`);\n }\n }\n\n public async unsubscribe(channel: string): Promise<void> {\n try {\n if (!this.subscriber) {\n return;\n }\n\n await this.subscriber.unsubscribe(channel);\n } catch (error) {\n throw new PubSubException(`Failed to unsubscribe from channel \"${channel}\": ${error}`);\n }\n }\n\n public async unsubscribeAll(): Promise<void> {\n try {\n if (!this.subscriber) {\n return;\n }\n\n await this.subscriber.unsubscribe();\n } catch (error) {\n throw new PubSubException(`Failed to unsubscribe from all channels: ${error}`);\n }\n }\n}\n"
9
9
  ],
10
- "mappings": ";ybAAA,oBAAS,qBAAW,0BAGb,IAAM,EAAY,CACvB,OAAQ,CAAC,EAAyB,EAAgB,YAAc,CAC9D,MAAO,CAAC,IAAkC,CACxC,EAAU,IAAI,EAAQ,CAAK,EACZ,EAAU,IAAa,CAAM,EACrC,UAAU,GAGvB,ECPO,MAAe,CAEtB,CAGiC,OAFrB,GAEV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,WAAW,UACnB,MAAM,KAAK,WAAW,QAAQ,OAIrB,QAAO,CAAC,EAAwD,CAC3E,GAAI,CACF,MAAM,KAAK,QAAQ,EACnB,IAAM,EAAU,KAAK,UAAU,EAAO,IAAI,EAC1C,MAAM,KAAK,OAAO,QAAQ,EAAO,QAAS,CAAO,EACjD,MAAO,EAAO,CACd,MAAM,IAAI,EAAgB,yCAAyC,EAAO,aAAa,GAAO,SAC9F,CACA,KAAK,OAAO,MAAM,QAIT,UAAS,CAAC,EAAiB,EAAwD,CAC9F,GAAI,CACF,MAAM,KAAK,kBAAkB,EAC7B,MAAM,KAAK,YAAY,UAAU,EAAS,CAAC,EAAiB,IAAe,CACzE,IAAM,EAAO,KAAK,MAAM,CAAO,EAC/B,EAAQ,CAAE,OAAM,QAAS,CAAG,CAAC,EAC9B,EACD,MAAO,EAAO,CACd,MAAM,IAAI,EAAgB,mCAAmC,OAAa,GAAO,QAIxE,YAAW,CAAC,EAAgC,CACvD,GAAI,CACF,GAAI,CAAC,KAAK,WACR,OAGF,MAAM,KAAK,WAAW,YAAY,CAAO,EACzC,MAAO,EAAO,CACd,MAAM,IAAI,EAAgB,uCAAuC,OAAa,GAAO,QAI5E,eAAc,EAAkB,CAC3C,GAAI,CACF,GAAI,CAAC,KAAK,WACR,OAGF,MAAM,KAAK,WAAW,YAAY,EAClC,MAAO,EAAO,CACd,MAAM,IAAI,EAAgB,4CAA4C,GAAO,GAGnF,CA5Fa,EAAN,GADN,EAAW,EACL,oGAAM",
11
+ "debugId": "AED5DFF2F526DF9B64756E2164756E21",
12
12
  "names": []
13
13
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@ooneex/pub-sub",
3
- "description": "Publish-subscribe messaging pattern implementation for event-driven communication between application components",
4
- "version": "0.0.18",
3
+ "description": "Publish-subscribe messaging system for decoupled, event-driven communication between application components with typed event channels",
4
+ "version": "1.0.0",
5
5
  "type": "module",
6
6
  "files": [
7
7
  "dist",
@@ -28,12 +28,12 @@
28
28
  "test": "bun test tests"
29
29
  },
30
30
  "dependencies": {
31
- "@ooneex/container": "0.0.17",
32
- "@ooneex/exception": "0.0.16",
33
- "@ooneex/http-status": "0.0.16"
31
+ "@ooneex/container": "0.0.19",
32
+ "@ooneex/exception": "0.0.18",
33
+ "@ooneex/http-status": "0.0.18"
34
34
  },
35
35
  "devDependencies": {
36
- "@ooneex/types": "0.0.16"
36
+ "@ooneex/types": "0.0.19"
37
37
  },
38
38
  "keywords": [
39
39
  "bun",