Revert 'gm' import statement

This commit is contained in:
dali 2021-03-11 12:27:24 +01:00
parent ac9b743233
commit 3ec3f908e8

View file

@ -11,7 +11,7 @@ import {
INodeType, INodeType,
INodeTypeDescription, INodeTypeDescription,
} from 'n8n-workflow'; } from 'n8n-workflow';
const gm = require('gm').subClass({imageMagick: true}); import * as gm from 'gm';
import { file } from 'tmp-promise'; import { file } from 'tmp-promise';
import { import {
parse as pathParse, parse as pathParse,
@ -966,7 +966,6 @@ export class EditImage implements INodeType {
const cleanupFunctions: Array<() => void> = []; const cleanupFunctions: Array<() => void> = [];
// @ts-ignore
let gmInstance: gm.State; let gmInstance: gm.State;
const requiredOperationParameters: { const requiredOperationParameters: {
@ -1135,7 +1134,6 @@ export class EditImage implements INodeType {
const resizeOption = operationData.resizeOption as string; const resizeOption = operationData.resizeOption as string;
// By default use "maximumArea" // By default use "maximumArea"
// @ts-ignore
let option: gm.ResizeOption = '@'; let option: gm.ResizeOption = '@';
if (resizeOption === 'ignoreAspectRatio') { if (resizeOption === 'ignoreAspectRatio') {
option = '!'; option = '!';