n8n 1.0.0 → 1.0.2

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.
Files changed (49) hide show
  1. package/bin/n8n +2 -2
  2. package/dist/CredentialTypes.js +8 -9
  3. package/dist/CredentialTypes.js.map +1 -1
  4. package/dist/LoadNodesAndCredentials.js +18 -18
  5. package/dist/LoadNodesAndCredentials.js.map +1 -1
  6. package/dist/PublicApi/v1/handlers/executions/executions.handler.js +1 -1
  7. package/dist/PublicApi/v1/handlers/executions/executions.handler.js.map +1 -1
  8. package/dist/build.tsbuildinfo +1 -1
  9. package/dist/commands/start.js +0 -4
  10. package/dist/commands/start.js.map +1 -1
  11. package/dist/config/schema.js +4 -4
  12. package/dist/config/schema.js.map +1 -1
  13. package/dist/databases/migrations/mysqldb/1646992772331-CreateUserManagement.js +1 -0
  14. package/dist/databases/migrations/mysqldb/1646992772331-CreateUserManagement.js.map +1 -1
  15. package/dist/databases/migrations/mysqldb/1690000000030-SeparateExecutionData.js +2 -2
  16. package/dist/databases/migrations/mysqldb/1690000000030-SeparateExecutionData.js.map +1 -1
  17. package/dist/databases/migrations/mysqldb/1690000000031-FixExecutionDataType.d.ts +4 -0
  18. package/dist/databases/migrations/mysqldb/1690000000031-FixExecutionDataType.js +10 -0
  19. package/dist/databases/migrations/mysqldb/1690000000031-FixExecutionDataType.js.map +1 -0
  20. package/dist/databases/migrations/mysqldb/index.js +2 -0
  21. package/dist/databases/migrations/mysqldb/index.js.map +1 -1
  22. package/dist/databases/migrations/postgresdb/1646992772331-CreateUserManagement.js +1 -0
  23. package/dist/databases/migrations/postgresdb/1646992772331-CreateUserManagement.js.map +1 -1
  24. package/dist/databases/migrations/sqlite/1646992772331-CreateUserManagement.js +4 -0
  25. package/dist/databases/migrations/sqlite/1646992772331-CreateUserManagement.js.map +1 -1
  26. package/dist/databases/migrations/sqlite/1652367743993-AddUserSettings.d.ts +1 -0
  27. package/dist/databases/migrations/sqlite/1652367743993-AddUserSettings.js +3 -0
  28. package/dist/databases/migrations/sqlite/1652367743993-AddUserSettings.js.map +1 -1
  29. package/dist/databases/migrations/sqlite/1652905585850-AddAPIKeyColumn.d.ts +1 -0
  30. package/dist/databases/migrations/sqlite/1652905585850-AddAPIKeyColumn.js +3 -0
  31. package/dist/databases/migrations/sqlite/1652905585850-AddAPIKeyColumn.js.map +1 -1
  32. package/dist/databases/migrations/sqlite/1673268682475-DeleteExecutionsWithWorkflows.d.ts +1 -0
  33. package/dist/databases/migrations/sqlite/1673268682475-DeleteExecutionsWithWorkflows.js +3 -0
  34. package/dist/databases/migrations/sqlite/1673268682475-DeleteExecutionsWithWorkflows.js.map +1 -1
  35. package/dist/databases/migrations/sqlite/1690000000002-MigrateIntegerKeysToString.d.ts +2 -1
  36. package/dist/databases/migrations/sqlite/1690000000002-MigrateIntegerKeysToString.js +49 -7
  37. package/dist/databases/migrations/sqlite/1690000000002-MigrateIntegerKeysToString.js.map +1 -1
  38. package/dist/databases/migrations/sqlite/1690000000010-SeparateExecutionData.js +2 -6
  39. package/dist/databases/migrations/sqlite/1690000000010-SeparateExecutionData.js.map +1 -1
  40. package/dist/databases/repositories/execution.repository.js +5 -5
  41. package/dist/databases/repositories/execution.repository.js.map +1 -1
  42. package/dist/databases/types.d.ts +7 -5
  43. package/dist/databases/utils/migrationHelpers.d.ts +2 -3
  44. package/dist/databases/utils/migrationHelpers.js +70 -16
  45. package/dist/databases/utils/migrationHelpers.js.map +1 -1
  46. package/dist/workflows/workflows.controller.ee.js +1 -1
  47. package/dist/workflows/workflows.controller.ee.js.map +1 -1
  48. package/oclif.manifest.json +1 -1
  49. package/package.json +6 -6
@@ -151,7 +151,7 @@ let ExecutionRepository = exports.ExecutionRepository = class ExecutionRepositor
151
151
  }
152
152
  }
153
153
  async deleteExecution(executionId) {
154
- await n8n_core_1.BinaryDataManager.getInstance().deleteBinaryDataByExecutionId(executionId);
154
+ await n8n_core_1.BinaryDataManager.getInstance().deleteBinaryDataByExecutionIds([executionId]);
155
155
  return this.delete({ id: executionId });
156
156
  }
157
157
  async countExecutions(filters, accessibleWorkflowIds, currentlyRunningExecutions, isOwner) {
@@ -256,13 +256,13 @@ let ExecutionRepository = exports.ExecutionRepository = class ExecutionRepositor
256
256
  }
257
257
  return;
258
258
  }
259
- const idsToDelete = executions.map(({ id }) => id);
259
+ const executionIds = executions.map(({ id }) => id);
260
260
  const binaryDataManager = n8n_core_1.BinaryDataManager.getInstance();
261
- await Promise.all(idsToDelete.map(async (id) => binaryDataManager.deleteBinaryDataByExecutionId(id)));
261
+ await binaryDataManager.deleteBinaryDataByExecutionIds(executionIds);
262
262
  do {
263
- const batch = idsToDelete.splice(0, 500);
263
+ const batch = executionIds.splice(0, 500);
264
264
  await this.delete(batch);
265
- } while (idsToDelete.length > 0);
265
+ } while (executionIds.length > 0);
266
266
  }
267
267
  };
268
268
  exports.ExecutionRepository = ExecutionRepository = __decorate([
@@ -1 +1 @@
1
- {"version":3,"file":"execution.repository.js","sourceRoot":"","sources":["../../../src/databases/repositories/execution.repository.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,mCAAiC;AACjC,qCAAuF;AAOvF,iEAA8D;AAC9D,qCAA2C;AAO3C,+CAA2C;AAE3C,yEAAqE;AAGrE,oEAAkF;AAClF,qEAAkE;AAClE,sDAAmD;AACnD,uCAA6C;AAC7C,sDAA8B;AAE9B,SAAS,0BAA0B,CAClC,EAAuC,EACvC,OAAmC;IAEnC,IAAI,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,MAAM,EAAE;QACpB,EAAE,CAAC,QAAQ,CAAC,0CAA0C,EAAE;YACvD,cAAc,EAAE,OAAO,CAAC,MAAM;SAC9B,CAAC,CAAC;KACH;IACD,IAAI,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,QAAQ,EAAE;QACtB,EAAE,CAAC,QAAQ,CAAC,EAAE,QAAQ,EAAE,OAAO,CAAC,QAAQ,EAAE,CAAC,CAAC;KAC5C;IACD,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QAED,MAAM,UAAU,GAAG,MAAM,KAAK,CAAC,OAAO,EAAE,CAAC;QAEzC,IAAI,CAAC,UAAU,CAAC,MAAM,EAAE;YACvB,IAAI,gBAAgB,CAAC,GAAG,EAAE;gBACzB,0BAAW,CAAC,KAAK,CAAC,+DAA+D,EAAE;oBAClF,YAAY,EAAE,gBAAgB,CAAC,GAAG;iBAClC,CAAC,CAAC;aACH;YACD,OAAO;SACP;QAED,MAAM,WAAW,GAAG,UAAU,CAAC,GAAG,CAAC,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,EAAE,CAAC,CAAC;QAEnD,MAAM,iBAAiB,GAAG,4BAAiB,CAAC,WAAW,EAAE,CAAC;QAC1D,MAAM,OAAO,CAAC,GAAG,CAChB,WAAW,CAAC,GAAG,CAAC,KAAK,EAAE,EAAE,EAAE,EAAE,CAAC,iBAAiB,CAAC,6BAA6B,CAAC,EAAE,CAAC,CAAC,CAClF,CAAC;QAEF,GAAG;YAEF,MAAM,KAAK,GAAG,WAAW,CAAC,MAAM,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC;YACzC,MAAM,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;SACzB,QAAQ,WAAW,CAAC,MAAM,GAAG,CAAC,EAAE;IAClC,CAAC;CACD,CAAA;8BApVY,mBAAmB;IAD/B,IAAA,gBAAO,GAAE;qCAIe,oBAAU,EAA2B,kDAAuB;GAHxE,mBAAmB,CAoV/B"}
1
+ {"version":3,"file":"execution.repository.js","sourceRoot":"","sources":["../../../src/databases/repositories/execution.repository.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,mCAAiC;AACjC,qCAAuF;AAOvF,iEAA8D;AAC9D,qCAA2C;AAO3C,+CAA2C;AAE3C,yEAAqE;AAGrE,oEAAkF;AAClF,qEAAkE;AAClE,sDAAmD;AACnD,uCAA6C;AAC7C,sDAA8B;AAE9B,SAAS,0BAA0B,CAClC,EAAuC,EACvC,OAAmC;IAEnC,IAAI,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rationContext) => Promise<void>;
13
- export interface ReversibleMigration {
12
+ export type MigrationFn = (ctx: MigrationContext) => Promise<void>;
13
+ export interface BaseMigration {
14
14
  up: MigrationFn;
15
+ down?: MigrationFn | never;
16
+ transaction?: false;
17
+ }
18
+ export interface ReversibleMigration extends BaseMigration {
15
19
  down: MigrationFn;
16
20
  }
17
- export interface IrreversibleMigration {
18
- up: MigrationFn;
21
+ export interface IrreversibleMigration extends BaseMigration {
19
22
  down?: never;
20
23
  }
21
24
  export interface Migration extends Function {
@@ -24,4 +27,3 @@ export interface Migration extends Function {
24
27
  export type InsertResult = Array<{
25
28
  insertId: number;
26
29
  }>;
27
- export {};
@@ -1,9 +1,8 @@
1
1
  import type { QueryRunner } from 'typeorm/query-runner/QueryRunner';
2
- import type { Migration } from '../types';
2
+ import type { Migration, MigrationContext } from '../types';
3
3
  export declare function loadSurveyFromDisk(): string | null;
4
- export declare function logMigrationStart(migrationName: string, disableLogging?: boolean): void;
5
- export declare function logMigrationEnd(migrationName: string, disableLogging?: boolean): void;
6
4
  export declare const wrapMigration: (migration: Migration) => void;
5
+ export declare const copyTable: ({ tablePrefix, queryRunner }: Pick<MigrationContext, 'queryRunner' | 'tablePrefix'>, fromTable: string, toTable: string, fromFields?: string[], toFields?: string[], batchSize?: number) => Promise<void>;
7
6
  export declare function runInBatches(queryRunner: QueryRunner, query: string, operation: (results: any[]) => Promise<void>, limit?: number): Promise<void>;
8
7
  export declare const escapeQuery: (queryRunner: QueryRunner, query: string, params: {
9
8
  [property: string]: unknown;
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.escapeQuery = exports.runInBatches = exports.wrapMigration = exports.logMigrationEnd = exports.logMigrationStart = exports.loadSurveyFromDisk = void 0;
6
+ exports.escapeQuery = exports.runInBatches = exports.copyTable = exports.wrapMigration = exports.loadSurveyFromDisk = void 0;
7
7
  const fs_1 = require("fs");
8
8
  const n8n_core_1 = require("n8n-core");
9
9
  const config_1 = __importDefault(require("../../config"));
@@ -40,45 +40,99 @@ function loadSurveyFromDisk() {
40
40
  }
41
41
  }
42
42
  exports.loadSurveyFromDisk = loadSurveyFromDisk;
43
- let logFinishTimeout;
44
- function logMigrationStart(migrationName, disableLogging = constants_1.inTest) {
45
- if (disableLogging)
43
+ let runningMigrations = false;
44
+ function logMigrationStart(migrationName) {
45
+ if (constants_1.inTest)
46
46
  return;
47
- if (!logFinishTimeout) {
47
+ if (!runningMigrations) {
48
48
  logger.warn('Migrations in progress, please do NOT stop the process.');
49
+ runningMigrations = true;
49
50
  }
50
51
  logger.debug(`Starting migration ${migrationName}`);
51
- clearTimeout(logFinishTimeout);
52
52
  }
53
- exports.logMigrationStart = logMigrationStart;
54
- function logMigrationEnd(migrationName, disableLogging = constants_1.inTest) {
55
- if (disableLogging)
53
+ function logMigrationEnd(migrationName) {
54
+ if (constants_1.inTest)
56
55
  return;
57
56
  logger.debug(`Finished migration ${migrationName}`);
58
- logFinishTimeout = setTimeout(() => {
59
- logger.warn('Migrations finished.');
60
- }, 100);
61
57
  }
62
- exports.logMigrationEnd = logMigrationEnd;
58
+ const runDisablingForeignKeys = async (migration, context, fn) => {
59
+ const { dbType, queryRunner } = context;
60
+ if (dbType !== 'sqlite')
61
+ throw new Error('Disabling transactions only available in sqlite');
62
+ await queryRunner.query('PRAGMA foreign_keys=OFF');
63
+ await queryRunner.startTransaction();
64
+ try {
65
+ await fn.call(migration, context);
66
+ await queryRunner.commitTransaction();
67
+ }
68
+ catch (e) {
69
+ try {
70
+ await queryRunner.rollbackTransaction();
71
+ }
72
+ catch { }
73
+ throw e;
74
+ }
75
+ finally {
76
+ await queryRunner.query('PRAGMA foreign_keys=ON');
77
+ }
78
+ };
63
79
  const wrapMigration = (migration) => {
64
80
  const dbType = config_1.default.getEnv('database.type');
65
81
  const dbName = config_1.default.getEnv(`database.${dbType === 'mariadb' ? 'mysqldb' : dbType}.database`);
66
82
  const tablePrefix = config_1.default.getEnv('database.tablePrefix');
67
83
  const migrationName = migration.name;
68
- const context = { tablePrefix, dbType, dbName, migrationName };
84
+ const context = {
85
+ tablePrefix,
86
+ dbType,
87
+ dbName,
88
+ migrationName,
89
+ logger,
90
+ };
69
91
  const { up, down } = migration.prototype;
70
92
  Object.assign(migration.prototype, {
71
93
  async up(queryRunner) {
72
94
  logMigrationStart(migrationName);
73
- await up.call(this, { queryRunner, ...context });
95
+ if (this.transaction === false) {
96
+ await runDisablingForeignKeys(this, { queryRunner, ...context }, up);
97
+ }
98
+ else {
99
+ await up.call(this, { queryRunner, ...context });
100
+ }
74
101
  logMigrationEnd(migrationName);
75
102
  },
76
103
  async down(queryRunner) {
77
- await (down === null || down === void 0 ? void 0 : down.call(this, { queryRunner, ...context }));
104
+ if (down) {
105
+ if (this.transaction === false) {
106
+ await runDisablingForeignKeys(this, { queryRunner, ...context }, up);
107
+ }
108
+ else {
109
+ await down.call(this, { queryRunner, ...context });
110
+ }
111
+ }
78
112
  },
79
113
  });
80
114
  };
81
115
  exports.wrapMigration = wrapMigration;
116
+ const copyTable = async ({ tablePrefix, queryRunner }, fromTable, toTable, fromFields = [], toFields = [], batchSize = 10) => {
117
+ const driver = queryRunner.connection.driver;
118
+ fromTable = driver.escape(`${tablePrefix}${fromTable}`);
119
+ toTable = driver.escape(`${tablePrefix}${toTable}`);
120
+ const fromFieldsStr = fromFields.length
121
+ ? fromFields.map((f) => driver.escape(f)).join(', ')
122
+ : '*';
123
+ const toFieldsStr = toFields.length
124
+ ? `(${toFields.map((f) => driver.escape(f)).join(', ')})`
125
+ : '';
126
+ const total = await queryRunner
127
+ .query(`SELECT COUNT(*) as count from ${fromTable}`)
128
+ .then((rows) => rows[0].count);
129
+ let migrated = 0;
130
+ while (migrated < total) {
131
+ await queryRunner.query(`INSERT INTO ${toTable} ${toFieldsStr} SELECT ${fromFieldsStr} FROM ${fromTable} LIMIT ${migrated}, ${batchSize}`);
132
+ migrated += batchSize;
133
+ }
134
+ };
135
+ exports.copyTable = copyTable;
82
136
  function batchQuery(query, limit, offset = 0) {
83
137
  return `
84
138
  ${query}
@@ -1 +1 @@
1
- {"version":3,"file":"migrationHelpers.js","sourceRoot":"","sources":["../../../src/databases/utils/migrationHelpers.ts"],"names":[],"mappings":";;;;;;AACA,2BAA0C;AAC1C,uCAAwC;AAExC,sDAA8B;AAC9B,qCAAqC;AACrC,2CAAqC;AAGrC,MAAM,MAAM,GAAG,IAAA,kBAAS,GAAE,CAAC;AAE3B,MAAM,+BAA+B,GAAG,4BAA4B,CAAC;AAErE,SAAgB,kBAAkB;IACjC,MAAM,gBAAgB,GAAG,uBAAY,CAAC,oBAAoB,EAAE,CAAC;IAC7D,IAAI;QACH,MAAM,QAAQ,GAAG,GAAG,gBAAgB,IAAI,+BAA+B,EAAE,CAAC;QAC1E,MAAM,UAAU,GAAG,IAAA,iBAAY,EAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;QACnD,IAAA,WAAM,EAAC,QAAQ,CAAC,CAAC;QACjB,MAAM,qBAAqB,GAAG,IAAI,CAAC,KAAK,CAAC,UAAU,CAAW,CAAC;QAC/D,MAAM,OAAO,GAAG,MAAM,CAAC,OAAO,CAAC,qBAAqB,CAAC,CAAC;QACtD,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE;YACpB,MAAM,IAAI,KAAK,CAAC,gCAAgC,CAAC,CAAC;SAClD;aAAM;YAEN,MAAM,SAAS,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,CAAC,IAAI,EAAE,KAAK,CAAC,EAAE,EAAE;gBACvD,IAAI,CAAC,KAAK,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,EAAE;oBACtD,OAAO,GAAG,GAAG,CAAC,CAAC;iBACf;gBACD,OAAO,GAAG,CAAC;YACZ,CAAC,EAAE,CAAC,CAAC,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,GAAG,UAAU,CAAC,KAAK,EAAE,KAAK,EAAE,MAAM,CAAC,CAAC;QAChD,mBAAmB,GAAG,CAAC,MAAM,WAAW,CAAC,KAAK,CAAC,YAAY,CAAC,CAAc,CAAC;QAE3E,MAAM,SAAS,CAAC,CAAC,GAAG,mBAAmB,CAAC,CAAC,CAAC;QAC1C,MAAM,IAAI,KAAK,CAAC;KAChB,QAAQ,mBAAmB,CAAC,MAAM,KAAK,KAAK,EAAE;AAChD,CAAC;AArBD,oCAqBC;AAEM,MAAM,WAAW,GAAG,CAC1B,WAAwB,EACxB,KAAa,EACb,MAAuC,EACjB,EAAE,CACxB,WAAW,CAAC,UAAU,CAAC,MAAM,CAAC,yBAAyB,CACtD,KAAK,EACL;IACC,OAAO,EAAE,MAAM,CAAC,OAAO;IACvB,EAAE,EAAE,MAAM,CAAC,EAAE;CACb,EACD,EAAE,CACF,CAAC;AAZU,QAAA,WAAW,eAYrB"}
@@ -77,7 +77,7 @@ exports.EEWorkflowController.put('/:workflowId/share', ResponseHelper.send(async
77
77
  });
78
78
  void typedi_1.Container.get(InternalHooks_1.InternalHooks).onWorkflowSharingUpdate(workflowId, req.user.id, shareWithIds);
79
79
  }));
80
- exports.EEWorkflowController.get('/:id(\\w+)', ResponseHelper.send(async (req) => {
80
+ exports.EEWorkflowController.get('/:id(\\w+)', (req, res, next) => (req.params.id === 'new' ? next('router') : next()), ResponseHelper.send(async (req) => {
81
81
  var _a;
82
82
  const { id: workflowId } = req.params;
83
83
  const relations = ['shared', 'shared.user', 'shared.role'];
@@ -1 +1 @@
1
- {"version":3,"file":"workflows.controller.ee.js","sourceRoot":"","sources":["../../src/workflows/workflows.controller.ee.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,sDAA8B;AAC9B,+BAAkC;AAClC,yCAA2B;AAC3B,iEAAmD;AACnD,mEAAqD;AACrD,sDAA8B;AAC9B,gEAA6D;AAC7D,qDAAkD;AAElD,gFAAoF;AACpF,mE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,KAAK,GAAG,YAAY,CAAC,KAAK,CAAC;KACjD;IAED,OAAO,0CAAW,CAAC,WAAW,CAAC,GAAG,CAAC,IAAI,EAAE,GAAG,CAAC,IAAI,EAAE,cAAc,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC,CAAC;AACtF,CAAC,CAAC,CACF,CAAC"}
1
+ {"version":3,"file":"workflows.controller.ee.js","sourceRoot":"","sources":["../../src/workflows/workflows.controller.ee.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,sDAA8B;AAC9B,+BAAkC;AAClC,yCAA2B;AAC3B,iEAAmD;AACnD,mEAAqD;AACrD,sDAA8B;AAC9B,gEAA6D;AAC7D,qDAAkD;AAElD,gFAAoF;AACpF,mEAA4E;AAC5E,mDAAgD;AAChD,gEAA6D;AAC7D,mDAAkD;AAClD,+CAA2C;AAC3C,yDAA2C;AAC3C,kFAA8F;AAE9F,iEAAmD;AACnD,qCAA6B;AAC7B,mCAAmC;AACnC,mDAAgD;AAGnC,QAAA,oBAAoB,GAAG,iBAAO,CAAC,MAAM,EAAE,CAAC;AAErD,4BAAoB,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,GAAG,EAAE,IAAI,EAAE,EAAE;IAC3C,IAAI,CAAC,IAAA,uCAAgB,GAAE,EAAE;QAExB,IAAI,CAAC,QAAQ,CAAC,CAAC;QACf,OAAO;KACP;IAED,IAAI,EAAE,CAAC;AACR,CAAC,CAAC,CAAC;AAQH,4BAAoB,CAAC,GAAG,CACvB,oBAAoB,EACpB,cAAc,CAAC,IAAI,CAAC,KAAK,EAAE,GAA0B,EAAE,EAAE;IACxD,MAAM,EAAE,UAAU,EAAE,GAAG,GAAG,CAAC,MAAM,CAAC;IAClC,MAAM,EAAE,YAAY,EAAE,GAAG,GAAG,CAAC,IAAI,CAAC;IAElC,IACC,CAAC,KAAK,CAAC,OAAO,CAAC,YAAY,CAAC;QAC5B,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC,M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,MAAM,eAAe,GAAG,MAAM,0CAAW,CAAC,MAAM,CAC/C,GAAG,CAAC,IAAI,EACR,YAAY,EACZ,UAAU,EACV,IAAI,EACJ,SAAS,CACT,CAAC;IAEF,OAAO,eAAe,CAAC;AACxB,CAAC,CAAC,CACF,CAAC;AAKF,4BAAoB,CAAC,IAAI,CACxB,MAAM,EACN,cAAc,CAAC,IAAI,CAAC,KAAK,EAAE,GAA8B,EAAmC,EAAE;IAC7F,MAAM,QAAQ,GAAG,IAAI,+BAAc,EAAE,CAAC;IACtC,MAAM,CAAC,MAAM,CAAC,QAAQ,EAAE,GAAG,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;IAE/C,IAAI,GAAG,CAAC,IAAI,CAAC,YAAY,CAAC,EAAE,KAAK,SAAS,EAAE;QAC3C,MAAM,YAAY,GAAG,MAAM,0CAAW,CAAC,gBAAgB,CAAC,QAAQ,EAAE,QAAQ,CAAC,EAAE,EAAE,GAAG,CAAC,IAAI,CAAC,CAAC;QACzF,GAAG,CAAC,IAAI,CAAC,YAAY,CAAC,KAAK,GAAG,YAAY,CAAC,KAAK,CAAC;KACjD;IAED,OAAO,0CAAW,CAAC,WAAW,CAAC,GAAG,CAAC,IAAI,EAAE,GAAG,CAAC,IAAI,EAAE,cAAc,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC,CAAC;AACtF,CAAC,CAAC,CACF,CAAC"}
@@ -1 +1 @@
1
- {"version":"1.0.0","commands":{"BaseCommand":{"id":"BaseCommand","pluginName":"n8n","pluginType":"core","aliases":[],"flags":{},"args":[]},"audit":{"id":"audit","description":"Generate a security audit report for this n8n instance","pluginName":"n8n","pluginType":"core","aliases":[],"examples":["$ n8n audit","$ n8n audit --categories=database,credentials","$ n8n audit --days-abandoned-workflow=10"],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false},"categories":{"name":"categories","type":"option","description":"Comma-separated list of categories to include in the audit","default":"credentials,database,nodes,instance,filesystem"},"days-abandoned-workflow":{"name":"days-abandoned-workflow","type":"option","description":"Days for a workflow to be considered abandoned if not executed","default":90}},"args":[]},"execute":{"id":"execute","description":"\nExecutes a given workflow","pluginName":"n8n","pluginType":"core","aliases":[],"examples":["$ n8n execute --id=5","$ n8n execute --file=workflow.json"],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false},"file":{"name":"file","type":"option","description":"path to a workflow file to execute"},"id":{"name":"id","type":"option","description":"id of the workflow to execute"},"rawOutput":{"name":"rawOutput","type":"boolean","description":"Outputs only JSON data, with no other text","allowNo":false}},"args":[]},"executeBatch":{"id":"executeBatch","description":"\nExecutes multiple workflows once","pluginName":"n8n","pluginType":"core","aliases":[],"examples":["$ n8n executeBatch","$ n8n executeBatch --concurrency=10 --skipList=/data/skipList.txt","$ n8n executeBatch --debug --output=/data/output.json","$ n8n executeBatch --ids=10,13,15 --shortOutput","$ n8n executeBatch --snapshot=/data/snapshots --shallow","$ n8n executeBatch --compare=/data/previousExecutionData --retries=2"],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false},"debug":{"name":"debug","type":"boolean","description":"Toggles on displaying all errors and debug messages.","allowNo":false},"ids":{"name":"ids","type":"option","description":"Specifies workflow IDs to get executed, separated by a comma or a file containing the ids"},"concurrency":{"name":"concurrency","type":"option","description":"How many workflows can run in parallel. Defaults to 1 which means no concurrency.","default":1},"output":{"name":"output","type":"option","description":"Enable execution saving, You must inform an existing folder to save execution via this param"},"snapshot":{"name":"snapshot","type":"option","description":"Enables snapshot saving. You must inform an existing folder to save snapshots via this param."},"compare":{"name":"compare","type":"option","description":"Compares current execution with an existing snapshot. You must inform an existing folder where the snapshots are saved."},"shallow":{"name":"shallow","type":"boolean","description":"Compares only if attributes output from node are the same, with no regards to nested JSON objects.","allowNo":false},"githubWorkflow":{"name":"githubWorkflow","type":"boolean","description":"Enables more lenient comparison for GitHub workflows. This is useful for reducing false positives when comparing Test workflows.","allowNo":false},"skipList":{"name":"skipList","type":"option","description":"File containing a comma separated list of workflow IDs to skip."},"retries":{"name":"retries","type":"option","description":"Retries failed workflows up to N tries. Default is 1. Set 0 to disable.","default":1},"shortOutput":{"name":"shortOutput","type":"boolean","description":"Omits the full execution information from output, displaying only summary.","allowNo":false}},"args":[]},"start":{"id":"start","description":"Starts n8n. Makes Web-UI available and starts active workflows","pluginName":"n8n","pluginType":"core","aliases":[],"examples":["$ n8n start","$ n8n start --tunnel","$ n8n start -o","$ n8n start --tunnel -o"],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false},"open":{"name":"open","type":"boolean","char":"o","description":"opens the UI automatically in browser","allowNo":false},"tunnel":{"name":"tunnel","type":"boolean","description":"runs the webhooks via a hooks.n8n.cloud tunnel server. Use only for testing and development!","allowNo":false},"reinstallMissingPackages":{"name":"reinstallMissingPackages","type":"boolean","description":"Attempts to self heal n8n if packages with nodes are missing. Might drastically increase startup times.","allowNo":false}},"args":[]},"webhook":{"id":"webhook","description":"Starts n8n webhook process. Intercepts only production URLs.","pluginName":"n8n","pluginType":"core","aliases":[],"examples":["$ n8n webhook"],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false}},"args":[]},"worker":{"id":"worker","description":"\nStarts a n8n worker","pluginName":"n8n","pluginType":"core","aliases":[],"examples":["$ n8n worker --concurrency=5"],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false},"concurrency":{"name":"concurrency","type":"option","description":"How many jobs can run in parallel.","default":10}},"args":[]},"db:revert":{"id":"db:revert","description":"Revert last database migration","pluginName":"n8n","pluginType":"core","aliases":[],"examples":["$ n8n db:revert"],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false}},"args":[]},"export:credentials":{"id":"export:credentials","description":"Export credentials","pluginName":"n8n","pluginType":"core","aliases":[],"examples":["$ n8n export:credentials --all","$ n8n export:credentials --id=5 --output=file.json","$ n8n export:credentials --all --output=backups/latest.json","$ n8n export:credentials --backup --output=backups/latest/","$ n8n export:credentials --all --decrypted --output=backups/decrypted.json"],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false},"all":{"name":"all","type":"boolean","description":"Export all credentials","allowNo":false},"backup":{"name":"backup","type":"boolean","description":"Sets --all --pretty --separate for simple backups. Only --output has to be set additionally.","allowNo":false},"id":{"name":"id","type":"option","description":"The ID of the credential to export"},"output":{"name":"output","type":"option","char":"o","description":"Output file name or directory if using separate files"},"pretty":{"name":"pretty","type":"boolean","description":"Format the output in an easier to read fashion","allowNo":false},"separate":{"name":"separate","type":"boolean","description":"Exports one file per credential (useful for versioning). Must inform a directory via --output.","allowNo":false},"decrypted":{"name":"decrypted","type":"boolean","description":"Exports data decrypted / in plain text. ALL SENSITIVE INFORMATION WILL BE VISIBLE IN THE FILES. Use to migrate from a installation to another that have a different secret key (in the config file).","allowNo":false}},"args":[]},"export:workflow":{"id":"export:workflow","description":"Export workflows","pluginName":"n8n","pluginType":"core","aliases":[],"examples":["$ n8n export:workflow --all","$ n8n export:workflow --id=5 --output=file.json","$ n8n export:workflow --all --output=backups/latest/","$ n8n export:workflow --backup --output=backups/latest/"],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false},"all":{"name":"all","type":"boolean","description":"Export all workflows","allowNo":false},"backup":{"name":"backup","type":"boolean","description":"Sets --all --pretty --separate for simple backups. Only --output has to be set additionally.","allowNo":false},"id":{"name":"id","type":"option","description":"The ID of the workflow to export"},"output":{"name":"output","type":"option","char":"o","description":"Output file name or directory if using separate files"},"pretty":{"name":"pretty","type":"boolean","description":"Format the output in an easier to read fashion","allowNo":false},"separate":{"name":"separate","type":"boolean","description":"Exports one file per workflow (useful for versioning). Must inform a directory via --output.","allowNo":false}},"args":[]},"import:credentials":{"id":"import:credentials","description":"Import credentials","pluginName":"n8n","pluginType":"core","aliases":[],"examples":["$ n8n import:credentials --input=file.json","$ n8n import:credentials --separate --input=backups/latest/","$ n8n import:credentials --input=file.json --userId=1d64c3d2-85fe-4a83-a649-e446b07b3aae","$ n8n import:credentials --separate --input=backups/latest/ --userId=1d64c3d2-85fe-4a83-a649-e446b07b3aae"],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false},"input":{"name":"input","type":"option","char":"i","description":"Input file name or directory if --separate is used"},"separate":{"name":"separate","type":"boolean","description":"Imports *.json files from directory provided by --input","allowNo":false},"userId":{"name":"userId","type":"option","description":"The ID of the user to assign the imported credentials to"}},"args":[]},"import:workflow":{"id":"import:workflow","description":"Import workflows","pluginName":"n8n","pluginType":"core","aliases":[],"examples":["$ n8n import:workflow --input=file.json","$ n8n import:workflow --separate --input=backups/latest/","$ n8n import:workflow --input=file.json --userId=1d64c3d2-85fe-4a83-a649-e446b07b3aae","$ n8n import:workflow --separate --input=backups/latest/ --userId=1d64c3d2-85fe-4a83-a649-e446b07b3aae"],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false},"input":{"name":"input","type":"option","char":"i","description":"Input file name or directory if --separate is used"},"separate":{"name":"separate","type":"boolean","description":"Imports *.json files from directory provided by --input","allowNo":false},"userId":{"name":"userId","type":"option","description":"The ID of the user to assign the imported workflows to"}},"args":[]},"ldap:reset":{"id":"ldap:reset","description":"\nResets the database to the default ldap state","pluginName":"n8n","pluginType":"core","aliases":[],"flags":{},"args":[]},"license:clear":{"id":"license:clear","description":"Clear license","pluginName":"n8n","pluginType":"core","aliases":[],"examples":["$ n8n clear:license"],"flags":{},"args":[]},"license:info":{"id":"license:info","description":"Print license information","pluginName":"n8n","pluginType":"core","aliases":[],"examples":["$ n8n license:info"],"flags":{},"args":[]},"list:workflow":{"id":"list:workflow","description":"\nList workflows","pluginName":"n8n","pluginType":"core","aliases":[],"examples":["$ n8n list:workflow","$ n8n list:workflow --active=true --onlyId","$ n8n list:workflow --active=false"],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false},"active":{"name":"active","type":"option","description":"Filters workflows by active status. Can be true or false"},"onlyId":{"name":"onlyId","type":"boolean","description":"Outputs workflow IDs only, one per line.","allowNo":false}},"args":[]},"update:workflow":{"id":"update:workflow","description":"Update workflows","pluginName":"n8n","pluginType":"core","aliases":[],"examples":["$ n8n update:workflow --all --active=false","$ n8n update:workflow --id=5 --active=true"],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false},"active":{"name":"active","type":"option","description":"Active state the workflow/s should be set to"},"all":{"name":"all","type":"boolean","description":"Operate on all workflows","allowNo":false},"id":{"name":"id","type":"option","description":"The ID of the workflow to operate on"}},"args":[]},"user-management:reset":{"id":"user-management:reset","description":"Resets the database to the default user state","pluginName":"n8n","pluginType":"core","aliases":[],"examples":["$ n8n user-management:reset"],"flags":{},"args":[]}}}
1
+ {"version":"1.0.2","commands":{"BaseCommand":{"id":"BaseCommand","pluginName":"n8n","pluginType":"core","aliases":[],"flags":{},"args":[]},"audit":{"id":"audit","description":"Generate a security audit report for this n8n instance","pluginName":"n8n","pluginType":"core","aliases":[],"examples":["$ n8n audit","$ n8n audit --categories=database,credentials","$ n8n audit --days-abandoned-workflow=10"],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false},"categories":{"name":"categories","type":"option","description":"Comma-separated list of categories to include in the audit","default":"credentials,database,nodes,instance,filesystem"},"days-abandoned-workflow":{"name":"days-abandoned-workflow","type":"option","description":"Days for a workflow to be considered abandoned if not executed","default":90}},"args":[]},"execute":{"id":"execute","description":"\nExecutes a given workflow","pluginName":"n8n","pluginType":"core","aliases":[],"examples":["$ n8n execute --id=5","$ n8n execute --file=workflow.json"],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false},"file":{"name":"file","type":"option","description":"path to a workflow file to execute"},"id":{"name":"id","type":"option","description":"id of the workflow to execute"},"rawOutput":{"name":"rawOutput","type":"boolean","description":"Outputs only JSON data, with no other text","allowNo":false}},"args":[]},"executeBatch":{"id":"executeBatch","description":"\nExecutes multiple workflows once","pluginName":"n8n","pluginType":"core","aliases":[],"examples":["$ n8n executeBatch","$ n8n executeBatch --concurrency=10 --skipList=/data/skipList.txt","$ n8n executeBatch --debug --output=/data/output.json","$ n8n executeBatch --ids=10,13,15 --shortOutput","$ n8n executeBatch --snapshot=/data/snapshots --shallow","$ n8n executeBatch --compare=/data/previousExecutionData --retries=2"],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false},"debug":{"name":"debug","type":"boolean","description":"Toggles on displaying all errors and debug messages.","allowNo":false},"ids":{"name":"ids","type":"option","description":"Specifies workflow IDs to get executed, separated by a comma or a file containing the ids"},"concurrency":{"name":"concurrency","type":"option","description":"How many workflows can run in parallel. Defaults to 1 which means no concurrency.","default":1},"output":{"name":"output","type":"option","description":"Enable execution saving, You must inform an existing folder to save execution via this param"},"snapshot":{"name":"snapshot","type":"option","description":"Enables snapshot saving. You must inform an existing folder to save snapshots via this param."},"compare":{"name":"compare","type":"option","description":"Compares current execution with an existing snapshot. You must inform an existing folder where the snapshots are saved."},"shallow":{"name":"shallow","type":"boolean","description":"Compares only if attributes output from node are the same, with no regards to nested JSON objects.","allowNo":false},"githubWorkflow":{"name":"githubWorkflow","type":"boolean","description":"Enables more lenient comparison for GitHub workflows. This is useful for reducing false positives when comparing Test workflows.","allowNo":false},"skipList":{"name":"skipList","type":"option","description":"File containing a comma separated list of workflow IDs to skip."},"retries":{"name":"retries","type":"option","description":"Retries failed workflows up to N tries. Default is 1. Set 0 to disable.","default":1},"shortOutput":{"name":"shortOutput","type":"boolean","description":"Omits the full execution information from output, displaying only summary.","allowNo":false}},"args":[]},"start":{"id":"start","description":"Starts n8n. Makes Web-UI available and starts active workflows","pluginName":"n8n","pluginType":"core","aliases":[],"examples":["$ n8n start","$ n8n start --tunnel","$ n8n start -o","$ n8n start --tunnel -o"],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false},"open":{"name":"open","type":"boolean","char":"o","description":"opens the UI automatically in browser","allowNo":false},"tunnel":{"name":"tunnel","type":"boolean","description":"runs the webhooks via a hooks.n8n.cloud tunnel server. Use only for testing and development!","allowNo":false},"reinstallMissingPackages":{"name":"reinstallMissingPackages","type":"boolean","description":"Attempts to self heal n8n if packages with nodes are missing. Might drastically increase startup times.","allowNo":false}},"args":[]},"webhook":{"id":"webhook","description":"Starts n8n webhook process. Intercepts only production URLs.","pluginName":"n8n","pluginType":"core","aliases":[],"examples":["$ n8n webhook"],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false}},"args":[]},"worker":{"id":"worker","description":"\nStarts a n8n worker","pluginName":"n8n","pluginType":"core","aliases":[],"examples":["$ n8n worker --concurrency=5"],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false},"concurrency":{"name":"concurrency","type":"option","description":"How many jobs can run in parallel.","default":10}},"args":[]},"db:revert":{"id":"db:revert","description":"Revert last database migration","pluginName":"n8n","pluginType":"core","aliases":[],"examples":["$ n8n db:revert"],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false}},"args":[]},"export:credentials":{"id":"export:credentials","description":"Export credentials","pluginName":"n8n","pluginType":"core","aliases":[],"examples":["$ n8n export:credentials --all","$ n8n export:credentials --id=5 --output=file.json","$ n8n export:credentials --all --output=backups/latest.json","$ n8n export:credentials --backup --output=backups/latest/","$ n8n export:credentials --all --decrypted --output=backups/decrypted.json"],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false},"all":{"name":"all","type":"boolean","description":"Export all credentials","allowNo":false},"backup":{"name":"backup","type":"boolean","description":"Sets --all --pretty --separate for simple backups. Only --output has to be set additionally.","allowNo":false},"id":{"name":"id","type":"option","description":"The ID of the credential to export"},"output":{"name":"output","type":"option","char":"o","description":"Output file name or directory if using separate files"},"pretty":{"name":"pretty","type":"boolean","description":"Format the output in an easier to read fashion","allowNo":false},"separate":{"name":"separate","type":"boolean","description":"Exports one file per credential (useful for versioning). Must inform a directory via --output.","allowNo":false},"decrypted":{"name":"decrypted","type":"boolean","description":"Exports data decrypted / in plain text. ALL SENSITIVE INFORMATION WILL BE VISIBLE IN THE FILES. Use to migrate from a installation to another that have a different secret key (in the config file).","allowNo":false}},"args":[]},"export:workflow":{"id":"export:workflow","description":"Export workflows","pluginName":"n8n","pluginType":"core","aliases":[],"examples":["$ n8n export:workflow --all","$ n8n export:workflow --id=5 --output=file.json","$ n8n export:workflow --all --output=backups/latest/","$ n8n export:workflow --backup --output=backups/latest/"],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false},"all":{"name":"all","type":"boolean","description":"Export all workflows","allowNo":false},"backup":{"name":"backup","type":"boolean","description":"Sets --all --pretty --separate for simple backups. Only --output has to be set additionally.","allowNo":false},"id":{"name":"id","type":"option","description":"The ID of the workflow to export"},"output":{"name":"output","type":"option","char":"o","description":"Output file name or directory if using separate files"},"pretty":{"name":"pretty","type":"boolean","description":"Format the output in an easier to read fashion","allowNo":false},"separate":{"name":"separate","type":"boolean","description":"Exports one file per workflow (useful for versioning). Must inform a directory via --output.","allowNo":false}},"args":[]},"import:credentials":{"id":"import:credentials","description":"Import credentials","pluginName":"n8n","pluginType":"core","aliases":[],"examples":["$ n8n import:credentials --input=file.json","$ n8n import:credentials --separate --input=backups/latest/","$ n8n import:credentials --input=file.json --userId=1d64c3d2-85fe-4a83-a649-e446b07b3aae","$ n8n import:credentials --separate --input=backups/latest/ --userId=1d64c3d2-85fe-4a83-a649-e446b07b3aae"],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false},"input":{"name":"input","type":"option","char":"i","description":"Input file name or directory if --separate is used"},"separate":{"name":"separate","type":"boolean","description":"Imports *.json files from directory provided by --input","allowNo":false},"userId":{"name":"userId","type":"option","description":"The ID of the user to assign the imported credentials to"}},"args":[]},"import:workflow":{"id":"import:workflow","description":"Import workflows","pluginName":"n8n","pluginType":"core","aliases":[],"examples":["$ n8n import:workflow --input=file.json","$ n8n import:workflow --separate --input=backups/latest/","$ n8n import:workflow --input=file.json --userId=1d64c3d2-85fe-4a83-a649-e446b07b3aae","$ n8n import:workflow --separate --input=backups/latest/ --userId=1d64c3d2-85fe-4a83-a649-e446b07b3aae"],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false},"input":{"name":"input","type":"option","char":"i","description":"Input file name or directory if --separate is used"},"separate":{"name":"separate","type":"boolean","description":"Imports *.json files from directory provided by --input","allowNo":false},"userId":{"name":"userId","type":"option","description":"The ID of the user to assign the imported workflows to"}},"args":[]},"ldap:reset":{"id":"ldap:reset","description":"\nResets the database to the default ldap state","pluginName":"n8n","pluginType":"core","aliases":[],"flags":{},"args":[]},"license:clear":{"id":"license:clear","description":"Clear license","pluginName":"n8n","pluginType":"core","aliases":[],"examples":["$ n8n clear:license"],"flags":{},"args":[]},"license:info":{"id":"license:info","description":"Print license information","pluginName":"n8n","pluginType":"core","aliases":[],"examples":["$ n8n license:info"],"flags":{},"args":[]},"list:workflow":{"id":"list:workflow","description":"\nList workflows","pluginName":"n8n","pluginType":"core","aliases":[],"examples":["$ n8n list:workflow","$ n8n list:workflow --active=true --onlyId","$ n8n list:workflow --active=false"],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false},"active":{"name":"active","type":"option","description":"Filters workflows by active status. Can be true or false"},"onlyId":{"name":"onlyId","type":"boolean","description":"Outputs workflow IDs only, one per line.","allowNo":false}},"args":[]},"update:workflow":{"id":"update:workflow","description":"Update workflows","pluginName":"n8n","pluginType":"core","aliases":[],"examples":["$ n8n update:workflow --all --active=false","$ n8n update:workflow --id=5 --active=true"],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false},"active":{"name":"active","type":"option","description":"Active state the workflow/s should be set to"},"all":{"name":"all","type":"boolean","description":"Operate on all workflows","allowNo":false},"id":{"name":"id","type":"option","description":"The ID of the workflow to operate on"}},"args":[]},"user-management:reset":{"id":"user-management:reset","description":"Resets the database to the default user state","pluginName":"n8n","pluginType":"core","aliases":[],"examples":["$ n8n user-management:reset"],"flags":{},"args":[]}}}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "n8n",
3
- "version": "1.0.0",
3
+ "version": "1.0.2",
4
4
  "description": "n8n Workflow Automation Tool",
5
5
  "license": "SEE LICENSE IN LICENSE.md",
6
6
  "homepage": "https://n8n.io",
@@ -30,7 +30,7 @@
30
30
  "workflow"
31
31
  ],
32
32
  "engines": {
33
- "node": ">=16.9"
33
+ "node": ">=18.10"
34
34
  },
35
35
  "files": [
36
36
  "bin",
@@ -161,10 +161,10 @@
161
161
  "xmllint-wasm": "^3.0.1",
162
162
  "yamljs": "^0.3.0",
163
163
  "@n8n/client-oauth2": "0.3.0",
164
- "n8n-core": "1.0.0",
165
- "n8n-editor-ui": "1.0.0",
166
- "n8n-nodes-base": "1.0.0",
167
- "n8n-workflow": "1.0.0"
164
+ "n8n-core": "1.0.2",
165
+ "n8n-editor-ui": "1.0.2",
166
+ "n8n-nodes-base": "1.0.2",
167
+ "n8n-workflow": "1.0.2"
168
168
  },
169
169
  "scripts": {
170
170
  "clean": "rimraf dist .turbo",