@onlineapps/conn-orch-registry 1.1.8 → 1.1.10

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/conn-orch-registry",
3
- "version": "1.1.8",
3
+ "version": "1.1.10",
4
4
  "license": "MIT",
5
5
  "description": "Connector-registry-client provides the core communication mechanism for microservices in this environment. It enables them to interact with a services_registry to receive and fulfill tasks by submitting heartbeats or their API descriptions.",
6
6
  "keywords": [
@@ -39,6 +39,7 @@
39
39
  },
40
40
  "dependencies": {
41
41
  "@onlineapps/conn-base-storage": "^1.0.0",
42
+ "@onlineapps/conn-orch-registry": "^1.1.8",
42
43
  "amqplib": "^0.10.3",
43
44
  "axios": "^1.5.0",
44
45
  "dotenv": "^16.1.4",
@@ -101,14 +101,23 @@ class ServiceRegistryClient extends EventEmitter {
101
101
  * @returns {Promise<void>}
102
102
  */
103
103
  async _loadValidationProof() {
104
+ console.log(`[RegistryClient] ${this.serviceName}: >>> ENTERING _loadValidationProof() <<<`);
105
+
104
106
  const proofPath = path.join(process.cwd(), '.validation-proof.json');
105
107
  const debugLogPath = path.join(process.cwd(), '.validation-debug.log');
106
108
 
109
+ console.log(`[RegistryClient] ${this.serviceName}: CWD = ${process.cwd()}`);
110
+ console.log(`[RegistryClient] ${this.serviceName}: Proof path = ${proofPath}`);
111
+
107
112
  // Write to file for debugging (append mode)
108
113
  const log = (msg) => {
109
114
  const timestamp = new Date().toISOString();
110
115
  const logLine = `${timestamp} [${this.serviceName}] ${msg}\n`;
111
- fs.appendFileSync(debugLogPath, logLine);
116
+ try {
117
+ fs.appendFileSync(debugLogPath, logLine);
118
+ } catch (err) {
119
+ console.error(`[RegistryClient] Failed to write debug log: ${err.message}`);
120
+ }
112
121
  console.log(`[RegistryClient] ${msg}`);
113
122
  };
114
123
 
@@ -233,6 +242,10 @@ class ServiceRegistryClient extends EventEmitter {
233
242
  * @returns {Promise<Object>} Registration result with success status
234
243
  */
235
244
  async register(serviceInfo = {}) {
245
+ // DEBUG: Check validation proof status
246
+ console.log(`[RegistryClient] ${this.serviceName}: >>> REGISTER CALLED <<<`);
247
+ console.log(`[RegistryClient] ${this.serviceName}: this.validationProof =`, this.validationProof);
248
+
236
249
  // Validate input
237
250
  if (serviceInfo.endpoints && !Array.isArray(serviceInfo.endpoints)) {
238
251
  throw new Error('endpoints must be an array');