Socket
Socket
Sign inDemoInstall

@pnpm/server

Package Overview
Dependencies
11
Maintainers
2
Versions
151
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.8.2 to 0.9.0

23

lib/connectStoreController.js

@@ -20,2 +20,3 @@ "use strict";

close: () => __awaiter(this, void 0, void 0, function* () { return; }),
fetchPackage: fetchPackage.bind(null, remotePrefix, limitedFetch),
importPackage: (from, to, opts) => __awaiter(this, void 0, void 0, function* () {

@@ -104,2 +105,24 @@ yield limitedFetch(`${remotePrefix}/importPackage`, {

}
function fetchPackage(remotePrefix, limitedFetch, // tslint:disable-line
options) {
const msgId = uuid.v4();
return limitedFetch(`${remotePrefix}/fetchPackage`, {
msgId,
options,
})
.then((fetchResponseBody) => {
const fetchingManifest = limitedFetch(`${remotePrefix}/manifestResponse`, {
msgId,
});
const fetchingFiles = limitedFetch(`${remotePrefix}/packageFilesResponse`, {
msgId,
});
return {
fetchingFiles,
fetchingManifest,
finishing: Promise.all([fetchingManifest, fetchingFiles]).then(() => undefined),
inStoreLocation: fetchResponseBody.inStoreLocation,
};
});
}
//# sourceMappingURL=connectStoreController.js.map

15

lib/createServer.js

@@ -47,3 +47,3 @@ "use strict";

switch (req.url) {
case '/requestPackage':
case '/requestPackage': {
body = yield bodyPromise;

@@ -59,2 +59,15 @@ const pkgResponse = yield store.requestPackage(body.wantedDependency, body.options);

break;
}
case '/fetchPackage': {
body = yield bodyPromise;
const pkgResponse = yield store.fetchPackage(body.options);
if (pkgResponse['fetchingManifest']) {
manifestPromises[body.msgId] = pkgResponse['fetchingManifest']; // tslint:disable-line
}
if (pkgResponse['fetchingFiles']) {
filesPromises[body.msgId] = pkgResponse['fetchingFiles']; // tslint:disable-line
}
res.end(JSON.stringify({ inStoreLocation: pkgResponse.inStoreLocation }));
break;
}
case '/packageFilesResponse':

@@ -61,0 +74,0 @@ body = yield bodyPromise;

8

package.json
{
"name": "@pnpm/server",
"version": "0.8.2",
"version": "0.9.0",
"description": "A pnpm installer server",

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

"dependencies": {
"@pnpm/package-requester": "^0.8.0",
"@pnpm/package-requester": "^0.8.5",
"@pnpm/resolver-base": "^1.0.0",
"@pnpm/types": "^1.7.0",
"@types/got": "^7.1.6",

@@ -71,5 +73,5 @@ "@types/node": "^9.3.0",

"p-limit": "^1.1.0",
"package-store": "^0.17.0",
"package-store": "^0.18.0",
"uuid": "^3.1.0"
}
}

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