Socket
Socket
Sign inDemoInstall

@bunt/app

Package Overview
Dependencies
Maintainers
1
Versions
123
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@bunt/app - npm Package Compare versions

Comparing version 0.15.25 to 0.16.0

dist/Request/HeadersAbstract.d.ts

16

CHANGELOG.md

@@ -6,2 +6,18 @@ # Change Log

# [0.16.0](https://github.com/izatop/bunt/compare/v0.15.25...v0.16.0) (2021-05-21)
### Bug Fixes
* update deps ([1900c81](https://github.com/izatop/bunt/commit/1900c81e2f4f873f3b109e895f661aa5efb51b25))
### Features
* clean codebase ([357d6aa](https://github.com/izatop/bunt/commit/357d6aaac3b647e7262459c368c6eb94fab8f96a))
## [0.15.25](https://github.com/izatop/bunt/compare/v0.15.24...v0.15.25) (2021-05-11)

@@ -8,0 +24,0 @@

4

dist/Application.d.ts
import { ApplyContext, Context, ContextArg, IContext, Unit } from "@bunt/unit";
import { Logger } from "@bunt/util";
import { IRequestMessage, MatchRoute, RouteResponse } from "./interfaces";
import { ActionResponse, IRequest, MatchRoute } from "./interfaces";
import { IRoute } from "./Route";

@@ -15,4 +15,4 @@ export declare class Application<C extends IContext> {

remove<R extends IRoute>(route: MatchRoute<C, R>): this;
run<R extends IRequestMessage>(request: R): Promise<RouteResponse>;
run(request: IRequest): Promise<ActionResponse>;
getRoutes(): IRoute[];
}

@@ -0,5 +1,6 @@

export * from "./Payload";
export * from "./Route";
export * from "./Transport";
export * from "./Request";
export * from "./TransformRequest";
export * from "./Application";
export * from "./Payload";
export * from "./interfaces";

@@ -13,7 +13,8 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
__exportStar(require("./Payload"), exports);
__exportStar(require("./Route"), exports);
__exportStar(require("./Transport"), exports);
__exportStar(require("./Request"), exports);
__exportStar(require("./TransformRequest"), exports);
__exportStar(require("./Application"), exports);
__exportStar(require("./Payload"), exports);
__exportStar(require("./interfaces"), exports);
//# sourceMappingURL=index.js.map

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

import { IRoute } from "./Route";
export declare type RouteResponse = Error | {
export declare type ActionResponse = Error | {
stringify(): string;
} | NodeJS.ReadableStream | Buffer | string | number | boolean | null | undefined | void | any;
export declare type RouteAction = Action<any, any>;
export declare type MatchRoute<C extends Context, R> = R extends IRoute<infer A> ? A extends Action<infer AC, any, RouteResponse> ? MatchContext<C, AC> extends AC ? R : ["Action context doesn't match its parent context", C, AC] : ["Action doesn't satisfy its interface", A] : never;
export declare type MatchRoute<C extends Context, R> = R extends IRoute<infer A> ? A extends Action<infer AC, any, ActionResponse> ? MatchContext<C, AC> extends AC ? R : ["Action context doesn't match its parent context", C, AC] : ["Action doesn't satisfy its interface", A] : never;
export interface IKeyValueMap {

@@ -23,5 +23,5 @@ has(name: string): boolean;

export interface IRequestBodyTransform<T> {
transform(request: IRequestMessage): Promise<T>;
transform(request: IRequest): Promise<T>;
}
export declare type RequestTransformType<T> = IRequestBodyTransform<T> | ((request: IRequestMessage) => Promise<T>);
export declare type RequestTransformType<T> = IRequestBodyTransform<T> | ((request: IRequest) => Promise<T>);
export interface IRequestTransform<T> {

@@ -31,3 +31,3 @@ type: string | string[];

}
export interface IRequestMessage {
export interface IRequest {
readonly route: string;

@@ -43,11 +43,2 @@ readonly headers: IHeaders;

}
export interface IResponder extends IRequestMessage {
readonly complete: boolean;
respond(response: RouteResponse): Promise<void>;
}
/**
* @deprecated see IResponder
*/
export interface IRequest extends IResponder {
}
export declare type HeaderAssertValue = string | string[] | ((value: string) => boolean | void);

@@ -54,0 +45,0 @@ export interface IHeaders extends IKeyValueMap {

import { Action, ActionCtor, IContext } from "@bunt/unit";
import { IRequestMessage, RouteAction } from "../interfaces";
import { IRequest, RouteAction } from "../interfaces";
import { Payload } from "../Payload";

@@ -18,3 +18,3 @@ import { Route } from "./Route";

context: C;
request: IRequestMessage;
request: IRequest;
args: Map<string, string>;

@@ -21,0 +21,0 @@ }

{
"name": "@bunt/app",
"version": "0.15.25",
"version": "0.16.0",
"keywords": [

@@ -29,9 +29,9 @@ "typescript"

"dependencies": {
"@bunt/input": "^0.15.25",
"@bunt/unit": "^0.15.11",
"@bunt/util": "^0.15.11",
"@bunt/input": "^0.16.0",
"@bunt/unit": "^0.16.0",
"@bunt/util": "^0.16.0",
"path-to-regexp": "^6.2.0"
},
"license": "MIT",
"gitHead": "9c7e97d85e1e3c09c82170b1bd7e414896b3e0b4"
"gitHead": "1813f3a8c5f24d37f062b42700e16b8e00629b39"
}

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