Skip to content

Commit 439d454

Browse files
authored
Merge pull request #27 from fingerprintjs/rc
Release v0.3.0-rc.1
2 parents 6936a91 + d0630aa commit 439d454

20 files changed

+530
-252
lines changed

.releaserc.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
[
3131
"@semantic-release/exec",
3232
{
33-
"prepareCmd":"pnpm build"
33+
"prepareCmd":"pnpm artifact:create"
3434
}
3535
],
3636
[

CHANGELOG.md

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,74 @@
1+
## [0.3.0-rc.7](https://github.com/fingerprintjs/fingerprint-pro-fastly-compute-proxy-integration/compare/v0.3.0-rc.6...v0.3.0-rc.7) (2024-12-03)
2+
3+
4+
### Features
5+
6+
* add links to the status page ([bed4323](https://github.com/fingerprintjs/fingerprint-pro-fastly-compute-proxy-integration/commit/bed4323b666ff30cc2451eda6dfb27d139fa1421))
7+
* restructure status page ([b8ead8f](https://github.com/fingerprintjs/fingerprint-pro-fastly-compute-proxy-integration/commit/b8ead8f28f10384ff9bff0484bae0cd6cdfe2563))
8+
* status page shows save_to_kvstore_plugin value ([4eb3aaa](https://github.com/fingerprintjs/fingerprint-pro-fastly-compute-proxy-integration/commit/4eb3aaae7fd0fb39119456830f06219f4a585c98))
9+
10+
11+
### Bug Fixes
12+
13+
* status page wording ([468fd54](https://github.com/fingerprintjs/fingerprint-pro-fastly-compute-proxy-integration/commit/468fd54f1e786c1d2177e827e526059eda9b9b37))
14+
* undefined message for status page ([ef643f4](https://github.com/fingerprintjs/fingerprint-pro-fastly-compute-proxy-integration/commit/ef643f429427f452424a427a53a849e227dcc12e))
15+
16+
## [0.3.0-rc.6](https://github.com/fingerprintjs/fingerprint-pro-fastly-compute-proxy-integration/compare/v0.3.0-rc.5...v0.3.0-rc.6) (2024-11-29)
17+
18+
19+
### Bug Fixes
20+
21+
* more clear error message ([74a1a34](https://github.com/fingerprintjs/fingerprint-pro-fastly-compute-proxy-integration/commit/74a1a347f8d3ae423b74eed9007d54150a927635))
22+
23+
## [0.3.0-rc.5](https://github.com/fingerprintjs/fingerprint-pro-fastly-compute-proxy-integration/compare/v0.3.0-rc.4...v0.3.0-rc.5) (2024-11-28)
24+
25+
26+
### Features
27+
28+
* add backend checks to status page ([62260ae](https://github.com/fingerprintjs/fingerprint-pro-fastly-compute-proxy-integration/commit/62260aeb5f5fa7c10aabb7729cf4d09f5c55f087))
29+
* improve status page ([d1733b5](https://github.com/fingerprintjs/fingerprint-pro-fastly-compute-proxy-integration/commit/d1733b5768f8c1eaf95f041c2c92ff24b019c36b))
30+
31+
32+
### Bug Fixes
33+
34+
* build command missing metadata ([3d77697](https://github.com/fingerprintjs/fingerprint-pro-fastly-compute-proxy-integration/commit/3d776976c72b3490b90aff4729f56170fbe2f9a7))
35+
* github ci not running prebuild ([9957582](https://github.com/fingerprintjs/fingerprint-pro-fastly-compute-proxy-integration/commit/9957582dc9ec64781ea718b3946fa9c7e34ccb9b))
36+
* show status page correct store name for kv storage ([5df22d3](https://github.com/fingerprintjs/fingerprint-pro-fastly-compute-proxy-integration/commit/5df22d368c5a7f38b46ffbc7e71a65d8d0d6cb08))
37+
38+
## [0.3.0-rc.4](https://github.com/fingerprintjs/fingerprint-pro-fastly-compute-proxy-integration/compare/v0.3.0-rc.3...v0.3.0-rc.4) (2024-11-26)
39+
40+
41+
### Bug Fixes
42+
43+
* when open client response is enabled, non utf body throws an error ([d88dc2b](https://github.com/fingerprintjs/fingerprint-pro-fastly-compute-proxy-integration/commit/d88dc2bb6ee36df4a3098ef390c3afd1ed151c2b))
44+
45+
## [0.3.0-rc.3](https://github.com/fingerprintjs/fingerprint-pro-fastly-compute-proxy-integration/compare/v0.3.0-rc.2...v0.3.0-rc.3) (2024-11-25)
46+
47+
48+
### Bug Fixes
49+
50+
* create artifact via metadata ([ba22a53](https://github.com/fingerprintjs/fingerprint-pro-fastly-compute-proxy-integration/commit/ba22a538130c75d22aa119aeb403390ca35f9426))
51+
52+
## [0.3.0-rc.2](https://github.com/fingerprintjs/fingerprint-pro-fastly-compute-proxy-integration/compare/v0.3.0-rc.1...v0.3.0-rc.2) (2024-11-22)
53+
54+
55+
### Bug Fixes
56+
57+
* update fastly cli version to fix metadata bug ([95b2d60](https://github.com/fingerprintjs/fingerprint-pro-fastly-compute-proxy-integration/commit/95b2d60ad5bbe5c85a4c7075827cc69ad775122e))
58+
59+
## [0.3.0-rc.1](https://github.com/fingerprintjs/fingerprint-pro-fastly-compute-proxy-integration/compare/v0.2.1...v0.3.0-rc.1) (2024-11-21)
60+
61+
62+
### Features
63+
64+
* add fastly compute service version to status page ([b7cd7b1](https://github.com/fingerprintjs/fingerprint-pro-fastly-compute-proxy-integration/commit/b7cd7b15dfd60708452f0ccef8d138387655ddbb))
65+
66+
67+
### Bug Fixes
68+
69+
* add cors headers for error response ([0c9a721](https://github.com/fingerprintjs/fingerprint-pro-fastly-compute-proxy-integration/commit/0c9a721e4be67676505b09f14e36fb482d6f91d5))
70+
* enable metadata on pack step ([565affd](https://github.com/fingerprintjs/fingerprint-pro-fastly-compute-proxy-integration/commit/565affd396c42b5ee7bb2a332a33b5a2dd0331c5))
71+
172
## [0.2.1](https://github.com/fingerprintjs/fingerprint-pro-fastly-compute-proxy-integration/compare/v0.2.0...v0.2.1) (2024-11-14)
273

374

README.md

Lines changed: 1 addition & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ This is a quick overview of the installation setup. For detailed step-by-step in
4242
| ---------------------------- | ------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
4343
| AGENT_SCRIPT_DOWNLOAD_PATH | z5kms2 | Random path segment for downloading the JavaScript agent. |
4444
| GET_RESULT_PATH | nocmjw | Random path segment for Fingerprint identification requests. |
45-
| OPEN_CLIENT_RESPONSE_PLUGINS_ENABLED | false | Set to `true` if you have [Open client response](https://dev.fingerprint.com/docs/open-client-response) enabled for your Fingerprint application. Defaults to `false`. |
45+
| OPEN_CLIENT_RESPONSE_PLUGINS_ENABLED | false | Set to `true` if you have [Open client response](https://dev.fingerprint.com/docs/open-client-response) enabled for your Fingerprint workspace. Defaults to `false`. |
4646

4747
4. [Create a Secret store](https://docs.fastly.com/en/guides/working-with-secret-stores#creating-a-secret-store) named `Fingerprint_Compute_Secret_Store_<SERVICE_ID>`, where the suffix is your proxy integration's [Compute Service ID](https://docs.fastly.com/en/guides/about-services). Add your proxy secret:
4848

@@ -71,25 +71,6 @@ This is a quick overview of the installation setup. For detailed step-by-step in
7171

7272
See the [Fastly Compute proxy integration guide](https://dev.fingerprint.com/docs/fastly-compute-proxy-integration#step-4-configure-the-fingerprint-client-agent-to-use-your-service) in our documentation for more details.
7373

74-
### Using custom store names
75-
76-
By default, the service package provided in releases assumes the following names for the Config store and Secret Store:
77-
78-
* `Fingerprint_Compute_Config_Store_<SERVICE_ID>`
79-
* `Fingerprint_Compute_Secret_Store_<SERVICE_ID>`
80-
81-
To use a custom name prefix for both stores, use the `STORE_NAME_PREFIX` environment variable to build a custom service package:
82-
83-
```shell=
84-
STORE_NAME_PREFIX=CustomName pnpm run build
85-
```
86-
87-
Your custom built package in `pkg/fingerprint-fastly-compute-proxy-integration.tar.gz` will use your custom prefix in store names like:
88-
89-
* `CustomName_Config_Store_<SERVICE_ID>`
90-
* `CustomName_Secret_Store_<SERVICE_ID>`
91-
92-
9374
## Feedback and support
9475

9576
Please reach out to our [Customer Success team](https://fingerprint.com/support/) if run into any issues with the integration.

contributing.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,25 @@ For proposing changes, use the standard [pull request approach](https://docs.git
2222
2. Run `pnpm build` to compile the project and assemble the WebAssembly output.
2323
3. The build artifact is located in the `bin/main.wasm` file, which will be deployed to Fastly.
2424

25+
### Using custom store names
26+
27+
By default, the service package provided in releases assumes the following names for the Config store and Secret Store:
28+
29+
* `Fingerprint_Compute_Config_Store_<SERVICE_ID>`
30+
* `Fingerprint_Compute_Secret_Store_<SERVICE_ID>`
31+
32+
To use a custom name prefix for both(Secret and Config) stores, use the `STORE_NAME_PREFIX` environment variable to build a custom service package:
33+
34+
```shell=
35+
STORE_NAME_PREFIX=CustomName fastly compute build
36+
```
37+
38+
Your custom built package in `pkg/fingerprint-fastly-compute-proxy-integration.tar.gz` will use your custom prefix in store names like:
39+
40+
* `CustomName_Config_Store_<SERVICE_ID>`
41+
* `CustomName_Secret_Store_<SERVICE_ID>`
42+
43+
2544
### Code Style
2645

2746
We enforce code quality using [ESLint](https://eslint.org/) and [Prettier](https://prettier.io/). To check code style:

fastly.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# This file describes a Fastly Compute package. To learn more visit:
2-
# https://developer.fastly.com/reference/fastly-toml/
2+
# https://www.fastly.com/documentation/reference/compute/fastly-toml/
33

44
authors = ["support@fingerprint.com"]
55
cloned_from = "https://github.com/fingerprintjs/fingerprint-pro-fastly-compute-proxy-integration"

package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
{
22
"name": "fingerprint-pro-fastly-compute-proxy-integration",
3-
"version": "0.2.1",
3+
"version": "0.3.0-rc.7",
44
"engines": {
55
"node": ">=20"
66
},
77
"devDependencies": {
88
"@babel/core": "^7.25.2",
99
"@babel/preset-env": "^7.25.4",
1010
"@babel/preset-typescript": "^7.24.7",
11-
"@fastly/cli": "^10.15.0",
11+
"@fastly/cli": "^10.17.0",
1212
"@fingerprintjs/commit-lint-dx-team": "^0.1.0",
1313
"@fingerprintjs/conventional-changelog-dx-team": "^0.1.0",
1414
"@fingerprintjs/eslint-config-dx-team": "^0.1.0",
@@ -39,10 +39,10 @@
3939
"cookie": "0.7.0"
4040
},
4141
"scripts": {
42-
"prebuild": "ts-node build.ts",
4342
"assemble": "js-compute-runtime build/index.js bin/main.wasm",
4443
"pack": "fastly compute pack --wasm-binary=./bin/main.wasm && mv pkg/package.tar.gz pkg/fingerprint-fastly-compute-proxy-integration.tar.gz",
45-
"build": "pnpm run prebuild && pnpm run assemble && pnpm run pack",
44+
"build": "ts-node build.ts && fastly compute metadata --enable && pnpm run assemble && pnpm run pack",
45+
"artifact:create": "fastly compute build",
4646
"deploy": "fastly compute publish",
4747
"dev": "fastly compute serve",
4848
"prepare": "husky",

plugins/saveToKVStore.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,20 @@ import { KVStore } from 'fastly:kv-store'
44
import { ProcessOpenClientResponseContext } from '../src/utils/registerPlugin'
55
import { getConfigStore } from '../src/utils/getStore'
66
import { env } from 'fastly:env'
7+
import { saveToKvStorePluginEnabledVarName } from '../src/env'
8+
79
export async function saveFingerprintResultToKVStore(context: ProcessOpenClientResponseContext) {
810
const configStore = getConfigStore()
9-
const isPluginEnabled = configStore?.get('SAVE_TO_KV_STORE_PLUGIN_ENABLED') === 'true'
11+
const isPluginEnabled = configStore?.get(saveToKvStorePluginEnabledVarName) === 'true'
1012

1113
if (!isPluginEnabled) {
12-
console.log("Plugin 'saveFingerprintResultToKVStore' is not enabled")
14+
console.log(`Plugin '${saveToKvStorePluginEnabledVarName}' is not enabled`)
1315
return
1416
}
1517

1618
const requestId = context.event?.products.identification?.data?.requestId
1719
if (!requestId) {
18-
console.log('[saveFingerprintResultToKVStore] Plugin Error: request ID is undefined in the event response.')
20+
console.log(`[${saveToKvStorePluginEnabledVarName}] Plugin Error: request ID is undefined in the event response.`)
1921
return
2022
}
2123
const serviceId = env('FASTLY_SERVICE_ID')

0 commit comments

Comments
 (0)