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

@makeflow/gateway

Package Overview
Dependencies
Maintainers
7
Versions
23
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@makeflow/gateway - npm Package Compare versions

Comparing version 0.1.3 to 0.1.4

4

bld/library/target/target.d.ts
import { Context, Next } from 'koa';
import { Dict } from 'tslang';
export declare type GatewayTargetMatchFunction = (context: Context) => string | undefined;
export interface IGatewayTargetDescriptor {
type: string;
match?: string | RegExp | {
match?: string | RegExp | GatewayTargetMatchFunction | {
path?: string | RegExp;
headers?: Dict<string | RegExp | boolean>;
test?(context: Context): boolean;
};

@@ -10,0 +10,0 @@ session?: boolean;

@@ -23,3 +23,6 @@ "use strict";

}
let { path: pathPattern, headers: headerPatternDict, test } = match;
if (typeof match === 'function') {
return match(context);
}
let { path: pathPattern, headers: headerPatternDict } = match;
let base = '';

@@ -36,5 +39,2 @@ if (pathPattern) {

}
if (test && !test(context)) {
return undefined;
}
return base;

@@ -41,0 +41,0 @@ }

{
"name": "@makeflow/gateway",
"version": "0.1.3",
"version": "0.1.4",
"repository": {

@@ -5,0 +5,0 @@ "type": "git",

@@ -10,2 +10,6 @@ import {Context, Next} from 'koa';

export type GatewayTargetMatchFunction = (
context: Context,
) => string | undefined;
export interface IGatewayTargetDescriptor {

@@ -16,6 +20,6 @@ type: string;

| RegExp
| GatewayTargetMatchFunction
| {
path?: string | RegExp;
headers?: Dict<string | RegExp | boolean>;
test?(context: Context): boolean;
};

@@ -47,4 +51,8 @@ session?: boolean;

let {path: pathPattern, headers: headerPatternDict, test} = match;
if (typeof match === 'function') {
return match(context);
}
let {path: pathPattern, headers: headerPatternDict} = match;
let base: string | undefined = '';

@@ -67,6 +75,2 @@

if (test && !test(context)) {
return undefined;
}
return base;

@@ -73,0 +77,0 @@ }

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