n8n/packages/workflow/src/index.ts
कारतोफ्फेलस्क्रिप्ट™ 31d8f478ee
refactor(core): Parse Webhook request bodies on-demand (#6394)
Also,
1. Consistent CORS support ~on all three webhook types~ waiting webhooks never supported CORS. I'll fix that in another PR
2. [Fixes binary-data handling when request body is text, json, or xml](https://linear.app/n8n/issue/NODE-505/webhook-binary-data-handling-fails-for-textplain-files).
3. Reduced number of middleware that each request has to go through.
4. Removed the need to maintain webhook endpoints in the auth-exception list.
5. Skip all middlewares (apart from `compression`) on Webhook routes. 
6. move `multipart/form-data` support out of individual nodes
7. upgrade `formidable`
8. fix the filenames on binary-data in webhooks nodes
9. add unit tests and integration tests for webhook request handling, and increase test coverage
2023-08-01 17:32:30 +02:00

61 lines
1.7 KiB
TypeScript

import * as LoggerProxy from './LoggerProxy';
export * as ErrorReporterProxy from './ErrorReporterProxy';
import * as NodeHelpers from './NodeHelpers';
import * as ObservableObject from './ObservableObject';
import * as TelemetryHelpers from './TelemetryHelpers';
export * from './Authentication';
export * from './Constants';
export * from './Cron';
export * from './DeferredPromise';
export * from './Interfaces';
export * from './MessageEventBus';
export * from './ExecutionStatus';
export * from './Expression';
export * from './ExpressionError';
export * from './NodeErrors';
export * from './NodeHelpers';
export * from './RoutingNode';
export * from './Workflow';
export * from './WorkflowActivationError';
export * from './WorkflowDataProxy';
export * from './WorkflowErrors';
export * from './WorkflowHooks';
export * from './VersionedNodeType';
export { LoggerProxy, NodeHelpers, ObservableObject, TelemetryHelpers };
export {
isObjectEmpty,
deepCopy,
jsonParse,
jsonStringify,
sleep,
fileTypeFromMimeType,
assert,
removeCircularRefs,
} from './utils';
export {
isINodeProperties,
isINodePropertyOptions,
isINodePropertyCollection,
isINodePropertiesList,
isINodePropertyCollectionList,
isINodePropertyOptionsList,
isResourceMapperValue,
} from './type-guards';
export { ExpressionExtensions } from './Extensions';
export { NativeMethods } from './NativeMethods';
export type { DocMetadata, NativeDoc } from './Extensions';
declare module 'http' {
export interface IncomingMessage {
contentType?: string;
encoding: BufferEncoding;
contentDisposition?: { type: string; filename?: string };
rawBody: Buffer;
readRawBody(): Promise<void>;
_body: boolean;
}
}