@visualbravo/zenstack-cache 1.0.2 → 1.0.4

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/plugin.cjs CHANGED
@@ -32,12 +32,13 @@ function defineCachePlugin(pluginOptions) {
32
32
  return revalidation;
33
33
  }
34
34
  } },
35
- onQuery: async ({ args, model, operation, proceed }) => {
35
+ onQuery: async ({ args, model, operation, proceed, client }) => {
36
36
  if (args && "cache" in args) {
37
37
  const json = (0, stable_hash.stableHash)({
38
38
  args,
39
39
  model,
40
- operation
40
+ operation,
41
+ auth: client.$auth
41
42
  });
42
43
  if (!json) throw new Error(`Failed to serialize cache entry for ${lowerCaseFirst(model)}.${operation}`);
43
44
  const cache = pluginOptions.provider;
package/dist/plugin.mjs CHANGED
@@ -30,12 +30,13 @@ function defineCachePlugin(pluginOptions) {
30
30
  return revalidation;
31
31
  }
32
32
  } },
33
- onQuery: async ({ args, model, operation, proceed }) => {
33
+ onQuery: async ({ args, model, operation, proceed, client }) => {
34
34
  if (args && "cache" in args) {
35
35
  const json = stableHash({
36
36
  args,
37
37
  model,
38
- operation
38
+ operation,
39
+ auth: client.$auth
39
40
  });
40
41
  if (!json) throw new Error(`Failed to serialize cache entry for ${lowerCaseFirst(model)}.${operation}`);
41
42
  const cache = pluginOptions.provider;
package/package.json CHANGED
@@ -1,20 +1,23 @@
1
1
  {
2
2
  "name": "@visualbravo/zenstack-cache",
3
- "version": "1.0.2",
3
+ "version": "1.0.4",
4
+ "keywords": [
5
+ "accelerate",
6
+ "cache",
7
+ "caching",
8
+ "orm",
9
+ "prisma",
10
+ "redis",
11
+ "self-hosted",
12
+ "typescript",
13
+ "zenstack"
14
+ ],
4
15
  "license": "MIT",
5
16
  "repository": "github:visualbravo/zenstack-cache",
6
17
  "type": "module",
7
18
  "main": "./dist/index.cjs",
8
19
  "module": "./dist/index.mjs",
9
20
  "types": "./dist/index.d.cts",
10
- "keywords": [
11
- "zenstack",
12
- "cache",
13
- "caching",
14
- "prisma",
15
- "accelerate",
16
- "orm"
17
- ],
18
21
  "exports": {
19
22
  ".": {
20
23
  "@zenstack-cache/source": "./src/index.ts",