redis-smq-web-server 9.0.0-next.1 → 9.0.0-next.3
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 +28 -0
- package/README.md +86 -65
- package/dist/cjs/bin/cli.d.ts +1 -0
- package/dist/cjs/bin/cli.js +42 -7
- package/dist/cjs/bin/cli.js.map +1 -1
- package/dist/cjs/src/config/parse-config.d.ts.map +1 -1
- package/dist/cjs/src/config/parse-config.js +15 -29
- package/dist/cjs/src/config/parse-config.js.map +1 -1
- package/dist/cjs/src/config/types/index.d.ts +16 -5
- package/dist/cjs/src/config/types/index.d.ts.map +1 -1
- package/dist/cjs/src/index.d.ts +1 -1
- package/dist/cjs/src/index.d.ts.map +1 -1
- package/dist/cjs/src/index.js.map +1 -1
- package/dist/esm/bin/cli.d.ts +1 -0
- package/dist/esm/bin/cli.js +41 -7
- package/dist/esm/bin/cli.js.map +1 -1
- package/dist/esm/src/config/parse-config.d.ts.map +1 -1
- package/dist/esm/src/config/parse-config.js +17 -28
- package/dist/esm/src/config/parse-config.js.map +1 -1
- package/dist/esm/src/config/types/index.d.ts +16 -5
- package/dist/esm/src/config/types/index.d.ts.map +1 -1
- package/dist/esm/src/index.d.ts +1 -1
- package/dist/esm/src/index.d.ts.map +1 -1
- package/dist/esm/src/index.js.map +1 -1
- package/package.json +16 -6
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,34 @@
|
|
|
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.3](https://github.com/weyoss/redis-smq/compare/v9.0.0-next.2...v9.0.0-next.3) (2025-09-09)
|
|
7
|
+
|
|
8
|
+
### 🐛 Bug Fixes
|
|
9
|
+
|
|
10
|
+
- **redis-smq-web-server:** set default Redis database to 0 ([3b4e200](https://github.com/weyoss/redis-smq/commit/3b4e200681a5e1eec2446fa6ffa27878cb790b29))
|
|
11
|
+
- **redis-smq-web-server:** update peer dependencies ([2be664e](https://github.com/weyoss/redis-smq/commit/2be664ea4bacffd5b0a780e05355e356028b6321))
|
|
12
|
+
|
|
13
|
+
### 📝 Documentation
|
|
14
|
+
|
|
15
|
+
- **redis-smq-rest-api:** add Redis client installation instructions ([40d9d54](https://github.com/weyoss/redis-smq/commit/40d9d541274701b6b701505e70d9f5ee8add0912))
|
|
16
|
+
- **redis-smq-web-server:** update configuration API and CLI options ([873bedf](https://github.com/weyoss/redis-smq/commit/873bedf848bf7098010cf67b3a886e50864021c4))
|
|
17
|
+
|
|
18
|
+
### ♻️ Code Refactoring
|
|
19
|
+
|
|
20
|
+
- **redis-smq-web-server:** improve CLI configuration and config parsing ([8ec1d84](https://github.com/weyoss/redis-smq/commit/8ec1d840678eb360a7854453cd6e20976d872c5c))
|
|
21
|
+
|
|
22
|
+
## [9.0.0-next.2](https://github.com/weyoss/redis-smq/compare/v9.0.0-next.1...v9.0.0-next.2) (2025-09-07)
|
|
23
|
+
|
|
24
|
+
### 🐛 Bug Fixes
|
|
25
|
+
|
|
26
|
+
- **redis-smq-web-server:** add shebang to CLI script for proper execution ([0c213c5](https://github.com/weyoss/redis-smq/commit/0c213c5a39a86c1d752cfbf6e5e9595b678e7208))
|
|
27
|
+
|
|
28
|
+
### 📝 Documentation
|
|
29
|
+
|
|
30
|
+
- **redis-smq-web-server:** fix installation/quick start commands ([9832d33](https://github.com/weyoss/redis-smq/commit/9832d33d8beafc31f989e6477a2d83be86392966))
|
|
31
|
+
- **redis-smq-web-server:** fix npm install command ([db7f4e3](https://github.com/weyoss/redis-smq/commit/db7f4e3bd4f0778c2dad2eb9d779afd9515628ea))
|
|
32
|
+
- update installation instructions to include required deps ([107c2a5](https://github.com/weyoss/redis-smq/commit/107c2a5b2eda5b540f5f033808be94923e8688fa))
|
|
33
|
+
|
|
6
34
|
## [9.0.0-next.1](https://github.com/weyoss/redis-smq/compare/v9.0.0-next.0...v9.0.0-next.1) (2025-09-06)
|
|
7
35
|
|
|
8
36
|
**Note:** Version bump only for package redis-smq-web-server
|
package/README.md
CHANGED
|
@@ -18,7 +18,16 @@ A lightweight, configurable HTTP server that hosts the RedisSMQ Web UI and expos
|
|
|
18
18
|
## Installation
|
|
19
19
|
|
|
20
20
|
```bash
|
|
21
|
-
|
|
21
|
+
# Using npm
|
|
22
|
+
npm install redis-smq redis-smq-common redis-smq-rest-api redis-smq-web-ui redis-smq-web-server --save
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
Don't forget to install a Redis client. Choose either node-redis or ioredis:
|
|
26
|
+
|
|
27
|
+
```shell
|
|
28
|
+
npm install @redis/client --save
|
|
29
|
+
# or
|
|
30
|
+
npm install ioredis --save
|
|
22
31
|
```
|
|
23
32
|
|
|
24
33
|
## Quick Start
|
|
@@ -67,51 +76,48 @@ to the upstream. In this mode, Redis connection options on the web server are no
|
|
|
67
76
|
|
|
68
77
|
If you prefer embedding the server in your app, you can pass the same configuration programmatically.
|
|
69
78
|
|
|
70
|
-
#### ESM / TypeScript
|
|
71
|
-
|
|
72
79
|
```typescript
|
|
73
80
|
import { RedisSMQWebServer } from 'redis-smq-web-server';
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
81
|
+
import { EConsoleLoggerLevel, ERedisConfigClient } from 'redis-smq-common';
|
|
82
|
+
|
|
83
|
+
// Run with the embedded REST API (in-process)
|
|
84
|
+
const server = new RedisSMQWebServer({
|
|
85
|
+
webServer: {
|
|
86
|
+
port: 8080,
|
|
87
|
+
basePath: '/', // UI at '/', API at '/api', docs at '/docs'
|
|
88
|
+
},
|
|
89
|
+
// The following options are used only when apiProxyTarget is NOT set
|
|
90
|
+
redis: {
|
|
91
|
+
client: ERedisConfigClient.IOREDIS,
|
|
92
|
+
options: {
|
|
93
|
+
host: '127.0.0.1',
|
|
94
|
+
port: 6379,
|
|
95
|
+
db: 1,
|
|
96
|
+
showFriendlyErrorStack: true,
|
|
97
|
+
},
|
|
98
|
+
},
|
|
99
|
+
logger: {
|
|
100
|
+
enabled: true,
|
|
101
|
+
options: {
|
|
102
|
+
level: EConsoleLoggerLevel.INFO,
|
|
103
|
+
},
|
|
104
|
+
},
|
|
83
105
|
});
|
|
84
106
|
|
|
85
|
-
|
|
86
|
-
await
|
|
87
|
-
port: 8080,
|
|
88
|
-
apiProxyTarget: 'http://127.0.0.1:7210',
|
|
89
|
-
});
|
|
107
|
+
await server.run();
|
|
108
|
+
// await server.shutdown();
|
|
90
109
|
|
|
91
|
-
//
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
const redisSMQWebServer = new RedisSMQWebServer();
|
|
101
|
-
|
|
102
|
-
redisSMQWebServer.run({
|
|
103
|
-
port: 8080,
|
|
104
|
-
basePath: '/',
|
|
105
|
-
redisHost: '127.0.0.1',
|
|
106
|
-
redisPort: 6379,
|
|
107
|
-
redisDB: '1',
|
|
110
|
+
// Or proxy API/docs/assets to an external service
|
|
111
|
+
const srv = new RedisSMQWebServer({
|
|
112
|
+
webServer: {
|
|
113
|
+
port: 8080,
|
|
114
|
+
basePath: '/', // or '/redis-smq'
|
|
115
|
+
apiProxyTarget: 'http://127.0.0.1:7210',
|
|
116
|
+
},
|
|
117
|
+
// No redis/logger config required in proxy mode
|
|
108
118
|
});
|
|
109
119
|
|
|
110
|
-
|
|
111
|
-
redisSMQWebServer.run({
|
|
112
|
-
port: 8080,
|
|
113
|
-
apiProxyTarget: 'http://127.0.0.1:7210',
|
|
114
|
-
});
|
|
120
|
+
await srv.run();
|
|
115
121
|
```
|
|
116
122
|
|
|
117
123
|
## Routes
|
|
@@ -141,39 +147,54 @@ Proxying behavior:
|
|
|
141
147
|
Configuration can be provided programmatically or via CLI arguments. The core interface is:
|
|
142
148
|
|
|
143
149
|
```typescript
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
150
|
+
import type { IRedisSMQRestApiConfig } from 'redis-smq-rest-api';
|
|
151
|
+
|
|
152
|
+
interface IRedisSMQWebServerConfig extends IRedisSMQRestApiConfig {
|
|
153
|
+
webServer?: {
|
|
154
|
+
/**
|
|
155
|
+
* HTTP port to run the web server on.
|
|
156
|
+
* Default: 8080
|
|
157
|
+
*/
|
|
158
|
+
port?: number;
|
|
159
|
+
|
|
160
|
+
/**
|
|
161
|
+
* Base public path for the RedisSMQ Web UI and the local API/docs when embedded.
|
|
162
|
+
* Default: '/'
|
|
163
|
+
*/
|
|
164
|
+
basePath?: string;
|
|
165
|
+
|
|
166
|
+
/**
|
|
167
|
+
* Optional target for proxying (/api, /docs, /assets).
|
|
168
|
+
* If provided, the embedded REST API is not mounted and requests are forwarded to the target.
|
|
169
|
+
* Example: 'http://127.0.0.1:7210'
|
|
170
|
+
*/
|
|
171
|
+
apiProxyTarget?: string;
|
|
172
|
+
};
|
|
155
173
|
}
|
|
156
174
|
```
|
|
157
175
|
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
- apiProxyTarget
|
|
176
|
+
Notes:
|
|
177
|
+
|
|
178
|
+
- When `webServer.apiProxyTarget` is set, the server proxies `<basePath>/api`, `<basePath>/docs`, and
|
|
179
|
+
`<basePath>/assets` to the target. In this mode, redis and logger options are not used by the web server (they are
|
|
180
|
+
handled by the upstream API service).
|
|
181
|
+
|
|
182
|
+
- When `webServer.apiProxyTarget` is not set, the web server mounts the embedded `redis-smq-rest-api` using the provided
|
|
183
|
+
`IRedisSMQRestApiConfig` (redis, logger, etc.).
|
|
165
184
|
|
|
166
185
|
### ClI flags
|
|
167
186
|
|
|
168
187
|
```shell
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
188
|
+
-p, --port <number> Port to run the server on (default: "8080")
|
|
189
|
+
-b, --base-path <string> Base public path for the RedisSMQ Web UI SPA (default: "/")
|
|
190
|
+
-t, --api-proxy-target <string> Proxy target for API (/api, /docs, /assets). Example: http://127.0.0.1:6000
|
|
191
|
+
-c, --redis-client <ioredis|redis> Redis client. Valid options are: ioredis, redis. (default: "ioredis")
|
|
192
|
+
-r, --redis-host <string> Redis server host (default: "127.0.0.1")
|
|
193
|
+
-o, --redis-port <number> Redis server port (default: "6379")
|
|
194
|
+
-d, --redis-db <number> Redis database number (default: "0")
|
|
195
|
+
-e, --enable-log <0|1> Enable console logging. Valid options are: 0, 1 (default: "0")
|
|
196
|
+
-v, --log-level <0|1|2|3> Log level. Numbers: 0=DEBUG, 1=INFO, 2=WARN, 3=ERROR (default: "1")
|
|
197
|
+
-h, --help display help for command
|
|
177
198
|
```
|
|
178
199
|
|
|
179
200
|
## Deploying behind a reverse proxy
|
package/dist/cjs/bin/cli.d.ts
CHANGED
package/dist/cjs/bin/cli.js
CHANGED
|
@@ -1,21 +1,56 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
1
2
|
"use strict";
|
|
3
|
+
var _a, _b, _c;
|
|
2
4
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
5
|
const commander_1 = require("commander");
|
|
4
6
|
const index_js_1 = require("../src/index.js");
|
|
5
7
|
const parse_config_js_1 = require("../src/config/parse-config.js");
|
|
8
|
+
const redis_smq_common_1 = require("redis-smq-common");
|
|
9
|
+
const redis_smq_1 = require("redis-smq");
|
|
10
|
+
const defaultLogLevel = typeof redis_smq_1.defaultConfig.logger.options.logLevel === 'number'
|
|
11
|
+
? redis_smq_1.defaultConfig.logger.options.logLevel
|
|
12
|
+
: redis_smq_common_1.EConsoleLoggerLevel[redis_smq_1.defaultConfig.logger.options.logLevel];
|
|
6
13
|
const program = new commander_1.Command();
|
|
7
14
|
program
|
|
8
15
|
.name('redis-smq-web-server')
|
|
9
16
|
.description('Web server for RedisSMQ Web UI');
|
|
10
17
|
program
|
|
11
|
-
.option('-p, --port <
|
|
12
|
-
.option('-
|
|
13
|
-
.option('-
|
|
14
|
-
.option('-
|
|
15
|
-
.option('-
|
|
16
|
-
.option('-
|
|
18
|
+
.option('-p, --port <number>', 'Port to run the server on', String((_a = parse_config_js_1.defaultConfig.webServer) === null || _a === void 0 ? void 0 : _a.port))
|
|
19
|
+
.option('-b, --base-path <string>', 'Base public path for the RedisSMQ Web UI SPA', (_b = parse_config_js_1.defaultConfig.webServer) === null || _b === void 0 ? void 0 : _b.basePath)
|
|
20
|
+
.option('-t, --api-proxy-target <string>', 'Proxy target for API (/api, /docs, /assets). Example: http://127.0.0.1:6000', (_c = parse_config_js_1.defaultConfig.webServer) === null || _c === void 0 ? void 0 : _c.apiProxyTarget)
|
|
21
|
+
.option('-c, --redis-client <ioredis|redis>', 'Redis client. Valid options are: ioredis, redis.', redis_smq_1.defaultConfig.redis.client)
|
|
22
|
+
.option('-r, --redis-host <string>', 'Redis server host', redis_smq_1.defaultConfig.redis.options.host)
|
|
23
|
+
.option('-o, --redis-port <number>', 'Redis server port', String(redis_smq_1.defaultConfig.redis.options.port))
|
|
24
|
+
.option('-d, --redis-db <number>', 'Redis database number', String(redis_smq_1.defaultConfig.redis.options.db))
|
|
25
|
+
.option('-e, --enable-log <0|1>', 'Enable console logging. Valid options are: 0, 1', String(Number(redis_smq_1.defaultConfig.logger.enabled)))
|
|
26
|
+
.option('-v, --log-level <0|1|2|3>', `Log level. Numbers: ${redis_smq_common_1.EConsoleLoggerLevel.DEBUG}=DEBUG, ${redis_smq_common_1.EConsoleLoggerLevel.INFO}=INFO, ${redis_smq_common_1.EConsoleLoggerLevel.WARN}=WARN, ${redis_smq_common_1.EConsoleLoggerLevel.ERROR}=ERROR`, String(defaultLogLevel));
|
|
17
27
|
program.parse();
|
|
18
28
|
const options = program.opts();
|
|
19
|
-
const
|
|
29
|
+
const config = {
|
|
30
|
+
webServer: {
|
|
31
|
+
port: Number(options.port),
|
|
32
|
+
basePath: options.basePath,
|
|
33
|
+
apiProxyTarget: options.apiProxyTarget,
|
|
34
|
+
},
|
|
35
|
+
apiServer: {
|
|
36
|
+
port: Number(options.port),
|
|
37
|
+
basePath: options.basePath,
|
|
38
|
+
},
|
|
39
|
+
redis: {
|
|
40
|
+
client: options.redisClient,
|
|
41
|
+
options: {
|
|
42
|
+
host: options.redisHost,
|
|
43
|
+
port: Number(options.redisPort),
|
|
44
|
+
db: Number(options.redisDb),
|
|
45
|
+
},
|
|
46
|
+
},
|
|
47
|
+
logger: {
|
|
48
|
+
enabled: Boolean(Number(options.enableLog)),
|
|
49
|
+
options: {
|
|
50
|
+
logLevel: Number(options.logLevel),
|
|
51
|
+
},
|
|
52
|
+
},
|
|
53
|
+
};
|
|
54
|
+
const server = new index_js_1.RedisSMQWebServer(config);
|
|
20
55
|
server.run();
|
|
21
56
|
//# sourceMappingURL=cli.js.map
|
package/dist/cjs/bin/cli.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli.js","sourceRoot":"","sources":["../../../bin/cli.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"cli.js","sourceRoot":"","sources":["../../../bin/cli.ts"],"names":[],"mappings":";;;;AAWA,yCAAoC;AACpC,8CAAoD;AAKpD,mEAA8D;AAC9D,uDAAuD;AACvD,yCAAmE;AAEnE,MAAM,eAAe,GACnB,OAAO,yBAAqB,CAAC,MAAM,CAAC,OAAO,CAAC,QAAQ,KAAK,QAAQ;IAC/D,CAAC,CAAC,yBAAqB,CAAC,MAAM,CAAC,OAAO,CAAC,QAAQ;IAC/C,CAAC,CAAC,sCAAmB,CAAC,yBAAqB,CAAC,MAAM,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;AAEzE,MAAM,OAAO,GAAG,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7D,MAAM,MAAM,GAA6B;IACvC,SAAS,EAAE;QACT,IAAI,EAAE,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC;QAC1B,QAAQ,EAAE,OAAO,CAAC,QAAQ;QAC1B,cAAc,EAAE,OAAO,CAAC,cAAc;KACvC;IAED,SAAS,EAAE;QACT,IAAI,EAAE,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC;QAC1B,QAAQ,EAAE,OAAO,CAAC,QAAQ;KAC3B;IACD,KAAK,EAAE;QACL,MAAM,EAAE,OAAO,CAAC,WAAW;QAC3B,OAAO,EAAE;YACP,IAAI,EAAE,OAAO,CAAC,SAAS;YACvB,IAAI,EAAE,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC;YAC/B,EAAE,EAAE,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC;SAC5B;KACF;IACD,MAAM,EAAE;QACN,OAAO,EAAE,OAAO,CAAC,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;QAC3C,OAAO,EAAE;YACP,QAAQ,EAAE,MAAM,CAAC,OAAO,CAAC,QAAQ,CAAC;SACnC;KACF;CACF,CAAC;AAEF,MAAM,MAAM,GAAG,IAAI,4BAAiB,CAAC,MAAM,CAAC,CAAC;AAC7C,MAAM,CAAC,GAAG,EAAE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parse-config.d.ts","sourceRoot":"","sources":["../../../../src/config/parse-config.ts"],"names":[],"mappings":"AASA,OAAO,EACL,wBAAwB,EACxB,8BAA8B,EAC/B,MAAM,kBAAkB,CAAC;AAG1B,eAAO,MAAM,aAAa,EAAE,
|
|
1
|
+
{"version":3,"file":"parse-config.d.ts","sourceRoot":"","sources":["../../../../src/config/parse-config.ts"],"names":[],"mappings":"AASA,OAAO,EACL,wBAAwB,EACxB,8BAA8B,EAC/B,MAAM,kBAAkB,CAAC;AAG1B,eAAO,MAAM,aAAa,EAAE,wBAM3B,CAAC;AAMF,wBAAgB,WAAW,CACzB,MAAM,GAAE,OAAO,CAAC,wBAAwB,CAAM,GAC7C,8BAA8B,CAgBhC"}
|
|
@@ -2,37 +2,23 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.defaultConfig = void 0;
|
|
4
4
|
exports.parseConfig = parseConfig;
|
|
5
|
-
const
|
|
5
|
+
const redis_smq_rest_api_1 = require("redis-smq-rest-api");
|
|
6
6
|
exports.defaultConfig = {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
apiProxyTarget: undefined,
|
|
7
|
+
webServer: {
|
|
8
|
+
port: 8080,
|
|
9
|
+
basePath: '/',
|
|
10
|
+
apiProxyTarget: undefined,
|
|
11
|
+
},
|
|
13
12
|
};
|
|
14
13
|
function parseConfig(config = {}) {
|
|
15
|
-
const
|
|
16
|
-
const
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
options: {
|
|
25
|
-
port: cfg.redisPort,
|
|
26
|
-
host: cfg.redisHost,
|
|
27
|
-
db: cfg.redisDB,
|
|
28
|
-
showFriendlyErrorStack: true,
|
|
29
|
-
},
|
|
30
|
-
},
|
|
31
|
-
webServer: webServerCfg,
|
|
32
|
-
apiServer: {
|
|
33
|
-
port: cfg.port,
|
|
34
|
-
basePath: cfg.basePath,
|
|
35
|
-
},
|
|
36
|
-
};
|
|
14
|
+
const restApiParsedConfig = (0, redis_smq_rest_api_1.parseConfig)(config);
|
|
15
|
+
const webServer = Object.assign(Object.assign({}, exports.defaultConfig.webServer), config.webServer);
|
|
16
|
+
return Object.assign(Object.assign({}, restApiParsedConfig), { webServer: {
|
|
17
|
+
port: Number(webServer.port),
|
|
18
|
+
basePath: String(webServer.basePath),
|
|
19
|
+
apiProxyTarget: webServer.apiProxyTarget
|
|
20
|
+
? String(webServer.apiProxyTarget)
|
|
21
|
+
: undefined,
|
|
22
|
+
} });
|
|
37
23
|
}
|
|
38
24
|
//# sourceMappingURL=parse-config.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parse-config.js","sourceRoot":"","sources":["../../../../src/config/parse-config.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"parse-config.js","sourceRoot":"","sources":["../../../../src/config/parse-config.ts"],"names":[],"mappings":";;;AA2BA,kCAkBC;AAhCD,2DAAuE;AAE1D,QAAA,aAAa,GAA6B;IACrD,SAAS,EAAE;QACT,IAAI,EAAE,IAAI;QACV,QAAQ,EAAE,GAAG;QACb,cAAc,EAAE,SAAS;KAC1B;CACF,CAAC;AAMF,SAAgB,WAAW,CACzB,SAA4C,EAAE;IAE9C,MAAM,mBAAmB,GAAG,IAAA,gCAAkB,EAAC,MAAM,CAAC,CAAC;IACvD,MAAM,SAAS,mCACV,qBAAa,CAAC,SAAS,GACvB,MAAM,CAAC,SAAS,CACpB,CAAC;IACF,uCACK,mBAAmB,KACtB,SAAS,EAAE;YACT,IAAI,EAAE,MAAM,CAAC,SAAS,CAAC,IAAI,CAAC;YAC5B,QAAQ,EAAE,MAAM,CAAC,SAAS,CAAC,QAAQ,CAAC;YACpC,cAAc,EAAE,SAAS,CAAC,cAAc;gBACtC,CAAC,CAAC,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC;gBAClC,CAAC,CAAC,SAAS;SACd,IACD;AACJ,CAAC"}
|
|
@@ -1,12 +1,23 @@
|
|
|
1
|
-
import { IRedisSMQRestApiParsedConfig } from 'redis-smq-rest-api';
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import { IRedisSMQRestApiConfig, IRedisSMQRestApiParsedConfig } from 'redis-smq-rest-api';
|
|
2
|
+
import { EConsoleLoggerLevel, ERedisConfigClient } from 'redis-smq-common';
|
|
3
|
+
export interface IRedisSMQWebServerCliOptions {
|
|
4
|
+
port: string;
|
|
4
5
|
basePath: string;
|
|
5
|
-
|
|
6
|
+
redisClient: ERedisConfigClient;
|
|
7
|
+
redisPort: string;
|
|
6
8
|
redisHost: string;
|
|
7
|
-
|
|
9
|
+
redisDb: string;
|
|
10
|
+
enableLog: string;
|
|
11
|
+
logLevel: EConsoleLoggerLevel;
|
|
8
12
|
apiProxyTarget?: string;
|
|
9
13
|
}
|
|
14
|
+
export interface IRedisSMQWebServerConfig extends IRedisSMQRestApiConfig {
|
|
15
|
+
webServer?: {
|
|
16
|
+
port?: number;
|
|
17
|
+
basePath?: string;
|
|
18
|
+
apiProxyTarget?: string;
|
|
19
|
+
};
|
|
20
|
+
}
|
|
10
21
|
export interface IRedisSMQWebServerParsedConfig extends IRedisSMQRestApiParsedConfig {
|
|
11
22
|
webServer: {
|
|
12
23
|
port: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/config/types/index.ts"],"names":[],"mappings":"AASA,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/config/types/index.ts"],"names":[],"mappings":"AASA,OAAO,EACL,sBAAsB,EACtB,4BAA4B,EAC7B,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAE3E,MAAM,WAAW,4BAA4B;IAC3C,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,kBAAkB,CAAC;IAChC,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,mBAAmB,CAAC;IAC9B,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED,MAAM,WAAW,wBAAyB,SAAQ,sBAAsB;IACtE,SAAS,CAAC,EAAE;QACV,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,QAAQ,CAAC,EAAE,MAAM,CAAC;QAKlB,cAAc,CAAC,EAAE,MAAM,CAAC;KACzB,CAAC;CACH;AAED,MAAM,WAAW,8BACf,SAAQ,4BAA4B;IACpC,SAAS,EAAE;QACT,IAAI,EAAE,MAAM,CAAC;QACb,QAAQ,EAAE,MAAM,CAAC;QAKjB,cAAc,CAAC,EAAE,MAAM,CAAC;KACzB,CAAC;CACH"}
|
package/dist/cjs/src/index.d.ts
CHANGED
|
@@ -8,7 +8,7 @@ export declare class RedisSMQWebServer {
|
|
|
8
8
|
private restApi;
|
|
9
9
|
private bootstrapped;
|
|
10
10
|
private httpServer;
|
|
11
|
-
constructor(config?:
|
|
11
|
+
constructor(config?: IRedisSMQWebServerConfig);
|
|
12
12
|
private setupMiddleware;
|
|
13
13
|
private setupApi;
|
|
14
14
|
private setupRoutes;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAcA,OAAO,EACL,wBAAwB,EAEzB,MAAM,yBAAyB,CAAC;AAMjC,qBAAa,iBAAiB;IAC5B,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAa;IACjC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAiC;IACxD,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAS;IACnC,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAuB;IACnD,OAAO,CAAC,QAAQ,CAAC,cAAc,CAAuB;IACtD,OAAO,CAAC,OAAO,CAAgC;IAC/C,OAAO,CAAC,YAAY,CAAS;IAC7B,OAAO,CAAC,UAAU,CAA4B;gBAElC,MAAM,GAAE,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAcA,OAAO,EACL,wBAAwB,EAEzB,MAAM,yBAAyB,CAAC;AAMjC,qBAAa,iBAAiB;IAC5B,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAa;IACjC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAiC;IACxD,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAS;IACnC,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAuB;IACnD,OAAO,CAAC,QAAQ,CAAC,cAAc,CAAuB;IACtD,OAAO,CAAC,OAAO,CAAgC;IAC/C,OAAO,CAAC,YAAY,CAAS;IAC7B,OAAO,CAAC,UAAU,CAA4B;gBAElC,MAAM,GAAE,wBAA6B;YAWnC,eAAe;YAsBf,QAAQ;YAuBR,WAAW;YAoCX,SAAS;IAQV,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;IAcpB,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC;CAmBvC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AASA,sDAA8B;AAC9B,gDAAwB;AACxB,4CAAoB;AAEpB,uDAA+C;AAK/C,2DAAqD;AACrD,8DAAuD;AAEvD,iEAA8D;AAE9D,MAAa,iBAAiB;IAU5B,YAAY,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AASA,sDAA8B;AAC9B,gDAAwB;AACxB,4CAAoB;AAEpB,uDAA+C;AAK/C,2DAAqD;AACrD,8DAAuD;AAEvD,iEAA8D;AAE9D,MAAa,iBAAiB;IAU5B,YAAY,SAAmC,EAAE;;QAThC,QAAG,GAAG,IAAA,iBAAO,GAAE,CAAC;QAIhB,mBAAc,GAAkB,IAAI,CAAC;QAC9C,YAAO,GAA2B,IAAI,CAAC;QACvC,iBAAY,GAAG,KAAK,CAAC;QACrB,eAAU,GAAuB,IAAI,CAAC;QAI5C,IAAI,CAAC,MAAM,GAAG,IAAA,6BAAW,EAAC,MAAM,CAAC,CAAC;QAClC,IAAI,CAAC,WAAW,GAAG;YACjB,SAAS,EAAE,IAAI,CAAC,MAAM,CA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C;YACzD,CAAC;YAGD,IAAI,IAAI,CAAC,OAAO,EAAE,CAAC;gBACjB,MAAM,IAAI,CAAC,OAAO,CAAC,QAAQ,EAAE,CAAC;gBAC9B,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC;YACtB,CAAC;QACH,CAAC;KAAA;CACF;AA/ID,8CA+IC"}
|
package/dist/esm/bin/cli.d.ts
CHANGED
package/dist/esm/bin/cli.js
CHANGED
|
@@ -1,19 +1,53 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
1
2
|
import { Command } from 'commander';
|
|
2
3
|
import { RedisSMQWebServer } from '../src/index.js';
|
|
3
4
|
import { defaultConfig } from '../src/config/parse-config.js';
|
|
5
|
+
import { EConsoleLoggerLevel } from 'redis-smq-common';
|
|
6
|
+
import { defaultConfig as defaultRedisSMQConfig } from 'redis-smq';
|
|
7
|
+
const defaultLogLevel = typeof defaultRedisSMQConfig.logger.options.logLevel === 'number'
|
|
8
|
+
? defaultRedisSMQConfig.logger.options.logLevel
|
|
9
|
+
: EConsoleLoggerLevel[defaultRedisSMQConfig.logger.options.logLevel];
|
|
4
10
|
const program = new Command();
|
|
5
11
|
program
|
|
6
12
|
.name('redis-smq-web-server')
|
|
7
13
|
.description('Web server for RedisSMQ Web UI');
|
|
8
14
|
program
|
|
9
|
-
.option('-p, --port <
|
|
10
|
-
.option('-
|
|
11
|
-
.option('-
|
|
12
|
-
.option('-
|
|
13
|
-
.option('-
|
|
14
|
-
.option('-
|
|
15
|
+
.option('-p, --port <number>', 'Port to run the server on', String(defaultConfig.webServer?.port))
|
|
16
|
+
.option('-b, --base-path <string>', 'Base public path for the RedisSMQ Web UI SPA', defaultConfig.webServer?.basePath)
|
|
17
|
+
.option('-t, --api-proxy-target <string>', 'Proxy target for API (/api, /docs, /assets). Example: http://127.0.0.1:6000', defaultConfig.webServer?.apiProxyTarget)
|
|
18
|
+
.option('-c, --redis-client <ioredis|redis>', 'Redis client. Valid options are: ioredis, redis.', defaultRedisSMQConfig.redis.client)
|
|
19
|
+
.option('-r, --redis-host <string>', 'Redis server host', defaultRedisSMQConfig.redis.options.host)
|
|
20
|
+
.option('-o, --redis-port <number>', 'Redis server port', String(defaultRedisSMQConfig.redis.options.port))
|
|
21
|
+
.option('-d, --redis-db <number>', 'Redis database number', String(defaultRedisSMQConfig.redis.options.db))
|
|
22
|
+
.option('-e, --enable-log <0|1>', 'Enable console logging. Valid options are: 0, 1', String(Number(defaultRedisSMQConfig.logger.enabled)))
|
|
23
|
+
.option('-v, --log-level <0|1|2|3>', `Log level. Numbers: ${EConsoleLoggerLevel.DEBUG}=DEBUG, ${EConsoleLoggerLevel.INFO}=INFO, ${EConsoleLoggerLevel.WARN}=WARN, ${EConsoleLoggerLevel.ERROR}=ERROR`, String(defaultLogLevel));
|
|
15
24
|
program.parse();
|
|
16
25
|
const options = program.opts();
|
|
17
|
-
const
|
|
26
|
+
const config = {
|
|
27
|
+
webServer: {
|
|
28
|
+
port: Number(options.port),
|
|
29
|
+
basePath: options.basePath,
|
|
30
|
+
apiProxyTarget: options.apiProxyTarget,
|
|
31
|
+
},
|
|
32
|
+
apiServer: {
|
|
33
|
+
port: Number(options.port),
|
|
34
|
+
basePath: options.basePath,
|
|
35
|
+
},
|
|
36
|
+
redis: {
|
|
37
|
+
client: options.redisClient,
|
|
38
|
+
options: {
|
|
39
|
+
host: options.redisHost,
|
|
40
|
+
port: Number(options.redisPort),
|
|
41
|
+
db: Number(options.redisDb),
|
|
42
|
+
},
|
|
43
|
+
},
|
|
44
|
+
logger: {
|
|
45
|
+
enabled: Boolean(Number(options.enableLog)),
|
|
46
|
+
options: {
|
|
47
|
+
logLevel: Number(options.logLevel),
|
|
48
|
+
},
|
|
49
|
+
},
|
|
50
|
+
};
|
|
51
|
+
const server = new RedisSMQWebServer(config);
|
|
18
52
|
server.run();
|
|
19
53
|
//# sourceMappingURL=cli.js.map
|
package/dist/esm/bin/cli.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli.js","sourceRoot":"","sources":["../../../bin/cli.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"cli.js","sourceRoot":"","sources":["../../../bin/cli.ts"],"names":[],"mappings":";AAWA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAKpD,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAC9D,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,EAAE,aAAa,IAAI,qBAAqB,EAAE,MAAM,WAAW,CAAC;AAEnE,MAAM,eAAe,GACnB,OAAO,qBAAqB,CAAC,MAAM,CAAC,OAAO,CAAC,QAAQ,KAAK,QAAQ;IAC/D,CAAC,CAAC,qBAAqB,CAAC,MAAM,CAAC,OAAO,CAAC,QAAQ;IAC/C,CAAC,CAAC,mBAAmB,CAAC,qBAAqB,CAAC,MAAM,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;AAEzE,MAAM,OAAO,GAAG,IAAI,OAAO,EAAE,CAAC;AAE9B,OAAO;KACJ,IAAI,CAAC,sBAAsB,CAAC;KAC5B,WAAW,CAAC,gCAAgC,CAAC,CAAC;AAEjD,OAAO;KACJ,MAAM,CACL,qBAAqB,EACrB,2BAA2B,EAC3B,MAAM,CAAC,aAAa,CAAC,SAAS,EAAE,IAAI,CAAC,CACtC;KACA,MAAM,CACL,0BAA0B,EAC1B,8CAA8C,EAC9C,aAAa,CAAC,SAAS,EAAE,QAAQ,CAClC;KACA,MAAM,CACL,iCAAiC,EACjC,6EAA6E,EAC7E,aAAa,CAAC,SAAS,EAAE,cAAc,CACxC;KACA,MAAM,CACL,oCAAoC,EACpC,kDAAkD,EAClD,qBAAqB,CAAC,KAAK,CAAC,MAAM,CACnC;KACA,MAAM,CAEL,2BAA2B,EAC3B,mBAAmB,EACnB,qBAAqB,CAAC,KAAK,CAAC,OAAO,CAAC,IA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AC,SAAS,CAAC,CAAC;QAC3C,OAAO,EAAE;YACP,QAAQ,EAAE,MAAM,CAAC,OAAO,CAAC,QAAQ,CAAC;SACnC;KACF;CACF,CAAC;AAEF,MAAM,MAAM,GAAG,IAAI,iBAAiB,CAAC,MAAM,CAAC,CAAC;AAC7C,MAAM,CAAC,GAAG,EAAE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parse-config.d.ts","sourceRoot":"","sources":["../../../../src/config/parse-config.ts"],"names":[],"mappings":"AASA,OAAO,EACL,wBAAwB,EACxB,8BAA8B,EAC/B,MAAM,kBAAkB,CAAC;AAG1B,eAAO,MAAM,aAAa,EAAE,
|
|
1
|
+
{"version":3,"file":"parse-config.d.ts","sourceRoot":"","sources":["../../../../src/config/parse-config.ts"],"names":[],"mappings":"AASA,OAAO,EACL,wBAAwB,EACxB,8BAA8B,EAC/B,MAAM,kBAAkB,CAAC;AAG1B,eAAO,MAAM,aAAa,EAAE,wBAM3B,CAAC;AAMF,wBAAgB,WAAW,CACzB,MAAM,GAAE,OAAO,CAAC,wBAAwB,CAAM,GAC7C,8BAA8B,CAgBhC"}
|
|
@@ -1,36 +1,25 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { parseConfig as parseRestApiConfig } from 'redis-smq-rest-api';
|
|
2
2
|
export const defaultConfig = {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
apiProxyTarget: undefined,
|
|
3
|
+
webServer: {
|
|
4
|
+
port: 8080,
|
|
5
|
+
basePath: '/',
|
|
6
|
+
apiProxyTarget: undefined,
|
|
7
|
+
},
|
|
9
8
|
};
|
|
10
9
|
export function parseConfig(config = {}) {
|
|
11
|
-
const
|
|
12
|
-
|
|
13
|
-
...
|
|
14
|
-
|
|
15
|
-
const webServerCfg = {
|
|
16
|
-
port: cfg.port,
|
|
17
|
-
basePath: cfg.basePath,
|
|
18
|
-
apiProxyTarget: cfg.apiProxyTarget,
|
|
10
|
+
const restApiParsedConfig = parseRestApiConfig(config);
|
|
11
|
+
const webServer = {
|
|
12
|
+
...defaultConfig.webServer,
|
|
13
|
+
...config.webServer,
|
|
19
14
|
};
|
|
20
15
|
return {
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
},
|
|
29
|
-
},
|
|
30
|
-
webServer: webServerCfg,
|
|
31
|
-
apiServer: {
|
|
32
|
-
port: cfg.port,
|
|
33
|
-
basePath: cfg.basePath,
|
|
16
|
+
...restApiParsedConfig,
|
|
17
|
+
webServer: {
|
|
18
|
+
port: Number(webServer.port),
|
|
19
|
+
basePath: String(webServer.basePath),
|
|
20
|
+
apiProxyTarget: webServer.apiProxyTarget
|
|
21
|
+
? String(webServer.apiProxyTarget)
|
|
22
|
+
: undefined,
|
|
34
23
|
},
|
|
35
24
|
};
|
|
36
25
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parse-config.js","sourceRoot":"","sources":["../../../../src/config/parse-config.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,kBAAkB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"parse-config.js","sourceRoot":"","sources":["../../../../src/config/parse-config.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,WAAW,IAAI,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAEvE,MAAM,CAAC,MAAM,aAAa,GAA6B;IACrD,SAAS,EAAE;QACT,IAAI,EAAE,IAAI;QACV,QAAQ,EAAE,GAAG;QACb,cAAc,EAAE,SAAS;KAC1B;CACF,CAAC;AAMF,MAAM,UAAU,WAAW,CACzB,SAA4C,EAAE;IAE9C,MAAM,mBAAmB,GAAG,kBAAkB,CAAC,MAAM,CAAC,CAAC;IACvD,MAAM,SAAS,GAAG;QAChB,GAAG,aAAa,CAAC,SAAS;QAC1B,GAAG,MAAM,CAAC,SAAS;KACpB,CAAC;IACF,OAAO;QACL,GAAG,mBAAmB;QACtB,SAAS,EAAE;YACT,IAAI,EAAE,MAAM,CAAC,SAAS,CAAC,IAAI,CAAC;YAC5B,QAAQ,EAAE,MAAM,CAAC,SAAS,CAAC,QAAQ,CAAC;YACpC,cAAc,EAAE,SAAS,CAAC,cAAc;gBACtC,CAAC,CAAC,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC;gBAClC,CAAC,CAAC,SAAS;SACd;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -1,12 +1,23 @@
|
|
|
1
|
-
import { IRedisSMQRestApiParsedConfig } from 'redis-smq-rest-api';
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import { IRedisSMQRestApiConfig, IRedisSMQRestApiParsedConfig } from 'redis-smq-rest-api';
|
|
2
|
+
import { EConsoleLoggerLevel, ERedisConfigClient } from 'redis-smq-common';
|
|
3
|
+
export interface IRedisSMQWebServerCliOptions {
|
|
4
|
+
port: string;
|
|
4
5
|
basePath: string;
|
|
5
|
-
|
|
6
|
+
redisClient: ERedisConfigClient;
|
|
7
|
+
redisPort: string;
|
|
6
8
|
redisHost: string;
|
|
7
|
-
|
|
9
|
+
redisDb: string;
|
|
10
|
+
enableLog: string;
|
|
11
|
+
logLevel: EConsoleLoggerLevel;
|
|
8
12
|
apiProxyTarget?: string;
|
|
9
13
|
}
|
|
14
|
+
export interface IRedisSMQWebServerConfig extends IRedisSMQRestApiConfig {
|
|
15
|
+
webServer?: {
|
|
16
|
+
port?: number;
|
|
17
|
+
basePath?: string;
|
|
18
|
+
apiProxyTarget?: string;
|
|
19
|
+
};
|
|
20
|
+
}
|
|
10
21
|
export interface IRedisSMQWebServerParsedConfig extends IRedisSMQRestApiParsedConfig {
|
|
11
22
|
webServer: {
|
|
12
23
|
port: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/config/types/index.ts"],"names":[],"mappings":"AASA,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/config/types/index.ts"],"names":[],"mappings":"AASA,OAAO,EACL,sBAAsB,EACtB,4BAA4B,EAC7B,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAE3E,MAAM,WAAW,4BAA4B;IAC3C,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,kBAAkB,CAAC;IAChC,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,mBAAmB,CAAC;IAC9B,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED,MAAM,WAAW,wBAAyB,SAAQ,sBAAsB;IACtE,SAAS,CAAC,EAAE;QACV,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,QAAQ,CAAC,EAAE,MAAM,CAAC;QAKlB,cAAc,CAAC,EAAE,MAAM,CAAC;KACzB,CAAC;CACH;AAED,MAAM,WAAW,8BACf,SAAQ,4BAA4B;IACpC,SAAS,EAAE;QACT,IAAI,EAAE,MAAM,CAAC;QACb,QAAQ,EAAE,MAAM,CAAC;QAKjB,cAAc,CAAC,EAAE,MAAM,CAAC;KACzB,CAAC;CACH"}
|
package/dist/esm/src/index.d.ts
CHANGED
|
@@ -8,7 +8,7 @@ export declare class RedisSMQWebServer {
|
|
|
8
8
|
private restApi;
|
|
9
9
|
private bootstrapped;
|
|
10
10
|
private httpServer;
|
|
11
|
-
constructor(config?:
|
|
11
|
+
constructor(config?: IRedisSMQWebServerConfig);
|
|
12
12
|
private setupMiddleware;
|
|
13
13
|
private setupApi;
|
|
14
14
|
private setupRoutes;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAcA,OAAO,EACL,wBAAwB,EAEzB,MAAM,yBAAyB,CAAC;AAMjC,qBAAa,iBAAiB;IAC5B,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAa;IACjC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAiC;IACxD,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAS;IACnC,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAuB;IACnD,OAAO,CAAC,QAAQ,CAAC,cAAc,CAAuB;IACtD,OAAO,CAAC,OAAO,CAAgC;IAC/C,OAAO,CAAC,YAAY,CAAS;IAC7B,OAAO,CAAC,UAAU,CAA4B;gBAElC,MAAM,GAAE,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAcA,OAAO,EACL,wBAAwB,EAEzB,MAAM,yBAAyB,CAAC;AAMjC,qBAAa,iBAAiB;IAC5B,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAa;IACjC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAiC;IACxD,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAS;IACnC,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAuB;IACnD,OAAO,CAAC,QAAQ,CAAC,cAAc,CAAuB;IACtD,OAAO,CAAC,OAAO,CAAgC;IAC/C,OAAO,CAAC,YAAY,CAAS;IAC7B,OAAO,CAAC,UAAU,CAA4B;gBAElC,MAAM,GAAE,wBAA6B;YAWnC,eAAe;YAsBf,QAAQ;YAuBR,WAAW;YAoCX,SAAS;IAQV,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;IAcpB,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC;CAmBvC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AASA,OAAO,OAAO,MAAM,SAAS,CAAC;AAC9B,OAAO,IAAI,MAAM,MAAM,CA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AAC,yCAAyC,CAAC,CAAC;QACzD,CAAC;QAGD,IAAI,IAAI,CAAC,OAAO,EAAE,CAAC;YACjB,MAAM,IAAI,CAAC,OAAO,CAAC,QAAQ,EAAE,CAAC;YAC9B,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC;QACtB,CAAC;IACH,CAAC;CACF"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "redis-smq-web-server",
|
|
3
|
-
"version": "9.0.0-next.
|
|
3
|
+
"version": "9.0.0-next.3",
|
|
4
4
|
"description": "Web server for RedisSMQ Web UI: serves the SPA and hosts or proxies the RedisSMQ REST API.",
|
|
5
5
|
"author": "Weyoss <weyoss@protonmail.com>",
|
|
6
6
|
"license": "MIT",
|
|
@@ -37,16 +37,26 @@
|
|
|
37
37
|
"dependencies": {
|
|
38
38
|
"commander": "13.1.0",
|
|
39
39
|
"express": "4.21.2",
|
|
40
|
-
"http-proxy-middleware": "3.0.5"
|
|
41
|
-
"ioredis": "5.5.0"
|
|
40
|
+
"http-proxy-middleware": "3.0.5"
|
|
42
41
|
},
|
|
43
42
|
"devDependencies": {
|
|
44
43
|
"@types/express": "4.17.23"
|
|
45
44
|
},
|
|
46
45
|
"peerDependencies": {
|
|
47
|
-
"redis
|
|
48
|
-
"
|
|
49
|
-
"redis-smq
|
|
46
|
+
"@redis/client": "^1.6.0",
|
|
47
|
+
"ioredis": "^5.4.0",
|
|
48
|
+
"redis-smq": "^9.0.0-next.3",
|
|
49
|
+
"redis-smq-common": "^9.0.0-next.3",
|
|
50
|
+
"redis-smq-rest-api": "^9.0.0-next.3",
|
|
51
|
+
"redis-smq-web-ui": "^9.0.0-next.3"
|
|
52
|
+
},
|
|
53
|
+
"peerDependenciesMeta": {
|
|
54
|
+
"@redis/client": {
|
|
55
|
+
"optional": true
|
|
56
|
+
},
|
|
57
|
+
"ioredis": {
|
|
58
|
+
"optional": true
|
|
59
|
+
}
|
|
50
60
|
},
|
|
51
61
|
"engineStrict": true,
|
|
52
62
|
"engines": {
|