@sera4/essentia 1.1.66-rc.1 → 3.0.6

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 (194) hide show
  1. package/README.md +352 -8
  2. package/dist/ts/index.d.ts +1 -2
  3. package/dist/ts/index.js +1 -3
  4. package/dist/ts/index.js.map +1 -1
  5. package/dist/ts/logger/s4-logger.js +0 -2
  6. package/dist/ts/logger/s4-logger.js.map +1 -1
  7. package/dist/ts/queue/index.d.ts +2 -38
  8. package/dist/ts/queue/index.js +67 -136
  9. package/dist/ts/queue/index.js.map +1 -1
  10. package/package.json +51 -12
  11. package/package.tar.gz +0 -0
  12. package/cache/index.js +0 -188
  13. package/constants/index.js +0 -9
  14. package/coverage/base.css +0 -224
  15. package/coverage/block-navigation.js +0 -87
  16. package/coverage/configurations/index.html +0 -116
  17. package/coverage/configurations/server-config.ts.html +0 -94
  18. package/coverage/dns/DnsCache.ts.html +0 -598
  19. package/coverage/dns/index.html +0 -131
  20. package/coverage/dns/index.ts.html +0 -94
  21. package/coverage/favicon.png +0 -0
  22. package/coverage/health/index.html +0 -116
  23. package/coverage/health/index.ts.html +0 -778
  24. package/coverage/index.html +0 -161
  25. package/coverage/lcov-report/base.css +0 -224
  26. package/coverage/lcov-report/block-navigation.js +0 -87
  27. package/coverage/lcov-report/configurations/index.html +0 -116
  28. package/coverage/lcov-report/configurations/server-config.ts.html +0 -94
  29. package/coverage/lcov-report/dns/DnsCache.ts.html +0 -598
  30. package/coverage/lcov-report/dns/index.html +0 -131
  31. package/coverage/lcov-report/dns/index.ts.html +0 -94
  32. package/coverage/lcov-report/favicon.png +0 -0
  33. package/coverage/lcov-report/health/index.html +0 -116
  34. package/coverage/lcov-report/health/index.ts.html +0 -778
  35. package/coverage/lcov-report/index.html +0 -161
  36. package/coverage/lcov-report/logger/index.html +0 -131
  37. package/coverage/lcov-report/logger/index.ts.html +0 -94
  38. package/coverage/lcov-report/logger/s4-logger.ts.html +0 -514
  39. package/coverage/lcov-report/prettify.css +0 -1
  40. package/coverage/lcov-report/prettify.js +0 -2
  41. package/coverage/lcov-report/sort-arrow-sprite.png +0 -0
  42. package/coverage/lcov-report/sorter.js +0 -196
  43. package/coverage/lcov.info +0 -747
  44. package/coverage/logger/index.html +0 -131
  45. package/coverage/logger/index.ts.html +0 -94
  46. package/coverage/logger/s4-logger.ts.html +0 -514
  47. package/coverage/prettify.css +0 -1
  48. package/coverage/prettify.js +0 -2
  49. package/coverage/sort-arrow-sprite.png +0 -0
  50. package/coverage/sorter.js +0 -196
  51. package/coverage/tmp/coverage-24302-1746472691313-0.json +0 -1
  52. package/coverage/tmp/coverage-24302-1746472691366-1.json +0 -1
  53. package/dist/cache/index.d.ts +0 -22
  54. package/dist/cache/index.js +0 -166
  55. package/dist/cache/index.js.map +0 -1
  56. package/dist/constants/index.d.ts +0 -6
  57. package/dist/constants/index.js +0 -9
  58. package/dist/constants/index.js.map +0 -1
  59. package/dist/coverage/block-navigation.d.ts +0 -1
  60. package/dist/coverage/block-navigation.js +0 -70
  61. package/dist/coverage/block-navigation.js.map +0 -1
  62. package/dist/coverage/lcov-report/block-navigation.d.ts +0 -1
  63. package/dist/coverage/lcov-report/block-navigation.js +0 -70
  64. package/dist/coverage/lcov-report/block-navigation.js.map +0 -1
  65. package/dist/coverage/lcov-report/prettify.d.ts +0 -0
  66. package/dist/coverage/lcov-report/prettify.js +0 -477
  67. package/dist/coverage/lcov-report/prettify.js.map +0 -1
  68. package/dist/coverage/lcov-report/sorter.d.ts +0 -1
  69. package/dist/coverage/lcov-report/sorter.js +0 -163
  70. package/dist/coverage/lcov-report/sorter.js.map +0 -1
  71. package/dist/coverage/prettify.d.ts +0 -0
  72. package/dist/coverage/prettify.js +0 -477
  73. package/dist/coverage/prettify.js.map +0 -1
  74. package/dist/coverage/sorter.d.ts +0 -1
  75. package/dist/coverage/sorter.js +0 -163
  76. package/dist/coverage/sorter.js.map +0 -1
  77. package/dist/formatter/index.d.ts +0 -37
  78. package/dist/formatter/index.js +0 -75
  79. package/dist/formatter/index.js.map +0 -1
  80. package/dist/hal/index.d.ts +0 -5
  81. package/dist/hal/index.js +0 -69
  82. package/dist/hal/index.js.map +0 -1
  83. package/dist/health/health-logger.d.ts +0 -9
  84. package/dist/health/health-logger.js +0 -34
  85. package/dist/health/health-logger.js.map +0 -1
  86. package/dist/health/index.d.ts +0 -19
  87. package/dist/health/index.js +0 -175
  88. package/dist/health/index.js.map +0 -1
  89. package/dist/helpers/index.d.ts +0 -1
  90. package/dist/helpers/index.js +0 -2
  91. package/dist/helpers/index.js.map +0 -1
  92. package/dist/helpers/test-server-wrapper.d.ts +0 -120
  93. package/dist/helpers/test-server-wrapper.js +0 -165
  94. package/dist/helpers/test-server-wrapper.js.map +0 -1
  95. package/dist/index.d.ts +0 -1
  96. package/dist/index.js +0 -17
  97. package/dist/index.js.map +0 -1
  98. package/dist/last-commit.d.ts +0 -1
  99. package/dist/last-commit.js +0 -12
  100. package/dist/last-commit.js.map +0 -1
  101. package/dist/last_commit/index.d.ts +0 -7
  102. package/dist/last_commit/index.js +0 -83
  103. package/dist/last_commit/index.js.map +0 -1
  104. package/dist/paginator/s4-pagination.d.ts +0 -9
  105. package/dist/paginator/s4-pagination.js +0 -49
  106. package/dist/paginator/s4-pagination.js.map +0 -1
  107. package/dist/paginator/sql-pagination.d.ts +0 -27
  108. package/dist/paginator/sql-pagination.js +0 -166
  109. package/dist/paginator/sql-pagination.js.map +0 -1
  110. package/dist/paper-trail/helpers.d.ts +0 -11
  111. package/dist/paper-trail/helpers.js +0 -74
  112. package/dist/paper-trail/helpers.js.map +0 -1
  113. package/dist/paper-trail/index.d.ts +0 -13
  114. package/dist/paper-trail/index.js +0 -662
  115. package/dist/paper-trail/index.js.map +0 -1
  116. package/dist/prompts/index.d.ts +0 -14
  117. package/dist/prompts/index.js +0 -63
  118. package/dist/prompts/index.js.map +0 -1
  119. package/dist/queue/index.d.ts +0 -166
  120. package/dist/queue/index.js +0 -371
  121. package/dist/queue/index.js.map +0 -1
  122. package/dist/queue/publisher.d.ts +0 -31
  123. package/dist/queue/publisher.js +0 -84
  124. package/dist/queue/publisher.js.map +0 -1
  125. package/dist/queue/queue-logger.d.ts +0 -9
  126. package/dist/queue/queue-logger.js +0 -35
  127. package/dist/queue/queue-logger.js.map +0 -1
  128. package/dist/queue/subscriber.d.ts +0 -39
  129. package/dist/queue/subscriber.js +0 -97
  130. package/dist/queue/subscriber.js.map +0 -1
  131. package/dist/safe_proxy/index.d.ts +0 -13
  132. package/dist/safe_proxy/index.js +0 -54
  133. package/dist/safe_proxy/index.js.map +0 -1
  134. package/dist/serializer/index.d.ts +0 -5
  135. package/dist/serializer/index.js +0 -83
  136. package/dist/serializer/index.js.map +0 -1
  137. package/dist/test/debug-array.d.ts +0 -0
  138. package/dist/test/debug-array.js +0 -1
  139. package/dist/test/debug-array.js.map +0 -1
  140. package/dist/test/debug-setJSONB.d.ts +0 -0
  141. package/dist/test/debug-setJSONB.js +0 -1
  142. package/dist/test/debug-setJSONB.js.map +0 -1
  143. package/dist/test/prompt.test.d.ts +0 -1
  144. package/dist/test/prompt.test.js +0 -74
  145. package/dist/test/prompt.test.js.map +0 -1
  146. package/dist/test/s4-formatter.spec.d.ts +0 -1
  147. package/dist/test/s4-formatter.spec.js +0 -67
  148. package/dist/test/s4-formatter.spec.js.map +0 -1
  149. package/dist/test/s4-pagination.spec.d.ts +0 -1
  150. package/dist/test/s4-pagination.spec.js +0 -170
  151. package/dist/test/s4-pagination.spec.js.map +0 -1
  152. package/dist/test/safe-proxy.spec.d.ts +0 -1
  153. package/dist/test/safe-proxy.spec.js +0 -252
  154. package/dist/test/safe-proxy.spec.js.map +0 -1
  155. package/dist/test/serializer.spec.d.ts +0 -1
  156. package/dist/test/serializer.spec.js +0 -27
  157. package/dist/test/serializer.spec.js.map +0 -1
  158. package/dist/test/utils.spec.d.ts +0 -1
  159. package/dist/test/utils.spec.js +0 -446
  160. package/dist/test/utils.spec.js.map +0 -1
  161. package/dist/ts/task-scheduler/index.d.ts +0 -130
  162. package/dist/ts/task-scheduler/index.js +0 -259
  163. package/dist/ts/task-scheduler/index.js.map +0 -1
  164. package/formatter/index.js +0 -81
  165. package/hal/README.md +0 -54
  166. package/hal/index.js +0 -75
  167. package/health/health-logger.js +0 -40
  168. package/health/index.js +0 -188
  169. package/helpers/index.js +0 -1
  170. package/helpers/test-server-wrapper.js +0 -196
  171. package/last-commit.js +0 -12
  172. package/last_commit/index.js +0 -82
  173. package/logger/s4-logger.js +0 -128
  174. package/paginator/README.md +0 -183
  175. package/paginator/s4-pagination.js +0 -51
  176. package/paginator/sql-pagination.js +0 -178
  177. package/paper-trail/README.md +0 -68
  178. package/paper-trail/helpers.js +0 -99
  179. package/paper-trail/index.js +0 -843
  180. package/prompts/index.js +0 -78
  181. package/queue/index.js +0 -402
  182. package/queue/publisher.js +0 -96
  183. package/queue/queue-logger.js +0 -40
  184. package/queue/subscriber.js +0 -107
  185. package/safe_proxy/index.js +0 -61
  186. package/scripts/publish.sh +0 -46
  187. package/serializer/index.js +0 -90
  188. package/test/health.spec.js +0 -213
  189. package/test/prompt.test.js +0 -91
  190. package/test/s4-formatter.spec.js +0 -80
  191. package/test/s4-pagination.spec.js +0 -196
  192. package/test/serializer.spec.js +0 -34
  193. package/test/utils.spec.js +0 -145
  194. package/utils/index.js +0 -74
package/README.md CHANGED
@@ -1,10 +1,354 @@
1
1
  # ESSENTIA
2
2
 
3
- A collection of small modules providing essential utilities for TWS services:
4
-
5
- * [Sequelize Paginator](paginator/README.md)
6
- * [Sequelize HAL Decorator](hal/README.md)
7
- * A logging tool
8
- * An HTTP response tool for consistenty formatting error responses
9
- * A small utility to dump the last commit of the project
10
- * [Paper Trail](paper-trail/README.md)
3
+ [![License](https://img.shields.io/badge/License-Proprietary-red.svg)](LICENSE)
4
+ [![Docker](https://img.shields.io/badge/Docker-Ready-blue.svg)](https://hub.docker.com/)
5
+ [![TypeScript](https://img.shields.io/badge/TypeScript-5.3+-blue.svg)](https://www.typescriptlang.org/)
6
+ [![Node.js](https://img.shields.io/badge/Node.js-18+-green.svg)](https://nodejs.org/)
7
+
8
+ A comprehensive TypeScript library providing essential utilities for TWS services. Built with modern TypeScript practices and full type safety.
9
+
10
+ ## Project Structure
11
+
12
+ All modules are written in TypeScript and located in the `/ts` directory:
13
+
14
+ - `/ts/logger` - S4Logger implementation with Winston integration
15
+ - `/ts/utils` - Utility functions (UUID validation, array conversion, etc.)
16
+ - `/ts/dns` - DNS caching functionality with configurable TTL
17
+ - `/ts/health` - Health check utilities for service monitoring
18
+ - `/ts/cycle` - Cycle deployment watcher for version tracking
19
+ - `/ts/constants` - Shared constants and configuration
20
+ - `/ts/helpers` - Helper functions and utilities
21
+ - `/ts/paginator` - Pagination utilities for SQL and data arrays
22
+ - `/ts/cache` - Redis cache helper with connection management
23
+ - `/ts/prompts` - CLI prompt utilities with argument parsing
24
+ - `/ts/safe-proxy` - Safe object property access with error handling
25
+ - `/ts/queue` - AMQP message queue management
26
+ - `/ts/last-commit` - Git commit information retrieval
27
+ - `/ts/hal` - HAL decorator for API responses
28
+ - `/ts/formatter` - Data formatting and error response utilities
29
+ - `/ts/serializer` - Sequelize model serialization utilities
30
+ - `/ts/paper-trail` - Data versioning and change tracking
31
+
32
+ ## Quick Start
33
+
34
+ Install the package:
35
+
36
+ ```bash
37
+ npm install @sera4/essentia
38
+ ```
39
+
40
+ ### Basic Usage
41
+
42
+ ```typescript
43
+ import {
44
+ sqlPaginator,
45
+ paginator,
46
+ DnsCache,
47
+ S4Logger,
48
+ utils,
49
+ constants
50
+ } from '@sera4/essentia';
51
+
52
+ // Pagination
53
+ const result = sqlPaginator('SELECT * FROM users', { page: 1, limit: 10 });
54
+ const paginated = paginator(data, { page: 1, limit: 20 });
55
+
56
+ // DNS caching
57
+ const dnsCache = new DnsCache();
58
+ const ip = await dnsCache.resolveTarget('https://example.com');
59
+
60
+ // Logging
61
+ const logger = new S4Logger();
62
+ logger.configure({ level: 'debug', service: 'my-service' });
63
+ logger.info('Application started');
64
+
65
+ // Utilities
66
+ const isValidUuid = utils.isValidUuidV4('123e4567-e89b-12d3-a456-426614174000');
67
+ ```
68
+
69
+ ### Advanced Usage
70
+
71
+ ```typescript
72
+ import {
73
+ sqlPaginator,
74
+ paginator,
75
+ DnsCache,
76
+ S4Logger,
77
+ HealthCheck,
78
+ CycleDeploymentWatcher,
79
+ halDecorator,
80
+ formatter,
81
+ queue,
82
+ paperTrail,
83
+ serializer,
84
+ lastCommit,
85
+ utils,
86
+ constants,
87
+ helpers,
88
+ prompts,
89
+ safeProxy
90
+ } from '@sera4/essentia';
91
+
92
+ // Pagination examples
93
+ const sqlResult = sqlPaginator('SELECT * FROM users WHERE active = ?', {
94
+ page: 1,
95
+ limit: 10,
96
+ orderBy: 'created_at',
97
+ orderDirection: 'DESC'
98
+ });
99
+
100
+ const paginatedData = paginator(userList, {
101
+ page: 1,
102
+ limit: 20,
103
+ total: 100
104
+ });
105
+
106
+ // DNS caching with configuration
107
+ const dnsCache = DnsCache.getInstance({
108
+ cacheTtlMs: 5000,
109
+ purgeIntervalMs: 120000,
110
+ debug: true
111
+ });
112
+ const ip = await dnsCache.resolveTarget('https://example.com');
113
+
114
+ // Logging with advanced configuration
115
+ const logger = new S4Logger();
116
+ logger.configure({
117
+ level: 'debug',
118
+ service: 'my-service',
119
+ format: 'json'
120
+ });
121
+ logger.info('Application started');
122
+
123
+ // Health checks
124
+ const healthCheck = new HealthCheck();
125
+ healthCheck.addCheck('database', async () => {
126
+ // Your database health check logic
127
+ return { status: 'healthy' };
128
+ });
129
+
130
+ // Cycle deployment monitoring
131
+ const watcher = CycleDeploymentWatcher.getInstance();
132
+ const currentVersion = watcher.getCurrentVersion('gateway');
133
+
134
+ // HAL decorator for API responses
135
+ const response = halDecorator(data, {
136
+ self: '/api/users',
137
+ next: '/api/users?page=2'
138
+ });
139
+
140
+ // Queue management
141
+ await queue.openConnection({
142
+ connectionUrl: 'amqp://localhost',
143
+ logEnabled: true
144
+ });
145
+ await queue.registerPublisher({
146
+ exchange: { name: 'my-exchange', type: 'topic' }
147
+ });
148
+ await queue.publishMessage('my-exchange', 'my-routing-key', { data: 'message' });
149
+
150
+ // Paper trail for data versioning
151
+ const trail = paperTrail(originalData, {
152
+ userId: 'user123',
153
+ action: 'update'
154
+ });
155
+
156
+ // Data serialization
157
+ const serialized = serializer(data, {
158
+ format: 'json',
159
+ pretty: true
160
+ });
161
+
162
+ // Last commit information
163
+ const commitInfo = await lastCommit.getLastCommit();
164
+ console.log(`Deployed version: ${commitInfo.hash}`);
165
+
166
+ // Utility functions
167
+ const safeData = safeProxy(data);
168
+ const helper = helpers.someHelperFunction();
169
+ const parser = prompts.setupCLIParser('My CLI Tool');
170
+ ```
171
+
172
+ ## Available Modules
173
+
174
+ All modules are written in TypeScript and provide full type safety:
175
+
176
+ ### Core Modules
177
+ - **Logging**: `S4Logger` - Winston-based logging utility with multiple log levels and formatting options
178
+ - **DNS Cache**: `DnsCache` - Singleton class for caching DNS lookups with configurable TTL
179
+ - **Health Checks**: `HealthCheck` - Utilities for implementing health check endpoints
180
+ - **Cycle Deployment Watcher**: `CycleDeploymentWatcher` - Monitor and react to changes in Cycle deployment tags
181
+ - **Utils**: `utils` - General utility functions (UUID validation, array conversion, route type detection, JSONB helpers)
182
+
183
+ ### Data Management
184
+ - **Pagination**: `sqlPaginator`, `paginator` - Utilities for handling pagination in SQL queries and data arrays
185
+ - **Cache**: `cache` - Redis cache helper with connection management and key generation
186
+ - **Serializer**: `serializer` - Sequelize model serialization utilities with custom decorators
187
+ - **Paper Trail**: `paperTrail` - Track changes to data models with automatic versioning and diff generation
188
+
189
+ ### API & Communication
190
+ - **HAL Decorator**: `halDecorator` - Adds HAL (Hypertext Application Language) support to API responses
191
+ - **Formatter**: `formatter` - Data formatting utilities and error response formatting
192
+ - **Queue**: `queue` - AMQP message queue management with publishers and subscribers
193
+ - **Safe Proxy**: `safeProxy` - Safe object property access with error handling
194
+
195
+ ### Utilities
196
+ - **Constants**: `constants` - Shared constants and configuration values
197
+ - **Helpers**: `helpers` - Helper functions and utilities
198
+ - **Prompts**: `prompts` - CLI prompt utilities with argument parsing
199
+ - **Last Commit**: `lastCommit` - Retrieve and display git commit information
200
+
201
+ ### Cycle Deployment Watcher
202
+
203
+ The Cycle Deployment Watcher provides functionality to monitor and react to changes in Cycle deployment tags. It's particularly useful for tracking deployment tags in a Cycle environment.
204
+
205
+ #### Methods
206
+
207
+ - `getInstance()`: Returns the singleton instance of the watcher
208
+ - `getCurrentVersion(service: string)`: Returns the current version for a service
209
+ - `getLegacyVersion(service: string)`: Returns the legacy version for a service
210
+ - `getTagsForVersion(version: string)`: Returns all tags that match a specific version
211
+ - `addListener(listener: (tags: Record<string, string>) => void)`: Adds a listener for tag changes
212
+ - `destroy()`: Cleans up resources and removes all listeners
213
+
214
+ #### Environment Variables
215
+
216
+ - `CYCLE_DEPLOYMENT_VERSION`: Optional environment variable to specify the current deployment version
217
+
218
+ ## TypeScript Support
219
+
220
+ This package is built entirely in TypeScript and provides:
221
+
222
+ - **Full Type Safety**: All modules include comprehensive TypeScript interfaces and type definitions
223
+ - **IntelliSense Support**: Complete autocomplete and IntelliSense in modern IDEs
224
+ - **Compile-time Error Checking**: Catch errors at compile time rather than runtime
225
+ - **Modern ES Modules**: Uses ES modules with proper import/export syntax
226
+ - **Declaration Files**: Generated `.d.ts` files for all modules
227
+
228
+ ### Type Definitions
229
+
230
+ All modules export their TypeScript interfaces, allowing you to use them in your own code:
231
+
232
+ ```typescript
233
+ import {
234
+ LoggerOptions,
235
+ DnsCacheConfig,
236
+ HealthCheckOptions,
237
+ PaginationOptions
238
+ } from '@sera4/essentia';
239
+
240
+ // Use the types in your own interfaces
241
+ interface MyServiceConfig {
242
+ logger: LoggerOptions;
243
+ dns: DnsCacheConfig;
244
+ health: HealthCheckOptions;
245
+ }
246
+ ```
247
+
248
+ ## Contributing
249
+
250
+ When contributing new features or fixes, please:
251
+
252
+ 1. Use TypeScript for all new code
253
+ 2. Follow the existing TypeScript patterns and conventions
254
+ 3. Include appropriate type definitions and interfaces
255
+ 4. Add unit tests for new functionality
256
+ 5. Update this documentation as needed
257
+ 6. Ensure all code passes the TypeScript compiler with strict mode enabled
258
+
259
+ ## Running Tests
260
+
261
+ The project uses Mocha and Chai for testing. To run the tests:
262
+
263
+ 1. Install dependencies:
264
+ ```bash
265
+ npm install
266
+ ```
267
+
268
+ 2. Run all tests:
269
+ ```bash
270
+ npm test
271
+ ```
272
+
273
+ 3. Run tests for a specific module:
274
+ ```bash
275
+ npm test -- --grep "DnsCache"
276
+ ```
277
+
278
+ 4. Run tests with coverage:
279
+ ```bash
280
+ npm run test:coverage
281
+ ```
282
+
283
+ 5. Run tests in watch mode (useful during development):
284
+ ```bash
285
+ npm run test:watch
286
+ ```
287
+
288
+ ### Test Environment
289
+
290
+ The test environment is configured to:
291
+ - Use ES modules
292
+ - Support TypeScript
293
+ - Mock external dependencies
294
+ - Run tests in parallel
295
+
296
+ ### Writing Tests
297
+
298
+ When writing new tests:
299
+ 1. Place test files in the `test` directory, mirroring the source structure
300
+ 2. Use `.test.ts` extension for TypeScript test files
301
+ 3. Follow the existing test patterns and conventions
302
+ 4. Use sinon for mocking and stubbing
303
+ 5. Include both positive and negative test cases
304
+ 6. Test edge cases and error conditions
305
+
306
+ Example test structure:
307
+ ```typescript
308
+ import { expect } from 'chai';
309
+ import sinon from 'sinon';
310
+ import { MyModule } from '../../ts/my-module';
311
+
312
+ describe('MyModule', () => {
313
+ let myModule: MyModule;
314
+ let mockDependency: sinon.SinonStub;
315
+
316
+ beforeEach(() => {
317
+ myModule = new MyModule();
318
+ mockDependency = sinon.stub();
319
+ });
320
+
321
+ afterEach(() => {
322
+ sinon.restore();
323
+ });
324
+
325
+ describe('someMethod', () => {
326
+ it('should do something', async () => {
327
+ mockDependency.resolves('expected result');
328
+
329
+ const result = await myModule.someMethod();
330
+
331
+ expect(result).to.equal('expected result');
332
+ expect(mockDependency.calledOnce).to.be.true;
333
+ });
334
+ });
335
+ });
336
+ ```
337
+
338
+ ## Building
339
+
340
+ To build the project:
341
+
342
+ ```bash
343
+ npm run build
344
+ ```
345
+
346
+ This will:
347
+ - Compile all TypeScript files to JavaScript
348
+ - Generate declaration files (`.d.ts`)
349
+ - Create source maps for debugging
350
+ - Output everything to the `dist/` directory
351
+
352
+ ## License
353
+
354
+ This project is proprietary software. All rights reserved.
@@ -1,5 +1,6 @@
1
1
  export * from "./dns/index.js";
2
2
  export * from "./logger/index.js";
3
+ export * from "./health/index.js";
3
4
  export * from "./cycle/index.js";
4
5
  export * from "./constants/index.js";
5
6
  export * from "./utils/index.js";
@@ -12,8 +13,6 @@ export { DnsCache } from "./dns/DnsCache.js";
12
13
  export { S4Logger } from "./logger/s4-logger.js";
13
14
  export { s4Paginator as paginator } from "./paginator/index.js";
14
15
  export { sqlPaginator } from "./paginator/index.js";
15
- export { HealthCheck as healthCheck } from "./health/index.js";
16
- export { default as logger } from "./logger/s4-logger.js";
17
16
  export { default as queue } from "./queue/index.js";
18
17
  export { default as lastCommit } from "./last-commit/index.js";
19
18
  export { default as halDecorator } from "./hal/index.js";
package/dist/ts/index.js CHANGED
@@ -1,6 +1,7 @@
1
1
  // Export all TypeScript modules
2
2
  export * from "./dns/index.js";
3
3
  export * from "./logger/index.js";
4
+ export * from "./health/index.js";
4
5
  export * from "./cycle/index.js";
5
6
  export * from "./constants/index.js";
6
7
  export * from "./utils/index.js";
@@ -14,9 +15,6 @@ export { DnsCache } from "./dns/DnsCache.js";
14
15
  export { S4Logger } from "./logger/s4-logger.js";
15
16
  export { s4Paginator as paginator } from "./paginator/index.js";
16
17
  export { sqlPaginator } from "./paginator/index.js";
17
- export { HealthCheck as healthCheck } from "./health/index.js";
18
- // Export default logger instance
19
- export { default as logger } from "./logger/s4-logger.js";
20
18
  // Export default exports
21
19
  export { default as queue } from "./queue/index.js";
22
20
  export { default as lastCommit } from "./last-commit/index.js";
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../ts/index.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,mBAAmB,CAAC;AAClC,cAAc,kBAAkB,CAAC;AACjC,cAAc,sBAAsB,CAAC;AACrC,cAAc,kBAAkB,CAAC;AACjC,cAAc,oBAAoB,CAAC;AACnC,cAAc,sBAAsB,CAAC;AACrC,cAAc,kBAAkB,CAAC;AACjC,cAAc,oBAAoB,CAAC;AACnC,cAAc,uBAAuB,CAAC;AAEtC,6CAA6C;AAC7C,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7C,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjD,OAAO,EAAE,WAAW,IAAI,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACpD,OAAO,EAAE,WAAW,IAAI,WAAW,EAAC,MAAM,mBAAmB,CAAC;AAE9D,iCAAiC;AACjC,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAE1D,yBAAyB;AACzB,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAC/D,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,gBAAgB,CAAC;AACzD,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAC5D,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAC9D,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,wBAAwB,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../ts/index.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,kBAAkB,CAAC;AACjC,cAAc,sBAAsB,CAAC;AACrC,cAAc,kBAAkB,CAAC;AACjC,cAAc,oBAAoB,CAAC;AACnC,cAAc,sBAAsB,CAAC;AACrC,cAAc,kBAAkB,CAAC;AACjC,cAAc,oBAAoB,CAAC;AACnC,cAAc,uBAAuB,CAAC;AAEtC,6CAA6C;AAC7C,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7C,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjD,OAAO,EAAE,WAAW,IAAI,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAEpD,yBAAyB;AACzB,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAC/D,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,gBAAgB,CAAC;AACzD,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAC5D,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAC9D,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,wBAAwB,CAAC"}
@@ -60,8 +60,6 @@ export class S4Logger {
60
60
  setLevel(level) {
61
61
  if (level && ["trace", "debug", "info", "error", "warn"].indexOf(level.toLowerCase()) >= 0) {
62
62
  logger.level = level;
63
- // Also update the transport level to ensure proper filtering
64
- defaultTransport.level = level;
65
63
  }
66
64
  }
67
65
  mute() {
@@ -1 +1 @@
1
- {"version":3,"file":"s4-logger.js","sourceRoot":"","sources":["../../../ts/logger/s4-logger.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,MAAM,SAAS,CAAC;AAC9B,OAAO,IAAI,MAAM,MAAM,CAAC;A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AAe,QAAQ,CAAC"}
@@ -26,19 +26,6 @@ interface UnregisterSubscriberOptions {
26
26
  };
27
27
  key: string;
28
28
  }
29
- interface FanoutQueueConfig {
30
- name: string;
31
- routingKey?: string;
32
- options?: any;
33
- }
34
- interface FanoutConfiguration {
35
- exchange: {
36
- name: string;
37
- type: "fanout";
38
- options?: any;
39
- };
40
- queues: FanoutQueueConfig[];
41
- }
42
29
  type MessageListener = (payload: any, error?: any) => void;
43
30
  /**
44
31
  * An interface to AMQP service
@@ -49,7 +36,6 @@ declare class S4Queue {
49
36
  private retry;
50
37
  private pubs;
51
38
  private subs;
52
- private fanouts;
53
39
  constructor();
54
40
  /**
55
41
  * Tests the connection to the service.
@@ -112,13 +98,6 @@ declare class S4Queue {
112
98
  * @returns true if registered already, false otherwise
113
99
  */
114
100
  hasPublisher(exchange: string): boolean;
115
- /**
116
- * Checks whether or not a fanout with given exchange name
117
- * has been registered already
118
- * @param exchange the name of the exchange.
119
- * @returns true if registered already, false otherwise
120
- */
121
- hasFanout(exchange: string): boolean;
122
101
  /**
123
102
  * Removes a previously registered publisher
124
103
  * @param options
@@ -201,24 +180,10 @@ declare class S4Queue {
201
180
  * @param listener callback
202
181
  */
203
182
  addMessageListener(key: string, listener: MessageListener): void;
204
- /**
205
- * Registers a fanout exchange with multiple bound queues.
206
- * Creates the fanout exchange if it doesn't exist, then creates and binds
207
- * all specified queues to the exchange.
208
- * @param config Fanout configuration with exchange and queue definitions
209
- */
210
- registerFanout(config: FanoutConfiguration): Promise<void>;
211
- /**
212
- * Unregisters a fanout configuration by removing all associated subscribers
213
- * and optionally the publisher/exchange.
214
- * @param config Fanout configuration to unregister
215
- * @param removeExchange Whether to also remove the exchange (default: false)
216
- */
217
- unregisterFanout(config: FanoutConfiguration, removeExchange?: boolean): Promise<void>;
218
183
  /**
219
184
  * Updates the connection reference to all the previously
220
- * registered publishers, subscribers, and fanouts.
221
- * After we successfully establish a connection and register pubs/subs/fanouts,
185
+ * registered publishers and subscribers.
186
+ * After we successfully establish a connection and register pubs/subs,
222
187
  * it's possible for the connection to break. This object will try
223
188
  * to re-establish a new connection every 3 seconds (or whatever configuration is set)
224
189
  * and if a new connection is established, we need to pass that connection to
@@ -229,4 +194,3 @@ declare class S4Queue {
229
194
  }
230
195
  declare const queue: S4Queue;
231
196
  export default queue;
232
- export type { FanoutConfiguration, FanoutQueueConfig, Exchange, PublisherOptions, SubscriberOptions };