redis-smq-rest-api 9.0.0-next.4 → 9.0.0-next.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.
- package/CHANGELOG.md +20 -0
- package/README.md +20 -11
- package/dist/cjs/src/container/Container.d.ts.map +1 -1
- package/dist/cjs/src/container/Container.js +3 -0
- package/dist/cjs/src/container/Container.js.map +1 -1
- package/dist/cjs/src/container/types/container.d.ts +4 -1
- package/dist/cjs/src/container/types/container.d.ts.map +1 -1
- package/dist/cjs/src/controllers/configuration/getConfigurationController.d.ts +4 -0
- package/dist/cjs/src/controllers/configuration/getConfigurationController.d.ts.map +1 -0
- package/dist/cjs/src/controllers/configuration/getConfigurationController.js +20 -0
- package/dist/cjs/src/controllers/configuration/getConfigurationController.js.map +1 -0
- package/dist/cjs/src/controllers/configuration/getConfigurationController.test.d.ts +2 -0
- package/dist/cjs/src/controllers/configuration/getConfigurationController.test.d.ts.map +1 -0
- package/dist/cjs/src/controllers/configuration/getConfigurationController.test.js +27 -0
- package/dist/cjs/src/controllers/configuration/getConfigurationController.test.js.map +1 -0
- package/dist/cjs/src/dto/controllers/configuration/GetConfigurationControllerResponseDTO.d.ts +6 -0
- package/dist/cjs/src/dto/controllers/configuration/GetConfigurationControllerResponseDTO.d.ts.map +1 -0
- package/dist/cjs/src/dto/controllers/configuration/GetConfigurationControllerResponseDTO.js +3 -0
- package/dist/cjs/src/dto/controllers/configuration/GetConfigurationControllerResponseDTO.js.map +1 -0
- package/dist/cjs/src/router/api/v1/configuration.d.ts +3 -0
- package/dist/cjs/src/router/api/v1/configuration.d.ts.map +1 -0
- package/dist/cjs/src/router/api/v1/configuration.js +17 -0
- package/dist/cjs/src/router/api/v1/configuration.js.map +1 -0
- package/dist/cjs/src/router/api/v1/index.d.ts.map +1 -1
- package/dist/cjs/src/router/api/v1/index.js +2 -1
- package/dist/cjs/src/router/api/v1/index.js.map +1 -1
- package/dist/cjs/src/services/ConfigurationService.d.ts +14 -0
- package/dist/cjs/src/services/ConfigurationService.d.ts.map +1 -0
- package/dist/cjs/src/services/ConfigurationService.js +29 -0
- package/dist/cjs/src/services/ConfigurationService.js.map +1 -0
- package/dist/esm/src/container/Container.d.ts.map +1 -1
- package/dist/esm/src/container/Container.js +5 -2
- package/dist/esm/src/container/Container.js.map +1 -1
- package/dist/esm/src/container/types/container.d.ts +4 -1
- package/dist/esm/src/container/types/container.d.ts.map +1 -1
- package/dist/esm/src/controllers/configuration/getConfigurationController.d.ts +4 -0
- package/dist/esm/src/controllers/configuration/getConfigurationController.d.ts.map +1 -0
- package/dist/esm/src/controllers/configuration/getConfigurationController.js +7 -0
- package/dist/esm/src/controllers/configuration/getConfigurationController.js.map +1 -0
- package/dist/esm/src/controllers/configuration/getConfigurationController.test.d.ts +2 -0
- package/dist/esm/src/controllers/configuration/getConfigurationController.test.d.ts.map +1 -0
- package/dist/esm/src/controllers/configuration/getConfigurationController.test.js +12 -0
- package/dist/esm/src/controllers/configuration/getConfigurationController.test.js.map +1 -0
- package/dist/esm/src/dto/controllers/configuration/GetConfigurationControllerResponseDTO.d.ts +6 -0
- package/dist/esm/src/dto/controllers/configuration/GetConfigurationControllerResponseDTO.d.ts.map +1 -0
- package/dist/esm/src/dto/controllers/configuration/GetConfigurationControllerResponseDTO.js +2 -0
- package/dist/esm/src/dto/controllers/configuration/GetConfigurationControllerResponseDTO.js.map +1 -0
- package/dist/esm/src/router/api/v1/configuration.d.ts +3 -0
- package/dist/esm/src/router/api/v1/configuration.d.ts.map +1 -0
- package/dist/esm/src/router/api/v1/configuration.js +14 -0
- package/dist/esm/src/router/api/v1/configuration.js.map +1 -0
- package/dist/esm/src/router/api/v1/index.d.ts.map +1 -1
- package/dist/esm/src/router/api/v1/index.js +2 -1
- package/dist/esm/src/router/api/v1/index.js.map +1 -1
- package/dist/esm/src/services/ConfigurationService.d.ts +14 -0
- package/dist/esm/src/services/ConfigurationService.d.ts.map +1 -0
- package/dist/esm/src/services/ConfigurationService.js +12 -0
- package/dist/esm/src/services/ConfigurationService.js.map +1 -0
- package/dist/schema.json +141 -0
- package/package.json +12 -12
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,26 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [9.0.0-next.6](https://github.com/weyoss/redis-smq/compare/v9.0.0-next.5...v9.0.0-next.6) (2025-10-13)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package redis-smq-rest-api
|
|
9
|
+
|
|
10
|
+
## [9.0.0-next.5](https://github.com/weyoss/redis-smq/compare/v9.0.0-next.4...v9.0.0-next.5) (2025-10-12)
|
|
11
|
+
|
|
12
|
+
### ✨ Features
|
|
13
|
+
|
|
14
|
+
- **redis-smq-rest-api:** add configuration endpoint ([b343c27](https://github.com/weyoss/redis-smq/commit/b343c27a6f668a369ff57de837fb05314cea0b6d))
|
|
15
|
+
|
|
16
|
+
### 🚀 Chore
|
|
17
|
+
|
|
18
|
+
- **redis-smq-rest-api:** update dependencies to latest versions ([a42ac0b](https://github.com/weyoss/redis-smq/commit/a42ac0ba0748e43cd8fa02bfff0c3c9eda7b07e0))
|
|
19
|
+
|
|
20
|
+
### 📝 Documentation
|
|
21
|
+
|
|
22
|
+
- add GitHub note callouts in README files ([86e855a](https://github.com/weyoss/redis-smq/commit/86e855ae7aea91e3295301671b8da3249164ea40))
|
|
23
|
+
- standardize "next" branch reference ([15f3e4f](https://github.com/weyoss/redis-smq/commit/15f3e4f4347fd4f76f9dc167dd72f174f178ab8e))
|
|
24
|
+
- update README files for next branch with pre-release badges and doc links ([463250b](https://github.com/weyoss/redis-smq/commit/463250bbd754d44ae6741abcf4e2d62995aef620))
|
|
25
|
+
|
|
6
26
|
## [9.0.0-next.4](https://github.com/weyoss/redis-smq/compare/v9.0.0-next.3...v9.0.0-next.4) (2025-10-09)
|
|
7
27
|
|
|
8
28
|
### ⚠ BREAKING CHANGES
|
package/README.md
CHANGED
|
@@ -1,9 +1,17 @@
|
|
|
1
1
|
# RedisSMQ REST API
|
|
2
2
|
|
|
3
|
-
[!
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
3
|
+
> [!NOTE]
|
|
4
|
+
> You are viewing the documentation for the "next" branch. These docs describe unreleased changes published under the npm "next" dist-tag.
|
|
5
|
+
> For the latest stable documentation, see:
|
|
6
|
+
>
|
|
7
|
+
> - Master (stable) README: https://github.com/weyoss/redis-smq/tree/master/packages/redis-smq-rest-api
|
|
8
|
+
> - Latest release notes/tags: https://github.com/weyoss/redis-smq/releases/latest
|
|
9
|
+
> - Install stable packages with @latest; pre-release with @next.
|
|
10
|
+
|
|
11
|
+
[](https://www.npmjs.com/package/redis-smq-rest-api?activeTab=versions)
|
|
12
|
+
[](https://app.codecov.io/github/weyoss/redis-smq/tree/next/packages/redis-smq-rest-api)
|
|
13
|
+
|
|
14
|
+
RedisSMQ REST API provides an HTTP interface enabling any web-capable application to interact with the RedisSMQ message
|
|
7
15
|
queue using a RESTful API.
|
|
8
16
|
|
|
9
17
|
## Features
|
|
@@ -18,7 +26,7 @@ queue using a RESTful API.
|
|
|
18
26
|
|
|
19
27
|
```bash
|
|
20
28
|
# Using npm
|
|
21
|
-
npm install redis-smq redis-smq-common redis-smq-rest-api --save
|
|
29
|
+
npm install redis-smq@next redis-smq-common@next redis-smq-rest-api@next --save
|
|
22
30
|
```
|
|
23
31
|
|
|
24
32
|
Don't forget to install a Redis client. Choose either node-redis or ioredis:
|
|
@@ -37,11 +45,11 @@ npm install ioredis --save
|
|
|
37
45
|
npm install redis-smq@x.x.x redis-smq-rest-api@x.x.x redis-smq-common@x.x.x
|
|
38
46
|
```
|
|
39
47
|
|
|
40
|
-
See [version compatibility](
|
|
48
|
+
See [version compatibility](/packages/redis-smq/docs/version-compatibility.md) for details.
|
|
41
49
|
|
|
42
50
|
## Configuration
|
|
43
51
|
|
|
44
|
-
The REST API configuration extends the base [RedisSMQ configuration](
|
|
52
|
+
The REST API configuration extends the base [RedisSMQ configuration](/packages/redis-smq/docs/configuration.md) with additional API server settings.
|
|
45
53
|
|
|
46
54
|
### Configuration Options
|
|
47
55
|
|
|
@@ -92,7 +100,6 @@ The RedisSMQRestApi class can be used as a standalone server or embedded as midd
|
|
|
92
100
|
|
|
93
101
|
This mode starts an HTTP server that listens on the configured port.
|
|
94
102
|
|
|
95
|
-
|
|
96
103
|
```typescript
|
|
97
104
|
import { RedisSMQRestApi } from 'redis-smq-rest-api';
|
|
98
105
|
import { ERedisConfigClient } from 'redis-smq-common';
|
|
@@ -110,7 +117,7 @@ await api.run();
|
|
|
110
117
|
|
|
111
118
|
### Embedded Middleware
|
|
112
119
|
|
|
113
|
-
To integrate into an existing Express app, instantiate RedisSMQRestApi with false as the second argument to prevent it
|
|
120
|
+
To integrate into an existing Express app, instantiate RedisSMQRestApi with false as the second argument to prevent it
|
|
114
121
|
from starting its own listener. Then, use getApplication() to get the middleware.
|
|
115
122
|
|
|
116
123
|
```javascript
|
|
@@ -130,7 +137,9 @@ const api = new RedisSMQRestApi(
|
|
|
130
137
|
const restApiMiddleware = await api.getApplication();
|
|
131
138
|
app.use(restApiMiddleware);
|
|
132
139
|
|
|
133
|
-
app.listen(3000, () =>
|
|
140
|
+
app.listen(3000, () =>
|
|
141
|
+
console.log('Host app listening on http://localhost:3000'),
|
|
142
|
+
);
|
|
134
143
|
```
|
|
135
144
|
|
|
136
145
|
## Usage from CLI
|
|
@@ -189,4 +198,4 @@ For detailed endpoint documentation, refer to the Swagger UI.
|
|
|
189
198
|
|
|
190
199
|
## License
|
|
191
200
|
|
|
192
|
-
This project is licensed under is released under the [MIT License](
|
|
201
|
+
This project is licensed under is released under the [MIT License](/LICENSE).
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Container.d.ts","sourceRoot":"","sources":["../../../../src/container/Container.ts"],"names":[],"mappings":"AASA,OAAO,
|
|
1
|
+
{"version":3,"file":"Container.d.ts","sourceRoot":"","sources":["../../../../src/container/Container.ts"],"names":[],"mappings":"AASA,OAAO,EAGL,eAAe,EAGhB,MAAM,QAAQ,CAAC;AAiChB,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAGlD,qBAAa,SAAS;IACpB,OAAO,CAAC,MAAM,CAAC,QAAQ,CAA4C;IAEnE,MAAM,CAAC,gBAAgB;IAkDvB,MAAM,CAAC,WAAW;CAQnB"}
|
|
@@ -17,6 +17,7 @@ const QueuePendingMessagesService_js_1 = require("../services/QueuePendingMessag
|
|
|
17
17
|
const QueueRateLimitService_js_1 = require("../services/QueueRateLimitService.js");
|
|
18
18
|
const QueueScheduledMessagesService_js_1 = require("../services/QueueScheduledMessagesService.js");
|
|
19
19
|
const QueuesService_js_1 = require("../services/QueuesService.js");
|
|
20
|
+
const ConfigurationService_js_1 = require("../services/ConfigurationService.js");
|
|
20
21
|
class Container {
|
|
21
22
|
static registerServices() {
|
|
22
23
|
const instance = this.getInstance();
|
|
@@ -42,6 +43,7 @@ class Container {
|
|
|
42
43
|
producer: (0, awilix_1.asClass)(redis_smq_1.Producer)
|
|
43
44
|
.singleton()
|
|
44
45
|
.disposer((i) => new Promise((resolve) => i.shutdown(resolve))),
|
|
46
|
+
configuration: (0, awilix_1.asFunction)(() => redis_smq_1.Configuration.getInstance()).singleton(),
|
|
45
47
|
queuesService: (0, awilix_1.asClass)(QueuesService_js_1.QueuesService),
|
|
46
48
|
queueMessagesService: (0, awilix_1.asClass)(QueueMessagesService_js_1.QueueMessagesService),
|
|
47
49
|
queuePendingMessagesService: (0, awilix_1.asClass)(QueuePendingMessagesService_js_1.QueuePendingMessagesService),
|
|
@@ -56,6 +58,7 @@ class Container {
|
|
|
56
58
|
exchangeTopicService: (0, awilix_1.asClass)(ExchangeTopicService_js_1.ExchangeTopicService),
|
|
57
59
|
exchangesService: (0, awilix_1.asClass)(ExchangesService_js_1.ExchangesService),
|
|
58
60
|
consumerGroupsService: (0, awilix_1.asClass)(ConsumerGroupsService_js_1.ConsumerGroupsService),
|
|
61
|
+
configurationService: (0, awilix_1.asClass)(ConfigurationService_js_1.ConfigurationService),
|
|
59
62
|
});
|
|
60
63
|
}
|
|
61
64
|
static getInstance() {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Container.js","sourceRoot":"","sources":["../../../../src/container/Container.ts"],"names":[],"mappings":";;;AASA,
|
|
1
|
+
{"version":3,"file":"Container.js","sourceRoot":"","sources":["../../../../src/container/Container.ts"],"names":[],"mappings":";;;AASA,mCAMgB;AAChB,yCAiBmB;AACnB,mFAA6E;AAC7E,mFAA6E;AAC7E,mFAA6E;AAC7E,yEAAmE;AACnE,iFAA2E;AAC3E,uEAAiE;AACjE,2EAAqE;AACrE,yGAAmG;AACnG,yGAAmG;AACnG,iFAA2E;AAC3E,+FAAyF;AACzF,mFAA6E;AAC7E,mGAA6F;AAC7F,mEAA6D;AAE7D,iFAA2E;AAE3E,MAAa,SAAS;IAGpB,MAAM,CAAC,gBAAgB;QACrB,MAAM,QAAQ,GAAG,IAAI,CAAC,WAAW,EAAE,CAAC;QACpC,QAAQ,CAAC,QAAQ,CAAC;YAEhB,YAAY,EAAE,IAAA,gBAAO,EAAC,wBAAY,CAAC;iBAChC,SAAS,EAAE;iBACX,QAAQ,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC;YACjE,aAAa,EAAE,IAAA,gBAAO,EAAC,yBAAa,CAAC,CAAC,SAAS,EAAE;YACjD,oBAAoB,EAAE,IAAA,gBAAO,EAAC,gCAAoB,CAAC,CAAC,SAAS,EAAE;YAC/D,yBAAyB,EAAE,IAAA,gBAAO,EAAC,qCAAyB,CAAC,CAAC,SAAS,EAAE;YACzE,yBAAyB,EAAE,IAAA,gBAAO,EAAC,qCAAyB,CAAC,CAAC,SAAS,EAAE;YAC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AO,EAAC,4DAA2B,CAAC;YACjE,6BAA6B,EAAE,IAAA,gBAAO,EAAC,gEAA6B,CAAC;YACrE,gCAAgC,EAAE,IAAA,gBAAO,EACvC,sEAAgC,CACjC;YACD,gCAAgC,EAAE,IAAA,gBAAO,EACvC,sEAAgC,CACjC;YACD,eAAe,EAAE,IAAA,gBAAO,EAAC,oCAAe,CAAC;YACzC,qBAAqB,EAAE,IAAA,gBAAO,EAAC,gDAAqB,CAAC;YACrD,iBAAiB,EAAE,IAAA,gBAAO,EAAC,wCAAiB,CAAC;YAC7C,qBAAqB,EAAE,IAAA,gBAAO,EAAC,gDAAqB,CAAC;YACrD,qBAAqB,EAAE,IAAA,gBAAO,EAAC,gDAAqB,CAAC;YACrD,oBAAoB,EAAE,IAAA,gBAAO,EAAC,8CAAoB,CAAC;YACnD,gBAAgB,EAAE,IAAA,gBAAO,EAAC,sCAAgB,CAAC;YAC3C,qBAAqB,EAAE,IAAA,gBAAO,EAAC,gDAAqB,CAAC;YACrD,oBAAoB,EAAE,IAAA,gBAAO,EAAC,8CAAoB,CAAC;SACpD,CAAC,CAAC;IACL,CAAC;IAED,MAAM,CAAC,WAAW;QAChB,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC;YACnB,IAAI,CAAC,QAAQ,GAAG,IAAA,wBAAe,EAAa;gBAC1C,aAAa,EAAE,sBAAa,CAAC,OAAO;aACrC,CAAC,CAAC;QACL,CAAC;QACD,OAAO,IAAI,CAAC,QAAQ,CAAC;IACvB,CAAC;;AA5DH,8BA6DC;AA5DgB,kBAAQ,GAAuC,IAAI,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ConsumerGroups, ExchangeFanout, MessageManager, NamespaceManager, Producer, QueueManager, QueueAcknowledgedMessages, QueueDeadLetteredMessages, QueueMessages, QueuePendingMessages, QueueRateLimit, QueueScheduledMessages, Exchange, ExchangeDirect, ExchangeTopic } from 'redis-smq';
|
|
1
|
+
import { ConsumerGroups, ExchangeFanout, MessageManager, NamespaceManager, Producer, QueueManager, QueueAcknowledgedMessages, QueueDeadLetteredMessages, QueueMessages, QueuePendingMessages, QueueRateLimit, QueueScheduledMessages, Exchange, ExchangeDirect, ExchangeTopic, Configuration } from 'redis-smq';
|
|
2
2
|
import { IRedisSMQRestApiParsedConfig } from '../../config/index.js';
|
|
3
3
|
import { ConsumerGroupsService } from '../../services/ConsumerGroupsService.js';
|
|
4
4
|
import { ExchangeDirectService } from '../../services/ExchangeDirectService.js';
|
|
@@ -14,6 +14,7 @@ import { QueuePendingMessagesService } from '../../services/QueuePendingMessages
|
|
|
14
14
|
import { QueueRateLimitService } from '../../services/QueueRateLimitService.js';
|
|
15
15
|
import { QueueScheduledMessagesService } from '../../services/QueueScheduledMessagesService.js';
|
|
16
16
|
import { QueuesService } from '../../services/QueuesService.js';
|
|
17
|
+
import { ConfigurationService } from '../../services/ConfigurationService.js';
|
|
17
18
|
export interface IContainer {
|
|
18
19
|
queueManager: QueueManager;
|
|
19
20
|
queueMessages: QueueMessages;
|
|
@@ -30,6 +31,7 @@ export interface IContainer {
|
|
|
30
31
|
exchangeTopic: ExchangeTopic;
|
|
31
32
|
consumerGroups: ConsumerGroups;
|
|
32
33
|
producer: Producer;
|
|
34
|
+
configuration: Configuration;
|
|
33
35
|
config: IRedisSMQRestApiParsedConfig;
|
|
34
36
|
queuesService: QueuesService;
|
|
35
37
|
queueScheduledMessagesService: QueueScheduledMessagesService;
|
|
@@ -45,6 +47,7 @@ export interface IContainer {
|
|
|
45
47
|
exchangeDirectService: ExchangeDirectService;
|
|
46
48
|
exchangeTopicService: ExchangeTopicService;
|
|
47
49
|
consumerGroupsService: ConsumerGroupsService;
|
|
50
|
+
configurationService: ConfigurationService;
|
|
48
51
|
}
|
|
49
52
|
export interface IContextScope<RequestPathDTO, RequestQueryDTO, RequestBodyDTO> {
|
|
50
53
|
requestPathDTO: RequestPathDTO;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"container.d.ts","sourceRoot":"","sources":["../../../../../src/container/types/container.ts"],"names":[],"mappings":"AASA,OAAO,EACL,cAAc,EACd,cAAc,EACd,cAAc,EACd,gBAAgB,EAChB,QAAQ,EACR,YAAY,EACZ,yBAAyB,EACzB,yBAAyB,EACzB,aAAa,EACb,oBAAoB,EACpB,cAAc,EACd,sBAAsB,EACtB,QAAQ,EACR,cAAc,EACd,aAAa,EACd,MAAM,WAAW,CAAC;AACnB,OAAO,EAAE,4BAA4B,EAAE,MAAM,uBAAuB,CAAC;AACrE,OAAO,EAAE,qBAAqB,EAAE,MAAM,yCAAyC,CAAC;AAChF,OAAO,EAAE,qBAAqB,EAAE,MAAM,yCAAyC,CAAC;AAChF,OAAO,EAAE,qBAAqB,EAAE,MAAM,yCAAyC,CAAC;AAChF,OAAO,EAAE,gBAAgB,EAAE,MAAM,oCAAoC,CAAC;AACtE,OAAO,EAAE,oBAAoB,EAAE,MAAM,wCAAwC,CAAC;AAC9E,OAAO,EAAE,eAAe,EAAE,MAAM,mCAAmC,CAAC;AACpE,OAAO,EAAE,iBAAiB,EAAE,MAAM,qCAAqC,CAAC;AACxE,OAAO,EAAE,gCAAgC,EAAE,MAAM,oDAAoD,CAAC;AACtG,OAAO,EAAE,gCAAgC,EAAE,MAAM,oDAAoD,CAAC;AACtG,OAAO,EAAE,oBAAoB,EAAE,MAAM,wCAAwC,CAAC;AAC9E,OAAO,EAAE,2BAA2B,EAAE,MAAM,+CAA+C,CAAC;AAC5F,OAAO,EAAE,qBAAqB,EAAE,MAAM,yCAAyC,CAAC;AAChF,OAAO,EAAE,6BAA6B,EAAE,MAAM,iDAAiD,CAAC;AAChG,OAAO,EAAE,aAAa,EAAE,MAAM,iCAAiC,CAAC;
|
|
1
|
+
{"version":3,"file":"container.d.ts","sourceRoot":"","sources":["../../../../../src/container/types/container.ts"],"names":[],"mappings":"AASA,OAAO,EACL,cAAc,EACd,cAAc,EACd,cAAc,EACd,gBAAgB,EAChB,QAAQ,EACR,YAAY,EACZ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AAE,cAAc,CAAC;IAC/B,cAAc,EAAE,cAAc,CAAC;IAC/B,gBAAgB,EAAE,gBAAgB,CAAC;IACnC,QAAQ,EAAE,QAAQ,CAAC;IACnB,cAAc,EAAE,cAAc,CAAC;IAC/B,cAAc,EAAE,cAAc,CAAC;IAC/B,aAAa,EAAE,aAAa,CAAC;IAC7B,cAAc,EAAE,cAAc,CAAC;IAC/B,QAAQ,EAAE,QAAQ,CAAC;IACnB,aAAa,EAAE,aAAa,CAAC;IAC7B,MAAM,EAAE,4BAA4B,CAAC;IAErC,aAAa,EAAE,aAAa,CAAC;IAC7B,6BAA6B,EAAE,6BAA6B,CAAC;IAC7D,oBAAoB,EAAE,oBAAoB,CAAC;IAC3C,2BAA2B,EAAE,2BAA2B,CAAC;IACzD,gCAAgC,EAAE,gCAAgC,CAAC;IACnE,gCAAgC,EAAE,gCAAgC,CAAC;IACnE,eAAe,EAAE,eAAe,CAAC;IACjC,qBAAqB,EAAE,qBAAqB,CAAC;IAC7C,iBAAiB,EAAE,iBAAiB,CAAC;IACrC,gBAAgB,EAAE,gBAAgB,CAAC;IACnC,qBAAqB,EAAE,qBAAqB,CAAC;IAC7C,qBAAqB,EAAE,qBAAqB,CAAC;IAC7C,oBAAoB,EAAE,oBAAoB,CAAC;IAC3C,qBAAqB,EAAE,qBAAqB,CAAC;IAC7C,oBAAoB,EAAE,oBAAoB,CAAC;CAC5C;AAED,MAAM,WAAW,aAAa,CAC5B,cAAc,EACd,eAAe,EACf,cAAc;IAEd,cAAc,EAAE,cAAc,CAAC;IAC/B,eAAe,EAAE,eAAe,CAAC;IACjC,cAAc,EAAE,cAAc,CAAC;CAChC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { TControllerRequestHandler, TControllerRequestPayloadEmpty } from '../../lib/controller/types/index.js';
|
|
2
|
+
import { GetConfigurationControllerResponseDTO } from '../../dto/controllers/configuration/GetConfigurationControllerResponseDTO.js';
|
|
3
|
+
export declare const getConfigurationController: TControllerRequestHandler<TControllerRequestPayloadEmpty, TControllerRequestPayloadEmpty, TControllerRequestPayloadEmpty, GetConfigurationControllerResponseDTO>;
|
|
4
|
+
//# sourceMappingURL=getConfigurationController.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getConfigurationController.d.ts","sourceRoot":"","sources":["../../../../../src/controllers/configuration/getConfigurationController.ts"],"names":[],"mappings":"AASA,OAAO,EACL,yBAAyB,EACzB,8BAA8B,EAC/B,MAAM,qCAAqC,CAAC;AAE7C,OAAO,EAAE,qCAAqC,EAAE,MAAM,8EAA8E,CAAC;AAErI,eAAO,MAAM,0BAA0B,EAAE,yBAAyB,CAChE,8BAA8B,EAC9B,8BAA8B,EAC9B,8BAA8B,EAC9B,qCAAqC,CAKtC,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.getConfigurationController = void 0;
|
|
13
|
+
const Container_js_1 = require("../../container/Container.js");
|
|
14
|
+
const getConfigurationController = () => __awaiter(void 0, void 0, void 0, function* () {
|
|
15
|
+
const service = Container_js_1.Container.getInstance().resolve('configurationService');
|
|
16
|
+
const r = yield service.getConfiguration();
|
|
17
|
+
return [200, r];
|
|
18
|
+
});
|
|
19
|
+
exports.getConfigurationController = getConfigurationController;
|
|
20
|
+
//# sourceMappingURL=getConfigurationController.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getConfigurationController.js","sourceRoot":"","sources":["../../../../../src/controllers/configuration/getConfigurationController.ts"],"names":[],"mappings":";;;;;;;;;;;;AAaA,+DAAyD;AAGlD,MAAM,0BAA0B,GAKnC,GAAS,EAAE;IACb,MAAM,OAAO,GAAG,wBAAS,CAAC,WAAW,EAAE,CAAC,OAAO,CAAC,sBAAsB,CAAC,CAAC;IACxE,MAAM,CAAC,GAAG,MAAM,OAAO,CAAC,gBAAgB,EAAE,CAAC;IAC3C,OAAO,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC;AAClB,CAAC,CAAA,CAAC;AATW,QAAA,0BAA0B,8BASrC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getConfigurationController.test.d.ts","sourceRoot":"","sources":["../../../../../src/controllers/configuration/getConfigurationController.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
|
+
};
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
const supertest_1 = __importDefault(require("supertest"));
|
|
16
|
+
const vitest_1 = require("vitest");
|
|
17
|
+
const config_js_1 = require("../../../tests/common/config.js");
|
|
18
|
+
(0, vitest_1.describe)('getConfigurationController', () => {
|
|
19
|
+
(0, vitest_1.it)('HTTP 200 OK', () => __awaiter(void 0, void 0, void 0, function* () {
|
|
20
|
+
var _a, _b, _c;
|
|
21
|
+
const request = (0, supertest_1.default)(`http://127.0.0.1:${(_a = config_js_1.config.apiServer) === null || _a === void 0 ? void 0 : _a.port}`);
|
|
22
|
+
const response1 = yield request.get('/api/v1/config');
|
|
23
|
+
(0, vitest_1.expect)(response1.status).toEqual(200);
|
|
24
|
+
(0, vitest_1.expect)(Object.keys((_c = (_b = response1.body) === null || _b === void 0 ? void 0 : _b.data) !== null && _c !== void 0 ? _c : {}).sort()).toEqual(['namespace', 'redis', 'logger', 'eventBus', 'messages'].sort());
|
|
25
|
+
}));
|
|
26
|
+
});
|
|
27
|
+
//# sourceMappingURL=getConfigurationController.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getConfigurationController.test.js","sourceRoot":"","sources":["../../../../../src/controllers/configuration/getConfigurationController.test.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AASA,0DAAkC;AAClC,mCAA8C;AAC9C,+DAAyD;AAIzD,IAAA,iBAAQ,EAAC,4BAA4B,EAAE,GAAG,EAAE;IAC1C,IAAA,WAAE,EAAC,aAAa,EAAE,GAAS,EAAE;;QAC3B,MAAM,OAAO,GAAG,IAAA,mBAAS,EAAC,oBAAoB,MAAA,kBAAM,CAAC,SAAS,0CAAE,IAAI,EAAE,CAAC,CAAC;QACxE,MAAM,SAAS,GACb,MAAM,OAAO,CAAC,GAAG,CAAC,gBAAgB,CAAC,CAAC;QACtC,IAAA,eAAM,EAAC,SAAS,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;QACtC,IAAA,eAAM,EAAC,MAAM,CAAC,IAAI,CAAC,MAAA,MAAA,SAAS,CAAC,IAAI,0CAAE,IAAI,mCAAI,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,OAAO,CAC5D,CAAC,WAAW,EAAE,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,UAAU,CAAC,CAAC,IAAI,EAAE,CAChE,CAAC;IACJ,CAAC,CAAA,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
package/dist/cjs/src/dto/controllers/configuration/GetConfigurationControllerResponseDTO.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GetConfigurationControllerResponseDTO.d.ts","sourceRoot":"","sources":["../../../../../../src/dto/controllers/configuration/GetConfigurationControllerResponseDTO.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,qBAAqB,EAAE,MAAM,WAAW,CAAC;AAElD,MAAM,MAAM,qCAAqC,GAAG,SAAS;IAC3D,GAAG;IACH,qBAAqB;CACtB,CAAC"}
|
package/dist/cjs/src/dto/controllers/configuration/GetConfigurationControllerResponseDTO.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GetConfigurationControllerResponseDTO.js","sourceRoot":"","sources":["../../../../../../src/dto/controllers/configuration/GetConfigurationControllerResponseDTO.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"configuration.d.ts","sourceRoot":"","sources":["../../../../../../src/router/api/v1/configuration.ts"],"names":[],"mappings":"AAUA,OAAO,EAAE,kBAAkB,EAAE,MAAM,oCAAoC,CAAC;AAGxE,eAAO,MAAM,aAAa,EAAE,kBAU3B,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.configuration = void 0;
|
|
4
|
+
const index_js_1 = require("../../../lib/controller/types/index.js");
|
|
5
|
+
const getConfigurationController_js_1 = require("../../../controllers/configuration/getConfigurationController.js");
|
|
6
|
+
exports.configuration = {
|
|
7
|
+
path: 'config',
|
|
8
|
+
tags: ['Configuration'],
|
|
9
|
+
resource: [
|
|
10
|
+
{
|
|
11
|
+
handler: getConfigurationController_js_1.getConfigurationController,
|
|
12
|
+
method: index_js_1.EControllerRequestMethod.GET,
|
|
13
|
+
payload: [],
|
|
14
|
+
},
|
|
15
|
+
],
|
|
16
|
+
};
|
|
17
|
+
//# sourceMappingURL=configuration.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"configuration.js","sourceRoot":"","sources":["../../../../../../src/router/api/v1/configuration.ts"],"names":[],"mappings":";;;AASA,qEAAkF;AAElF,oHAA8G;AAEjG,QAAA,aAAa,GAAuB;IAC/C,IAAI,EAAE,QAAQ;IACd,IAAI,EAAE,CAAC,eAAe,CAAC;IACvB,QAAQ,EAAE;QACR;YACE,OAAO,EAAE,0DAA0B;YACnC,MAAM,EAAE,mCAAwB,CAAC,GAAG;YACpC,OAAO,EAAE,EAAE;SACZ;KACF;CACF,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/router/api/v1/index.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,kBAAkB,EAAE,MAAM,oCAAoC,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/router/api/v1/index.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,kBAAkB,EAAE,MAAM,oCAAoC,CAAC;AAOxE,eAAO,MAAM,EAAE,EAAE,kBAGhB,CAAC"}
|
|
@@ -5,8 +5,9 @@ const exchanges_js_1 = require("./exchanges.js");
|
|
|
5
5
|
const messages_js_1 = require("./messages.js");
|
|
6
6
|
const namespaces_js_1 = require("./namespaces.js");
|
|
7
7
|
const queues_js_1 = require("./queues.js");
|
|
8
|
+
const configuration_js_1 = require("./configuration.js");
|
|
8
9
|
exports.v1 = {
|
|
9
10
|
path: 'v1',
|
|
10
|
-
resource: [queues_js_1.queues, namespaces_js_1.namespaces, messages_js_1.messages, exchanges_js_1.exchanges],
|
|
11
|
+
resource: [configuration_js_1.configuration, queues_js_1.queues, namespaces_js_1.namespaces, messages_js_1.messages, exchanges_js_1.exchanges],
|
|
11
12
|
};
|
|
12
13
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/router/api/v1/index.ts"],"names":[],"mappings":";;;AAUA,iDAA2C;AAC3C,+CAAyC;AACzC,mDAA6C;AAC7C,2CAAqC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/router/api/v1/index.ts"],"names":[],"mappings":";;;AAUA,iDAA2C;AAC3C,+CAAyC;AACzC,mDAA6C;AAC7C,2CAAqC;AACrC,yDAAmD;AAEtC,QAAA,EAAE,GAAuB;IACpC,IAAI,EAAE,IAAI;IACV,QAAQ,EAAE,CAAC,gCAAa,EAAE,kBAAM,EAAE,0BAAU,EAAE,sBAAQ,EAAE,wBAAS,CAAC;CACnE,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Configuration } from 'redis-smq';
|
|
2
|
+
export declare class ConfigurationService {
|
|
3
|
+
protected configuration: {
|
|
4
|
+
loadAsync: () => Promise<import("redis-smq").IRedisSMQParsedConfig>;
|
|
5
|
+
saveAsync: ((config: import("redis-smq").IRedisSMQConfig) => Promise<undefined>) | ((config: import("redis-smq").IRedisSMQConfig) => Promise<void>);
|
|
6
|
+
saveCurrentConfigAsync: (() => Promise<undefined>) | (() => Promise<void>);
|
|
7
|
+
resetAsync: (() => Promise<undefined>) | (() => Promise<void>);
|
|
8
|
+
updateConfigAsync: ((updates: import("redis-smq").IRedisSMQConfig) => Promise<undefined>) | ((updates: import("redis-smq").IRedisSMQConfig) => Promise<void>);
|
|
9
|
+
existsAsync: (() => Promise<false>) | (() => Promise<true>);
|
|
10
|
+
} & Configuration;
|
|
11
|
+
constructor(configuration: Configuration);
|
|
12
|
+
getConfiguration(): Promise<import("redis-smq").IRedisSMQParsedConfig>;
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=ConfigurationService.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ConfigurationService.d.ts","sourceRoot":"","sources":["../../../../src/services/ConfigurationService.ts"],"names":[],"mappings":"AAUA,OAAO,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAI1C,qBAAa,oBAAoB;IAC/B,SAAS,CAAC,aAAa;;;;;;;sBAAC;gBAEZ,aAAa,EAAE,aAAa;IAIlC,gBAAgB;CAGvB"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
|
+
};
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.ConfigurationService = void 0;
|
|
16
|
+
const bluebird_1 = __importDefault(require("bluebird"));
|
|
17
|
+
const { promisifyAll } = bluebird_1.default;
|
|
18
|
+
class ConfigurationService {
|
|
19
|
+
constructor(configuration) {
|
|
20
|
+
this.configuration = promisifyAll(configuration);
|
|
21
|
+
}
|
|
22
|
+
getConfiguration() {
|
|
23
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
24
|
+
return this.configuration.getConfig();
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
exports.ConfigurationService = ConfigurationService;
|
|
29
|
+
//# sourceMappingURL=ConfigurationService.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ConfigurationService.js","sourceRoot":"","sources":["../../../../src/services/ConfigurationService.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AASA,wDAAgC;AAGhC,MAAM,EAAE,YAAY,EAAE,GAAG,kBAAQ,CAAC;AAElC,MAAa,oBAAoB;IAG/B,YAAY,aAA4B;QACtC,IAAI,CAAC,aAAa,GAAG,YAAY,CAAC,aAAa,CAAC,CAAC;IACnD,CAAC;IAEK,gBAAgB;;YACpB,OAAO,IAAI,CAAC,aAAa,CAAC,SAAS,EAAE,CAAC;QACxC,CAAC;KAAA;CACF;AAVD,oDAUC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Container.d.ts","sourceRoot":"","sources":["../../../../src/container/Container.ts"],"names":[],"mappings":"AASA,OAAO,
|
|
1
|
+
{"version":3,"file":"Container.d.ts","sourceRoot":"","sources":["../../../../src/container/Container.ts"],"names":[],"mappings":"AASA,OAAO,EAGL,eAAe,EAGhB,MAAM,QAAQ,CAAC;AAiChB,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAGlD,qBAAa,SAAS;IACpB,OAAO,CAAC,MAAM,CAAC,QAAQ,CAA4C;IAEnE,MAAM,CAAC,gBAAgB;IAkDvB,MAAM,CAAC,WAAW;CAQnB"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { asClass, createContainer, InjectionMode, } from 'awilix';
|
|
2
|
-
import { ConsumerGroups, ExchangeFanout, MessageManager, NamespaceManager, Producer, QueueManager, QueueAcknowledgedMessages, QueueDeadLetteredMessages, QueueMessages, QueuePendingMessages, QueueRateLimit, QueueScheduledMessages, ExchangeTopic, ExchangeDirect, Exchange, } from 'redis-smq';
|
|
1
|
+
import { asClass, asFunction, createContainer, InjectionMode, } from 'awilix';
|
|
2
|
+
import { ConsumerGroups, ExchangeFanout, MessageManager, NamespaceManager, Producer, QueueManager, QueueAcknowledgedMessages, QueueDeadLetteredMessages, QueueMessages, QueuePendingMessages, QueueRateLimit, QueueScheduledMessages, ExchangeTopic, ExchangeDirect, Exchange, Configuration, } from 'redis-smq';
|
|
3
3
|
import { ConsumerGroupsService } from '../services/ConsumerGroupsService.js';
|
|
4
4
|
import { ExchangeDirectService } from '../services/ExchangeDirectService.js';
|
|
5
5
|
import { ExchangeFanoutService } from '../services/ExchangeFanoutService.js';
|
|
@@ -14,6 +14,7 @@ import { QueuePendingMessagesService } from '../services/QueuePendingMessagesSer
|
|
|
14
14
|
import { QueueRateLimitService } from '../services/QueueRateLimitService.js';
|
|
15
15
|
import { QueueScheduledMessagesService } from '../services/QueueScheduledMessagesService.js';
|
|
16
16
|
import { QueuesService } from '../services/QueuesService.js';
|
|
17
|
+
import { ConfigurationService } from '../services/ConfigurationService.js';
|
|
17
18
|
export class Container {
|
|
18
19
|
static instance = null;
|
|
19
20
|
static registerServices() {
|
|
@@ -40,6 +41,7 @@ export class Container {
|
|
|
40
41
|
producer: asClass(Producer)
|
|
41
42
|
.singleton()
|
|
42
43
|
.disposer((i) => new Promise((resolve) => i.shutdown(resolve))),
|
|
44
|
+
configuration: asFunction(() => Configuration.getInstance()).singleton(),
|
|
43
45
|
queuesService: asClass(QueuesService),
|
|
44
46
|
queueMessagesService: asClass(QueueMessagesService),
|
|
45
47
|
queuePendingMessagesService: asClass(QueuePendingMessagesService),
|
|
@@ -54,6 +56,7 @@ export class Container {
|
|
|
54
56
|
exchangeTopicService: asClass(ExchangeTopicService),
|
|
55
57
|
exchangesService: asClass(ExchangesService),
|
|
56
58
|
consumerGroupsService: asClass(ConsumerGroupsService),
|
|
59
|
+
configurationService: asClass(ConfigurationService),
|
|
57
60
|
});
|
|
58
61
|
}
|
|
59
62
|
static getInstance() {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Container.js","sourceRoot":"","sources":["../../../../src/container/Container.ts"],"names":[],"mappings":"AASA,OAAO,EACL,OAAO,
|
|
1
|
+
{"version":3,"file":"Container.js","sourceRoot":"","sources":["../../../../src/container/Container.ts"],"names":[],"mappings":"AASA,OAAO,EACL,OAAO,EACP,UAAU,EAEV,eAAe,EACf,aAAa,GACd,MAAM,QAAQ,CAAC;AAChB,OAAO,EACL,cAAc,EACd,cAAc,EACd,cAAc,EACd,gBAAgB,EAChB,QAAQ,EACR,YAAY,EACZ,yBAAyB,EACzB,yBAAyB,EACzB,aAAa,EACb,oBAAoB,EACpB,cAAc,EACd,sBAAsB,EACtB,aAAa,EACb,cAAc,EACd,QAAQ,EACR,aAAa,GACd,MAAM,WAAW,CAAC;AACnB,OAAO,EAAE,qBAAqB,EAAE,MAAM,sCAAsC,CAAC;AAC7E,OAAO,EAAE,qBAAqB,EAAE,MAAM,sCAAsC,CAAC;AAC7E,OAAO,EAAE,qBAAqB,EAAE,MAAM,sCAAsC,CAAC;AAC7E,OAAO,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AACnE,OAAO,EAAE,oBAAoB,EAAE,MAAM,qCAAqC,CAAC;AAC3E,OAAO,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAC;AACjE,OAAO,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;AACrE,OAAO,EAAE,gCAAgC,EAAE,MAAM,iDAAiD,CAAC;AACnG,OAAO,EAAE,gCAAgC,EAAE,MAAM,iDAAiD,CAAC;AACnG,OAAO,EAAE,oBAAoB,EAAE,MAAM,qCAAqC,CAAC;AAC3E,OAAO,EAAE,2BAA2B,EAAE,MAAM,4CAA4C,CAAC;AACzF,OAAO,EAAE,qBAAqB,EAAE,MAAM,sCAAsC,CAAC;AAC7E,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D,oBAAoB,EAAE,OAAO,CAAC,oBAAoB,CAAC;SACpD,CAAC,CAAC;IACL,CAAC;IAED,MAAM,CAAC,WAAW;QAChB,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC;YACnB,IAAI,CAAC,QAAQ,GAAG,eAAe,CAAa;gBAC1C,aAAa,EAAE,aAAa,CAAC,OAAO;aACrC,CAAC,CAAC;QACL,CAAC;QACD,OAAO,IAAI,CAAC,QAAQ,CAAC;IACvB,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ConsumerGroups, ExchangeFanout, MessageManager, NamespaceManager, Producer, QueueManager, QueueAcknowledgedMessages, QueueDeadLetteredMessages, QueueMessages, QueuePendingMessages, QueueRateLimit, QueueScheduledMessages, Exchange, ExchangeDirect, ExchangeTopic } from 'redis-smq';
|
|
1
|
+
import { ConsumerGroups, ExchangeFanout, MessageManager, NamespaceManager, Producer, QueueManager, QueueAcknowledgedMessages, QueueDeadLetteredMessages, QueueMessages, QueuePendingMessages, QueueRateLimit, QueueScheduledMessages, Exchange, ExchangeDirect, ExchangeTopic, Configuration } from 'redis-smq';
|
|
2
2
|
import { IRedisSMQRestApiParsedConfig } from '../../config/index.js';
|
|
3
3
|
import { ConsumerGroupsService } from '../../services/ConsumerGroupsService.js';
|
|
4
4
|
import { ExchangeDirectService } from '../../services/ExchangeDirectService.js';
|
|
@@ -14,6 +14,7 @@ import { QueuePendingMessagesService } from '../../services/QueuePendingMessages
|
|
|
14
14
|
import { QueueRateLimitService } from '../../services/QueueRateLimitService.js';
|
|
15
15
|
import { QueueScheduledMessagesService } from '../../services/QueueScheduledMessagesService.js';
|
|
16
16
|
import { QueuesService } from '../../services/QueuesService.js';
|
|
17
|
+
import { ConfigurationService } from '../../services/ConfigurationService.js';
|
|
17
18
|
export interface IContainer {
|
|
18
19
|
queueManager: QueueManager;
|
|
19
20
|
queueMessages: QueueMessages;
|
|
@@ -30,6 +31,7 @@ export interface IContainer {
|
|
|
30
31
|
exchangeTopic: ExchangeTopic;
|
|
31
32
|
consumerGroups: ConsumerGroups;
|
|
32
33
|
producer: Producer;
|
|
34
|
+
configuration: Configuration;
|
|
33
35
|
config: IRedisSMQRestApiParsedConfig;
|
|
34
36
|
queuesService: QueuesService;
|
|
35
37
|
queueScheduledMessagesService: QueueScheduledMessagesService;
|
|
@@ -45,6 +47,7 @@ export interface IContainer {
|
|
|
45
47
|
exchangeDirectService: ExchangeDirectService;
|
|
46
48
|
exchangeTopicService: ExchangeTopicService;
|
|
47
49
|
consumerGroupsService: ConsumerGroupsService;
|
|
50
|
+
configurationService: ConfigurationService;
|
|
48
51
|
}
|
|
49
52
|
export interface IContextScope<RequestPathDTO, RequestQueryDTO, RequestBodyDTO> {
|
|
50
53
|
requestPathDTO: RequestPathDTO;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"container.d.ts","sourceRoot":"","sources":["../../../../../src/container/types/container.ts"],"names":[],"mappings":"AASA,OAAO,EACL,cAAc,EACd,cAAc,EACd,cAAc,EACd,gBAAgB,EAChB,QAAQ,EACR,YAAY,EACZ,yBAAyB,EACzB,yBAAyB,EACzB,aAAa,EACb,oBAAoB,EACpB,cAAc,EACd,sBAAsB,EACtB,QAAQ,EACR,cAAc,EACd,aAAa,EACd,MAAM,WAAW,CAAC;AACnB,OAAO,EAAE,4BAA4B,EAAE,MAAM,uBAAuB,CAAC;AACrE,OAAO,EAAE,qBAAqB,EAAE,MAAM,yCAAyC,CAAC;AAChF,OAAO,EAAE,qBAAqB,EAAE,MAAM,yCAAyC,CAAC;AAChF,OAAO,EAAE,qBAAqB,EAAE,MAAM,yCAAyC,CAAC;AAChF,OAAO,EAAE,gBAAgB,EAAE,MAAM,oCAAoC,CAAC;AACtE,OAAO,EAAE,oBAAoB,EAAE,MAAM,wCAAwC,CAAC;AAC9E,OAAO,EAAE,eAAe,EAAE,MAAM,mCAAmC,CAAC;AACpE,OAAO,EAAE,iBAAiB,EAAE,MAAM,qCAAqC,CAAC;AACxE,OAAO,EAAE,gCAAgC,EAAE,MAAM,oDAAoD,CAAC;AACtG,OAAO,EAAE,gCAAgC,EAAE,MAAM,oDAAoD,CAAC;AACtG,OAAO,EAAE,oBAAoB,EAAE,MAAM,wCAAwC,CAAC;AAC9E,OAAO,EAAE,2BAA2B,EAAE,MAAM,+CAA+C,CAAC;AAC5F,OAAO,EAAE,qBAAqB,EAAE,MAAM,yCAAyC,CAAC;AAChF,OAAO,EAAE,6BAA6B,EAAE,MAAM,iDAAiD,CAAC;AAChG,OAAO,EAAE,aAAa,EAAE,MAAM,iCAAiC,CAAC;
|
|
1
|
+
{"version":3,"file":"container.d.ts","sourceRoot":"","sources":["../../../../../src/container/types/container.ts"],"names":[],"mappings":"AASA,OAAO,EACL,cAAc,EACd,cAAc,EACd,cAAc,EACd,gBAAgB,EAChB,QAAQ,EACR,YAAY,EACZ,yBAAyB,EACzB,yBAAyB,EACzB,aAAa,EACb,oBAAoB,EACpB,cAAc,EACd,sBAAsB,EACtB,QAAQ,EACR,cAAc,EACd,aAAa,EACb,aAAa,EACd,MAAM,WAAW,CAAC;AACnB,OAAO,EAAE,4BAA4B,EAAE,MAAM,uBAAuB,CAAC;AACrE,OAAO,EAAE,qBAAqB,EAAE,MAAM,yCAAyC,CAAC;AAChF,OAAO,EAAE,qBAAqB,EAAE,MAAM,yCAAyC,CAAC;AAChF,OAAO,EAAE,qBAAqB,EAAE,MAAM,yCAAyC,CAAC;AAChF,OAAO,EAAE,gBAAgB,EAAE,MAAM,oCAAoC,CAAC;AACtE,OAAO,EAAE,oBAAoB,EAAE,MAAM,wCAAwC,CAAC;AAC9E,OAAO,EAAE,eAAe,EAAE,MAAM,mCAAmC,CAAC;AACpE,OAAO,EAAE,iBAAiB,EAAE,MAAM,qCAAqC,CAAC;AACxE,OAAO,EAAE,gCAAgC,EAAE,MAAM,oDAAoD,CAAC;AACtG,OAAO,EAAE,gCAAgC,EAAE,MAAM,oDAAoD,CAAC;AACtG,OAAO,EAAE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qBAAqB,EAAE,qBAAqB,CAAC;IAC7C,qBAAqB,EAAE,qBAAqB,CAAC;IAC7C,oBAAoB,EAAE,oBAAoB,CAAC;IAC3C,qBAAqB,EAAE,qBAAqB,CAAC;IAC7C,oBAAoB,EAAE,oBAAoB,CAAC;CAC5C;AAED,MAAM,WAAW,aAAa,CAC5B,cAAc,EACd,eAAe,EACf,cAAc;IAEd,cAAc,EAAE,cAAc,CAAC;IAC/B,eAAe,EAAE,eAAe,CAAC;IACjC,cAAc,EAAE,cAAc,CAAC;CAChC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { TControllerRequestHandler, TControllerRequestPayloadEmpty } from '../../lib/controller/types/index.js';
|
|
2
|
+
import { GetConfigurationControllerResponseDTO } from '../../dto/controllers/configuration/GetConfigurationControllerResponseDTO.js';
|
|
3
|
+
export declare const getConfigurationController: TControllerRequestHandler<TControllerRequestPayloadEmpty, TControllerRequestPayloadEmpty, TControllerRequestPayloadEmpty, GetConfigurationControllerResponseDTO>;
|
|
4
|
+
//# sourceMappingURL=getConfigurationController.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getConfigurationController.d.ts","sourceRoot":"","sources":["../../../../../src/controllers/configuration/getConfigurationController.ts"],"names":[],"mappings":"AASA,OAAO,EACL,yBAAyB,EACzB,8BAA8B,EAC/B,MAAM,qCAAqC,CAAC;AAE7C,OAAO,EAAE,qCAAqC,EAAE,MAAM,8EAA8E,CAAC;AAErI,eAAO,MAAM,0BAA0B,EAAE,yBAAyB,CAChE,8BAA8B,EAC9B,8BAA8B,EAC9B,8BAA8B,EAC9B,qCAAqC,CAKtC,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Container } from '../../container/Container.js';
|
|
2
|
+
export const getConfigurationController = async () => {
|
|
3
|
+
const service = Container.getInstance().resolve('configurationService');
|
|
4
|
+
const r = await service.getConfiguration();
|
|
5
|
+
return [200, r];
|
|
6
|
+
};
|
|
7
|
+
//# sourceMappingURL=getConfigurationController.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getConfigurationController.js","sourceRoot":"","sources":["../../../../../src/controllers/configuration/getConfigurationController.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AAGzD,MAAM,CAAC,MAAM,0BAA0B,GAKnC,KAAK,IAAI,EAAE;IACb,MAAM,OAAO,GAAG,SAAS,CAAC,WAAW,EAAE,CAAC,OAAO,CAAC,sBAAsB,CAAC,CAAC;IACxE,MAAM,CAAC,GAAG,MAAM,OAAO,CAAC,gBAAgB,EAAE,CAAC;IAC3C,OAAO,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC;AAClB,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getConfigurationController.test.d.ts","sourceRoot":"","sources":["../../../../../src/controllers/configuration/getConfigurationController.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import supertest from 'supertest';
|
|
2
|
+
import { describe, expect, it } from 'vitest';
|
|
3
|
+
import { config } from '../../../tests/common/config.js';
|
|
4
|
+
describe('getConfigurationController', () => {
|
|
5
|
+
it('HTTP 200 OK', async () => {
|
|
6
|
+
const request = supertest(`http://127.0.0.1:${config.apiServer?.port}`);
|
|
7
|
+
const response1 = await request.get('/api/v1/config');
|
|
8
|
+
expect(response1.status).toEqual(200);
|
|
9
|
+
expect(Object.keys(response1.body?.data ?? {}).sort()).toEqual(['namespace', 'redis', 'logger', 'eventBus', 'messages'].sort());
|
|
10
|
+
});
|
|
11
|
+
});
|
|
12
|
+
//# sourceMappingURL=getConfigurationController.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getConfigurationController.test.js","sourceRoot":"","sources":["../../../../../src/controllers/configuration/getConfigurationController.test.ts"],"names":[],"mappings":"AASA,OAAO,SAAS,MAAM,WAAW,CAAC;AAClC,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,QAAQ,CAAC;AAC9C,OAAO,EAAE,MAAM,EAAE,MAAM,iCAAiC,CAAC;AAIzD,QAAQ,CAAC,4BAA4B,EAAE,GAAG,EAAE;IAC1C,EAAE,CAAC,aAAa,EAAE,KAAK,IAAI,EAAE;QAC3B,MAAM,OAAO,GAAG,SAAS,CAAC,oBAAoB,MAAM,CAAC,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;QACxE,MAAM,SAAS,GACb,MAAM,OAAO,CAAC,GAAG,CAAC,gBAAgB,CAAC,CAAC;QACtC,MAAM,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;QACtC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,EAAE,IAAI,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,OAAO,CAC5D,CAAC,WAAW,EAAE,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,UAAU,CAAC,CAAC,IAAI,EAAE,CAChE,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
package/dist/esm/src/dto/controllers/configuration/GetConfigurationControllerResponseDTO.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GetConfigurationControllerResponseDTO.d.ts","sourceRoot":"","sources":["../../../../../../src/dto/controllers/configuration/GetConfigurationControllerResponseDTO.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,qBAAqB,EAAE,MAAM,WAAW,CAAC;AAElD,MAAM,MAAM,qCAAqC,GAAG,SAAS;IAC3D,GAAG;IACH,qBAAqB;CACtB,CAAC"}
|
package/dist/esm/src/dto/controllers/configuration/GetConfigurationControllerResponseDTO.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GetConfigurationControllerResponseDTO.js","sourceRoot":"","sources":["../../../../../../src/dto/controllers/configuration/GetConfigurationControllerResponseDTO.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"configuration.d.ts","sourceRoot":"","sources":["../../../../../../src/router/api/v1/configuration.ts"],"names":[],"mappings":"AAUA,OAAO,EAAE,kBAAkB,EAAE,MAAM,oCAAoC,CAAC;AAGxE,eAAO,MAAM,aAAa,EAAE,kBAU3B,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { EControllerRequestMethod } from '../../../lib/controller/types/index.js';
|
|
2
|
+
import { getConfigurationController } from '../../../controllers/configuration/getConfigurationController.js';
|
|
3
|
+
export const configuration = {
|
|
4
|
+
path: 'config',
|
|
5
|
+
tags: ['Configuration'],
|
|
6
|
+
resource: [
|
|
7
|
+
{
|
|
8
|
+
handler: getConfigurationController,
|
|
9
|
+
method: EControllerRequestMethod.GET,
|
|
10
|
+
payload: [],
|
|
11
|
+
},
|
|
12
|
+
],
|
|
13
|
+
};
|
|
14
|
+
//# sourceMappingURL=configuration.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"configuration.js","sourceRoot":"","sources":["../../../../../../src/router/api/v1/configuration.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,wBAAwB,EAAE,MAAM,wCAAwC,CAAC;AAElF,OAAO,EAAE,0BAA0B,EAAE,MAAM,kEAAkE,CAAC;AAE9G,MAAM,CAAC,MAAM,aAAa,GAAuB;IAC/C,IAAI,EAAE,QAAQ;IACd,IAAI,EAAE,CAAC,eAAe,CAAC;IACvB,QAAQ,EAAE;QACR;YACE,OAAO,EAAE,0BAA0B;YACnC,MAAM,EAAE,wBAAwB,CAAC,GAAG;YACpC,OAAO,EAAE,EAAE;SACZ;KACF;CACF,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/router/api/v1/index.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,kBAAkB,EAAE,MAAM,oCAAoC,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/router/api/v1/index.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,kBAAkB,EAAE,MAAM,oCAAoC,CAAC;AAOxE,eAAO,MAAM,EAAE,EAAE,kBAGhB,CAAC"}
|
|
@@ -2,8 +2,9 @@ import { exchanges } from './exchanges.js';
|
|
|
2
2
|
import { messages } from './messages.js';
|
|
3
3
|
import { namespaces } from './namespaces.js';
|
|
4
4
|
import { queues } from './queues.js';
|
|
5
|
+
import { configuration } from './configuration.js';
|
|
5
6
|
export const v1 = {
|
|
6
7
|
path: 'v1',
|
|
7
|
-
resource: [queues, namespaces, messages, exchanges],
|
|
8
|
+
resource: [configuration, queues, namespaces, messages, exchanges],
|
|
8
9
|
};
|
|
9
10
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/router/api/v1/index.ts"],"names":[],"mappings":"AAUA,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/router/api/v1/index.ts"],"names":[],"mappings":"AAUA,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAEnD,MAAM,CAAC,MAAM,EAAE,GAAuB;IACpC,IAAI,EAAE,IAAI;IACV,QAAQ,EAAE,CAAC,aAAa,EAAE,MAAM,EAAE,UAAU,EAAE,QAAQ,EAAE,SAAS,CAAC;CACnE,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Configuration } from 'redis-smq';
|
|
2
|
+
export declare class ConfigurationService {
|
|
3
|
+
protected configuration: {
|
|
4
|
+
loadAsync: () => Promise<import("redis-smq").IRedisSMQParsedConfig>;
|
|
5
|
+
saveAsync: ((config: import("redis-smq").IRedisSMQConfig) => Promise<undefined>) | ((config: import("redis-smq").IRedisSMQConfig) => Promise<void>);
|
|
6
|
+
saveCurrentConfigAsync: (() => Promise<undefined>) | (() => Promise<void>);
|
|
7
|
+
resetAsync: (() => Promise<undefined>) | (() => Promise<void>);
|
|
8
|
+
updateConfigAsync: ((updates: import("redis-smq").IRedisSMQConfig) => Promise<undefined>) | ((updates: import("redis-smq").IRedisSMQConfig) => Promise<void>);
|
|
9
|
+
existsAsync: (() => Promise<false>) | (() => Promise<true>);
|
|
10
|
+
} & Configuration;
|
|
11
|
+
constructor(configuration: Configuration);
|
|
12
|
+
getConfiguration(): Promise<import("redis-smq").IRedisSMQParsedConfig>;
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=ConfigurationService.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ConfigurationService.d.ts","sourceRoot":"","sources":["../../../../src/services/ConfigurationService.ts"],"names":[],"mappings":"AAUA,OAAO,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAI1C,qBAAa,oBAAoB;IAC/B,SAAS,CAAC,aAAa;;;;;;;sBAAC;gBAEZ,aAAa,EAAE,aAAa;IAIlC,gBAAgB;CAGvB"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import bluebird from 'bluebird';
|
|
2
|
+
const { promisifyAll } = bluebird;
|
|
3
|
+
export class ConfigurationService {
|
|
4
|
+
configuration;
|
|
5
|
+
constructor(configuration) {
|
|
6
|
+
this.configuration = promisifyAll(configuration);
|
|
7
|
+
}
|
|
8
|
+
async getConfiguration() {
|
|
9
|
+
return this.configuration.getConfig();
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=ConfigurationService.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ConfigurationService.js","sourceRoot":"","sources":["../../../../src/services/ConfigurationService.ts"],"names":[],"mappings":"AASA,OAAO,QAAQ,MAAM,UAAU,CAAC;AAGhC,MAAM,EAAE,YAAY,EAAE,GAAG,QAAQ,CAAC;AAElC,MAAM,OAAO,oBAAoB;IACrB,aAAa,CAAC;IAExB,YAAY,aAA4B;QACtC,IAAI,CAAC,aAAa,GAAG,YAAY,CAAC,aAAa,CAAC,CAAC;IACnD,CAAC;IAED,KAAK,CAAC,gBAAgB;QACpB,OAAO,IAAI,CAAC,aAAa,CAAC,SAAS,EAAE,CAAC;IACxC,CAAC;CACF"}
|
package/dist/schema.json
CHANGED
|
@@ -1739,6 +1739,147 @@
|
|
|
1739
1739
|
}
|
|
1740
1740
|
]
|
|
1741
1741
|
},
|
|
1742
|
+
"GetConfigurationControllerResponseDTO": {
|
|
1743
|
+
"items": [
|
|
1744
|
+
{
|
|
1745
|
+
"const": 200,
|
|
1746
|
+
"type": "number"
|
|
1747
|
+
},
|
|
1748
|
+
{
|
|
1749
|
+
"properties": {
|
|
1750
|
+
"eventBus": {
|
|
1751
|
+
"properties": {
|
|
1752
|
+
"enabled": {
|
|
1753
|
+
"type": "boolean"
|
|
1754
|
+
}
|
|
1755
|
+
},
|
|
1756
|
+
"required": [
|
|
1757
|
+
"enabled"
|
|
1758
|
+
],
|
|
1759
|
+
"type": "object"
|
|
1760
|
+
},
|
|
1761
|
+
"logger": {
|
|
1762
|
+
"properties": {
|
|
1763
|
+
"enabled": {
|
|
1764
|
+
"type": "boolean"
|
|
1765
|
+
},
|
|
1766
|
+
"options": {
|
|
1767
|
+
"properties": {
|
|
1768
|
+
"colorize": {
|
|
1769
|
+
"type": "boolean"
|
|
1770
|
+
},
|
|
1771
|
+
"includeTimestamp": {
|
|
1772
|
+
"type": "boolean"
|
|
1773
|
+
},
|
|
1774
|
+
"logLevel": {
|
|
1775
|
+
"enum": [
|
|
1776
|
+
0,
|
|
1777
|
+
1,
|
|
1778
|
+
2,
|
|
1779
|
+
3,
|
|
1780
|
+
"DEBUG",
|
|
1781
|
+
"ERROR",
|
|
1782
|
+
"INFO",
|
|
1783
|
+
"WARN"
|
|
1784
|
+
]
|
|
1785
|
+
}
|
|
1786
|
+
},
|
|
1787
|
+
"type": "object"
|
|
1788
|
+
}
|
|
1789
|
+
},
|
|
1790
|
+
"type": "object"
|
|
1791
|
+
},
|
|
1792
|
+
"messages": {
|
|
1793
|
+
"properties": {
|
|
1794
|
+
"store": {
|
|
1795
|
+
"properties": {
|
|
1796
|
+
"acknowledged": {
|
|
1797
|
+
"properties": {
|
|
1798
|
+
"expire": {
|
|
1799
|
+
"type": "number"
|
|
1800
|
+
},
|
|
1801
|
+
"queueSize": {
|
|
1802
|
+
"type": "number"
|
|
1803
|
+
},
|
|
1804
|
+
"store": {
|
|
1805
|
+
"type": "boolean"
|
|
1806
|
+
}
|
|
1807
|
+
},
|
|
1808
|
+
"required": [
|
|
1809
|
+
"expire",
|
|
1810
|
+
"queueSize",
|
|
1811
|
+
"store"
|
|
1812
|
+
],
|
|
1813
|
+
"type": "object"
|
|
1814
|
+
},
|
|
1815
|
+
"deadLettered": {
|
|
1816
|
+
"properties": {
|
|
1817
|
+
"expire": {
|
|
1818
|
+
"type": "number"
|
|
1819
|
+
},
|
|
1820
|
+
"queueSize": {
|
|
1821
|
+
"type": "number"
|
|
1822
|
+
},
|
|
1823
|
+
"store": {
|
|
1824
|
+
"type": "boolean"
|
|
1825
|
+
}
|
|
1826
|
+
},
|
|
1827
|
+
"required": [
|
|
1828
|
+
"expire",
|
|
1829
|
+
"queueSize",
|
|
1830
|
+
"store"
|
|
1831
|
+
],
|
|
1832
|
+
"type": "object"
|
|
1833
|
+
}
|
|
1834
|
+
},
|
|
1835
|
+
"required": [
|
|
1836
|
+
"acknowledged",
|
|
1837
|
+
"deadLettered"
|
|
1838
|
+
],
|
|
1839
|
+
"type": "object"
|
|
1840
|
+
}
|
|
1841
|
+
},
|
|
1842
|
+
"required": [
|
|
1843
|
+
"store"
|
|
1844
|
+
],
|
|
1845
|
+
"type": "object"
|
|
1846
|
+
},
|
|
1847
|
+
"namespace": {
|
|
1848
|
+
"type": "string"
|
|
1849
|
+
},
|
|
1850
|
+
"redis": {
|
|
1851
|
+
"properties": {
|
|
1852
|
+
"client": {
|
|
1853
|
+
"enum": [
|
|
1854
|
+
"ioredis",
|
|
1855
|
+
"redis"
|
|
1856
|
+
],
|
|
1857
|
+
"type": "string"
|
|
1858
|
+
},
|
|
1859
|
+
"options": {
|
|
1860
|
+
"type": "object"
|
|
1861
|
+
}
|
|
1862
|
+
},
|
|
1863
|
+
"required": [
|
|
1864
|
+
"client"
|
|
1865
|
+
],
|
|
1866
|
+
"type": "object"
|
|
1867
|
+
}
|
|
1868
|
+
},
|
|
1869
|
+
"required": [
|
|
1870
|
+
"eventBus",
|
|
1871
|
+
"logger",
|
|
1872
|
+
"messages",
|
|
1873
|
+
"namespace",
|
|
1874
|
+
"redis"
|
|
1875
|
+
],
|
|
1876
|
+
"type": "object"
|
|
1877
|
+
}
|
|
1878
|
+
],
|
|
1879
|
+
"maxItems": 2,
|
|
1880
|
+
"minItems": 2,
|
|
1881
|
+
"type": "array"
|
|
1882
|
+
},
|
|
1742
1883
|
"GetConsumerGroupPendingMessagesControllerRequestPathDTO": {
|
|
1743
1884
|
"properties": {
|
|
1744
1885
|
"consumerGroupId": {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "redis-smq-rest-api",
|
|
3
|
-
"version": "9.0.0-next.
|
|
3
|
+
"version": "9.0.0-next.6",
|
|
4
4
|
"description": "REST API for RedisSMQ: OpenAPI 3 schema and Swagger UI for managing queues, messages, and consumers.",
|
|
5
5
|
"author": "Weyoss <weyoss@protonmail.com>",
|
|
6
6
|
"license": "MIT",
|
|
@@ -50,26 +50,26 @@
|
|
|
50
50
|
"@koa/bodyparser": "6.0.0",
|
|
51
51
|
"@koa/cors": "5.0.0",
|
|
52
52
|
"@koa/router": "14.0.0",
|
|
53
|
-
"@openapi-contrib/json-schema-to-openapi-schema": "
|
|
53
|
+
"@openapi-contrib/json-schema-to-openapi-schema": "4.2.0",
|
|
54
54
|
"ajv": "8.17.1",
|
|
55
|
-
"awilix": "
|
|
55
|
+
"awilix": "12.0.5",
|
|
56
56
|
"bluebird": "3.7.2",
|
|
57
|
-
"commander": "
|
|
57
|
+
"commander": "14.0.1",
|
|
58
58
|
"json-schema": "0.4.0",
|
|
59
59
|
"koa": "3.0.1",
|
|
60
|
-
"koa-mount": "4.
|
|
60
|
+
"koa-mount": "4.2.0",
|
|
61
61
|
"koa-static": "5.0.0",
|
|
62
62
|
"lodash": "4.17.21",
|
|
63
|
-
"swagger-ui-dist": "5.
|
|
64
|
-
"tmp": "0.2.
|
|
63
|
+
"swagger-ui-dist": "5.29.4",
|
|
64
|
+
"tmp": "0.2.5",
|
|
65
65
|
"typescript-json-schema": "0.65.1",
|
|
66
|
-
"uuid": "
|
|
66
|
+
"uuid": "13.0.0"
|
|
67
67
|
},
|
|
68
68
|
"peerDependencies": {
|
|
69
|
-
"@redis/client": "^
|
|
70
|
-
"ioredis": "^5
|
|
71
|
-
"redis-smq": "^9.0.0-next.
|
|
72
|
-
"redis-smq-common": "^9.0.0-next.
|
|
69
|
+
"@redis/client": "^5",
|
|
70
|
+
"ioredis": "^5",
|
|
71
|
+
"redis-smq": "^9.0.0-next.6",
|
|
72
|
+
"redis-smq-common": "^9.0.0-next.6"
|
|
73
73
|
},
|
|
74
74
|
"peerDependenciesMeta": {
|
|
75
75
|
"@redis/client": {
|