@agrodt/astro-redis-cache-provider 0.0.1 → 0.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/LICENSE +21 -0
- package/README.md +73 -43
- package/dist/config.d.ts +8 -0
- package/dist/config.d.ts.map +1 -0
- package/dist/config.js +12 -0
- package/dist/config.js.map +1 -0
- package/dist/runtime.d.ts +74 -0
- package/dist/runtime.d.ts.map +1 -0
- package/dist/runtime.js +461 -0
- package/dist/runtime.js.map +1 -0
- package/dist/schemas.d.ts +20 -0
- package/dist/schemas.d.ts.map +1 -0
- package/dist/schemas.js +145 -0
- package/dist/schemas.js.map +1 -0
- package/package.json +74 -7
- package/src/config.ts +18 -0
- package/src/runtime.ts +711 -0
- package/src/schemas.ts +174 -0
package/package.json
CHANGED
|
@@ -1,10 +1,77 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agrodt/astro-redis-cache-provider",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "0.1.1",
|
|
4
|
+
"description": "Redis cache provider for Astro route caching using node-redis.",
|
|
5
5
|
"keywords": [
|
|
6
|
-
"
|
|
7
|
-
"
|
|
8
|
-
"
|
|
9
|
-
|
|
10
|
-
|
|
6
|
+
"astro",
|
|
7
|
+
"cache",
|
|
8
|
+
"redis",
|
|
9
|
+
"route-caching"
|
|
10
|
+
],
|
|
11
|
+
"license": "MIT",
|
|
12
|
+
"author": "Petr Tsymbarovich <petr@tsymbarovich.ru>",
|
|
13
|
+
"repository": {
|
|
14
|
+
"type": "git",
|
|
15
|
+
"url": "git+https://github.com/AgroDT/astro-redis-cache-provider.git"
|
|
16
|
+
},
|
|
17
|
+
"bugs": {
|
|
18
|
+
"url": "https://github.com/AgroDT/astro-redis-cache-provider/issues"
|
|
19
|
+
},
|
|
20
|
+
"homepage": "https://github.com/AgroDT/astro-redis-cache-provider",
|
|
21
|
+
"files": [
|
|
22
|
+
"dist",
|
|
23
|
+
"!dist/**/*.test.*",
|
|
24
|
+
"src/**/*.ts",
|
|
25
|
+
"!src/**/*.test.ts",
|
|
26
|
+
"README.md",
|
|
27
|
+
"LICENSE"
|
|
28
|
+
],
|
|
29
|
+
"type": "module",
|
|
30
|
+
"main": "./dist/runtime.js",
|
|
31
|
+
"types": "./dist/runtime.d.ts",
|
|
32
|
+
"exports": {
|
|
33
|
+
".": {
|
|
34
|
+
"types": "./dist/runtime.d.ts",
|
|
35
|
+
"default": "./dist/runtime.js"
|
|
36
|
+
},
|
|
37
|
+
"./runtime": {
|
|
38
|
+
"types": "./dist/runtime.d.ts",
|
|
39
|
+
"default": "./dist/runtime.js"
|
|
40
|
+
},
|
|
41
|
+
"./config": {
|
|
42
|
+
"types": "./dist/config.d.ts",
|
|
43
|
+
"default": "./dist/config.js"
|
|
44
|
+
},
|
|
45
|
+
"./package.json": "./package.json"
|
|
46
|
+
},
|
|
47
|
+
"dependencies": {
|
|
48
|
+
"bebop": "^3.2.3",
|
|
49
|
+
"picomatch": "^4.0.4",
|
|
50
|
+
"redis": "^5.11.0"
|
|
51
|
+
},
|
|
52
|
+
"devDependencies": {
|
|
53
|
+
"@biomejs/biome": "^2.4.11",
|
|
54
|
+
"@types/node": "^25.6.0",
|
|
55
|
+
"@types/picomatch": "^4.0.3",
|
|
56
|
+
"@typescript/native-preview": "7.0.0-dev.20260410.1",
|
|
57
|
+
"astro": "^6.1.5"
|
|
58
|
+
},
|
|
59
|
+
"peerDependencies": {
|
|
60
|
+
"astro": "^6.1"
|
|
61
|
+
},
|
|
62
|
+
"publishConfig": {
|
|
63
|
+
"access": "public"
|
|
64
|
+
},
|
|
65
|
+
"scripts": {
|
|
66
|
+
"build": "tsgo -p tsconfig.json",
|
|
67
|
+
"check": "tsgo -p tsconfig.json --noEmit",
|
|
68
|
+
"docs:build": "pnpm dlx --package typedoc-github-theme typedoc --plugin typedoc-github-theme",
|
|
69
|
+
"format": "biome format",
|
|
70
|
+
"format:fix": "biome format --fix",
|
|
71
|
+
"generate:schemas": "pnpx bebop-tools build",
|
|
72
|
+
"lint": "biome lint",
|
|
73
|
+
"lint:fix": "biome lint --fix",
|
|
74
|
+
"pretest": "pnpm run build",
|
|
75
|
+
"test": "node --experimental-test-coverage --test dist/*.test.js"
|
|
76
|
+
}
|
|
77
|
+
}
|
package/src/config.ts
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { CacheProviderConfig } from "astro";
|
|
2
|
+
|
|
3
|
+
import type { RedisCacheProviderOptions } from "./runtime.js";
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Creates Astro cache provider configuration for the Redis runtime provider.
|
|
7
|
+
*/
|
|
8
|
+
export function redisCache(
|
|
9
|
+
config: RedisCacheProviderOptions = {},
|
|
10
|
+
): CacheProviderConfig<RedisCacheProviderOptions> {
|
|
11
|
+
return {
|
|
12
|
+
name: "redis",
|
|
13
|
+
entrypoint: "@agrodt/astro-redis-cache-provider/runtime",
|
|
14
|
+
config,
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export default redisCache;
|