diff --git a/plugins/index.ts b/plugins/index.ts index c780059..2c7c5ce 100644 --- a/plugins/index.ts +++ b/plugins/index.ts @@ -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[] diff --git a/plugins/fingerprintKVStorage.example.ts b/plugins/saveToKVStore.ts similarity index 64% rename from plugins/fingerprintKVStorage.example.ts rename to plugins/saveToKVStore.ts index 4788b0a..e0c4d03 100644 --- a/plugins/fingerprintKVStorage.example.ts +++ b/plugins/saveToKVStore.ts @@ -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 diff --git a/tsconfig.json b/tsconfig.json index 6a0476b..911ec5e 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -18,10 +18,7 @@ "./plugins/**/*.ts", "./test/**/*.ts", ], - "exclude": [ - "node_modules", - "./plugins/**/*.example.ts" - ], + "exclude": ["node_modules"], "ts-node": { "experimentalSpecifierResolution": "node", "compilerOptions": {