We prefer using pnpm for installing dependencies and running scripts.
For proposing changes, use the standard pull request approach. It's recommended to discuss fixes or new functionality in the Issues, first.
- You cannot push directly into the
main
anddevelop
branches. - Releases are created from the
main
branch. If you have the Azure Integration set up, it is running code from themain
branch. Pull requests into themain
branch are not accepted. - The
develop
branch functions as a candidate for the next release. Create your pull requests into this branch. The code indevelop
must always pass the tests.
-
After cloning the repository, run
pnpm install
to install dependencies. -
Run
pnpm build
to build the project into thedist
folder. The createddist/fingerprintjs-pro-azure-function/fingerprintjs-pro-azure-function.js
anddist/fingerprintjs-pro-azure-function-management/fingerprintjs-pro-azure-function-management.js
are meant to be deployed to Azure Functions.
-
Install the Azure CLI and sign in to Azure account according to the Sign in with Azure CLI guide.
-
Install the Azure Functions Core Tools.
-
Build the project.
-
Go to the
dist
directory and runfunc azure functionapp publish <AppFunctionName>
where
<AppFunctionName>
is a Azure Function App name in the Azure account.
You can invoke the function from your local environment using the start command in Azure Functions Core Tools.
- Run
pnpm start
to run and debug the function locally via Azure Functions Core Tools. - You can run
pnpm emulate-storage
to locally emulate your Azure Storage account using Azurite.
Consistent code formatting is enforced by ESLint and Prettier. To check your code, run:
pnpm lint
You don't need to do this manually, CI runs the check automatically. To fix all auto-fixable issues at once, run:
pnpm lint:fix
You are required to follow conventional commits rules.
The integration is automatically released on every push to the main branch if there are relevant changes. The workflow must be approved by one of the maintainers, first.