New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@simonbackx/simple-endpoints

Package Overview
Dependencies
Maintainers
1
Versions
39
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@simonbackx/simple-endpoints - npm Package Compare versions

Comparing version 1.11.2 to 1.12.0

4

dist/src/EncodedResponse.d.ts
/// <reference types="node" />
/// <reference types="node" />
/// <reference types="node" />
import { Encodeable } from "@simonbackx/simple-encoding";

@@ -11,3 +13,3 @@ import http from "http";

constructor(status: number, headers: http.OutgoingHttpHeaders, body: any);
static encode(response: Response<Encodeable | Encodeable[] | string | undefined>, request: Request): EncodedResponse;
static encode(response: Response<Encodeable | Encodeable[] | string | Buffer | undefined>, request: Request): EncodedResponse;
}

@@ -21,4 +21,4 @@ "use strict";

const version = request.getVersion();
if (typeof response.body == "string") {
console.warn("We got a string value as body for JSON");
if (typeof response.body == "string" || response.body instanceof Buffer) {
console.warn("We got a string/Buffer value as body for JSON");
encoded.body = response.body;

@@ -46,3 +46,3 @@ }

else {
if (typeof response.body == "string") {
if (typeof response.body == "string" || response.body instanceof Buffer) {
encoded.body = response.body;

@@ -49,0 +49,0 @@ }

/// <reference types="node" />
/// <reference types="node" />
/// <reference types="node" />
import { Decoder, Encodeable } from "@simonbackx/simple-encoding";

@@ -8,3 +10,3 @@ import http from "http";

import { Response } from "./Response";
export declare abstract class Endpoint<Params, Query, RequestBody, ResponseBody extends Encodeable | Encodeable[] | string | undefined> {
export declare abstract class Endpoint<Params, Query, RequestBody, ResponseBody extends Encodeable | Encodeable[] | string | Buffer | undefined> {
protected queryDecoder: Decoder<Query> | undefined;

@@ -11,0 +13,0 @@ protected bodyDecoder: Decoder<RequestBody> | undefined;

@@ -5,3 +5,3 @@ {

"types": "./dist/index.d.ts",
"version": "1.11.2",
"version": "1.12.0",
"scripts": {

@@ -8,0 +8,0 @@ "test": "jest --setupFiles dotenv/config",

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