@velocitycareerlabs/tests-helpers 1.21.0-dev-build.1e7fcf81b → 1.21.0-dev-build.188d2b179
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.env.test +1 -0
- package/package.json +9 -9
- package/src/build-fastify.js +6 -0
package/.env.test
CHANGED
@@ -41,3 +41,4 @@ DEFAULT_WALLET_DESKTOP="did:test:desktop-1#service-id-1"
|
|
41
41
|
DEFAULT_CA_WALLET_CONFIG='{"did:test:mobile-1#service-id-1":{"wallet":"walletTest","did":"did:ion:123","serviceId":"#holder-app-1","serviceEndpoint":"https://test.io/"},"playStoreUrl":"https://play.google.com/store/apps/details?id=io.velocitycareerlabs.holderapp&referrer=utm_source%3DAON01042024","appleAppStoreUrl":"https://apps.apple.com/app/apple-store/id1587589679?pt=121713908&ct=AON01042024&mt=8","appleAppId":"1587589679"}'
|
42
42
|
SMS_APP_VERIFICATION_HASH="0x0a0a0a0a"
|
43
43
|
AUTOCLEAN_FINALIZED_OFFER_PII=true
|
44
|
+
CAO_DID=did:ion:cao
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@velocitycareerlabs/tests-helpers",
|
3
|
-
"version": "1.21.0-dev-build.
|
3
|
+
"version": "1.21.0-dev-build.188d2b179",
|
4
4
|
"description": "Generic helpers for tests",
|
5
5
|
"repository": "https://github.com/velocitycareerlabs/packages",
|
6
6
|
"main": "index.js",
|
@@ -21,13 +21,13 @@
|
|
21
21
|
"@fastify/swagger-ui": "~3.1.0",
|
22
22
|
"@spencejs/spence-events": "^0.10.2",
|
23
23
|
"@spencejs/spence-mongo-repos": "^0.10.2",
|
24
|
-
"@velocitycareerlabs/common-functions": "1.21.0-dev-build.
|
25
|
-
"@velocitycareerlabs/common-schemas": "1.21.0-dev-build.
|
26
|
-
"@velocitycareerlabs/crypto": "1.21.0-dev-build.
|
27
|
-
"@velocitycareerlabs/fastify-plugins": "1.21.0-dev-build.
|
28
|
-
"@velocitycareerlabs/jwt": "1.21.0-dev-build.
|
29
|
-
"@velocitycareerlabs/logger": "1.21.0-dev-build.
|
30
|
-
"@velocitycareerlabs/rest-queries": "1.21.0-dev-build.
|
24
|
+
"@velocitycareerlabs/common-functions": "1.21.0-dev-build.188d2b179",
|
25
|
+
"@velocitycareerlabs/common-schemas": "1.21.0-dev-build.188d2b179",
|
26
|
+
"@velocitycareerlabs/crypto": "1.21.0-dev-build.188d2b179",
|
27
|
+
"@velocitycareerlabs/fastify-plugins": "1.21.0-dev-build.188d2b179",
|
28
|
+
"@velocitycareerlabs/jwt": "1.21.0-dev-build.188d2b179",
|
29
|
+
"@velocitycareerlabs/logger": "1.21.0-dev-build.188d2b179",
|
30
|
+
"@velocitycareerlabs/rest-queries": "1.21.0-dev-build.188d2b179",
|
31
31
|
"ajv-formats": "3.0.1",
|
32
32
|
"dotenv": "^16.0.0",
|
33
33
|
"env-var": "^7.0.0",
|
@@ -54,5 +54,5 @@
|
|
54
54
|
"nanoid": "~3.3.1",
|
55
55
|
"prettier": "2.8.8"
|
56
56
|
},
|
57
|
-
"gitHead": "
|
57
|
+
"gitHead": "3fb4fe03b2981ef895977316277fa3b2493985df"
|
58
58
|
}
|
package/src/build-fastify.js
CHANGED
@@ -154,6 +154,12 @@ const buildFastify = (
|
|
154
154
|
.addHook('onRequest', async (req) => {
|
155
155
|
req.config = server.overrides.reqConfig(server.config);
|
156
156
|
})
|
157
|
+
.addHook('preParsing', async (req) => {
|
158
|
+
req.traceId = req.headers['x-trace-id'] || `!${req.id}`;
|
159
|
+
req.log = req.log.child({
|
160
|
+
traceId: req.traceId,
|
161
|
+
});
|
162
|
+
})
|
157
163
|
.register(errorsPlugin)
|
158
164
|
.decorateRequest('repos', null)
|
159
165
|
.addHook('preValidation', async (req) => {
|