🔀 Merge branch 'master' into oauth-support

This commit is contained in:
Jan Oberhauser 2020-05-27 14:04:39 +02:00
commit ce3bf5ed2e
4 changed files with 119 additions and 5 deletions

View file

@ -8,9 +8,16 @@ fi
if [ "$#" -gt 0 ]; then
# Got started with arguments
shift
exec su-exec node ./packages/cli/bin/n8n "$@"
COMMAND=$1;
if [[ "$COMMAND" == "n8n" ]]; then
shift
exec su-exec node ./packages/cli/bin/n8n "$@"
else
exec su-exec node "$@"
fi
else
# Got started without arguments
exec su-exec node ./packages/cli/bin/n8n
# Got started without arguments
exec su-exec node ./packages/cli/bin/n8n
fi

View file

@ -17,6 +17,7 @@ n8n is a free and open [fair-code](http://faircode.io) licensed node based Workf
- [Securing n8n](#securing-n8n)
- [Persist data](#persist-data)
- [Passing Sensitive Data via File](#passing-sensitive-data-via-file)
- [Updating a Running docker-compose Instance](#updating-a-running-docker-compose-instance)
- [Example Setup with Lets Encrypt](#example-setup-with-lets-encrypt)
- [What does n8n mean and how do you pronounce it](#what-does-n8n-mean-and-how-do-you-pronounce-it)
- [Support](#support)
@ -226,6 +227,18 @@ The following environment variables support file input:
A basic step by step example setup of n8n with docker-compose and Lets Encrypt is available on the
[Server Setup](https://docs.n8n.io/#/server-setup) page.
## Updating a running docker-compose instance
```
# Pull down the latest version from dockerhub
docker pull n8nio/n8n
# Stop current setup
sudo docker-compose stop
# Delete it (will only delete the docker-containers, data is stored separately)
sudo docker-compose rm
# Then start it again
sudo docker-compose up -d
```
## Setting Timezone

View file

@ -432,6 +432,80 @@ export class EditImage implements INodeType {
},
description: 'The color to use for the background when image gets rotated by anything which is not a multiple of 90..',
},
{
displayName: 'Options',
name: 'options',
type: 'collection',
placeholder: 'Add Option',
default: {},
displayOptions: {
hide: {
operation: [
'information',
],
},
},
options: [
{
displayName: 'File Name',
name: 'fileName',
type: 'string',
default: '',
description: 'File name to set in binary data.',
},
{
displayName: 'Format',
name: 'format',
type: 'options',
options: [
{
name: 'bmp',
value: 'bmp',
},
{
name: 'gif',
value: 'gif',
},
{
name: 'jpeg',
value: 'jpeg',
},
{
name: 'png',
value: 'png',
},
{
name: 'tiff',
value: 'tiff',
},
],
default: 'jpeg',
description: 'Set the output image format.',
},
{
displayName: 'Quality',
name: 'quality',
type: 'number',
typeOptions: {
minValue: 0,
maxValue: 100,
},
default: 100,
displayOptions: {
show: {
format: [
'jpeg',
'png',
'tiff',
],
},
},
description: 'Sets the jpeg|png|tiff compression level from 0 to 100 (best).',
},
],
},
]
};
@ -442,6 +516,8 @@ export class EditImage implements INodeType {
const operation = this.getNodeParameter('operation', 0) as string;
const dataPropertyName = this.getNodeParameter('dataPropertyName') as string;
const options = this.getNodeParameter('options', {}) as IDataObject;
// TODO: Later should make so that it sends directly a valid buffer and the buffer.from stuff is not needed anymore
if (item.binary === undefined) {
return item;
@ -550,6 +626,24 @@ export class EditImage implements INodeType {
Object.assign(newItem.binary, item.binary);
}
if (options.quality !== undefined) {
gmInstance = gmInstance.quality(options.quality as number);
}
if (options.format !== undefined) {
gmInstance = gmInstance.setFormat(options.format as string);
newItem.binary![dataPropertyName as string].fileExtension = options.format as string;
newItem.binary![dataPropertyName as string].mimeType = `image/${options.format}`;
const fileName = newItem.binary![dataPropertyName as string].fileName;
if (fileName && fileName.includes('.')) {
newItem.binary![dataPropertyName as string].fileName = fileName.split('.').slice(0, -1).join('.') + '.' + options.format;
}
}
if (options.fileName !== undefined) {
newItem.binary![dataPropertyName as string].fileName = options.fileName as string;
}
return new Promise<INodeExecutionData>((resolve, reject) => {
gmInstance
.toBuffer((error: Error | null, buffer: Buffer) => {

View file

@ -40,7 +40,7 @@ export class TrelloTrigger implements INodeType {
webhooks: [
{
name: 'setup',
httpMethod: 'GET',
httpMethod: 'HEAD',
responseMode: 'onReceived',
path: 'webhook',
},