@onlineapps/service-wrapper 2.3.5 → 2.3.7

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@onlineapps/service-wrapper",
3
- "version": "2.3.5",
3
+ "version": "2.3.7",
4
4
  "description": "Thin orchestration layer for microservices - delegates all infrastructure concerns to specialized connectors",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
@@ -1407,10 +1407,7 @@ class ServiceWrapper {
1407
1407
  logger: this.logger
1408
1408
  });
1409
1409
 
1410
- const timeout = this.config.wrapper?.timeout;
1411
- if (!timeout || typeof timeout !== 'number') {
1412
- throw new Error('[ServiceWrapper] config.wrapper.timeout is required — Expected number (ms)');
1413
- }
1410
+ const timeout = this.config.wrapper?.timeout || 30000;
1414
1411
 
1415
1412
  this.orchestrator = OrchestratorConnector.create({
1416
1413
  mqClient: this.mqClient,
@@ -1981,12 +1978,15 @@ class ServiceWrapper {
1981
1978
  const serviceVersion = this.config.service?.version;
1982
1979
  const serviceUrl = this.config.service?.url;
1983
1980
 
1981
+ // Validation runs in FÁZE 0.2 (before monitoring init in FÁZE 0.5+).
1982
+ // console is the correct bootstrap logger at this stage.
1983
+ const validationLogger = this.logger || console;
1984
1984
  const orchestrator = this._injectedValidationOrchestrator || new ValidationOrchestrator({
1985
1985
  serviceRoot: this.serviceRoot,
1986
1986
  serviceName,
1987
1987
  serviceVersion,
1988
1988
  serviceUrl,
1989
- logger: this.logger
1989
+ logger: validationLogger
1990
1990
  });
1991
1991
 
1992
1992
  const result = await orchestrator.validate();
@@ -2227,12 +2227,13 @@ class ServiceWrapper {
2227
2227
 
2228
2228
  this.logger?.info('[ServiceWrapper] Checking validation proof...');
2229
2229
 
2230
+ const revalidationLogger = this.logger || console;
2230
2231
  const orchestrator = this._injectedValidationOrchestrator || new ValidationOrchestrator({
2231
2232
  serviceRoot: this.serviceRoot,
2232
2233
  serviceName,
2233
2234
  serviceVersion,
2234
2235
  serviceUrl,
2235
- logger: this.logger
2236
+ logger: revalidationLogger
2236
2237
  });
2237
2238
 
2238
2239
  // Startup retry loop with fast backoff