account-lookup-service 17.13.0-snapshot.9 → 17.14.0-snapshot.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/CHANGELOG.md +12 -0
- package/CLAUDE.md +100 -0
- package/config/default.json +1 -1
- package/docker-compose.yml +1 -1
- package/package.json +8 -9
- package/{sbom-v17.12.10.csv → sbom-v17.13.0.csv} +148 -157
- package/src/domain/parties/putParties.js +1 -1
- package/src/domain/parties/services/BasePartiesService.js +1 -1
- package/src/domain/parties/services/GetPartiesService.js +3 -3
- package/src/domain/parties/services/PutPartiesErrorService.js +8 -7
- package/src/domain/parties/services/PutPartiesService.js +2 -2
- package/src/lib/config.js +2 -1
- package/test/integration/api/parties.test.js +7 -3
- package/test/unit/domain/parties/parties.test.js +5 -5
package/CHANGELOG.md
CHANGED
@@ -2,6 +2,18 @@
|
|
2
2
|
|
3
3
|
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
4
4
|
|
5
|
+
## [17.13.0](https://github.com/mojaloop/account-lookup-service/compare/v17.12.10...v17.13.0) (2025-09-16)
|
6
|
+
|
7
|
+
|
8
|
+
### Features
|
9
|
+
|
10
|
+
* **oss-4203:** added validation of local destination for external source ([#574](https://github.com/mojaloop/account-lookup-service/issues/574)) ([8ca46d6](https://github.com/mojaloop/account-lookup-service/commit/8ca46d6bbacbf30bb4b6dcc739df970e1b46d268))
|
11
|
+
|
12
|
+
|
13
|
+
### Chore
|
14
|
+
|
15
|
+
* **sbom:** update sbom [skip ci] ([f68b088](https://github.com/mojaloop/account-lookup-service/commit/f68b088b9fa01b96682761bfb946048ea24de54f))
|
16
|
+
|
5
17
|
### [17.12.10](https://github.com/mojaloop/account-lookup-service/compare/v17.12.9...v17.12.10) (2025-09-10)
|
6
18
|
|
7
19
|
|
package/CLAUDE.md
ADDED
@@ -0,0 +1,100 @@
|
|
1
|
+
# CLAUDE.md
|
2
|
+
|
3
|
+
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
|
4
|
+
|
5
|
+
## Development Commands
|
6
|
+
|
7
|
+
### Running the Service
|
8
|
+
- `npm start` - Start both API and Admin servers
|
9
|
+
- `npm run start:api` - Start only the API server (port 3000)
|
10
|
+
- `npm run start:admin` - Start only the Admin server (port 3001)
|
11
|
+
- `npm run start:handlers` - Start message handlers with timeout
|
12
|
+
- `npm run dev` - Start in development mode with nodemon
|
13
|
+
|
14
|
+
### Testing
|
15
|
+
- `npm test` or `npm run test:unit` - Run unit tests with Jest
|
16
|
+
- `npm run test:coverage-check` - Run tests with coverage validation (90% threshold)
|
17
|
+
- `npm run test:int` - Run integration tests (requires database)
|
18
|
+
- `npm run test:integration` - Full integration test suite with Docker containers
|
19
|
+
- `npm run test:functional` - Run functional tests
|
20
|
+
|
21
|
+
### Database Operations
|
22
|
+
- `npm run migrate` - Run database migrations and seed data (requires database connection)
|
23
|
+
- `npm run migrate:latest` - Run latest migrations
|
24
|
+
- `npm run migrate:rollback` - Rollback last migration
|
25
|
+
- `npm run seed:run` - Run database seeds
|
26
|
+
|
27
|
+
### Code Quality
|
28
|
+
- `npm run lint` - Run StandardJS linting
|
29
|
+
- `npm run lint:fix` - Auto-fix linting issues
|
30
|
+
- `npm run audit:check` - Check for security vulnerabilities
|
31
|
+
- `npm run dep:check` - Check for dependency updates
|
32
|
+
|
33
|
+
### Docker Development
|
34
|
+
- `npm run dc:up` - Start all services with Docker Compose
|
35
|
+
- `npm run dc:down` - Stop and remove containers
|
36
|
+
- `npm run wait-4-docker` - Wait for Docker services to be ready
|
37
|
+
|
38
|
+
## Architecture Overview
|
39
|
+
|
40
|
+
### Service Structure
|
41
|
+
This is a **Mojaloop Account Lookup Service** built with **Hapi.js** and **MySQL**. The service provides two main servers:
|
42
|
+
|
43
|
+
- **API Server** (`src/server.js:initializeApi`) - Handles party lookup requests and participant queries
|
44
|
+
- **Admin Server** (`src/server.js:initializeAdmin`) - Provides administrative endpoints and health checks
|
45
|
+
- **Message Handlers** (`src/handlers/`) - Processes asynchronous messages for timeout handling
|
46
|
+
|
47
|
+
### Key Components
|
48
|
+
|
49
|
+
#### Domain Layer (`src/domain/`)
|
50
|
+
- **parties/** - Core party lookup logic and validation
|
51
|
+
- **participants/** - Participant management operations
|
52
|
+
- **oracle/** - Oracle endpoint resolution
|
53
|
+
- **timeout/** - Message timeout handling
|
54
|
+
|
55
|
+
#### API Layer (`src/api/`)
|
56
|
+
- Uses **OpenAPI 3.0** specifications for endpoint definitions
|
57
|
+
- Swagger files: `src/interface/api-swagger.yaml` and `src/interface/admin-swagger.yaml`
|
58
|
+
- Route handlers split between API and Admin functionality
|
59
|
+
|
60
|
+
#### Data Access (`src/models/`)
|
61
|
+
- **Knex.js** for database operations and migrations
|
62
|
+
- MySQL database with connection pooling
|
63
|
+
- Cached oracle endpoints for performance
|
64
|
+
|
65
|
+
#### Caching Strategy
|
66
|
+
The service uses multiple cache layers:
|
67
|
+
- **ParticipantEndpointCache** - Caches participant endpoints from central ledger
|
68
|
+
- **ParticipantCache** - Caches participant information
|
69
|
+
- **OracleEndpointCache** - Caches oracle endpoint mappings
|
70
|
+
- **ProxyCache** - For inter-scheme proxy operations (Redis/Memory)
|
71
|
+
|
72
|
+
### Configuration
|
73
|
+
- Main config: `src/lib/config/default.json`
|
74
|
+
- Environment-specific configs in `config/` directory
|
75
|
+
- Database config: `config/knexfile.js`
|
76
|
+
- Docker: `docker-compose.yml` for full service stack
|
77
|
+
|
78
|
+
### Testing Strategy
|
79
|
+
- **Unit Tests**: Jest with 90% coverage requirement (`jest.config.js`)
|
80
|
+
- **Integration Tests**: Docker-based with real database (`jest-int.config.js`)
|
81
|
+
- **Functional Tests**: End-to-end API testing
|
82
|
+
- Test setup: `test/unit/setup.js`
|
83
|
+
|
84
|
+
### Key Dependencies
|
85
|
+
- **@hapi/hapi** - Web framework
|
86
|
+
- **@mojaloop/central-services-*** - Mojaloop shared libraries for logging, metrics, caching
|
87
|
+
- **knex** + **mysql2** - Database ORM and driver
|
88
|
+
- **joi** - Request/response validation
|
89
|
+
- **commander** - CLI interface
|
90
|
+
|
91
|
+
### Database Schema
|
92
|
+
Uses Knex migrations in `migrations/` directory. Key tables include participant and oracle endpoint mappings. Always run `npm run migrate` before development.
|
93
|
+
|
94
|
+
## Development Notes
|
95
|
+
|
96
|
+
- Use `standard` for code formatting (no semicolons, 2-space indentation)
|
97
|
+
- All database operations should go through the domain layer
|
98
|
+
- OpenAPI specs are the source of truth for API contracts
|
99
|
+
- Integration tests require Docker and can be run in "wait" mode for debugging
|
100
|
+
- The service supports ISO20022 message formats alongside FSPIOP
|
package/config/default.json
CHANGED
package/docker-compose.yml
CHANGED
@@ -4,7 +4,7 @@ networks:
|
|
4
4
|
|
5
5
|
# @see https://uninterrupted.tech/blog/hassle-free-redis-cluster-deployment-using-docker/
|
6
6
|
x-redis-node: &REDIS_NODE
|
7
|
-
image: docker.io/
|
7
|
+
image: docker.io/bitnamilegacy/redis-cluster:6.2.14
|
8
8
|
environment: &REDIS_ENVS
|
9
9
|
ALLOW_EMPTY_PASSWORD: yes
|
10
10
|
REDIS_CLUSTER_DYNAMIC_IPS: no
|
package/package.json
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"name": "account-lookup-service",
|
3
3
|
"description": "Account Lookup Service is used to validate Party and Participant lookups.",
|
4
|
-
"version": "17.
|
4
|
+
"version": "17.14.0-snapshot.1",
|
5
5
|
"license": "Apache-2.0",
|
6
6
|
"author": "ModusBox",
|
7
7
|
"contributors": [
|
@@ -91,17 +91,17 @@
|
|
91
91
|
"@hapi/hapi": "21.4.3",
|
92
92
|
"@hapi/inert": "7.1.0",
|
93
93
|
"@hapi/vision": "7.0.3",
|
94
|
-
"@mojaloop/central-services-error-handling": "13.1.2
|
94
|
+
"@mojaloop/central-services-error-handling": "13.1.2",
|
95
95
|
"@mojaloop/central-services-health": "15.1.0",
|
96
|
-
"@mojaloop/central-services-logger": "11.
|
96
|
+
"@mojaloop/central-services-logger": "11.10.0",
|
97
97
|
"@mojaloop/central-services-metrics": "12.7.1",
|
98
|
-
"@mojaloop/central-services-shared": "18.33.
|
98
|
+
"@mojaloop/central-services-shared": "18.33.3",
|
99
99
|
"@mojaloop/central-services-stream": "11.8.7",
|
100
100
|
"@mojaloop/database-lib": "^11.3.2",
|
101
101
|
"@mojaloop/event-sdk": "14.7.0",
|
102
|
-
"@mojaloop/inter-scheme-proxy-cache-lib": "2.
|
102
|
+
"@mojaloop/inter-scheme-proxy-cache-lib": "2.7.0-snapshot.2",
|
103
103
|
"@mojaloop/ml-schema-transformer-lib": "2.7.8",
|
104
|
-
"@mojaloop/sdk-standard-components": "19.
|
104
|
+
"@mojaloop/sdk-standard-components": "19.17.0",
|
105
105
|
"@now-ims/hapi-now-auth": "2.1.0",
|
106
106
|
"ajv": "8.17.1",
|
107
107
|
"ajv-keywords": "5.1.0",
|
@@ -113,7 +113,7 @@
|
|
113
113
|
"knex": "3.1.0",
|
114
114
|
"mustache": "4.2.0",
|
115
115
|
"mysql": "2.18.1",
|
116
|
-
"mysql2": "^3.
|
116
|
+
"mysql2": "^3.15.0",
|
117
117
|
"npm-run-all": "4.1.5",
|
118
118
|
"parse-strings-in-object": "2.0.0",
|
119
119
|
"rc": "1.2.8"
|
@@ -124,7 +124,6 @@
|
|
124
124
|
"postcss": {
|
125
125
|
"nanoid": "^3.3.8"
|
126
126
|
},
|
127
|
-
"@mojaloop/central-services-error-handling": "13.1.2-snapshot.0",
|
128
127
|
"@mojaloop/central-services-health": {
|
129
128
|
"@mojaloop/central-services-logger": ">=11.4.0"
|
130
129
|
},
|
@@ -176,7 +175,7 @@
|
|
176
175
|
"jest-junit": "16.0.0",
|
177
176
|
"jsdoc": "4.0.4",
|
178
177
|
"nodemon": "3.1.10",
|
179
|
-
"npm-check-updates": "18.
|
178
|
+
"npm-check-updates": "18.3.0",
|
180
179
|
"nyc": "17.1.0",
|
181
180
|
"pre-commit": "1.2.2",
|
182
181
|
"proxyquire": "2.1.3",
|