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

quidproquo-webserver

Package Overview
Dependencies
Maintainers
1
Versions
234
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

quidproquo-webserver - npm Package Compare versions

Comparing version 0.0.46 to 0.0.47

4

lib/qpqWebServerUtils.d.ts

@@ -5,3 +5,3 @@ import { QPQConfig } from 'quidproquo-core';

import { OpenApiQPQWebServerConfigSetting } from './config/settings/openApi';
import { HttpEventHeaders } from './types/HTTPEvent';
import { HttpEventHeaders, HTTPEventParams, HTTPEventResponse } from './types/HTTPEvent';
import { RouteOptions } from './config/settings/route';

@@ -18,1 +18,3 @@ export declare const getAllRoutes: (configs: QPQConfig) => RouteQPQWebServerConfigSetting[];

export declare const getCorsHeaders: (configs: QPQConfig, route: RouteOptions, reqHeaders: HttpEventHeaders) => HttpEventHeaders;
export declare const fromJsonEventRequest: <T>(httpJsonEvent: HTTPEventParams) => T;
export declare const toJsonEventResponse: (item: any, status?: number) => HTTPEventResponse;
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.getCorsHeaders = exports.getAllowedOrigins = exports.getHeaderValue = exports.getFeatureDomainName = exports.getDomainName = exports.getAllSrcEntries = exports.getAllOpenApiSpecs = exports.getDeployRegion = exports.getAllSeo = exports.getAllRoutes = void 0;
exports.toJsonEventResponse = exports.fromJsonEventRequest = exports.getCorsHeaders = exports.getAllowedOrigins = exports.getHeaderValue = exports.getFeatureDomainName = exports.getDomainName = exports.getAllSrcEntries = exports.getAllOpenApiSpecs = exports.getDeployRegion = exports.getAllSeo = exports.getAllRoutes = void 0;
const quidproquo_core_1 = require("quidproquo-core");

@@ -84,1 +84,19 @@ const QPQConfig_1 = require("./config/QPQConfig");

exports.getCorsHeaders = getCorsHeaders;
const fromJsonEventRequest = (httpJsonEvent) => {
const item = JSON.parse(httpJsonEvent.isBase64Encoded
? Buffer.from(httpJsonEvent.body, 'base64').toString()
: httpJsonEvent.body);
return item;
};
exports.fromJsonEventRequest = fromJsonEventRequest;
const toJsonEventResponse = (item, status = 200) => {
return {
status,
body: JSON.stringify(item),
isBase64Encoded: false,
headers: {
'content-type': 'application/json',
},
};
};
exports.toJsonEventResponse = toJsonEventResponse;

@@ -5,3 +5,3 @@ import { HTTPMethod } from 'quidproquo-core';

}
export interface HTTPEventParams<T> {
export interface HTTPEventParams<T = string> {
path: string;

@@ -16,2 +16,9 @@ query: {

sourceIp: string;
isBase64Encoded: boolean;
}
export interface HTTPEventResponse<T = string> {
status: number;
body?: T;
headers?: HttpEventHeaders;
isBase64Encoded: boolean;
}

@@ -15,2 +15,3 @@ import { HTTPMethod } from 'quidproquo-core';

sourceIp: string;
domain: string;
}

@@ -22,2 +23,3 @@ export interface SeoEventResponse {

headers?: SeoEventHeaders;
bodyEncoding?: 'binary' | 'base64';
}
{
"name": "quidproquo-webserver",
"version": "0.0.46",
"version": "0.0.47",
"description": "",

@@ -5,0 +5,0 @@ "main": "./lib/index.js",

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