@defra/lis-hubs-infra-core 0.34.0 → 0.34.1

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@defra/lis-hubs-infra-core",
3
- "version": "0.34.0",
3
+ "version": "0.34.1",
4
4
  "description": "Shared hub mechanics for livestock platform.",
5
5
  "main": "src/index.js",
6
6
  "repository": {
@@ -42,11 +42,11 @@
42
42
  },
43
43
  "devDependencies": {
44
44
  "@defra/lis-hubs-infra-registry": "^0.13.6",
45
- "@defra/lis-infra-eslint-config": "^0.12.4",
45
+ "@defra/lis-infra-eslint-config": "^0.12.7",
46
46
  "@types/node": "^26.6.6",
47
47
  "@vitest/coverage-istanbul": "^5.1.0",
48
48
  "audit-ci": "^7.1.0",
49
- "eslint": "^9.0.0",
49
+ "eslint": "^10.14.0",
50
50
  "husky": "^9.1.7",
51
51
  "prettier": "^3.9.10",
52
52
  "vitest": "^5.1.0"
@@ -1,3 +1,4 @@
1
+ /* eslint-disable new-cap -- logger.constructor is the class under test, reached via the instance */
1
2
  import { describe, expect, test, vi } from 'vitest'
2
3
 
3
4
  import { logger } from './index.js'
@@ -72,7 +72,6 @@ describe('LogContextStore', () => {
72
72
  const testHashSecret = 'test-fixture-hash-secret'
73
73
  const store = new LogContextStore({ logger: { warn: vi.fn() } })
74
74
  store.hashSecret = testHashSecret
75
- // eslint-disable-next-line sonarjs/hardcoded-secret-signatures -- test fixture, not a real secret
76
75
  const expectedHash = createHmac('sha256', testHashSecret)
77
76
  .update('user@example.com')
78
77
  .digest('hex')
@@ -1,3 +1,5 @@
1
+ /** @import { Server } from '@hapi/hapi' */
2
+
1
3
  import { ContextStore } from './context-store.js'
2
4
  import { logger } from './logging/index.js'
3
5
  const contextStore = new ContextStore()
@@ -5,6 +7,10 @@ const contextStore = new ContextStore()
5
7
  export const plugin = {
6
8
  name: 'requestContext',
7
9
  version: '1.0.0',
10
+ /**
11
+ * Registers the request context onRequest hook.
12
+ * @param {Server} server - the Hapi server the plugin is registered on
13
+ */
8
14
  register(server) {
9
15
  server.ext('onRequest', onRequest)
10
16
  }