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

nativescript-cloud

Package Overview
Dependencies
Maintainers
7
Versions
123
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nativescript-cloud - npm Package Compare versions

Comparing version 1.18.1-2019-07-29-01 to 1.18.1-2019-08-16-01

lib/services/errors-service.js

0

docs/accept-eula.md

@@ -0,0 +0,0 @@ # tns accept eula

@@ -0,0 +0,0 @@ # tns account features

@@ -0,0 +0,0 @@ # tns account usage

@@ -0,0 +0,0 @@ # tns account

@@ -0,0 +0,0 @@ # tns cloud build

@@ -0,0 +0,0 @@ # tns cloud clean workspace

@@ -0,0 +0,0 @@ # tns cloud codesign

@@ -0,0 +0,0 @@ # tns cloud deploy

@@ -0,0 +0,0 @@ # tns cloud dev-apple-login

@@ -0,0 +0,0 @@ # tns cloud lib version

@@ -0,0 +0,0 @@ # tns cloud publish android

@@ -0,0 +0,0 @@ # tns cloud publish ios

@@ -0,0 +0,0 @@ # tns cloud run android

@@ -0,0 +0,0 @@ # tns cloud run ios

@@ -0,0 +0,0 @@ # tns cloud run

@@ -0,0 +0,0 @@ # tns dev-login

@@ -0,0 +0,0 @@ # tns login

@@ -0,0 +0,0 @@ # tns logout

@@ -0,0 +0,0 @@ # tns policy accept

@@ -0,0 +0,0 @@ # tns user

@@ -34,1 +34,2 @@ "use strict";

$injector.register("nsAccountUtils", AccountUtils);
//# sourceMappingURL=account-utils.js.map

@@ -18,6 +18,9 @@ "use strict";

$injector.require("nsCloudS3Helper", path.join(__dirname, "s3-helper"));
$injector.require("nsCloudErrorsService", path.join(__dirname, "services", "errors-service"));
$injector.require("nsCloudPlatformsData", path.join(__dirname, "cloud-platforms-data"));
// Cloud operation.
$injector.require("nsCloudOperationFactory", path.join(__dirname, "cloud-operation", "cloud-operation-factory"));
$injector.require("nsCloudCommunicationChannelFactory", path.join(__dirname, "cloud-operation", "communication", "communication-channel-factory"));
$injector.require("nsCloudWebSocketFactory", path.join(__dirname, "cloud-operation", "communication", "websocket-factory"));
// Public API.
$injector.requirePublicClass("nsCloudApplicationService", path.join(__dirname, "services", "application-service"));

@@ -36,3 +39,5 @@ $injector.requirePublicClass("nsCloudAuthenticationService", path.join(__dirname, "services", "authentication-service"));

$injector.requirePublicClass("nsCloudConfigManager", path.join(__dirname, "cloud-config-manager"));
// TODO: Remove in 2.0.0 - currently this service is not used, but it has been publicly exposed, so we cannot remove it without bumping the major version.
$injector.requirePublicClass("nsCloudKinveyEulaService", path.join(__dirname, "services", "kinvey-eula-service"));
// Services.
$injector.require("nsCloudServerAuthService", path.join(__dirname, "services", "server", "server-auth-service"));

@@ -59,2 +64,3 @@ $injector.require("nsCloudServerBuildService", path.join(__dirname, "services", "server", "server-build-service"));

$injector.require("nsCloudPlatformService", path.join(__dirname, "services", "cloud-platform-service"));
// Commands.
$injector.requireCommand("config|*get", path.join(__dirname, "commands", "config", "config-get"));

@@ -84,1 +90,2 @@ $injector.requireCommand("config|apply", path.join(__dirname, "commands", "config", "config-apply"));

$injector.requireCommand("cloud|clean|workspace", path.join(__dirname, "commands", "clean", "clean-cloud-workspace"));
//# sourceMappingURL=bootstrap.js.map

@@ -22,1 +22,2 @@ "use strict";

$injector.register("nsCloudAndroidBundleValidatorHelper", CloudAndroidBundleValidatorHelper);
//# sourceMappingURL=cloud-android-bundle-validator-helper.js.map

7

lib/cloud-build-helper.js

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

class CloudBuildHelper {
constructor($errors, $fs, $logger) {
this.$errors = $errors;
constructor($nsCloudErrorsService, $fs, $logger) {
this.$nsCloudErrorsService = $nsCloudErrorsService;
this.$fs = $fs;

@@ -60,3 +60,3 @@ this.$logger = $logger;

}
this.$errors.failWithoutHelp(`Could not read ${certificatePath}. Please make sure there is a certificate inside.`);
this.$nsCloudErrorsService.fail(`Could not read ${certificatePath}. Please make sure there is a certificate inside.`);
}

@@ -104,1 +104,2 @@ isReleaseConfiguration(buildConfiguration) {

$injector.register("nsCloudBuildHelper", CloudBuildHelper);
//# sourceMappingURL=cloud-build-helper.js.map

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

class CloudConfigManager {
/* don't require logger and everything that has logger as dependency in config.js due to cyclic dependency */
constructor($fs, $options) {

@@ -38,5 +39,8 @@ this.$fs = $fs;

const serviceConfig = config.cloudServices[serviceName];
// When we want to use localhost or PR builds for cloud services
// we need to return the specified full domain name.
if (serviceConfig.fullHostName) {
return serviceConfig.fullHostName;
}
// If we want to use the official domains we need the domain name and the subdomain for the service.
return `${serviceConfig.subdomain}.${config.domainName}`;

@@ -92,1 +96,2 @@ }

$injector.register("nsCloudConfigManager", CloudConfigManager);
//# sourceMappingURL=cloud-config-manager.js.map

@@ -69,1 +69,2 @@ "use strict";

exports.CloudOperationBase = CloudOperationBase;
//# sourceMappingURL=cloud-operation-base.js.map

@@ -23,1 +23,2 @@ "use strict";

$injector.register("nsCloudOperationFactory", CloudOperationFactory);
//# sourceMappingURL=cloud-operation-factory.js.map

@@ -63,6 +63,10 @@ "use strict";

this.statusCheckInterval = setInterval(() => __awaiter(this, void 0, void 0, function* () {
console.log("statusCheckInterval await status", this.serverStatus);
this.serverStatus = yield this.$nsCloudS3Helper.getJsonObjectFromS3File(this.serverResponse.statusUrl);
console.log("statusCheckInterval", this.serverStatus);
if (this.serverStatus.status === CloudOperationV1.OPERATION_COMPLETE_STATUS) {
console.log("statusCheckInterval OPERATION_COMPLETE_STATUS");
clearInterval(this.statusCheckInterval);
this.result = yield this.$nsCloudS3Helper.getJsonObjectFromS3File(this.serverResponse.resultUrl);
console.log("statusCheckInterval OPERATION_COMPLETE_STATUS result", this.result);
return resolve(this.result);

@@ -72,3 +76,5 @@ }

try {
console.log("statusCheckInterval OPERATION_FAILED_STATUS");
this.result = yield this.$nsCloudS3Helper.getJsonObjectFromS3File(this.serverResponse.resultUrl);
console.log("statusCheckInterval OPERATION_FAILED_STATUS result", this.result);
clearInterval(this.statusCheckInterval);

@@ -100,4 +106,8 @@ resolve(this.result);

try {
console.log("poll for logs");
const logs = yield this.$nsCloudS3Helper.getContentOfS3File(this.serverResponse.outputUrl);
console.log("poll for logs with logs.length: ", logs.length);
// The logs variable will contain the full server log and we need to log only the logs that we don't have.
const contentToLog = this.$nsCloudOutputFilter.filter(logs.substr(this.outputCursorPosition));
console.log("poll for logs has contentToLog: ", !!contentToLog);
if (contentToLog) {

@@ -114,6 +124,10 @@ const data = {

}
console.log("poll for logs with old outputCursorPosition: ", this.outputCursorPosition);
this.outputCursorPosition = logs.length <= 0 ? 0 : logs.length - 1;
console.log("poll for logs with new outputCursorPosition: ", this.outputCursorPosition);
}
catch (err) {
// Ignore the error from getting the server output because the task can finish even if there is error.
this.$logger.trace(`Error while getting server logs: ${err}`);
console.log("poll for logs err: ", err);
}

@@ -126,1 +140,2 @@ });

module.exports = CloudOperationV1;
//# sourceMappingURL=cloud-operation-v1.js.map

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

this.communicationChannel.once(constants_1.CloudCommunicationEvents.CLOSE, closeHandler);
// Subscribe here for messages to proxy serverHello.
this.communicationChannel.on(constants_1.CloudCommunicationEvents.MESSAGE, (m) => this.emit(constants_1.CloudCommunicationEvents.MESSAGE, m));

@@ -98,1 +99,2 @@ yield this.communicationChannel.connect();

module.exports = CloudOperationV2;
//# sourceMappingURL=cloud-operation-v2.js.map

@@ -164,1 +164,2 @@ "use strict";

exports.CommunicationChannelBase = CommunicationChannelBase;
//# sourceMappingURL=communication-channel-base.js.map

@@ -18,1 +18,2 @@ "use strict";

$injector.register("nsCloudCommunicationChannelFactory", CommunicationChannelFactory);
//# sourceMappingURL=communication-channel-factory.js.map

@@ -84,1 +84,2 @@ "use strict";

exports.WebSocketCommunicationChannel = WebSocketCommunicationChannel;
//# sourceMappingURL=websocket-channel.js.map

@@ -11,1 +11,2 @@ "use strict";

$injector.register("nsCloudWebSocketFactory", WebSocketFactory);
//# sourceMappingURL=websocket-factory.js.map

@@ -7,16 +7,16 @@ "use strict";

return {
accountId: { type: "string", hasSensitiveValue: true },
apiVersion: { type: "string", hasSensitiveValue: false },
local: { type: "boolean", hasSensitiveValue: false },
serverProto: { type: "string", hasSensitiveValue: true },
namespace: { type: "string", hasSensitiveValue: true },
instanceId: { type: "string", hasSensitiveValue: false },
sharedCloud: { type: "boolean", hasSensitiveValue: false },
workflow: { type: "object", hasSensitiveValue: true },
vmTemplateName: { type: "string", hasSensitiveValue: false },
track: { type: "string", default: constants_1.DEFAULT_ANDROID_PUBLISH_TRACK, hasSensitiveValue: false },
appleApplicationSpecificPassword: { type: "string", hasSensitiveValue: true },
appleSessionBase64: { type: "string", hasSensitiveValue: true },
otp: { type: "string", hasSensitiveValue: false },
outputPath: { type: "string", hasSensitiveValue: false }
accountId: { type: "string" /* String */, hasSensitiveValue: true },
apiVersion: { type: "string" /* String */, hasSensitiveValue: false },
local: { type: "boolean" /* Boolean */, hasSensitiveValue: false },
serverProto: { type: "string" /* String */, hasSensitiveValue: true },
namespace: { type: "string" /* String */, hasSensitiveValue: true },
instanceId: { type: "string" /* String */, hasSensitiveValue: false },
sharedCloud: { type: "boolean" /* Boolean */, hasSensitiveValue: false },
workflow: { type: "object" /* Object */, hasSensitiveValue: true },
vmTemplateName: { type: "string" /* String */, hasSensitiveValue: false },
track: { type: "string" /* String */, default: constants_1.DEFAULT_ANDROID_PUBLISH_TRACK, hasSensitiveValue: false },
appleApplicationSpecificPassword: { type: "string" /* String */, hasSensitiveValue: true },
appleSessionBase64: { type: "string" /* String */, hasSensitiveValue: true },
otp: { type: "string" /* String */, hasSensitiveValue: false },
outputPath: { type: "string" /* String */, hasSensitiveValue: false }
};

@@ -27,1 +27,2 @@ }

$injector.register("nsCloudOptionsProvider", CloudOptionsProvider);
//# sourceMappingURL=cloud-options-provider.js.map

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

let result = this.filterBpcMetadata(logs)
.replace(new RegExp("(\\\\r\\\\n)|(\\\\n)", "gm"), os_1.EOL)
.replace(/(\\\\t)/g, "\t")
.replace(/((\n)|(\r\n)){1,}/gm, os_1.EOL)
.replace(/\\u001b\[0G/g, "\u001b")
.replace(new RegExp("(\\\\r\\\\n)|(\\\\n)", "gm"), os_1.EOL) // Unescape new lines.
.replace(/(\\\\t)/g, "\t") // Unescape tabs.
.replace(/((\n)|(\r\n)){1,}/gm, os_1.EOL) // Replace consecutive blank lines.
.replace(/\\u001b\[0G/g, "\u001b") // Unescape the escape character.
.trim();
// The logs in S3 have "" around the whole content. We don't need them.
if (result) {

@@ -24,3 +25,3 @@ if (result.startsWith(`"`)) {

filterBpcMetadata(logs) {
return logs.replace(/\[(([0-9]){2,2}:){2,2}[0-9].\.[0-9]*\]\W*?\[.*?\] {0,3}/g, "");
return logs.replace(/\[(([0-9]){2,2}:){2,2}[0-9].\.[0-9]*\]\W*?\[.*?\] {0,3}/g, ""); // Replace the log timestamp and log level.
}

@@ -30,1 +31,2 @@ }

$injector.register("nsCloudOutputFilter", CloudOutputFilter);
//# sourceMappingURL=cloud-output-filter.js.map

@@ -22,1 +22,2 @@ "use strict";

$injector.register("nsCloudPlatformsData", CloudPlatformsData);
//# sourceMappingURL=cloud-platforms-data.js.map

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

class AcceptEulaCommand {
constructor($nsCloudEulaCommandHelper, $errors) {
constructor($nsCloudEulaCommandHelper, $nsCloudErrorsService) {
this.$nsCloudEulaCommandHelper = $nsCloudEulaCommandHelper;
this.$errors = $errors;
this.$nsCloudErrorsService = $nsCloudErrorsService;
}

@@ -20,3 +20,3 @@ canExecute(args) {

if (args.length) {
this.$errors.failWithoutHelp("This command does not accept arguments.");
this.$nsCloudErrorsService.fail("This command does not accept arguments.");
}

@@ -32,1 +32,2 @@ return true;

$injector.registerCommand("accept|eula", AcceptEulaCommand);
//# sourceMappingURL=accept-eula-command.js.map

@@ -12,4 +12,4 @@ "use strict";

class AccountCommandBase {
constructor($errors, $nsCloudUserService) {
this.$errors = $errors;
constructor($nsCloudErrorsService, $nsCloudUserService) {
this.$nsCloudErrorsService = $nsCloudErrorsService;
this.$nsCloudUserService = $nsCloudUserService;

@@ -20,3 +20,3 @@ }

if (!this.$nsCloudUserService.hasUser()) {
this.$errors.failWithoutHelp("You are not logged in.");
this.$nsCloudErrorsService.fail("You are not logged in.");
}

@@ -28,1 +28,2 @@ return true;

exports.AccountCommandBase = AccountCommandBase;
//# sourceMappingURL=account-command-base.js.map

@@ -14,4 +14,4 @@ "use strict";

class AccountListCommand extends account_command_base_1.AccountCommandBase {
constructor($errors, $nsCloudUserService, $nsCloudEulaCommandHelper, $nsCloudAccountsService, $logger, $options) {
super($errors, $nsCloudUserService);
constructor($nsCloudErrorsService, $nsCloudUserService, $nsCloudEulaCommandHelper, $nsCloudAccountsService, $logger, $options) {
super($nsCloudErrorsService, $nsCloudUserService);
this.$nsCloudEulaCommandHelper = $nsCloudEulaCommandHelper;

@@ -44,1 +44,2 @@ this.$nsCloudAccountsService = $nsCloudAccountsService;

$injector.registerCommand("account|*list", AccountListCommand);
//# sourceMappingURL=account-list.js.map

@@ -14,4 +14,4 @@ "use strict";

class FeaturesCommand extends account_command_base_1.AccountCommandBase {
constructor($errors, $nsCloudUserService, $nsCloudAccountsService, $nsCloudEulaCommandHelper, $nsCloudOptionsProvider, $options, $logger) {
super($errors, $nsCloudUserService);
constructor($nsCloudErrorsService, $nsCloudUserService, $nsCloudAccountsService, $nsCloudEulaCommandHelper, $nsCloudOptionsProvider, $options, $logger) {
super($nsCloudErrorsService, $nsCloudUserService);
this.$nsCloudAccountsService = $nsCloudAccountsService;

@@ -47,1 +47,2 @@ this.$nsCloudEulaCommandHelper = $nsCloudEulaCommandHelper;

$injector.registerCommand("account|features", FeaturesCommand);
//# sourceMappingURL=features.js.map

@@ -16,4 +16,4 @@ "use strict";

class UsageCommand extends account_command_base_1.AccountCommandBase {
constructor($errors, $nsCloudUserService, $nsCloudAccountsService, $nsCloudEulaCommandHelper, $nsCloudOptionsProvider, $options, $logger) {
super($errors, $nsCloudUserService);
constructor($nsCloudErrorsService, $nsCloudUserService, $nsCloudAccountsService, $nsCloudEulaCommandHelper, $nsCloudOptionsProvider, $options, $logger) {
super($nsCloudErrorsService, $nsCloudUserService);
this.$nsCloudAccountsService = $nsCloudAccountsService;

@@ -80,1 +80,2 @@ this.$nsCloudEulaCommandHelper = $nsCloudEulaCommandHelper;

$injector.registerCommand("account|usage", UsageCommand);
//# sourceMappingURL=usage.js.map

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

class BuildCommandHelper {
constructor($nsCloudBuildService, $errors, $logger, $prompter, $mobileHelper, $projectData, $injector, $options, $fs, $staticConfig) {
constructor($nsCloudBuildService, $nsCloudErrorsService, $logger, $prompter, $mobileHelper, $projectData, $injector, $options, $fs, $staticConfig) {
this.$nsCloudBuildService = $nsCloudBuildService;
this.$errors = $errors;
this.$nsCloudErrorsService = $nsCloudErrorsService;
this.$logger = $logger;

@@ -60,3 +60,3 @@ this.$prompter = $prompter;

else {
this.$errors.failWithoutHelp(`Currently only ${this.$mobileHelper.platformNames.join(' ')} platforms are supported.`);
this.$nsCloudErrorsService.fail(`Currently only ${this.$mobileHelper.platformNames.join(' ')} platforms are supported.`);
}

@@ -124,3 +124,4 @@ const pathToProvision = this.$options.provision ? path.resolve(this.$options.provision) : "";

if (!helpers_2.isInteractive() && (!credentials.username || !credentials.password)) {
this.$errors.failWithoutHelp("Please provide Apple ID and Apple ID password");
// We are in the CI/CD scenario but we don't have all credentials.
this.$nsCloudErrorsService.fail("Please provide Apple ID and Apple ID password");
}

@@ -182,1 +183,2 @@ }

$injector.register("nsCloudBuildCommandHelper", BuildCommandHelper);
//# sourceMappingURL=build-command-helper.js.map

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

class CleanCloudWorkspace extends interactive_cloud_command_1.InteractiveCloudCommand {
constructor($nsCloudProcessService, $errors, $logger, $prompter, $nsCloudEulaCommandHelper, $nsCloudProjectService, $projectData) {
super($nsCloudProjectService, $nsCloudProcessService, $errors, $logger, $prompter);
this.$errors = $errors;
constructor($nsCloudProcessService, $nsCloudErrorsService, $logger, $prompter, $nsCloudEulaCommandHelper, $nsCloudProjectService, $projectData) {
super($nsCloudProjectService, $nsCloudProcessService, $nsCloudErrorsService, $logger, $prompter);
this.$nsCloudErrorsService = $nsCloudErrorsService;
this.$logger = $logger;

@@ -40,2 +40,3 @@ this.$prompter = $prompter;

try {
// We want to use the project data only when no parameters are provided.
this.$projectData.initializeProjectData();

@@ -46,2 +47,3 @@ appIdentifier = this.$projectData.projectIdentifiers || this.$projectData.projectId;

catch (err) {
// We are not in project and the app id and project name parameters are not provided.
appIdentifier = yield this.promptForAppId();

@@ -52,2 +54,3 @@ projectName = yield this.promptForProjectName();

else if (args.length === 1) {
// Only app id is provided. We need to ask for project name if we can.
appIdentifier = yield this.getParameterValue(args[0], () => this.promptForAppId());

@@ -57,2 +60,3 @@ projectName = yield this.promptForProjectName();

else {
// Both app id and project name are provided as parameters.
appIdentifier = yield this.getParameterValue(args[0], () => this.promptForAppId());

@@ -67,3 +71,3 @@ projectName = yield this.getParameterValue(args[1], () => this.promptForProjectName());

if (!helpers_1.isInteractive()) {
this.$errors.failWithoutHelp(CleanCloudWorkspace.COMMAND_REQUIREMENTS_ERROR_MESSAGE);
this.$nsCloudErrorsService.fail(CleanCloudWorkspace.COMMAND_REQUIREMENTS_ERROR_MESSAGE);
}

@@ -76,3 +80,3 @@ return this.$prompter.getString("Project name:", { allowEmpty: false });

if (!helpers_1.isInteractive()) {
this.$errors.failWithoutHelp(CleanCloudWorkspace.COMMAND_REQUIREMENTS_ERROR_MESSAGE);
this.$nsCloudErrorsService.fail(CleanCloudWorkspace.COMMAND_REQUIREMENTS_ERROR_MESSAGE);
}

@@ -94,1 +98,2 @@ return this.$prompter.getString("App Id:", { allowEmpty: false });

$injector.registerCommand(["cloud|clean|workspace"], CleanCloudWorkspace);
//# sourceMappingURL=clean-cloud-workspace.js.map

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

class CloudBuildCommand extends interactive_cloud_command_1.InteractiveCloudCommand {
constructor($nsCloudProcessService, $errors, $logger, $prompter, $nsCloudEulaCommandHelper, $nsCloudBuildCommandHelper, $nsCloudBuildService, $nsCloudOptionsProvider, $options, $projectData, $nsCloudAndroidBundleValidatorHelper) {
super($nsCloudBuildService, $nsCloudProcessService, $errors, $logger, $prompter);
this.$errors = $errors;
constructor($nsCloudProcessService, $nsCloudErrorsService, $logger, $prompter, $nsCloudEulaCommandHelper, $nsCloudBuildCommandHelper, $nsCloudBuildService, $nsCloudOptionsProvider, $options, $projectData, $nsCloudAndroidBundleValidatorHelper) {
super($nsCloudBuildService, $nsCloudProcessService, $nsCloudErrorsService, $logger, $prompter);
this.$nsCloudErrorsService = $nsCloudErrorsService;
this.$logger = $logger;

@@ -36,6 +36,6 @@ this.$prompter = $prompter;

if (!args || !args.length) {
this.$errors.fail("Provide platform.");
this.$nsCloudErrorsService.failWithHelp("Provide platform.");
}
if (args.length > 1) {
this.$errors.fail("Only a single platform is supported.");
this.$nsCloudErrorsService.failWithHelp("Only a single platform is supported.");
}

@@ -54,1 +54,2 @@ return true;

$injector.registerCommand(["build|cloud", "cloud|build"], CloudBuildCommand);
//# sourceMappingURL=cloud-build.js.map

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

class CloudCodesignCommand extends interactive_cloud_command_1.InteractiveCloudCommand {
constructor($nsCloudProcessService, $errors, $logger, $prompter, $nsCloudEulaCommandHelper, $devicePlatformsConstants, $devicesService, $nsCloudOptionsProvider, $options, $projectData, $nsCloudCodesignService) {
super($nsCloudCodesignService, $nsCloudProcessService, $errors, $logger, $prompter);
this.$errors = $errors;
constructor($nsCloudProcessService, $nsCloudErrorsService, $logger, $prompter, $nsCloudEulaCommandHelper, $devicePlatformsConstants, $devicesService, $nsCloudOptionsProvider, $options, $projectData, $nsCloudCodesignService) {
super($nsCloudCodesignService, $nsCloudProcessService, $nsCloudErrorsService, $logger, $prompter);
this.$nsCloudErrorsService = $nsCloudErrorsService;
this.$logger = $logger;

@@ -28,2 +28,3 @@ this.$prompter = $prompter;

this.$nsCloudCodesignService = $nsCloudCodesignService;
// Currently only iOS codesign generation is supported.
this.platform = this.$devicePlatformsConstants.iOS;

@@ -39,3 +40,3 @@ this.$projectData.initializeProjectData();

if (args.length > 2 || (!helpers_1.isInteractive() && args.length < 2)) {
this.$errors.fail(constants_1.ERROR_MESSAGES.COMMAND_REQUIRES_APPLE_USERNAME_PASS);
this.$nsCloudErrorsService.failWithHelp(constants_1.ERROR_MESSAGES.COMMAND_REQUIRES_APPLE_USERNAME_PASS);
}

@@ -47,3 +48,3 @@ yield this.$devicesService.initialize({ shouldReturnImmediateResult: false, platform: this.platform, skipEmulatorStart: true });

if (!this.devices || this.devices.length === 0) {
this.$errors.fail("Please attach iOS devices for which to generate codesign files.");
this.$nsCloudErrorsService.failWithHelp("Please attach iOS devices for which to generate codesign files.");
}

@@ -77,1 +78,2 @@ return true;

$injector.registerCommand("codesign|cloud", CloudCodesignCommand);
//# sourceMappingURL=cloud-codesign.js.map

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

class CloudDeploy extends interactive_cloud_command_1.InteractiveCloudCommand {
constructor($nsCloudProcessService, $errors, $logger, $prompter, $nsCloudEulaCommandHelper, $nsCloudPlatformService, $nsCloudBuildCommandHelper, $nsCloudBuildService, $nsCloudOptionsProvider, $options, $projectData, $nsCloudAndroidBundleValidatorHelper) {
super($nsCloudBuildService, $nsCloudProcessService, $errors, $logger, $prompter);
this.$errors = $errors;
constructor($nsCloudProcessService, $nsCloudErrorsService, $logger, $prompter, $nsCloudEulaCommandHelper, $nsCloudPlatformService, $nsCloudBuildCommandHelper, $nsCloudBuildService, $nsCloudOptionsProvider, $options, $projectData, $nsCloudAndroidBundleValidatorHelper) {
super($nsCloudBuildService, $nsCloudProcessService, $nsCloudErrorsService, $logger, $prompter);
this.$nsCloudErrorsService = $nsCloudErrorsService;
this.$logger = $logger;

@@ -37,6 +37,6 @@ this.$prompter = $prompter;

if (!args || !args.length) {
this.$errors.fail("Provide platform.");
this.$nsCloudErrorsService.failWithHelp("Provide platform.");
}
if (args.length > 1) {
this.$errors.fail("Only a single platform is supported.");
this.$nsCloudErrorsService.failWithHelp("Only a single platform is supported.");
}

@@ -58,1 +58,2 @@ return true;

$injector.registerCommand(["deploy|cloud", "cloud|deploy"], CloudDeploy);
//# sourceMappingURL=cloud-deploy.js.map

@@ -15,8 +15,8 @@ "use strict";

class CloudDevAppleLogin extends interactive_cloud_command_1.InteractiveCloudCommand {
constructor($nsCloudProcessService, $nsCloudEulaCommandHelper, $nsCloudOptionsProvider, $options, $errors, $fs, $logger, $prompter, $nsCloudAppleService, $nsCloudBuildCommandHelper) {
super($nsCloudAppleService, $nsCloudProcessService, $errors, $logger, $prompter);
constructor($nsCloudProcessService, $nsCloudEulaCommandHelper, $nsCloudOptionsProvider, $options, $nsCloudErrorsService, $fs, $logger, $prompter, $nsCloudAppleService, $nsCloudBuildCommandHelper) {
super($nsCloudAppleService, $nsCloudProcessService, $nsCloudErrorsService, $logger, $prompter);
this.$nsCloudEulaCommandHelper = $nsCloudEulaCommandHelper;
this.$nsCloudOptionsProvider = $nsCloudOptionsProvider;
this.$options = $options;
this.$errors = $errors;
this.$nsCloudErrorsService = $nsCloudErrorsService;
this.$fs = $fs;

@@ -35,3 +35,3 @@ this.$logger = $logger;

if (args.length > 2 || (!helpers_1.isInteractive() && args.length < 1)) {
this.$errors.fail(constants_1.ERROR_MESSAGES.COMMAND_REQUIRES_APPLE_USERNAME_PASS);
this.$nsCloudErrorsService.failWithHelp(constants_1.ERROR_MESSAGES.COMMAND_REQUIRES_APPLE_USERNAME_PASS);
}

@@ -62,1 +62,2 @@ return true;

$injector.registerCommand("cloud|dev-apple-login", CloudDevAppleLogin);
//# sourceMappingURL=cloud-dev-apple-login.js.map

@@ -25,1 +25,2 @@ "use strict";

$injector.registerCommand("cloud|lib|version", CloudLibVersion);
//# sourceMappingURL=cloud-lib-version.js.map

@@ -15,6 +15,6 @@ "use strict";

class CloudPublish extends interactive_cloud_command_1.InteractiveCloudCommand {
constructor($nsCloudProcessService, $nsCloudOptionsProvider, $errors, $logger, $prompter, $projectData, $options, $devicePlatformsConstants, $nsCloudAndroidBundleValidatorHelper, $nsCloudPublishService) {
super($nsCloudPublishService, $nsCloudProcessService, $errors, $logger, $prompter);
constructor($nsCloudProcessService, $nsCloudOptionsProvider, $nsCloudErrorsService, $logger, $prompter, $projectData, $options, $devicePlatformsConstants, $nsCloudAndroidBundleValidatorHelper, $nsCloudPublishService) {
super($nsCloudPublishService, $nsCloudProcessService, $nsCloudErrorsService, $logger, $prompter);
this.$nsCloudOptionsProvider = $nsCloudOptionsProvider;
this.$errors = $errors;
this.$nsCloudErrorsService = $nsCloudErrorsService;
this.$logger = $logger;

@@ -40,7 +40,7 @@ this.$prompter = $prompter;

class CloudPublishAndroid extends CloudPublish {
constructor($nsCloudOptionsProvider, $logger, $nsCloudProcessService, $nsCloudBuildCommandHelper, $nsCloudEulaCommandHelper, $errors, $nsCloudPublishService, $prompter, $projectData, $options, $devicePlatformsConstants, $nsCloudAndroidBundleValidatorHelper) {
super($nsCloudProcessService, $nsCloudOptionsProvider, $errors, $logger, $prompter, $projectData, $options, $devicePlatformsConstants, $nsCloudAndroidBundleValidatorHelper, $nsCloudPublishService);
constructor($nsCloudOptionsProvider, $logger, $nsCloudProcessService, $nsCloudBuildCommandHelper, $nsCloudEulaCommandHelper, $nsCloudErrorsService, $nsCloudPublishService, $prompter, $projectData, $options, $devicePlatformsConstants, $nsCloudAndroidBundleValidatorHelper) {
super($nsCloudProcessService, $nsCloudOptionsProvider, $nsCloudErrorsService, $logger, $prompter, $projectData, $options, $devicePlatformsConstants, $nsCloudAndroidBundleValidatorHelper, $nsCloudPublishService);
this.$nsCloudBuildCommandHelper = $nsCloudBuildCommandHelper;
this.$nsCloudEulaCommandHelper = $nsCloudEulaCommandHelper;
this.$errors = $errors;
this.$nsCloudErrorsService = $nsCloudErrorsService;
this.$nsCloudPublishService = $nsCloudPublishService;

@@ -61,3 +61,3 @@ this.$prompter = $prompter;

if (args.length > 1 || (!helpers_1.isInteractive() && args.length < 1)) {
this.$errors.fail("The command accepts only one parameter - Path to authentication JSON");
this.$nsCloudErrorsService.failWithHelp("The command accepts only one parameter - Path to authentication JSON");
}

@@ -91,7 +91,7 @@ return true;

class CloudPublishIos extends CloudPublish {
constructor($nsCloudOptionsProvider, $logger, $nsCloudProcessService, $nsCloudBuildCommandHelper, $nsCloudEulaCommandHelper, $errors, $nsCloudPublishService, $prompter, $projectData, $options, $devicePlatformsConstants, $nsCloudAndroidBundleValidatorHelper) {
super($nsCloudProcessService, $nsCloudOptionsProvider, $errors, $logger, $prompter, $projectData, $options, $devicePlatformsConstants, $nsCloudAndroidBundleValidatorHelper, $nsCloudPublishService);
constructor($nsCloudOptionsProvider, $logger, $nsCloudProcessService, $nsCloudBuildCommandHelper, $nsCloudEulaCommandHelper, $nsCloudErrorsService, $nsCloudPublishService, $prompter, $projectData, $options, $devicePlatformsConstants, $nsCloudAndroidBundleValidatorHelper) {
super($nsCloudProcessService, $nsCloudOptionsProvider, $nsCloudErrorsService, $logger, $prompter, $projectData, $options, $devicePlatformsConstants, $nsCloudAndroidBundleValidatorHelper, $nsCloudPublishService);
this.$nsCloudBuildCommandHelper = $nsCloudBuildCommandHelper;
this.$nsCloudEulaCommandHelper = $nsCloudEulaCommandHelper;
this.$errors = $errors;
this.$nsCloudErrorsService = $nsCloudErrorsService;
this.$nsCloudPublishService = $nsCloudPublishService;

@@ -111,3 +111,3 @@ this.$prompter = $prompter;

if (args.length > 2 || (!helpers_1.isInteractive() && args.length < 1)) {
this.$errors.fail(constants_1.ERROR_MESSAGES.COMMAND_REQUIRES_APPLE_USERNAME_PASS);
this.$nsCloudErrorsService.failWithHelp(constants_1.ERROR_MESSAGES.COMMAND_REQUIRES_APPLE_USERNAME_PASS);
}

@@ -133,1 +133,2 @@ return true;

$injector.registerCommand("cloud|publish|ios", CloudPublishIos);
//# sourceMappingURL=cloud-publish.js.map

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

class CloudRunCommand extends interactive_cloud_command_1.InteractiveCloudCommand {
constructor($nsCloudProcessService, $errors, $logger, $prompter, $liveSyncCommandHelper, $nsCloudEulaCommandHelper, $nsCloudBuildService, $nsCloudBuildCommandHelper, $nsCloudOptionsProvider, $nsCloudPolyfillService, $options, $projectData, $nsCloudAndroidBundleValidatorHelper) {
super($nsCloudBuildService, $nsCloudProcessService, $errors, $logger, $prompter);
this.$errors = $errors;
constructor($nsCloudProcessService, $nsCloudErrorsService, $logger, $prompter, $liveSyncCommandHelper, $nsCloudEulaCommandHelper, $nsCloudBuildService, $nsCloudBuildCommandHelper, $nsCloudOptionsProvider, $nsCloudPolyfillService, $options, $projectData, $nsCloudAndroidBundleValidatorHelper) {
super($nsCloudBuildService, $nsCloudProcessService, $nsCloudErrorsService, $logger, $prompter);
this.$nsCloudErrorsService = $nsCloudErrorsService;
this.$logger = $logger;

@@ -42,3 +42,3 @@ this.$prompter = $prompter;

if (args.length) {
this.$errors.fail("This input is not valid for the cloud run command");
this.$nsCloudErrorsService.failWithHelp("This input is not valid for the cloud run command");
}

@@ -61,5 +61,5 @@ return true;

class CloudRunIosCommand extends CloudRunCommand {
constructor($liveSyncCommandHelper, $nsCloudEulaCommandHelper, $nsCloudBuildCommandHelper, $nsCloudBuildService, $nsCloudOptionsProvider, $nsCloudPolyfillService, $nsCloudProcessService, $options, $projectData, $nsCloudAndroidBundleValidatorHelper, $errors, $logger, $prompter, $devicePlatformsConstants) {
super($nsCloudProcessService, $errors, $logger, $prompter, $liveSyncCommandHelper, $nsCloudEulaCommandHelper, $nsCloudBuildService, $nsCloudBuildCommandHelper, $nsCloudOptionsProvider, $nsCloudPolyfillService, $options, $projectData, $nsCloudAndroidBundleValidatorHelper);
this.$errors = $errors;
constructor($liveSyncCommandHelper, $nsCloudEulaCommandHelper, $nsCloudBuildCommandHelper, $nsCloudBuildService, $nsCloudOptionsProvider, $nsCloudPolyfillService, $nsCloudProcessService, $options, $projectData, $nsCloudAndroidBundleValidatorHelper, $nsCloudErrorsService, $logger, $prompter, $devicePlatformsConstants) {
super($nsCloudProcessService, $nsCloudErrorsService, $logger, $prompter, $liveSyncCommandHelper, $nsCloudEulaCommandHelper, $nsCloudBuildService, $nsCloudBuildCommandHelper, $nsCloudOptionsProvider, $nsCloudPolyfillService, $options, $projectData, $nsCloudAndroidBundleValidatorHelper);
this.$nsCloudErrorsService = $nsCloudErrorsService;
this.$logger = $logger;

@@ -77,5 +77,5 @@ this.$prompter = $prompter;

class CloudRunAndroidCommand extends CloudRunCommand {
constructor($liveSyncCommandHelper, $nsCloudEulaCommandHelper, $nsCloudBuildCommandHelper, $nsCloudBuildService, $nsCloudOptionsProvider, $nsCloudPolyfillService, $nsCloudProcessService, $options, $projectData, $nsCloudAndroidBundleValidatorHelper, $errors, $logger, $prompter, $devicePlatformsConstants) {
super($nsCloudProcessService, $errors, $logger, $prompter, $liveSyncCommandHelper, $nsCloudEulaCommandHelper, $nsCloudBuildService, $nsCloudBuildCommandHelper, $nsCloudOptionsProvider, $nsCloudPolyfillService, $options, $projectData, $nsCloudAndroidBundleValidatorHelper);
this.$errors = $errors;
constructor($liveSyncCommandHelper, $nsCloudEulaCommandHelper, $nsCloudBuildCommandHelper, $nsCloudBuildService, $nsCloudOptionsProvider, $nsCloudPolyfillService, $nsCloudProcessService, $options, $projectData, $nsCloudAndroidBundleValidatorHelper, $nsCloudErrorsService, $logger, $prompter, $devicePlatformsConstants) {
super($nsCloudProcessService, $nsCloudErrorsService, $logger, $prompter, $liveSyncCommandHelper, $nsCloudEulaCommandHelper, $nsCloudBuildService, $nsCloudBuildCommandHelper, $nsCloudOptionsProvider, $nsCloudPolyfillService, $options, $projectData, $nsCloudAndroidBundleValidatorHelper);
this.$nsCloudErrorsService = $nsCloudErrorsService;
this.$logger = $logger;

@@ -92,1 +92,2 @@ this.$prompter = $prompter;

$injector.registerCommand(["run|cloud|android", "cloud|run|android"], CloudRunAndroidCommand);
//# sourceMappingURL=cloud-run.js.map

@@ -33,1 +33,2 @@ "use strict";

$injector.registerCommand("config|apply", ConfigApplyCommand);
//# sourceMappingURL=config-apply.js.map

@@ -24,1 +24,2 @@ "use strict";

$injector.registerCommand("config|*get", ConfigGetCommand);
//# sourceMappingURL=config-get.js.map

@@ -26,1 +26,2 @@ "use strict";

$injector.registerCommand("config|reset", ConfigResetCommand);
//# sourceMappingURL=config-reset.js.map

@@ -33,1 +33,2 @@ "use strict";

$injector.registerCommand("config|set", ConfigApplyCommand);
//# sourceMappingURL=config-set.js.map

@@ -12,4 +12,4 @@ "use strict";

class DevLoginCommand {
constructor($errors, $logger, $options, $nsCloudOptionsProvider, $nsCloudAuthenticationService, $nsCloudServicesPolicyService, $stringParameterBuilder) {
this.$errors = $errors;
constructor($nsCloudErrorsService, $logger, $options, $nsCloudOptionsProvider, $nsCloudAuthenticationService, $nsCloudServicesPolicyService, $stringParameterBuilder) {
this.$nsCloudErrorsService = $nsCloudErrorsService;
this.$logger = $logger;

@@ -38,3 +38,3 @@ this.$options = $options;

catch (err) {
this.$errors.failWithoutHelp(err.message);
this.$nsCloudErrorsService.fail(err.message);
}

@@ -47,1 +47,2 @@ this.$logger.info("Successfully logged in.");

$injector.registerCommand("dev-login", DevLoginCommand);
//# sourceMappingURL=dev-login.js.map

@@ -14,4 +14,4 @@ "use strict";

class EulaCommandHelper {
constructor($errors, $logger, $nsCloudEulaService, $prompter) {
this.$errors = $errors;
constructor($nsCloudErrorsService, $logger, $nsCloudEulaService, $prompter) {
this.$nsCloudErrorsService = $nsCloudErrorsService;
this.$logger = $logger;

@@ -33,3 +33,3 @@ this.$nsCloudEulaService = $nsCloudEulaService;

this.$logger.printMarkdown(`In order to use cloud services, you must accept our EULA. You can read it here: ${constants_1.EulaConstants.eulaUrl}.`);
const actionOnError = () => this.$errors.failWithoutHelp("You cannot use cloud services without accepting the EULA.");
const actionOnError = () => this.$nsCloudErrorsService.fail("You cannot use cloud services without accepting the EULA.");
if (!helpers_1.isInteractive()) {

@@ -48,1 +48,2 @@ return actionOnError();

$injector.register("nsCloudEulaCommandHelper", EulaCommandHelper);
//# sourceMappingURL=eula-command-helper.js.map

@@ -14,6 +14,6 @@ "use strict";

class InteractiveCloudCommand {
constructor(interactiveService, $nsCloudProcessService, $errors, $logger, $prompter) {
constructor(interactiveService, $nsCloudProcessService, $nsCloudErrorsService, $logger, $prompter) {
this.interactiveService = interactiveService;
this.$nsCloudProcessService = $nsCloudProcessService;
this.$errors = $errors;
this.$nsCloudErrorsService = $nsCloudErrorsService;
this.$logger = $logger;

@@ -29,3 +29,3 @@ this.$prompter = $prompter;

if (!helpers_1.isInteractive() && !predefinedAnswer) {
this.$errors.failWithoutHelp(`Input is required but the process is not interactive. "${msg.body.message}"`);
this.$nsCloudErrorsService.fail(`Input is required but the process is not interactive. "${msg.body.message}"`);
}

@@ -37,2 +37,3 @@ let input = "";

else {
// Print one new line because we print the cloud operation output on the same line.
this.$logger.info();

@@ -70,1 +71,2 @@ if (msg.body.inputType === "password") {

exports.InteractiveCloudCommand = InteractiveCloudCommand;
//# sourceMappingURL=interactive-cloud-command.js.map

@@ -37,1 +37,2 @@ "use strict";

$injector.registerCommand("login", LoginCommand);
//# sourceMappingURL=login.js.map

@@ -26,1 +26,2 @@ "use strict";

$injector.registerCommand("logout", LogoutCommand);
//# sourceMappingURL=logout.js.map

@@ -13,4 +13,4 @@ "use strict";

class PolicyAcceptCommand {
constructor($errors, $nsCloudPolicyService, $nsCloudServicesPolicyService, $stringParameter, $stringParameterBuilder) {
this.$errors = $errors;
constructor($nsCloudErrorsService, $nsCloudPolicyService, $nsCloudServicesPolicyService, $stringParameter, $stringParameterBuilder) {
this.$nsCloudErrorsService = $nsCloudErrorsService;
this.$nsCloudPolicyService = $nsCloudPolicyService;

@@ -34,3 +34,3 @@ this.$nsCloudServicesPolicyService = $nsCloudServicesPolicyService;

if (!policyUri || policyUri.length === 0) {
this.$errors.failWithoutHelp("Please provide policy path.");
this.$nsCloudErrorsService.fail("Please provide policy path.");
}

@@ -43,1 +43,2 @@ yield this.$nsCloudPolicyService.accept({ policyName, policyUri });

$injector.registerCommand("policy|accept", PolicyAcceptCommand);
//# sourceMappingURL=policy-accept-command.js.map

@@ -36,1 +36,2 @@ "use strict";

$injector.registerCommand("user", UserCommand);
//# sourceMappingURL=user.js.map

@@ -147,1 +147,2 @@ "use strict";

exports.CloudCommunicationChannelExitCodes = CloudCommunicationChannelExitCodes;
//# sourceMappingURL=constants.js.map
"use strict";
//# sourceMappingURL=cloud-output-filter.js.map

@@ -53,1 +53,2 @@ "use strict";

exports.getProjectId = getProjectId;
//# sourceMappingURL=helpers.js.map

@@ -62,1 +62,2 @@ "use strict";

$injector.register("nsCloudHttpServer", HttpServer);
//# sourceMappingURL=http-server.js.map

@@ -39,1 +39,2 @@ "use strict";

$injector.register("nsCloudItmsServicesPlistHelper", ItmsServicesPlistHelper);
//# sourceMappingURL=itms-services-plist-helper.js.map

@@ -28,1 +28,2 @@ "use strict";

$injector.register("nsCloudS3Helper", S3Helper);
//# sourceMappingURL=s3-helper.js.map

@@ -12,4 +12,4 @@ "use strict";

class AccountsService {
constructor($errors, $nsCloudPolicyService, $nsCloudServerAccountsService) {
this.$errors = $errors;
constructor($nsCloudErrorsService, $nsCloudPolicyService, $nsCloudServerAccountsService) {
this.$nsCloudErrorsService = $nsCloudErrorsService;
this.$nsCloudPolicyService = $nsCloudPolicyService;

@@ -31,3 +31,3 @@ this.$nsCloudServerAccountsService = $nsCloudServerAccountsService;

if (!accountIdOption) {
this.$errors.failWithoutHelp("Please provide accountId.");
this.$nsCloudErrorsService.fail("Please provide accountId.");
}

@@ -42,3 +42,3 @@ let selectedAccount = _.find(accounts, a => a.id === accountIdOption);

if (!selectedAccount) {
this.$errors.failWithoutHelp("Invalid accountId index provided.");
this.$nsCloudErrorsService.fail("Invalid accountId index provided.");
}

@@ -64,1 +64,2 @@ return selectedAccount;

$injector.register("nsCloudAccountsService", AccountsService);
//# sourceMappingURL=accounts-service.js.map

@@ -56,1 +56,2 @@ "use strict";

$injector.register("nsCloudApplicationService", ApplicationService);
//# sourceMappingURL=application-service.js.map

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

}
// Start the localhost server to wait for the login response.
let timeoutID = undefined;

@@ -151,2 +152,3 @@ let authCompleteResolveAction;

yield this.refreshCurrentUserToken();
// We don't want to check the state of the new access token because it will be valid.
return true;

@@ -177,1 +179,2 @@ }

$injector.register("nsCloudAuthenticationService", AuthenticationService);
//# sourceMappingURL=authentication-service.js.map

@@ -13,4 +13,4 @@ "use strict";

class CloudAppleService extends cloud_service_1.CloudService {
constructor($constants, $errors, $fs, $httpClient, $logger, $nsCloudOperationFactory, $nsCloudOutputFilter, $nsCloudProcessService, $nsCloudServerBuildService) {
super($errors, $fs, $httpClient, $logger, $constants, $nsCloudOperationFactory, $nsCloudOutputFilter, $nsCloudProcessService);
constructor($constants, $nsCloudErrorsService, $fs, $httpClient, $logger, $nsCloudOperationFactory, $nsCloudOutputFilter, $nsCloudProcessService, $nsCloudServerBuildService) {
super($nsCloudErrorsService, $fs, $httpClient, $logger, $constants, $nsCloudOperationFactory, $nsCloudOutputFilter, $nsCloudProcessService);
this.$nsCloudServerBuildService = $nsCloudServerBuildService;

@@ -32,3 +32,3 @@ }

if (!appleLoginResult.data || !appleLoginResult.data.appleSessionBase64) {
this.$errors.failWithoutHelp(`Apple login failed. Reason is: ${appleLoginResult.errors}. Additional information: ${appleLoginResult.stderr || appleLoginResult.stdout}.`);
this.$nsCloudErrorsService.fail(`Apple login failed. Reason is: ${appleLoginResult.errors}. Additional information: ${appleLoginResult.stderr || appleLoginResult.stdout}.`);
}

@@ -43,1 +43,2 @@ return appleLoginResult.data.appleSessionBase64;

$injector.register("nsCloudAppleService", CloudAppleService);
//# sourceMappingURL=cloud-apple-service.js.map

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

class CloudBuildPropertiesService {
constructor($nsCloudBuildHelper, $errors, $fs, $mobileHelper) {
constructor($nsCloudBuildHelper, $nsCloudErrorsService, $fs, $mobileHelper) {
this.$nsCloudBuildHelper = $nsCloudBuildHelper;
this.$errors = $errors;
this.$nsCloudErrorsService = $nsCloudErrorsService;
this.$fs = $fs;

@@ -25,12 +25,12 @@ this.$mobileHelper = $mobileHelper;

if (!androidBuildData || !androidBuildData.pathToCertificate) {
this.$errors.failWithoutHelp("When building for Release configuration, you must specify valid Certificate and its password.");
this.$nsCloudErrorsService.fail("When building for Release configuration, you must specify valid Certificate and its password.");
}
if (!this.$fs.exists(androidBuildData.pathToCertificate)) {
this.$errors.failWithoutHelp(`The specified certificate: ${androidBuildData.pathToCertificate} does not exist. Verify the location is correct.`);
this.$nsCloudErrorsService.fail(`The specified certificate: ${androidBuildData.pathToCertificate} does not exist. Verify the location is correct.`);
}
if (!androidBuildData.certificatePassword) {
this.$errors.failWithoutHelp(`No password specified for certificate ${androidBuildData.pathToCertificate}.`);
this.$nsCloudErrorsService.fail(`No password specified for certificate ${androidBuildData.pathToCertificate}.`);
}
if (androidBuildData.certificatePassword.length < 6) {
this.$errors.failWithoutHelp("The password for Android certificate must be at least 6 characters long.");
this.$nsCloudErrorsService.fail("The password for Android certificate must be at least 6 characters long.");
}

@@ -40,9 +40,9 @@ }

if (!iOSBuildData || !iOSBuildData.pathToCertificate || !iOSBuildData.certificatePassword || !iOSBuildData.pathToProvision) {
this.$errors.failWithoutHelp("When building for iOS you must specify valid Mobile Provision, Certificate and its password.");
this.$nsCloudErrorsService.fail("When building for iOS you must specify valid Mobile Provision, Certificate and its password.");
}
if (!this.$fs.exists(iOSBuildData.pathToCertificate)) {
this.$errors.failWithoutHelp(`The specified certificate: ${iOSBuildData.pathToCertificate} does not exist. Verify the location is correct.`);
this.$nsCloudErrorsService.fail(`The specified certificate: ${iOSBuildData.pathToCertificate} does not exist. Verify the location is correct.`);
}
if (!this.$fs.exists(iOSBuildData.pathToProvision)) {
this.$errors.failWithoutHelp(`The specified provision: ${iOSBuildData.pathToProvision} does not exist. Verify the location is correct.`);
this.$nsCloudErrorsService.fail(`The specified provision: ${iOSBuildData.pathToProvision} does not exist. Verify the location is correct.`);
}

@@ -81,3 +81,3 @@ const certInfo = this.$nsCloudBuildHelper.getCertificateInfo(iOSBuildData.pathToCertificate, iOSBuildData.certificatePassword);

if (errors.length) {
this.$errors.failWithoutHelp(errors.join(os_1.EOL));
this.$nsCloudErrorsService.fail(errors.join(os_1.EOL));
}

@@ -156,1 +156,2 @@ }

$injector.register("nsCloudBuildPropertiesService", CloudBuildPropertiesService);
//# sourceMappingURL=cloud-build-properties-service.js.map

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

class CloudBuildService extends cloud_service_1.CloudService {
constructor($constants, $errors, $fs, $httpClient, $logger, $nsCloudOperationFactory, $nsCloudOutputFilter, $nsCloudProcessService, $nsCloudBuildHelper, $nsCloudBuildPropertiesService, $mobileHelper, $devicePlatformsConstants, $nsCloudConfigurationService, $nsCloudAccountsService, $nsCloudServerBuildService, $nsCloudGitService, $nsCloudItmsServicesPlistHelper, $nsCloudUploadService, $nsCloudUserService, $nsCloudVersionService, $nsCloudEncryptionService, $nsCloudPlatformService, $projectHelper, $projectDataService, $qr, $nsCloudPlatformsData, $filesHashService) {
super($errors, $fs, $httpClient, $logger, $constants, $nsCloudOperationFactory, $nsCloudOutputFilter, $nsCloudProcessService);
constructor($constants, $nsCloudErrorsService, $fs, $httpClient, $logger, $nsCloudOperationFactory, $nsCloudOutputFilter, $nsCloudProcessService, $nsCloudBuildHelper, $nsCloudBuildPropertiesService, $mobileHelper, $devicePlatformsConstants, $nsCloudConfigurationService, $nsCloudAccountsService, $nsCloudServerBuildService, $nsCloudGitService, $nsCloudItmsServicesPlistHelper, $nsCloudUploadService, $nsCloudUserService, $nsCloudVersionService, $nsCloudEncryptionService, $nsCloudPlatformService, $projectHelper, $projectDataService, $qr, $nsCloudPlatformsData, $filesHashService) {
super($nsCloudErrorsService, $fs, $httpClient, $logger, $constants, $nsCloudOperationFactory, $nsCloudOutputFilter, $nsCloudProcessService);
this.$nsCloudBuildHelper = $nsCloudBuildHelper;

@@ -53,2 +53,5 @@ this.$nsCloudBuildPropertiesService = $nsCloudBuildPropertiesService;

}
/**
* Here only for backwards compatibility. Deleting this will require a major version change as it is used in NativeScript Sidekick.
*/
getBuildOutputDirectory(options) {

@@ -145,3 +148,4 @@ return this.getServerOperationOutputDirectory(options);

if (!buildResult.buildItems || !buildResult.buildItems.length) {
this.$errors.failWithoutHelp(`Build failed. Reason is: ${buildResult.errors}. Additional information: ${buildResult.stderr}.`);
// Something failed.
this.$nsCloudErrorsService.fail(`Build failed. Reason is: ${buildResult.errors}. Additional information: ${buildResult.stderr}.`);
}

@@ -172,2 +176,5 @@ this.$logger.info(`Finished ${buildInformationString} successfully. Downloading result...`);

};
// In case HMR is passed, do not save the hashes as the files generated in the cloud may differ from the local ones.
// We need to get the hashes from the cloud build, so until we have it, it is safer to execute fullSync after build.
// This way we'll be sure HMR is working with cloud builds as it will rely on the local files.
const platformData = this.$nsCloudPlatformsData.getPlatformData(platform, this.$projectDataService.getProjectData(projectSettings.projectDir));

@@ -207,2 +214,4 @@ if (this.$filesHashService.saveHashesForProject && !projectSettings.useHotModuleReload) {

this.emitStepChanged(cloudOperationId, constants.BUILD_STEP_NAME.PREPARE, constants.BUILD_STEP_PROGRESS.START);
// HACK: Ensure __PACKAGE__ is interpolated in app.gradle file in the user project.
// In case we don't interpolate every other cloud android build is bound to fail because it would set the application's identifier to __PACKAGE__
const userAppGradleFilePath = path.join(projectData.appResourcesDirectoryPath, this.$devicePlatformsConstants.Android, "app.gradle");

@@ -258,2 +267,7 @@ if (this.$fs.exists(userAppGradleFilePath)) {

};
/** Although the nativescript-cloud is an extension that is used only with nativescript projects,
* current implementation of the builder daemon will not add default framework. This breaks tooling when incremental build is
* performed. Passing the framework=tns here is more consistent that adding conditional
* behavior in the tooling.
*/
const result = {

@@ -291,2 +305,3 @@ cloudOperationId: settings.cloudOperationId,

getBuildResultUrl(buildResult) {
// We expect only one buildResult - .ipa, .apk ...
return this.getServerResults(buildResult)[0].fullPath;

@@ -297,3 +312,3 @@ }

if (!result) {
this.$errors.failWithoutHelp("No item with disposition BuildResult found in the build result items.");
this.$nsCloudErrorsService.fail("No item with disposition BuildResult found in the build result items.");
}

@@ -335,1 +350,2 @@ return [result];

$injector.register("nsCloudBuildService", CloudBuildService);
//# sourceMappingURL=cloud-build-service.js.map

@@ -16,4 +16,4 @@ "use strict";

class CloudCodesignService extends cloud_service_1.CloudService {
constructor($constants, $errors, $fs, $httpClient, $logger, $nsCloudOperationFactory, $nsCloudOutputFilter, $nsCloudProcessService, $nsCloudServerBuildService, $projectHelper, $projectDataService) {
super($errors, $fs, $httpClient, $logger, $constants, $nsCloudOperationFactory, $nsCloudOutputFilter, $nsCloudProcessService);
constructor($constants, $nsCloudErrorsService, $fs, $httpClient, $logger, $nsCloudOperationFactory, $nsCloudOutputFilter, $nsCloudProcessService, $nsCloudServerBuildService, $projectHelper, $projectDataService) {
super($nsCloudErrorsService, $fs, $httpClient, $logger, $constants, $nsCloudOperationFactory, $nsCloudOutputFilter, $nsCloudProcessService);
this.$nsCloudServerBuildService = $nsCloudServerBuildService;

@@ -44,3 +44,3 @@ this.$projectHelper = $projectHelper;

if (!result) {
this.$errors.failWithoutHelp(`No item with disposition ${constants.DISPOSITIONS.CERTIFICATE} or ${constants.DISPOSITIONS.PROVISION} found in the server result items.`);
this.$nsCloudErrorsService.fail(`No item with disposition ${constants.DISPOSITIONS.CERTIFICATE} or ${constants.DISPOSITIONS.PROVISION} found in the server result items.`);
}

@@ -54,6 +54,6 @@ return result;

if (!codesignData || !codesignData.username || !codesignData.password) {
this.$errors.failWithoutHelp(`Codesign failed. Reason is missing code sign data. Apple Id and Apple Id password are required..`);
this.$nsCloudErrorsService.fail(`Codesign failed. Reason is missing code sign data. Apple Id and Apple Id password are required..`);
}
if (!projectDir) {
this.$errors.failWithoutHelp(`Codesign failed. Reason is invalid project path.`);
this.$nsCloudErrorsService.fail(`Codesign failed. Reason is invalid project path.`);
}

@@ -73,2 +73,3 @@ }

if (!codesignResult.buildItems || !codesignResult.buildItems.length) {
// Something failed.
let errText = codesignResult.errors || "";

@@ -118,1 +119,2 @@ if (errText.indexOf("403 Forbidden") > -1) {

$injector.register("nsCloudCodesignService", CloudCodesignService);
//# sourceMappingURL=cloud-codesign-service.js.map

@@ -26,1 +26,2 @@ "use strict";

$injector.register("nsCloudConfigurationService", CloudConfigurationService);
//# sourceMappingURL=cloud-configuration-service.js.map

@@ -51,1 +51,2 @@ "use strict";

$injector.register("nsCloudEncryptionService", CloudEncryptionService);
//# sourceMappingURL=cloud-encryption-service.js.map

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

}
// TODO: Remove Promise, reason: writeFile - blocked as other implementation of the interface has async operation.
loadUserSettingsFile() {

@@ -77,2 +78,4 @@ return __awaiter(this, void 0, void 0, function* () {

this.$fs.writeFile(this.userSettingsFilePath, null);
// when running under 'sudo' we create the <path to home dir>/.local/share/.nativescript-cli dir with root as owner
// and other Applications cannot access this directory anymore. (bower/heroku/etc)
if (process.env.SUDO_USER) {

@@ -97,2 +100,3 @@ for (const dir of unexistingDirs) {

while (true) {
// this directory won't be created.
if (this.$fs.exists(currentDir)) {

@@ -109,1 +113,2 @@ break;

$injector.register("nsCloudEncryptionSettingsService", EncryptionSettingsService);
//# sourceMappingURL=cloud-encryption-settings-service.js.map

@@ -116,1 +116,2 @@ "use strict";

$injector.register("nsCloudPlatformService", CloudPlatformService);
//# sourceMappingURL=cloud-platform-service.js.map

@@ -15,4 +15,4 @@ "use strict";

class CloudProjectService extends cloud_service_1.CloudService {
constructor($constants, $errors, $fs, $httpClient, $logger, $nsCloudOperationFactory, $nsCloudOutputFilter, $nsCloudProcessService, $nsCloudServerProjectService, $projectHelper) {
super($errors, $fs, $httpClient, $logger, $constants, $nsCloudOperationFactory, $nsCloudOutputFilter, $nsCloudProcessService);
constructor($constants, $nsCloudErrorsService, $fs, $httpClient, $logger, $nsCloudOperationFactory, $nsCloudOutputFilter, $nsCloudProcessService, $nsCloudServerProjectService, $projectHelper) {
super($nsCloudErrorsService, $fs, $httpClient, $logger, $constants, $nsCloudOperationFactory, $nsCloudOutputFilter, $nsCloudProcessService);
this.$nsCloudServerProjectService = $nsCloudServerProjectService;

@@ -122,1 +122,2 @@ this.$projectHelper = $projectHelper;

$injector.register("nsCloudProjectService", CloudProjectService);
//# sourceMappingURL=cloud-project-service.js.map

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

class CloudPublishService extends cloud_service_1.CloudService {
constructor($constants, $errors, $fs, $httpClient, $logger, $nsCloudOperationFactory, $nsCloudOutputFilter, $nsCloudProcessService, $nsCloudServerBuildService, $devicePlatformsConstants, $nsCloudUploadService, $projectDataService) {
super($errors, $fs, $httpClient, $logger, $constants, $nsCloudOperationFactory, $nsCloudOutputFilter, $nsCloudProcessService);
constructor($constants, $nsCloudErrorsService, $fs, $httpClient, $logger, $nsCloudOperationFactory, $nsCloudOutputFilter, $nsCloudProcessService, $nsCloudServerBuildService, $devicePlatformsConstants, $nsCloudUploadService, $projectDataService) {
super($nsCloudErrorsService, $fs, $httpClient, $logger, $constants, $nsCloudOperationFactory, $nsCloudOutputFilter, $nsCloudProcessService);
this.$nsCloudServerBuildService = $nsCloudServerBuildService;

@@ -53,3 +53,3 @@ this.$devicePlatformsConstants = $devicePlatformsConstants;

if (!publishData.pathToAuthJson || !this.$fs.exists(publishData.pathToAuthJson)) {
this.$errors.failWithoutHelp("Cannot perform publish - auth json file is not supplied or the provided path does not exist.");
this.$nsCloudErrorsService.fail("Cannot perform publish - auth json file is not supplied or the provided path does not exist.");
}

@@ -61,3 +61,3 @@ let authJson;

catch (ex) {
this.$errors.failWithoutHelp("Cannot perform publish - auth json file is not in JSON format.");
this.$nsCloudErrorsService.fail("Cannot perform publish - auth json file is not in JSON format.");
}

@@ -119,6 +119,6 @@ publishData.track = publishData.track || constants_1.DEFAULT_ANDROID_PUBLISH_TRACK;

if (!publishData.packagePaths || !publishData.packagePaths.length) {
this.$errors.failWithoutHelp("Cannot upload without packages");
this.$nsCloudErrorsService.fail("Cannot upload without packages");
}
if (!publishData.projectDir) {
this.$errors.failWithoutHelp("Cannot perform publish - projectDir is required.");
this.$nsCloudErrorsService.fail("Cannot perform publish - projectDir is required.");
}

@@ -131,2 +131,3 @@ }

}
// Taken from: https://github.com/fastlane/fastlane/blob/master/fastlane_core/lib/fastlane_core/itunes_transporter.rb#L100
CloudPublishService.ITMS_ERROR_REGEX = /\[Transporter Error Output\]:.*/g;

@@ -136,1 +137,2 @@ CloudPublishService.GENERAL_ERROR_REGEX = /\[!\].*/g;

$injector.register("nsCloudPublishService", CloudPublishService);
//# sourceMappingURL=cloud-publish-service.js.map

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

class CloudService extends events_1.EventEmitter {
constructor($errors, $fs, $httpClient, $logger, $constants, $nsCloudOperationFactory, $nsCloudOutputFilter, $nsCloudProcessService) {
constructor($nsCloudErrorsService, $fs, $httpClient, $logger, $constants, $nsCloudOperationFactory, $nsCloudOutputFilter, $nsCloudProcessService) {
super();
this.$errors = $errors;
this.$nsCloudErrorsService = $nsCloudErrorsService;
this.$fs = $fs;

@@ -37,3 +37,3 @@ this.$httpClient = $httpClient;

if (!cloudOperation) {
this.$errors.failWithoutHelp(`Cloud operation with id: ${message.cloudOperationId} not found.`);
this.$nsCloudErrorsService.fail(`Cloud operation with id: ${message.cloudOperationId} not found.`);
}

@@ -123,2 +123,3 @@ yield cloudOperation.cloudOperation.sendMessage(message);

const targetFile = this.$fs.createWriteStream(targetFileName);
// Download the output file.
yield this.$httpClient.httpRequest({

@@ -162,3 +163,6 @@ url: serverResultObj.fullPath,

const logger = this.$logger;
// Print the output on the same line to have cool effects like loading indicators.
// The cloud process will take care of the new lines.
if (logger.printInfoMessageOnSameLine) {
// Used in CLI before 6.0.0
logger.printInfoMessageOnSameLine(msg);

@@ -173,1 +177,2 @@ }

exports.CloudService = CloudService;
//# sourceMappingURL=cloud-service.js.map

@@ -75,1 +75,2 @@ "use strict";

$injector.register("nsCloudServicesPolicyService", CloudServicesPolicyService);
//# sourceMappingURL=cloud-services-policy-service.js.map

@@ -25,5 +25,7 @@ "use strict";

}
// Exposed for Sidekick
getEulaData() {
return this.getEulaDataWithCache();
}
// CLI always uses this one
getEulaDataWithCache() {

@@ -60,2 +62,4 @@ return __awaiter(this, void 0, void 0, function* () {

}
// At this point we should have already downloaded the EULA, so just get the info for local file.
// If it does not exist - we were unable to download it.
const currentEulaHash = yield this.getLocalEulaHash();

@@ -123,2 +127,4 @@ if (!currentEulaHash) {

getLockOptions() {
// We'll retry 100 times and time between retries is 100ms, i.e. full wait in case we are unable to get lock will be 10 seconds.
// In case lock is older than 13 seconds, consider it stale and try to get a new lock.
return {

@@ -151,1 +157,2 @@ retryWait: 100,

exports.EulaServiceBase = EulaServiceBase;
//# sourceMappingURL=eula-service-base.js.map

@@ -21,1 +21,2 @@ "use strict";

$injector.register("nsCloudEulaService", EulaService);
//# sourceMappingURL=eula-service.js.map

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

this.$logger.trace("Setting core.autocrlf to false");
// Commit line ending as is, do not allow git to change them.
yield this.executeCommand(projectSettings, ["config", "--local", "core.autocrlf", "false"]);

@@ -89,2 +90,7 @@ }

const gitMinorVersion = ~~match[2];
// After version 2.9.x git prompt for credential with Windows Credential Manager first then query over the rest of the credential managers.
// If credential.helper is configured to the empty string,
// this resets the helper list to empty (so you may override a helper set by a lower-priority config file by configuring the empty-string helper,
// followed by whatever set of helpers you would like).
// https://git-scm.com/docs/gitcredentials
if (this.$hostInfo.isWindows) {

@@ -236,4 +242,10 @@ if (gitMajorVersion === GitService.MINIMAL_GIT_MAJOR_VERSION &&

GitService.MINIMAL_GIT_MINOR_VERSION = 9;
/**
* Used when we want to force creation of new local repository after release of nativescript-cloud package.
* Just increment this version and new local repositories will be created for each project.
* Required for cases where we want to change some git settings in the repo and ensure they are pushed in the cloud.
*/
GitService.GIT_REPO_VERSION = "v1";
exports.GitService = GitService;
$injector.register("nsCloudGitService", GitService);
//# sourceMappingURL=git-service.js.map

@@ -30,1 +30,2 @@ "use strict";

$injector.register("nsCloudHashService", HashService);
//# sourceMappingURL=hash-service.js.map

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

const eula_service_base_1 = require("./eula-service-base");
// TODO: Remove in 2.0.0 - currently this service is not used, but it has been publicly exposed, so we cannot remove it without bumping the major version.
class KinveyEulaService extends eula_service_base_1.EulaServiceBase {

@@ -22,1 +23,2 @@ constructor($fs, $httpClient, $nsCloudLockService, $logger, $nsCloudHashService, $settingsService, $userSettingsService) {

$injector.register("nsCloudKinveyEulaService", KinveyEulaService);
//# sourceMappingURL=kinvey-eula-service.js.map

@@ -46,5 +46,8 @@ "use strict";

updateAuthService(input) {
// The Kinvey api does not accept {} for customized login.
if (_.isEmpty(input.authService.customizedLogin)) {
delete input.authService.customizedLogin;
}
// The Kinvey api does not accept null for provider.authentication.
// The api docs say it should accept null but...
if (_.isEmpty(input.authService.provider.authentication)) {

@@ -77,2 +80,4 @@ delete input.authService.provider.authentication;

catch (err) {
// Currently there is bug in the Kinvey backend - after the default auth service for an environment is
// deleted, the defaultAuthServiceId property is not changed. That's why we need to handle the error and return null.
if (err && err.response && err.response.statusCode === 404) {

@@ -141,1 +146,2 @@ return null;

$injector.register("nsCloudKinveyService", KinveyService);
//# sourceMappingURL=kinvey-service.js.map

@@ -7,4 +7,4 @@ "use strict";

class KinveyUserService extends user_service_base_1.UserServiceBase {
constructor($hostInfo, $injector, $logger, $fs, $errors) {
super($injector, $logger, $fs, $errors);
constructor($hostInfo, $injector, $logger, $fs, $nsCloudErrorsService) {
super($injector, $logger, $fs, $nsCloudErrorsService);
this.$hostInfo = $hostInfo;

@@ -43,1 +43,2 @@ this.userFilePath = this.getUserFilePath();

$injector.register("nsCloudKinveyUserService", KinveyUserService);
//# sourceMappingURL=kinvey-user-service.js.map

@@ -11,2 +11,4 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
// This service is here only for backwards compatibility.
// We can delete it when we require at least {N} CLI 5.4.0.
class NsCouldLockService {

@@ -49,1 +51,2 @@ constructor($injector) {

$injector.register("nsCloudLockService", NsCouldLockService);
//# sourceMappingURL=lock-service.js.map

@@ -18,1 +18,2 @@ "use strict";

$injector.register("nsCloudPackageInfoService", PackageInfoService);
//# sourceMappingURL=package-info-service.js.map

@@ -14,4 +14,4 @@ "use strict";

class PolicyService {
constructor($errors, $fs, $httpClient, $nsCloudHashService, $userSettingsService) {
this.$errors = $errors;
constructor($nsCloudErrorsService, $fs, $httpClient, $nsCloudHashService, $userSettingsService) {
this.$nsCloudErrorsService = $nsCloudErrorsService;
this.$fs = $fs;

@@ -43,3 +43,3 @@ this.$httpClient = $httpClient;

if (!policyCloudContent) {
this.$errors.failWithoutHelp("Invalid policy.");
this.$nsCloudErrorsService.fail("Invalid policy.");
}

@@ -93,1 +93,2 @@ yield this.setPolicyUserSetting(data.policyName, policyCloudContent);

$injector.register("nsCloudPolicyService", PolicyService);
//# sourceMappingURL=policy-service.js.map

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

$injector.register("nsCloudPolyfillService", PolyfillService);
//# sourceMappingURL=polyfill-service.js.map
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
// TODO: Delete this once we do not support NativeScript CLI below 5.4.0
class CloudProcessService {

@@ -25,1 +26,2 @@ constructor($nsCloudPolyfillService) {

$injector.register("nsCloudProcessService", CloudProcessService);
//# sourceMappingURL=process-service.js.map

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

return __awaiter(this, void 0, void 0, function* () {
// Intentionally left blank - no need to accept Kinvey EULA.
});

@@ -67,1 +68,2 @@ }

$injector.register("nsCloudKinveyRequestService", KinveyRequestService);
//# sourceMappingURL=kinvey-request-service.js.map

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

class MBaasProxy extends server_services_proxy_1.ServerServicesProxy {
constructor($errors, $httpClient, $logger, $nsCloudConfigManager, $nsCloudUserService) {
super($errors, $httpClient, $logger, $nsCloudConfigManager, $nsCloudUserService);
constructor($nsCloudErrorsService, $httpClient, $logger, $nsCloudConfigManager, $nsCloudUserService) {
super($nsCloudErrorsService, $httpClient, $logger, $nsCloudConfigManager, $nsCloudUserService);
}

@@ -24,1 +24,2 @@ getUrlPath(serviceName, urlPath) {

$injector.register("nsCloudMBaasProxy", MBaasProxy);
//# sourceMappingURL=mbaas-proxy.js.map

@@ -15,1 +15,2 @@ "use strict";

$injector.register("nsCloudMBaasRequestService", MBaasRequestService);
//# sourceMappingURL=mbaas-request-service.js.map

@@ -29,1 +29,2 @@ "use strict";

$injector.register("nsCloudServerAccountsService", ServerAccountsService);
//# sourceMappingURL=server-accounts-service.js.map

@@ -44,1 +44,2 @@ "use strict";

$injector.register("nsCloudServerAuthService", ServerAuthService);
//# sourceMappingURL=server-auth-service.js.map

@@ -33,1 +33,2 @@ "use strict";

$injector.register("nsCloudServerBuildService", ServerBuildService);
//# sourceMappingURL=server-build-service.js.map

@@ -17,1 +17,2 @@ "use strict";

$injector.register("nsCloudServerProjectService", ServerProjectService);
//# sourceMappingURL=server-project-service.js.map

@@ -21,5 +21,7 @@ "use strict";

try {
// Try to send the request.
return yield this.proxyService.call(options);
}
catch (requestError) {
// If the server returns 401 we must try to get new access token using the refresh token and retry the request.
if (requestError.response && requestError.response.statusCode === constants_1.HTTP_STATUS_CODES.UNAUTHORIZED) {

@@ -51,1 +53,2 @@ this.$logger.trace("Access token expired. Trying to issue a new one.");

$injector.register("nsCloudServerRequestService", ServerRequestService);
//# sourceMappingURL=server-request-service.js.map

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

}
get $errors() {
get $nsCloudErrorsService() {
return this.$injector.resolve("errors");

@@ -43,3 +43,3 @@ }

if (eulaData.shouldAcceptEula) {
this.$errors.failWithoutHelp(`EULA is not accepted, cannot use cloud services.`);
this.$nsCloudErrorsService.fail(`EULA is not accepted, cannot use cloud services.`);
}

@@ -63,1 +63,2 @@ });

exports.ServerServiceBase = ServerServiceBase;
//# sourceMappingURL=server-service-base.js.map

@@ -14,4 +14,4 @@ "use strict";

class ServerServicesProxy {
constructor($errors, $httpClient, $logger, $nsCloudConfigManager, $nsCloudUserService) {
this.$errors = $errors;
constructor($nsCloudErrorsService, $httpClient, $logger, $nsCloudConfigManager, $nsCloudUserService) {
this.$nsCloudErrorsService = $nsCloudErrorsService;
this.$httpClient = $httpClient;

@@ -66,3 +66,3 @@ this.$logger = $logger;

if (err.response && err.response.statusCode === 402) {
this.$errors.failWithoutHelp(JSON.parse(err.body).message);
this.$nsCloudErrorsService.fail(JSON.parse(err.body).message);
}

@@ -88,2 +88,3 @@ throw err;

let result;
// When we use localhost we don't have api version and we use the url path as is.
if (!apiVersion) {

@@ -93,2 +94,3 @@ result = urlPath;

else {
// In case we use PR build or the official services we must prepend the api version to the url path.
result = `${apiVersion}/${urlPath}`;

@@ -107,1 +109,2 @@ }

$injector.register("nsCloudServerServicesProxy", ServerServicesProxy);
//# sourceMappingURL=server-services-proxy.js.map

@@ -7,4 +7,4 @@ "use strict";

class TelerikUserService extends user_service_base_1.UserServiceBase {
constructor($hostInfo, $injector, $logger, $fs, $errors) {
super($injector, $logger, $fs, $errors);
constructor($hostInfo, $injector, $logger, $fs, $nsCloudErrorsService) {
super($injector, $logger, $fs, $nsCloudErrorsService);
this.$hostInfo = $hostInfo;

@@ -19,1 +19,2 @@ this.userFilePath = this.getUserFilePath();

$injector.register("nsCloudTelerikUserService", TelerikUserService);
//# sourceMappingURL=telerik-user-service.js.map

@@ -14,6 +14,6 @@ "use strict";

class UploadService {
constructor($nsCloudServerBuildService, $httpClient, $errors, $fs) {
constructor($nsCloudServerBuildService, $httpClient, $nsCloudErrorsService, $fs) {
this.$nsCloudServerBuildService = $nsCloudServerBuildService;
this.$httpClient = $httpClient;
this.$errors = $errors;
this.$nsCloudErrorsService = $nsCloudErrorsService;
this.$fs = $fs;

@@ -41,2 +41,3 @@ this.serviceName = constants_1.BUILD_SERVICE_NAME;

requestOpts.headers = requestOpts.headers || {};
// It is vital we set this, else the http request comes out as chunked and S3 doesn't support chunked requests
requestOpts.headers["Content-Length"] = requestOpts.body.length;

@@ -47,3 +48,3 @@ try {

catch (err) {
this.$errors.fail({ formatStr: `Error while uploading ${filePathOrContent} to S3. Errors is: ${err.message}`, proxyAuthenticationRequired: err.proxyAuthenticationRequired, suppressCommandHelp: true });
this.$nsCloudErrorsService.failWithHelp({ formatStr: `Error while uploading ${filePathOrContent} to S3. Errors is: ${err.message}`, proxyAuthenticationRequired: err.proxyAuthenticationRequired, suppressCommandHelp: true });
}

@@ -56,1 +57,2 @@ return preSignedUrlData && preSignedUrlData.publicDownloadUrl;

$injector.register("nsCloudUploadService", UploadService);
//# sourceMappingURL=upload-service.js.map

@@ -12,7 +12,7 @@ "use strict";

class UserServiceBase {
constructor($injector, $logger, $fs, $errors) {
constructor($injector, $logger, $fs, $nsCloudErrorsService) {
this.$injector = $injector;
this.$logger = $logger;
this.$fs = $fs;
this.$errors = $errors;
this.$nsCloudErrorsService = $nsCloudErrorsService;
}

@@ -42,3 +42,3 @@ get $nsCloudServerAccountsService() {

this.$logger.trace(err);
this.$errors.failWithoutHelp("Not logged in.");
this.$nsCloudErrorsService.fail("Not logged in.");
}

@@ -77,1 +77,2 @@ }

exports.UserServiceBase = UserServiceBase;
//# sourceMappingURL=user-service-base.js.map

@@ -51,1 +51,2 @@ "use strict";

$injector.register("nsCloudUserService", UserService);
//# sourceMappingURL=user-service.js.map

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

const prerelease = semver.prerelease(versionRangeOptions.versionString);
// Append -0 if dealing with a prerelease in order to get the latest prerelease available
const prereleaseString = prerelease ? "-0" : "";

@@ -97,1 +98,2 @@ const major = semver.major(versionRangeOptions.versionString);

$injector.register("nsCloudVersionService", VersionService);
//# sourceMappingURL=version-service.js.map

@@ -0,0 +0,0 @@ =========================================================================

{
"name": "nativescript-cloud",
"version": "1.18.1-2019-07-29-01",
"version": "1.18.1-2019-08-16-01",
"description": "Used for cloud support in NativeScript CLI",

@@ -29,3 +29,3 @@ "main": "lib/bootstrap.js",

"@types/randomstring": "1.1.6",
"@types/semver": "5.3.30",
"@types/semver": "5.5.0",
"@types/source-map": "0.5.0",

@@ -63,3 +63,3 @@ "@types/uuid": "2.0.29",

"randomstring": "1.1.5",
"semver": "5.3.0",
"semver": "5.5.0",
"simple-plist": "0.2.1",

@@ -111,2 +111,2 @@ "temp": "0.8.3",

}
}
}

@@ -0,0 +0,0 @@ # nativescript-cloud

Allow cloud build usage according to your NativeScript Sidekick subscription plan.

@@ -0,0 +0,0 @@ {

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