Skip to content

Commit

Permalink
Merge pull request #11 from fingerprintjs/fix/example-plugin
Browse files Browse the repository at this point in the history
chore: fix example plugin suffix, name, instructions
  • Loading branch information
Orkuncakilkaya authored Oct 29, 2024
2 parents f8bd0dc + 684dc31 commit 6606640
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 12 deletions.
12 changes: 6 additions & 6 deletions plugins/index.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
// import {fingerprintProcessOpenClientResponseKVStorage} from "./fingerprintKVStorage.example";
// import { saveFingerprintResultToKVStore } from './saveToKVStore'
import { Plugin } from '../src/utils/registerPlugin'

export default [
/*{
name: 'Fingerprint Process Open Client Response with Fastly KV Storage',
callback: fingerprintProcessOpenClientResponseKVStorage,
type: 'processOpenClientResponse',
}*/
// {
// name: 'Save Fingerprint Result to KV Store',
// callback: saveFingerprintResultToKVStore,
// type: 'processOpenClientResponse',
// },
] satisfies Plugin[]
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// To enable this plugin, please replace the suffix from `.example.ts` to `.ts`
// To enable this plugin, add an entry to `/plugins/index.ts`

import { KVStore } from 'fastly:kv-store'
import { ProcessOpenClientResponseContext } from '../src/utils/registerPlugin'
export async function fingerprintProcessOpenClientResponseKVStorage(context: ProcessOpenClientResponseContext) {
export async function saveFingerprintResultToKVStore(context: ProcessOpenClientResponseContext) {
const requestId = context.event?.products.identification?.data?.requestId
if (!requestId) {
return
Expand Down
5 changes: 1 addition & 4 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,7 @@
"./plugins/**/*.ts",
"./test/**/*.ts",
],
"exclude": [
"node_modules",
"./plugins/**/*.example.ts"
],
"exclude": ["node_modules"],
"ts-node": {
"experimentalSpecifierResolution": "node",
"compilerOptions": {
Expand Down

0 comments on commit 6606640

Please sign in to comment.