Currently its not possible to use `header-generator` `HeaderGenerator` class inside Cloudflare workers as we get a the following error: ``` Error generating random headers with lib: ReferenceError: __dirname is not defined ``` I would be nice to use this library inside Cloudflare workers (or other runtimes that don't have all of NodeJs's FS APIs). Looking at the code there are two places which are causing this issue; 1. Loading JSON files which could be resolved by adding `resolveJsonModule` to `tsconfig.json`. https://github.com/apify/fingerprint-suite/blob/master/packages/header-generator/src/header-generator.ts#L215 2. Which is a tricky problem, is with passing in a string path to BayesianNetwork that uses another library called adm-zip, maybe this code can be made optional so it can work in Cloudflare workers?? https://github.com/apify/fingerprint-suite/blob/master/packages/header-generator/src/header-generator.ts#L236
Currently its not possible to use
header-generatorHeaderGeneratorclass inside Cloudflare workers as we get a the following error:I would be nice to use this library inside Cloudflare workers (or other runtimes that don't have all of NodeJs's FS APIs).
Looking at the code there are two places which are causing this issue;
resolveJsonModuletotsconfig.json.https://github.com/apify/fingerprint-suite/blob/master/packages/header-generator/src/header-generator.ts#L215
https://github.com/apify/fingerprint-suite/blob/master/packages/header-generator/src/header-generator.ts#L236