@atom8n/n8n 2.5.3 → 2.5.4

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.
@@ -71,13 +71,13 @@ let CliController = CliController_1 = class CliController {
71
71
  this.logger.info(`[cli] Workflow: "${fileData.name}", Nodes: ${fileData.nodes.length}`);
72
72
  try {
73
73
  const user = await this.ownershipService.getInstanceOwner();
74
- const workflowId = await this.syncWorkflow(fileData, user.id, fileModifiedAt);
75
- const workflow = await this.workflowRepository.findOneBy({ id: workflowId });
74
+ const syncResult = await this.syncWorkflow(fileData, user.id, fileModifiedAt);
75
+ const workflow = await this.workflowRepository.findOneBy({ id: syncResult.id });
76
76
  if (!workflow) {
77
77
  res.status(500).json({ error: 'Failed to sync workflow to database' });
78
78
  return;
79
79
  }
80
- this.logger.info(`[cli] Synced workflow: "${workflow.name}" (ID: ${workflowId})`);
80
+ this.logger.info(`[cli] Synced workflow: "${workflow.name}" (ID: ${syncResult.id})`);
81
81
  const triggerNode = workflow.nodes.find((node) => node.type.toLowerCase().includes('trigger') ||
82
82
  node.type.toLowerCase().includes('webhook') ||
83
83
  node.type === 'n8n-nodes-base.start');
@@ -205,13 +205,17 @@ let CliController = CliController_1 = class CliController {
205
205
  includeData: true,
206
206
  unflattenData: true,
207
207
  });
208
- res.json({
208
+ const responsePayload = {
209
209
  success: isSuccess,
210
210
  executionId,
211
211
  status: runResult.status,
212
212
  executionTime: totalTime,
213
213
  data: fullExecution?.data?.resultData ?? runResult.data.resultData,
214
- });
214
+ };
215
+ if (syncResult.syncedWorkflow) {
216
+ responsePayload.syncedWorkflow = syncResult.syncedWorkflow;
217
+ }
218
+ res.json(responsePayload);
215
219
  }
216
220
  catch (error) {
217
221
  if (timeoutId)
@@ -250,12 +254,22 @@ let CliController = CliController_1 = class CliController {
250
254
  name: fileData.name,
251
255
  updatedAt: new Date(),
252
256
  });
257
+ return { id: existing.id };
253
258
  }
254
259
  else {
255
260
  this.logger.info(`[cli] Using existing workflow (ID match): ${existing.id} ` +
256
261
  `(server is newer: ${serverUpdatedAt.toISOString()} > ${fileUpdatedAt.toISOString()})`);
262
+ return {
263
+ id: existing.id,
264
+ syncedWorkflow: {
265
+ name: existing.name,
266
+ nodes: existing.nodes,
267
+ connections: existing.connections,
268
+ settings: existing.settings,
269
+ pinData: existing.pinData ?? {},
270
+ },
271
+ };
257
272
  }
258
- return existing.id;
259
273
  }
260
274
  }
261
275
  if (fileData.name) {
@@ -278,12 +292,22 @@ let CliController = CliController_1 = class CliController {
278
292
  name: fileData.name,
279
293
  updatedAt: new Date(),
280
294
  });
295
+ return { id: existing.id };
281
296
  }
282
297
  else {
283
298
  this.logger.info(`[cli] Using existing workflow (name match): ${existing.id} ` +
284
299
  `(server is newer: ${serverUpdatedAt.toISOString()} > ${fileUpdatedAt.toISOString()})`);
300
+ return {
301
+ id: existing.id,
302
+ syncedWorkflow: {
303
+ name: existing.name,
304
+ nodes: existing.nodes,
305
+ connections: existing.connections,
306
+ settings: existing.settings,
307
+ pinData: existing.pinData ?? {},
308
+ },
309
+ };
285
310
  }
286
- return existing.id;
287
311
  }
288
312
  }
289
313
  const workflowId = fileData.id && (0, utils_1.isWorkflowIdValid)(fileData.id) ? fileData.id : (0, db_1.generateNanoId)();
@@ -308,7 +332,7 @@ let CliController = CliController_1 = class CliController {
308
332
  });
309
333
  await transactionManager.save(sharedWorkflow);
310
334
  });
311
- return workflowId;
335
+ return { id: workflowId };
312
336
  }
313
337
  async health() {
314
338
  return { status: 'ok', timestamp: new Date().toISOString() };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atom8n/n8n",
3
- "version": "2.5.3",
3
+ "version": "2.5.4",
4
4
  "description": "n8n Workflow Automation Tool",
5
5
  "main": "dist/index",
6
6
  "types": "dist/index.d.ts",
@@ -56,8 +56,8 @@
56
56
  "dist"
57
57
  ],
58
58
  "devDependencies": {
59
- "@n8n/typescript-config": "npm:@atom8n/typescript-config@1.6.3",
60
- "@n8n/backend-test-utils": "npm:@atom8n/backend-test-utils@1.5.3",
59
+ "@n8n/typescript-config": "npm:@atom8n/typescript-config@1.6.4",
60
+ "@n8n/backend-test-utils": "npm:@atom8n/backend-test-utils@1.5.4",
61
61
  "@redocly/cli": "^1.28.5",
62
62
  "@types/aws4": "^1.5.1",
63
63
  "@types/bcryptjs": "^2.4.2",
@@ -96,22 +96,22 @@
96
96
  "@azure/keyvault-secrets": "4.8.0",
97
97
  "@google-cloud/secret-manager": "5.6.0",
98
98
  "@modelcontextprotocol/sdk": "1.24.0",
99
- "@n8n/ai-workflow-builder": "npm:@atom8n/ai-workflow-builder@1.5.3",
100
- "@n8n/api-types": "npm:@atom8n/api-types@1.5.3",
101
- "@n8n/backend-common": "npm:@atom8n/backend-common@1.5.3",
102
- "@n8n/client-oauth2": "npm:@atom8n/client-oauth2@1.3.3",
103
- "@n8n/config": "npm:@atom8n/config@2.4.3",
104
- "@n8n/constants": "npm:@atom8n/constants@0.18.3",
105
- "@n8n/db": "npm:@atom8n/db@1.5.3",
106
- "@n8n/decorators": "npm:@atom8n/decorators@1.5.3",
107
- "@n8n/di": "npm:@atom8n/di@0.13.3",
108
- "@n8n/errors": "npm:@atom8n/errors@0.8.3",
99
+ "@n8n/ai-workflow-builder": "npm:@atom8n/ai-workflow-builder@1.5.4",
100
+ "@n8n/api-types": "npm:@atom8n/api-types@1.5.4",
101
+ "@n8n/backend-common": "npm:@atom8n/backend-common@1.5.4",
102
+ "@n8n/client-oauth2": "npm:@atom8n/client-oauth2@1.3.4",
103
+ "@n8n/config": "npm:@atom8n/config@2.4.4",
104
+ "@n8n/constants": "npm:@atom8n/constants@0.18.4",
105
+ "@n8n/db": "npm:@atom8n/db@1.5.4",
106
+ "@n8n/decorators": "npm:@atom8n/decorators@1.5.4",
107
+ "@n8n/di": "npm:@atom8n/di@0.13.4",
108
+ "@n8n/errors": "npm:@atom8n/errors@0.8.4",
109
109
  "@n8n/localtunnel": "3.0.0",
110
- "@n8n/n8n-nodes-langchain": "npm:@atom8n/n8n-nodes-langchain@2.5.3",
111
- "@n8n/permissions": "npm:@atom8n/permissions@0.48.3",
112
- "@n8n/task-runner": "npm:@atom8n/task-runner@2.5.3",
110
+ "@n8n/n8n-nodes-langchain": "npm:@atom8n/n8n-nodes-langchain@2.5.4",
111
+ "@n8n/permissions": "npm:@atom8n/permissions@0.48.4",
112
+ "@n8n/task-runner": "npm:@atom8n/task-runner@2.5.4",
113
113
  "@n8n/typeorm": "0.3.20-15",
114
- "@n8n/utils": "npm:@atom8n/utils@1.24.3",
114
+ "@n8n/utils": "npm:@atom8n/utils@1.24.4",
115
115
  "@n8n_io/ai-assistant-sdk": "1.19.1",
116
116
  "@n8n_io/license-sdk": "2.24.1",
117
117
  "@rudderstack/rudder-sdk-node": "2.1.4",
@@ -152,10 +152,10 @@
152
152
  "lodash": "4.17.21",
153
153
  "luxon": "3.4.4",
154
154
  "mysql2": "3.15.0",
155
- "n8n-core": "npm:@atom8n/n8n-core@2.5.3",
156
- "n8n-editor-ui": "npm:@atom8n/n8n-editor-ui@2.5.3",
157
- "n8n-nodes-base": "npm:@atom8n/n8n-nodes-base@2.5.3",
158
- "n8n-workflow": "npm:@atom8n/n8n-workflow@2.5.3",
155
+ "n8n-core": "npm:@atom8n/n8n-core@2.5.4",
156
+ "n8n-editor-ui": "npm:@atom8n/n8n-editor-ui@2.5.4",
157
+ "n8n-nodes-base": "npm:@atom8n/n8n-nodes-base@2.5.4",
158
+ "n8n-workflow": "npm:@atom8n/n8n-workflow@2.5.4",
159
159
  "nanoid": "3.3.8",
160
160
  "nodemailer": "7.0.11",
161
161
  "oauth-1.0a": "2.2.6",