ci: docker_tag=ext - Update for dev4 deployment
All checks were successful
build-and-push-ext / build_push (push) Successful in 13s

This commit is contained in:
dev4 2025-09-19 17:03:57 +00:00
parent 9d7c11a2b7
commit 2eceab024d
4 changed files with 62 additions and 10 deletions

View File

@ -61,6 +61,16 @@ DECLINED='4000 0025 0000 3155'
ENABLE_SUBSCRIPTION_STUB=true
CORS_ALLOWED_ORIGINS=http://local.4nkweb.com:3000,https://dev4.4nkweb.com
core_url="http://bitcoin:38332"
ws_url="0.0.0.0:8090"
wallet_name="default"
network="signet"
blindbit_url="http://blindbit:8000"
zmq_url="tcp://bitcoin:29000"
storage="https://dev4.4nkweb.com/storage"
data_dir="/home/bitcoin/.4nk"
bitcoin_data_dir="/home/bitcoin/.bitcoin"
# ================================= /!\ sensible ========================
# Configuration IDNOT

42
docs/ANALYSE.md Normal file
View File

@ -0,0 +1,42 @@
## Analyse détaillée
### Périmètre
Backend minimal Express TypeScript, endpoints tests et scripts utilitaires.
### Stack
- **Runtime**: Node.js (TS → JS via `tsc`)
- **Framework**: Express 4, CORS, dotenv
- **DB**: `pg` (PostgreSQL)
- **Paiement**: Stripe SDK
- **Messaging**: Mailchimp transactional
### Build et exécution
- Scripts: `build`, `start`, `dev` (ts-node), `watch`, scénarios `test:*` spécifiques.
- Dépendance locale: `sdk-signer-client` (path `../sdk-signer-client`).
- Docker: clone/compile `sdk-signer-client` via SSH, build app, prune deps dev, exécution `npm start`.
### Variables denvironnement
- À documenter dans `.env` (non listées ici). Recommandé dajouter `.env.example`.
### Ports
- 8080 (exposé par Compose parent).
### Risques et points dattention
- Dépendance relative `../sdk-signer-client` fragile hors CI; Docker règle via clone SSH mais nécessite agent/clé.
- Node 19alpine dans le builder: préférer LTS.
- Tests utilitaires JS isolés; aligner avec `tests/` et ajouter assertions/rapports.
### Actions proposées
- Externaliser `sdk-signer-client` en dépendance Git contrôlée (tag/commit) ou package binaire local packagé.
- Standardiser Node LTS et CI (lint, tests, build, audit sécurité).
- Fournir `.env.example` et documenter variables requises.

View File

@ -113,28 +113,28 @@ export class IdNotController {
Logger.info('IdNot using rattachements API with sub', { sub: payload.sub });
const rattachementsJson = await IdNotService.getUserRattachements(payload.sub);
const results: any[] = Array.isArray(rattachementsJson?.result) ? rattachementsJson.result : [];
if (results.length === 0) {
throw new ForbiddenError('User not attached to an office');
}
// Get the first rattachement
const rattachement = results[0];
// Fetch entite and personne data separately if not present
let entiteData = rattachement.entite;
let personneData = rattachement.personne;
if (!entiteData && rattachement.entiteUrl) {
Logger.info('IdNot fetching entite data', { entiteUrl: rattachement.entiteUrl });
entiteData = await IdNotService.getEntiteData(rattachement.entiteUrl);
}
if (!personneData && rattachement.personneUrl) {
Logger.info('IdNot fetching personne data', { personneUrl: rattachement.personneUrl });
personneData = await IdNotService.getPersonneData(rattachement.personneUrl);
}
const userData = {
...rattachement,
entite: entiteData,

View File

@ -244,7 +244,7 @@ export class IdNotService {
const url = `${IDNOT_ANNUARY_BASE_URL}${entiteUrl}?${searchParams}`;
const response = await fetch(url, { method: 'GET' });
if (!response.ok) {
const text = await response.text().catch(() => '');
Logger.error('IdNot getEntiteData failed', {
@ -255,7 +255,7 @@ export class IdNotService {
});
throw new Error(`Failed to fetch entite data: ${response.status} ${response.statusText}`);
}
return response.json();
}
@ -272,7 +272,7 @@ export class IdNotService {
const url = `${IDNOT_ANNUARY_BASE_URL}${personneUrl}?${searchParams}`;
const response = await fetch(url, { method: 'GET' });
if (!response.ok) {
const text = await response.text().catch(() => '');
Logger.error('IdNot getPersonneData failed', {
@ -283,7 +283,7 @@ export class IdNotService {
});
throw new Error(`Failed to fetch personne data: ${response.status} ${response.statusText}`);
}
return response.json();
}