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

@compas/server

Package Overview
Dependencies
Maintainers
1
Versions
196
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@compas/server - npm Package Compare versions

Comparing version 0.0.185 to 0.0.186

4

package.json
{
"name": "@compas/server",
"version": "0.0.185",
"version": "0.0.186",
"description": "Koa server and common middleware",

@@ -18,3 +18,3 @@ "main": "./index.js",

"dependencies": {
"@compas/stdlib": "0.0.185",
"@compas/stdlib": "0.0.186",
"@types/formidable": "2.0.4",

@@ -21,0 +21,0 @@ "@types/koa": "2.13.4",

@@ -16,3 +16,2 @@ /**

): BodyParserPair;
export type Middleware = import("koa").Middleware;
export type KoaBodyOptions = {

@@ -33,6 +32,6 @@ urlencoded?: boolean | undefined;

export type BodyParserPair = {
bodyParser: Middleware;
multipartBodyParser: Middleware;
bodyParser: import("koa").Middleware;
multipartBodyParser: import("koa").Middleware;
};
import formidable from "formidable";
//# sourceMappingURL=body.d.ts.map

@@ -6,6 +6,2 @@ import { AppError } from "@compas/stdlib";

/**
* @typedef {import("koa").Middleware} Middleware
*/
/**
* @typedef {object} KoaBodyOptions

@@ -25,4 +21,4 @@ * @property {boolean|undefined} [urlencoded]

* @typedef {object} BodyParserPair
* @property {Middleware} bodyParser
* @property {Middleware} multipartBodyParser
* @property {import("koa").Middleware} bodyParser
* @property {import("koa").Middleware} multipartBodyParser
*/

@@ -140,3 +136,3 @@

* @param {formidable.Options} opts
* @returns {Middleware}
* @returns {import("koa").Middleware}
*/

@@ -143,0 +139,0 @@ function koaFormidable(opts = {}) {

/**
* @typedef {import("koa").Middleware} Middleware
*/
/**
* Compose `middleware` returning of all those which are passed.

@@ -9,7 +6,8 @@ *

*
* @param {Middleware[]} middleware
* @returns {Middleware}
* @param {import("koa").Middleware[]} middleware
* @returns {import("koa").Middleware}
*/
export function compose(middleware: Middleware[]): Middleware;
export type Middleware = import("koa").Middleware;
export function compose(
middleware: import("koa").Middleware[],
): import("koa").Middleware;
//# sourceMappingURL=compose.d.ts.map

@@ -9,6 +9,2 @@ /*

/**
* @typedef {import("koa").Middleware} Middleware
*/
/**
* Compose `middleware` returning of all those which are passed.

@@ -18,4 +14,4 @@ *

*
* @param {Middleware[]} middleware
* @returns {Middleware}
* @param {import("koa").Middleware[]} middleware
* @returns {import("koa").Middleware}
*/

@@ -22,0 +18,0 @@ export function compose(middleware) {

/**
* Handle any upstream errors
*
* @param {ErrorHandlerOptions} opts
* @param {import("../app").ErrorHandlerOptions} opts
* @returns {Middleware}
*/
export function errorHandler(opts: ErrorHandlerOptions): Middleware;
export type ErrorHandlerOptions = import("../app").ErrorHandlerOptions;
export function errorHandler(
opts: import("../app").ErrorHandlerOptions,
): Middleware;
//# sourceMappingURL=error.d.ts.map
import { AppError, isStaging } from "@compas/stdlib";
/**
* @typedef {import("../app").ErrorHandlerOptions} ErrorHandlerOptions
*/
/**
* @type {NonNullable<ErrorHandlerOptions["onError"]>}
* @type {NonNullable<import("../app").ErrorHandlerOptions["onError"]>}
* Default onError handler that doesn't handle anything

@@ -14,3 +10,3 @@ */

/**
* @type {NonNullable<ErrorHandlerOptions["onAppError"]>}
* @type {NonNullable<import("../app").ErrorHandlerOptions["onAppError"]>}
* Default onAppError handler that builds a simple object with key, message and info.

@@ -23,3 +19,3 @@ */

*
* @param {ErrorHandlerOptions} opts
* @param {import("../app").ErrorHandlerOptions} opts
* @returns {Middleware}

@@ -26,0 +22,0 @@ */

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