@reactionary/fake 0.11.2 → 0.12.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.
|
@@ -1,14 +1,19 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
2
|
+
AnalyticsProvider
|
|
3
3
|
} from "@reactionary/core";
|
|
4
|
-
class FakeAnalyticsCapability extends
|
|
4
|
+
class FakeAnalyticsCapability extends AnalyticsProvider {
|
|
5
|
+
types = ["*"];
|
|
6
|
+
purpose = "necessary";
|
|
5
7
|
config;
|
|
6
8
|
constructor(config, cache, context) {
|
|
7
9
|
super(cache, context);
|
|
8
10
|
this.config = config;
|
|
9
11
|
}
|
|
10
|
-
|
|
11
|
-
return
|
|
12
|
+
getResourceName() {
|
|
13
|
+
return "fake-analytics";
|
|
14
|
+
}
|
|
15
|
+
async handle() {
|
|
16
|
+
return "ignored";
|
|
12
17
|
}
|
|
13
18
|
}
|
|
14
19
|
export {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@reactionary/fake",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.12.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./index.js",
|
|
6
6
|
"types": "./src/index.d.ts",
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"url": "git+https://github.com/Solteq/reactionary.git"
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
|
-
"@reactionary/core": "0.
|
|
12
|
+
"@reactionary/core": "0.12.0",
|
|
13
13
|
"zod": "4.1.9",
|
|
14
14
|
"@faker-js/faker": "^9.8.0"
|
|
15
15
|
},
|
|
@@ -1,8 +1,13 @@
|
|
|
1
|
-
import type
|
|
2
|
-
import { AnalyticsCapability } from '@reactionary/core';
|
|
1
|
+
import { AnalyticsProvider, type AnalyticsEventType, type AnalyticsOutcome, type AnalyticsPurpose, type Cache, type RequestContext } from '@reactionary/core';
|
|
3
2
|
import type { FakeConfiguration } from '../schema/configuration.schema.js';
|
|
4
|
-
|
|
3
|
+
/**
|
|
4
|
+
* Analytics provider for fake-backed clients. It subscribes to everything and ignores it all.
|
|
5
|
+
*/
|
|
6
|
+
export declare class FakeAnalyticsCapability extends AnalyticsProvider {
|
|
7
|
+
readonly types: ReadonlyArray<AnalyticsEventType | `${string}*`>;
|
|
8
|
+
readonly purpose: AnalyticsPurpose;
|
|
5
9
|
protected config: FakeConfiguration;
|
|
6
10
|
constructor(config: FakeConfiguration, cache: Cache, context: RequestContext);
|
|
7
|
-
|
|
11
|
+
protected getResourceName(): string;
|
|
12
|
+
handle(): Promise<AnalyticsOutcome>;
|
|
8
13
|
}
|