@bsv/overlay-express 2.2.0 → 2.3.0

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/mod.ts CHANGED
@@ -11,3 +11,16 @@ export {
11
11
  export { BanService, type BannedRecord } from './src/BanService.js'
12
12
  export { BanAwareLookupWrapper } from './src/BanAwareLookupWrapper.js'
13
13
  export { JanitorService, type JanitorConfig, type JanitorReport, type HostHealthResult } from './src/JanitorService.js'
14
+ export {
15
+ OverlayMonitor,
16
+ analyzeOverlayLookupResponse,
17
+ type OverlayLookupOutputSummary,
18
+ type OverlayLookupProbe,
19
+ type OverlayLookupProbeResult,
20
+ type OverlayMonitorConfig,
21
+ type OverlayMonitorLogger,
22
+ type OverlayMonitorReport,
23
+ type OverlayMonitorTarget,
24
+ type OverlayMonitorThresholds,
25
+ type OverlayMonitorWarning
26
+ } from './src/OverlayMonitor.js'
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bsv/overlay-express",
3
- "version": "2.2.0",
3
+ "version": "2.3.0",
4
4
  "type": "module",
5
5
  "description": "BSV Blockchain Overlay Express",
6
6
  "main": "dist/cjs/mod.js",
@@ -25,21 +25,10 @@
25
25
  "require": "./dist/cjs/src/*.js"
26
26
  }
27
27
  },
28
- "scripts": {
29
- "test": "jest",
30
- "test:watch": "jest --watch",
31
- "test:coverage": "jest --coverage",
32
- "lint": "ts-standard --fix src/**/*.ts",
33
- "lint:ci": "ts-standard src/**/*.ts",
34
- "build": "tsc -b && tsconfig-to-dual-package tsconfig.cjs.json",
35
- "dev": "tsc -b -w",
36
- "prepublish": "npm run build",
37
- "doc": "ts2md --inputFilename=mod.ts --outputFilename=API.md --filenameSubstring=API --firstHeadingLevel=1",
38
- "demo": "rm -r dist && npm run build && npx tsx demo-ui.ts"
39
- },
40
28
  "repository": {
41
29
  "type": "git",
42
- "url": "git+https://github.com/bsv-blockchain/overlay-express.git"
30
+ "url": "git+https://github.com/bsv-blockchain/ts-stack.git",
31
+ "directory": "packages/overlays/overlay-express"
43
32
  },
44
33
  "keywords": [
45
34
  "BSV",
@@ -51,30 +40,45 @@
51
40
  "author": "BSV Association",
52
41
  "license": "SEE LICENSE IN LICENSE.txt",
53
42
  "bugs": {
54
- "url": "https://github.com/bsv-blockchain/overlay-express/issues"
43
+ "url": "https://github.com/bsv-blockchain/ts-stack/issues"
55
44
  },
56
- "homepage": "https://github.com/bsv-blockchain/overlay-express#readme",
45
+ "homepage": "https://github.com/bsv-blockchain/ts-stack/tree/main/packages/overlays/overlay-express#readme",
57
46
  "devDependencies": {
47
+ "@jest/globals": "^30.4.1",
48
+ "@types/body-parser": "^1.19.5",
58
49
  "@types/express": "^5.0.0",
59
- "@types/jest": "^29.5.12",
60
- "jest": "^29.7.0",
61
- "ts-jest": "^29.1.1",
50
+ "@types/jest": "^30.0.0",
51
+ "@types/node": "^25.9.1",
52
+ "jest": "^30.4.2",
53
+ "ts-jest": "^29.4.11",
62
54
  "ts-standard": "^12.0.2",
63
55
  "ts2md": "^0.2.0",
64
56
  "tsconfig-to-dual-package": "^1.2.0",
65
- "typescript": "^5.2.2"
57
+ "typescript": "^6.0.3"
66
58
  },
67
59
  "dependencies": {
68
- "@bsv/auth-express-middleware": "^2.0.2",
69
- "@bsv/overlay": "^2.0.2",
70
- "@bsv/overlay-discovery-services": "^2.0.2",
71
- "@bsv/sdk": "^2.0.4",
72
- "@bsv/wallet-toolbox-client": "^2.0.20",
60
+ "@bsv/auth-express-middleware": "^2.0.6",
61
+ "@bsv/overlay": "^2.0.3",
62
+ "@bsv/overlay-discovery-services": "^2.0.3",
63
+ "@bsv/sdk": "^2.1.3",
64
+ "@bsv/wallet-toolbox-client": "^2.1.28",
73
65
  "body-parser": "^2.2.2",
74
66
  "chalk": "^5.6.2",
75
67
  "express": "^5.2.1",
76
- "knex": "^3.1.0",
68
+ "knex": "^3.2.10",
77
69
  "mongodb": "^7.1.0",
78
- "uuid": "^13.0.0"
70
+ "uuid": "^14.0.0"
71
+ },
72
+ "scripts": {
73
+ "test": "jest",
74
+ "test:watch": "jest --watch",
75
+ "test:coverage": "jest --coverage",
76
+ "lint": "ts-standard --fix src/**/*.ts",
77
+ "lint:ci": "ts-standard src/**/*.ts",
78
+ "build": "tsc -b && tsconfig-to-dual-package tsconfig.cjs.json",
79
+ "dev": "tsc -b -w",
80
+ "prepublish": "npm run build",
81
+ "doc": "ts2md --inputFilename=mod.ts --outputFilename=API.md --filenameSubstring=API --firstHeadingLevel=1",
82
+ "demo": "rm -r dist && npm run build && npx tsx demo-ui.ts"
79
83
  }
80
- }
84
+ }
package/src/BanService.ts CHANGED
@@ -40,7 +40,7 @@ export class BanService {
40
40
  */
41
41
  private sanitize (value: unknown): string {
42
42
  if (typeof value !== 'string') {
43
- throw new Error('Invalid input: expected a string value')
43
+ throw new TypeError('Invalid input: expected a string value')
44
44
  }
45
45
  return value
46
46
  }
@@ -99,7 +99,7 @@ export class BanService {
99
99
  $set: {
100
100
  type: 'outpoint',
101
101
  value,
102
- domain: domain !== undefined ? this.sanitize(domain) : undefined,
102
+ domain: domain != null ? this.sanitize(domain) : undefined,
103
103
  reason: reason ?? 'Manually banned',
104
104
  bannedAt: new Date(),
105
105
  bannedBy