@onlineapps/service-wrapper 2.0.19 → 2.0.21
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 +1 -1
- package/src/ServiceWrapper.js +13 -4
package/package.json
CHANGED
package/src/ServiceWrapper.js
CHANGED
|
@@ -684,14 +684,23 @@ class ServiceWrapper {
|
|
|
684
684
|
throw new Error('Monitoring must be initialized before validation');
|
|
685
685
|
}
|
|
686
686
|
|
|
687
|
-
const { name: serviceName, version: serviceVersion } = this.config.service;
|
|
687
|
+
const { name: serviceName, version: serviceVersion, port: servicePort } = this.config.service;
|
|
688
688
|
|
|
689
|
-
|
|
689
|
+
// Validate service port is configured
|
|
690
|
+
if (!servicePort) {
|
|
691
|
+
throw new Error('Service port is required for validation (config.service.port)');
|
|
692
|
+
}
|
|
693
|
+
|
|
694
|
+
// Build service URL for validation (HTTP calls to running server)
|
|
695
|
+
const serviceUrl = `http://localhost:${servicePort}`;
|
|
696
|
+
|
|
697
|
+
console.log('[ServiceWrapper] Checking validation proof...');
|
|
690
698
|
|
|
691
699
|
const orchestrator = new ValidationOrchestrator({
|
|
692
700
|
serviceRoot: this.serviceRoot,
|
|
693
701
|
serviceName,
|
|
694
702
|
serviceVersion,
|
|
703
|
+
serviceUrl,
|
|
695
704
|
logger: this.logger
|
|
696
705
|
});
|
|
697
706
|
|
|
@@ -702,9 +711,9 @@ class ServiceWrapper {
|
|
|
702
711
|
}
|
|
703
712
|
|
|
704
713
|
if (result.skipped) {
|
|
705
|
-
|
|
714
|
+
console.log('[ServiceWrapper] ✓ Using existing validation proof');
|
|
706
715
|
} else {
|
|
707
|
-
|
|
716
|
+
console.log('[ServiceWrapper] ✓ Validation completed successfully');
|
|
708
717
|
}
|
|
709
718
|
|
|
710
719
|
// Store proof for registration
|