js-valkey-server 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +558 -0
- package/dist/cli.js +17420 -0
- package/dist/cli.js.map +1 -0
- package/dist/core.d.mts +651 -0
- package/dist/core.d.ts +651 -0
- package/dist/core.js +17929 -0
- package/dist/core.js.map +1 -0
- package/dist/core.mjs +17691 -0
- package/dist/core.mjs.map +1 -0
- package/dist/index.d.mts +502 -0
- package/dist/index.d.ts +502 -0
- package/dist/index.js +18845 -0
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +18749 -0
- package/dist/index.mjs.map +1 -0
- package/dist/redis-error-C96iHLJ-.d.mts +1392 -0
- package/dist/redis-error-C96iHLJ-.d.ts +1392 -0
- package/package.json +119 -0
package/package.json
ADDED
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "js-valkey-server",
|
|
3
|
+
"version": "0.3.0",
|
|
4
|
+
"description": "In-memory Redis-compatible server implementation in JavaScript, useful for testing and client-agnostic mocks",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"redis",
|
|
7
|
+
"valkey",
|
|
8
|
+
"resp",
|
|
9
|
+
"server",
|
|
10
|
+
"mock",
|
|
11
|
+
"testing",
|
|
12
|
+
"ioredis",
|
|
13
|
+
"node-redis",
|
|
14
|
+
"in-memory",
|
|
15
|
+
"cluster"
|
|
16
|
+
],
|
|
17
|
+
"license": "MIT",
|
|
18
|
+
"author": "fatal10110",
|
|
19
|
+
"repository": {
|
|
20
|
+
"type": "git",
|
|
21
|
+
"url": "git+https://github.com/fatal10110/js-redis-server.git"
|
|
22
|
+
},
|
|
23
|
+
"bugs": {
|
|
24
|
+
"url": "https://github.com/fatal10110/js-redis-server/issues"
|
|
25
|
+
},
|
|
26
|
+
"homepage": "https://github.com/fatal10110/js-redis-server#readme",
|
|
27
|
+
"main": "./dist/index.js",
|
|
28
|
+
"module": "./dist/index.mjs",
|
|
29
|
+
"types": "./dist/index.d.ts",
|
|
30
|
+
"exports": {
|
|
31
|
+
".": {
|
|
32
|
+
"import": {
|
|
33
|
+
"types": "./dist/index.d.mts",
|
|
34
|
+
"default": "./dist/index.mjs"
|
|
35
|
+
},
|
|
36
|
+
"require": {
|
|
37
|
+
"types": "./dist/index.d.ts",
|
|
38
|
+
"default": "./dist/index.js"
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
"./core": {
|
|
42
|
+
"import": {
|
|
43
|
+
"types": "./dist/core.d.mts",
|
|
44
|
+
"default": "./dist/core.mjs"
|
|
45
|
+
},
|
|
46
|
+
"require": {
|
|
47
|
+
"types": "./dist/core.d.ts",
|
|
48
|
+
"default": "./dist/core.js"
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
},
|
|
52
|
+
"sideEffects": false,
|
|
53
|
+
"files": [
|
|
54
|
+
"dist/",
|
|
55
|
+
"README.md",
|
|
56
|
+
"LICENSE"
|
|
57
|
+
],
|
|
58
|
+
"engines": {
|
|
59
|
+
"node": ">=22"
|
|
60
|
+
},
|
|
61
|
+
"scripts": {
|
|
62
|
+
"build": "tsup",
|
|
63
|
+
"start": "npm run build && node --enable-source-maps ./dist/cli.js",
|
|
64
|
+
"test": "tsc --noEmit && node --enable-source-maps --import tsx --no-warnings --test \"./tests/**/*.test.ts\"",
|
|
65
|
+
"test:integration:mock": "tsc --noEmit && TEST_BACKEND=mock node --enable-source-maps --import tsx --no-warnings --test \"./tests-integration/**/*.test.ts\"",
|
|
66
|
+
"test:integration:real": "tsc --noEmit && npm run clean:redis && TEST_BACKEND=real node --enable-source-maps --import tsx --no-warnings --test-concurrency 1 --test-timeout 30000 --test \"./tests-integration/**/*.test.ts\"",
|
|
67
|
+
"test:integration:compatibility:mock": "tsc --noEmit && for profile in redis-6.2 redis-7.0 redis-7.2 redis-7.4 redis-8.0 valkey-8.0 valkey-9.0; do echo \"REDIS_COMPAT=$profile\"; TEST_BACKEND=mock REDIS_COMPAT=$profile node --enable-source-maps --import tsx --no-warnings --test \"./tests-integration/compatibility/**/*.test.ts\" || exit $?; done",
|
|
68
|
+
"test:integration:mock:ioredis": "tsc --noEmit && TEST_BACKEND=mock node --enable-source-maps --import tsx --no-warnings --test \"./tests-integration/ioredis/**/*.test.ts\"",
|
|
69
|
+
"test:integration:mock:node-redis": "tsc --noEmit && TEST_BACKEND=mock node --enable-source-maps --import tsx --no-warnings --test \"./tests-integration/node-redis/**/*.test.ts\"",
|
|
70
|
+
"test:integration:real:ioredis": "tsc --noEmit && npm run clean:redis && TEST_BACKEND=real node --enable-source-maps --import tsx --no-warnings --test-concurrency 1 --test-timeout 30000 --test \"./tests-integration/ioredis/**/*.test.ts\"",
|
|
71
|
+
"test:integration:real:node-redis": "tsc --noEmit && npm run clean:redis && TEST_BACKEND=real node --enable-source-maps --import tsx --no-warnings --test-concurrency 1 --test-timeout 30000 --test \"./tests-integration/node-redis/**/*.test.ts\"",
|
|
72
|
+
"test:integration:raw:mock": "tsc --noEmit && TEST_BACKEND=mock node --enable-source-maps --import tsx --no-warnings --test \"./tests-integration/raw-tcp/**/*.test.ts\"",
|
|
73
|
+
"test:integration:raw:real": "tsc --noEmit && TEST_BACKEND=real node --enable-source-maps --import tsx --no-warnings --test-concurrency 1 --test-timeout 30000 --test \"./tests-integration/raw-tcp/**/*.test.ts\"",
|
|
74
|
+
"test:package": "npm run build && node --enable-source-maps --import tsx --no-warnings --test \"./tests-package/**/*.test.ts\"",
|
|
75
|
+
"test:all": "npm run test && npm run test:package && npm run test:integration:mock && npm run test:integration:real",
|
|
76
|
+
"clean:redis": "redis-cli --cluster call 127.0.0.1:30000 FLUSHALL || redis-cli FLUSHALL || echo 'Redis cleanup attempted'",
|
|
77
|
+
"lint": "eslint .",
|
|
78
|
+
"format": "prettier --write \"**/*.+(js|ts|json)\"",
|
|
79
|
+
"prepublishOnly": "npm run build && npm test",
|
|
80
|
+
"prepare": "husky"
|
|
81
|
+
},
|
|
82
|
+
"dependencies": {
|
|
83
|
+
"cluster-key-slot": "^1.1.2",
|
|
84
|
+
"lua-redis-wasm": "^1.5.0"
|
|
85
|
+
},
|
|
86
|
+
"peerDependencies": {
|
|
87
|
+
"ioredis": "^5.0.0",
|
|
88
|
+
"redis": "^4.0.0 || ^5.0.0 || ^6.0.0"
|
|
89
|
+
},
|
|
90
|
+
"peerDependenciesMeta": {
|
|
91
|
+
"ioredis": {
|
|
92
|
+
"optional": true
|
|
93
|
+
},
|
|
94
|
+
"redis": {
|
|
95
|
+
"optional": true
|
|
96
|
+
}
|
|
97
|
+
},
|
|
98
|
+
"devDependencies": {
|
|
99
|
+
"@eslint/js": "^10.0.1",
|
|
100
|
+
"@tsconfig/node22": "^22.0.5",
|
|
101
|
+
"@types/node": "^22.20.0",
|
|
102
|
+
"@typescript-eslint/eslint-plugin": "^8.61.1",
|
|
103
|
+
"@typescript-eslint/parser": "^8.61.1",
|
|
104
|
+
"eslint": "^10.5.0",
|
|
105
|
+
"eslint-config-prettier": "^10.1.8",
|
|
106
|
+
"globals": "^17.6.0",
|
|
107
|
+
"husky": "^9.1.7",
|
|
108
|
+
"ioredis": "^5.11.1",
|
|
109
|
+
"lint-staged": "^17.0.7",
|
|
110
|
+
"prettier": "^3.8.4",
|
|
111
|
+
"redis": "^6.0.0",
|
|
112
|
+
"tsup": "^8.5.1",
|
|
113
|
+
"tsx": "^4.22.4",
|
|
114
|
+
"typescript": "^6.0.3"
|
|
115
|
+
},
|
|
116
|
+
"bin": {
|
|
117
|
+
"js-valkey-server": "./dist/cli.js"
|
|
118
|
+
}
|
|
119
|
+
}
|