Skip to content

Commit 6606640

Browse files
Merge pull request #11 from fingerprintjs/fix/example-plugin
chore: fix example plugin suffix, name, instructions
2 parents f8bd0dc + 684dc31 commit 6606640

File tree

3 files changed

+9
-12
lines changed

3 files changed

+9
-12
lines changed

plugins/index.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
// import {fingerprintProcessOpenClientResponseKVStorage} from "./fingerprintKVStorage.example";
1+
// import { saveFingerprintResultToKVStore } from './saveToKVStore'
22
import { Plugin } from '../src/utils/registerPlugin'
33

44
export default [
5-
/*{
6-
name: 'Fingerprint Process Open Client Response with Fastly KV Storage',
7-
callback: fingerprintProcessOpenClientResponseKVStorage,
8-
type: 'processOpenClientResponse',
9-
}*/
5+
// {
6+
// name: 'Save Fingerprint Result to KV Store',
7+
// callback: saveFingerprintResultToKVStore,
8+
// type: 'processOpenClientResponse',
9+
// },
1010
] satisfies Plugin[]

plugins/fingerprintKVStorage.example.ts renamed to plugins/saveToKVStore.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
// To enable this plugin, please replace the suffix from `.example.ts` to `.ts`
1+
// To enable this plugin, add an entry to `/plugins/index.ts`
22

33
import { KVStore } from 'fastly:kv-store'
44
import { ProcessOpenClientResponseContext } from '../src/utils/registerPlugin'
5-
export async function fingerprintProcessOpenClientResponseKVStorage(context: ProcessOpenClientResponseContext) {
5+
export async function saveFingerprintResultToKVStore(context: ProcessOpenClientResponseContext) {
66
const requestId = context.event?.products.identification?.data?.requestId
77
if (!requestId) {
88
return

tsconfig.json

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,7 @@
1818
"./plugins/**/*.ts",
1919
"./test/**/*.ts",
2020
],
21-
"exclude": [
22-
"node_modules",
23-
"./plugins/**/*.example.ts"
24-
],
21+
"exclude": ["node_modules"],
2522
"ts-node": {
2623
"experimentalSpecifierResolution": "node",
2724
"compilerOptions": {

0 commit comments

Comments
 (0)