redis-smq-rest-api 9.0.0-next.8 → 9.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +71 -0
- package/README.md +12 -164
- package/dist/cjs/src/controllers/configuration/getConfigurationController.test.js +1 -1
- package/dist/cjs/src/controllers/configuration/getConfigurationController.test.js.map +1 -1
- package/dist/cjs/src/errors/errors.d.ts +3 -3
- package/dist/cjs/src/errors/errors.js +5 -5
- package/dist/cjs/src/errors/errors.js.map +1 -1
- package/dist/cjs/src/index.d.ts +0 -1
- package/dist/cjs/src/index.d.ts.map +1 -1
- package/dist/cjs/src/index.js +32 -36
- package/dist/cjs/src/index.js.map +1 -1
- package/dist/esm/src/controllers/configuration/getConfigurationController.test.js +1 -1
- package/dist/esm/src/controllers/configuration/getConfigurationController.test.js.map +1 -1
- package/dist/esm/src/errors/errors.d.ts +3 -3
- package/dist/esm/src/errors/errors.js +5 -5
- package/dist/esm/src/errors/errors.js.map +1 -1
- package/dist/esm/src/index.d.ts +0 -1
- package/dist/esm/src/index.d.ts.map +1 -1
- package/dist/esm/src/index.js +31 -35
- package/dist/esm/src/index.js.map +1 -1
- package/dist/schema.json +62 -70
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,77 @@
|
|
|
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](https://github.com/weyoss/redis-smq/compare/v9.0.0-next.18...v9.0.0) (2025-11-07)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package redis-smq-rest-api
|
|
9
|
+
|
|
10
|
+
## [9.0.0-next.18](https://github.com/weyoss/redis-smq/compare/v9.0.0-next.17...v9.0.0-next.18) (2025-11-07)
|
|
11
|
+
|
|
12
|
+
### 📝 Documentation
|
|
13
|
+
|
|
14
|
+
- convert relative paths to absolute URLs in package READMEs ([ad5da5f](https://github.com/weyoss/redis-smq/commit/ad5da5f14aeb01822e560e7e15473dc27518e80a))
|
|
15
|
+
|
|
16
|
+
## [9.0.0-next.17](https://github.com/weyoss/redis-smq/compare/v9.0.0-next.16...v9.0.0-next.17) (2025-11-07)
|
|
17
|
+
|
|
18
|
+
### 📝 Documentation
|
|
19
|
+
|
|
20
|
+
- **redis-smq-rest-api:** restructure README, move details to separate files ([2a5e5d9](https://github.com/weyoss/redis-smq/commit/2a5e5d9a4644e9d1ce490262e7682a83e9dc0e00))
|
|
21
|
+
- standardize documentation links to use relative paths ([fc7c474](https://github.com/weyoss/redis-smq/commit/fc7c474bffbd2160fb9bb8727cec4bbdc5a23dc8))
|
|
22
|
+
|
|
23
|
+
## [9.0.0-next.16](https://github.com/weyoss/redis-smq/compare/v9.0.0-next.15...v9.0.0-next.16) (2025-11-05)
|
|
24
|
+
|
|
25
|
+
### ♻️ Code Refactoring
|
|
26
|
+
|
|
27
|
+
- **redis-smq-rest-api:** remove QueueExplorerError from API error list ([687e116](https://github.com/weyoss/redis-smq/commit/687e1165ac9b17c5d331b7ff4b42b59f7ac5db17))
|
|
28
|
+
|
|
29
|
+
## [9.0.0-next.15](https://github.com/weyoss/redis-smq/compare/v9.0.0-next.14...v9.0.0-next.15) (2025-10-31)
|
|
30
|
+
|
|
31
|
+
### ♻️ Code Refactoring
|
|
32
|
+
|
|
33
|
+
- **redis-smq-rest-api:** update message audit config and error classes ([03bbced](https://github.com/weyoss/redis-smq/commit/03bbced8a687fbf41cbaae57aa455318b5db4da5))
|
|
34
|
+
|
|
35
|
+
### ✅ Tests
|
|
36
|
+
|
|
37
|
+
- **redis-smq-rest-api:** fix expected configuration object keys ([d72049a](https://github.com/weyoss/redis-smq/commit/d72049a7aa0e82823b491ad053088cb446d37642))
|
|
38
|
+
|
|
39
|
+
## [9.0.0-next.14](https://github.com/weyoss/redis-smq/compare/v9.0.0-next.13...v9.0.0-next.14) (2025-10-28)
|
|
40
|
+
|
|
41
|
+
### ⚠ BREAKING CHANGES
|
|
42
|
+
|
|
43
|
+
- **redis-smq-rest-api:** reorganize Swagger UI routing
|
|
44
|
+
|
|
45
|
+
### ♻️ Code Refactoring
|
|
46
|
+
|
|
47
|
+
- **redis-smq-rest-api:** reorganize Swagger UI routing ([e36f455](https://github.com/weyoss/redis-smq/commit/e36f455134b994ec8278654443d2e8e6d0d5d3c6))
|
|
48
|
+
|
|
49
|
+
## [9.0.0-next.13](https://github.com/weyoss/redis-smq/compare/v9.0.0-next.12...v9.0.0-next.13) (2025-10-28)
|
|
50
|
+
|
|
51
|
+
### 🚀 Chore
|
|
52
|
+
|
|
53
|
+
- **redis-smq-rest-api:** fix security vulnerabilities by upgrading koa to v3.1.1 ([35c7534](https://github.com/weyoss/redis-smq/commit/35c75343da3f04a6512916a563633088f6b82b9f))
|
|
54
|
+
|
|
55
|
+
## [9.0.0-next.12](https://github.com/weyoss/redis-smq/compare/v9.0.0-next.11...v9.0.0-next.12) (2025-10-27)
|
|
56
|
+
|
|
57
|
+
### 📝 Documentation
|
|
58
|
+
|
|
59
|
+
- fix license section formatting and standardize project names ([abbdbda](https://github.com/weyoss/redis-smq/commit/abbdbdae6fc42f0a9353b7cd786386a98e6e850d))
|
|
60
|
+
|
|
61
|
+
## [9.0.0-next.11](https://github.com/weyoss/redis-smq/compare/v9.0.0-next.10...v9.0.0-next.11) (2025-10-27)
|
|
62
|
+
|
|
63
|
+
### 🐛 Bug Fixes
|
|
64
|
+
|
|
65
|
+
- correct codecov badge URL format ([3ebb5c8](https://github.com/weyoss/redis-smq/commit/3ebb5c8ba8a7f9902de054d7aaf0c1fc572fb9a6))
|
|
66
|
+
|
|
67
|
+
## [9.0.0-next.10](https://github.com/weyoss/redis-smq/compare/v9.0.0-next.9...v9.0.0-next.10) (2025-10-26)
|
|
68
|
+
|
|
69
|
+
### 🐛 Bug Fixes
|
|
70
|
+
|
|
71
|
+
- **redis-smq-rest-api:** add missing RoutingKeyRequiredError to error mappings ([1f46aed](https://github.com/weyoss/redis-smq/commit/1f46aedb5a7cffd2c936316d5cef31a4927f3934))
|
|
72
|
+
|
|
73
|
+
## [9.0.0-next.9](https://github.com/weyoss/redis-smq/compare/v9.0.0-next.8...v9.0.0-next.9) (2025-10-21)
|
|
74
|
+
|
|
75
|
+
**Note:** Version bump only for package redis-smq-rest-api
|
|
76
|
+
|
|
6
77
|
## [9.0.0-next.8](https://github.com/weyoss/redis-smq/compare/v9.0.0-next.7...v9.0.0-next.8) (2025-10-18)
|
|
7
78
|
|
|
8
79
|
**Note:** Version bump only for package redis-smq-rest-api
|
package/README.md
CHANGED
|
@@ -1,15 +1,7 @@
|
|
|
1
1
|
# RedisSMQ REST API
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
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)
|
|
3
|
+
[](https://www.npmjs.com/package/redis-smq-rest-api?activeTab=versions)
|
|
4
|
+
[](https://app.codecov.io/github/weyoss/redis-smq/tree/master/packages/redis-smq-rest-api)
|
|
13
5
|
|
|
14
6
|
RedisSMQ REST API provides an HTTP interface enabling any web-capable application to interact with the RedisSMQ message
|
|
15
7
|
queue using a RESTful API.
|
|
@@ -26,7 +18,7 @@ queue using a RESTful API.
|
|
|
26
18
|
|
|
27
19
|
```bash
|
|
28
20
|
# Using npm
|
|
29
|
-
npm install redis-smq@
|
|
21
|
+
npm install redis-smq@latest redis-smq-common@latest redis-smq-rest-api@latest --save
|
|
30
22
|
```
|
|
31
23
|
|
|
32
24
|
Don't forget to install a Redis client. Choose either node-redis or ioredis:
|
|
@@ -39,163 +31,19 @@ npm install ioredis --save
|
|
|
39
31
|
|
|
40
32
|
## Version Compatibility
|
|
41
33
|
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
```bash
|
|
45
|
-
npm install redis-smq@x.x.x redis-smq-rest-api@x.x.x redis-smq-common@x.x.x
|
|
46
|
-
```
|
|
47
|
-
|
|
48
|
-
See [version compatibility](/packages/redis-smq/docs/version-compatibility.md) for details.
|
|
49
|
-
|
|
50
|
-
## Configuration
|
|
51
|
-
|
|
52
|
-
The REST API configuration extends the base [RedisSMQ configuration](/packages/redis-smq/docs/configuration.md) with additional API server settings.
|
|
53
|
-
|
|
54
|
-
### Configuration Options
|
|
55
|
-
|
|
56
|
-
```typescript
|
|
57
|
-
export interface IRedisSMQHttpApiConfig extends IRedisSMQConfig {
|
|
58
|
-
apiServer?: {
|
|
59
|
-
// Port to run the REST API on. Default: 7210
|
|
60
|
-
port?: number;
|
|
61
|
-
|
|
62
|
-
// Base path to mount the REST API and docs under. Default: '/'
|
|
63
|
-
basePath?: string;
|
|
64
|
-
};
|
|
65
|
-
}
|
|
66
|
-
```
|
|
67
|
-
|
|
68
|
-
### Configuration Examples
|
|
69
|
-
|
|
70
|
-
```typescript
|
|
71
|
-
import { ERedisConfigClient, EConsoleLoggerLevel } from 'redis-smq-common';
|
|
72
|
-
|
|
73
|
-
const config = {
|
|
74
|
-
apiServer: {
|
|
75
|
-
port: 7210,
|
|
76
|
-
basePath: '/', // API at '/', Swagger at '/docs'
|
|
77
|
-
},
|
|
78
|
-
redis: {
|
|
79
|
-
client: ERedisConfigClient.IOREDIS,
|
|
80
|
-
options: {
|
|
81
|
-
host: '127.0.0.1',
|
|
82
|
-
port: 6379,
|
|
83
|
-
db: 0,
|
|
84
|
-
},
|
|
85
|
-
},
|
|
86
|
-
logger: {
|
|
87
|
-
enabled: true,
|
|
88
|
-
options: {
|
|
89
|
-
logLevel: EConsoleLoggerLevel.INFO, // or 'INFO'
|
|
90
|
-
},
|
|
91
|
-
},
|
|
92
|
-
};
|
|
93
|
-
```
|
|
94
|
-
|
|
95
|
-
## Programmatic Usage
|
|
96
|
-
|
|
97
|
-
The RedisSMQRestApi class can be used as a standalone server or embedded as middleware in an existing Express application.
|
|
98
|
-
|
|
99
|
-
### Standalone Server
|
|
100
|
-
|
|
101
|
-
This mode starts an HTTP server that listens on the configured port.
|
|
102
|
-
|
|
103
|
-
```typescript
|
|
104
|
-
import { RedisSMQRestApi } from 'redis-smq-rest-api';
|
|
105
|
-
import { ERedisConfigClient } from 'redis-smq-common';
|
|
106
|
-
|
|
107
|
-
const api = new RedisSMQRestApi({
|
|
108
|
-
apiServer: { port: 7210 },
|
|
109
|
-
redis: {
|
|
110
|
-
client: ERedisConfigClient.IOREDIS,
|
|
111
|
-
options: { host: '127.0.0.1', port: 6379, db: 0 },
|
|
112
|
-
},
|
|
113
|
-
});
|
|
114
|
-
|
|
115
|
-
await api.run();
|
|
116
|
-
```
|
|
117
|
-
|
|
118
|
-
### Embedded Middleware
|
|
119
|
-
|
|
120
|
-
To integrate into an existing Express app, instantiate RedisSMQRestApi with false as the second argument to prevent it
|
|
121
|
-
from starting its own listener. Then, use getApplication() to get the middleware.
|
|
122
|
-
|
|
123
|
-
```javascript
|
|
124
|
-
import express from 'express';
|
|
125
|
-
import { RedisSMQRestApi } from 'redis-smq-rest-api';
|
|
126
|
-
import { ERedisConfigClient } from 'redis-smq-common';
|
|
127
|
-
|
|
128
|
-
const app = express();
|
|
129
|
-
const api = new RedisSMQRestApi(
|
|
130
|
-
{
|
|
131
|
-
apiServer: { basePath: '/api' }, // port is ignored
|
|
132
|
-
redis: { client: ERedisConfigClient.IOREDIS },
|
|
133
|
-
},
|
|
134
|
-
false, // <-- disable listener
|
|
135
|
-
);
|
|
34
|
+
Always install matching versions of RedisSMQ packages to ensure compatibility. See [version compatibility](https://github.com/weyoss/redis-smq/tree/master/packages/redis-smq/docs/version-compatibility.md) for details.
|
|
136
35
|
|
|
137
|
-
|
|
138
|
-
app.use(restApiMiddleware);
|
|
36
|
+
## Documentation
|
|
139
37
|
|
|
140
|
-
|
|
141
|
-
console.log('Host app listening on http://localhost:3000'),
|
|
142
|
-
);
|
|
143
|
-
```
|
|
144
|
-
|
|
145
|
-
## Usage from CLI
|
|
146
|
-
|
|
147
|
-
The REST API server can be started directly from your terminal after installation.
|
|
148
|
-
|
|
149
|
-
```shell
|
|
150
|
-
npx redis-smq-rest-api
|
|
151
|
-
```
|
|
152
|
-
|
|
153
|
-
### CLI Options
|
|
154
|
-
|
|
155
|
-
You can override the default configuration using the following command-line arguments:
|
|
156
|
-
|
|
157
|
-
```shell
|
|
158
|
-
-p, --port <number> Port to run the REST API on (default: "7210")
|
|
159
|
-
-b, --base-path <string> Base path to mount the REST API under (default: "/")
|
|
160
|
-
-c, --redis-client <ioredis|redis> Redis client. Valid options are: ioredis, redis. (default: "ioredis")
|
|
161
|
-
-r, --redis-host <string> Redis server host (default: "127.0.0.1")
|
|
162
|
-
-o, --redis-port <number> Redis server port (default: "6379")
|
|
163
|
-
-d, --redis-db <number> Redis database number (default: "0")
|
|
164
|
-
-e, --enable-log <0|1> Enable console logging: 0 (disabled), 1 (enabled) (default: "0")
|
|
165
|
-
-v, --log-level <0|1|2|3> Log level. Numbers: 0=DEBUG, 1=INFO, 2=WARN, 3=ERROR (default: "1")
|
|
166
|
-
-h, --help Display help for command
|
|
167
|
-
```
|
|
168
|
-
|
|
169
|
-
### CLI Examples
|
|
170
|
-
|
|
171
|
-
Starting the server on a specific port and connecting to a different Redis instance:
|
|
172
|
-
|
|
173
|
-
```shell
|
|
174
|
-
npx redis-smq-rest-api --port 8000 --redis-host 10.0.0.5 --redis-port 6380
|
|
175
|
-
```
|
|
176
|
-
|
|
177
|
-
## API Documentation
|
|
178
|
-
|
|
179
|
-
### Swagger UI
|
|
180
|
-
|
|
181
|
-
Access the interactive API documentation at:
|
|
182
|
-
|
|
183
|
-
```text
|
|
184
|
-
http://<HOSTNAME>:<PORT>/docs
|
|
185
|
-
```
|
|
186
|
-
|
|
187
|
-
### OpenAPI Specification
|
|
188
|
-
|
|
189
|
-
Download the OpenAPI specification at:
|
|
190
|
-
|
|
191
|
-
```text
|
|
192
|
-
http://<HOSTNAME>:<PORT>/assets/openapi-specs.json
|
|
193
|
-
```
|
|
38
|
+
For in-depth guides and API references, see [the documentation page](https://github.com/weyoss/redis-smq/tree/master/packages/redis-smq-rest-api/docs/README.md):
|
|
194
39
|
|
|
195
|
-
##
|
|
40
|
+
## Related packages
|
|
196
41
|
|
|
197
|
-
|
|
42
|
+
- [redis-smq](https://github.com/weyoss/redis-smq/tree/master/packages/redis-smq/README.md): Core message queue
|
|
43
|
+
- [redis-smq-common](https://github.com/weyoss/redis-smq/tree/master/packages/redis-smq-common/README.md): Shared components/utilities
|
|
44
|
+
- [redis-smq-web-server](https://github.com/weyoss/redis-smq/tree/master/packages/redis-smq-web-server/README.md): Static hosting + in-process or proxied API
|
|
45
|
+
- [redis-smq-web-ui](https://github.com/weyoss/redis-smq/tree/master/packages/redis-smq-web-ui/README.md): SPA for monitoring and managing RedisSMQ
|
|
198
46
|
|
|
199
47
|
## License
|
|
200
48
|
|
|
201
|
-
|
|
49
|
+
RedisSMQ REST API is released under the [MIT License](https://github.com/weyoss/redis-smq/tree/master/LICENSE).
|
|
@@ -21,7 +21,7 @@ const config_js_1 = require("../../../tests/common/config.js");
|
|
|
21
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
22
|
const response1 = yield request.get('/api/v1/config');
|
|
23
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', '
|
|
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', 'messageAudit'].sort());
|
|
25
25
|
}));
|
|
26
26
|
});
|
|
27
27
|
//# sourceMappingURL=getConfigurationController.test.js.map
|
|
@@ -1 +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,
|
|
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,cAAc,CAAC,CAAC,IAAI,EAAE,CACpE,CAAC;IACJ,CAAC,CAAA,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export declare const errors: {
|
|
2
2
|
readonly ConfigurationError: readonly [400, "ConfigurationError"];
|
|
3
|
-
readonly
|
|
4
|
-
readonly
|
|
3
|
+
readonly ConfigurationMessageAuditExpireError: readonly [400, "ConfigurationMessageAuditExpireError"];
|
|
4
|
+
readonly ConfigurationMessageAuditQueueSizeError: readonly [400, "ConfigurationMessageAuditQueueSizeError"];
|
|
5
5
|
readonly ConfigurationNamespaceError: readonly [400, "ConfigurationNamespaceError"];
|
|
6
6
|
readonly ConsumerError: readonly [500, "ConsumerError"];
|
|
7
7
|
readonly ConsumerGroupNotEmptyError: readonly [409, "ConsumerGroupNotEmptyError"];
|
|
@@ -47,7 +47,6 @@ export declare const errors: {
|
|
|
47
47
|
readonly QueueAlreadyBound: readonly [500, "QueueAlreadyBound"];
|
|
48
48
|
readonly QueueAlreadyExistsError: readonly [409, "QueueAlreadyExistsError"];
|
|
49
49
|
readonly QueueDeliveryModelMismatchError: readonly [500, "QueueDeliveryModelMismatchError"];
|
|
50
|
-
readonly QueueExplorerError: readonly [500, "QueueExplorerError"];
|
|
51
50
|
readonly QueueHasBoundExchangesError: readonly [500, "QueueHasBoundExchangesError"];
|
|
52
51
|
readonly QueueHasNoConsumerGroupsError: readonly [500, "QueueHasNoConsumerGroupsError"];
|
|
53
52
|
readonly QueueManagerActiveConsumersError: readonly [500, "QueueManagerActiveConsumersError"];
|
|
@@ -58,6 +57,7 @@ export declare const errors: {
|
|
|
58
57
|
readonly QueueRateLimitError: readonly [429, "QueueRateLimitError"];
|
|
59
58
|
readonly RedisKeysError: readonly [500, "RedisKeysError"];
|
|
60
59
|
readonly RedisKeysInvalidKeyError: readonly [400, "RedisKeysInvalidKeyError"];
|
|
60
|
+
readonly RoutingKeyRequiredError: readonly [400, "RoutingKeyRequiredError"];
|
|
61
61
|
readonly UnknownQueueTypeError: readonly [500, "UnknownQueueTypeError"];
|
|
62
62
|
};
|
|
63
63
|
export type TErrors = typeof errors;
|
|
@@ -3,13 +3,13 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.errors = void 0;
|
|
4
4
|
exports.errors = {
|
|
5
5
|
ConfigurationError: [400, 'ConfigurationError'],
|
|
6
|
-
|
|
6
|
+
ConfigurationMessageAuditExpireError: [
|
|
7
7
|
400,
|
|
8
|
-
'
|
|
8
|
+
'ConfigurationMessageAuditExpireError',
|
|
9
9
|
],
|
|
10
|
-
|
|
10
|
+
ConfigurationMessageAuditQueueSizeError: [
|
|
11
11
|
400,
|
|
12
|
-
'
|
|
12
|
+
'ConfigurationMessageAuditQueueSizeError',
|
|
13
13
|
],
|
|
14
14
|
ConfigurationNamespaceError: [400, 'ConfigurationNamespaceError'],
|
|
15
15
|
ConsumerError: [500, 'ConsumerError'],
|
|
@@ -74,7 +74,6 @@ exports.errors = {
|
|
|
74
74
|
QueueAlreadyBound: [500, 'QueueAlreadyBound'],
|
|
75
75
|
QueueAlreadyExistsError: [409, 'QueueAlreadyExistsError'],
|
|
76
76
|
QueueDeliveryModelMismatchError: [500, 'QueueDeliveryModelMismatchError'],
|
|
77
|
-
QueueExplorerError: [500, 'QueueExplorerError'],
|
|
78
77
|
QueueHasBoundExchangesError: [500, 'QueueHasBoundExchangesError'],
|
|
79
78
|
QueueHasNoConsumerGroupsError: [500, 'QueueHasNoConsumerGroupsError'],
|
|
80
79
|
QueueManagerActiveConsumersError: [500, 'QueueManagerActiveConsumersError'],
|
|
@@ -85,6 +84,7 @@ exports.errors = {
|
|
|
85
84
|
QueueRateLimitError: [429, 'QueueRateLimitError'],
|
|
86
85
|
RedisKeysError: [500, 'RedisKeysError'],
|
|
87
86
|
RedisKeysInvalidKeyError: [400, 'RedisKeysInvalidKeyError'],
|
|
87
|
+
RoutingKeyRequiredError: [400, 'RoutingKeyRequiredError'],
|
|
88
88
|
UnknownQueueTypeError: [500, 'UnknownQueueTypeError'],
|
|
89
89
|
};
|
|
90
90
|
//# sourceMappingURL=errors.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.js","sourceRoot":"","sources":["../../../../src/errors/errors.ts"],"names":[],"mappings":";;;AAgBa,QAAA,MAAM,GAAG;IACpB,kBAAkB,EAAE,CAAC,GAAG,EAAE,oBAAoB,CAAC;IAC/C,
|
|
1
|
+
{"version":3,"file":"errors.js","sourceRoot":"","sources":["../../../../src/errors/errors.ts"],"names":[],"mappings":";;;AAgBa,QAAA,MAAM,GAAG;IACpB,kBAAkB,EAAE,CAAC,GAAG,EAAE,oBAAoB,CAAC;IAC/C,oCAAoC,EAAE;QACpC,GAAG;QACH,sCAAsC;KACvC;IACD,uCAAuC,EAAE;QACvC,GAAG;QACH,yCAAyC;KAC1C;IACD,2BAA2B,EAAE,CAAC,GAAG,EAAE,6BAA6B,CAAC;IACjE,aAAa,EAAE,CAAC,GAAG,EAAE,eAAe,CAAC;IACrC,0BAA0B,EAAE,CAAC,GAAG,EAAE,4BAA4B,CAAC;IAC/D,0BAA0B,EAAE,CAAC,GAAG,EAAE,4BAA4B,CAAC;IAC/D,0BA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/C,kBAAkB,EAAE,CAAC,GAAG,EAAE,oBAAoB,CAAC;IAC/C,mBAAmB,EAAE,CAAC,GAAG,EAAE,qBAAqB,CAAC;IACjD,cAAc,EAAE,CAAC,GAAG,EAAE,gBAAgB,CAAC;IACvC,wBAAwB,EAAE,CAAC,GAAG,EAAE,0BAA0B,CAAC;IAC3D,uBAAuB,EAAE,CAAC,GAAG,EAAE,yBAAyB,CAAC;IACzD,qBAAqB,EAAE,CAAC,GAAG,EAAE,uBAAuB,CAAC;CAC7C,CAAC"}
|
package/dist/cjs/src/index.d.ts
CHANGED
|
@@ -13,7 +13,6 @@ export declare class RedisSMQRestApi {
|
|
|
13
13
|
constructor(config?: IRedisSMQRestApiConfig, runHttpServer?: boolean);
|
|
14
14
|
protected initApplicationMiddlewares(): Promise<void>;
|
|
15
15
|
protected initOpenApi(): Promise<void>;
|
|
16
|
-
protected logOpenApiUrls(): void;
|
|
17
16
|
protected initRouting(): Promise<void>;
|
|
18
17
|
protected bootstrap(): Promise<void>;
|
|
19
18
|
run(): Promise<void>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAaA,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAC7B,OAAO,GAAG,MAAM,KAAK,CAAC;AAKtB,OAAO,EAAgB,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAIzD,OAAO,EACL,sBAAsB,EACtB,4BAA4B,EAE7B,MAAM,mBAAmB,CAAC;AAG3B,OAAO,EACL,6BAA6B,EAC7B,2BAA2B,EAC5B,MAAM,kCAAkC,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAaA,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAC7B,OAAO,GAAG,MAAM,KAAK,CAAC;AAKtB,OAAO,EAAgB,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAIzD,OAAO,EACL,sBAAsB,EACtB,4BAA4B,EAE7B,MAAM,mBAAmB,CAAC;AAG3B,OAAO,EACL,6BAA6B,EAC7B,2BAA2B,EAC5B,MAAM,kCAAkC,CAAC;AAa1C,qBAAa,eAAe;IAC1B,SAAS,CAAC,GAAG,EAAE,GAAG,CAChB,2BAA2B,EAC3B,6BAA6B,CAC9B,CAAC;IACF,SAAS,CAAC,MAAM,EAAE,4BAA4B,CAAC;IAC/C,SAAS,CAAC,aAAa,EAAE,OAAO,CAAC;IACjC,SAAS,CAAC,MAAM,EAAE,OAAO,CAAC;IAC1B,SAAS,CAAC,UAAU,EAAE,IAAI,CAAC,MAAM,CAAC;IAClC,SAAS,CAAC,YAAY,UAAS;gBAEnB,MAAM,GAAE,sBAA2B,EAAE,aAAa,UAAO;cAgBrD,0BAA0B;cAmB1B,WAAW;cAyCX,WAAW;cAOX,SAAS;IAWnB,GAAG;IAkBH,cAAc;IAKd,QAAQ;CAQf"}
|
package/dist/cjs/src/index.js
CHANGED
|
@@ -86,35 +86,29 @@ class RedisSMQRestApi {
|
|
|
86
86
|
}
|
|
87
87
|
initOpenApi() {
|
|
88
88
|
return __awaiter(this, void 0, void 0, function* () {
|
|
89
|
-
this.
|
|
90
|
-
const
|
|
89
|
+
const { basePath } = this.config.apiServer;
|
|
90
|
+
const openApiFilename = constants_js_1.constants.openApiDocumentFilename;
|
|
91
|
+
this.logger.info('Initializing OpenAPI...');
|
|
92
|
+
const spec = yield (0, builder_js_1.generateOpenApiDocument)(routing_js_1.routing, basePath);
|
|
91
93
|
const tmpDir = yield tmpAsync.dirAsync();
|
|
92
94
|
yield (0, builder_js_1.saveOpenApiDocument)(spec, tmpDir);
|
|
93
|
-
const { basePath } = this.config.apiServer;
|
|
94
|
-
this.app.use((0, koa_mount_1.default)((0, path_1.join)(basePath, '/assets'), (0, koa_static_1.default)(tmpDir)));
|
|
95
95
|
const uiAssetsFsPath = (0, swagger_ui_dist_1.getAbsoluteFSPath)();
|
|
96
|
-
this.app.use((0, koa_mount_1.default)((0, path_1.join)(basePath, '/
|
|
97
|
-
|
|
98
|
-
const
|
|
99
|
-
const
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
ctx.
|
|
103
|
-
|
|
96
|
+
this.app.use((0, koa_mount_1.default)((0, path_1.join)(basePath, '/swagger/ui'), (0, koa_static_1.default)(uiAssetsFsPath)));
|
|
97
|
+
this.app.use((0, koa_mount_1.default)((0, path_1.join)(basePath, '/swagger/assets'), (0, koa_static_1.default)(tmpDir)));
|
|
98
|
+
const specUrl = (0, path_1.join)(basePath, '/swagger/assets', openApiFilename);
|
|
99
|
+
const uiAssetsUrl = (0, path_1.join)(basePath, '/swagger/ui');
|
|
100
|
+
const html = (0, swagger_ui_js_1.buildSwaggerUiHtml)(specUrl, uiAssetsUrl);
|
|
101
|
+
this.app.use((0, koa_mount_1.default)((0, path_1.join)(basePath, '/swagger'), (ctx) => {
|
|
102
|
+
if (ctx.path === '/' || ctx.path === '') {
|
|
103
|
+
ctx.type = 'text/html; charset=utf-8';
|
|
104
|
+
ctx.body = html;
|
|
105
|
+
}
|
|
106
|
+
}));
|
|
104
107
|
});
|
|
105
108
|
}
|
|
106
|
-
logOpenApiUrls() {
|
|
107
|
-
const { port, basePath } = this.config.apiServer;
|
|
108
|
-
const hostname = 'localhost';
|
|
109
|
-
const baseURL = `http://${hostname}:${port}${basePath === '/' ? '' : basePath}`;
|
|
110
|
-
const specsURL = `${baseURL}/assets/${constants_js_1.constants.openApiDocumentFilename}`;
|
|
111
|
-
this.logger.info(`OpenAPI specs are available at ${specsURL}`);
|
|
112
|
-
const docsURL = `${baseURL}/docs`;
|
|
113
|
-
this.logger.info(`SWAGGER UI is accessible from ${docsURL}`);
|
|
114
|
-
}
|
|
115
109
|
initRouting() {
|
|
116
110
|
return __awaiter(this, void 0, void 0, function* () {
|
|
117
|
-
this.logger.info(
|
|
111
|
+
this.logger.info('Registering routes...');
|
|
118
112
|
const appRouter = yield (0, index_js_2.registerResources)(routing_js_1.routing);
|
|
119
113
|
this.app.use(appRouter.routes());
|
|
120
114
|
this.app.use(appRouter.allowedMethods());
|
|
@@ -122,24 +116,26 @@ class RedisSMQRestApi {
|
|
|
122
116
|
}
|
|
123
117
|
bootstrap() {
|
|
124
118
|
return __awaiter(this, void 0, void 0, function* () {
|
|
125
|
-
if (
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
119
|
+
if (this.bootstrapped)
|
|
120
|
+
return;
|
|
121
|
+
yield RedisSMQAsync.initializeAsync(this.config.redis);
|
|
122
|
+
yield this.initApplicationMiddlewares();
|
|
123
|
+
yield this.initRouting();
|
|
124
|
+
yield this.initOpenApi();
|
|
125
|
+
this.bootstrapped = true;
|
|
132
126
|
});
|
|
133
127
|
}
|
|
134
128
|
run() {
|
|
135
129
|
return __awaiter(this, void 0, void 0, function* () {
|
|
136
130
|
yield this.bootstrap();
|
|
137
|
-
if (this.runHttpServer)
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
}
|
|
131
|
+
if (!this.runHttpServer)
|
|
132
|
+
return;
|
|
133
|
+
const { port, basePath } = this.config.apiServer;
|
|
134
|
+
yield new Promise((resolve) => this.httpServer.listen(port, () => resolve()));
|
|
135
|
+
this.logger.info(`RedisSMQ REST API server is running on http://localhost:${port}...`);
|
|
136
|
+
const baseURL = `http://127.0.0.1:${port}${basePath === '/' ? '' : basePath}`;
|
|
137
|
+
this.logger.info(`OpenAPI specs are available at ${baseURL}/swagger/assets/${constants_js_1.constants.openApiDocumentFilename}`);
|
|
138
|
+
this.logger.info(`SWAGGER UI is accessible from ${baseURL}/swagger`);
|
|
143
139
|
});
|
|
144
140
|
}
|
|
145
141
|
getApplication() {
|
|
@@ -155,7 +151,7 @@ class RedisSMQRestApi {
|
|
|
155
151
|
}
|
|
156
152
|
yield Container_js_1.Container.getInstance().dispose();
|
|
157
153
|
yield RedisSMQAsync.shutdownAsync();
|
|
158
|
-
this.logger.info(
|
|
154
|
+
this.logger.info('RedisSMQ HTTP API has been shutdown.');
|
|
159
155
|
});
|
|
160
156
|
}
|
|
161
157
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AASA,gDAA6C;AAC7C,qDAA6B;AAC7B,mCAAiC;AACjC,wDAAgC;AAChC,2CAA6B;AAC7B,8CAAsB;AACtB,0DAA8B;AAC9B,4DAAmC;AACnC,+BAA4B;AAC5B,yCAAqC;AACrC,uDAAyD;AACzD,qDAAyE;AACzE,8CAAsB;AACtB,wDAAkD;AAClD,gDAI2B;AAC3B,2DAAqD;AACrD,2DAA6D;AAK7D,kGAA4F;AAC5F,8DAGuC;AACvC,oDAA0D;AAC1D,oDAA8C;AAG9C,MAAM,aAAa,GAAG,kBAAQ,CAAC,YAAY,CAAC,oBAAQ,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AASA,gDAA6C;AAC7C,qDAA6B;AAC7B,mCAAiC;AACjC,wDAAgC;AAChC,2CAA6B;AAC7B,8CAAsB;AACtB,0DAA8B;AAC9B,4DAAmC;AACnC,+BAA4B;AAC5B,yCAAqC;AACrC,uDAAyD;AACzD,qDAAyE;AACzE,8CAAsB;AACtB,wDAAkD;AAClD,gDAI2B;AAC3B,2DAAqD;AACrD,2DAA6D;AAK7D,kGAA4F;AAC5F,8DAGuC;AACvC,oDAA0D;AAC1D,oDAA8C;AAG9C,MAAM,aAAa,GAAG,kBAAQ,CAAC,YAAY,CAAC,oBAAQ,CAAC,CAAC;AACtD,MAAM,QAAQ,GAAG,kBAAQ,CAAC,YAAY,CAAC,aAAG,CAAC,CAAC;AAE5C,MAAa,eAAe;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AAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC;YAC9E,IAAI,CAAC,MAAM,CAAC,IAAI,CACd,kCAAkC,OAAO,mBAAmB,wBAAS,CAAC,uBAAuB,EAAE,CAChG,CAAC;YACF,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,iCAAiC,OAAO,UAAU,CAAC,CAAC;QACvE,CAAC;KAAA;IAEK,cAAc;;YAClB,MAAM,IAAI,CAAC,SAAS,EAAE,CAAC;YACvB,OAAO,IAAI,CAAC,GAAG,CAAC,QAAQ,EAAE,CAAC;QAC7B,CAAC;KAAA;IAEK,QAAQ;;YACZ,IAAI,IAAI,CAAC,UAAU,CAAC,SAAS,EAAE,CAAC;gBAC9B,MAAM,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;YACjE,CAAC;YACD,MAAM,wBAAS,CAAC,WAAW,EAAE,CAAC,OAAO,EAAE,CAAC;YACxC,MAAM,aAAa,CAAC,aAAa,EAAE,CAAC;YACpC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,sCAAsC,CAAC,CAAC;QAC3D,CAAC;KAAA;CACF;AAxID,0CAwIC"}
|
|
@@ -6,7 +6,7 @@ describe('getConfigurationController', () => {
|
|
|
6
6
|
const request = supertest(`http://127.0.0.1:${config.apiServer?.port}`);
|
|
7
7
|
const response1 = await request.get('/api/v1/config');
|
|
8
8
|
expect(response1.status).toEqual(200);
|
|
9
|
-
expect(Object.keys(response1.body?.data ?? {}).sort()).toEqual(['namespace', 'redis', 'logger', 'eventBus', '
|
|
9
|
+
expect(Object.keys(response1.body?.data ?? {}).sort()).toEqual(['namespace', 'redis', 'logger', 'eventBus', 'messageAudit'].sort());
|
|
10
10
|
});
|
|
11
11
|
});
|
|
12
12
|
//# sourceMappingURL=getConfigurationController.test.js.map
|
|
@@ -1 +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,
|
|
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,cAAc,CAAC,CAAC,IAAI,EAAE,CACpE,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export declare const errors: {
|
|
2
2
|
readonly ConfigurationError: readonly [400, "ConfigurationError"];
|
|
3
|
-
readonly
|
|
4
|
-
readonly
|
|
3
|
+
readonly ConfigurationMessageAuditExpireError: readonly [400, "ConfigurationMessageAuditExpireError"];
|
|
4
|
+
readonly ConfigurationMessageAuditQueueSizeError: readonly [400, "ConfigurationMessageAuditQueueSizeError"];
|
|
5
5
|
readonly ConfigurationNamespaceError: readonly [400, "ConfigurationNamespaceError"];
|
|
6
6
|
readonly ConsumerError: readonly [500, "ConsumerError"];
|
|
7
7
|
readonly ConsumerGroupNotEmptyError: readonly [409, "ConsumerGroupNotEmptyError"];
|
|
@@ -47,7 +47,6 @@ export declare const errors: {
|
|
|
47
47
|
readonly QueueAlreadyBound: readonly [500, "QueueAlreadyBound"];
|
|
48
48
|
readonly QueueAlreadyExistsError: readonly [409, "QueueAlreadyExistsError"];
|
|
49
49
|
readonly QueueDeliveryModelMismatchError: readonly [500, "QueueDeliveryModelMismatchError"];
|
|
50
|
-
readonly QueueExplorerError: readonly [500, "QueueExplorerError"];
|
|
51
50
|
readonly QueueHasBoundExchangesError: readonly [500, "QueueHasBoundExchangesError"];
|
|
52
51
|
readonly QueueHasNoConsumerGroupsError: readonly [500, "QueueHasNoConsumerGroupsError"];
|
|
53
52
|
readonly QueueManagerActiveConsumersError: readonly [500, "QueueManagerActiveConsumersError"];
|
|
@@ -58,6 +57,7 @@ export declare const errors: {
|
|
|
58
57
|
readonly QueueRateLimitError: readonly [429, "QueueRateLimitError"];
|
|
59
58
|
readonly RedisKeysError: readonly [500, "RedisKeysError"];
|
|
60
59
|
readonly RedisKeysInvalidKeyError: readonly [400, "RedisKeysInvalidKeyError"];
|
|
60
|
+
readonly RoutingKeyRequiredError: readonly [400, "RoutingKeyRequiredError"];
|
|
61
61
|
readonly UnknownQueueTypeError: readonly [500, "UnknownQueueTypeError"];
|
|
62
62
|
};
|
|
63
63
|
export type TErrors = typeof errors;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
export const errors = {
|
|
2
2
|
ConfigurationError: [400, 'ConfigurationError'],
|
|
3
|
-
|
|
3
|
+
ConfigurationMessageAuditExpireError: [
|
|
4
4
|
400,
|
|
5
|
-
'
|
|
5
|
+
'ConfigurationMessageAuditExpireError',
|
|
6
6
|
],
|
|
7
|
-
|
|
7
|
+
ConfigurationMessageAuditQueueSizeError: [
|
|
8
8
|
400,
|
|
9
|
-
'
|
|
9
|
+
'ConfigurationMessageAuditQueueSizeError',
|
|
10
10
|
],
|
|
11
11
|
ConfigurationNamespaceError: [400, 'ConfigurationNamespaceError'],
|
|
12
12
|
ConsumerError: [500, 'ConsumerError'],
|
|
@@ -71,7 +71,6 @@ export const errors = {
|
|
|
71
71
|
QueueAlreadyBound: [500, 'QueueAlreadyBound'],
|
|
72
72
|
QueueAlreadyExistsError: [409, 'QueueAlreadyExistsError'],
|
|
73
73
|
QueueDeliveryModelMismatchError: [500, 'QueueDeliveryModelMismatchError'],
|
|
74
|
-
QueueExplorerError: [500, 'QueueExplorerError'],
|
|
75
74
|
QueueHasBoundExchangesError: [500, 'QueueHasBoundExchangesError'],
|
|
76
75
|
QueueHasNoConsumerGroupsError: [500, 'QueueHasNoConsumerGroupsError'],
|
|
77
76
|
QueueManagerActiveConsumersError: [500, 'QueueManagerActiveConsumersError'],
|
|
@@ -82,6 +81,7 @@ export const errors = {
|
|
|
82
81
|
QueueRateLimitError: [429, 'QueueRateLimitError'],
|
|
83
82
|
RedisKeysError: [500, 'RedisKeysError'],
|
|
84
83
|
RedisKeysInvalidKeyError: [400, 'RedisKeysInvalidKeyError'],
|
|
84
|
+
RoutingKeyRequiredError: [400, 'RoutingKeyRequiredError'],
|
|
85
85
|
UnknownQueueTypeError: [500, 'UnknownQueueTypeError'],
|
|
86
86
|
};
|
|
87
87
|
//# sourceMappingURL=errors.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.js","sourceRoot":"","sources":["../../../../src/errors/errors.ts"],"names":[],"mappings":"AAgBA,MAAM,CAAC,MAAM,MAAM,GAAG;IACpB,kBAAkB,EAAE,CAAC,GAAG,EAAE,oBAAoB,CAAC;IAC/C,
|
|
1
|
+
{"version":3,"file":"errors.js","sourceRoot":"","sources":["../../../../src/errors/errors.ts"],"names":[],"mappings":"AAgBA,MAAM,CAAC,MAAM,MAAM,GAAG;IACpB,kBAAkB,EAAE,CAAC,GAAG,EAAE,oBAAoB,CAAC;IAC/C,oCAAoC,EAAE;QACpC,GAAG;QACH,sCAAsC;KACvC;IACD,uCAAuC,EAAE;QACvC,GAAG;QACH,yCAAyC;KAC1C;IACD,2BAA2B,EAAE,CAAC,GAAG,EAAE,6BAA6B,CAAC;IACjE,aAAa,EAAE,CAAC,GAAG,EAAE,eAAe,CAAC;IACrC,0BAA0B,EAAE,CAAC,GAAG,EAAE,4BAA4B,CAAC;IAC/D,0BAA0B,EAAE,CAAC,GAAG,EAAE,4BAA4B,CAAC;IAC/D,0BAA0B,EAAE,CAAC,GAAG,EAAE,4BAA4B,CAAC;IAC/D,mBAAmB,EAAE,CAAC,GAAG,EAAE,qBAAqB,CAAC;IACjD,+BAA+B,EAAE,CAAC,GAAG,EAAE,iCAAiC,CAAC;IACzE,a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vC,wBAAwB,EAAE,CAAC,GAAG,EAAE,0BAA0B,CAAC;IAC3D,uBAAuB,EAAE,CAAC,GAAG,EAAE,yBAAyB,CAAC;IACzD,qBAAqB,EAAE,CAAC,GAAG,EAAE,uBAAuB,CAAC;CAC7C,CAAC"}
|
package/dist/esm/src/index.d.ts
CHANGED
|
@@ -13,7 +13,6 @@ export declare class RedisSMQRestApi {
|
|
|
13
13
|
constructor(config?: IRedisSMQRestApiConfig, runHttpServer?: boolean);
|
|
14
14
|
protected initApplicationMiddlewares(): Promise<void>;
|
|
15
15
|
protected initOpenApi(): Promise<void>;
|
|
16
|
-
protected logOpenApiUrls(): void;
|
|
17
16
|
protected initRouting(): Promise<void>;
|
|
18
17
|
protected bootstrap(): Promise<void>;
|
|
19
18
|
run(): Promise<void>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAaA,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAC7B,OAAO,GAAG,MAAM,KAAK,CAAC;AAKtB,OAAO,EAAgB,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAIzD,OAAO,EACL,sBAAsB,EACtB,4BAA4B,EAE7B,MAAM,mBAAmB,CAAC;AAG3B,OAAO,EACL,6BAA6B,EAC7B,2BAA2B,EAC5B,MAAM,kCAAkC,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAaA,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAC7B,OAAO,GAAG,MAAM,KAAK,CAAC;AAKtB,OAAO,EAAgB,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAIzD,OAAO,EACL,sBAAsB,EACtB,4BAA4B,EAE7B,MAAM,mBAAmB,CAAC;AAG3B,OAAO,EACL,6BAA6B,EAC7B,2BAA2B,EAC5B,MAAM,kCAAkC,CAAC;AAa1C,qBAAa,eAAe;IAC1B,SAAS,CAAC,GAAG,EAAE,GAAG,CAChB,2BAA2B,EAC3B,6BAA6B,CAC9B,CAAC;IACF,SAAS,CAAC,MAAM,EAAE,4BAA4B,CAAC;IAC/C,SAAS,CAAC,aAAa,EAAE,OAAO,CAAC;IACjC,SAAS,CAAC,MAAM,EAAE,OAAO,CAAC;IAC1B,SAAS,CAAC,UAAU,EAAE,IAAI,CAAC,MAAM,CAAC;IAClC,SAAS,CAAC,YAAY,UAAS;gBAEnB,MAAM,GAAE,sBAA2B,EAAE,aAAa,UAAO;cAgBrD,0BAA0B;cAmB1B,WAAW;cAyCX,WAAW;cAOX,SAAS;IAWnB,GAAG;IAkBH,cAAc;IAKd,QAAQ;CAQf"}
|
package/dist/esm/src/index.js
CHANGED
|
@@ -50,54 +50,50 @@ export class RedisSMQRestApi {
|
|
|
50
50
|
}));
|
|
51
51
|
}
|
|
52
52
|
async initOpenApi() {
|
|
53
|
-
this.
|
|
54
|
-
const
|
|
53
|
+
const { basePath } = this.config.apiServer;
|
|
54
|
+
const openApiFilename = constants.openApiDocumentFilename;
|
|
55
|
+
this.logger.info('Initializing OpenAPI...');
|
|
56
|
+
const spec = await generateOpenApiDocument(routing, basePath);
|
|
55
57
|
const tmpDir = await tmpAsync.dirAsync();
|
|
56
58
|
await saveOpenApiDocument(spec, tmpDir);
|
|
57
|
-
const { basePath } = this.config.apiServer;
|
|
58
|
-
this.app.use(mount(join(basePath, '/assets'), koaStatic(tmpDir)));
|
|
59
59
|
const uiAssetsFsPath = swaggerUiDistPath();
|
|
60
|
-
this.app.use(mount(join(basePath, '/
|
|
61
|
-
|
|
62
|
-
const
|
|
63
|
-
const
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
ctx.
|
|
60
|
+
this.app.use(mount(join(basePath, '/swagger/ui'), koaStatic(uiAssetsFsPath)));
|
|
61
|
+
this.app.use(mount(join(basePath, '/swagger/assets'), koaStatic(tmpDir)));
|
|
62
|
+
const specUrl = join(basePath, '/swagger/assets', openApiFilename);
|
|
63
|
+
const uiAssetsUrl = join(basePath, '/swagger/ui');
|
|
64
|
+
const html = buildSwaggerUiHtml(specUrl, uiAssetsUrl);
|
|
65
|
+
this.app.use(mount(join(basePath, '/swagger'), (ctx) => {
|
|
66
|
+
if (ctx.path === '/' || ctx.path === '') {
|
|
67
|
+
ctx.type = 'text/html; charset=utf-8';
|
|
68
|
+
ctx.body = html;
|
|
69
|
+
}
|
|
67
70
|
}));
|
|
68
71
|
}
|
|
69
|
-
logOpenApiUrls() {
|
|
70
|
-
const { port, basePath } = this.config.apiServer;
|
|
71
|
-
const hostname = 'localhost';
|
|
72
|
-
const baseURL = `http://${hostname}:${port}${basePath === '/' ? '' : basePath}`;
|
|
73
|
-
const specsURL = `${baseURL}/assets/${constants.openApiDocumentFilename}`;
|
|
74
|
-
this.logger.info(`OpenAPI specs are available at ${specsURL}`);
|
|
75
|
-
const docsURL = `${baseURL}/docs`;
|
|
76
|
-
this.logger.info(`SWAGGER UI is accessible from ${docsURL}`);
|
|
77
|
-
}
|
|
78
72
|
async initRouting() {
|
|
79
|
-
this.logger.info(
|
|
73
|
+
this.logger.info('Registering routes...');
|
|
80
74
|
const appRouter = await registerResources(routing);
|
|
81
75
|
this.app.use(appRouter.routes());
|
|
82
76
|
this.app.use(appRouter.allowedMethods());
|
|
83
77
|
}
|
|
84
78
|
async bootstrap() {
|
|
85
|
-
if (
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
79
|
+
if (this.bootstrapped)
|
|
80
|
+
return;
|
|
81
|
+
await RedisSMQAsync.initializeAsync(this.config.redis);
|
|
82
|
+
await this.initApplicationMiddlewares();
|
|
83
|
+
await this.initRouting();
|
|
84
|
+
await this.initOpenApi();
|
|
85
|
+
this.bootstrapped = true;
|
|
92
86
|
}
|
|
93
87
|
async run() {
|
|
94
88
|
await this.bootstrap();
|
|
95
|
-
if (this.runHttpServer)
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
}
|
|
89
|
+
if (!this.runHttpServer)
|
|
90
|
+
return;
|
|
91
|
+
const { port, basePath } = this.config.apiServer;
|
|
92
|
+
await new Promise((resolve) => this.httpServer.listen(port, () => resolve()));
|
|
93
|
+
this.logger.info(`RedisSMQ REST API server is running on http://localhost:${port}...`);
|
|
94
|
+
const baseURL = `http://127.0.0.1:${port}${basePath === '/' ? '' : basePath}`;
|
|
95
|
+
this.logger.info(`OpenAPI specs are available at ${baseURL}/swagger/assets/${constants.openApiDocumentFilename}`);
|
|
96
|
+
this.logger.info(`SWAGGER UI is accessible from ${baseURL}/swagger`);
|
|
101
97
|
}
|
|
102
98
|
async getApplication() {
|
|
103
99
|
await this.bootstrap();
|
|
@@ -109,7 +105,7 @@ export class RedisSMQRestApi {
|
|
|
109
105
|
}
|
|
110
106
|
await Container.getInstance().dispose();
|
|
111
107
|
await RedisSMQAsync.shutdownAsync();
|
|
112
|
-
this.logger.info(
|
|
108
|
+
this.logger.info('RedisSMQ HTTP API has been shutdown.');
|
|
113
109
|
}
|
|
114
110
|
}
|
|
115
111
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AACjC,OAAO,QAAQ,MAAM,UAAU,CAAC;AAChC,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAC7B,OAAO,GAAG,MAAM,KAAK,CAAC;AACtB,OAAO,KAAK,MAAM,WAAW,CAAC;AAC9B,OAAO,SAAS,MAAM,YAAY,CAAC;AACnC,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAC5B,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CA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E,CAAC;QACD,MAAM,SAAS,CAAC,WAAW,EAAE,CAAC,OAAO,EAAE,CAAC;QACxC,MAAM,aAAa,CAAC,aAAa,EAAE,CAAC;QACpC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,sCAAsC,CAAC,CAAC;IAC3D,CAAC;CACF"}
|
package/dist/schema.json
CHANGED
|
@@ -1789,58 +1789,50 @@
|
|
|
1789
1789
|
},
|
|
1790
1790
|
"type": "object"
|
|
1791
1791
|
},
|
|
1792
|
-
"
|
|
1792
|
+
"messageAudit": {
|
|
1793
1793
|
"properties": {
|
|
1794
|
-
"
|
|
1794
|
+
"acknowledgedMessages": {
|
|
1795
1795
|
"properties": {
|
|
1796
|
-
"
|
|
1797
|
-
"
|
|
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"
|
|
1796
|
+
"enabled": {
|
|
1797
|
+
"type": "boolean"
|
|
1814
1798
|
},
|
|
1815
|
-
"
|
|
1816
|
-
"
|
|
1817
|
-
|
|
1818
|
-
|
|
1819
|
-
|
|
1820
|
-
|
|
1821
|
-
|
|
1822
|
-
|
|
1823
|
-
|
|
1824
|
-
|
|
1825
|
-
|
|
1826
|
-
|
|
1827
|
-
|
|
1828
|
-
|
|
1829
|
-
|
|
1830
|
-
|
|
1831
|
-
|
|
1832
|
-
"type": "
|
|
1799
|
+
"expire": {
|
|
1800
|
+
"type": "number"
|
|
1801
|
+
},
|
|
1802
|
+
"queueSize": {
|
|
1803
|
+
"type": "number"
|
|
1804
|
+
}
|
|
1805
|
+
},
|
|
1806
|
+
"required": [
|
|
1807
|
+
"enabled",
|
|
1808
|
+
"expire",
|
|
1809
|
+
"queueSize"
|
|
1810
|
+
],
|
|
1811
|
+
"type": "object"
|
|
1812
|
+
},
|
|
1813
|
+
"deadLetteredMessages": {
|
|
1814
|
+
"properties": {
|
|
1815
|
+
"enabled": {
|
|
1816
|
+
"type": "boolean"
|
|
1817
|
+
},
|
|
1818
|
+
"expire": {
|
|
1819
|
+
"type": "number"
|
|
1820
|
+
},
|
|
1821
|
+
"queueSize": {
|
|
1822
|
+
"type": "number"
|
|
1833
1823
|
}
|
|
1834
1824
|
},
|
|
1835
1825
|
"required": [
|
|
1836
|
-
"
|
|
1837
|
-
"
|
|
1826
|
+
"enabled",
|
|
1827
|
+
"expire",
|
|
1828
|
+
"queueSize"
|
|
1838
1829
|
],
|
|
1839
1830
|
"type": "object"
|
|
1840
1831
|
}
|
|
1841
1832
|
},
|
|
1842
1833
|
"required": [
|
|
1843
|
-
"
|
|
1834
|
+
"acknowledgedMessages",
|
|
1835
|
+
"deadLetteredMessages"
|
|
1844
1836
|
],
|
|
1845
1837
|
"type": "object"
|
|
1846
1838
|
},
|
|
@@ -1869,7 +1861,7 @@
|
|
|
1869
1861
|
"required": [
|
|
1870
1862
|
"eventBus",
|
|
1871
1863
|
"logger",
|
|
1872
|
-
"
|
|
1864
|
+
"messageAudit",
|
|
1873
1865
|
"namespace",
|
|
1874
1866
|
"redis"
|
|
1875
1867
|
],
|
|
@@ -6849,10 +6841,10 @@
|
|
|
6849
6841
|
"minItems": 2,
|
|
6850
6842
|
"type": "array"
|
|
6851
6843
|
},
|
|
6852
|
-
"
|
|
6844
|
+
"ConfigurationMessageAuditExpireError": {
|
|
6853
6845
|
"default": [
|
|
6854
6846
|
400,
|
|
6855
|
-
"
|
|
6847
|
+
"ConfigurationMessageAuditExpireError"
|
|
6856
6848
|
],
|
|
6857
6849
|
"items": [
|
|
6858
6850
|
{
|
|
@@ -6860,7 +6852,7 @@
|
|
|
6860
6852
|
"type": "number"
|
|
6861
6853
|
},
|
|
6862
6854
|
{
|
|
6863
|
-
"const": "
|
|
6855
|
+
"const": "ConfigurationMessageAuditExpireError",
|
|
6864
6856
|
"type": "string"
|
|
6865
6857
|
}
|
|
6866
6858
|
],
|
|
@@ -6868,10 +6860,10 @@
|
|
|
6868
6860
|
"minItems": 2,
|
|
6869
6861
|
"type": "array"
|
|
6870
6862
|
},
|
|
6871
|
-
"
|
|
6863
|
+
"ConfigurationMessageAuditQueueSizeError": {
|
|
6872
6864
|
"default": [
|
|
6873
6865
|
400,
|
|
6874
|
-
"
|
|
6866
|
+
"ConfigurationMessageAuditQueueSizeError"
|
|
6875
6867
|
],
|
|
6876
6868
|
"items": [
|
|
6877
6869
|
{
|
|
@@ -6879,7 +6871,7 @@
|
|
|
6879
6871
|
"type": "number"
|
|
6880
6872
|
},
|
|
6881
6873
|
{
|
|
6882
|
-
"const": "
|
|
6874
|
+
"const": "ConfigurationMessageAuditQueueSizeError",
|
|
6883
6875
|
"type": "string"
|
|
6884
6876
|
}
|
|
6885
6877
|
],
|
|
@@ -7742,25 +7734,6 @@
|
|
|
7742
7734
|
"minItems": 2,
|
|
7743
7735
|
"type": "array"
|
|
7744
7736
|
},
|
|
7745
|
-
"QueueExplorerError": {
|
|
7746
|
-
"default": [
|
|
7747
|
-
500,
|
|
7748
|
-
"QueueExplorerError"
|
|
7749
|
-
],
|
|
7750
|
-
"items": [
|
|
7751
|
-
{
|
|
7752
|
-
"const": 500,
|
|
7753
|
-
"type": "number"
|
|
7754
|
-
},
|
|
7755
|
-
{
|
|
7756
|
-
"const": "QueueExplorerError",
|
|
7757
|
-
"type": "string"
|
|
7758
|
-
}
|
|
7759
|
-
],
|
|
7760
|
-
"maxItems": 2,
|
|
7761
|
-
"minItems": 2,
|
|
7762
|
-
"type": "array"
|
|
7763
|
-
},
|
|
7764
7737
|
"QueueHasBoundExchangesError": {
|
|
7765
7738
|
"default": [
|
|
7766
7739
|
500,
|
|
@@ -7951,6 +7924,25 @@
|
|
|
7951
7924
|
"minItems": 2,
|
|
7952
7925
|
"type": "array"
|
|
7953
7926
|
},
|
|
7927
|
+
"RoutingKeyRequiredError": {
|
|
7928
|
+
"default": [
|
|
7929
|
+
400,
|
|
7930
|
+
"RoutingKeyRequiredError"
|
|
7931
|
+
],
|
|
7932
|
+
"items": [
|
|
7933
|
+
{
|
|
7934
|
+
"const": 400,
|
|
7935
|
+
"type": "number"
|
|
7936
|
+
},
|
|
7937
|
+
{
|
|
7938
|
+
"const": "RoutingKeyRequiredError",
|
|
7939
|
+
"type": "string"
|
|
7940
|
+
}
|
|
7941
|
+
],
|
|
7942
|
+
"maxItems": 2,
|
|
7943
|
+
"minItems": 2,
|
|
7944
|
+
"type": "array"
|
|
7945
|
+
},
|
|
7954
7946
|
"UnknownQueueTypeError": {
|
|
7955
7947
|
"default": [
|
|
7956
7948
|
500,
|
|
@@ -7973,8 +7965,8 @@
|
|
|
7973
7965
|
},
|
|
7974
7966
|
"required": [
|
|
7975
7967
|
"ConfigurationError",
|
|
7976
|
-
"
|
|
7977
|
-
"
|
|
7968
|
+
"ConfigurationMessageAuditExpireError",
|
|
7969
|
+
"ConfigurationMessageAuditQueueSizeError",
|
|
7978
7970
|
"ConfigurationNamespaceError",
|
|
7979
7971
|
"ConsumerError",
|
|
7980
7972
|
"ConsumerGroupNotEmptyError",
|
|
@@ -8020,7 +8012,6 @@
|
|
|
8020
8012
|
"QueueAlreadyBound",
|
|
8021
8013
|
"QueueAlreadyExistsError",
|
|
8022
8014
|
"QueueDeliveryModelMismatchError",
|
|
8023
|
-
"QueueExplorerError",
|
|
8024
8015
|
"QueueHasBoundExchangesError",
|
|
8025
8016
|
"QueueHasNoConsumerGroupsError",
|
|
8026
8017
|
"QueueManagerActiveConsumersError",
|
|
@@ -8031,6 +8022,7 @@
|
|
|
8031
8022
|
"QueueRateLimitError",
|
|
8032
8023
|
"RedisKeysError",
|
|
8033
8024
|
"RedisKeysInvalidKeyError",
|
|
8025
|
+
"RoutingKeyRequiredError",
|
|
8034
8026
|
"UnknownQueueTypeError"
|
|
8035
8027
|
],
|
|
8036
8028
|
"type": "object"
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "redis-smq-rest-api",
|
|
3
|
-
"version": "9.0.0
|
|
3
|
+
"version": "9.0.0",
|
|
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",
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
"bluebird": "3.7.2",
|
|
57
57
|
"commander": "14.0.1",
|
|
58
58
|
"json-schema": "0.4.0",
|
|
59
|
-
"koa": "3.
|
|
59
|
+
"koa": "3.1.1",
|
|
60
60
|
"koa-mount": "4.2.0",
|
|
61
61
|
"koa-static": "5.0.0",
|
|
62
62
|
"lodash": "4.17.21",
|
|
@@ -68,8 +68,8 @@
|
|
|
68
68
|
"peerDependencies": {
|
|
69
69
|
"@redis/client": "^5",
|
|
70
70
|
"ioredis": "^5",
|
|
71
|
-
"redis-smq": "^9.0.0
|
|
72
|
-
"redis-smq-common": "^9.0.0
|
|
71
|
+
"redis-smq": "^9.0.0",
|
|
72
|
+
"redis-smq-common": "^9.0.0"
|
|
73
73
|
},
|
|
74
74
|
"peerDependenciesMeta": {
|
|
75
75
|
"@redis/client": {
|