@antelopejs/redis 1.0.4 → 1.1.1

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/README.md CHANGED
@@ -1,13 +1,15 @@
1
- # @antelopejs/redis
1
+ # `@antelopejs/redis`
2
2
 
3
3
  <div align="center">
4
- <a href="https://www.npmjs.com/package/@antelopejs/redis"><img alt="npm" src="https://img.shields.io/npm/v/@antelopejs/redis?style=for-the-badge&labelColor=000000&color=000000"></a>
5
- <a href="./LICENSE"><img alt="License" src="https://img.shields.io/npm/l/@antelopejs/redis?style=for-the-badge&labelColor=000000&color=000000"></a>
6
- <a href="https://discord.gg/sjK28QHrA7"><img src="https://img.shields.io/badge/Discord-18181B?logo=discord&style=for-the-badge&color=000000" alt="Discord"></a>
7
- <a href="https://interfaces.antelopejs.com/docs/redis/introduction"><img src="https://img.shields.io/badge/Docs-18181B?style=for-the-badge&color=000000" alt="Documentation"></a>
4
+ <a href="https://www.npmjs.com/package/@antelopejs/redis"><img data-illustration alt="npm" src="https://img.shields.io/npm/v/@antelopejs/redis?style=for-the-badge&labelColor=000000&color=000000"></a>
5
+ <a href="./LICENSE"><img data-illustration alt="License" src="https://img.shields.io/npm/l/@antelopejs/redis?style=for-the-badge&labelColor=000000&color=000000"></a>
6
+ <a href="https://discord.gg/g4pFt6eXqu"><img data-illustration alt="Discord" src="https://img.shields.io/badge/Discord-18181B?logo=discord&style=for-the-badge&color=000000"></a>
7
+ <a href="https://interfaces.antelopejs.com/docs/redis/introduction"><img data-illustration alt="Documentation" src="https://img.shields.io/badge/Docs-18181B?style=for-the-badge&color=000000"></a>
8
8
  </div>
9
9
 
10
- The Redis module of AntelopeJS: it connects one shared [`ioredis`](https://github.com/redis/ioredis) client and serves it to the Redis and Redis Scheduler interfaces.
10
+ The Redis module of AntelopeJS. It connects one shared [`ioredis`](https://github.com/redis/ioredis) client and serves it to the Redis and Redis Scheduler interfaces.
11
+
12
+ Part of [AntelopeJS](https://github.com/AntelopeJS/antelopejs), the TypeScript framework where modules depend on contracts and the application chooses the provider. Built by the team behind [AntelopeJS DMS](https://github.com/AntelopeJS/dms).
11
13
 
12
14
  ## Interfaces
13
15
 
@@ -16,7 +18,7 @@ The Redis module of AntelopeJS: it connects one shared [`ioredis`](https://githu
16
18
  | [`@antelopejs/interface-redis`](https://github.com/AntelopeJS/interface-redis) | [Redis](https://interfaces.antelopejs.com/docs/redis/introduction) |
17
19
  | [`@antelopejs/interface-redis-scheduler`](https://github.com/AntelopeJS/interface-redis-scheduler) | [Redis Scheduler](https://interfaces.antelopejs.com/docs/redis-scheduler/introduction) |
18
20
 
19
- The scheduler runs inside the interface package on top of the Redis client, so this module is all it needs.
21
+ The scheduler runs inside its interface package on top of the Redis client, so it needs no module besides this one.
20
22
 
21
23
  ## Install
22
24
 
@@ -24,7 +26,7 @@ The scheduler runs inside the interface package on top of the Redis client, so t
24
26
  ajs project modules add @antelopejs/redis
25
27
  ```
26
28
 
27
- The command writes the module's default configuration: `redis://localhost:6379`.
29
+ The command writes the module's default configuration, which connects to `redis://localhost:6379`.
28
30
 
29
31
  ## Configuration
30
32
 
@@ -53,13 +55,13 @@ export default defineConfig({
53
55
  });
54
56
  ```
55
57
 
56
- | Key | Description |
57
- | ------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- |
58
- | `url` | Redis connection URL. Optional: without it, the client uses the options below, or `localhost:6379`. |
59
- | `useMock` | Serve an in-memory [`ioredis-mock`](https://github.com/stipsan/ioredis-mock) client instead of connecting. For tests only. |
60
- | any other key | Passed to the client as [`ioredis` options](https://github.com/redis/ioredis#connect-to-redis) (`host`, `port`, `password`, `db`, `tls`, `lazyConnect`…). |
58
+ | Key | Description |
59
+ | ------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- |
60
+ | `url` | Redis connection URL. Optional. Without it, the client uses the options below, or `localhost:6379`. |
61
+ | `useMock` | Serves an in-memory [`ioredis-mock`](https://github.com/stipsan/ioredis-mock) client instead of connecting, and ignores every other key. For tests only. |
62
+ | any other key | Passed to the client as [`ioredis` options](https://github.com/redis/ioredis#connect-to-redis), such as `host`, `port`, `password`, `db`, `tls` or `lazyConnect`. |
61
63
 
62
- The client connects when the module starts, and quits when it stops.
64
+ The module creates the client when it starts, and quits it when it stops. With `lazyConnect: true`, the module waits for the connection before it serves the client.
63
65
 
64
66
  ## Quick start
65
67
 
@@ -77,23 +79,27 @@ await client.set("greeting", "hello", "EX", 60);
77
79
  const greeting = await client.get("greeting");
78
80
  ```
79
81
 
80
- `GetClient()` waits until the module has connected. For distributed jobs, add `@antelopejs/interface-redis-scheduler` and read its [documentation](https://interfaces.antelopejs.com/docs/redis-scheduler/introduction).
82
+ `GetClient()` waits until the module has started and set its client. For distributed jobs, add `@antelopejs/interface-redis-scheduler` and read its [documentation](https://interfaces.antelopejs.com/docs/redis-scheduler/introduction).
81
83
 
82
84
  ## Documentation
83
85
 
84
- - [Redis](https://interfaces.antelopejs.com/docs/redis/introduction): the `@antelopejs/interface-redis` contract this module implements
85
- - [Redis Scheduler](https://interfaces.antelopejs.com/docs/redis-scheduler/introduction): the `@antelopejs/interface-redis-scheduler` contract this module implements
86
- - [Configuration](https://framework.antelopejs.com/docs/concepts/configuration): module sources, `config` blocks and config variables in `antelope.config.ts`
86
+ - [Redis](https://interfaces.antelopejs.com/docs/redis/introduction) documents the `@antelopejs/interface-redis` contract that this module implements.
87
+ - [Redis Scheduler](https://interfaces.antelopejs.com/docs/redis-scheduler/introduction) documents the `@antelopejs/interface-redis-scheduler` contract that this module implements.
88
+ - [Configuration](https://framework.antelopejs.com/docs/concepts/configuration) documents module sources, `config` blocks and config variables in `antelope.config.ts`.
87
89
 
88
90
  ## Compatibility
89
91
 
90
- | Package | Supported range |
91
- | --------------------------------------- | ---------------- |
92
- | `@antelopejs/interface-redis` | `>=0.0.9 <1.0.0` |
93
- | `@antelopejs/interface-redis-scheduler` | `>=0.0.8 <1.0.0` |
94
- | `@antelopejs/interface-core` | `>=0.2.4 <1.0.0` |
92
+ <!-- antelopejs-docs-compat:start -->
93
+
94
+ | Package | Supported | Tested with |
95
+ | --------------------------------------- | ---------------- | ----------- |
96
+ | `@antelopejs/interface-core` | `>=0.2.4 <1.0.0` | `0.4.0` |
97
+ | `@antelopejs/interface-redis` | `>=0.0.9 <1.0.0` | `0.0.9` |
98
+ | `@antelopejs/interface-redis-scheduler` | `>=0.0.8 <1.0.0` | `0.0.8` |
99
+
100
+ <!-- antelopejs-docs-compat:end -->
95
101
 
96
- The module is developed and tested against `@antelopejs/core` `^1.16.0` on Node.js 24, with `ioredis` `^5.10.1`.
102
+ `.nvmrc` sets the Node.js release for development, and the `dependencies` of `package.json` set the `ioredis` range.
97
103
 
98
104
  ## Contributing
99
105
 
@@ -106,7 +112,7 @@ pnpm knip
106
112
  pnpm test # build, then ajs module test with ioredis-mock
107
113
  ```
108
114
 
109
- The tests need no Redis server. Read the [contribution guidelines](CONTRIBUTING.md) before opening a pull request.
115
+ The tests need no Redis server. Read the [contribution guidelines](CONTRIBUTING.md) before you open a pull request.
110
116
 
111
117
  ## License
112
118
 
package/dist/index.js CHANGED
@@ -47,15 +47,27 @@ function construct(config) {
47
47
  redisConfig = config;
48
48
  }
49
49
  function destroy() { }
50
+ let startedClient;
50
51
  async function start() {
51
52
  const client = await createRedisClient(redisConfig);
52
53
  if (redisConfig.useMock || redisConfig.lazyConnect) {
53
- await client.connect();
54
+ try {
55
+ await client.connect();
56
+ }
57
+ catch (error) {
58
+ client.disconnect();
59
+ throw error;
60
+ }
54
61
  }
62
+ startedClient = client;
55
63
  interface_redis_1.internal.SetClient(client);
56
64
  }
57
65
  async function stop() {
58
- const client = await interface_redis_1.internal.client;
66
+ const client = startedClient;
67
+ if (!client) {
68
+ return;
69
+ }
70
+ startedClient = undefined;
59
71
  await client.quit();
60
72
  void interface_redis_1.internal.UnsetClient();
61
73
  }
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.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AAO,EAAE,CAAC;QACnB,MAAM,EAAE,OAAO,EAAE,SAAS,EAAE,GAAG,wDAAa,cAAc,GAAC,CAAC;QAC5D,OAAO,IAAI,SAAS,CAAC,EAAE,WAAW,EAAE,IAAI,EAAE,CAAC,CAAC;IAC9C,CAAC;IACD,MAAM,EAAE,GAAG,EAAE,OAAO,EAAE,CAAC,EAAE,GAAG,OAAO,EAAE,GAAG,MAAM,CAAC;IAC/C,IAAI,CAAC,GAAG,EAAE,CAAC;QACT,OAAO,IAAI,iBAAK,CAAC,OAAO,CAAC,CAAC;IAC5B,CAAC;IACD,IAAI,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACtC,OAAO,IAAI,iBAAK,CAAC,GAAG,CAAC,CAAC;IACxB,CAAC;IACD,OAAO,IAAI,iBAAK,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC;AACjC,CAAC"}
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,86 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
35
+ var __importDefault = (this && this.__importDefault) || function (mod) {
36
+ return (mod && mod.__esModule) ? mod : { "default": mod };
37
+ };
38
+ Object.defineProperty(exports, "__esModule", { value: true });
39
+ const node_assert_1 = __importDefault(require("node:assert"));
40
+ const net = __importStar(require("node:net"));
41
+ const index_1 = require("../index");
42
+ const TEST_HOST = "127.0.0.1";
43
+ const TEST_PORT = 26390;
44
+ const STOP_DEADLINE_MS = 1000;
45
+ const RECONNECT_WINDOW_MS = 500;
46
+ function settlesWithin(promise, ms) {
47
+ return Promise.race([
48
+ promise.then(() => true, () => true),
49
+ new Promise((resolve) => setTimeout(() => resolve(false), ms)),
50
+ ]);
51
+ }
52
+ function delay(ms) {
53
+ return new Promise((resolve) => setTimeout(resolve, ms));
54
+ }
55
+ describe("A module whose start failed", () => {
56
+ let server;
57
+ let connections = 0;
58
+ const url = `redis://${TEST_HOST}:${TEST_PORT}`;
59
+ before(async () => {
60
+ await (0, index_1.stop)();
61
+ server = net.createServer((socket) => {
62
+ connections += 1;
63
+ socket.destroy();
64
+ });
65
+ await new Promise((resolve) => server.listen(TEST_PORT, TEST_HOST, resolve));
66
+ });
67
+ after(async () => {
68
+ await new Promise((resolve) => server.close(resolve));
69
+ (0, index_1.construct)({ useMock: true });
70
+ await (0, index_1.start)();
71
+ });
72
+ it("rejects start and settles stop", async () => {
73
+ (0, index_1.construct)({ url, lazyConnect: true, maxRetriesPerRequest: 0 });
74
+ await node_assert_1.default.rejects((0, index_1.start)());
75
+ node_assert_1.default.strictEqual(await settlesWithin((0, index_1.stop)(), STOP_DEADLINE_MS), true);
76
+ });
77
+ it("stops reconnecting once start rejects", async () => {
78
+ (0, index_1.construct)({ url, lazyConnect: true, maxRetriesPerRequest: 0 });
79
+ await node_assert_1.default.rejects((0, index_1.start)());
80
+ const afterReject = connections;
81
+ await delay(RECONNECT_WINDOW_MS);
82
+ node_assert_1.default.strictEqual(connections, afterReject);
83
+ await (0, index_1.stop)();
84
+ });
85
+ });
86
+ //# sourceMappingURL=failed-start.test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"failed-start.test.js","sourceRoot":"","sources":["../../src/test/failed-start.test.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,8DAAiC;AACjC,8CAAgC;AAEhC,oCAAkD;AAElD,MAAM,SAAS,GAAG,WAAW,CAAC;AAC9B,MAAM,SAAS,GAAG,KAAK,CAAC;AACxB,MAAM,gBAAgB,GAAG,IAAI,CAAC;AAC9B,MAAM,mBAAmB,GAAG,GAAG,CAAC;AAEhC,SAAS,aAAa,CAAC,OAAsB,EAAE,EAAU;IACvD,OAAO,OAAO,CAAC,IAAI,CAAC;QAClB,OAAO,CAAC,IAAI,CACV,GAAG,EAAE,CAAC,IAAI,EACV,GAAG,EAAE,CAAC,IAAI,CACX;QACD,IAAI,OAAO,CAAU,CAAC,OAAO,EAAE,EAAE,CAAC,UAAU,CAAC,GAAG,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,EAAE,CAAC,CAAC;KACxE,CAAC,CAAC;AACL,CAAC;AAED,SAAS,KAAK,CAAC,EAAU;IACvB,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,UAAU,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC,CAAC;AAC3D,CAAC;AAED,QAAQ,CAAC,6BAA6B,EAAE,GAAG,EAAE;IAC3C,IAAI,MAAkB,CAAC;IACvB,IAAI,WAAW,GAAG,CAAC,CAAC;IACpB,MAAM,GAAG,GAAG,WAAW,SAAS,IAAI,SAAS,EAAE,CAAC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AE,CAAC,CAAC;QAC9B,MAAM,WAAW,GAAG,WAAW,CAAC;QAEhC,MAAM,KAAK,CAAC,mBAAmB,CAAC,CAAC;QAEjC,qBAAM,CAAC,WAAW,CAAC,WAAW,EAAE,WAAW,CAAC,CAAC;QAC7C,MAAM,IAAA,YAAI,GAAE,CAAC;IACf,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@antelopejs/redis",
3
- "version": "1.0.4",
3
+ "version": "1.1.1",
4
4
  "description": "Redis module for AntelopeJS, implementing the Redis and Redis Scheduler interfaces with ioredis",
5
5
  "keywords": [
6
6
  "antelopejs",
@@ -33,10 +33,18 @@
33
33
  "lint:fix": "oxlint --fix",
34
34
  "lint": "oxlint",
35
35
  "prepack": "pnpm run build",
36
- "release": "pnpm run lint && pnpm run test && pnpm run prepack && release-it",
36
+ "release": "pnpm run typecheck && pnpm run lint && pnpm run test && pnpm run prepack && release-it",
37
37
  "test": "pnpm run build && ajs module test .",
38
38
  "format:check": "oxfmt --check .",
39
- "knip": "knip"
39
+ "knip": "knip",
40
+ "prepare": "if [ -e .git ] && command -v git >/dev/null 2>&1 && command -v lefthook >/dev/null 2>&1 && GIT_DIR=.git GIT_WORK_TREE=. git rev-parse --git-dir >/dev/null 2>&1; then GIT_DIR=.git GIT_WORK_TREE=. lefthook install; fi",
41
+ "checks": "antelopejs-checks",
42
+ "size": "antelopejs-check-size",
43
+ "sync": "antelopejs-sync",
44
+ "sync:check": "antelopejs-sync --check",
45
+ "typecheck": "tsc --noEmit",
46
+ "suppressions": "antelopejs-suppressions",
47
+ "suppressions:update": "antelopejs-suppressions --update"
40
48
  },
41
49
  "dependencies": {
42
50
  "@antelopejs/interface-core": ">=0.2.4 <1.0.0",
@@ -46,8 +54,8 @@
46
54
  "ioredis-mock": "^8.13.1"
47
55
  },
48
56
  "devDependencies": {
49
- "@antelopejs/core": "^1.16.0",
50
- "@antelopejs/tooling-configs": "^0.0.9",
57
+ "@antelopejs/core": "^1.21.0",
58
+ "@antelopejs/tooling-configs": "^0.5.1",
51
59
  "@types/chai": "^4.3.20",
52
60
  "@types/ioredis-mock": "^8.2.7",
53
61
  "@types/mocha": "^10.0.10",
@@ -55,6 +63,7 @@
55
63
  "chai": "^4.5.0",
56
64
  "eslint-plugin-perfectionist": "^5.11.0",
57
65
  "knip": "^6.34.0",
66
+ "lefthook": "^2.2.2",
58
67
  "oxfmt": "^0.66.0",
59
68
  "oxlint": "1.81.0",
60
69
  "oxlint-tsgolint": "^7.0.2001",
@@ -72,6 +81,9 @@
72
81
  "defaultConfig": {
73
82
  "url": "redis://localhost:6379"
74
83
  },
75
- "test": "src/test/antelope.test.ts"
84
+ "test": "src/test/antelope.test.ts",
85
+ "docs": {
86
+ "standard": true
87
+ }
76
88
  }
77
89
  }