mirror of
https://github.com/n8n-io/n8n.git
synced 2024-12-24 20:24:05 -08:00
⚡ Minor improvements to MoveBinaryData encoding
This commit is contained in:
parent
c3496845bf
commit
3db1cdbe84
|
@ -13,12 +13,15 @@ import {
|
||||||
IBinaryData,
|
IBinaryData,
|
||||||
IDataObject,
|
IDataObject,
|
||||||
INodeExecutionData,
|
INodeExecutionData,
|
||||||
|
INodePropertyOptions,
|
||||||
INodeType,
|
INodeType,
|
||||||
INodeTypeDescription,
|
INodeTypeDescription,
|
||||||
} from 'n8n-workflow';
|
} from 'n8n-workflow';
|
||||||
|
|
||||||
import * as iconv from 'iconv-lite';
|
import * as iconv from 'iconv-lite';
|
||||||
iconv.encodingExists('utf8');
|
iconv.encodingExists('utf8');
|
||||||
|
|
||||||
|
// Create options for bomAware and encoding
|
||||||
const bomAware: string[] = [];
|
const bomAware: string[] = [];
|
||||||
const encodeDecodeOptions: INodePropertyOptions[] = [];
|
const encodeDecodeOptions: INodePropertyOptions[] = [];
|
||||||
Object.keys((iconv as any).encodings).forEach(encoding => {
|
Object.keys((iconv as any).encodings).forEach(encoding => {
|
||||||
|
@ -30,6 +33,12 @@ Object.keys((iconv as any).encodings).forEach(encoding => {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
encodeDecodeOptions.sort((a, b) => {
|
||||||
|
if (a.name < b.name) { return -1; }
|
||||||
|
if (a.name > b.name) { return 1; }
|
||||||
|
return 0;
|
||||||
|
});
|
||||||
|
|
||||||
export class MoveBinaryData implements INodeType {
|
export class MoveBinaryData implements INodeType {
|
||||||
description: INodeTypeDescription = {
|
description: INodeTypeDescription = {
|
||||||
displayName: 'Move Binary Data',
|
displayName: 'Move Binary Data',
|
||||||
|
|
Loading…
Reference in a new issue