🔀 Merge master

This commit is contained in:
Iván Ovejero 2021-11-22 11:51:31 +01:00
commit a48429f425
14 changed files with 75 additions and 31 deletions

View file

@ -6,7 +6,6 @@ import { INode, INodeCredentialsDetails, LoggerProxy } from 'n8n-workflow';
import * as fs from 'fs'; import * as fs from 'fs';
import * as glob from 'fast-glob'; import * as glob from 'fast-glob';
import * as path from 'path';
import { UserSettings } from 'n8n-core'; import { UserSettings } from 'n8n-core';
import { getLogger } from '../../src/Logger'; import { getLogger } from '../../src/Logger';
import { Db, ICredentialsDb } from '../../src'; import { Db, ICredentialsDb } from '../../src';
@ -86,9 +85,12 @@ export class ImportWorkflowsCommand extends Command {
const credentialsEntities = (await Db.collections.Credentials?.find()) ?? []; const credentialsEntities = (await Db.collections.Credentials?.find()) ?? [];
let i; let i;
if (flags.separate) { if (flags.separate) {
const files = await glob( let inputPath = flags.input;
`${flags.input.endsWith(path.sep) ? flags.input : flags.input + path.sep}*.json`, if (process.platform === 'win32') {
); inputPath = inputPath.replace(/\\/g, '/');
}
inputPath = inputPath.replace(/\/$/g, '');
const files = await glob(`${inputPath}/*.json`);
for (i = 0; i < files.length; i++) { for (i = 0; i < files.length; i++) {
const workflow = JSON.parse(fs.readFileSync(files[i], { encoding: 'utf8' })); const workflow = JSON.parse(fs.readFileSync(files[i], { encoding: 'utf8' }));
if (credentialsEntities.length > 0) { if (credentialsEntities.length > 0) {

View file

@ -1,6 +1,6 @@
{ {
"name": "n8n", "name": "n8n",
"version": "0.149.0", "version": "0.150.0",
"description": "n8n Workflow Automation Tool", "description": "n8n Workflow Automation Tool",
"license": "SEE LICENSE IN LICENSE.md", "license": "SEE LICENSE IN LICENSE.md",
"homepage": "https://n8n.io", "homepage": "https://n8n.io",
@ -70,6 +70,7 @@
"@types/open": "^6.1.0", "@types/open": "^6.1.0",
"@types/parseurl": "^1.3.1", "@types/parseurl": "^1.3.1",
"@types/request-promise-native": "~1.0.15", "@types/request-promise-native": "~1.0.15",
"@types/validator": "^13.7.0",
"concurrently": "^5.1.0", "concurrently": "^5.1.0",
"jest": "^26.4.2", "jest": "^26.4.2",
"nodemon": "^2.0.2", "nodemon": "^2.0.2",
@ -110,10 +111,10 @@
"localtunnel": "^2.0.0", "localtunnel": "^2.0.0",
"lodash.get": "^4.4.2", "lodash.get": "^4.4.2",
"mysql2": "~2.3.0", "mysql2": "~2.3.0",
"n8n-core": "~0.93.0", "n8n-core": "~0.94.0",
"n8n-editor-ui": "~0.116.0", "n8n-editor-ui": "~0.117.0",
"n8n-nodes-base": "~0.146.0", "n8n-nodes-base": "~0.147.0",
"n8n-workflow": "~0.76.0", "n8n-workflow": "~0.77.0",
"oauth-1.0a": "^2.2.6", "oauth-1.0a": "^2.2.6",
"open": "^7.0.0", "open": "^7.0.0",
"pg": "^8.3.0", "pg": "^8.3.0",

View file

@ -1,6 +1,6 @@
{ {
"name": "n8n-core", "name": "n8n-core",
"version": "0.93.0", "version": "0.94.0",
"description": "Core functionality of n8n", "description": "Core functionality of n8n",
"license": "SEE LICENSE IN LICENSE.md", "license": "SEE LICENSE IN LICENSE.md",
"homepage": "https://n8n.io", "homepage": "https://n8n.io",
@ -50,7 +50,7 @@
"form-data": "^4.0.0", "form-data": "^4.0.0",
"lodash.get": "^4.4.2", "lodash.get": "^4.4.2",
"mime-types": "^2.1.27", "mime-types": "^2.1.27",
"n8n-workflow": "~0.76.0", "n8n-workflow": "~0.77.0",
"oauth-1.0a": "^2.2.6", "oauth-1.0a": "^2.2.6",
"p-cancelable": "^2.0.0", "p-cancelable": "^2.0.0",
"qs": "^6.10.1", "qs": "^6.10.1",

View file

@ -1,6 +1,6 @@
{ {
"name": "n8n-design-system", "name": "n8n-design-system",
"version": "0.6.0", "version": "0.7.0",
"license": "SEE LICENSE IN LICENSE.md", "license": "SEE LICENSE IN LICENSE.md",
"homepage": "https://n8n.io", "homepage": "https://n8n.io",
"author": { "author": {

View file

@ -1,6 +1,6 @@
{ {
"name": "n8n-editor-ui", "name": "n8n-editor-ui",
"version": "0.116.0", "version": "0.117.0",
"description": "Workflow Editor UI for n8n", "description": "Workflow Editor UI for n8n",
"license": "SEE LICENSE IN LICENSE.md", "license": "SEE LICENSE IN LICENSE.md",
"homepage": "https://n8n.io", "homepage": "https://n8n.io",
@ -26,7 +26,7 @@
}, },
"dependencies": { "dependencies": {
"@fontsource/open-sans": "^4.5.0", "@fontsource/open-sans": "^4.5.0",
"n8n-design-system": "~0.6.0", "n8n-design-system": "~0.7.0",
"timeago.js": "^4.0.2", "timeago.js": "^4.0.2",
"v-click-outside": "^3.1.2", "v-click-outside": "^3.1.2",
"vue-fragment": "^1.5.2", "vue-fragment": "^1.5.2",
@ -74,7 +74,7 @@
"lodash.debounce": "^4.0.8", "lodash.debounce": "^4.0.8",
"lodash.get": "^4.4.2", "lodash.get": "^4.4.2",
"lodash.set": "^4.3.2", "lodash.set": "^4.3.2",
"n8n-workflow": "~0.76.0", "n8n-workflow": "~0.77.0",
"normalize-wheel": "^1.0.1", "normalize-wheel": "^1.0.1",
"prismjs": "^1.17.1", "prismjs": "^1.17.1",
"quill": "^2.0.0-dev.3", "quill": "^2.0.0-dev.3",

View file

@ -1,6 +1,6 @@
{ {
"name": "n8n-node-dev", "name": "n8n-node-dev",
"version": "0.33.0", "version": "0.34.0",
"description": "CLI to simplify n8n credentials/node development", "description": "CLI to simplify n8n credentials/node development",
"license": "SEE LICENSE IN LICENSE.md", "license": "SEE LICENSE IN LICENSE.md",
"homepage": "https://n8n.io", "homepage": "https://n8n.io",
@ -60,8 +60,8 @@
"change-case": "^4.1.1", "change-case": "^4.1.1",
"copyfiles": "^2.1.1", "copyfiles": "^2.1.1",
"inquirer": "^7.0.1", "inquirer": "^7.0.1",
"n8n-core": "~0.93.0", "n8n-core": "~0.94.0",
"n8n-workflow": "~0.76.0", "n8n-workflow": "~0.77.0",
"oauth-1.0a": "^2.2.6", "oauth-1.0a": "^2.2.6",
"replace-in-file": "^6.0.0", "replace-in-file": "^6.0.0",
"request": "^2.88.2", "request": "^2.88.2",

View file

@ -164,6 +164,18 @@ export const issueFields = [
default: '', default: '',
description: 'Description', description: 'Description',
}, },
{
displayName: 'Components',
name: 'componentIds',
type: 'multiOptions',
typeOptions: {
loadOptionsMethod: 'getProjectComponents',
loadOptionsDependsOn: [
'project',
],
},
default: [],
},
{ {
displayName: 'Custom Fields', displayName: 'Custom Fields',
name: 'customFieldsUi', name: 'customFieldsUi',

View file

@ -12,6 +12,7 @@ export interface IFields {
project?: IDataObject; project?: IDataObject;
summary?: string; summary?: string;
reporter?: IDataObject; reporter?: IDataObject;
components?: IDataObject[];
} }
export interface IIssue { export interface IIssue {

View file

@ -427,6 +427,30 @@ export class Jira implements INodeType {
} }
return returnData; return returnData;
}, },
// Get all the components to display them to user so that he can
// select them easily
async getProjectComponents(this: ILoadOptionsFunctions): Promise<INodePropertyOptions[]> {
const returnData: INodePropertyOptions[] = [];
const project = this.getCurrentNodeParameter('project');
const { values: components } = await jiraSoftwareCloudApiRequest.call(this, `/api/2/project/${project}/component`, 'GET');
for (const component of components) {
returnData.push({
name: component.name,
value: component.id,
});
}
returnData.sort((a, b) => {
if (a.name < b.name) { return -1; }
if (a.name > b.name) { return 1; }
return 0;
});
return returnData;
},
}, },
}; };
@ -492,6 +516,9 @@ export class Jira implements INodeType {
if (additionalFields.updateHistory) { if (additionalFields.updateHistory) {
qs.updateHistory = additionalFields.updateHistory as boolean; qs.updateHistory = additionalFields.updateHistory as boolean;
} }
if (additionalFields.componentIds) {
fields.components = (additionalFields.componentIds as string[]).map(id => ({ id }));
}
if (additionalFields.customFieldsUi) { if (additionalFields.customFieldsUi) {
const customFields = (additionalFields.customFieldsUi as IDataObject).customFieldsValues as IDataObject[]; const customFields = (additionalFields.customFieldsUi as IDataObject).customFieldsValues as IDataObject[];
if (customFields) { if (customFields) {

View file

@ -186,7 +186,7 @@ export const incidentFields = [
options: [ options: [
{ {
name: 'Low', name: 'Low',
value: 1, value: 3,
}, },
{ {
name: 'Medium', name: 'Medium',
@ -194,7 +194,7 @@ export const incidentFields = [
}, },
{ {
name: 'High', name: 'High',
value: 3, value: 1,
}, },
], ],
default: '', default: '',
@ -240,7 +240,7 @@ export const incidentFields = [
options: [ options: [
{ {
name: 'Low', name: 'Low',
value: 1, value: 3,
}, },
{ {
name: 'Medium', name: 'Medium',
@ -248,7 +248,7 @@ export const incidentFields = [
}, },
{ {
name: 'High', name: 'High',
value: 3, value: 1,
}, },
], ],
default: '', default: '',
@ -590,7 +590,7 @@ export const incidentFields = [
options: [ options: [
{ {
name: 'Low', name: 'Low',
value: 1, value: 3,
}, },
{ {
name: 'Medium', name: 'Medium',
@ -598,7 +598,7 @@ export const incidentFields = [
}, },
{ {
name: 'High', name: 'High',
value: 3, value: 1,
}, },
], ],
default: '', default: '',
@ -654,7 +654,7 @@ export const incidentFields = [
options: [ options: [
{ {
name: 'Low', name: 'Low',
value: 1, value: 3,
}, },
{ {
name: 'Medium', name: 'Medium',
@ -662,7 +662,7 @@ export const incidentFields = [
}, },
{ {
name: 'High', name: 'High',
value: 3, value: 1,
}, },
], ],
default: '', default: '',

View file

@ -26,7 +26,6 @@ export async function xeroApiRequest(this: IExecuteFunctions | IExecuteSingleFun
try { try {
if (body.organizationId) { if (body.organizationId) {
options.headers = { ...options.headers, 'Xero-tenant-id': body.organizationId }; options.headers = { ...options.headers, 'Xero-tenant-id': body.organizationId };
delete body.organizationId;
} }
if (Object.keys(headers).length !== 0) { if (Object.keys(headers).length !== 0) {
options.headers = Object.assign({}, options.headers, headers); options.headers = Object.assign({}, options.headers, headers);

View file

@ -1,6 +1,6 @@
{ {
"name": "n8n-nodes-base", "name": "n8n-nodes-base",
"version": "0.146.0", "version": "0.147.0",
"description": "Base nodes of n8n", "description": "Base nodes of n8n",
"license": "SEE LICENSE IN LICENSE.md", "license": "SEE LICENSE IN LICENSE.md",
"homepage": "https://n8n.io", "homepage": "https://n8n.io",
@ -673,7 +673,7 @@
"@types/xml2js": "^0.4.3", "@types/xml2js": "^0.4.3",
"gulp": "^4.0.0", "gulp": "^4.0.0",
"jest": "^26.4.2", "jest": "^26.4.2",
"n8n-workflow": "~0.76.0", "n8n-workflow": "~0.77.0",
"nodelinter": "^0.1.9", "nodelinter": "^0.1.9",
"ts-jest": "^26.3.0", "ts-jest": "^26.3.0",
"tslint": "^6.1.2", "tslint": "^6.1.2",
@ -713,7 +713,7 @@
"mqtt": "4.2.6", "mqtt": "4.2.6",
"mssql": "^6.2.0", "mssql": "^6.2.0",
"mysql2": "~2.3.0", "mysql2": "~2.3.0",
"n8n-core": "~0.93.0", "n8n-core": "~0.94.0",
"node-ssh": "^12.0.0", "node-ssh": "^12.0.0",
"nodemailer": "^6.5.0", "nodemailer": "^6.5.0",
"pdf-parse": "^1.1.1", "pdf-parse": "^1.1.1",

View file

@ -1,6 +1,6 @@
{ {
"name": "n8n-workflow", "name": "n8n-workflow",
"version": "0.76.0", "version": "0.77.0",
"description": "Workflow base code of n8n", "description": "Workflow base code of n8n",
"license": "SEE LICENSE IN LICENSE.md", "license": "SEE LICENSE IN LICENSE.md",
"homepage": "https://n8n.io", "homepage": "https://n8n.io",

View file

@ -117,6 +117,8 @@ export class Expression {
// Execute the expression // Execute the expression
try { try {
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-unsafe-call
tmpl.tmpl('{{global=this;}}', data);
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-unsafe-call // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-unsafe-call
const returnValue = tmpl.tmpl(parameterValue, data); const returnValue = tmpl.tmpl(parameterValue, data);
if (typeof returnValue === 'function') { if (typeof returnValue === 'function') {