@onlineapps/service-wrapper 3.4.0 → 3.4.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 CHANGED
@@ -2,6 +2,24 @@
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.1] — 2026-08-17
6
+
7
+ **Patch: drop stale port/url/specificationEndpoint guards left over from A2.2.**
8
+
9
+ 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").
10
+
11
+ Removed:
12
+ - Port + URL guard in `_ensureValidationProof` (before Tier-1 validation runs).
13
+ - Port + URL guard in `_initializeRegistry` (before Registry registration).
14
+ - specificationEndpoint guard in `_initializeRegistry`.
15
+
16
+ Behaviour changes:
17
+ - `serviceInfo.url` sent to Registry is now the empty string (was: required non-empty).
18
+ - `specificationEndpoint` sent to RegistryClient is `''` when absent (was: throw).
19
+ - 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.
20
+
21
+ 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.
22
+
5
23
  ## [3.4.0] — 2026-08-17
6
24
 
7
25
  **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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@onlineapps/service-wrapper",
3
- "version": "3.4.0",
3
+ "version": "3.4.1",
4
4
  "description": "Thin orchestration layer for microservices - delegates all infrastructure concerns to specialized connectors",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
@@ -1234,15 +1234,11 @@ class ServiceWrapper {
1234
1234
  throw new Error('[ServiceWrapper] Missing configuration - service.name is required');
1235
1235
  }
1236
1236
 
1237
- const servicePort = this.config.service?.port;
1238
- if (!servicePort) {
1239
- throw new Error('[ServiceWrapper] Missing configuration - service.port is required');
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
- // FAIL-FAST: specificationEndpoint MUST be in config, no fallbacks
1257
- const specificationEndpoint = this.config.service?.specificationEndpoint;
1258
- if (!specificationEndpoint) {
1259
- throw new Error(
1260
- `[ServiceWrapper] Missing required configuration - service.specificationEndpoint is required. ` +
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,11 @@ class ServiceWrapper {
2621
2614
  throw new Error('Service version is required for validation');
2622
2615
  }
2623
2616
 
2624
- const { name: serviceName, version: serviceVersion, port: servicePort } = this.config.service;
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
- const serviceUrl = this.config.service?.url;
2631
- if (!serviceUrl) {
2632
- throw new Error('[ServiceWrapper] Missing configuration - config.service.url is required for validation (set SERVICE_URL in conn-config/config.json placeholder)');
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.
2634
2622
 
2635
2623
  // Phase 5: Check restart-aware failure tracking
2636
2624
  const failureData = this._readValidationFailureFile();