mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 18:12:04 +00:00
feat: Migrate packages from lodash to lodash-es (no-changelog) (#5538)
This commit is contained in:
@@ -20,7 +20,8 @@ import {
|
||||
|
||||
import moment from 'moment';
|
||||
|
||||
import _ from 'lodash';
|
||||
import map from 'lodash.map';
|
||||
import isEmpty from 'lodash.isempty';
|
||||
|
||||
interface Attachments {
|
||||
type: string;
|
||||
@@ -792,9 +793,9 @@ export class Mandrill implements INodeType {
|
||||
);
|
||||
} else {
|
||||
const headersUi = this.getNodeParameter('headersUi', i) as IDataObject;
|
||||
if (!_.isEmpty(headersUi)) {
|
||||
if (!isEmpty(headersUi)) {
|
||||
// @ts-ignore
|
||||
body.message.headers = _.map(headersUi.headersValues, (o) => {
|
||||
body.message.headers = map(headersUi.headersValues, (o) => {
|
||||
const aux: IDataObject = {};
|
||||
// @ts-ignore
|
||||
aux[o.name] = o.value;
|
||||
@@ -803,9 +804,9 @@ export class Mandrill implements INodeType {
|
||||
}
|
||||
|
||||
const metadataUi = this.getNodeParameter('metadataUi', i) as IDataObject;
|
||||
if (!_.isEmpty(metadataUi)) {
|
||||
if (!isEmpty(metadataUi)) {
|
||||
// @ts-ignore
|
||||
body.message.metadata = _.map(metadataUi.metadataValues, (o: IDataObject) => {
|
||||
body.message.metadata = map(metadataUi.metadataValues, (o: IDataObject) => {
|
||||
const aux: IDataObject = {};
|
||||
aux[o.name as string] = o.value;
|
||||
return aux;
|
||||
@@ -813,9 +814,9 @@ export class Mandrill implements INodeType {
|
||||
}
|
||||
|
||||
const mergeVarsUi = this.getNodeParameter('mergeVarsUi', i) as IDataObject;
|
||||
if (!_.isEmpty(mergeVarsUi)) {
|
||||
if (!isEmpty(mergeVarsUi)) {
|
||||
// @ts-ignore
|
||||
body.message.global_merge_vars = _.map(
|
||||
body.message.global_merge_vars = map(
|
||||
// @ts-ignore
|
||||
mergeVarsUi.mergeVarsValues,
|
||||
(o: IDataObject) => {
|
||||
@@ -830,13 +831,13 @@ export class Mandrill implements INodeType {
|
||||
const attachmentsUi = this.getNodeParameter('attachmentsUi', i) as IDataObject;
|
||||
let attachmentsBinary: Attachments[] = [],
|
||||
attachmentsValues: Attachments[] = [];
|
||||
if (!_.isEmpty(attachmentsUi)) {
|
||||
if (!isEmpty(attachmentsUi)) {
|
||||
if (
|
||||
attachmentsUi.hasOwnProperty('attachmentsValues') &&
|
||||
!_.isEmpty(attachmentsUi.attachmentsValues)
|
||||
!isEmpty(attachmentsUi.attachmentsValues)
|
||||
) {
|
||||
// @ts-ignore
|
||||
attachmentsValues = _.map(attachmentsUi.attachmentsValues, (o: IDataObject) => {
|
||||
attachmentsValues = map(attachmentsUi.attachmentsValues, (o: IDataObject) => {
|
||||
const aux: IDataObject = {};
|
||||
// @ts-ignore
|
||||
aux.name = o.name;
|
||||
@@ -848,11 +849,11 @@ export class Mandrill implements INodeType {
|
||||
|
||||
if (
|
||||
attachmentsUi.hasOwnProperty('attachmentsBinary') &&
|
||||
!_.isEmpty(attachmentsUi.attachmentsBinary) &&
|
||||
!isEmpty(attachmentsUi.attachmentsBinary) &&
|
||||
items[i].binary
|
||||
) {
|
||||
// @ts-ignore
|
||||
attachmentsBinary = _.map(attachmentsUi.attachmentsBinary, (o: IDataObject) => {
|
||||
attachmentsBinary = map(attachmentsUi.attachmentsBinary, (o: IDataObject) => {
|
||||
if (items[i].binary!.hasOwnProperty(o.property as string)) {
|
||||
const aux: IDataObject = {};
|
||||
aux.name = items[i].binary![o.property as string].fileName || 'unknown';
|
||||
|
||||
Reference in New Issue
Block a user