Skip to content

Commit 8c9f3cf

Browse files
Merge pull request #2919 from NativeScript/vladimirov/fix-email-check
Fix asking for user's emails on postinstall and starting of emualtor on tns debug
2 parents a8763db + ca2e5de commit 8c9f3cf

15 files changed

+503
-87
lines changed

.travis.yml

+2
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ node_js:
88
- '6'
99
git:
1010
submodules: true
11+
install:
12+
- npm install --ignore-scripts
1113
before_script:
1214
- gem install xcodeproj
1315
- gem install cocoapods

CHANGELOG.md

+25-16
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
NativeScript CLI Changelog
22
================
3+
3.1.1 (2017, June 28)
4+
==
5+
6+
### Fixed
7+
* [Fixed #2879](https://github.com/NativeScript/nativescript-cli/issues/2879): Livesync does not apply changes in CSS files on physical iOS devices
8+
* [Fixed #2892](https://github.com/NativeScript/nativescript-cli/issues/2892): Not copying the CFBundleURLTypes from the plist file to the project
9+
* [Fixed #2916](https://github.com/NativeScript/nativescript-cli/issues/2916): If no device or emulator is attached `tns debug android` kills the commandline process and doesn't start an emulator
10+
* [Fixed #2923](https://github.com/NativeScript/nativescript-cli/issues/2923): Fix asking for user email on postinstall
11+
312

413
3.1.0 (2017, June 22)
514
==
@@ -66,7 +75,7 @@ NativeScript CLI Changelog
6675
* [Fixed #2661](https://github.com/NativeScript/nativescript-cli/issues/2661): Adding new files during livesync doesn't succeed on iOS Devices
6776
* [Fixed #2650](https://github.com/NativeScript/nativescript-cli/issues/2650): Release Build Android error: gradlew.bat failed with exit code 1 When Path contains Space
6877
* [Fixed #2125](https://github.com/NativeScript/nativescript-cli/issues/2125): NativeScript setup script fails on Mac
69-
* [Fixed #2697](https://github.com/NativeScript/nativescript-cli/issues/2697): App_Resources being copied into app RAW
78+
* [Fixed #2697](https://github.com/NativeScript/nativescript-cli/issues/2697): App_Resources being copied into app RAW
7079

7180
3.0.0-RC.1 (2017, March 29)
7281
==
@@ -76,19 +85,19 @@ NativeScript CLI Changelog
7685
* [Implemented #2170](https://github.com/NativeScript/nativescript-cli/issues/2170): CLI should report adb install errors
7786
* [Implemented #2204](https://github.com/NativeScript/nativescript-cli/issues/2204): Remove fibers from CLI and use async/await
7887
* [Implemented #2349](https://github.com/NativeScript/nativescript-cli/issues/2349): Command "emulate" and options "--emulator/--device/--avd" are a bit confusing to use
79-
* [Implemented #2513](https://github.com/NativeScript/nativescript-cli/issues/2513): Allow templates to omit App_Resources
88+
* [Implemented #2513](https://github.com/NativeScript/nativescript-cli/issues/2513): Allow templates to omit App_Resources
8089
* [Implemented #2633](https://github.com/NativeScript/nativescript-cli/issues/2633): Deprecate `tns livesync` command
8190

8291
### Fixed
8392

84-
* [Fixed #2225](https://github.com/NativeScript/nativescript-cli/issues/2225): The tns debug ios command hangs on launch screen
93+
* [Fixed #2225](https://github.com/NativeScript/nativescript-cli/issues/2225): The tns debug ios command hangs on launch screen
8594
* [Fixed #2357](https://github.com/NativeScript/nativescript-cli/issues/2357): --copy-to option is broken
8695
* [Fixed #2446](https://github.com/NativeScript/nativescript-cli/issues/2446): tns emulate --device NonexistentName retunrs different messages for ios and android
8796
* [Fixed #2486](https://github.com/NativeScript/nativescript-cli/issues/2486): tns run android (without started emulator/connected device) fails to start app
8897
* [Fixed #2487](https://github.com/NativeScript/nativescript-cli/issues/2487): Exception: The plugin [email protected] is already installed
8998
* [Fixed #2496](https://github.com/NativeScript/nativescript-cli/issues/2496): `tns platform clean android` does not maintain the same version of the runtimes
9099
* [Fixed #2511](https://github.com/NativeScript/nativescript-cli/issues/2511): Second run of `tns run android --release` does not respect changes in application code
91-
* [Fixed #2557](https://github.com/NativeScript/nativescript-cli/issues/2557): 2.5.1 iOS incremental build generates inconsistent binary
100+
* [Fixed #2557](https://github.com/NativeScript/nativescript-cli/issues/2557): 2.5.1 iOS incremental build generates inconsistent binary
92101
* [Fixed #2559](https://github.com/NativeScript/nativescript-cli/issues/2559): `tns init` fails, `ins init --force` produce invalid app
93102
* [Fixed #2560](https://github.com/NativeScript/nativescript-cli/issues/2560): `tns run` should do full prepare/rebuild if something in App_Resources is changes
94103
* [Fixed #2561](https://github.com/NativeScript/nativescript-cli/issues/2561): Fix prepare process terminates if passing too many arguments to a new node process
@@ -116,8 +125,8 @@ NativeScript CLI Changelog
116125
### Fixed
117126

118127
* [Fixed #2476](https://github.com/NativeScript/nativescript-cli/issues/2476): `tns run ios` unable to sync files on iOS Simulator
119-
* [Fixed #2491](https://github.com/NativeScript/nativescript-cli/issues/2491): "ERROR Error: Could not find module" after 2.5 upgrade
120-
* [Fixed #2472](https://github.com/NativeScript/nativescript-cli/issues/2472): Livesync watches .DS_Store files
128+
* [Fixed #2491](https://github.com/NativeScript/nativescript-cli/issues/2491): "ERROR Error: Could not find module" after 2.5 upgrade
129+
* [Fixed #2472](https://github.com/NativeScript/nativescript-cli/issues/2472): Livesync watches .DS_Store files
121130
* [Fixed #2469](https://github.com/NativeScript/nativescript-cli/issues/2469): `tns run` can get stuck in a loop since 2.5
122131
* [Fixed #2512](https://github.com/NativeScript/nativescript-cli/issues/2512): Run should not watch hidden files
123132
* [Fixed #2521](https://github.com/NativeScript/nativescript-cli/issues/2521): Enable requesting user input during plugin installation
@@ -130,15 +139,15 @@ NativeScript CLI Changelog
130139
* [Implemented #2276](https://github.com/NativeScript/nativescript-cli/issues/2276): Support plugin development when using the watch option
131140
* [Implemented #2260]( https://github.com/NativeScript/nativescript-cli/issues/2260): Deprecate support for Node.js 4.x feature
132141
* [Implemented #2112]( https://github.com/NativeScript/nativescript-cli/issues/2112): Update webpack plugin to run as a npm script feature
133-
* [Implemented #1906]( https://github.com/NativeScript/nativescript-cli/issues/1906): TNS Doctor Android tools detection feature
142+
* [Implemented #1906]( https://github.com/NativeScript/nativescript-cli/issues/1906): TNS Doctor Android tools detection feature
134143
* [Implemented #1845](https://github.com/NativeScript/nativescript-cli/issues/1845): Remove NPM as a dependency, use the NPM installed on users' machine feature
135144

136145
### Fixed
137146

138147
**Install and setup issues**
139148

140149
* [Fixed #2302](https://github.com/NativeScript/nativescript-cli/issues/2302): App runs in Xcode and CLI but not on test flight
141-
* [Fixed #1922](https://github.com/NativeScript/nativescript-cli/issues/1922): TNS doctor does not detect if JDK is not installed and throws an error
150+
* [Fixed #1922](https://github.com/NativeScript/nativescript-cli/issues/1922): TNS doctor does not detect if JDK is not installed and throws an error
142151
* [Fixed #2312](https://github.com/NativeScript/nativescript-cli/issues/2312): Creating app w/ nativescript@next is not deploying App_Resources folder
143152
* [Fixed #2308](https://github.com/NativeScript/nativescript-cli/issues/2308): Using nativescript@next brings multiple libraries into node_modules
144153
* [Fixed #2301](https://github.com/NativeScript/nativescript-cli/issues/2301): Rework logic of handling 2 package.json files after tns create
@@ -149,8 +158,8 @@ NativeScript CLI Changelog
149158

150159
* [Fixed #2213](https://github.com/NativeScript/nativescript-cli/issues/2213): When switching build configurations plugin platform files are copied into assets
151160
* [Fixed #2177](https://github.com/NativeScript/nativescript-cli/issues/2177): Prepare does not flatten scoped dependencies
152-
* [Fixed #2150](https://github.com/NativeScript/nativescript-cli/issues/2150): TNS run command broken with using --watch
153-
* [Fixed #1740](https://github.com/NativeScript/nativescript-cli/issues/1740): Dev Dependencies (like Gulp, etc) getting built and build is failing because of which Gulp * [Fixed #](): integration is not working currently.
161+
* [Fixed #2150](https://github.com/NativeScript/nativescript-cli/issues/2150): TNS run command broken with using --watch
162+
* [Fixed #1740](https://github.com/NativeScript/nativescript-cli/issues/1740): Dev Dependencies (like Gulp, etc) getting built and build is failing because of which Gulp * [Fixed #](): integration is not working currently.
154163
* [Fixed #2270](https://github.com/NativeScript/nativescript-cli/issues/2270): App is not rebuilt after removing plugin with native dependencies bug
155164
* [Fixed #2253](https://github.com/NativeScript/nativescript-cli/issues/2253): Prepare command with bundle option doesn't copy files
156165

@@ -163,7 +172,7 @@ NativeScript CLI Changelog
163172

164173
**Emulate/ Device issues**
165174

166-
* [Fixed #1522](https://github.com/NativeScript/nativescript-cli/issues/1522): Cannot specify emulator device while debugging
175+
* [Fixed #1522](https://github.com/NativeScript/nativescript-cli/issues/1522): Cannot specify emulator device while debugging
167176
* [Fixed #2345](https://github.com/NativeScript/nativescript-cli/issues/2345): Option --device {DeviceName} not working for emulate/run/debug/deploy bug
168177
* [Fixed #2344](https://github.com/NativeScript/nativescript-cli/issues/2344): Emulate command not working for iOS
169178

@@ -186,18 +195,18 @@ NativeScript CLI Changelog
186195
* [Fixed #2228](https://github.com/NativeScript/nativescript-cli/issues/2228): Homebrew as root is no longer supported
187196
* [Fixed #2227]( https://github.com/NativeScript/nativescript-cli/issues/2227): Remove use of lib/iOS folder for native plugins
188197
* [Fixed #282]( https://github.com/NativeScript/nativescript-cli/issues/282): "tns platform add android --path TNSApp --symlink" does not work on Windows
189-
* [Fixed #1802](https://github.com/NativeScript/nativescript-cli/issues/1802): semver copied to platforms/android even though it's a dev dependency
198+
* [Fixed #1802](https://github.com/NativeScript/nativescript-cli/issues/1802): semver copied to platforms/android even though it's a dev dependency
190199

191200
2.4.2 (2016, December 8)
192201
==
193202
### Fixed
194-
* [Fixed #2332](https://github.com/NativeScript/nativescript-cli/pull/2332): Fixed email registration process
203+
* [Fixed #2332](https://github.com/NativeScript/nativescript-cli/pull/2332): Fixed email registration process
195204

196205
2.4.1 (2016, December 4)
197206
==
198207
### Fixed
199-
* [Fixed #2200](https://github.com/NativeScript/nativescript-cli/pull/2200): TypeScript files don't show in {N} debugger.
200-
* [Fixed #2273](https://github.com/NativeScript/nativescript-cli/pull/2273): Livesync should continue to work after app crash
208+
* [Fixed #2200](https://github.com/NativeScript/nativescript-cli/pull/2200): TypeScript files don't show in {N} debugger.
209+
* [Fixed #2273](https://github.com/NativeScript/nativescript-cli/pull/2273): Livesync should continue to work after app crash
201210

202211
2.4.0 (2016, November 16)
203212
==
@@ -260,7 +269,7 @@ NativeScript CLI Changelog
260269

261270
### New
262271
* [Implemented #1959](https://github.com/NativeScript/nativescript-cli/issues/1959): XCode8/iOS10 support
263-
* [Implemented #1948](https://github.com/NativeScript/nativescript-cli/issues/1948): npm WARN deprecated [email protected]: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
272+
* [Implemented #1948](https://github.com/NativeScript/nativescript-cli/issues/1948): npm WARN deprecated [email protected]: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
264273
* [Implemented #1944](https://github.com/NativeScript/nativescript-cli/issues/1944): Enhancement: tns plugin INSTALL alias
265274
* [Implemented #1565](https://github.com/NativeScript/nativescript-cli/issues/1565): Livesync debugging support
266275
* [Implemented #526](https://github.com/NativeScript/nativescript-cli/issues/526): Update plugin command

lib/bootstrap.ts

+1
Original file line numberDiff line numberDiff line change
@@ -139,3 +139,4 @@ $injector.requireCommand("extension|uninstall", "./commands/extensibility/uninst
139139
$injector.requirePublic("extensibilityService", "./services/extensibility-service");
140140

141141
$injector.require("nodeModulesDependenciesBuilder", "./tools/node-modules/node-modules-dependencies-builder");
142+
$injector.require("subscriptionService", "./services/subscription-service");

lib/commands/debug.ts

+1-5
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,6 @@
2929

3030
this.$config.debugLivesync = true;
3131

32-
await this.$devicesService.initialize({
33-
34-
});
3532
await this.$devicesService.detectCurrentlyAttachedDevices();
3633

3734
const devices = this.$devicesService.getDeviceInstances();
@@ -86,8 +83,7 @@
8683
platform: this.platform,
8784
deviceId: this.$options.device,
8885
emulator: this.$options.emulator,
89-
skipDeviceDetectionInterval: true,
90-
skipInferPlatform: true
86+
skipDeviceDetectionInterval: true
9187
});
9288
// Start emulator if --emulator is selected or no devices found.
9389
if (this.$options.emulator || this.$devicesService.deviceCount === 0) {

lib/commands/post-install.ts

+2-60
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,8 @@
11
import { PostInstallCommand } from "../common/commands/post-install";
2-
import * as emailValidator from "email-validator";
3-
import * as queryString from "querystring";
4-
import * as helpers from "../common/helpers";
52

63
export class PostInstallCliCommand extends PostInstallCommand {
7-
private logger: ILogger;
8-
94
constructor($fs: IFileSystem,
10-
private $httpClient: Server.IHttpClient,
11-
private $prompter: IPrompter,
12-
private $userSettingsService: IUserSettingsService,
5+
private $subscriptionService: ISubscriptionService,
136
$staticConfig: Config.IStaticConfig,
147
$commandsService: ICommandsService,
158
$htmlHelpService: IHtmlHelpService,
@@ -18,63 +11,12 @@ export class PostInstallCliCommand extends PostInstallCommand {
1811
$analyticsService: IAnalyticsService,
1912
$logger: ILogger) {
2013
super($fs, $staticConfig, $commandsService, $htmlHelpService, $options, $doctorService, $analyticsService, $logger);
21-
this.logger = $logger;
2214
}
2315

2416
public async execute(args: string[]): Promise<void> {
2517
await super.execute(args);
2618

27-
if (await this.shouldAskForEmail()) {
28-
this.logger.out("Leave your e-mail address here to subscribe for NativeScript newsletter and product updates, tips and tricks:");
29-
let email = await this.getEmail("(press Enter for blank)");
30-
await this.$userSettingsService.saveSetting("EMAIL_REGISTERED", true);
31-
await this.sendEmail(email);
32-
}
33-
}
34-
35-
private async shouldAskForEmail(): Promise<boolean> {
36-
return helpers.isInteractive() && await process.env.CLI_NOPROMPT !== "1" && !this.$userSettingsService.getSettingValue("EMAIL_REGISTERED");
37-
}
38-
39-
private async getEmail(prompt: string, options?: IPrompterOptions): Promise<string> {
40-
let schema: IPromptSchema = {
41-
message: prompt,
42-
type: "input",
43-
name: "inputEmail",
44-
validate: (value: any) => {
45-
if (value === "" || emailValidator.validate(value)) {
46-
return true;
47-
}
48-
return "Please provide a valid e-mail or simply leave it blank.";
49-
},
50-
default: options && options.defaultAction
51-
};
52-
53-
let result = await this.$prompter.get([schema]);
54-
return result.inputEmail;
55-
}
56-
57-
private async sendEmail(email: string): Promise<void> {
58-
if (email) {
59-
let postData = queryString.stringify({
60-
'elqFormName': "dev_uins_cli",
61-
'elqSiteID': '1325',
62-
'emailAddress': email,
63-
'elqCookieWrite': '0'
64-
});
65-
66-
let options = {
67-
url: 'https://s1325.t.eloqua.com/e/f2',
68-
method: 'POST',
69-
headers: {
70-
'Content-Type': 'application/x-www-form-urlencoded',
71-
'Content-Length': postData.length
72-
},
73-
body: postData
74-
};
75-
76-
await this.$httpClient.httpRequest(options);
77-
}
19+
await this.$subscriptionService.subscribeForNewsletter();
7820
}
7921
}
8022

lib/constants.ts

+1
Original file line numberDiff line numberDiff line change
@@ -86,3 +86,4 @@ export const BUILD_OUTPUT_EVENT_NAME = "buildOutput";
8686
export const CONNECTION_ERROR_EVENT_NAME = "connectionError";
8787
export const VERSION_STRING = "version";
8888
export const INSPECTOR_CACHE_DIRNAME = "ios-inspector";
89+
export const POST_INSTALL_COMMAND_NAME = "post-install-cli";
+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
/**
2+
* Describes methods for subscribing to different NativeScript campaigns.
3+
*/
4+
interface ISubscriptionService {
5+
/**
6+
* Subscribes users for NativeScript's newsletter by asking them for their email.
7+
* In case we've already asked the user for his email, this method will do nothing.
8+
* @returns {Promise<void>}
9+
*/
10+
subscribeForNewsletter(): Promise<void>;
11+
}

lib/services/ios-project-service.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -338,7 +338,7 @@ export class IOSProjectService extends projectServiceBaseLib.PlatformProjectServ
338338
if (!buildConfig.release && !buildConfig.architectures) {
339339
await this.$devicesService.initialize({
340340
platform: this.$devicePlatformsConstants.iOS.toLowerCase(), deviceId: buildConfig.device,
341-
isBuildForDevice: true
341+
skipEmulatorStart: true
342342
});
343343
let instances = this.$devicesService.getDeviceInstances();
344344
let devicesArchitectures = _(instances)

lib/services/subscription-service.ts

+73
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
import * as emailValidator from "email-validator";
2+
import * as queryString from "querystring";
3+
import * as helpers from "../common/helpers";
4+
5+
export class SubscriptionService implements ISubscriptionService {
6+
constructor(private $httpClient: Server.IHttpClient,
7+
private $prompter: IPrompter,
8+
private $userSettingsService: IUserSettingsService,
9+
private $logger: ILogger) {
10+
}
11+
12+
public async subscribeForNewsletter(): Promise<void> {
13+
if (await this.shouldAskForEmail()) {
14+
this.$logger.out("Leave your e-mail address here to subscribe for NativeScript newsletter and product updates, tips and tricks:");
15+
let email = await this.getEmail("(press Enter for blank)");
16+
await this.$userSettingsService.saveSetting("EMAIL_REGISTERED", true);
17+
await this.sendEmail(email);
18+
}
19+
}
20+
21+
/**
22+
* Checks whether we should ask the current user if they want to subscribe to NativeScript newsletter.
23+
* NOTE: This method is protected, not private, only because of our unit tests.
24+
* @returns {Promise<boolean>}
25+
*/
26+
protected async shouldAskForEmail(): Promise<boolean> {
27+
return helpers.isInteractive() && process.env.CLI_NOPROMPT !== "1" && !(await this.$userSettingsService.getSettingValue("EMAIL_REGISTERED"));
28+
}
29+
30+
private async getEmail(prompt: string, options?: IPrompterOptions): Promise<string> {
31+
let schema: IPromptSchema = {
32+
message: prompt,
33+
type: "input",
34+
name: "inputEmail",
35+
validate: (value: any) => {
36+
if (value === "" || emailValidator.validate(value)) {
37+
return true;
38+
}
39+
40+
return "Please provide a valid e-mail or simply leave it blank.";
41+
}
42+
};
43+
44+
let result = await this.$prompter.get([schema]);
45+
return result.inputEmail;
46+
}
47+
48+
private async sendEmail(email: string): Promise<void> {
49+
if (email) {
50+
let postData = queryString.stringify({
51+
'elqFormName': "dev_uins_cli",
52+
'elqSiteID': '1325',
53+
'emailAddress': email,
54+
'elqCookieWrite': '0'
55+
});
56+
57+
let options = {
58+
url: 'https://s1325.t.eloqua.com/e/f2',
59+
method: 'POST',
60+
headers: {
61+
'Content-Type': 'application/x-www-form-urlencoded',
62+
'Content-Length': postData.length
63+
},
64+
body: postData
65+
};
66+
67+
await this.$httpClient.httpRequest(options);
68+
}
69+
}
70+
71+
}
72+
73+
$injector.register("subscriptionService", SubscriptionService);

package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "nativescript",
33
"preferGlobal": true,
4-
"version": "3.1.0",
4+
"version": "3.1.1",
55
"author": "Telerik <[email protected]>",
66
"description": "Command-line interface for building NativeScript projects",
77
"bin": {
@@ -42,7 +42,7 @@
4242
"glob": "^7.0.3",
4343
"iconv-lite": "0.4.11",
4444
"inquirer": "0.9.0",
45-
"ios-device-lib": "0.4.6",
45+
"ios-device-lib": "0.4.7",
4646
"ios-mobileprovision-finder": "1.0.9",
4747
"ios-sim-portable": "~3.0.0",
4848
"lockfile": "1.0.1",

postinstall.js

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
"use strict";
22

33
var child_process = require("child_process");
4-
var commandArgs = ["bin/tns", "post-install-cli"];
54
var path = require("path");
5+
var constants = require(path.join(__dirname, "lib", "constants"));
6+
var commandArgs = [path.join(__dirname, "bin", "tns"), constants.POST_INSTALL_COMMAND_NAME];
67
var nodeArgs = require(path.join(__dirname, "lib", "common", "scripts", "node-args")).getNodeArgs();
78

8-
child_process.spawn(process.argv[0], nodeArgs.concat(commandArgs), {stdio: "inherit"});
9+
child_process.spawn(process.argv[0], nodeArgs.concat(commandArgs), { stdio: "inherit" });

0 commit comments

Comments
 (0)