@eggjs/redis 4.0.0-beta.35 → 4.0.0-beta.36
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/dist/agent.d.ts +2 -2
- package/dist/agent.js +6 -2
- package/dist/app.d.ts +2 -2
- package/dist/app.js +6 -2
- package/dist/config/config.default.d.ts +57 -54
- package/dist/config/config.default.js +10 -53
- package/dist/index.d.ts +20 -16
- package/dist/index.js +23 -20
- package/dist/lib/redis.d.ts +9 -5
- package/dist/lib/redis.js +63 -73
- package/dist/types.d.ts +16 -14
- package/dist/types.js +1 -2
- package/package.json +36 -43
package/dist/agent.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { RedisBoot } from
|
|
2
|
-
export default
|
|
1
|
+
import { RedisBoot } from "./lib/redis.js";
|
|
2
|
+
export { RedisBoot as default };
|
package/dist/agent.js
CHANGED
|
@@ -1,3 +1,7 @@
|
|
|
1
1
|
import { RedisBoot } from "./lib/redis.js";
|
|
2
|
-
|
|
3
|
-
//#
|
|
2
|
+
|
|
3
|
+
//#region src/agent.ts
|
|
4
|
+
var agent_default = RedisBoot;
|
|
5
|
+
|
|
6
|
+
//#endregion
|
|
7
|
+
export { agent_default as default };
|
package/dist/app.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { RedisBoot } from
|
|
2
|
-
export default
|
|
1
|
+
import { RedisBoot } from "./lib/redis.js";
|
|
2
|
+
export { RedisBoot as default };
|
package/dist/app.js
CHANGED
|
@@ -1,3 +1,7 @@
|
|
|
1
1
|
import { RedisBoot } from "./lib/redis.js";
|
|
2
|
-
|
|
3
|
-
//#
|
|
2
|
+
|
|
3
|
+
//#region src/app.ts
|
|
4
|
+
var app_default = RedisBoot;
|
|
5
|
+
|
|
6
|
+
//#endregion
|
|
7
|
+
export { app_default as default };
|
|
@@ -1,59 +1,62 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
import { ClusterOptions, Redis, RedisOptions } from "ioredis";
|
|
2
|
+
|
|
3
|
+
//#region src/config/config.default.d.ts
|
|
4
|
+
interface RedisClientOptions extends RedisOptions {
|
|
5
|
+
/**
|
|
6
|
+
* Whether to enable weakDependent mode, the redis client start will not block the application start
|
|
7
|
+
*
|
|
8
|
+
* Default to `undefined`
|
|
9
|
+
*/
|
|
10
|
+
weakDependent?: boolean;
|
|
9
11
|
}
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
12
|
+
interface RedisClusterOptions extends ClusterOptions {
|
|
13
|
+
cluster: true;
|
|
14
|
+
nodes: RedisClientOptions[];
|
|
13
15
|
}
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
16
|
+
interface RedisConfig {
|
|
17
|
+
/**
|
|
18
|
+
* Default redis client config
|
|
19
|
+
*
|
|
20
|
+
* Default to `{}`
|
|
21
|
+
*/
|
|
22
|
+
default: RedisClientOptions;
|
|
23
|
+
/**
|
|
24
|
+
* Single Redis or Cluster Redis config
|
|
25
|
+
*/
|
|
26
|
+
client?: RedisClientOptions | RedisClusterOptions;
|
|
27
|
+
/**
|
|
28
|
+
* Multi Redis config
|
|
29
|
+
*/
|
|
30
|
+
clients?: Record<string, RedisClientOptions>;
|
|
31
|
+
/**
|
|
32
|
+
* redis client will try to use TIME command to detect client is ready or not
|
|
33
|
+
* if your redis server not support TIME command, please set this config to false
|
|
34
|
+
* see https://redis.io/commands/time
|
|
35
|
+
*
|
|
36
|
+
* Default to `true`
|
|
37
|
+
*/
|
|
38
|
+
supportTimeCommand: boolean;
|
|
39
|
+
/**
|
|
40
|
+
* Whether to enable redis for `app`
|
|
41
|
+
*
|
|
42
|
+
* Default to `true`
|
|
43
|
+
*/
|
|
44
|
+
app: boolean;
|
|
45
|
+
/**
|
|
46
|
+
* Whether to enable redis for `agent`
|
|
47
|
+
*
|
|
48
|
+
* Default to `false`
|
|
49
|
+
*/
|
|
50
|
+
agent: boolean;
|
|
51
|
+
/**
|
|
52
|
+
* Customize iovalkey version, only set when you needed
|
|
53
|
+
*
|
|
54
|
+
* Default to `undefined`, which means using the built-in ioredis
|
|
55
|
+
*/
|
|
56
|
+
Redis?: typeof Redis;
|
|
55
57
|
}
|
|
56
58
|
declare const _default: {
|
|
57
|
-
|
|
59
|
+
redis: RedisConfig;
|
|
58
60
|
};
|
|
59
|
-
|
|
61
|
+
//#endregion
|
|
62
|
+
export { RedisClientOptions, RedisClusterOptions, RedisConfig, _default as default };
|
|
@@ -1,53 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
// family: 'user',
|
|
12
|
-
// password: 'password',
|
|
13
|
-
// db: 'db',
|
|
14
|
-
// },
|
|
15
|
-
//
|
|
16
|
-
// Cluster Redis
|
|
17
|
-
// client: {
|
|
18
|
-
// cluster: true,
|
|
19
|
-
// nodes: [{
|
|
20
|
-
// host: 'host',
|
|
21
|
-
// port: 'port',
|
|
22
|
-
// family: 'user',
|
|
23
|
-
// password: 'password',
|
|
24
|
-
// db: 'db',
|
|
25
|
-
// }, {
|
|
26
|
-
// host: 'host',
|
|
27
|
-
// port: 'port',
|
|
28
|
-
// family: 'user',
|
|
29
|
-
// password: 'password',
|
|
30
|
-
// db: 'db',
|
|
31
|
-
// },
|
|
32
|
-
// ]},
|
|
33
|
-
//
|
|
34
|
-
// Multi Redis
|
|
35
|
-
// clients: {
|
|
36
|
-
// instance1: {
|
|
37
|
-
// host: 'host',
|
|
38
|
-
// port: 'port',
|
|
39
|
-
// family: 'user',
|
|
40
|
-
// password: 'password',
|
|
41
|
-
// db: 'db',
|
|
42
|
-
// },
|
|
43
|
-
// instance2: {
|
|
44
|
-
// host: 'host',
|
|
45
|
-
// port: 'port',
|
|
46
|
-
// family: 'user',
|
|
47
|
-
// password: 'password',
|
|
48
|
-
// db: 'db',
|
|
49
|
-
// },
|
|
50
|
-
// },
|
|
51
|
-
},
|
|
52
|
-
};
|
|
53
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29uZmlnLmRlZmF1bHQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvY29uZmlnL2NvbmZpZy5kZWZhdWx0LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQTJEQSxlQUFlO0lBQ2IsS0FBSyxFQUFFO1FBQ0wsT0FBTyxFQUFFLEVBQUU7UUFDWCxHQUFHLEVBQUUsSUFBSTtRQUNULEtBQUssRUFBRSxLQUFLO1FBQ1osa0JBQWtCLEVBQUUsSUFBSTtRQUN4QixlQUFlO1FBQ2YsWUFBWTtRQUNaLGtCQUFrQjtRQUNsQixrQkFBa0I7UUFDbEIsb0JBQW9CO1FBQ3BCLDBCQUEwQjtRQUMxQixjQUFjO1FBQ2QsS0FBSztRQUNMLEVBQUU7UUFDRixnQkFBZ0I7UUFDaEIsWUFBWTtRQUNaLG1CQUFtQjtRQUNuQixjQUFjO1FBQ2Qsb0JBQW9CO1FBQ3BCLG9CQUFvQjtRQUNwQixzQkFBc0I7UUFDdEIsNEJBQTRCO1FBQzVCLGdCQUFnQjtRQUNoQixTQUFTO1FBQ1Qsb0JBQW9CO1FBQ3BCLG9CQUFvQjtRQUNwQixzQkFBc0I7UUFDdEIsNEJBQTRCO1FBQzVCLGdCQUFnQjtRQUNoQixPQUFPO1FBQ1AsTUFBTTtRQUNOLEVBQUU7UUFDRixjQUFjO1FBQ2QsYUFBYTtRQUNiLGlCQUFpQjtRQUNqQixvQkFBb0I7UUFDcEIsb0JBQW9CO1FBQ3BCLHNCQUFzQjtRQUN0Qiw0QkFBNEI7UUFDNUIsZ0JBQWdCO1FBQ2hCLE9BQU87UUFDUCxpQkFBaUI7UUFDakIsb0JBQW9CO1FBQ3BCLG9CQUFvQjtRQUNwQixzQkFBc0I7UUFDdEIsNEJBQTRCO1FBQzVCLGdCQUFnQjtRQUNoQixPQUFPO1FBQ1AsS0FBSztLQUNTO0NBQ2pCLENBQUMifQ==
|
|
1
|
+
//#region src/config/config.default.ts
|
|
2
|
+
var config_default_default = { redis: {
|
|
3
|
+
default: {},
|
|
4
|
+
app: true,
|
|
5
|
+
agent: false,
|
|
6
|
+
supportTimeCommand: true
|
|
7
|
+
} };
|
|
8
|
+
|
|
9
|
+
//#endregion
|
|
10
|
+
export { config_default_default as default };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,18 +1,22 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
1
|
+
import "./types.js";
|
|
2
|
+
import { EggPluginFactory } from "egg";
|
|
3
|
+
|
|
4
|
+
//#region src/index.d.ts
|
|
5
|
+
|
|
3
6
|
/**
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
7
|
+
* Redis plugin
|
|
8
|
+
*
|
|
9
|
+
* @since 4.1.0
|
|
10
|
+
* Usage:
|
|
11
|
+
* ```ts
|
|
12
|
+
* // config/plugin.ts
|
|
13
|
+
* import redisPlugin from '@eggjs/redis';
|
|
14
|
+
*
|
|
15
|
+
* export default {
|
|
16
|
+
* ...redisPlugin(),
|
|
17
|
+
* };
|
|
18
|
+
* ```
|
|
19
|
+
*/
|
|
17
20
|
declare const _default: EggPluginFactory;
|
|
18
|
-
|
|
21
|
+
//#endregion
|
|
22
|
+
export { _default as default };
|
package/dist/index.js
CHANGED
|
@@ -1,22 +1,25 @@
|
|
|
1
|
-
import "
|
|
2
|
-
|
|
1
|
+
import { definePluginFactory } from "egg";
|
|
2
|
+
|
|
3
|
+
//#region src/index.ts
|
|
3
4
|
/**
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
5
|
+
* Redis plugin
|
|
6
|
+
*
|
|
7
|
+
* @since 4.1.0
|
|
8
|
+
* Usage:
|
|
9
|
+
* ```ts
|
|
10
|
+
* // config/plugin.ts
|
|
11
|
+
* import redisPlugin from '@eggjs/redis';
|
|
12
|
+
*
|
|
13
|
+
* export default {
|
|
14
|
+
* ...redisPlugin(),
|
|
15
|
+
* };
|
|
16
|
+
* ```
|
|
17
|
+
*/
|
|
18
|
+
var src_default = definePluginFactory({
|
|
19
|
+
name: "redis",
|
|
20
|
+
enable: true,
|
|
21
|
+
path: import.meta.dirname
|
|
21
22
|
});
|
|
22
|
-
|
|
23
|
+
|
|
24
|
+
//#endregion
|
|
25
|
+
export { src_default as default };
|
package/dist/lib/redis.d.ts
CHANGED
|
@@ -1,6 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import { EggApplicationCore, ILifecycleBoot } from "egg";
|
|
2
|
+
|
|
3
|
+
//#region src/lib/redis.d.ts
|
|
4
|
+
declare class RedisBoot implements ILifecycleBoot {
|
|
5
|
+
private readonly app;
|
|
6
|
+
constructor(app: EggApplicationCore);
|
|
7
|
+
didLoad(): Promise<void>;
|
|
6
8
|
}
|
|
9
|
+
//#endregion
|
|
10
|
+
export { RedisBoot };
|
package/dist/lib/redis.js
CHANGED
|
@@ -1,76 +1,66 @@
|
|
|
1
|
-
import assert from
|
|
2
|
-
import { once } from
|
|
3
|
-
import { Redis } from
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
}
|
|
18
|
-
}
|
|
1
|
+
import assert from "node:assert";
|
|
2
|
+
import { once } from "node:events";
|
|
3
|
+
import { Redis } from "ioredis";
|
|
4
|
+
|
|
5
|
+
//#region src/lib/redis.ts
|
|
6
|
+
var RedisBoot = class {
|
|
7
|
+
app;
|
|
8
|
+
constructor(app) {
|
|
9
|
+
this.app = app;
|
|
10
|
+
}
|
|
11
|
+
async didLoad() {
|
|
12
|
+
const app = this.app;
|
|
13
|
+
if (app.type === "application" && app.config.redis.app) app.addSingleton("redis", createClient);
|
|
14
|
+
else if (app.type === "agent" && app.config.redis.agent) app.addSingleton("redis", createClient);
|
|
15
|
+
}
|
|
16
|
+
};
|
|
19
17
|
let count = 0;
|
|
20
18
|
function createClient(options, app) {
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
app.coreLogger.info(`[@eggjs/redis] instance[${index}] is weak dependent and won't block app start`);
|
|
66
|
-
client.once('ready', () => {
|
|
67
|
-
app.coreLogger.info(`[@eggjs/redis] instance[${index}] status OK`);
|
|
68
|
-
});
|
|
69
|
-
return;
|
|
70
|
-
}
|
|
71
|
-
await Promise.race([once(client, 'ready'), once(client, 'error')]);
|
|
72
|
-
app.coreLogger.info(`[@eggjs/redis] instance[${index}] status OK, client ready`);
|
|
73
|
-
}, `[@eggjs/redis] instance[${index}] start check`);
|
|
74
|
-
return client;
|
|
19
|
+
const RedisClass = app.config.redis.Redis ?? Redis;
|
|
20
|
+
let client;
|
|
21
|
+
if ("cluster" in options && options.cluster === true) {
|
|
22
|
+
const config = options;
|
|
23
|
+
assert(config.nodes && config.nodes.length > 0, "[@eggjs/redis] cluster nodes configuration is required when use cluster redis");
|
|
24
|
+
for (const client$1 of config.nodes) assert(client$1.host && client$1.port, `[@eggjs/redis] 'host: ${client$1.host}', 'port: ${client$1.port}' are required on config`);
|
|
25
|
+
app.coreLogger.info("[@eggjs/redis] cluster connecting");
|
|
26
|
+
client = new RedisClass.Cluster(config.nodes, config);
|
|
27
|
+
} else if ("sentinels" in options && options.sentinels) {
|
|
28
|
+
const config = options;
|
|
29
|
+
assert(config.sentinels && config.sentinels.length > 0, "[@eggjs/redis] sentinels configuration is required when use redis sentinel");
|
|
30
|
+
for (const sentinel of config.sentinels) assert(sentinel.host && sentinel.port, `[@eggjs/redis] 'host: ${sentinel.host}', 'port: ${sentinel.port}' are required on config`);
|
|
31
|
+
const mask = config.password ? "***" : config.password;
|
|
32
|
+
assert(config.name && config.password !== void 0 && config.db !== void 0, `[@eggjs/redis] 'name of master: ${config.name}', 'password: ${mask}', 'db: ${config.db}' are required on config`);
|
|
33
|
+
app.coreLogger.info("[@eggjs/redis] sentinel connecting start");
|
|
34
|
+
client = new RedisClass(config);
|
|
35
|
+
} else {
|
|
36
|
+
const config = options;
|
|
37
|
+
const mask = config.password ? "***" : config.password;
|
|
38
|
+
assert(config.host && config.port && config.password !== void 0 && config.db !== void 0 || config.path, `[@eggjs/redis] 'host: ${config.host}', 'port: ${config.port}', 'password: ${mask}', 'db: ${config.db}' or 'path:${config.path}' are required on config`);
|
|
39
|
+
if (config.host) app.coreLogger.info("[@eggjs/redis] server connecting redis://:***@%s:%s/%s", config.host, config.port, config.db);
|
|
40
|
+
else app.coreLogger.info("[@eggjs/redis] server connecting %s", config.path || config);
|
|
41
|
+
client = new RedisClass(config);
|
|
42
|
+
}
|
|
43
|
+
client.on("connect", () => {
|
|
44
|
+
app.coreLogger.info("[@eggjs/redis] client connect success");
|
|
45
|
+
});
|
|
46
|
+
client.on("error", (err) => {
|
|
47
|
+
app.coreLogger.error("[@eggjs/redis] client error: %s", err);
|
|
48
|
+
app.coreLogger.error(err);
|
|
49
|
+
});
|
|
50
|
+
const index = count++;
|
|
51
|
+
app.lifecycle.registerBeforeStart(async () => {
|
|
52
|
+
if ("weakDependent" in options && options.weakDependent) {
|
|
53
|
+
app.coreLogger.info(`[@eggjs/redis] instance[${index}] is weak dependent and won't block app start`);
|
|
54
|
+
client.once("ready", () => {
|
|
55
|
+
app.coreLogger.info(`[@eggjs/redis] instance[${index}] status OK`);
|
|
56
|
+
});
|
|
57
|
+
return;
|
|
58
|
+
}
|
|
59
|
+
await Promise.race([once(client, "ready"), once(client, "error")]);
|
|
60
|
+
app.coreLogger.info(`[@eggjs/redis] instance[${index}] status OK, client ready`);
|
|
61
|
+
}, `[@eggjs/redis] instance[${index}] start check`);
|
|
62
|
+
return client;
|
|
75
63
|
}
|
|
76
|
-
|
|
64
|
+
|
|
65
|
+
//#endregion
|
|
66
|
+
export { RedisBoot };
|
package/dist/types.d.ts
CHANGED
|
@@ -1,14 +1,16 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
1
|
+
import { RedisConfig } from "./config/config.default.js";
|
|
2
|
+
import { Redis } from "ioredis";
|
|
3
|
+
import { Singleton } from "egg";
|
|
4
|
+
|
|
5
|
+
//#region src/types.d.ts
|
|
6
|
+
declare module "egg" {
|
|
7
|
+
interface EggAppConfig {
|
|
8
|
+
/**
|
|
9
|
+
* Redis plugin config
|
|
10
|
+
*/
|
|
11
|
+
redis: RedisConfig;
|
|
12
|
+
}
|
|
13
|
+
interface EggApplicationCore {
|
|
14
|
+
redis: Redis & Singleton<Redis>;
|
|
15
|
+
}
|
|
16
|
+
}
|
package/dist/types.js
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
export {};
|
|
2
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidHlwZXMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9zcmMvdHlwZXMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiJ9
|
|
1
|
+
export { };
|
package/package.json
CHANGED
|
@@ -1,70 +1,63 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@eggjs/redis",
|
|
3
|
-
"version": "4.0.0-beta.
|
|
3
|
+
"version": "4.0.0-beta.36",
|
|
4
4
|
"description": "Valkey / Redis plugin for egg",
|
|
5
|
-
"type": "module",
|
|
6
|
-
"exports": {
|
|
7
|
-
".": "./dist/index.js",
|
|
8
|
-
"./agent": "./dist/agent.js",
|
|
9
|
-
"./app": "./dist/app.js",
|
|
10
|
-
"./config/config.default": "./dist/config/config.default.js",
|
|
11
|
-
"./lib/redis": "./dist/lib/redis.js",
|
|
12
|
-
"./types": "./dist/types.js",
|
|
13
|
-
"./package.json": "./package.json"
|
|
14
|
-
},
|
|
15
|
-
"publishConfig": {
|
|
16
|
-
"access": "public"
|
|
17
|
-
},
|
|
18
|
-
"files": [
|
|
19
|
-
"dist"
|
|
20
|
-
],
|
|
21
5
|
"keywords": [
|
|
6
|
+
"Valkey",
|
|
7
|
+
"database",
|
|
22
8
|
"egg",
|
|
23
|
-
"eggPlugin",
|
|
24
9
|
"egg-plugin",
|
|
25
|
-
"
|
|
26
|
-
"
|
|
27
|
-
"database"
|
|
10
|
+
"eggPlugin",
|
|
11
|
+
"redis"
|
|
28
12
|
],
|
|
29
|
-
"license": "MIT",
|
|
30
13
|
"homepage": "https://github.com/eggjs/egg/tree/next/plugins/redis",
|
|
31
14
|
"bugs": {
|
|
32
15
|
"url": "https://github.com/eggjs/egg/issues"
|
|
33
16
|
},
|
|
17
|
+
"license": "MIT",
|
|
18
|
+
"author": "jtyjty99999",
|
|
34
19
|
"repository": {
|
|
35
20
|
"type": "git",
|
|
36
21
|
"url": "git+https://github.com/eggjs/egg.git",
|
|
37
22
|
"directory": "plugins/redis"
|
|
38
23
|
},
|
|
39
|
-
"
|
|
40
|
-
|
|
41
|
-
|
|
24
|
+
"files": [
|
|
25
|
+
"dist"
|
|
26
|
+
],
|
|
27
|
+
"type": "module",
|
|
28
|
+
"main": "./dist/index.js",
|
|
29
|
+
"module": "./dist/index.js",
|
|
30
|
+
"types": "./dist/index.d.ts",
|
|
31
|
+
"exports": {
|
|
32
|
+
".": "./dist/index.js",
|
|
33
|
+
"./agent": "./dist/agent.js",
|
|
34
|
+
"./app": "./dist/app.js",
|
|
35
|
+
"./config/config.default": "./dist/config/config.default.js",
|
|
36
|
+
"./lib/redis": "./dist/lib/redis.js",
|
|
37
|
+
"./types": "./dist/types.js",
|
|
38
|
+
"./package.json": "./package.json"
|
|
39
|
+
},
|
|
40
|
+
"publishConfig": {
|
|
41
|
+
"access": "public"
|
|
42
42
|
},
|
|
43
43
|
"dependencies": {
|
|
44
44
|
"ioredis": "^5.4.2"
|
|
45
45
|
},
|
|
46
|
-
"peerDependencies": {
|
|
47
|
-
"egg": "4.1.0-beta.35"
|
|
48
|
-
},
|
|
49
46
|
"devDependencies": {
|
|
50
|
-
"@types/node": "^24.10.
|
|
47
|
+
"@types/node": "^24.10.2",
|
|
51
48
|
"detect-port": "^2.1.0",
|
|
52
|
-
"oxlint": "^1.31.0",
|
|
53
|
-
"rimraf": "^6.1.2",
|
|
54
|
-
"tsdown": "^0.17.0",
|
|
55
49
|
"typescript": "^5.9.3",
|
|
56
|
-
"
|
|
57
|
-
"@eggjs/tsconfig": "3.1.0-beta.
|
|
58
|
-
"egg": "4.1.0-beta.
|
|
59
|
-
|
|
50
|
+
"@eggjs/mock": "7.0.0-beta.36",
|
|
51
|
+
"@eggjs/tsconfig": "3.1.0-beta.36",
|
|
52
|
+
"egg": "4.1.0-beta.36"
|
|
53
|
+
},
|
|
54
|
+
"peerDependencies": {
|
|
55
|
+
"egg": "4.1.0-beta.36"
|
|
56
|
+
},
|
|
57
|
+
"engines": {
|
|
58
|
+
"node": ">= 22.18.0"
|
|
60
59
|
},
|
|
61
|
-
"main": "./dist/index.js",
|
|
62
|
-
"module": "./dist/index.js",
|
|
63
|
-
"types": "./dist/index.d.ts",
|
|
64
60
|
"scripts": {
|
|
65
|
-
"
|
|
66
|
-
"typecheck": "tsc --noEmit",
|
|
67
|
-
"lint": "oxlint --type-aware",
|
|
68
|
-
"test": "vitest run"
|
|
61
|
+
"typecheck": "tsgo --noEmit"
|
|
69
62
|
}
|
|
70
63
|
}
|