@zudojs/adapters 0.0.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.
Files changed (120) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +40 -0
  3. package/dist/.tsbuildinfo +1 -0
  4. package/dist/adapter/adapter.registry.d.ts +52 -0
  5. package/dist/adapter/adapter.registry.d.ts.map +1 -0
  6. package/dist/adapter/adapter.registry.js +74 -0
  7. package/dist/adapter/adapter.registry.js.map +1 -0
  8. package/dist/adapter/adapter.type.d.ts +48 -0
  9. package/dist/adapter/adapter.type.d.ts.map +1 -0
  10. package/dist/adapter/adapter.type.js +7 -0
  11. package/dist/adapter/adapter.type.js.map +1 -0
  12. package/dist/adapter/index.d.ts +8 -0
  13. package/dist/adapter/index.d.ts.map +1 -0
  14. package/dist/adapter/index.js +7 -0
  15. package/dist/adapter/index.js.map +1 -0
  16. package/dist/capabilities/capabilities.type.d.ts +38 -0
  17. package/dist/capabilities/capabilities.type.d.ts.map +1 -0
  18. package/dist/capabilities/capabilities.type.js +7 -0
  19. package/dist/capabilities/capabilities.type.js.map +1 -0
  20. package/dist/capabilities/index.d.ts +7 -0
  21. package/dist/capabilities/index.d.ts.map +1 -0
  22. package/dist/capabilities/index.js +7 -0
  23. package/dist/capabilities/index.js.map +1 -0
  24. package/dist/cli/cliAdapter.type.d.ts +31 -0
  25. package/dist/cli/cliAdapter.type.d.ts.map +1 -0
  26. package/dist/cli/cliAdapter.type.js +7 -0
  27. package/dist/cli/cliAdapter.type.js.map +1 -0
  28. package/dist/cli/index.d.ts +7 -0
  29. package/dist/cli/index.d.ts.map +1 -0
  30. package/dist/cli/index.js +7 -0
  31. package/dist/cli/index.js.map +1 -0
  32. package/dist/errors/index.d.ts +8 -0
  33. package/dist/errors/index.d.ts.map +1 -0
  34. package/dist/errors/index.js +7 -0
  35. package/dist/errors/index.js.map +1 -0
  36. package/dist/http/httpAdapter.type.d.ts +85 -0
  37. package/dist/http/httpAdapter.type.d.ts.map +1 -0
  38. package/dist/http/httpAdapter.type.js +7 -0
  39. package/dist/http/httpAdapter.type.js.map +1 -0
  40. package/dist/http/index.d.ts +7 -0
  41. package/dist/http/index.d.ts.map +1 -0
  42. package/dist/http/index.js +7 -0
  43. package/dist/http/index.js.map +1 -0
  44. package/dist/index.d.ts +38 -0
  45. package/dist/index.d.ts.map +1 -0
  46. package/dist/index.js +23 -0
  47. package/dist/index.js.map +1 -0
  48. package/dist/lifecycle/index.d.ts +8 -0
  49. package/dist/lifecycle/index.d.ts.map +1 -0
  50. package/dist/lifecycle/index.js +7 -0
  51. package/dist/lifecycle/index.js.map +1 -0
  52. package/dist/lifecycle/lifecycle.type.d.ts +55 -0
  53. package/dist/lifecycle/lifecycle.type.d.ts.map +1 -0
  54. package/dist/lifecycle/lifecycle.type.js +35 -0
  55. package/dist/lifecycle/lifecycle.type.js.map +1 -0
  56. package/dist/messaging/index.d.ts +7 -0
  57. package/dist/messaging/index.d.ts.map +1 -0
  58. package/dist/messaging/index.js +7 -0
  59. package/dist/messaging/index.js.map +1 -0
  60. package/dist/messaging/messageAdapter.type.d.ts +32 -0
  61. package/dist/messaging/messageAdapter.type.d.ts.map +1 -0
  62. package/dist/messaging/messageAdapter.type.js +7 -0
  63. package/dist/messaging/messageAdapter.type.js.map +1 -0
  64. package/dist/metadata/index.d.ts +7 -0
  65. package/dist/metadata/index.d.ts.map +1 -0
  66. package/dist/metadata/index.js +7 -0
  67. package/dist/metadata/index.js.map +1 -0
  68. package/dist/metadata/metadata.type.d.ts +34 -0
  69. package/dist/metadata/metadata.type.d.ts.map +1 -0
  70. package/dist/metadata/metadata.type.js +7 -0
  71. package/dist/metadata/metadata.type.js.map +1 -0
  72. package/dist/queue/index.d.ts +7 -0
  73. package/dist/queue/index.d.ts.map +1 -0
  74. package/dist/queue/index.js +7 -0
  75. package/dist/queue/index.js.map +1 -0
  76. package/dist/queue/queueAdapter.type.d.ts +34 -0
  77. package/dist/queue/queueAdapter.type.d.ts.map +1 -0
  78. package/dist/queue/queueAdapter.type.js +9 -0
  79. package/dist/queue/queueAdapter.type.js.map +1 -0
  80. package/dist/runtime/index.d.ts +7 -0
  81. package/dist/runtime/index.d.ts.map +1 -0
  82. package/dist/runtime/index.js +7 -0
  83. package/dist/runtime/index.js.map +1 -0
  84. package/dist/runtime/runtimeAdapter.type.d.ts +28 -0
  85. package/dist/runtime/runtimeAdapter.type.d.ts.map +1 -0
  86. package/dist/runtime/runtimeAdapter.type.js +9 -0
  87. package/dist/runtime/runtimeAdapter.type.js.map +1 -0
  88. package/dist/scheduler/index.d.ts +7 -0
  89. package/dist/scheduler/index.d.ts.map +1 -0
  90. package/dist/scheduler/index.js +7 -0
  91. package/dist/scheduler/index.js.map +1 -0
  92. package/dist/scheduler/schedulerAdapter.type.d.ts +36 -0
  93. package/dist/scheduler/schedulerAdapter.type.d.ts.map +1 -0
  94. package/dist/scheduler/schedulerAdapter.type.js +7 -0
  95. package/dist/scheduler/schedulerAdapter.type.js.map +1 -0
  96. package/dist/storage/index.d.ts +7 -0
  97. package/dist/storage/index.d.ts.map +1 -0
  98. package/dist/storage/index.js +7 -0
  99. package/dist/storage/index.js.map +1 -0
  100. package/dist/storage/storageAdapter.type.d.ts +24 -0
  101. package/dist/storage/storageAdapter.type.d.ts.map +1 -0
  102. package/dist/storage/storageAdapter.type.js +9 -0
  103. package/dist/storage/storageAdapter.type.js.map +1 -0
  104. package/dist/testing/adapterTesting.helper.d.ts +26 -0
  105. package/dist/testing/adapterTesting.helper.d.ts.map +1 -0
  106. package/dist/testing/adapterTesting.helper.js +55 -0
  107. package/dist/testing/adapterTesting.helper.js.map +1 -0
  108. package/dist/testing/index.d.ts +11 -0
  109. package/dist/testing/index.d.ts.map +1 -0
  110. package/dist/testing/index.js +7 -0
  111. package/dist/testing/index.js.map +1 -0
  112. package/dist/websocket/index.d.ts +7 -0
  113. package/dist/websocket/index.d.ts.map +1 -0
  114. package/dist/websocket/index.js +7 -0
  115. package/dist/websocket/index.js.map +1 -0
  116. package/dist/websocket/websocketAdapter.type.d.ts +38 -0
  117. package/dist/websocket/websocketAdapter.type.d.ts.map +1 -0
  118. package/dist/websocket/websocketAdapter.type.js +16 -0
  119. package/dist/websocket/websocketAdapter.type.js.map +1 -0
  120. package/package.json +54 -0
@@ -0,0 +1,48 @@
1
+ /**
2
+ * @zudojs/adapters/adapter
3
+ *
4
+ * Core adapter contract — the base interface all adapters implement.
5
+ */
6
+ import type { AdapterCapabilities } from "../capabilities/capabilities.type.js";
7
+ import type { AdapterMetadata } from "../metadata/metadata.type.js";
8
+ /**
9
+ * Base adapter interface.
10
+ *
11
+ * Every adapter in the Zudojs ecosystem must implement this contract.
12
+ * Platform-specific adapters extend this with transport-specific methods.
13
+ */
14
+ export interface Adapter {
15
+ /** Unique adapter name. */
16
+ readonly name: string;
17
+ /** Adapter version. */
18
+ readonly version?: string;
19
+ /** Declared capabilities of this adapter. */
20
+ readonly capabilities: AdapterCapabilities;
21
+ /** Adapter metadata. */
22
+ readonly metadata?: AdapterMetadata;
23
+ /**
24
+ * Initializes the adapter.
25
+ *
26
+ * Prepares external resources without starting active processing.
27
+ */
28
+ initialize?(): Promise<void> | void;
29
+ /**
30
+ * Starts the adapter.
31
+ *
32
+ * Begins active processing — listening for requests, consuming messages, etc.
33
+ */
34
+ start?(): Promise<void> | void;
35
+ /**
36
+ * Stops the adapter gracefully.
37
+ *
38
+ * Ceases active processing but does not release resources.
39
+ */
40
+ stop?(): Promise<void> | void;
41
+ /**
42
+ * Disposes the adapter.
43
+ *
44
+ * Releases all resources — connections, file handles, timers, etc.
45
+ */
46
+ dispose?(): Promise<void> | void;
47
+ }
48
+ //# sourceMappingURL=adapter.type.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"adapter.type.d.ts","sourceRoot":"","sources":["../../src/adapter/adapter.type.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,sCAAsC,CAAC;AAChF,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAEpE;;;;;GAKG;AACH,MAAM,WAAW,OAAO;IACtB,2BAA2B;IAC3B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IAEtB,uBAAuB;IACvB,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAE1B,6CAA6C;IAC7C,QAAQ,CAAC,YAAY,EAAE,mBAAmB,CAAC;IAE3C,wBAAwB;IACxB,QAAQ,CAAC,QAAQ,CAAC,EAAE,eAAe,CAAC;IAEpC;;;;OAIG;IACH,UAAU,CAAC,IAAI,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;IAEpC;;;;OAIG;IACH,KAAK,CAAC,IAAI,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;IAE/B;;;;OAIG;IACH,IAAI,CAAC,IAAI,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;IAE9B;;;;OAIG;IACH,OAAO,CAAC,IAAI,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;CAClC"}
@@ -0,0 +1,7 @@
1
+ /**
2
+ * @zudojs/adapters/adapter
3
+ *
4
+ * Core adapter contract — the base interface all adapters implement.
5
+ */
6
+ export {};
7
+ //# sourceMappingURL=adapter.type.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"adapter.type.js","sourceRoot":"","sources":["../../src/adapter/adapter.type.ts"],"names":[],"mappings":"AAAA;;;;GAIG"}
@@ -0,0 +1,8 @@
1
+ /**
2
+ * @zudojs/adapters/adapter
3
+ *
4
+ * Core adapter types and registry.
5
+ */
6
+ export type { Adapter } from "./adapter.type.js";
7
+ export { AdapterRegistry } from "./adapter.registry.js";
8
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/adapter/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,YAAY,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC"}
@@ -0,0 +1,7 @@
1
+ /**
2
+ * @zudojs/adapters/adapter
3
+ *
4
+ * Core adapter types and registry.
5
+ */
6
+ export { AdapterRegistry } from "./adapter.registry.js";
7
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/adapter/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC"}
@@ -0,0 +1,38 @@
1
+ /**
2
+ * @zudojs/adapters/capabilities
3
+ *
4
+ * Adapter capabilities — declares what an adapter supports.
5
+ */
6
+ /**
7
+ * Adapter capabilities.
8
+ *
9
+ * Not every platform supports every feature. Adapters declare their
10
+ * capabilities so runtime code can adapt behavior accordingly.
11
+ */
12
+ export interface AdapterCapabilities {
13
+ /** Supports HTTP request/response handling. */
14
+ readonly http?: boolean;
15
+ /** Supports WebSocket connections. */
16
+ readonly websocket?: boolean;
17
+ /** Supports streaming responses and requests. */
18
+ readonly streaming?: boolean;
19
+ /** Supports file system access. */
20
+ readonly filesystem?: boolean;
21
+ /** Supports raw TCP connections. */
22
+ readonly tcp?: boolean;
23
+ /** Supports UDP datagrams. */
24
+ readonly udp?: boolean;
25
+ /** Supports background task execution. */
26
+ readonly backgroundTasks?: boolean;
27
+ /** Supports long-running server processes. */
28
+ readonly longRunning?: boolean;
29
+ /** Runs on an edge runtime (Cloudflare, Vercel Edge, etc.). */
30
+ readonly edgeRuntime?: boolean;
31
+ /** Runs in a serverless environment (Lambda, etc.). */
32
+ readonly serverless?: boolean;
33
+ /** Supports graceful shutdown. */
34
+ readonly gracefulShutdown?: boolean;
35
+ /** Supports request cancellation via AbortSignal. */
36
+ readonly abortSignal?: boolean;
37
+ }
38
+ //# sourceMappingURL=capabilities.type.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"capabilities.type.d.ts","sourceRoot":"","sources":["../../src/capabilities/capabilities.type.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;;;;GAKG;AACH,MAAM,WAAW,mBAAmB;IAClC,+CAA+C;IAC/C,QAAQ,CAAC,IAAI,CAAC,EAAE,OAAO,CAAC;IAExB,sCAAsC;IACtC,QAAQ,CAAC,SAAS,CAAC,EAAE,OAAO,CAAC;IAE7B,iDAAiD;IACjD,QAAQ,CAAC,SAAS,CAAC,EAAE,OAAO,CAAC;IAE7B,mCAAmC;IACnC,QAAQ,CAAC,UAAU,CAAC,EAAE,OAAO,CAAC;IAE9B,oCAAoC;IACpC,QAAQ,CAAC,GAAG,CAAC,EAAE,OAAO,CAAC;IAEvB,8BAA8B;IAC9B,QAAQ,CAAC,GAAG,CAAC,EAAE,OAAO,CAAC;IAEvB,0CAA0C;IAC1C,QAAQ,CAAC,eAAe,CAAC,EAAE,OAAO,CAAC;IAEnC,8CAA8C;IAC9C,QAAQ,CAAC,WAAW,CAAC,EAAE,OAAO,CAAC;IAE/B,+DAA+D;IAC/D,QAAQ,CAAC,WAAW,CAAC,EAAE,OAAO,CAAC;IAE/B,uDAAuD;IACvD,QAAQ,CAAC,UAAU,CAAC,EAAE,OAAO,CAAC;IAE9B,kCAAkC;IAClC,QAAQ,CAAC,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAEpC,qDAAqD;IACrD,QAAQ,CAAC,WAAW,CAAC,EAAE,OAAO,CAAC;CAChC"}
@@ -0,0 +1,7 @@
1
+ /**
2
+ * @zudojs/adapters/capabilities
3
+ *
4
+ * Adapter capabilities — declares what an adapter supports.
5
+ */
6
+ export {};
7
+ //# sourceMappingURL=capabilities.type.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"capabilities.type.js","sourceRoot":"","sources":["../../src/capabilities/capabilities.type.ts"],"names":[],"mappings":"AAAA;;;;GAIG"}
@@ -0,0 +1,7 @@
1
+ /**
2
+ * @zudojs/adapters/capabilities
3
+ *
4
+ * Adapter capabilities types.
5
+ */
6
+ export type { AdapterCapabilities } from "./capabilities.type.js";
7
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/capabilities/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,YAAY,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC"}
@@ -0,0 +1,7 @@
1
+ /**
2
+ * @zudojs/adapters/capabilities
3
+ *
4
+ * Adapter capabilities types.
5
+ */
6
+ export {};
7
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/capabilities/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG"}
@@ -0,0 +1,31 @@
1
+ /**
2
+ * @zudojs/adapters/cli
3
+ *
4
+ * CLI adapter contracts — bridges Zudojs to command-line interfaces.
5
+ */
6
+ import type { Adapter } from "../index.js";
7
+ /**
8
+ * CLI adapter — manages command-line interface interactions.
9
+ */
10
+ export interface CLIAdapter extends Adapter {
11
+ /** Runs a CLI command. */
12
+ run(command: string, args?: readonly string[], options?: CLIOptions): Promise<CLIResult>;
13
+ }
14
+ /**
15
+ * CLI execution options.
16
+ */
17
+ export interface CLIOptions {
18
+ readonly cwd?: string;
19
+ readonly env?: Readonly<Record<string, string>>;
20
+ readonly stdin?: string;
21
+ readonly timeout?: number;
22
+ }
23
+ /**
24
+ * CLI execution result.
25
+ */
26
+ export interface CLIResult {
27
+ readonly exitCode: number;
28
+ readonly stdout: string;
29
+ readonly stderr: string;
30
+ }
31
+ //# sourceMappingURL=cliAdapter.type.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cliAdapter.type.d.ts","sourceRoot":"","sources":["../../src/cli/cliAdapter.type.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAuB,MAAM,aAAa,CAAC;AAEhE;;GAEG;AACH,MAAM,WAAW,UAAW,SAAQ,OAAO;IACzC,0BAA0B;IAC1B,GAAG,CACD,OAAO,EAAE,MAAM,EACf,IAAI,CAAC,EAAE,SAAS,MAAM,EAAE,EACxB,OAAO,CAAC,EAAE,UAAU,GACnB,OAAO,CAAC,SAAS,CAAC,CAAC;CACvB;AAED;;GAEG;AACH,MAAM,WAAW,UAAU;IACzB,QAAQ,CAAC,GAAG,CAAC,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,GAAG,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;IAChD,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;CAC3B;AAED;;GAEG;AACH,MAAM,WAAW,SAAS;IACxB,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;CACzB"}
@@ -0,0 +1,7 @@
1
+ /**
2
+ * @zudojs/adapters/cli
3
+ *
4
+ * CLI adapter contracts — bridges Zudojs to command-line interfaces.
5
+ */
6
+ export {};
7
+ //# sourceMappingURL=cliAdapter.type.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cliAdapter.type.js","sourceRoot":"","sources":["../../src/cli/cliAdapter.type.ts"],"names":[],"mappings":"AAAA;;;;GAIG"}
@@ -0,0 +1,7 @@
1
+ /**
2
+ * @zudojs/adapters/cli
3
+ *
4
+ * CLI adapter contracts.
5
+ */
6
+ export type { CLIAdapter, CLIOptions, CLIResult } from "./cliAdapter.type.js";
7
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/cli/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,YAAY,EAAE,UAAU,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC"}
@@ -0,0 +1,7 @@
1
+ /**
2
+ * @zudojs/adapters/cli
3
+ *
4
+ * CLI adapter contracts.
5
+ */
6
+ export {};
7
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/cli/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG"}
@@ -0,0 +1,8 @@
1
+ /**
2
+ * @zudojs/adapters/errors
3
+ *
4
+ * Adapter error types — re-exported from @zudojs/errors.
5
+ */
6
+ export { AdapterError, AdapterNotFoundError, AdapterAlreadyRegisteredError, AdapterNotSupportedError, AdapterCapabilityMissingError, AdapterConnectionError, AdapterOperationError, AdapterTimeoutError, AdapterDisposeError, AdapterInitializationError, AdapterConfigurationError, createAdapterError, isAdapterError, } from "@zudojs/errors";
7
+ export type { AdapterErrorOptions } from "@zudojs/errors";
8
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/errors/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EACL,YAAY,EACZ,oBAAoB,EACpB,6BAA6B,EAC7B,wBAAwB,EACxB,6BAA6B,EAC7B,sBAAsB,EACtB,qBAAqB,EACrB,mBAAmB,EACnB,mBAAmB,EACnB,0BAA0B,EAC1B,yBAAyB,EACzB,kBAAkB,EAClB,cAAc,GACf,MAAM,gBAAgB,CAAC;AAExB,YAAY,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC"}
@@ -0,0 +1,7 @@
1
+ /**
2
+ * @zudojs/adapters/errors
3
+ *
4
+ * Adapter error types — re-exported from @zudojs/errors.
5
+ */
6
+ export { AdapterError, AdapterNotFoundError, AdapterAlreadyRegisteredError, AdapterNotSupportedError, AdapterCapabilityMissingError, AdapterConnectionError, AdapterOperationError, AdapterTimeoutError, AdapterDisposeError, AdapterInitializationError, AdapterConfigurationError, createAdapterError, isAdapterError, } from "@zudojs/errors";
7
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/errors/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EACL,YAAY,EACZ,oBAAoB,EACpB,6BAA6B,EAC7B,wBAAwB,EACxB,6BAA6B,EAC7B,sBAAsB,EACtB,qBAAqB,EACrB,mBAAmB,EACnB,mBAAmB,EACnB,0BAA0B,EAC1B,yBAAyB,EACzB,kBAAkB,EAClB,cAAc,GACf,MAAM,gBAAgB,CAAC"}
@@ -0,0 +1,85 @@
1
+ /**
2
+ * @zudojs/adapters/http
3
+ *
4
+ * HTTP adapter contracts — request/response translation and server lifecycle.
5
+ */
6
+ import type { Adapter, AdapterCapabilities } from "../index.js";
7
+ /**
8
+ * Minimal HTTP request shape.
9
+ *
10
+ * Concrete adapters map platform-specific requests to this shape.
11
+ * The actual Zudojs HTTPRequest lives in @zudojs/http.
12
+ */
13
+ export interface HTTPRequestLike {
14
+ readonly method: string;
15
+ readonly url: string;
16
+ readonly path: string;
17
+ readonly headers: Readonly<Record<string, string>>;
18
+ readonly query: Readonly<Record<string, unknown>>;
19
+ readonly params: Readonly<Record<string, string>>;
20
+ readonly body?: unknown;
21
+ readonly rawBody?: Uint8Array;
22
+ readonly protocol: string;
23
+ readonly hostname: string;
24
+ readonly ip?: string;
25
+ readonly secure: boolean;
26
+ readonly aborted: boolean;
27
+ }
28
+ /**
29
+ * Minimal HTTP response shape.
30
+ */
31
+ export interface HTTPResponseLike {
32
+ readonly status: number;
33
+ readonly headers: Readonly<Record<string, string>>;
34
+ readonly body?: unknown;
35
+ }
36
+ /**
37
+ * HTTP adapter — translates platform HTTP requests/responses.
38
+ */
39
+ export interface HTTPAdapter extends Adapter {
40
+ /** Creates a normalized request from platform-specific input. */
41
+ createRequest(input: unknown): HTTPRequestLike;
42
+ /** Creates a normalized response from platform-specific output. */
43
+ createResponse(input?: unknown): HTTPResponseLike;
44
+ /** Handles an incoming platform request. */
45
+ handle(input: unknown): Promise<void>;
46
+ /** Starts the HTTP server/listener. */
47
+ listen?(options?: HTTPListenOptions): Promise<void>;
48
+ /** Stops the HTTP server/listener. */
49
+ close?(): Promise<void>;
50
+ }
51
+ /**
52
+ * Options for listening on an HTTP adapter.
53
+ */
54
+ export interface HTTPListenOptions {
55
+ /** Hostname to bind to. */
56
+ readonly host?: string;
57
+ /** Port to bind to. */
58
+ readonly port?: number;
59
+ /** TLS configuration. */
60
+ readonly tls?: unknown;
61
+ }
62
+ /**
63
+ * Request adapter — translates a single platform request.
64
+ */
65
+ export interface HTTPRequestAdapter {
66
+ readonly name: string;
67
+ readonly capabilities: AdapterCapabilities;
68
+ adaptRequest(input: unknown): HTTPRequestLike;
69
+ }
70
+ /**
71
+ * Response adapter — translates a Zudojs response to platform output.
72
+ */
73
+ export interface HTTPResponseAdapter {
74
+ readonly name: string;
75
+ readonly capabilities: AdapterCapabilities;
76
+ adaptResponse(response: HTTPResponseLike, target: unknown): Promise<void> | void;
77
+ }
78
+ /**
79
+ * Server adapter — manages HTTP server lifecycle.
80
+ */
81
+ export interface HTTPServerAdapter extends Adapter {
82
+ listen(options?: HTTPListenOptions): Promise<void>;
83
+ close(): Promise<void>;
84
+ }
85
+ //# sourceMappingURL=httpAdapter.type.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"httpAdapter.type.d.ts","sourceRoot":"","sources":["../../src/http/httpAdapter.type.ts"],"names":[],"mappings":"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"}
@@ -0,0 +1,7 @@
1
+ /**
2
+ * @zudojs/adapters/http
3
+ *
4
+ * HTTP adapter contracts — request/response translation and server lifecycle.
5
+ */
6
+ export {};
7
+ //# sourceMappingURL=httpAdapter.type.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"httpAdapter.type.js","sourceRoot":"","sources":["../../src/http/httpAdapter.type.ts"],"names":[],"mappings":"AAAA;;;;GAIG"}
@@ -0,0 +1,7 @@
1
+ /**
2
+ * @zudojs/adapters/http
3
+ *
4
+ * HTTP adapter contracts.
5
+ */
6
+ export type { HTTPRequestLike, HTTPResponseLike, HTTPAdapter, HTTPListenOptions, HTTPRequestAdapter, HTTPResponseAdapter, HTTPServerAdapter, } from "./httpAdapter.type.js";
7
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/http/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,YAAY,EACV,eAAe,EACf,gBAAgB,EAChB,WAAW,EACX,iBAAiB,EACjB,kBAAkB,EAClB,mBAAmB,EACnB,iBAAiB,GAClB,MAAM,uBAAuB,CAAC"}
@@ -0,0 +1,7 @@
1
+ /**
2
+ * @zudojs/adapters/http
3
+ *
4
+ * HTTP adapter contracts.
5
+ */
6
+ export {};
7
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/http/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG"}
@@ -0,0 +1,38 @@
1
+ /**
2
+ * @zudojs/adapters
3
+ *
4
+ * Boundary layer between Zudojs and external platforms.
5
+ *
6
+ * Provides:
7
+ * - Adapter contracts and base interface
8
+ * - Adapter registry
9
+ * - Capability system
10
+ * - Adapter metadata
11
+ * - Lifecycle contracts
12
+ * - Transport-specific adapter interfaces (HTTP, messaging, storage, queue, runtime, WebSocket, CLI, scheduler)
13
+ * - Error types (re-exported from @zudojs/errors)
14
+ * - Testing utilities
15
+ *
16
+ * @module @zudojs/adapters
17
+ */
18
+ export type { Adapter } from "./adapter/index.js";
19
+ export { AdapterRegistry } from "./adapter/index.js";
20
+ export type { AdapterCapabilities } from "./capabilities/index.js";
21
+ export type { AdapterMetadata } from "./metadata/index.js";
22
+ export type { AdapterHealthStatus, AdapterHealth, AdapterOperationOptions, LifecycleAdapter, } from "./lifecycle/index.js";
23
+ export { createHealthyHealth, createDegradedHealth, createUnhealthyHealth, } from "./lifecycle/index.js";
24
+ export { AdapterError, AdapterNotFoundError, AdapterAlreadyRegisteredError, AdapterNotSupportedError, AdapterCapabilityMissingError, AdapterConnectionError, AdapterOperationError, AdapterTimeoutError, AdapterDisposeError, AdapterInitializationError, AdapterConfigurationError, createAdapterError, isAdapterError, } from "./errors/index.js";
25
+ export type { AdapterErrorOptions } from "./errors/index.js";
26
+ export type { HTTPRequestLike, HTTPResponseLike, HTTPAdapter, HTTPListenOptions, HTTPRequestAdapter, HTTPResponseAdapter, HTTPServerAdapter, } from "./http/index.js";
27
+ export type { MessageAdapter, MessageHandler, Subscription, } from "./messaging/index.js";
28
+ export type { StorageAdapter } from "./storage/index.js";
29
+ export type { QueueAdapter, QueueStats } from "./queue/index.js";
30
+ export type { RuntimeAdapter } from "./runtime/index.js";
31
+ export type { WebSocketAdapter, WebSocketSession, WebSocketReadyState, } from "./websocket/index.js";
32
+ export type { CLIAdapter, CLIOptions, CLIResult } from "./cli/index.js";
33
+ export type { SchedulerAdapter, ScheduledTask, ScheduledJob, } from "./scheduler/index.js";
34
+ export type { Adapter as MockAdapter } from "./testing/index.js";
35
+ export type { AdapterHealth as MockAdapterHealth } from "./testing/index.js";
36
+ export type { AdapterRegistry as MockAdapterRegistry } from "./testing/index.js";
37
+ export { createMockAdapter, createMockAdapterRegistry, createMockHealth, } from "./testing/index.js";
38
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAGH,YAAY,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAGrD,YAAY,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAGnE,YAAY,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAG3D,YAAY,EACV,mBAAmB,EACnB,aAAa,EACb,uBAAuB,EACvB,gBAAgB,GACjB,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EACL,mBAAmB,EACnB,oBAAoB,EACpB,qBAAqB,GACtB,MAAM,sBAAsB,CAAC;AAG9B,OAAO,EACL,YAAY,EACZ,oBAAoB,EACpB,6BAA6B,EAC7B,wBAAwB,EACxB,6BAA6B,EAC7B,sBAAsB,EACtB,qBAAqB,EACrB,mBAAmB,EACnB,mBAAmB,EACnB,0BAA0B,EAC1B,yBAAyB,EACzB,kBAAkB,EAClB,cAAc,GACf,MAAM,mBAAmB,CAAC;AAE3B,YAAY,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAG7D,YAAY,EACV,eAAe,EACf,gBAAgB,EAChB,WAAW,EACX,iBAAiB,EACjB,kBAAkB,EAClB,mBAAmB,EACnB,iBAAiB,GAClB,MAAM,iBAAiB,CAAC;AAGzB,YAAY,EACV,cAAc,EACd,cAAc,EACd,YAAY,GACb,MAAM,sBAAsB,CAAC;AAG9B,YAAY,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAGzD,YAAY,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAGjE,YAAY,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAGzD,YAAY,EACV,gBAAgB,EAChB,gBAAgB,EAChB,mBAAmB,GACpB,MAAM,sBAAsB,CAAC;AAG9B,YAAY,EAAE,UAAU,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAGxE,YAAY,EACV,gBAAgB,EAChB,aAAa,EACb,YAAY,GACb,MAAM,sBAAsB,CAAC;AAG9B,YAAY,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACjE,YAAY,EAAE,aAAa,IAAI,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAC7E,YAAY,EAAE,eAAe,IAAI,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAEjF,OAAO,EACL,iBAAiB,EACjB,yBAAyB,EACzB,gBAAgB,GACjB,MAAM,oBAAoB,CAAC"}
package/dist/index.js ADDED
@@ -0,0 +1,23 @@
1
+ /**
2
+ * @zudojs/adapters
3
+ *
4
+ * Boundary layer between Zudojs and external platforms.
5
+ *
6
+ * Provides:
7
+ * - Adapter contracts and base interface
8
+ * - Adapter registry
9
+ * - Capability system
10
+ * - Adapter metadata
11
+ * - Lifecycle contracts
12
+ * - Transport-specific adapter interfaces (HTTP, messaging, storage, queue, runtime, WebSocket, CLI, scheduler)
13
+ * - Error types (re-exported from @zudojs/errors)
14
+ * - Testing utilities
15
+ *
16
+ * @module @zudojs/adapters
17
+ */
18
+ export { AdapterRegistry } from "./adapter/index.js";
19
+ export { createHealthyHealth, createDegradedHealth, createUnhealthyHealth, } from "./lifecycle/index.js";
20
+ // Errors
21
+ export { AdapterError, AdapterNotFoundError, AdapterAlreadyRegisteredError, AdapterNotSupportedError, AdapterCapabilityMissingError, AdapterConnectionError, AdapterOperationError, AdapterTimeoutError, AdapterDisposeError, AdapterInitializationError, AdapterConfigurationError, createAdapterError, isAdapterError, } from "./errors/index.js";
22
+ export { createMockAdapter, createMockAdapterRegistry, createMockHealth, } from "./testing/index.js";
23
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAIH,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAgBrD,OAAO,EACL,mBAAmB,EACnB,oBAAoB,EACpB,qBAAqB,GACtB,MAAM,sBAAsB,CAAC;AAE9B,SAAS;AACT,OAAO,EACL,YAAY,EACZ,oBAAoB,EACpB,6BAA6B,EAC7B,wBAAwB,EACxB,6BAA6B,EAC7B,sBAAsB,EACtB,qBAAqB,EACrB,mBAAmB,EACnB,mBAAmB,EACnB,0BAA0B,EAC1B,yBAAyB,EACzB,kBAAkB,EAClB,cAAc,GACf,MAAM,mBAAmB,CAAC;AAqD3B,OAAO,EACL,iBAAiB,EACjB,yBAAyB,EACzB,gBAAgB,GACjB,MAAM,oBAAoB,CAAC"}
@@ -0,0 +1,8 @@
1
+ /**
2
+ * @zudojs/adapters/lifecycle
3
+ *
4
+ * Adapter lifecycle contracts.
5
+ */
6
+ export type { AdapterHealthStatus, AdapterHealth, AdapterOperationOptions, LifecycleAdapter, } from "./lifecycle.type.js";
7
+ export { createHealthyHealth, createDegradedHealth, createUnhealthyHealth, } from "./lifecycle.type.js";
8
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/lifecycle/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,YAAY,EACV,mBAAmB,EACnB,aAAa,EACb,uBAAuB,EACvB,gBAAgB,GACjB,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EACL,mBAAmB,EACnB,oBAAoB,EACpB,qBAAqB,GACtB,MAAM,qBAAqB,CAAC"}
@@ -0,0 +1,7 @@
1
+ /**
2
+ * @zudojs/adapters/lifecycle
3
+ *
4
+ * Adapter lifecycle contracts.
5
+ */
6
+ export { createHealthyHealth, createDegradedHealth, createUnhealthyHealth, } from "./lifecycle.type.js";
7
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/lifecycle/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AASH,OAAO,EACL,mBAAmB,EACnB,oBAAoB,EACpB,qBAAqB,GACtB,MAAM,qBAAqB,CAAC"}
@@ -0,0 +1,55 @@
1
+ /**
2
+ * @zudojs/adapters/lifecycle
3
+ *
4
+ * Adapter lifecycle contracts — health, operation options, and lifecycle hooks.
5
+ */
6
+ import type { Adapter } from "../adapter/adapter.type.js";
7
+ /**
8
+ * Adapter health status.
9
+ */
10
+ export type AdapterHealthStatus = "healthy" | "degraded" | "unhealthy";
11
+ /**
12
+ * Adapter health report.
13
+ */
14
+ export interface AdapterHealth {
15
+ readonly status: AdapterHealthStatus;
16
+ readonly message?: string;
17
+ readonly timestamp: number;
18
+ readonly details?: Readonly<Record<string, unknown>>;
19
+ }
20
+ /**
21
+ * Options for adapter operations.
22
+ */
23
+ export interface AdapterOperationOptions {
24
+ /** Abort signal for cancellation. */
25
+ readonly signal?: AbortSignal;
26
+ /** Timeout in milliseconds. */
27
+ readonly timeout?: number;
28
+ /** Retry configuration. */
29
+ readonly retry?: {
30
+ readonly attempts: number;
31
+ readonly delay?: number;
32
+ };
33
+ }
34
+ /**
35
+ * Extended adapter with lifecycle hooks.
36
+ */
37
+ export interface LifecycleAdapter extends Adapter {
38
+ /** Configure the adapter with options. */
39
+ configure?(options: unknown): Promise<void> | void;
40
+ /** Check adapter health. */
41
+ health?(): Promise<AdapterHealth> | AdapterHealth;
42
+ }
43
+ /**
44
+ * Creates a default healthy health report.
45
+ */
46
+ export declare function createHealthyHealth(): AdapterHealth;
47
+ /**
48
+ * Creates a degraded health report.
49
+ */
50
+ export declare function createDegradedHealth(message: string): AdapterHealth;
51
+ /**
52
+ * Creates an unhealthy health report.
53
+ */
54
+ export declare function createUnhealthyHealth(message: string): AdapterHealth;
55
+ //# sourceMappingURL=lifecycle.type.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"lifecycle.type.d.ts","sourceRoot":"","sources":["../../src/lifecycle/lifecycle.type.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAC;AAE1D;;GAEG;AACH,MAAM,MAAM,mBAAmB,GAAG,SAAS,GAAG,UAAU,GAAG,WAAW,CAAC;AAEvE;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B,QAAQ,CAAC,MAAM,EAAE,mBAAmB,CAAC;IACrC,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,OAAO,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;CACtD;AAED;;GAEG;AACH,MAAM,WAAW,uBAAuB;IACtC,qCAAqC;IACrC,QAAQ,CAAC,MAAM,CAAC,EAAE,WAAW,CAAC;IAE9B,+BAA+B;IAC/B,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAE1B,2BAA2B;IAC3B,QAAQ,CAAC,KAAK,CAAC,EAAE;QACf,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;QAC1B,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;KACzB,CAAC;CACH;AAED;;GAEG;AACH,MAAM,WAAW,gBAAiB,SAAQ,OAAO;IAC/C,0CAA0C;IAC1C,SAAS,CAAC,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;IAEnD,4BAA4B;IAC5B,MAAM,CAAC,IAAI,OAAO,CAAC,aAAa,CAAC,GAAG,aAAa,CAAC;CACnD;AAED;;GAEG;AACH,wBAAgB,mBAAmB,IAAI,aAAa,CAKnD;AAED;;GAEG;AACH,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,MAAM,GAAG,aAAa,CAMnE;AAED;;GAEG;AACH,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,MAAM,GAAG,aAAa,CAMpE"}
@@ -0,0 +1,35 @@
1
+ /**
2
+ * @zudojs/adapters/lifecycle
3
+ *
4
+ * Adapter lifecycle contracts — health, operation options, and lifecycle hooks.
5
+ */
6
+ /**
7
+ * Creates a default healthy health report.
8
+ */
9
+ export function createHealthyHealth() {
10
+ return {
11
+ status: "healthy",
12
+ timestamp: Date.now(),
13
+ };
14
+ }
15
+ /**
16
+ * Creates a degraded health report.
17
+ */
18
+ export function createDegradedHealth(message) {
19
+ return {
20
+ status: "degraded",
21
+ message,
22
+ timestamp: Date.now(),
23
+ };
24
+ }
25
+ /**
26
+ * Creates an unhealthy health report.
27
+ */
28
+ export function createUnhealthyHealth(message) {
29
+ return {
30
+ status: "unhealthy",
31
+ message,
32
+ timestamp: Date.now(),
33
+ };
34
+ }
35
+ //# sourceMappingURL=lifecycle.type.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"lifecycle.type.js","sourceRoot":"","sources":["../../src/lifecycle/lifecycle.type.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AA+CH;;GAEG;AACH,MAAM,UAAU,mBAAmB;IACjC,OAAO;QACL,MAAM,EAAE,SAAS;QACjB,SAAS,EAAE,IAAI,CAAC,GAAG,EAAE;KACtB,CAAC;AACJ,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,oBAAoB,CAAC,OAAe;IAClD,OAAO;QACL,MAAM,EAAE,UAAU;QAClB,OAAO;QACP,SAAS,EAAE,IAAI,CAAC,GAAG,EAAE;KACtB,CAAC;AACJ,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,qBAAqB,CAAC,OAAe;IACnD,OAAO;QACL,MAAM,EAAE,WAAW;QACnB,OAAO;QACP,SAAS,EAAE,IAAI,CAAC,GAAG,EAAE;KACtB,CAAC;AACJ,CAAC"}
@@ -0,0 +1,7 @@
1
+ /**
2
+ * @zudojs/adapters/messaging
3
+ *
4
+ * Messaging adapter contracts.
5
+ */
6
+ export type { MessageAdapter, MessageHandler, Subscription, } from "./messageAdapter.type.js";
7
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/messaging/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,YAAY,EACV,cAAc,EACd,cAAc,EACd,YAAY,GACb,MAAM,0BAA0B,CAAC"}
@@ -0,0 +1,7 @@
1
+ /**
2
+ * @zudojs/adapters/messaging
3
+ *
4
+ * Messaging adapter contracts.
5
+ */
6
+ export {};
7
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/messaging/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG"}