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

code-push

Package Overview
Dependencies
Maintainers
8
Versions
56
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

code-push - npm Package Compare versions

Comparing version 2.0.0-beta to 2.0.1-beta

2

package.json
{
"name": "code-push",
"version": "2.0.0-beta",
"version": "2.0.1-beta",
"description": "Management SDK for the CodePush service",

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

@@ -172,3 +172,3 @@ var fs = require("fs");

AccountManager.prototype.getApp = function (appName) {
return this.get((_a = ["/apps/", ""], _a.raw = ["/apps/", ""], urlEncode(_a, appName)))
return this.get((_a = ["/apps/", ""], _a.raw = ["/apps/", ""], urlEncode(_a, this.appNameParam(appName))))
.then(function (res) { return res.body.app; });

@@ -190,3 +190,3 @@ var _a;

AccountManager.prototype.removeApp = function (appName) {
return this.del((_a = ["/apps/", ""], _a.raw = ["/apps/", ""], urlEncode(_a, appName)))
return this.del((_a = ["/apps/", ""], _a.raw = ["/apps/", ""], urlEncode(_a, this.appNameParam(appName))))
.then(function () { return null; });

@@ -196,3 +196,3 @@ var _a;

AccountManager.prototype.renameApp = function (oldAppName, newAppName) {
return this.patch((_a = ["/apps/", ""], _a.raw = ["/apps/", ""], urlEncode(_a, oldAppName)), JSON.stringify({ name: newAppName }))
return this.patch((_a = ["/apps/", ""], _a.raw = ["/apps/", ""], urlEncode(_a, this.appNameParam(oldAppName))), JSON.stringify({ name: newAppName }))
.then(function () { return null; });

@@ -202,3 +202,3 @@ var _a;

AccountManager.prototype.transferApp = function (appName, email) {
return this.post((_a = ["/apps/", "/transfer/", ""], _a.raw = ["/apps/", "/transfer/", ""], urlEncode(_a, appName, email)), null, false)
return this.post((_a = ["/apps/", "/transfer/", ""], _a.raw = ["/apps/", "/transfer/", ""], urlEncode(_a, this.appNameParam(appName), email)), null, false)
.then(function () { return null; });

@@ -209,3 +209,3 @@ var _a;

AccountManager.prototype.getCollaborators = function (appName) {
return this.get((_a = ["/apps/", "/collaborators"], _a.raw = ["/apps/", "/collaborators"], urlEncode(_a, appName)))
return this.get((_a = ["/apps/", "/collaborators"], _a.raw = ["/apps/", "/collaborators"], urlEncode(_a, this.appNameParam(appName))))
.then(function (res) { return res.body.collaborators; });

@@ -215,3 +215,3 @@ var _a;

AccountManager.prototype.addCollaborator = function (appName, email) {
return this.post((_a = ["/apps/", "/collaborators/", ""], _a.raw = ["/apps/", "/collaborators/", ""], urlEncode(_a, appName, email)), null, false)
return this.post((_a = ["/apps/", "/collaborators/", ""], _a.raw = ["/apps/", "/collaborators/", ""], urlEncode(_a, this.appNameParam(appName), email)), null, false)
.then(function () { return null; });

@@ -221,3 +221,3 @@ var _a;

AccountManager.prototype.removeCollaborator = function (appName, email) {
return this.del((_a = ["/apps/", "/collaborators/", ""], _a.raw = ["/apps/", "/collaborators/", ""], urlEncode(_a, appName, email)))
return this.del((_a = ["/apps/", "/collaborators/", ""], _a.raw = ["/apps/", "/collaborators/", ""], urlEncode(_a, this.appNameParam(appName), email)))
.then(function () { return null; });

@@ -229,3 +229,3 @@ var _a;

var deployment = { name: deploymentName };
return this.post((_a = ["/apps/", "/deployments/"], _a.raw = ["/apps/", "/deployments/"], urlEncode(_a, appName)), JSON.stringify(deployment), true)
return this.post((_a = ["/apps/", "/deployments/"], _a.raw = ["/apps/", "/deployments/"], urlEncode(_a, this.appNameParam(appName))), JSON.stringify(deployment), true)
.then(function (res) { return res.body.deployment; });

@@ -235,3 +235,3 @@ var _a;

AccountManager.prototype.clearDeploymentHistory = function (appName, deploymentName) {
return this.del((_a = ["/apps/", "/deployments/", "/history"], _a.raw = ["/apps/", "/deployments/", "/history"], urlEncode(_a, appName, deploymentName)))
return this.del((_a = ["/apps/", "/deployments/", "/history"], _a.raw = ["/apps/", "/deployments/", "/history"], urlEncode(_a, this.appNameParam(appName), deploymentName)))
.then(function () { return null; });

@@ -241,3 +241,3 @@ var _a;

AccountManager.prototype.getDeployments = function (appName) {
return this.get((_a = ["/apps/", "/deployments/"], _a.raw = ["/apps/", "/deployments/"], urlEncode(_a, appName)))
return this.get((_a = ["/apps/", "/deployments/"], _a.raw = ["/apps/", "/deployments/"], urlEncode(_a, this.appNameParam(appName))))
.then(function (res) { return res.body.deployments; });

@@ -247,3 +247,3 @@ var _a;

AccountManager.prototype.getDeployment = function (appName, deploymentName) {
return this.get((_a = ["/apps/", "/deployments/", ""], _a.raw = ["/apps/", "/deployments/", ""], urlEncode(_a, appName, deploymentName)))
return this.get((_a = ["/apps/", "/deployments/", ""], _a.raw = ["/apps/", "/deployments/", ""], urlEncode(_a, this.appNameParam(appName), deploymentName)))
.then(function (res) { return res.body.deployment; });

@@ -253,3 +253,3 @@ var _a;

AccountManager.prototype.renameDeployment = function (appName, oldDeploymentName, newDeploymentName) {
return this.patch((_a = ["/apps/", "/deployments/", ""], _a.raw = ["/apps/", "/deployments/", ""], urlEncode(_a, appName, oldDeploymentName)), JSON.stringify({ name: newDeploymentName }))
return this.patch((_a = ["/apps/", "/deployments/", ""], _a.raw = ["/apps/", "/deployments/", ""], urlEncode(_a, this.appNameParam(appName), oldDeploymentName)), JSON.stringify({ name: newDeploymentName }))
.then(function () { return null; });

@@ -259,3 +259,3 @@ var _a;

AccountManager.prototype.removeDeployment = function (appName, deploymentName) {
return this.del((_a = ["/apps/", "/deployments/", ""], _a.raw = ["/apps/", "/deployments/", ""], urlEncode(_a, appName, deploymentName)))
return this.del((_a = ["/apps/", "/deployments/", ""], _a.raw = ["/apps/", "/deployments/", ""], urlEncode(_a, this.appNameParam(appName), deploymentName)))
.then(function () { return null; });

@@ -265,3 +265,3 @@ var _a;

AccountManager.prototype.getDeploymentMetrics = function (appName, deploymentName) {
return this.get((_a = ["/apps/", "/deployments/", "/metrics"], _a.raw = ["/apps/", "/deployments/", "/metrics"], urlEncode(_a, appName, deploymentName)))
return this.get((_a = ["/apps/", "/deployments/", "/metrics"], _a.raw = ["/apps/", "/deployments/", "/metrics"], urlEncode(_a, this.appNameParam(appName), deploymentName)))
.then(function (res) { return res.body.metrics; });

@@ -271,3 +271,3 @@ var _a;

AccountManager.prototype.getDeploymentHistory = function (appName, deploymentName) {
return this.get((_a = ["/apps/", "/deployments/", "/history"], _a.raw = ["/apps/", "/deployments/", "/history"], urlEncode(_a, appName, deploymentName)))
return this.get((_a = ["/apps/", "/deployments/", "/history"], _a.raw = ["/apps/", "/deployments/", "/history"], urlEncode(_a, this.appNameParam(appName), deploymentName)))
.then(function (res) { return res.body.history; });

@@ -280,3 +280,3 @@ var _a;

updateMetadata.appVersion = targetBinaryVersion;
var request = superagent.post(_this._serverUrl + (_a = ["/apps/", "/deployments/", "/release"], _a.raw = ["/apps/", "/deployments/", "/release"], urlEncode(_a, appName, deploymentName)));
var request = superagent.post(_this._serverUrl + (_a = ["/apps/", "/deployments/", "/release"], _a.raw = ["/apps/", "/deployments/", "/release"], urlEncode(_a, _this.appNameParam(appName), deploymentName)));
if (_this._proxy)

@@ -328,3 +328,3 @@ request.proxy(_this._proxy);

var requestBody = JSON.stringify({ packageInfo: updateMetadata });
return this.patch((_a = ["/apps/", "/deployments/", "/release"], _a.raw = ["/apps/", "/deployments/", "/release"], urlEncode(_a, appName, deploymentName)), requestBody, false)
return this.patch((_a = ["/apps/", "/deployments/", "/release"], _a.raw = ["/apps/", "/deployments/", "/release"], urlEncode(_a, this.appNameParam(appName), deploymentName)), requestBody, false)
.then(function () { return null; });

@@ -335,3 +335,3 @@ var _a;

var requestBody = JSON.stringify({ packageInfo: updateMetadata });
return this.post((_a = ["/apps/", "/deployments/", "/promote/", ""], _a.raw = ["/apps/", "/deployments/", "/promote/", ""], urlEncode(_a, appName, sourceDeploymentName, destinationDeploymentName)), requestBody, false)
return this.post((_a = ["/apps/", "/deployments/", "/promote/", ""], _a.raw = ["/apps/", "/deployments/", "/promote/", ""], urlEncode(_a, this.appNameParam(appName), sourceDeploymentName, destinationDeploymentName)), requestBody, false)
.then(function () { return null; });

@@ -341,3 +341,3 @@ var _a;

AccountManager.prototype.rollback = function (appName, deploymentName, targetRelease) {
return this.post((_a = ["/apps/", "/deployments/", "/rollback/", ""], _a.raw = ["/apps/", "/deployments/", "/rollback/", ""], urlEncode(_a, appName, deploymentName, targetRelease || "")), null, false)
return this.post((_a = ["/apps/", "/deployments/", "/rollback/", ""], _a.raw = ["/apps/", "/deployments/", "/rollback/", ""], urlEncode(_a, this.appNameParam(appName), deploymentName, targetRelease || "")), null, false)
.then(function () { return null; });

@@ -480,2 +480,16 @@ var _a;

};
// IIS and Azure web apps have this annoying behavior where %2F (URL encoded slashes) in the URL are URL decoded
// BEFORE the requests reach node. That essentially means there's no good way to encode a "/" in the app name--
// URL encodeing will work when running locally but when running on Azure it gets decoded before express sees it,
// so app names with slashes don't get routed properly. See https://github.com/tjanczuk/iisnode/issues/343 (or other sites
// that complain about the same) for some more info. I explored some IIS config based workarounds, but the previous
// link seems to say they won't work, so I eventually gave up on that.
// Anyway, to workaround this issue, we now allow the client to encode / characters as ~~ (two tildes, URL encoded).
// The CLI now converts / to ~~ if / appears in an app name, before passing that as part of the URL. This code below
// does the encoding. It's hack, but seems like the least bad option here.
// Eventually, this service will go away & we'll all be on Max's new service. That's hosted in docker, no more IIS,
// so this issue should go away then.
AccountManager.prototype.appNameParam = function (appName) {
return appName.replace("/", "~~");
};
AccountManager.AppPermission = {

@@ -482,0 +496,0 @@ OWNER: "Owner",

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