Skip to content

Improve fingerprint-generator path resolution for fingerprint-network-definition.zip #519

@chrbala

Description

@chrbala

Describe the feature
Right now, the system requires a specific path to fingerprint-network-definition.zip.

It would be great if there could have a more ergonomic way of being provided. Options:

Provide via env variable

One simple option could be to update the line to:

path: process.env.FINGERPRINT_NETWORK_DEFINITION_PATH || `${__dirname}/data_files/fingerprint-network-definition.zip`

Thread through the system

The path could also be threaded through the system, from the constructor up through newInjectedPage in fingerprint-injector.

Inline the data

Finally, the artifact could be inlined into a built artifact. This would be the easiest for consumers, but could make other environments more complex, and may be slower than loading as a separate file.

Motivation
I am trying to use the fingerprint-generator package in an environment which bundles its JS files, which munges the paths and doesn't include the fingerprint-network-definition.zip file by default.

Constraints
Inline the zip file into the bundle and/or allow specification of the zip file path (requiring the user to copy the file into the right place).

The system should also log where it checked for the zip file if it's unable to find the file.

Metadata

Metadata

Assignees

No one assigned

    Labels

    t-toolingIssues with this label are in the ownership of the tooling team.

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions