@avaprotocol/sdk-js 2.3.16 → 2.3.17

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/dist/index.js CHANGED
@@ -18225,48 +18225,34 @@ var Workflow = class _Workflow {
18225
18225
  }
18226
18226
  toRequest() {
18227
18227
  const request = new avs_pb19.CreateTaskReq();
18228
- console.log("\u{1F50D} Workflow.toRequest() - Starting serialization...");
18229
- console.log("\u{1F4CA} Input data:");
18230
- console.log(" - nodes count:", this.nodes?.length || 0);
18231
- console.log(" - edges count:", this.edges?.length || 0);
18232
18228
  request.setSmartWalletAddress(this.smartWalletAddress);
18233
18229
  request.setTrigger(this.trigger.toRequest());
18234
18230
  try {
18235
- let nodeCount = 0;
18236
18231
  import_lodash3.default.map(this.nodes, (node, index) => {
18237
18232
  try {
18238
- console.log(`\u{1F527} Serializing node ${index}: ${node.name} (${node.type})`);
18239
18233
  const nodeRequest = node.toRequest();
18240
18234
  request.addNodes(nodeRequest);
18241
- nodeCount++;
18242
- console.log(`\u2705 Node ${index} serialized successfully`);
18243
18235
  } catch (nodeError) {
18244
18236
  console.error(`\u{1F6A8} Node ${index} (${node.name}) serialization failed:`, nodeError);
18245
18237
  const errorMessage = nodeError instanceof Error ? nodeError.message : String(nodeError);
18246
18238
  throw new Error(`Node serialization failed: ${node.name} - ${errorMessage}`);
18247
18239
  }
18248
18240
  });
18249
- console.log(`\u{1F4CA} Successfully serialized ${nodeCount} nodes`);
18250
18241
  } catch (nodesError) {
18251
18242
  console.error("\u{1F6A8} Nodes serialization failed:", nodesError);
18252
18243
  throw nodesError;
18253
18244
  }
18254
18245
  try {
18255
- let edgeCount = 0;
18256
18246
  import_lodash3.default.map(this.edges, (edge, index) => {
18257
18247
  try {
18258
- console.log(`\u{1F517} Serializing edge ${index}: ${edge.source} -> ${edge.target}`);
18259
18248
  const edgeRequest = edge.toRequest();
18260
18249
  request.addEdges(edgeRequest);
18261
- edgeCount++;
18262
- console.log(`\u2705 Edge ${index} serialized successfully`);
18263
18250
  } catch (edgeError) {
18264
18251
  console.error(`\u{1F6A8} Edge ${index} serialization failed:`, edgeError);
18265
18252
  const errorMessage = edgeError instanceof Error ? edgeError.message : String(edgeError);
18266
18253
  throw new Error(`Edge serialization failed: ${edge.id} - ${errorMessage}`);
18267
18254
  }
18268
18255
  });
18269
- console.log(`\u{1F4CA} Successfully serialized ${edgeCount} edges`);
18270
18256
  } catch (edgesError) {
18271
18257
  console.error("\u{1F6A8} Edges serialization failed:", edgesError);
18272
18258
  throw edgesError;
@@ -18277,11 +18263,7 @@ var Workflow = class _Workflow {
18277
18263
  if (this.name) {
18278
18264
  request.setName(this.name);
18279
18265
  }
18280
- console.log("\u{1F4E4} Final protobuf request summary:");
18281
- console.log(" - nodes in request:", request.getNodesList().length);
18282
- console.log(" - edges in request:", request.getEdgesList().length);
18283
- console.log(" - trigger set:", !!request.getTrigger());
18284
- console.log("\u{1F50D} Workflow.toRequest() - Serialization complete");
18266
+ console.log(`\u{1F4E4} Workflow serialization: ${this.nodes.length} nodes, ${this.edges.length} edges -> protobuf: ${request.getNodesList().length} nodes, ${request.getEdgesList().length} edges`);
18285
18267
  return request;
18286
18268
  }
18287
18269
  /**
package/dist/index.mjs CHANGED
@@ -18212,48 +18212,34 @@ var Workflow = class _Workflow {
18212
18212
  }
18213
18213
  toRequest() {
18214
18214
  const request = new avs_pb19.CreateTaskReq();
18215
- console.log("\u{1F50D} Workflow.toRequest() - Starting serialization...");
18216
- console.log("\u{1F4CA} Input data:");
18217
- console.log(" - nodes count:", this.nodes?.length || 0);
18218
- console.log(" - edges count:", this.edges?.length || 0);
18219
18215
  request.setSmartWalletAddress(this.smartWalletAddress);
18220
18216
  request.setTrigger(this.trigger.toRequest());
18221
18217
  try {
18222
- let nodeCount = 0;
18223
18218
  _3.map(this.nodes, (node, index) => {
18224
18219
  try {
18225
- console.log(`\u{1F527} Serializing node ${index}: ${node.name} (${node.type})`);
18226
18220
  const nodeRequest = node.toRequest();
18227
18221
  request.addNodes(nodeRequest);
18228
- nodeCount++;
18229
- console.log(`\u2705 Node ${index} serialized successfully`);
18230
18222
  } catch (nodeError) {
18231
18223
  console.error(`\u{1F6A8} Node ${index} (${node.name}) serialization failed:`, nodeError);
18232
18224
  const errorMessage = nodeError instanceof Error ? nodeError.message : String(nodeError);
18233
18225
  throw new Error(`Node serialization failed: ${node.name} - ${errorMessage}`);
18234
18226
  }
18235
18227
  });
18236
- console.log(`\u{1F4CA} Successfully serialized ${nodeCount} nodes`);
18237
18228
  } catch (nodesError) {
18238
18229
  console.error("\u{1F6A8} Nodes serialization failed:", nodesError);
18239
18230
  throw nodesError;
18240
18231
  }
18241
18232
  try {
18242
- let edgeCount = 0;
18243
18233
  _3.map(this.edges, (edge, index) => {
18244
18234
  try {
18245
- console.log(`\u{1F517} Serializing edge ${index}: ${edge.source} -> ${edge.target}`);
18246
18235
  const edgeRequest = edge.toRequest();
18247
18236
  request.addEdges(edgeRequest);
18248
- edgeCount++;
18249
- console.log(`\u2705 Edge ${index} serialized successfully`);
18250
18237
  } catch (edgeError) {
18251
18238
  console.error(`\u{1F6A8} Edge ${index} serialization failed:`, edgeError);
18252
18239
  const errorMessage = edgeError instanceof Error ? edgeError.message : String(edgeError);
18253
18240
  throw new Error(`Edge serialization failed: ${edge.id} - ${errorMessage}`);
18254
18241
  }
18255
18242
  });
18256
- console.log(`\u{1F4CA} Successfully serialized ${edgeCount} edges`);
18257
18243
  } catch (edgesError) {
18258
18244
  console.error("\u{1F6A8} Edges serialization failed:", edgesError);
18259
18245
  throw edgesError;
@@ -18264,11 +18250,7 @@ var Workflow = class _Workflow {
18264
18250
  if (this.name) {
18265
18251
  request.setName(this.name);
18266
18252
  }
18267
- console.log("\u{1F4E4} Final protobuf request summary:");
18268
- console.log(" - nodes in request:", request.getNodesList().length);
18269
- console.log(" - edges in request:", request.getEdgesList().length);
18270
- console.log(" - trigger set:", !!request.getTrigger());
18271
- console.log("\u{1F50D} Workflow.toRequest() - Serialization complete");
18253
+ console.log(`\u{1F4E4} Workflow serialization: ${this.nodes.length} nodes, ${this.edges.length} edges -> protobuf: ${request.getNodesList().length} nodes, ${request.getEdgesList().length} edges`);
18272
18254
  return request;
18273
18255
  }
18274
18256
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"workflow.d.ts","sourceRoot":"","sources":["../../src/models/workflow.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,MAAM,uBAAuB,CAAC;AAChD,OAAO,IAAI,MAAM,kBAAkB,CAAC;AACpC,OAAO,IAAI,MAAM,QAAQ,CAAC;AAC1B,OAAO,OAAO,MAAM,qBAAqB,CAAC;AAG1C,eAAO,MAAM,gBAAgB,KAAK,CAAC;AACnC,OAAO,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAGnE,wBAAgB,qBAAqB,CACnC,MAAM,EAAE,MAAM,CAAC,UAAU,GACxB,cAAc,CAUhB;AAED,cAAM,QAAS,YAAW,aAAa;IACrC,kBAAkB,EAAE,MAAM,CAAC;IAC3B,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,EAAE,IAAI,EAAE,CAAC;IACd,KAAK,EAAE,IAAI,EAAE,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,EAAE,MAAM,CAAC;IAGrB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,MAAM,CAAC,EAAE,cAAc,CAAC;IACxB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,cAAc,CAAC,EAAE,MAAM,CAAC;IAExB;;;OAGG;gBACS,KAAK,EAAE,aAAa;IAuBhC;;;;OAIG;IACH,MAAM,CAAC,YAAY,CAAC,GAAG,EAAE,MAAM,CAAC,IAAI,GAAG,QAAQ;IAkC/C;;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G,QAAQ;IAkC/C;;;OAGG;IACH,MAAM,CAAC,gBAAgB,CAAC,GAAG,EAAE,MAAM,CAAC,IAAI,GAAG,QAAQ;IAyBnD,SAAS,IAAI,MAAM,CAAC,aAAa;IAyDjC;;;OAGG;IACH,MAAM,IAAI,aAAa;CAkBxB;AAED,eAAe,QAAQ,CAAC"}
@@ -99,23 +99,15 @@ class Workflow {
99
99
  }
100
100
  toRequest() {
101
101
  const request = new avs_pb.CreateTaskReq();
102
- console.log("🔍 Workflow.toRequest() - Starting serialization...");
103
- console.log("📊 Input data:");
104
- console.log(" - nodes count:", this.nodes?.length || 0);
105
- console.log(" - edges count:", this.edges?.length || 0);
106
102
  // TODO: add client side validation for each field
107
103
  request.setSmartWalletAddress(this.smartWalletAddress);
108
104
  request.setTrigger(this.trigger.toRequest());
109
105
  // Add error handling for node serialization
110
106
  try {
111
- let nodeCount = 0;
112
107
  _.map(this.nodes, (node, index) => {
113
108
  try {
114
- console.log(`🔧 Serializing node ${index}: ${node.name} (${node.type})`);
115
109
  const nodeRequest = node.toRequest();
116
110
  request.addNodes(nodeRequest);
117
- nodeCount++;
118
- console.log(`✅ Node ${index} serialized successfully`);
119
111
  }
120
112
  catch (nodeError) {
121
113
  console.error(`🚨 Node ${index} (${node.name}) serialization failed:`, nodeError);
@@ -123,7 +115,6 @@ class Workflow {
123
115
  throw new Error(`Node serialization failed: ${node.name} - ${errorMessage}`);
124
116
  }
125
117
  });
126
- console.log(`📊 Successfully serialized ${nodeCount} nodes`);
127
118
  }
128
119
  catch (nodesError) {
129
120
  console.error('🚨 Nodes serialization failed:', nodesError);
@@ -131,14 +122,10 @@ class Workflow {
131
122
  }
132
123
  // Add error handling for edge serialization
133
124
  try {
134
- let edgeCount = 0;
135
125
  _.map(this.edges, (edge, index) => {
136
126
  try {
137
- console.log(`🔗 Serializing edge ${index}: ${edge.source} -> ${edge.target}`);
138
127
  const edgeRequest = edge.toRequest();
139
128
  request.addEdges(edgeRequest);
140
- edgeCount++;
141
- console.log(`✅ Edge ${index} serialized successfully`);
142
129
  }
143
130
  catch (edgeError) {
144
131
  console.error(`🚨 Edge ${index} serialization failed:`, edgeError);
@@ -146,7 +133,6 @@ class Workflow {
146
133
  throw new Error(`Edge serialization failed: ${edge.id} - ${errorMessage}`);
147
134
  }
148
135
  });
149
- console.log(`📊 Successfully serialized ${edgeCount} edges`);
150
136
  }
151
137
  catch (edgesError) {
152
138
  console.error('🚨 Edges serialization failed:', edgesError);
@@ -159,11 +145,8 @@ class Workflow {
159
145
  if (this.name) {
160
146
  request.setName(this.name);
161
147
  }
162
- console.log("📤 Final protobuf request summary:");
163
- console.log(" - nodes in request:", request.getNodesList().length);
164
- console.log(" - edges in request:", request.getEdgesList().length);
165
- console.log(" - trigger set:", !!request.getTrigger());
166
- console.log("🔍 Workflow.toRequest() - Serialization complete");
148
+ // Log final summary for debugging (only errors and counts)
149
+ console.log(`📤 Workflow serialization: ${this.nodes.length} nodes, ${this.edges.length} edges -> protobuf: ${request.getNodesList().length} nodes, ${request.getEdgesList().length} edges`);
167
150
  return request;
168
151
  }
169
152
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@avaprotocol/sdk-js",
3
- "version": "2.3.16",
3
+ "version": "2.3.17",
4
4
  "description": "A JavaScript/TypeScript SDK designed to simplify integration with Ava Protocol's AVS",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",