nativescript-cloud
Advanced tools
Comparing version 1.18.1-2019-08-16-11 to 1.18.1-2019-08-16-12
@@ -23,4 +23,2 @@ "use strict"; | ||
this.$nsCloudS3Helper = $nsCloudS3Helper; | ||
this.test1 = 0; | ||
this.test2 = 0; | ||
this.outputCursorPosition = 0; | ||
@@ -66,5 +64,9 @@ } | ||
this.statusCheckInterval = setInterval(() => __awaiter(this, void 0, void 0, function* () { | ||
console.log(this.id + ` ${this.test1} tsvetie: before get serverStatus`); | ||
this.serverStatus = yield this.$nsCloudS3Helper.getJsonObjectFromS3File(this.serverResponse.statusUrl); | ||
console.log(this.id + ` ${this.test1++} tsvetie: serverStatus`, this.serverStatus); | ||
const status = this.serverStatus.status; | ||
if (status !== CloudOperationV1.OPERATION_COMPLETE_STATUS && status !== CloudOperationV1.OPERATION_FAILED_STATUS) { | ||
this.serverStatus = yield this.$nsCloudS3Helper.getJsonObjectFromS3File(this.serverResponse.statusUrl); | ||
} | ||
if (!this.hasLogPollCompleted) { | ||
return; | ||
} | ||
if (this.serverStatus.status === CloudOperationV1.OPERATION_COMPLETE_STATUS) { | ||
@@ -94,16 +96,13 @@ clearInterval(this.statusCheckInterval); | ||
if (this.snoozeLogPoll) { | ||
console.log(this.id + ` ${this.test2} tsvetie: pollForLogs return`); | ||
return; | ||
} | ||
const status = this.serverStatus.status; | ||
const hasCompleted = status === cloud_operation_base_1.CloudOperationBase.OPERATION_COMPLETE_STATUS || status === cloud_operation_base_1.CloudOperationBase.OPERATION_FAILED_STATUS; | ||
if (hasCompleted) { | ||
clearInterval(this.logsCheckInterval); | ||
} | ||
this.snoozeLogPoll = true; | ||
console.log(this.id + ` ${this.test2} tsvetie: pollForLogs, outputCursorPosition: `, this.outputCursorPosition); | ||
yield this.getCloudOperationLogs(); | ||
console.log(this.id + ` ${this.test2} tsvetie: pollForLogs, outputCursorPosition: `, this.outputCursorPosition); | ||
this.test2++; | ||
this.snoozeLogPoll = false; | ||
const status = this.serverStatus.status; | ||
if (status === cloud_operation_base_1.CloudOperationBase.OPERATION_COMPLETE_STATUS || status === cloud_operation_base_1.CloudOperationBase.OPERATION_FAILED_STATUS) { | ||
clearInterval(this.logsCheckInterval); | ||
return; | ||
} | ||
this.hasLogPollCompleted = hasCompleted; | ||
}), CloudOperationV1.OPERATION_STATUS_CHECK_INTERVAL); | ||
@@ -114,10 +113,5 @@ } | ||
try { | ||
console.log(this.id + ` ${this.test2} tsvetie: poll for logs`); | ||
const logs = yield this.$nsCloudS3Helper.getContentOfS3File(this.serverResponse.outputUrl); | ||
console.log(this.id + ` ${this.test2} tsvetie: poll for logs logs.length: `, logs.length); | ||
console.log(this.id + ` ${this.test2} tsvetie: poll for logs old outputCursorPosition: `, this.outputCursorPosition); | ||
// 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)); | ||
this.outputCursorPosition = logs.length <= 0 ? 0 : logs.length - 1; | ||
console.log(this.id + ` ${this.test2} tsvetie: poll for logs new outputCursorPosition: `, this.outputCursorPosition); | ||
if (contentToLog) { | ||
@@ -132,8 +126,5 @@ const data = { | ||
}; | ||
console.log(this.id + ` ${this.test2} tsvetie: poll for logs outputCursorPosition: `, this.outputCursorPosition); | ||
console.log(this.id + ` ${this.test2} tsvetie: poll for logs before emit: `, contentToLog.length); | ||
this.emit(constants_1.CloudCommunicationEvents.MESSAGE, data); | ||
console.log(this.id + ` ${this.test2} tsvetie: poll for logs outputCursorPosition: `, this.outputCursorPosition); | ||
console.log(this.id + ` ${this.test2} tsvetie: poll for logs after emit`); | ||
} | ||
this.outputCursorPosition = logs.length <= 0 ? 0 : logs.length - 1; | ||
} | ||
@@ -140,0 +131,0 @@ catch (err) { |
@@ -75,3 +75,4 @@ "use strict"; | ||
env: this.$options.env, | ||
useHotModuleReload: this.$options.hmr | ||
useHotModuleReload: this.$options.hmr, | ||
aab: this.$options.aab | ||
}; | ||
@@ -78,0 +79,0 @@ const buildConfiguration = this.$options.release ? constants_1.CLOUD_BUILD_CONFIGURATIONS.RELEASE : constants_1.CLOUD_BUILD_CONFIGURATIONS.DEBUG; |
@@ -13,3 +13,3 @@ "use strict"; | ||
class CloudBuildCommand extends interactive_cloud_command_1.InteractiveCloudCommand { | ||
constructor($nsCloudProcessService, $nsCloudErrorsService, $logger, $prompter, $nsCloudEulaCommandHelper, $nsCloudBuildCommandHelper, $nsCloudBuildService, $nsCloudOptionsProvider, $options, $projectData, $nsCloudAndroidBundleValidatorHelper) { | ||
constructor($nsCloudProcessService, $nsCloudErrorsService, $logger, $prompter, $nsCloudEulaCommandHelper, $nsCloudBuildCommandHelper, $nsCloudBuildService, $nsCloudOptionsProvider, $options, $projectData) { | ||
super($nsCloudBuildService, $nsCloudProcessService, $nsCloudErrorsService, $logger, $prompter); | ||
@@ -25,3 +25,2 @@ this.$nsCloudErrorsService = $nsCloudErrorsService; | ||
this.$projectData = $projectData; | ||
this.$nsCloudAndroidBundleValidatorHelper = $nsCloudAndroidBundleValidatorHelper; | ||
this.$projectData.initializeProjectData(); | ||
@@ -35,3 +34,2 @@ } | ||
yield this.$nsCloudEulaCommandHelper.ensureEulaIsAccepted(); | ||
this.$nsCloudAndroidBundleValidatorHelper.validateNoAab(); | ||
if (!args || !args.length) { | ||
@@ -38,0 +36,0 @@ this.$nsCloudErrorsService.failWithHelp("Provide platform."); |
@@ -117,2 +117,5 @@ "use strict"; | ||
} | ||
if (projectSettings.aab) { | ||
additionalCliFlags.push("--aab"); | ||
} | ||
if (projectSettings.env) { | ||
@@ -119,0 +122,0 @@ const envOptions = _.map(projectSettings.env, (value, key) => `--env.${key}=${value}`); |
{ | ||
"name": "nativescript-cloud", | ||
"version": "1.18.1-2019-08-16-11", | ||
"version": "1.18.1-2019-08-16-12", | ||
"description": "Used for cloud support in NativeScript CLI", | ||
@@ -5,0 +5,0 @@ "main": "lib/bootstrap.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
464310
6227