Socket
Socket
Sign inDemoInstall

@pnpm/server

Package Overview
Dependencies
10
Maintainers
3
Versions
151
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.2.0 to 2.0.0

9

lib/connectStoreController.js

@@ -24,6 +24,7 @@ "use strict";

}),
getCacheByEngine: (storePath, id) => __awaiter(this, void 0, void 0, function* () {
return limitedFetch(`${remotePrefix}/getCacheByEngine`, {
id,
storePath,
getPackageLocation: (packageId, packageName, opts) => __awaiter(this, void 0, void 0, function* () {
return limitedFetch(`${remotePrefix}/getPackageLocation`, {
opts,
packageId,
packageName,
});

@@ -30,0 +31,0 @@ }),

@@ -20,4 +20,6 @@ "use strict";

if (req.method !== 'POST') {
res.statusCode = 503;
res.end(JSON.stringify(`Only POST is allowed, received ${req.method}`));
res.statusCode = 405; // Method Not Allowed
const responseError = { error: `Only POST is allowed, received ${req.method}` };
res.setHeader('Allow', 'POST');
res.end(JSON.stringify(responseError));
return;

@@ -126,6 +128,8 @@ }

break;
case '/getCacheByEngine':
body = yield bodyPromise;
res.end(JSON.stringify(yield store.getCacheByEngine(body.storePath, body.id)));
case '/getPackageLocation': {
const { packageId, packageName, opts } = (yield bodyPromise); // tslint:disable-line:no-any
const pkgLocation = yield store.getPackageLocation(packageId, packageName, opts);
res.end(JSON.stringify(pkgLocation));
break;
}
case '/findPackageUsages':

@@ -132,0 +136,0 @@ body = yield bodyPromise;

{
"name": "@pnpm/server",
"version": "1.2.0",
"version": "2.0.0",
"description": "A pnpm installer server",

@@ -37,4 +37,4 @@ "main": "lib/index.js",

"@pnpm/npm-resolver": "2.2.7",
"@pnpm/package-requester": "4.1.11",
"@pnpm/package-store": "1.3.0",
"@pnpm/package-requester": "5.0.0",
"@pnpm/package-store": "2.0.0",
"@pnpm/server": "link:",

@@ -53,3 +53,3 @@ "@pnpm/tarball-fetcher": "2.0.8",

"ts-node": "7.0.1",
"tslint": "5.11.0",
"tslint": "5.12.0",
"typescript": "3.2.2"

@@ -66,6 +66,6 @@ },

"dependencies": {
"@pnpm/store-controller-types": "1.2.0",
"@pnpm/store-controller-types": "2.0.0",
"@pnpm/types": "2.0.0",
"@types/got": "8.3.4",
"@types/node": "10.12.12",
"@types/node": "10.12.15",
"@types/p-limit": "2.0.0",

@@ -72,0 +72,0 @@ "@types/uuid": "3.4.4",

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

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc