@spoosh/plugin-invalidation 0.9.1 → 0.10.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/dist/index.d.mts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +2 -2
- package/dist/index.mjs +2 -2
- package/package.json +4 -4
package/dist/index.d.mts
CHANGED
|
@@ -54,13 +54,13 @@ interface InvalidationPluginExports {
|
|
|
54
54
|
setDefaultMode: (value: InvalidationMode) => void;
|
|
55
55
|
}
|
|
56
56
|
declare module "@spoosh/core" {
|
|
57
|
-
interface
|
|
57
|
+
interface PluginInternalRegistry {
|
|
58
58
|
"spoosh:invalidation": InvalidationPluginExports;
|
|
59
59
|
}
|
|
60
60
|
interface PluginResolvers<TContext> {
|
|
61
61
|
invalidate: InvalidateOption<TContext["schema"]> | undefined;
|
|
62
62
|
}
|
|
63
|
-
interface
|
|
63
|
+
interface ApiResolvers<TSchema> {
|
|
64
64
|
invalidate: InvalidateFn<TSchema>;
|
|
65
65
|
}
|
|
66
66
|
}
|
|
@@ -115,7 +115,7 @@ declare function invalidationPlugin(config?: InvalidationPluginConfig): _spoosh_
|
|
|
115
115
|
readResult: InvalidationReadResult;
|
|
116
116
|
writeResult: InvalidationWriteResult;
|
|
117
117
|
queueResult: InvalidationQueueResult;
|
|
118
|
-
|
|
118
|
+
api: InvalidationInstanceApi;
|
|
119
119
|
}>;
|
|
120
120
|
|
|
121
121
|
export { type InvalidateOption, type InvalidationMode, type InvalidationPagesOptions, type InvalidationPluginConfig, type InvalidationPluginExports, type InvalidationQueueResult, type InvalidationQueueTriggerOptions, type InvalidationReadOptions, type InvalidationReadResult, type InvalidationWriteOptions, type InvalidationWriteResult, type InvalidationWriteTriggerOptions, invalidationPlugin };
|
package/dist/index.d.ts
CHANGED
|
@@ -54,13 +54,13 @@ interface InvalidationPluginExports {
|
|
|
54
54
|
setDefaultMode: (value: InvalidationMode) => void;
|
|
55
55
|
}
|
|
56
56
|
declare module "@spoosh/core" {
|
|
57
|
-
interface
|
|
57
|
+
interface PluginInternalRegistry {
|
|
58
58
|
"spoosh:invalidation": InvalidationPluginExports;
|
|
59
59
|
}
|
|
60
60
|
interface PluginResolvers<TContext> {
|
|
61
61
|
invalidate: InvalidateOption<TContext["schema"]> | undefined;
|
|
62
62
|
}
|
|
63
|
-
interface
|
|
63
|
+
interface ApiResolvers<TSchema> {
|
|
64
64
|
invalidate: InvalidateFn<TSchema>;
|
|
65
65
|
}
|
|
66
66
|
}
|
|
@@ -115,7 +115,7 @@ declare function invalidationPlugin(config?: InvalidationPluginConfig): _spoosh_
|
|
|
115
115
|
readResult: InvalidationReadResult;
|
|
116
116
|
writeResult: InvalidationWriteResult;
|
|
117
117
|
queueResult: InvalidationQueueResult;
|
|
118
|
-
|
|
118
|
+
api: InvalidationInstanceApi;
|
|
119
119
|
}>;
|
|
120
120
|
|
|
121
121
|
export { type InvalidateOption, type InvalidationMode, type InvalidationPagesOptions, type InvalidationPluginConfig, type InvalidationPluginExports, type InvalidationQueueResult, type InvalidationQueueTriggerOptions, type InvalidationReadOptions, type InvalidationReadResult, type InvalidationWriteOptions, type InvalidationWriteResult, type InvalidationWriteTriggerOptions, invalidationPlugin };
|
package/dist/index.js
CHANGED
|
@@ -72,7 +72,7 @@ function invalidationPlugin(config = {}) {
|
|
|
72
72
|
return (0, import_core.createSpooshPlugin)({
|
|
73
73
|
name: PLUGIN_NAME,
|
|
74
74
|
operations: ["write", "queue"],
|
|
75
|
-
|
|
75
|
+
internal(context) {
|
|
76
76
|
return {
|
|
77
77
|
setDefaultMode(value) {
|
|
78
78
|
context.temp.set(INVALIDATION_DEFAULT_KEY, value);
|
|
@@ -100,7 +100,7 @@ function invalidationPlugin(config = {}) {
|
|
|
100
100
|
}
|
|
101
101
|
}
|
|
102
102
|
},
|
|
103
|
-
|
|
103
|
+
api(context) {
|
|
104
104
|
const { stateManager, eventEmitter } = context;
|
|
105
105
|
const et = context.eventTracer?.(PLUGIN_NAME);
|
|
106
106
|
const invalidate = (input) => {
|
package/dist/index.mjs
CHANGED
|
@@ -49,7 +49,7 @@ function invalidationPlugin(config = {}) {
|
|
|
49
49
|
return createSpooshPlugin({
|
|
50
50
|
name: PLUGIN_NAME,
|
|
51
51
|
operations: ["write", "queue"],
|
|
52
|
-
|
|
52
|
+
internal(context) {
|
|
53
53
|
return {
|
|
54
54
|
setDefaultMode(value) {
|
|
55
55
|
context.temp.set(INVALIDATION_DEFAULT_KEY, value);
|
|
@@ -77,7 +77,7 @@ function invalidationPlugin(config = {}) {
|
|
|
77
77
|
}
|
|
78
78
|
}
|
|
79
79
|
},
|
|
80
|
-
|
|
80
|
+
api(context) {
|
|
81
81
|
const { stateManager, eventEmitter } = context;
|
|
82
82
|
const et = context.eventTracer?.(PLUGIN_NAME);
|
|
83
83
|
const invalidate = (input) => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@spoosh/plugin-invalidation",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.10.0",
|
|
4
4
|
"description": "Cache invalidation plugin for Spoosh - auto-invalidates after mutations",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -33,10 +33,10 @@
|
|
|
33
33
|
}
|
|
34
34
|
},
|
|
35
35
|
"peerDependencies": {
|
|
36
|
-
"@spoosh/core": ">=0.
|
|
36
|
+
"@spoosh/core": ">=0.17.0"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
|
-
"@spoosh/core": "0.
|
|
39
|
+
"@spoosh/core": "0.17.0",
|
|
40
40
|
"@spoosh/test-utils": "0.3.0"
|
|
41
41
|
},
|
|
42
42
|
"scripts": {
|
|
@@ -44,6 +44,6 @@
|
|
|
44
44
|
"build": "tsup",
|
|
45
45
|
"typecheck": "tsc --noEmit",
|
|
46
46
|
"lint": "eslint src --max-warnings 0",
|
|
47
|
-
"format": "prettier --write 'src/**/*.ts'"
|
|
47
|
+
"format": "prettier --write 'src/**/*.ts' '*.md'"
|
|
48
48
|
}
|
|
49
49
|
}
|