nativescript 8.3.1 → 8.3.2-next-08-22-2022-2903948368

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
  });
@@ -115,7 +115,7 @@ class DeviceLogProvider extends device_log_provider_base_1.DeviceLogProviderBase
115
115
  printLine(prefix, ...parts) {
116
116
  const maxWidth = process.stdout.columns - 2;
117
117
  const fullLine = parts.join(" ");
118
- if (fullLine.length < maxWidth) {
118
+ if (!maxWidth || maxWidth < 10 || fullLine.length < maxWidth) {
119
119
  console.log(prefix, fullLine);
120
120
  }
121
121
  else {
@@ -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.1",
4
+ "version": "8.3.2-next-08-22-2022-2903948368",
5
5
  "author": "NativeScript <support@nativescript.org>",
6
6
  "description": "Command-line interface for building NativeScript projects",
7
7
  "bin": {