@zintrust/core 2.4.0 → 2.4.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (49) hide show
  1. package/bin/zintrust-main.d.ts.map +1 -1
  2. package/bin/zintrust-main.js +11 -1
  3. package/package.json +2 -2
  4. package/src/cache/Cache.d.ts +6 -0
  5. package/src/cache/Cache.d.ts.map +1 -1
  6. package/src/cache/Cache.js +50 -0
  7. package/src/cache/CacheDriver.d.ts +8 -0
  8. package/src/cache/CacheDriver.d.ts.map +1 -1
  9. package/src/cache/drivers/RedisDriver.d.ts.map +1 -1
  10. package/src/cache/drivers/RedisDriver.js +64 -2
  11. package/src/cli/CLI.d.ts.map +1 -1
  12. package/src/cli/CLI.js +2 -0
  13. package/src/cli/commands/DoctorArchitectureCommand.d.ts.map +1 -1
  14. package/src/cli/commands/DoctorArchitectureCommand.js +4 -2
  15. package/src/cli/commands/RedisRpcCommand.d.ts +6 -0
  16. package/src/cli/commands/RedisRpcCommand.d.ts.map +1 -0
  17. package/src/cli/commands/RedisRpcCommand.js +96 -0
  18. package/src/cli/commands/index.d.ts +1 -0
  19. package/src/cli/commands/index.d.ts.map +1 -1
  20. package/src/cli/commands/index.js +1 -0
  21. package/src/cli/scaffolding/env.d.ts.map +1 -1
  22. package/src/cli/scaffolding/env.js +9 -0
  23. package/src/cli/services/WorkerStartupDiagnostics.d.ts.map +1 -1
  24. package/src/cli/services/WorkerStartupDiagnostics.js +4 -2
  25. package/src/config/app.d.ts.map +1 -1
  26. package/src/config/app.js +3 -0
  27. package/src/config/env.d.ts +7 -0
  28. package/src/config/env.d.ts.map +1 -1
  29. package/src/config/env.js +7 -0
  30. package/src/config/queue.d.ts.map +1 -1
  31. package/src/config/queue.js +4 -42
  32. package/src/config/workers.d.ts.map +1 -1
  33. package/src/config/workers.js +12 -6
  34. package/src/index.js +3 -3
  35. package/src/orm/adapters/D1RemoteAdapter.d.ts.map +1 -1
  36. package/src/orm/adapters/D1RemoteAdapter.js +2 -1
  37. package/src/proxy/redis/RedisProxyServer.d.ts.map +1 -1
  38. package/src/proxy/redis/RedisProxyServer.js +77 -241
  39. package/src/tools/mail/drivers/Cloudflare.d.ts.map +1 -1
  40. package/src/tools/mail/drivers/Cloudflare.js +2 -0
  41. package/src/tools/redis/RedisTransport.d.ts +2 -27
  42. package/src/tools/redis/RedisTransport.d.ts.map +1 -1
  43. package/src/tools/redis/RedisTransport.js +123 -155
  44. package/src/zintrust.plugins.d.ts +6 -3
  45. package/src/zintrust.plugins.d.ts.map +1 -1
  46. package/src/zintrust.plugins.js +6 -3
  47. package/src/proxy/redis/RedisProxyActions.d.ts +0 -15
  48. package/src/proxy/redis/RedisProxyActions.d.ts.map +0 -1
  49. package/src/proxy/redis/RedisProxyActions.js +0 -124
@@ -1 +1 @@
1
- {"version":3,"file":"zintrust-main.d.ts","sourceRoot":"","sources":["../../bin/zintrust-main.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAQH,KAAK,qBAAqB,GAAG;IAC3B,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,MAAM,CAAC;CACrB,CAAC;AAwaF,wBAAsB,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC,CAMzC;AAED,eAAO,MAAM,mBAAmB;;qCAtYQ,MAAM,KAAG,qBAAqB,GAAG,SAAS;mCA6C5C,MAAM,GAAG,IAAI,UAAU,MAAM,CAAC,OAAO,GAAG,IAAI,KAAG,MAAM;iCAnEzD,MAAM;8BAIP,MAAM,KAAG,MAAM;uCAoGtC,qBAAqB,WACpB,MAAM,EAAE,KAChB,OAAO,CAAC,KAAK,CAAC;oCA9FsB,MAAM,sBAAsB,MAAM,KAAG,OAAO;6CAsI7B,MAAM,EAAE,KAAG,OAAO,CAAC,OAAO,CAAC;yCAjG1E,MAAM,sBACS,MAAM,QACrB,MAAM,CAAC,UAAU,KACrB,qBAAqB,GAAG,SAAS;EAkXlC,CAAC;AAaH,OAAO,EAAE,CAAC"}
1
+ {"version":3,"file":"zintrust-main.d.ts","sourceRoot":"","sources":["../../bin/zintrust-main.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAQH,KAAK,qBAAqB,GAAG;IAC3B,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,MAAM,CAAC;CACrB,CAAC;AAkbF,wBAAsB,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC,CAMzC;AAED,eAAO,MAAM,mBAAmB;;qCAhZQ,MAAM,KAAG,qBAAqB,GAAG,SAAS;mCA6C5C,MAAM,GAAG,IAAI,UAAU,MAAM,CAAC,OAAO,GAAG,IAAI,KAAG,MAAM;iCAnEzD,MAAM;8BAIP,MAAM,KAAG,MAAM;uCAoGtC,qBAAqB,WACpB,MAAM,EAAE,KAChB,OAAO,CAAC,KAAK,CAAC;oCA9FsB,MAAM,sBAAsB,MAAM,KAAG,OAAO;6CAsI7B,MAAM,EAAE,KAAG,OAAO,CAAC,OAAO,CAAC;yCAjG1E,MAAM,sBACS,MAAM,QACrB,MAAM,CAAC,UAAU,KACrB,qBAAqB,GAAG,SAAS;EA4XlC,CAAC;AAaH,OAAO,EAAE,CAAC"}
@@ -216,6 +216,16 @@ const normalizeProxyTargetArgs = (args) => {
216
216
  return args;
217
217
  return [`proxy:${mappedTarget}`, ...args.slice(2)];
218
218
  };
219
+ const normalizeRedisRpcStartArgs = (args) => {
220
+ if (args.length < 2)
221
+ return args;
222
+ const command = args[0]?.trim().toLowerCase();
223
+ const target = args[1]?.trim().toLowerCase();
224
+ if ((command === 'start' || command === 's') && target === 'redis-rpc') {
225
+ return ['redis-rpc', ...args.slice(2)];
226
+ }
227
+ return args;
228
+ };
219
229
  const getPrimaryCommand = (args) => {
220
230
  for (const arg of args) {
221
231
  const normalized = arg.trim().toLowerCase();
@@ -336,7 +346,7 @@ const runCliInternal = async () => {
336
346
  // ignore
337
347
  }
338
348
  }
339
- await cli.run(normalizeProxyTargetArgs(args));
349
+ await cli.run(normalizeProxyTargetArgs(normalizeRedisRpcStartArgs(args)));
340
350
  };
341
351
  export async function run() {
342
352
  try {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zintrust/core",
3
- "version": "2.4.0",
3
+ "version": "2.4.2",
4
4
  "description": "Production-grade TypeScript backend framework for JavaScript",
5
5
  "homepage": "https://zintrust.com",
6
6
  "repository": {
@@ -216,7 +216,7 @@
216
216
  "mysql2": "^3.22.4",
217
217
  "pg": "^8.21.0",
218
218
  "redis": "^6.0.0",
219
- "tsx": "^4.22.3"
219
+ "tsx": "^4.22.4"
220
220
  },
221
221
  "overrides": {
222
222
  "ajv": "^8.18.0",
@@ -10,6 +10,8 @@ type CacheStore = Readonly<{
10
10
  delete: (key: string) => Promise<void>;
11
11
  clear: () => Promise<void>;
12
12
  has: (key: string) => Promise<boolean>;
13
+ increment: (key: string, amount?: number) => Promise<number>;
14
+ decrement: (key: string, amount?: number) => Promise<number>;
13
15
  getDriver: () => CacheDriver;
14
16
  }>;
15
17
  export declare const Cache: Readonly<{
@@ -18,6 +20,8 @@ export declare const Cache: Readonly<{
18
20
  delete: (key: string) => Promise<void>;
19
21
  clear: () => Promise<void>;
20
22
  has: (key: string) => Promise<boolean>;
23
+ increment: (key: string, amount?: number) => Promise<number>;
24
+ decrement: (key: string, amount?: number) => Promise<number>;
21
25
  getDriver: () => CacheDriver;
22
26
  getRedisClient: (storeName?: string) => unknown;
23
27
  store: (name?: string) => CacheStore;
@@ -32,6 +36,8 @@ export declare const cache: Readonly<{
32
36
  delete: (key: string) => Promise<void>;
33
37
  clear: () => Promise<void>;
34
38
  has: (key: string) => Promise<boolean>;
39
+ increment: (key: string, amount?: number) => Promise<number>;
40
+ decrement: (key: string, amount?: number) => Promise<number>;
35
41
  getDriver: () => CacheDriver;
36
42
  getRedisClient: (storeName?: string) => unknown;
37
43
  store: (name?: string) => CacheStore;
@@ -1 +1 @@
1
- {"version":3,"file":"Cache.d.ts","sourceRoot":"","sources":["../../../src/cache/Cache.ts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kBlC,CAAC,OAAO,MAAM,SAAS,CAAC,QAAQ,MAAM,KAAG,OAAO,CAAC,IAAI,CAAC;kBAkBjD,MAAM,KAAG,OAAO,CAAC,IAAI,CAAC;iBAiBtB,OAAO,CAAC,IAAI,CAAC;eAgBb,MAAM,KAAG,OAAO,CAAC,OAAO,CAAC;qBAenB,MAAM,sBAAe,OAAO,CAAC,MAAM,CAAC;qBAapC,MAAM,sBAAe,OAAO,CAAC,MAAM,CAAC;qBAgB5C,WAAW;iCAwIG,MAAM,KAAG,OAAO;mBAvH9B,MAAM,KAAG,UAAU;iBAmHvB,IAAI;EA2BpB,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,KAAK;UArRC,CAAC,OAAO,MAAM,KAAG,OAAO,CAAC,CAAC,GAAG,IAAI,CAAC;UAkBlC,CAAC,OAAO,MAAM,SAAS,CAAC,QAAQ,MAAM,KAAG,OAAO,CAAC,IAAI,CAAC;kBAkBjD,MAAM,KAAG,OAAO,CAAC,IAAI,CAAC;iBAiBtB,OAAO,CAAC,IAAI,CAAC;eAgBb,MAAM,KAAG,OAAO,CAAC,OAAO,CAAC;qBAenB,MAAM,sBAAe,OAAO,CAAC,MAAM,CAAC;qBAapC,MAAM,sBAAe,OAAO,CAAC,MAAM,CAAC;qBAgB5C,WAAW;iCAwIG,MAAM,KAAG,OAAO;mBAvH9B,MAAM,KAAG,UAAU;iBAmHvB,IAAI;EAgCI,CAAC"}
@@ -131,12 +131,36 @@ const has = async (key) => {
131
131
  SystemTraceBridge.emitCache('has', prefixedKey, Date.now() - startedAt, exists, undefined, DEFAULT_STORE_NAME);
132
132
  return exists;
133
133
  };
134
+ const increment = async (key, amount = 1) => {
135
+ const prefixedKey = autoPrefixKey(key);
136
+ const driver = getDriverInstance();
137
+ if (typeof driver.increment === 'function') {
138
+ return driver.increment(prefixedKey, amount);
139
+ }
140
+ const current = Number((await driver.get(prefixedKey)) ?? 0);
141
+ const next = current + amount;
142
+ await driver.set(prefixedKey, next);
143
+ return next;
144
+ };
145
+ const decrement = async (key, amount = 1) => {
146
+ const prefixedKey = autoPrefixKey(key);
147
+ const driver = getDriverInstance();
148
+ if (typeof driver.decrement === 'function') {
149
+ return driver.decrement(prefixedKey, amount);
150
+ }
151
+ const current = Number((await driver.get(prefixedKey)) ?? 0);
152
+ const next = current - amount;
153
+ await driver.set(prefixedKey, next);
154
+ return next;
155
+ };
134
156
  /**
135
157
  * Get the underlying driver instance
136
158
  */
137
159
  const getDriver = () => {
138
160
  return getDriverInstance();
139
161
  };
162
+ // Store factories expose a compact per-store facade with traced operations.
163
+ // eslint-disable-next-line max-lines-per-function
140
164
  const store = (name) => {
141
165
  const getFromStore = async (key) => {
142
166
  const prefixedKey = autoPrefixKey(key);
@@ -169,6 +193,28 @@ const store = (name) => {
169
193
  SystemTraceBridge.emitCache('has', prefixedKey, Date.now() - startedAt, exists, undefined, String(name ?? DEFAULT_STORE_NAME));
170
194
  return exists;
171
195
  };
196
+ const incrementInStore = async (key, amount = 1) => {
197
+ const prefixedKey = autoPrefixKey(key);
198
+ const driver = getDriverInstance(name);
199
+ if (typeof driver.increment === 'function') {
200
+ return driver.increment(prefixedKey, amount);
201
+ }
202
+ const current = Number((await driver.get(prefixedKey)) ?? 0);
203
+ const next = current + amount;
204
+ await driver.set(prefixedKey, next);
205
+ return next;
206
+ };
207
+ const decrementInStore = async (key, amount = 1) => {
208
+ const prefixedKey = autoPrefixKey(key);
209
+ const driver = getDriverInstance(name);
210
+ if (typeof driver.decrement === 'function') {
211
+ return driver.decrement(prefixedKey, amount);
212
+ }
213
+ const current = Number((await driver.get(prefixedKey)) ?? 0);
214
+ const next = current - amount;
215
+ await driver.set(prefixedKey, next);
216
+ return next;
217
+ };
172
218
  const getStoreDriver = () => {
173
219
  return getDriverInstance(name);
174
220
  };
@@ -178,6 +224,8 @@ const store = (name) => {
178
224
  delete: delFromStore,
179
225
  clear: clearStore,
180
226
  has: hasInStore,
227
+ increment: incrementInStore,
228
+ decrement: decrementInStore,
181
229
  getDriver: getStoreDriver,
182
230
  });
183
231
  };
@@ -198,6 +246,8 @@ export const Cache = Object.freeze({
198
246
  delete: del,
199
247
  clear,
200
248
  has,
249
+ increment,
250
+ decrement,
201
251
  getDriver,
202
252
  getRedisClient,
203
253
  store,
@@ -23,6 +23,14 @@ export interface CacheDriver {
23
23
  * Check if an item exists in the cache
24
24
  */
25
25
  has(key: string): Promise<boolean>;
26
+ /**
27
+ * Atomically increment a numeric cache value when the driver supports it.
28
+ */
29
+ increment?(key: string, amount?: number): Promise<number>;
30
+ /**
31
+ * Atomically decrement a numeric cache value when the driver supports it.
32
+ */
33
+ decrement?(key: string, amount?: number): Promise<number>;
26
34
  /**
27
35
  * Dispose of resources (optional cleanup method)
28
36
  */
@@ -1 +1 @@
1
- {"version":3,"file":"CacheDriver.d.ts","sourceRoot":"","sources":["../../../src/cache/CacheDriver.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,MAAM,WAAW,WAAW;IAC1B;;OAEG;IACH,GAAG,CAAC,CAAC,EAAE,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC;IAEvC;;OAEG;IACH,GAAG,CAAC,CAAC,EAAE,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,EAAE,GAAG,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAE3D;;OAEG;IACH,MAAM,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAEnC;;OAEG;IACH,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IAEvB;;OAEG;IACH,GAAG,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IAEnC;;OAEG;IACH,OAAO,CAAC,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IAE1B;;;OAGG;IACH,cAAc,CAAC,IAAI,OAAO,CAAC;CAC5B;AAGD,eAAO,MAAM,sBAAsB,gBAAgB,CAAC"}
1
+ {"version":3,"file":"CacheDriver.d.ts","sourceRoot":"","sources":["../../../src/cache/CacheDriver.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,MAAM,WAAW,WAAW;IAC1B;;OAEG;IACH,GAAG,CAAC,CAAC,EAAE,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC;IAEvC;;OAEG;IACH,GAAG,CAAC,CAAC,EAAE,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,EAAE,GAAG,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAE3D;;OAEG;IACH,MAAM,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAEnC;;OAEG;IACH,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IAEvB;;OAEG;IACH,GAAG,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IAEnC;;OAEG;IACH,SAAS,CAAC,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;IAE1D;;OAEG;IACH,SAAS,CAAC,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;IAE1D;;OAEG;IACH,OAAO,CAAC,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IAE1B;;;OAGG;IACH,cAAc,CAAC,IAAI,OAAO,CAAC;CAC5B;AAGD,eAAO,MAAM,sBAAsB,gBAAgB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"RedisDriver.d.ts","sourceRoot":"","sources":["../../../../src/cache/drivers/RedisDriver.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AA6XtD;;GAEG;AACH,eAAO,MAAM,WAAW;kBAXL,WAAW;EAa5B,CAAC"}
1
+ {"version":3,"file":"RedisDriver.d.ts","sourceRoot":"","sources":["../../../../src/cache/drivers/RedisDriver.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AA+btD;;GAEG;AACH,eAAO,MAAM,WAAW;kBAbL,WAAW;EAe5B,CAAC"}
@@ -38,7 +38,7 @@ const createIoredisClient = (params) => {
38
38
  port: Env.REDIS_PORT,
39
39
  password: Env.get('REDIS_PASSWORD', ''),
40
40
  db,
41
- }, 3, { subsystem: 'cache', requireDirectForScripts: false });
41
+ }, 3, { subsystem: 'cache' });
42
42
  return client !== null && typeof client.get === 'function' ? client : null;
43
43
  }
44
44
  catch (error) {
@@ -53,6 +53,8 @@ const createIoredisClient = (params) => {
53
53
  return null;
54
54
  }
55
55
  };
56
+ // Redis driver objects keep each cache operation together for parity across transports.
57
+ // eslint-disable-next-line max-lines-per-function
56
58
  const createCacheDriverFromIoredisClient = (client) => ({
57
59
  async get(key) {
58
60
  try {
@@ -109,6 +111,38 @@ const createCacheDriverFromIoredisClient = (client) => ({
109
111
  return false;
110
112
  }
111
113
  },
114
+ async increment(key, amount = 1) {
115
+ try {
116
+ const prefixedKey = RedisKeys.createCacheKey(key);
117
+ if (typeof client.incrby === 'function') {
118
+ return await client.incrby(prefixedKey, amount);
119
+ }
120
+ const current = Number((await client.get(prefixedKey)) ?? 0);
121
+ const next = current + amount;
122
+ await client.set(prefixedKey, String(next));
123
+ return next;
124
+ }
125
+ catch (error) {
126
+ Logger.error('Redis INCRBY failed', error);
127
+ return 0;
128
+ }
129
+ },
130
+ async decrement(key, amount = 1) {
131
+ try {
132
+ const prefixedKey = RedisKeys.createCacheKey(key);
133
+ if (typeof client.decrby === 'function') {
134
+ return await client.decrby(prefixedKey, amount);
135
+ }
136
+ const current = Number((await client.get(prefixedKey)) ?? 0);
137
+ const next = current - amount;
138
+ await client.set(prefixedKey, String(next));
139
+ return next;
140
+ }
141
+ catch (error) {
142
+ Logger.error('Redis DECRBY failed', error);
143
+ return 0;
144
+ }
145
+ },
112
146
  getRedisClient() {
113
147
  return client;
114
148
  },
@@ -227,6 +261,8 @@ const createTcpSendCommand = (params) => {
227
261
  });
228
262
  };
229
263
  };
264
+ // TCP fallback mirrors the same Redis cache method table without an external client.
265
+ // eslint-disable-next-line max-lines-per-function
230
266
  const createTcpCacheDriver = () => {
231
267
  const host = Env.REDIS_HOST;
232
268
  const port = Env.REDIS_PORT;
@@ -291,6 +327,30 @@ const createTcpCacheDriver = () => {
291
327
  return false;
292
328
  }
293
329
  },
330
+ async increment(key, amount = 1) {
331
+ try {
332
+ const prefixedKey = RedisKeys.createCacheKey(key);
333
+ const response = await sendCommand(`INCRBY ${prefixedKey} ${amount}\r\n`);
334
+ const value = Number.parseInt(response.replace(':', '').trim(), 10);
335
+ return Number.isFinite(value) ? value : 0;
336
+ }
337
+ catch (error) {
338
+ Logger.error('Redis INCRBY failed', error);
339
+ return 0;
340
+ }
341
+ },
342
+ async decrement(key, amount = 1) {
343
+ try {
344
+ const prefixedKey = RedisKeys.createCacheKey(key);
345
+ const response = await sendCommand(`DECRBY ${prefixedKey} ${amount}\r\n`);
346
+ const value = Number.parseInt(response.replace(':', '').trim(), 10);
347
+ return Number.isFinite(value) ? value : 0;
348
+ }
349
+ catch (error) {
350
+ Logger.error('Redis DECRBY failed', error);
351
+ return 0;
352
+ }
353
+ },
294
354
  getRedisClient() {
295
355
  throw ErrorFactory.createConfigError('getRedisClient() is only supported with ioredis driver, not TCP socket driver');
296
356
  },
@@ -301,7 +361,9 @@ const createTcpCacheDriver = () => {
301
361
  */
302
362
  const create = () => {
303
363
  const isWorkersRuntime = Cloudflare.getWorkersEnv() !== null;
304
- const wantsProxy = Env.USE_REDIS_PROXY === true || (Env.get('REDIS_PROXY_URL', '') || '').trim() !== '';
364
+ const wantsProxy = Env.USE_REDIS_PROXY === true &&
365
+ ((Env.get('REDIS_PROXY_URL', '') || '').trim() !== '' ||
366
+ (Env.get('REDIS_RPC_URL', '') || '').trim() !== '');
305
367
  const ioredisDriver = createIoredisCacheDriver({ isWorkersRuntime, wantsProxy });
306
368
  return ioredisDriver ?? createTcpCacheDriver();
307
369
  };
@@ -1 +1 @@
1
- {"version":3,"file":"CLI.d.ts","sourceRoot":"","sources":["../../../src/cli/CLI.ts"],"names":[],"mappings":"AAAA;;;GAGG;AA2EH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAIpC,MAAM,WAAW,IAAI;IACnB,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACnC,UAAU,IAAI,OAAO,CAAC;CACvB;AAsQD;;;;;;;GAOG;AACH,eAAO,MAAM,GAAG;cACJ,IAAI;EAed,CAAC"}
1
+ {"version":3,"file":"CLI.d.ts","sourceRoot":"","sources":["../../../src/cli/CLI.ts"],"names":[],"mappings":"AAAA;;;GAGG;AA4EH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAIpC,MAAM,WAAW,IAAI;IACnB,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACnC,UAAU,IAAI,OAAO,CAAC;CACvB;AAuQD;;;;;;;GAOG;AACH,eAAO,MAAM,GAAG;cACJ,IAAI;EAed,CAAC"}
package/src/cli/CLI.js CHANGED
@@ -50,6 +50,7 @@ import { QACommand } from './commands/QACommand.js';
50
50
  import { QueueCommand } from './commands/QueueCommand.js';
51
51
  import { QueueRecoveryCommand } from './commands/QueueRecoveryCommand.js';
52
52
  import { RedisProxyCommand } from './commands/RedisProxyCommand.js';
53
+ import { RedisRpcCommand } from './commands/RedisRpcCommand.js';
53
54
  import { ResourceControlCommand } from './commands/ResourceControlCommand.js';
54
55
  import { RoutesCommand } from './commands/RoutesCommand.js';
55
56
  import { ScheduleListCommand } from './commands/ScheduleListCommand.js';
@@ -143,6 +144,7 @@ const buildCommandRegistry = () => {
143
144
  MongoDBProxyCommand.create(),
144
145
  SqlServerProxyCommand.create(),
145
146
  RedisProxyCommand.create(),
147
+ RedisRpcCommand.create(),
146
148
  SmtpProxyCommand.create(),
147
149
  ...OptionalCliCommandRegistry.list(),
148
150
  ];
@@ -1 +1 @@
1
- {"version":3,"file":"DoctorArchitectureCommand.d.ts","sourceRoot":"","sources":["../../../../src/cli/commands/DoctorArchitectureCommand.ts"],"names":[],"mappings":"AAEA,OAAO,EAAe,KAAK,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAIlE,eAAO,MAAM,yBAAyB;cAC1B,YAAY;EAgEtB,CAAC"}
1
+ {"version":3,"file":"DoctorArchitectureCommand.d.ts","sourceRoot":"","sources":["../../../../src/cli/commands/DoctorArchitectureCommand.ts"],"names":[],"mappings":"AAEA,OAAO,EAAe,KAAK,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAIlE,eAAO,MAAM,yBAAyB;cAC1B,YAAY;EAkEtB,CAAC"}
@@ -33,10 +33,12 @@ export const DoctorArchitectureCommand = Object.freeze({
33
33
  }
34
34
  // Rule 3: Proxy requirement for Cloudflare
35
35
  if (mode === 'cloudflare-workers') {
36
- const useProxy = Env.getBool('USE_REDIS_PROXY', false) ||
36
+ const useProxy = (Env.getBool('USE_REDIS_PROXY', false) &&
37
+ (Env.get('REDIS_RPC_URL', '').trim() !== '' ||
38
+ Env.get('REDIS_PROXY_URL', '').trim() !== '')) ||
37
39
  Env.getBool('ENABLE_CLOUDFLARE_SOCKETS', false);
38
40
  if (!useProxy) {
39
- issues.push('❌ CRITICAL: Cloudflare runtime requires USE_REDIS_PROXY=true or ENABLE_CLOUDFLARE_SOCKETS=true for Queue producers.');
41
+ issues.push('❌ CRITICAL: Cloudflare runtime requires USE_REDIS_PROXY=true with REDIS_RPC_URL/REDIS_PROXY_URL, or ENABLE_CLOUDFLARE_SOCKETS=true for Queue producers.');
40
42
  }
41
43
  }
42
44
  if (issues.length > 0) {
@@ -0,0 +1,6 @@
1
+ import type { IBaseCommand } from '../BaseCommand';
2
+ export declare const RedisRpcCommand: Readonly<{
3
+ create(): IBaseCommand;
4
+ }>;
5
+ export default RedisRpcCommand;
6
+ //# sourceMappingURL=RedisRpcCommand.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RedisRpcCommand.d.ts","sourceRoot":"","sources":["../../../../src/cli/commands/RedisRpcCommand.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAkB,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAwHrE,eAAO,MAAM,eAAe;cAChB,YAAY;EAgCtB,CAAC;AAEH,eAAe,eAAe,CAAC"}
@@ -0,0 +1,96 @@
1
+ import { BaseCommand } from '../BaseCommand.js';
2
+ import { ensureProxyEnvLoadedForCwd, maybeRunProxyWatchMode, parseIntOption, trimOption, } from '../commands/ProxyCommandUtils.js';
3
+ import { Env } from '../../config/env.js';
4
+ import { Logger } from '../../config/logger.js';
5
+ import { ErrorFactory } from '../../exceptions/ZintrustError.js';
6
+ const REDIS_RPC_SERVER_PACKAGE = '@zintrust/redis-rpc/server';
7
+ const addOptions = (command) => {
8
+ ensureProxyEnvLoadedForCwd();
9
+ command.option('--host <host>', 'Host to bind', Env.get('REDIS_RPC_HOST', '127.0.0.1'));
10
+ command.option('--port <port>', 'Port to bind', String(Env.getInt('REDIS_RPC_PORT', 8794)));
11
+ command.option('--secret <secret>', 'Shared RPC secret', Env.get('REDIS_RPC_SECRET', ''));
12
+ command.option('--prefix <prefix>', 'BullMQ key prefix', Env.get('REDIS_RPC_BULLMQ_PREFIX', ''));
13
+ command.option('--watch', 'Auto-restart Redis RPC server on file changes');
14
+ command.option('--redis-host <host>', 'Redis host');
15
+ command.option('--redis-port <port>', 'Redis port');
16
+ command.option('--redis-password <password>', 'Redis password');
17
+ command.option('--redis-db <db>', 'Redis database');
18
+ };
19
+ const resolveRedisOptions = (options) => {
20
+ const redisHost = trimOption(options.redisHost);
21
+ const redisPort = parseIntOption(options.redisPort, 'redis-port', 'non-negative');
22
+ const redisPassword = options.redisPassword;
23
+ const redisDb = parseIntOption(options.redisDb, 'redis-db', 'non-negative');
24
+ if (redisHost === undefined &&
25
+ redisPort === undefined &&
26
+ redisPassword === undefined &&
27
+ redisDb === undefined) {
28
+ return undefined;
29
+ }
30
+ const password = redisPassword ?? Env.get('REDIS_RPC_REDIS_PASSWORD', Env.get('REDIS_PASSWORD', ''));
31
+ return {
32
+ host: redisHost ?? Env.get('REDIS_RPC_REDIS_HOST', Env.get('REDIS_HOST', '127.0.0.1')),
33
+ port: redisPort ?? Env.getInt('REDIS_RPC_REDIS_PORT', Env.getInt('REDIS_PORT', 6379)),
34
+ password: password || undefined,
35
+ db: redisDb ?? Env.getInt('REDIS_RPC_REDIS_DB', Env.getInt('REDIS_QUEUE_DB', Env.REDIS_DB)),
36
+ maxRetriesPerRequest: null,
37
+ };
38
+ };
39
+ const loadRedisRpcServer = async () => {
40
+ try {
41
+ return (await import(REDIS_RPC_SERVER_PACKAGE));
42
+ }
43
+ catch (error) {
44
+ throw ErrorFactory.createCliError('Install @zintrust/redis-rpc to use `zin redis-rpc` or `zin s redis-rpc`.', error);
45
+ }
46
+ };
47
+ const setDefinedOption = (target, key, value) => {
48
+ if (value === undefined)
49
+ return;
50
+ target[key] = value;
51
+ };
52
+ const waitForShutdown = async (created) => {
53
+ await new Promise((resolve) => {
54
+ const shutdown = async () => {
55
+ process.off('SIGINT', onSignal);
56
+ process.off('SIGTERM', onSignal);
57
+ await created.backend.close();
58
+ created.server.close(resolve);
59
+ };
60
+ const onSignal = () => {
61
+ void shutdown();
62
+ };
63
+ process.on('SIGINT', onSignal);
64
+ process.on('SIGTERM', onSignal);
65
+ });
66
+ process.exit(0);
67
+ };
68
+ export const RedisRpcCommand = Object.freeze({
69
+ create() {
70
+ return BaseCommand.create({
71
+ name: 'redis-rpc',
72
+ aliases: ['rpc:redis'],
73
+ description: 'Start the Redis RPC server for queue, worker, monitor, and Redis operations',
74
+ addOptions,
75
+ execute: async (options) => {
76
+ await maybeRunProxyWatchMode(options.watch);
77
+ const mod = await loadRedisRpcServer();
78
+ const host = trimOption(options.host);
79
+ const port = parseIntOption(options.port, 'port');
80
+ const secret = trimOption(options.secret);
81
+ const prefix = trimOption(options.prefix);
82
+ const redis = resolveRedisOptions(options);
83
+ const serverOptions = {};
84
+ setDefinedOption(serverOptions, 'host', host);
85
+ setDefinedOption(serverOptions, 'port', port);
86
+ setDefinedOption(serverOptions, 'secret', secret);
87
+ setDefinedOption(serverOptions, 'prefix', prefix);
88
+ setDefinedOption(serverOptions, 'redis', redis);
89
+ const created = await mod.listenRedisRpcServer(serverOptions);
90
+ Logger.info(`Redis RPC server listening on http://${created.settings.host}:${created.settings.port}`);
91
+ await waitForShutdown(created);
92
+ },
93
+ });
94
+ },
95
+ });
96
+ export default RedisRpcCommand;
@@ -20,6 +20,7 @@ export { NotificationWorkCommand } from '../commands/NotificationWorkCommand';
20
20
  export { PrepareCommand } from '../commands/PrepareCommand';
21
21
  export { QueueCommand } from '../commands/QueueCommand';
22
22
  export { QueueRecoveryCommand } from '../commands/QueueRecoveryCommand';
23
+ export { RedisRpcCommand } from '../commands/RedisRpcCommand';
23
24
  export { ResourceControlCommand } from '../commands/ResourceControlCommand';
24
25
  export { RoutesCommand } from '../commands/RoutesCommand';
25
26
  export { SecretsCommand } from '../commands/SecretsCommand';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/cli/commands/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AACtD,OAAO,EAAE,oBAAoB,EAAE,MAAM,oCAAoC,CAAC;AAC1E,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAC5D,OAAO,EAAE,uBAAuB,EAAE,MAAM,uCAAuC,CAAC;AAChF,OAAO,EACL,mBAAmB,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AAC;AAC9D,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAClE,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAC5D,OAAO,EAAE,sBAAsB,EAAE,MAAM,sCAAsC,CAAC"}
@@ -20,6 +20,7 @@ export { NotificationWorkCommand } from '../commands/NotificationWorkCommand.js'
20
20
  export { PrepareCommand } from '../commands/PrepareCommand.js';
21
21
  export { QueueCommand } from '../commands/QueueCommand.js';
22
22
  export { QueueRecoveryCommand } from '../commands/QueueRecoveryCommand.js';
23
+ export { RedisRpcCommand } from '../commands/RedisRpcCommand.js';
23
24
  export { ResourceControlCommand } from '../commands/ResourceControlCommand.js';
24
25
  export { RoutesCommand } from '../commands/RoutesCommand.js';
25
26
  export { SecretsCommand } from '../commands/SecretsCommand.js';
@@ -1 +1 @@
1
- {"version":3,"file":"env.d.ts","sourceRoot":"","sources":["../../../../src/cli/scaffolding/env.ts"],"names":[],"mappings":"AA2iBA,eAAO,MAAM,OAAO,GAClB,MAAM,MAAM,EACZ,MAAM,MAAM,EACZ,SAAS,MAAM,EACf,QAAQ,MAAM,EACd,oBAAoB,MAAM,EAC1B,SAAS,MAAM,EAAE,EACjB,cAAc,MAAM,KACnB,MAAM,EAWR,CAAC"}
1
+ {"version":3,"file":"env.d.ts","sourceRoot":"","sources":["../../../../src/cli/scaffolding/env.ts"],"names":[],"mappings":"AAojBA,eAAO,MAAM,OAAO,GAClB,MAAM,MAAM,EACZ,MAAM,MAAM,EACZ,SAAS,MAAM,EACf,QAAQ,MAAM,EACd,oBAAoB,MAAM,EAC1B,SAAS,MAAM,EAAE,EACjB,cAAc,MAAM,KACnB,MAAM,EAWR,CAAC"}
@@ -201,6 +201,7 @@ const DatabaseAndCloudflare = (databaseNormalized, dbLines, sqliteDbPath) => [
201
201
  'CLOUDFLARE_KV_NAMESPACE_ID=',
202
202
  '',
203
203
  ];
204
+ // eslint-disable-next-line max-lines-per-function
204
205
  const HttpProxies = () => [
205
206
  '# ============================================================================',
206
207
  '# HTTP PROXIES (for Workers compatibility)',
@@ -243,6 +244,14 @@ const HttpProxies = () => [
243
244
  'REDIS_PROXY_TIMEOUT_MS=30000',
244
245
  'REDIS_PROXY_REQUIRE_SIGNING=true',
245
246
  'REDIS_PROXY_SIGNING_WINDOW_MS=60000',
247
+ '# Redis RPC is selected only when USE_REDIS_PROXY=true and REDIS_RPC_URL is non-empty.',
248
+ 'REDIS_RPC_URL=',
249
+ 'REDIS_RPC_HOST=127.0.0.1',
250
+ 'REDIS_RPC_PORT=8794',
251
+ 'REDIS_RPC_SECRET=',
252
+ 'REDIS_RPC_TIMEOUT_MS=30000',
253
+ 'REDIS_RPC_RETRY_MAX=2',
254
+ 'REDIS_RPC_RETRY_DELAY_MS=500',
246
255
  '',
247
256
  'USE_SMTP_PROXY=false',
248
257
  'SMTP_PROXY_URL=',
@@ -1 +1 @@
1
- {"version":3,"file":"WorkerStartupDiagnostics.d.ts","sourceRoot":"","sources":["../../../../src/cli/services/WorkerStartupDiagnostics.ts"],"names":[],"mappings":"AAMA,KAAK,aAAa,GAAG,OAAO,GAAG,MAAM,GAAG,MAAM,CAAC;AAE/C,MAAM,MAAM,kBAAkB,GAAG,QAAQ,CAAC;IACxC,QAAQ,EAAE,aAAa,CAAC;IACxB,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC;CAChC,CAAC,CAAC;AAEH,MAAM,MAAM,sBAAsB,GAAG,QAAQ,CAAC;IAC5C,GAAG,EAAE,MAAM,CAAC;IACZ,OAAO,EAAE,OAAO,CAAC;IACjB,aAAa,EAAE,MAAM,CAAC;IACtB,aAAa,EAAE,MAAM,CAAC;CACvB,CAAC,CAAC;AAEH,MAAM,MAAM,8BAA8B,GAAG,QAAQ,CAAC;IACpD,KAAK,EAAE,QAAQ,CAAC;QACd,WAAW,EAAE,MAAM,C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,CAAC;IACjB,aAAa,EAAE,MAAM,CAAC;IACtB,aAAa,EAAE,MAAM,CAAC;CACvB,CAAC,CAAC;AAEH,MAAM,MAAM,8BAA8B,GAAG,QAAQ,CAAC;IACpD,KAAK,EAAE,QAAQ,CAAC;QACd,WAAW,EAAE,MAAM,CAAC;QACpB,aAAa,EAAE,OAAO,CAAC;QACvB,eAAe,EAAE,OAAO,CAAC;QACzB,YAAY,EAAE,OAAO,CAAC;QACtB,YAAY,EAAE,OAAO,CAAC;QACtB,WAAW,EAAE,MAAM,CAAC;QACpB,iBAAiB,EAAE,MAAM,CAAC;KAC3B,CAAC,CAAC;IACH,MAAM,EAAE,aAAa,CAAC,kBAAkB,CAAC,CAAC;IAC1C,cAAc,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC;IACtC,SAAS,EAAE,aAAa,CAAC,sBAAsB,CAAC,CAAC;IACjD,UAAU,EAAE,QAAQ,CAAC;QACnB,OAAO,EAAE,MAAM,CAAC;QAChB,IAAI,CAAC,EAAE,MAAM,CAAC;KACf,CAAC,GAAG,IAAI,CAAC;IACV,WAAW,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC;IACnC,SAAS,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC;CAClC,CAAC,CAAC;AA8bH,eAAO,MAAM,wBAAwB;sBAxFZ,OAAO,KAAG,8BAA8B;0BAwCpC,8BAA8B,KAAG,MAAM,EAAE;kBA0BjD,OAAO,uBAA+B,8BAA8B;gCAmBtD,8BAA8B,KAAG,OAAO;4BAQjD,MAAM,GAAG,KAAK;EAGtC,CAAC"}
@@ -141,10 +141,12 @@ const getQueueDriverEnvKeys = (snapshot, queueDriver) => {
141
141
  if (queueDriver === 'rabbitmq') {
142
142
  return ['RABBITMQ_HOST', 'RABBITMQ_PORT', 'RABBITMQ_USER', 'RABBITMQ_PASSWORD'];
143
143
  }
144
- const usesRedisProxy = Env.getBool('USE_REDIS_PROXY', false) ||
145
- isNonEmptyString(getExplicitEnv(snapshot, 'REDIS_PROXY_URL'));
144
+ const usesRedisProxy = Env.getBool('USE_REDIS_PROXY', false) &&
145
+ (isNonEmptyString(getExplicitEnv(snapshot, 'REDIS_RPC_URL')) ||
146
+ isNonEmptyString(getExplicitEnv(snapshot, 'REDIS_PROXY_URL')));
146
147
  if (queueDriver === 'redis' && usesRedisProxy) {
147
148
  return [
149
+ 'REDIS_RPC_URL',
148
150
  'REDIS_PROXY_URL',
149
151
  'REDIS_PROXY_HOST',
150
152
  'REDIS_PROXY_SECRET',
@@ -1 +1 @@
1
- {"version":3,"file":"app.d.ts","sourceRoot":"","sources":["../../../src/config/app.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,KAAK,EAAe,SAAS,EAAE,MAAM,cAAc,CAAC;AAgJ3D,QAAA,MAAM,UAAU,QAAO,MAAM,CAAC,UAA2B,CAAC;AAmH1D,eAAO,MAAM,SAAS;IAnGpB;;OAEG;;IAGH;;OAEG;;IAGH;;OAEG;;IAGH;;OAEG;;IAGH;;OAEG;;IAGH;;OAEG;kCACc,OAAO;IAIxB;;OAEG;iCACa,OAAO;IAIvB;;OAEG;8BACU,OAAO;IAIpB;;OAEG;;IAGH;;OAEG;;IAGH;;OAEG;;IAGH;;OAEG;;IAGH;;OAEG;;IAGH;;OAEG;;IAGH;;OAEG;;IAGH;;;;;OAKG;;+BAtGkB,MAAM,CAAC,UAAU;kCAhDd,MAAM;EAmKoB,CAAC;AACrD,OAAO,EAAE,UAAU,EAAE,CAAC;AAEtB,MAAM,MAAM,SAAS,GAAG,OAAO,SAAS,CAAC"}
1
+ {"version":3,"file":"app.d.ts","sourceRoot":"","sources":["../../../src/config/app.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,KAAK,EAAe,SAAS,EAAE,MAAM,cAAc,CAAC;AAmJ3D,QAAA,MAAM,UAAU,QAAO,MAAM,CAAC,UAA2B,CAAC;AAmH1D,eAAO,MAAM,SAAS;IAnGpB;;OAEG;;IAGH;;OAEG;;IAGH;;OAEG;;IAGH;;OAEG;;IAGH;;OAEG;;IAGH;;OAEG;kCACc,OAAO;IAIxB;;OAEG;iCACa,OAAO;IAIvB;;OAEG;8BACU,OAAO;IAIpB;;OAEG;;IAGH;;OAEG;;IAGH;;OAEG;;IAGH;;OAEG;;IAGH;;OAEG;;IAGH;;OAEG;;IAGH;;OAEG;;IAGH;;;;;OAKG;;+BAtGkB,MAAM,CAAC,UAAU;kCAhDd,MAAM;EAmKoB,CAAC;AACrD,OAAO,EAAE,UAAU,EAAE,CAAC;AAEtB,MAAM,MAAM,SAAS,GAAG,OAAO,SAAS,CAAC"}
package/src/config/app.js CHANGED
@@ -29,6 +29,9 @@ const readEnvBool = (key, defaultValue = false) => {
29
29
  if (typeof anyEnv.getBool === 'function') {
30
30
  return anyEnv.getBool(key, defaultValue);
31
31
  }
32
+ const directValue = Env[key];
33
+ if (typeof directValue === 'boolean')
34
+ return directValue;
32
35
  const raw = readEnvString(key, '');
33
36
  if (raw === '')
34
37
  return defaultValue;
@@ -105,6 +105,13 @@ export declare const Env: Readonly<{
105
105
  REDIS_PROXY_TIMEOUT_MS: number;
106
106
  REDIS_PROXY_REQUIRE_SIGNING: boolean;
107
107
  REDIS_PROXY_SIGNING_WINDOW_MS: number;
108
+ REDIS_RPC_URL: string;
109
+ REDIS_RPC_HOST: string;
110
+ REDIS_RPC_PORT: number;
111
+ REDIS_RPC_SECRET: string;
112
+ REDIS_RPC_TIMEOUT_MS: number;
113
+ REDIS_RPC_RETRY_MAX: number;
114
+ REDIS_RPC_RETRY_DELAY_MS: number;
108
115
  REDIS_REQUIRE_DIRECT_FOR_SCRIPTS: boolean;
109
116
  USE_REDIS_PROXY: boolean;
110
117
  SMTP_PROXY_URL: string;
@@ -1 +1 @@
1
- {"version":3,"file":"env.d.ts","sourceRoot":"","sources":["../../../src/config/env.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAGh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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;eAmQpB,OAAO,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAoFxF,CAAC;AAEH,eAAO,MAAM,aAAa,QAAO,MAchC,CAAC"}
package/src/config/env.js CHANGED
@@ -345,6 +345,13 @@ export const Env = Object.freeze({
345
345
  REDIS_PROXY_TIMEOUT_MS: getInt('REDIS_PROXY_TIMEOUT_MS', ZT_PROXY_TIMEOUT_MS),
346
346
  REDIS_PROXY_REQUIRE_SIGNING: getBool('REDIS_PROXY_REQUIRE_SIGNING', true),
347
347
  REDIS_PROXY_SIGNING_WINDOW_MS: getInt('REDIS_PROXY_SIGNING_WINDOW_MS', getInt('ZT_PROXY_SIGNING_WINDOW_MS', 60000)),
348
+ REDIS_RPC_URL: get('REDIS_RPC_URL', ''),
349
+ REDIS_RPC_HOST: get('REDIS_RPC_HOST', '127.0.0.1'),
350
+ REDIS_RPC_PORT: getInt('REDIS_RPC_PORT', 8794),
351
+ REDIS_RPC_SECRET: get('REDIS_RPC_SECRET', PROXY_SECRET_FALLBACK),
352
+ REDIS_RPC_TIMEOUT_MS: getInt('REDIS_RPC_TIMEOUT_MS', ZT_PROXY_TIMEOUT_MS),
353
+ REDIS_RPC_RETRY_MAX: getInt('REDIS_RPC_RETRY_MAX', 2),
354
+ REDIS_RPC_RETRY_DELAY_MS: getInt('REDIS_RPC_RETRY_DELAY_MS', 500),
348
355
  REDIS_REQUIRE_DIRECT_FOR_SCRIPTS: getBool('REDIS_REQUIRE_DIRECT_FOR_SCRIPTS', true),
349
356
  USE_REDIS_PROXY: getBool('USE_REDIS_PROXY', false),
350
357
  SMTP_PROXY_URL: get('SMTP_PROXY_URL', ''),
@@ -1 +1 @@
1
- {"version":3,"file":"queue.d.ts","sourceRoot":"","sources":["../../../src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