mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 18:12:04 +00:00
build: Upgrade to Vite 5 (#7784)
This commit is contained in:
@@ -117,9 +117,9 @@ export class Code implements INodeType {
|
||||
workflowMode === 'manual'
|
||||
? this.sendMessageToUI
|
||||
: CODE_ENABLE_STDOUT === 'true'
|
||||
? (...args) =>
|
||||
console.log(`[Workflow "${this.getWorkflow().id}"][Node "${node.name}"]`, ...args)
|
||||
: () => {},
|
||||
? (...args) =>
|
||||
console.log(`[Workflow "${this.getWorkflow().id}"][Node "${node.name}"]`, ...args)
|
||||
: () => {},
|
||||
);
|
||||
return sandbox;
|
||||
};
|
||||
|
||||
@@ -9,9 +9,8 @@ import type {
|
||||
} from 'n8n-workflow';
|
||||
import { jsonParse, NodeApiError, NodeOperationError, sleep } from 'n8n-workflow';
|
||||
|
||||
import type { DiscordAttachment, DiscordWebhook } from './Interfaces';
|
||||
|
||||
import { oldVersionNotice } from '../../../utils/descriptions';
|
||||
import type { DiscordAttachment, DiscordWebhook } from './Interfaces';
|
||||
|
||||
const versionDescription: INodeTypeDescription = {
|
||||
displayName: 'Discord',
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
import type { INodeProperties } from 'n8n-workflow';
|
||||
|
||||
import { guildRLC } from '../common.description';
|
||||
import * as create from './create.operation';
|
||||
import * as get from './get.operation';
|
||||
import * as getAll from './getAll.operation';
|
||||
import * as update from './update.operation';
|
||||
import * as deleteChannel from './deleteChannel.operation';
|
||||
import { guildRLC } from '../common.description';
|
||||
|
||||
export { create, get, getAll, update, deleteChannel };
|
||||
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import type { INodeProperties } from 'n8n-workflow';
|
||||
|
||||
import { guildRLC } from '../common.description';
|
||||
import * as getAll from './getAll.operation';
|
||||
import * as roleAdd from './roleAdd.operation';
|
||||
import * as roleRemove from './roleRemove.operation';
|
||||
import { guildRLC } from '../common.description';
|
||||
|
||||
export { getAll, roleAdd, roleRemove };
|
||||
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
import type { INodeProperties } from 'n8n-workflow';
|
||||
|
||||
import { guildRLC } from '../common.description';
|
||||
import * as getAll from './getAll.operation';
|
||||
import * as react from './react.operation';
|
||||
import * as send from './send.operation';
|
||||
import * as deleteMessage from './deleteMessage.operation';
|
||||
import * as get from './get.operation';
|
||||
import { guildRLC } from '../common.description';
|
||||
|
||||
export { getAll, react, send, deleteMessage, get };
|
||||
|
||||
|
||||
@@ -8,8 +8,8 @@ import type {
|
||||
import { jsonParse, NodeOperationError } from 'n8n-workflow';
|
||||
import { isEmpty } from 'lodash';
|
||||
import FormData from 'form-data';
|
||||
import { capitalize } from '../../../../utils/utilities';
|
||||
import { extension } from 'mime-types';
|
||||
import { capitalize } from '../../../../utils/utilities';
|
||||
import { discordApiRequest } from '../transport';
|
||||
|
||||
export const createSimplifyFunction =
|
||||
|
||||
@@ -285,9 +285,7 @@ export async function execute(this: IExecuteFunctions): Promise<INodeExecutionDa
|
||||
<em>${attributionText}<a href="${link}" target="_blank">n8n</a></em>
|
||||
`;
|
||||
} else {
|
||||
mailOptions.text = `${
|
||||
mailOptions.text
|
||||
}\n\n---\n${attributionText}n8n\n${'https://n8n.io'}`;
|
||||
mailOptions.text = `${mailOptions.text}\n\n---\n${attributionText}n8n\n${'https://n8n.io'}`;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -179,9 +179,8 @@ export const objectOperations: INodeProperties[] = [
|
||||
// Set the headers
|
||||
if (!requestOptions.headers) requestOptions.headers = {};
|
||||
requestOptions.headers['Content-Length'] = body.getLengthSync();
|
||||
requestOptions.headers[
|
||||
'Content-Type'
|
||||
] = `multipart/related; boundary=${body.getBoundary()}`;
|
||||
requestOptions.headers['Content-Type'] =
|
||||
`multipart/related; boundary=${body.getBoundary()}`;
|
||||
|
||||
// Return the request data
|
||||
requestOptions.body = body;
|
||||
|
||||
@@ -30,8 +30,8 @@ export async function gristApiRequest(
|
||||
planType === 'free'
|
||||
? `https://docs.getgrist.com/api${endpoint}`
|
||||
: planType === 'paid'
|
||||
? `https://${customSubdomain}.getgrist.com/api${endpoint}`
|
||||
: `${selfHostedUrl}/api${endpoint}`;
|
||||
? `https://${customSubdomain}.getgrist.com/api${endpoint}`
|
||||
: `${selfHostedUrl}/api${endpoint}`;
|
||||
|
||||
const options: OptionsWithUri = {
|
||||
headers: {
|
||||
|
||||
@@ -83,8 +83,8 @@ export class Grist implements INodeType {
|
||||
planType === 'free'
|
||||
? `https://docs.getgrist.com/api${endpoint}`
|
||||
: planType === 'paid'
|
||||
? `https://${customSubdomain}.getgrist.com/api${endpoint}`
|
||||
: `${selfHostedUrl}/api${endpoint}`;
|
||||
? `https://${customSubdomain}.getgrist.com/api${endpoint}`
|
||||
: `${selfHostedUrl}/api${endpoint}`;
|
||||
|
||||
const options: OptionsWithUri = {
|
||||
headers: {
|
||||
|
||||
@@ -106,11 +106,10 @@ export async function haloPSAApiRequest(
|
||||
}`;
|
||||
}
|
||||
if (message.includes('403')) {
|
||||
(
|
||||
error as JsonObject
|
||||
).message = `You don\'t have permissions to ${method.toLowerCase()} ${resource
|
||||
.split('/')[1]
|
||||
.toLowerCase()}.`;
|
||||
(error as JsonObject).message =
|
||||
`You don\'t have permissions to ${method.toLowerCase()} ${resource
|
||||
.split('/')[1]
|
||||
.toLowerCase()}.`;
|
||||
}
|
||||
}
|
||||
throw new NodeApiError(this.getNode(), error as JsonObject);
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import { parse as parseUrl } from 'url';
|
||||
import nock from 'nock';
|
||||
import {
|
||||
initBinaryDataService,
|
||||
@@ -6,7 +7,6 @@ import {
|
||||
workflowToTests,
|
||||
getWorkflowFilenames,
|
||||
} from '@test/nodes/Helpers';
|
||||
import { parse as parseUrl } from 'url';
|
||||
|
||||
describe('Test HTTP Request Node', () => {
|
||||
const workflows = getWorkflowFilenames(__dirname);
|
||||
|
||||
Reference in New Issue
Block a user