nativescript 8.3.2 → 8.3.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -73,7 +73,7 @@ class PreviewCommand {
73
73
  const previewCLIBinPath = path.resolve(previewCLIPath, "./dist/index.js");
74
74
  const commandIndex = process.argv.indexOf("preview");
75
75
  const commandArgs = process.argv.slice(commandIndex + 1);
76
- this.$childProcess.spawn(previewCLIBinPath, commandArgs, {
76
+ this.$childProcess.spawn(process.execPath, [previewCLIBinPath, ...commandArgs], {
77
77
  stdio: "inherit",
78
78
  });
79
79
  });
@@ -113,17 +113,8 @@ class DeviceLogProvider extends device_log_provider_base_1.DeviceLogProviderBase
113
113
  }
114
114
  }
115
115
  printLine(prefix, ...parts) {
116
- const maxWidth = process.stdout.columns - 2;
117
116
  const fullLine = parts.join(" ");
118
- if (!maxWidth || maxWidth < 10 || fullLine.length < maxWidth) {
119
- console.log(prefix, fullLine);
120
- }
121
- else {
122
- for (let i = 0; i < fullLine.length; i += maxWidth) {
123
- const part = fullLine.substring(i, i + maxWidth);
124
- console.log(prefix, part);
125
- }
126
- }
117
+ console.log(prefix, fullLine);
127
118
  }
128
119
  }
129
120
  exports.DeviceLogProvider = DeviceLogProvider;
@@ -25,7 +25,7 @@ const constants_1 = require("../constants");
25
25
  const yok_1 = require("../common/yok");
26
26
  const _ = require("lodash");
27
27
  class PrepareController extends events_1.EventEmitter {
28
- constructor($platformController, $hooksService, $fs, $logger, $mobileHelper, $nodeModulesDependenciesBuilder, $platformsDataService, $pluginsService, $prepareNativePlatformService, $projectChangesService, $projectDataService, $webpackCompilerService, $watchIgnoreListService, $analyticsService, $markingModeService, $projectConfigService) {
28
+ constructor($platformController, $hooksService, $fs, $logger, $mobileHelper, $nodeModulesDependenciesBuilder, $platformsDataService, $pluginsService, $prepareNativePlatformService, $projectChangesService, $projectDataService, $webpackCompilerService, $watchIgnoreListService, $analyticsService, $markingModeService, $projectConfigService, $projectService) {
29
29
  super();
30
30
  this.$platformController = $platformController;
31
31
  this.$hooksService = $hooksService;
@@ -43,6 +43,7 @@ class PrepareController extends events_1.EventEmitter {
43
43
  this.$analyticsService = $analyticsService;
44
44
  this.$markingModeService = $markingModeService;
45
45
  this.$projectConfigService = $projectConfigService;
46
+ this.$projectService = $projectService;
46
47
  this.watchersData = {};
47
48
  this.isInitialPrepareReady = false;
48
49
  this.persistedData = [];
@@ -82,6 +83,7 @@ class PrepareController extends events_1.EventEmitter {
82
83
  }
83
84
  prepareCore(prepareData, projectData) {
84
85
  return __awaiter(this, void 0, void 0, function* () {
86
+ yield this.$projectService.ensureAppResourcesExist(projectData.projectDir);
85
87
  yield this.$platformController.addPlatformIfNeeded(prepareData, projectData);
86
88
  yield this.trackRuntimeVersion(prepareData.platform, projectData);
87
89
  this.$logger.info("Preparing project...");
@@ -88,6 +88,13 @@ interface IProjectService {
88
88
  * @returns {boolean} returns true if the project is valid NativeScript project.
89
89
  */
90
90
  isValidNativeScriptProject(pathToProject?: string): boolean;
91
+
92
+ /**
93
+ * Checks if App_Resources exists, or pulls down a fresh set
94
+ * from the default template otherwise.
95
+ * @param {string} projectDir
96
+ */
97
+ ensureAppResourcesExist(projectDir: string): Promise<void>;
91
98
  }
92
99
 
93
100
  interface INsConfigPlaform {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "nativescript",
3
3
  "preferGlobal": true,
4
- "version": "8.3.2",
4
+ "version": "8.3.3",
5
5
  "author": "NativeScript <support@nativescript.org>",
6
6
  "description": "Command-line interface for building NativeScript projects",
7
7
  "bin": {