Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

bridge

Package Overview
Dependencies
Maintainers
1
Versions
99
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bridge - npm Package Compare versions

Comparing version 2.0.13 to 2.0.14

dist/package/utilities/formidable.d.ts

33

dist/package/bridge.d.ts

@@ -1,2 +0,1 @@

/// <reference types="node" />
import { BridgeRoutes } from './routes';

@@ -6,3 +5,2 @@ import { ErrorHandler } from './error';

import type * as express from 'express';
import formidableLib from 'formidable';
declare class Bridge<Routes extends BridgeRoutes> {

@@ -15,3 +13,3 @@ routes: Routes;

errorHandler?: ErrorHandler;
formidable?: typeof formidableLib;
formidable?: any;
}, url: string);

@@ -23,30 +21,3 @@ expressMiddleware: () => express.Handler;

url?: string | undefined;
formidable?: ({
(options?: formidableLib.Options | undefined): import("formidable/Formidable");
defaultOptions: formidableLib.DefaultOptions;
enabledPlugins: formidableLib.EnabledPlugins;
plugins: formidableLib.EnabledPlugins;
errors: {
FormidableError: {
new (message: string, internalCode: number, httpCode?: number | undefined): {
internalCode: number;
httpCode?: number | undefined;
name: string;
message: string;
stack?: string | undefined;
cause?: unknown;
};
captureStackTrace(targetObject: object, constructorOpt?: Function | undefined): void;
prepareStackTrace?: ((err: Error, stackTraces: NodeJS.CallSite[]) => any) | undefined;
stackTraceLimit: number;
};
} & Record<"missingPlugin" | "pluginFunction" | "aborted" | "noParser" | "uninitializedParser" | "filenameNotString" | "maxFieldsSizeExceeded" | "maxFieldsExceeded" | "smallerThanMinFileSize" | "biggerThanMaxFileSize" | "noEmptyFiles" | "missingContentType" | "malformedMultipart" | "missingMultipartBoundary" | "unknownTransferEncoding", number>;
File: typeof import("formidable/PersistentFile");
PersistentFile: typeof import("formidable/PersistentFile");
VolatileFile: typeof import("formidable/PersistentFile");
Formidable: typeof import("formidable/Formidable");
formidable: (options?: formidableLib.Options | undefined) => import("formidable/Formidable");
IncomingForm: typeof import("formidable/Formidable");
parsers: typeof import("formidable/parsers");
} & formidableLib.MappedParsers) | undefined;
formidable?: any;
errorHandler?: ErrorHandler | undefined;

@@ -53,0 +24,0 @@ }) => Bridge<Routes>;

@@ -17,5 +17,4 @@ "use strict";

}
// @ts-nocheck
const initBridge = ({ routes, url, errorHandler, formidable, }) => new Bridge(routes, { formidable, errorHandler }, url || '');
exports.initBridge = initBridge;
//# sourceMappingURL=bridge.js.map
import { Method } from '../routes';
import { KeysWithValNotEmptyObject, MidsReturnsIntersection, MidsParams } from '../utilities';
import { DataParser, BridgeHandler, InferDataParser, BridgeHandlerDocumentation, FileConfig } from './handlers';
import formidable from 'formidable';
import { FormidableFile } from '../utilities';
export interface BridgeParams<Resolve = any, Mids extends ReadonlyArray<BridgeHandler> = never, Meth extends Method = 'POST', Body extends DataParser<Record<any, any>> = never, Query extends DataParser<Record<any, any>> = never, Headers extends DataParser<Record<any, any>> = never, File extends FileConfig = ['BridgeFilesDoNotExists']> {

@@ -22,5 +22,5 @@ resolve: Resolve;

file: File extends ['BridgeFilesDoNotExists'] ? {} : File extends 'any' ? {
[key: string]: formidable.File;
[key: string]: FormidableFile;
} : {
[key in File[number]]: formidable.File;
[key in File[number]]: FormidableFile;
};

@@ -33,5 +33,5 @@ }> & keyof {

file: File extends ['BridgeFilesDoNotExists'] ? {} : File extends 'any' ? {
[key: string]: formidable.File;
[key: string]: FormidableFile;
} : {
[key in File[number]]: formidable.File;
[key in File[number]]: FormidableFile;
};

@@ -44,5 +44,5 @@ }]: {

file: File extends ['BridgeFilesDoNotExists'] ? {} : File extends 'any' ? {
[key: string]: formidable.File;
[key: string]: FormidableFile;
} : {
[key in File[number]]: formidable.File;
[key in File[number]]: FormidableFile;
};

@@ -49,0 +49,0 @@ }[key];

import { BridgeRoutes } from '../../routes';
import { ErrorHandler } from '../../error';
import type * as express from 'express';
import formidableLib from 'formidable';
export declare const createExpressMiddleware: (routes: BridgeRoutes, config?: {
errorHandler?: ErrorHandler;
formidable?: typeof formidableLib;
formidable?: any;
}) => express.Handler;
//# sourceMappingURL=express.d.ts.map

@@ -5,7 +5,6 @@ /// <reference types="node" />

import { BridgeRoutes } from '../../routes';
import formidableLib from 'formidable';
export declare const createHttpHandler: (routes: BridgeRoutes, config?: {
errorHandler?: ErrorHandler;
formidable?: typeof formidableLib;
formidable?: any;
}) => (req: IncomingMessage, res: ServerResponse) => Promise<ServerResponse<IncomingMessage>>;
//# sourceMappingURL=node-http.d.ts.map

@@ -1,4 +0,6 @@

import formidableLib from 'formidable';
import { FormidableFile } from '../../utilities';
import { IncomingMessage } from 'http';
export declare const formidableAsyncParseFiles: (req: IncomingMessage, formidable: typeof formidableLib) => Promise<formidableLib.Files>;
export declare const formidableAsyncParseFiles: (req: IncomingMessage, formidable: any) => Promise<{
[file: string]: FormidableFile | FormidableFile[];
}>;
//# sourceMappingURL=formidableAsync.d.ts.map
export * from './types';
export * from './apply';
export * from './formidable';
//# sourceMappingURL=index.d.ts.map

@@ -19,2 +19,3 @@ "use strict";

__exportStar(require("./apply"), exports);
__exportStar(require("./formidable"), exports);
//# sourceMappingURL=index.js.map
{
"name": "bridge",
"version": "2.0.13",
"version": "2.0.14",
"description": "Bridge is a new way of developing your api's",

@@ -34,5 +34,3 @@ "author": "El Ouahabi Nabil",

"@types/express": "^4.17.14",
"@types/formidable": "^2.0.5",
"express": "^4.18.2",
"formidable": "^2.1.1",
"nodemon": "^2.0.20",

@@ -39,0 +37,0 @@ "ts-node": "^10.9.1",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc