@onlineapps/service-wrapper 3.4.0 → 3.4.2
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 +26 -0
- package/package.json +1 -1
- package/src/ServiceWrapper.js +17 -26
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,32 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this package. Follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/) format and semantic versioning within the internal-monorepo convention (all biz-service consumers ship matching changes in the same session).
|
|
4
4
|
|
|
5
|
+
## [3.4.2] — 2026-08-17
|
|
6
|
+
|
|
7
|
+
**Hot-fix: dangling `serviceUrl` reference at line 2649** left by 3.4.1's guard-removal pass. `_ensureValidationProof` still passed `serviceUrl` to `ValidationOrchestrator` after the `const serviceUrl = ...` declaration was deleted. Result: every biz that force-recreated to 3.4.1 hit `Phase 0.2 Tier 1 Validation - FAILED: serviceUrl is not defined` and stalled.
|
|
8
|
+
|
|
9
|
+
Fix: reintroduce `const serviceUrl = this.config.service?.url || ''` — kept as local so downstream still gets the value (empty string when config omits URL; used only for telemetry/log annotation by ValidationOrchestrator).
|
|
10
|
+
|
|
11
|
+
Verified: property/meta/converter recreated post-3.4.2 pass Phase 0.2.
|
|
12
|
+
|
|
13
|
+
## [3.4.1] — 2026-08-17
|
|
14
|
+
|
|
15
|
+
**Patch: drop stale port/url/specificationEndpoint guards left over from A2.2.**
|
|
16
|
+
|
|
17
|
+
Under 3.4.0 the wrapper still refused to start when `config.service.port`, `config.service.url`, or `config.service.specificationEndpoint` were absent — legacy checks from `_ensureValidationProof` and `_initializeRegistry` that predated ADR 0005 and were not removed together with the Express init in A2.2. Live rollout hit the failure on first biz restart (biz-property Phase 0.2: "Service port is required for validation").
|
|
18
|
+
|
|
19
|
+
Removed:
|
|
20
|
+
- Port + URL guard in `_ensureValidationProof` (before Tier-1 validation runs).
|
|
21
|
+
- Port + URL guard in `_initializeRegistry` (before Registry registration).
|
|
22
|
+
- specificationEndpoint guard in `_initializeRegistry`.
|
|
23
|
+
|
|
24
|
+
Behaviour changes:
|
|
25
|
+
- `serviceInfo.url` sent to Registry is now the empty string (was: required non-empty).
|
|
26
|
+
- `specificationEndpoint` sent to RegistryClient is `''` when absent (was: throw).
|
|
27
|
+
- Consumers: none — Registry stores the ops spec directly from the register payload; the URL and endpoint fields have had no live reader since 3.4.0 A2.
|
|
28
|
+
|
|
29
|
+
Fully compatible with 3.4.0 tests (98/98 GREEN) and with 3.4.0 biz configs that still declare `port`/`url`/`specificationEndpoint` in `config/service/config.json` — they're just no longer required.
|
|
30
|
+
|
|
5
31
|
## [3.4.0] — 2026-08-17
|
|
6
32
|
|
|
7
33
|
**Zero-HTTP shape for biz services** (ADR 0005 landed). See `api/docs/biz/80-decisions/0005-no-http-in-biz-containers.md`.
|
package/package.json
CHANGED
package/src/ServiceWrapper.js
CHANGED
|
@@ -1234,15 +1234,11 @@ class ServiceWrapper {
|
|
|
1234
1234
|
throw new Error('[ServiceWrapper] Missing configuration - service.name is required');
|
|
1235
1235
|
}
|
|
1236
1236
|
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
const serviceUrl = this.config.service?.url;
|
|
1243
|
-
if (!serviceUrl) {
|
|
1244
|
-
throw new Error('[ServiceWrapper] Missing configuration - service.url is required');
|
|
1245
|
-
}
|
|
1237
|
+
// ADR 0005: biz has no HTTP — no port, no URL. Kept in serviceInfo
|
|
1238
|
+
// payload as empty string for Registry-side backward compat with
|
|
1239
|
+
// pre-3.4.1 consumers that may still expect the field.
|
|
1240
|
+
const servicePort = null;
|
|
1241
|
+
const serviceUrl = '';
|
|
1246
1242
|
|
|
1247
1243
|
const mqUrl = this.config.wrapper?.mq?.url;
|
|
1248
1244
|
if (!mqUrl) {
|
|
@@ -1253,14 +1249,11 @@ class ServiceWrapper {
|
|
|
1253
1249
|
// FÁZE 0.5 a 0.6: Vytvoření front a spuštění konzumerů se provádí v registryClient.init()
|
|
1254
1250
|
// FÁZE 0.7: Registrace u Registry
|
|
1255
1251
|
|
|
1256
|
-
//
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
`Fix: Add "specificationEndpoint": "/api/v1/specification" to conn-config/config.json under "service" section.`
|
|
1262
|
-
);
|
|
1263
|
-
}
|
|
1252
|
+
// ADR 0005: no HTTP surface → specificationEndpoint has no consumer.
|
|
1253
|
+
// Registry receives full operations spec in the register payload
|
|
1254
|
+
// itself. Field kept optional for pre-3.4.1 config files that may
|
|
1255
|
+
// still declare it; ignored if absent.
|
|
1256
|
+
const specificationEndpoint = this.config.service?.specificationEndpoint || '';
|
|
1264
1257
|
|
|
1265
1258
|
// Logger may not be initialized yet at this point - RegistryClient handles null gracefully
|
|
1266
1259
|
this.registryClient = new RegistryConnector.ServiceRegistryClient({
|
|
@@ -2621,16 +2614,14 @@ class ServiceWrapper {
|
|
|
2621
2614
|
throw new Error('Service version is required for validation');
|
|
2622
2615
|
}
|
|
2623
2616
|
|
|
2624
|
-
const { name: serviceName, version: serviceVersion
|
|
2625
|
-
|
|
2626
|
-
if (!servicePort) {
|
|
2627
|
-
throw new Error('Service port is required for validation (config.service.port)');
|
|
2628
|
-
}
|
|
2617
|
+
const { name: serviceName, version: serviceVersion } = this.config.service;
|
|
2629
2618
|
|
|
2630
|
-
|
|
2631
|
-
|
|
2632
|
-
|
|
2633
|
-
|
|
2619
|
+
// ADR 0005: biz services have no HTTP surface — no port to bind, no
|
|
2620
|
+
// URL to advertise. Prior versions of this method required both;
|
|
2621
|
+
// dropped in 3.4.1 because they had no consumer post-A2. Kept as a
|
|
2622
|
+
// local var so downstream ValidationOrchestrator can still receive it
|
|
2623
|
+
// (accepts empty string; only used for telemetry / log annotation).
|
|
2624
|
+
const serviceUrl = this.config.service?.url || '';
|
|
2634
2625
|
|
|
2635
2626
|
// Phase 5: Check restart-aware failure tracking
|
|
2636
2627
|
const failureData = this._readValidationFailureFile();
|