Socket
Socket
Sign inDemoInstall

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.17.6-2019-06-13-01 to 1.17.6

2

lib/bootstrap.js

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

$injector.require("nsCloudS3Helper", path.join(__dirname, "s3-helper"));
$injector.require("nsCloudPlatformsData", path.join(__dirname, "cloud-platforms-data"));
$injector.require("nsCloudOperationFactory", path.join(__dirname, "cloud-operation", "cloud-operation-factory"));

@@ -57,3 +56,2 @@ $injector.require("nsCloudCommunicationChannelFactory", path.join(__dirname, "cloud-operation", "communication", "communication-channel-factory"));

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

@@ -60,0 +58,0 @@ $injector.requireCommand("config|apply", path.join(__dirname, "commands", "config", "config-apply"));

11

lib/commands/cloud-deploy.js

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

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

@@ -19,4 +19,5 @@ this.$errors = $errors;

this.$prompter = $prompter;
this.$platformService = $platformService;
this.$nsCloudEulaCommandHelper = $nsCloudEulaCommandHelper;
this.$nsCloudPlatformService = $nsCloudPlatformService;
this.$deployCommandHelper = $deployCommandHelper;
this.$nsCloudBuildCommandHelper = $nsCloudBuildCommandHelper;

@@ -53,3 +54,7 @@ this.$nsCloudBuildService = $nsCloudBuildService;

});
return this.$nsCloudPlatformService.deployPlatform(args[0], outputDirectoryPath);
const deployPlatformInfo = this.$deployCommandHelper.getDeployPlatformInfo(args[0]);
deployPlatformInfo.buildPlatform = this.$nsCloudBuildCommandHelper.buildPlatform.bind(this.$nsCloudBuildCommandHelper);
deployPlatformInfo.outputPath = outputDirectoryPath;
deployPlatformInfo.nativePrepare = { skipNativePrepare: true };
return this.$platformService.deployPlatform(deployPlatformInfo);
}

@@ -56,0 +61,0 @@ }

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

Object.defineProperty(exports, "__esModule", { value: true });
const semver = require("semver");
class ApplicationService {
constructor($nsCloudPlatformService, $projectDataService, $devicesService, $projectChangesService) {
this.$nsCloudPlatformService = $nsCloudPlatformService;
constructor($platformService, $projectDataService, $devicesService, $projectChangesService, $staticConfig, $logger) {
this.$platformService = $platformService;
this.$projectDataService = $projectDataService;
this.$devicesService = $devicesService;
this.$projectChangesService = $projectChangesService;
this.$staticConfig = $staticConfig;
this.$logger = $logger;
}

@@ -24,8 +27,16 @@ shouldBuild(config) {

config.bundle = config.bundle === undefined ? false : config.bundle;
yield this.$projectChangesService.checkForChanges({
platform: config.platform,
projectData,
projectChangesOptions: config
});
return this.$nsCloudPlatformService.shouldBuild(config, projectData);
const cliVersion = this.$staticConfig.version;
const shouldUseOldCheckForChanges = semver.valid(cliVersion) && semver.lt(cliVersion, semver.prerelease(cliVersion) ? "4.2.0-2018-07-17-11996" : "4.2.0");
if (shouldUseOldCheckForChanges) {
this.$logger.trace(`Using old checkForChanges as CLI version is ${cliVersion}.`);
yield this.$projectChangesService.checkForChanges(config.platform, projectData, config);
}
else {
yield this.$projectChangesService.checkForChanges({
platform: config.platform,
projectData,
projectChangesOptions: config
});
}
return this.$platformService.shouldBuild(config.platform, projectData, config, config.outputPath);
});

@@ -37,3 +48,3 @@ }

const device = yield this.$devicesService.getDevice(config.deviceIdentifier);
return this.$nsCloudPlatformService.shouldInstall(config, projectData, device);
return this.$platformService.shouldInstall(device, projectData, config, config.outputPath);
});

@@ -40,0 +51,0 @@ }

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

const path = require("path");
const semver = require("semver");
const uuid = require("uuid");

@@ -18,3 +19,3 @@ const querystring_1 = require("querystring");

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) {
constructor($constants, $errors, $fs, $httpClient, $logger, $nsCloudOperationFactory, $nsCloudOutputFilter, $nsCloudProcessService, $nsCloudBuildHelper, $nsCloudBuildPropertiesService, $mobileHelper, $devicePlatformsConstants, $nsCloudConfigurationService, $nsCloudAccountsService, $nsCloudServerBuildService, $nsCloudGitService, $nsCloudItmsServicesPlistHelper, $nsCloudUploadService, $nsCloudUserService, $nsCloudVersionService, $nsCloudEncryptionService, $platformService, $projectHelper, $projectDataService, $qr, $staticConfig, $platformsData, $filesHashService) {
super($errors, $fs, $httpClient, $logger, $constants, $nsCloudOperationFactory, $nsCloudOutputFilter, $nsCloudProcessService);

@@ -34,7 +35,8 @@ this.$nsCloudBuildHelper = $nsCloudBuildHelper;

this.$nsCloudEncryptionService = $nsCloudEncryptionService;
this.$nsCloudPlatformService = $nsCloudPlatformService;
this.$platformService = $platformService;
this.$projectHelper = $projectHelper;
this.$projectDataService = $projectDataService;
this.$qr = $qr;
this.$nsCloudPlatformsData = $nsCloudPlatformsData;
this.$staticConfig = $staticConfig;
this.$platformsData = $platformsData;
this.$filesHashService = $filesHashService;

@@ -108,2 +110,8 @@ }

}
else {
additionalCliFlags.push("--no-hmr");
}
if (!projectSettings.bundle && !projectSettings.useHotModuleReload) {
additionalCliFlags.push("--no-bundle");
}
if (projectSettings.env) {

@@ -164,8 +172,8 @@ const envOptions = _.map(projectSettings.env, (value, key) => `--env.${key}=${value}`);

};
const platformData = this.$nsCloudPlatformsData.getPlatformData(platform, this.$projectDataService.getProjectData(projectSettings.projectDir));
if (this.$filesHashService.saveHashesForProject && !projectSettings.useHotModuleReload) {
const platformData = this.$platformsData.getPlatformData(platform, this.$projectDataService.getProjectData(projectSettings.projectDir));
yield this.$filesHashService.saveHashesForProject(platformData, path.dirname(localBuildResult));
}
const buildInfoFileDirname = path.dirname(result.outputFilePath);
this.$nsCloudPlatformService.saveBuildInfoFile(projectSettings.projectDir, buildInfoFileDirname, platformData);
this.$platformService.saveBuildInfoFile(platform, projectSettings.projectDir, buildInfoFileDirname);
return result;

@@ -191,2 +199,7 @@ });

const projectData = this.$projectDataService.getProjectData(projectSettings.projectDir);
const appFilesUpdaterOptions = {
bundle: projectSettings.bundle,
useHotModuleReload: projectSettings.useHotModuleReload,
release: buildConfiguration && buildConfiguration.toLowerCase() === constants.CLOUD_BUILD_CONFIGURATIONS.RELEASE.toLowerCase()
};
let mobileProvisionData;

@@ -199,3 +212,12 @@ let provision;

}
const config = {
provision,
mobileProvisionData,
sdk: null,
frameworkPath: null,
ignoreScripts: false,
teamId: undefined
};
this.emitStepChanged(cloudOperationId, constants.BUILD_STEP_NAME.PREPARE, constants.BUILD_STEP_PROGRESS.START);
const cliVersion = this.$staticConfig.version;
const userAppGradleFilePath = path.join(projectData.appResourcesDirectoryPath, this.$devicePlatformsConstants.Android, "app.gradle");

@@ -209,3 +231,19 @@ if (this.$fs.exists(userAppGradleFilePath)) {

}
yield this.$nsCloudPlatformService.preparePlatform(projectSettings, platform, buildConfiguration, projectData, provision, mobileProvisionData);
const shouldUseOldPrepare = semver.valid(cliVersion) && semver.lt(cliVersion, semver.prerelease(cliVersion) ? "3.4.0-2017-11-02-10045" : "3.4.0");
if (shouldUseOldPrepare) {
this.$logger.trace(`Using old prepare as CLI version is ${cliVersion}.`);
yield this.$platformService.preparePlatform(platform, appFilesUpdaterOptions, null, projectData, config, [], { skipNativePrepare: true });
}
else {
yield this.$platformService.preparePlatform({
platform,
appFilesUpdaterOptions,
projectData,
config,
filesToSync: [],
nativePrepare: { skipNativePrepare: true },
platformTemplate: null,
env: projectSettings.env
});
}
this.emitStepChanged(cloudOperationId, constants.BUILD_STEP_NAME.PREPARE, constants.BUILD_STEP_PROGRESS.END);

@@ -212,0 +250,0 @@ });

{
"name": "nativescript-cloud",
"version": "1.17.6-2019-06-13-01",
"version": "1.17.6",
"description": "Used for cloud support in NativeScript CLI",

@@ -5,0 +5,0 @@ "main": "lib/bootstrap.js",

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