@onlineapps/service-wrapper 2.1.90 → 2.1.92
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 +19 -2
- package/src/config.js +3 -0
- package/src/defaults.js +3 -0
package/package.json
CHANGED
package/src/ServiceWrapper.js
CHANGED
|
@@ -828,14 +828,31 @@ class ServiceWrapper {
|
|
|
828
828
|
// FÁZE 0.5 a 0.6: Vytvoření front a spuštění konzumerů se provádí v registryClient.init()
|
|
829
829
|
// FÁZE 0.7: Registrace u Registry
|
|
830
830
|
|
|
831
|
+
// FAIL-FAST: specificationEndpoint is REQUIRED - no fallbacks
|
|
832
|
+
const specificationEndpoint = this.config.service?.specificationEndpoint;
|
|
833
|
+
if (!specificationEndpoint) {
|
|
834
|
+
throw new Error(
|
|
835
|
+
`[ServiceWrapper] Missing required configuration - service.specificationEndpoint is required. ` +
|
|
836
|
+
`Fix: Add "specificationEndpoint": "/api/v1/specification" to conn-config/config.json under "service" section.`
|
|
837
|
+
);
|
|
838
|
+
}
|
|
839
|
+
|
|
840
|
+
// FAIL-FAST: logger must be provided
|
|
841
|
+
if (!this.logger) {
|
|
842
|
+
throw new Error(
|
|
843
|
+
`[ServiceWrapper] Missing required dependency - logger is not initialized. ` +
|
|
844
|
+
`This is an internal error - logger should be set before registry initialization.`
|
|
845
|
+
);
|
|
846
|
+
}
|
|
847
|
+
|
|
831
848
|
this.registryClient = new RegistryConnector.ServiceRegistryClient({
|
|
832
849
|
amqpUrl: mqUrl,
|
|
833
850
|
serviceName: serviceName,
|
|
834
851
|
version: this.config.service?.version,
|
|
835
|
-
specificationEndpoint:
|
|
852
|
+
specificationEndpoint: specificationEndpoint,
|
|
836
853
|
registryQueue: 'registry.register', // Use correct queue name
|
|
837
854
|
registryUrl: registryUrl,
|
|
838
|
-
logger: this.logger
|
|
855
|
+
logger: this.logger,
|
|
839
856
|
validationProof: this.validationProof // Inject validation proof
|
|
840
857
|
});
|
|
841
858
|
|
package/src/config.js
CHANGED