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

code-push

Package Overview
Dependencies
Maintainers
11
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 4.1.3 to 4.2.0

8

package.json
{
"name": "code-push",
"version": "4.1.3",
"version": "4.2.0",
"description": "Management SDK for the CodePush service",

@@ -16,3 +16,3 @@ "main": "script/index.js",

"test:debugger": "mocha --recursive --inspect-brk=0.0.0.0 bin/test",
"content": "shx cp {plugin.xml,README.md,package.json,.npmignore} bin"
"content": "shx cp {README.md,package.json,.npmignore} bin"
},

@@ -28,6 +28,6 @@ "repository": {

"appcenter-file-upload-client": "0.1.0",
"proxy-agent": "^6.3.0",
"recursive-fs": "^2.1.0",
"slash": "^3.0.0",
"superagent": "^8.0.0",
"superagent-proxy": "^3.0.0",
"yazl": "^2.5.1"

@@ -44,4 +44,4 @@ },

"superagent-mock": "^4.0.0",
"typescript": "^4.4.3"
"typescript": "^5.1.6"
}
}

@@ -7,3 +7,3 @@ [![appcenterbanner](https://user-images.githubusercontent.com/31293287/32969262-3cc5d48a-cb99-11e7-91bf-fa57c67a371c.png)](http://microsoft.github.io/code-push/)

[CodePush](https://microsoft.github.io/code-push) is a cloud service that enables Cordova and React Native developers to deploy mobile app updates directly to their users' devices. It works by acting as a central repository that developers can publish updates to (JS, HTML, CSS and images), and that apps can query for updates from (using provided client SDK for [Cordova](https://github.com/Microsoft/cordova-plugin-code-push) and [React Native](https://github.com/Microsoft/react-native-code-push)). This allows you to have a more deterministic and direct engagement model with your userbase, when addressing bugs and/or adding small features that don't require you to re-build a binary and re-distribute it through the respective app stores.
[CodePush](https://microsoft.github.io/code-push) is a cloud service that enables React Native developers to deploy mobile app updates directly to their users' devices. It works by acting as a central repository that developers can publish updates to (JS, HTML, CSS and images), and that apps can query for updates from (using provided client SDK for [React Native](https://github.com/Microsoft/react-native-code-push)). This allows you to have a more deterministic and direct engagement model with your userbase, when addressing bugs and/or adding small features that don't require you to re-build a binary and re-distribute it through the respective app stores.

@@ -10,0 +10,0 @@ To get started using CodePush, refer to our [documentation](https://docs.microsoft.com/en-us/appcenter/distribution/codepush/), otherwise, read the following steps if you'd like to build/contribute to the project from source.

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

var code_push_error_1 = require("./code-push-error");
var AcquisitionStatus = /** @class */ (function () {
var AcquisitionStatus = exports.AcquisitionStatus = /** @class */ (function () {
function AcquisitionStatus() {

@@ -13,3 +13,2 @@ }

}());
exports.AcquisitionStatus = AcquisitionStatus;
var AcquisitionManager = /** @class */ (function () {

@@ -42,3 +41,3 @@ function AcquisitionManager(httpRequester, configuration) {

var requestUrl = this._serverUrl + this._publicPrefixUrl + "update_check?" + queryStringify(updateRequest);
this._httpRequester.request(0 /* GET */, requestUrl, function (error, response) {
this._httpRequester.request(0 /* Http.Verb.GET */, requestUrl, function (error, response) {
if (error) {

@@ -51,6 +50,6 @@ callback(error, /*remotePackage=*/ null);

if (response.statusCode === 0) {
errorMessage = "Couldn't send request to " + requestUrl + ", xhr.statusCode = 0 was returned. One of the possible reasons for that might be connection problems. Please, check your internet connection.";
errorMessage = "Couldn't send request to ".concat(requestUrl, ", xhr.statusCode = 0 was returned. One of the possible reasons for that might be connection problems. Please, check your internet connection.");
}
else {
errorMessage = response.statusCode + ": " + response.body;
errorMessage = "".concat(response.statusCode, ": ").concat(response.body);
}

@@ -129,3 +128,3 @@ callback(new code_push_error_1.CodePushHttpError(errorMessage), /*remotePackage=*/ null);

callback = typeof arguments[arguments.length - 1] === "function" && arguments[arguments.length - 1];
this._httpRequester.request(2 /* POST */, url, JSON.stringify(body), function (error, response) {
this._httpRequester.request(2 /* Http.Verb.POST */, url, JSON.stringify(body), function (error, response) {
if (callback) {

@@ -151,3 +150,3 @@ if (error) {

};
this._httpRequester.request(2 /* POST */, url, JSON.stringify(body), function (error, response) {
this._httpRequester.request(2 /* Http.Verb.POST */, url, JSON.stringify(body), function (error, response) {
if (callback) {

@@ -154,0 +153,0 @@ if (error) {

@@ -8,3 +8,7 @@ "use strict";

if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {

@@ -41,3 +45,3 @@ if (k2 === undefined) k2 = k;

if (f) throw new TypeError("Generator is already executing.");
while (_) try {
while (g && (g = 0, op[0] && (_ = 0)), _) try {
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;

@@ -248,3 +252,3 @@ if (y = 0, t) op = [op[0] & 2, t.value];

apigatewayAppCreationRequest = this._adapter.toApigatewayAppCreationRequest(app);
path = apigatewayAppCreationRequest.org ? "/orgs/" + apigatewayAppCreationRequest.org + "/apps" : "/apps";
path = apigatewayAppCreationRequest.org ? "/orgs/".concat(apigatewayAppCreationRequest.org, "/apps") : "/apps";
return [4 /*yield*/, this._requestManager.post(path, JSON.stringify(apigatewayAppCreationRequest.appcenterClientApp), /*expectResponseBody=*/ false)];

@@ -251,0 +255,0 @@ case 1:

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

if (f) throw new TypeError("Generator is already executing.");
while (_) try {
while (g && (g = 0, op[0] && (_ = 0)), _) try {
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;

@@ -142,3 +142,3 @@ if (y = 0, t) op = [op[0] & 2, t.value];

appToCreate.os !== 'Linux') {
throw this.getCodePushError("The app OS \"" + appToCreate.os + "\" isn't valid. It should be \"iOS\", \"Android\", \"Windows\" or \"Linux\".", request_manager_1.default.ERROR_CONFLICT);
throw this.getCodePushError("The app OS \"".concat(appToCreate.os, "\" isn't valid. It should be \"iOS\", \"Android\", \"Windows\" or \"Linux\"."), request_manager_1.default.ERROR_CONFLICT);
}

@@ -148,3 +148,3 @@ if (appToCreate.platform !== 'React-Native' &&

appToCreate.platform !== 'Electron') {
throw this.getCodePushError("The app platform \"" + appToCreate.platform + "\" isn't valid. It should be \"React-Native\", \"Cordova\" or \"Electron\".", request_manager_1.default.ERROR_CONFLICT);
throw this.getCodePushError("The app platform \"".concat(appToCreate.platform, "\" isn't valid. It should be \"React-Native\", \"Cordova\" or \"Electron\"."), request_manager_1.default.ERROR_CONFLICT);
}

@@ -154,3 +154,3 @@ var org = this.getOrgFromLegacyAppRequest(appToCreate);

if (!this.isValidAppCenterAppName(appcenterClientApp.display_name)) {
throw this.getCodePushError("The app name \"" + appcenterClientApp.display_name + "\" isn't valid. It can only contain alphanumeric characters, dashes, periods, or underscores.", request_manager_1.default.ERROR_CONFLICT);
throw this.getCodePushError("The app name \"".concat(appcenterClientApp.display_name, "\" isn't valid. It can only contain alphanumeric characters, dashes, periods, or underscores."), request_manager_1.default.ERROR_CONFLICT);
}

@@ -175,3 +175,3 @@ return { org: org, appcenterClientApp: appcenterClientApp };

deployment = { name: deploymentName };
return [4 /*yield*/, this._requestManager.post("/apps/" + appOwner + "/" + appName + "/deployments/", JSON.stringify(deployment), /*expectResponseBody=*/ true)];
return [4 /*yield*/, this._requestManager.post("/apps/".concat(appOwner, "/").concat(appName, "/deployments/"), JSON.stringify(deployment), /*expectResponseBody=*/ true)];
case 1: return [2 /*return*/, _a.sent()];

@@ -198,6 +198,6 @@ }

if (newName.indexOf('/') !== -1) {
throw this.getCodePushError("The new app name \"" + newName + "\" must be unqualified, not having a '/' character.", request_manager_1.default.ERROR_CONFLICT);
throw this.getCodePushError("The new app name \"".concat(newName, "\" must be unqualified, not having a '/' character."), request_manager_1.default.ERROR_CONFLICT);
}
if (!this.isValidAppCenterAppName(newName)) {
throw this.getCodePushError("The app name \"" + newName + "\" isn't valid. It can only contain alphanumeric characters, dashes, periods, or underscores.", request_manager_1.default.ERROR_CONFLICT);
throw this.getCodePushError("The app name \"".concat(newName, "\" isn't valid. It can only contain alphanumeric characters, dashes, periods, or underscores."), request_manager_1.default.ERROR_CONFLICT);
}

@@ -227,3 +227,3 @@ updatedApp = app.name === app.display_name

if (!foundAccessKey) {
throw this.getCodePushError("Access key \"" + accessKeyName + "\" does not exist.", request_manager_1.default.ERROR_NOT_FOUND);
throw this.getCodePushError("Access key \"".concat(accessKeyName, "\" does not exist."), request_manager_1.default.ERROR_NOT_FOUND);
}

@@ -321,3 +321,3 @@ return [2 /*return*/, foundAccessKey];

if (!isNameAndDisplayNameSame) {
appName += " (" + app.display_name + ")";
appName += " (".concat(app.display_name, ")");
}

@@ -461,3 +461,3 @@ return {

_a.trys.push([0, 2, , 3]);
return [4 /*yield*/, this._requestManager.get("/apps/" + appOwner + "/" + appName)];
return [4 /*yield*/, this._requestManager.get("/apps/".concat(appOwner, "/").concat(appName))];
case 1:

@@ -481,3 +481,3 @@ res = _a.sent();

_a.trys.push([0, 2, , 3]);
return [4 /*yield*/, this._requestManager.get("/apps/" + appOwner + "/" + appName + "/deployments/")];
return [4 /*yield*/, this._requestManager.get("/apps/".concat(appOwner, "/").concat(appName, "/deployments/"))];
case 1:

@@ -484,0 +484,0 @@ res = _a.sent();

"use strict";
var superagent = require("superagent");
var proxy_agent_1 = require("proxy-agent");
var code_push_error_1 = require("../script/code-push-error");
var superproxy = require("superagent-proxy");
superproxy(superagent);
var RequestManager = /** @class */ (function () {

@@ -36,4 +35,5 @@ function RequestManager(accessKey, customHeaders, serverUrl, proxy) {

var request = superagent[method](_this._serverUrl + endpoint);
if (_this._proxy)
request.proxy(_this._proxy);
if (_this._proxy) {
request.agent(new proxy_agent_1.ProxyAgent({ getProxyForUrl: function () { return _this._proxy; } }));
}
_this.attachCredentials(request);

@@ -58,3 +58,3 @@ if (requestBody) {

if (expectResponseBody && !body) {
reject({ message: "Could not parse response: " + res.text, statusCode: RequestManager.ERROR_INTERNAL_SERVER });
reject({ message: "Could not parse response: ".concat(res.text), statusCode: RequestManager.ERROR_INTERNAL_SERVER });
}

@@ -81,3 +81,3 @@ else {

if (error.syscall === "getaddrinfo") {
error.message = "Unable to connect to the CodePush server. Are you offline, or behind a firewall or proxy?\n(" + error.message + ")";
error.message = "Unable to connect to the CodePush server. Are you offline, or behind a firewall or proxy?\n(".concat(error.message, ")");
}

@@ -101,3 +101,3 @@ return {

}
request.set("x-api-token", "" + this._accessKey);
request.set("x-api-token", "".concat(this._accessKey));
};

@@ -104,0 +104,0 @@ RequestManager.SERVER_URL = "https://api.appcenter.ms/v0.1";

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc