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

@specter/specter

Package Overview
Dependencies
Maintainers
3
Versions
35
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@specter/specter - npm Package Compare versions

Comparing version 0.0.27 to 0.1.0

2

lib/errors.d.ts

@@ -8,3 +8,3 @@ declare type SharedRequest = {

declare type SharedResponse = {
header: Record<string, string>;
headers: Record<string, string>;
body: Record<string, string>;

@@ -11,0 +11,0 @@ };

@@ -5,7 +5,7 @@ import SpecterRequest from "./request";

status?: number;
header: H;
headers: H;
body: B;
error?: any;
nextReqs?: SpecterRequest<any, any, any>[];
constructor(header: H, body: B);
constructor(headers: H, body: B);
setStatus(status: number): void;

@@ -12,0 +12,0 @@ setNextReqs(...reqs: SpecterRequest<any, any, any>[]): void;

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
class SpecterResponse {
constructor(header, body) {
this.header = header;
constructor(headers, body) {
this.headers = headers;
this.body = body;

@@ -12,4 +12,4 @@ }

setNextReqs(...reqs) {
this.header = {
...this.header,
this.headers = {
...this.headers,
"x-specter-next-reqs": reqs.map(req => req.toString()).join("__sep__")

@@ -16,0 +16,0 @@ };

@@ -46,9 +46,9 @@ "use strict";

const response = await service.execute(request);
const header = {};
for (const [key, value] of Object.entries(response.header)) {
header[key] = value;
const headers = {};
for (const [key, value] of Object.entries(response.headers)) {
headers[key] = value;
}
header["Content-Type"] = DefaultContentType;
header["access-control-expose-headers"] = Object.keys(header).join(",");
res.writeHead(response.status || 200, header);
headers["Content-Type"] = DefaultContentType;
headers["access-control-expose-headers"] = Object.keys(headers).join(",");
res.writeHead(response.status || 200, headers);
if (response.body) {

@@ -55,0 +55,0 @@ res.end(JSON.stringify(response.body));

{
"name": "@specter/specter",
"version": "0.0.27",
"version": "0.1.0",
"description": "> TODO: description",

@@ -36,6 +36,6 @@ "author": "Yosuke Furukawa <yosuke.furukawa@gmail.com>",

"isomorphic-unfetch": "3.0.0",
"jest": "25.2.7",
"jest": "25.3.0",
"typescript": "3.8.3"
},
"gitHead": "70d8f35e36d37cb08f337079976b35ac0f09aa0d",
"gitHead": "c6566719e94c2c67191a49b27985b8abb17ac6c8",
"publishConfig": {

@@ -42,0 +42,0 @@ "access": "public"

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