nativescript 9.1.0-alpha.0 → 9.1.0-alpha.1

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.
Files changed (33) hide show
  1. package/README.md +49 -0
  2. package/config/test-deps-versions-generated.json +3 -3
  3. package/lib/.d.ts +1 -0
  4. package/lib/bootstrap.js +0 -2
  5. package/lib/commands/build.js +1 -30
  6. package/lib/commands/run.js +1 -39
  7. package/lib/commands/widget.js +1 -2
  8. package/lib/common/definitions/mobile.d.ts +0 -3
  9. package/lib/common/file-system.js +11 -15
  10. package/lib/common/mobile/device-platforms-constants.js +0 -4
  11. package/lib/common/mobile/mobile-helper.js +1 -12
  12. package/lib/constants.js +7 -2
  13. package/lib/controllers/prepare-controller.js +0 -28
  14. package/lib/definitions/nativescript-dev-xcode.d.ts +25 -1
  15. package/lib/definitions/project.d.ts +35 -6
  16. package/lib/key-commands/bootstrap.js +0 -1
  17. package/lib/key-commands/index.js +1 -53
  18. package/lib/project-data.js +0 -6
  19. package/lib/services/bundler/bundler-compiler-service.js +24 -13
  20. package/lib/services/debug-service-base.js +1 -1
  21. package/lib/services/ios/ios-signing-service.js +10 -3
  22. package/lib/services/ios/spm-service.js +1 -8
  23. package/lib/services/ios/xcodebuild-args-service.js +10 -29
  24. package/lib/services/ios-entitlements-service.js +3 -1
  25. package/lib/services/ios-project-service.js +27 -74
  26. package/lib/services/ios-watch-app-service.js +663 -16
  27. package/lib/services/platforms-data-service.js +0 -1
  28. package/lib/services/plugins-service.js +4 -24
  29. package/lib/services/project-changes-service.js +4 -15
  30. package/lib/services/project-data-service.js +2 -20
  31. package/lib/services/versions-service.js +0 -4
  32. package/lib/tools/config-manipulation/config-transformer.js +55 -3
  33. package/package.json +23 -12
package/README.md CHANGED
@@ -44,6 +44,12 @@ Get it using: `npm install -g nativescript`
44
44
  - [Extending the CLI](#extending-the-cli)
45
45
  - [Troubleshooting](#troubleshooting)
46
46
  - [How to Contribute](#how-to-contribute)
47
+ - [Scorecard Maintenance](#scorecard-maintenance)
48
+ - [1) Branch-Protection check (`?`) in Scorecard workflow](#1-branch-protection-check--in-scorecard-workflow)
49
+ - [2) Required branch/ruleset settings for higher Branch-Protection and Code-Review](#2-required-branchruleset-settings-for-higher-branch-protection-and-code-review)
50
+ - [3) Keep Token-Permissions high](#3-keep-token-permissions-high)
51
+ - [4) Signed-Releases check](#4-signed-releases-check)
52
+ - [5) Vulnerabilities check](#5-vulnerabilities-check)
47
53
  - [How to Build](#how-to-build)
48
54
  - [Get Help](#get-help)
49
55
  - [License](#license)
@@ -344,6 +350,49 @@ To learn how to contribute to the code base, click [here](https://github.com/Nat
344
350
 
345
351
  [Back to Top][1]
346
352
 
353
+ Scorecard Maintenance
354
+ ===
355
+
356
+ This repository tracks OpenSSF Scorecard. Use this checklist when score drops or checks become inconclusive.
357
+
358
+ ### 1) Branch-Protection check (`?`) in Scorecard workflow
359
+
360
+ - Ensure `.github/workflows/scorecard.yml` uses `repo_token: ${{ secrets.SCORECARD_TOKEN }}`.
361
+ - Set `SCORECARD_TOKEN` as a repository Actions secret.
362
+ - If using a fine-grained PAT, set expiration to **366 days or less** (NativeScript org policy).
363
+ - If Branch-Protection still reports token incompatibility, use a PAT type compatible with Scorecard's Branch-Protection query path.
364
+
365
+ ### 2) Required branch/ruleset settings for higher Branch-Protection and Code-Review
366
+
367
+ Apply to `main` and release branches:
368
+
369
+ - Prevent force push and prevent branch deletion.
370
+ - Require pull request before merge.
371
+ - Require status checks to pass before merge.
372
+ - Require at least 2 approvals.
373
+ - Require code owner review.
374
+ - Dismiss stale approvals when new commits are pushed.
375
+ - Include administrators.
376
+
377
+ ### 3) Keep Token-Permissions high
378
+
379
+ - Set top-level workflow permissions to read-only (for example `permissions: read-all`).
380
+ - Grant write permissions only at job level and only when needed (for example publish/release jobs).
381
+ - Keep GitHub Actions pinned to full commit SHAs.
382
+
383
+ ### 4) Signed-Releases check
384
+
385
+ - Publish release assets with provenance/signature files.
386
+ - Keep release workflow attaching `*.intoto.jsonl` artifacts alongside release bundles.
387
+
388
+ ### 5) Vulnerabilities check
389
+
390
+ - Keep runtime dependency vulnerabilities near zero.
391
+ - Run `npm audit --omit=dev` before release PRs.
392
+ - Update vulnerable dependencies quickly; for non-applicable findings, document and track mitigation clearly.
393
+
394
+ [Back to Top][1]
395
+
347
396
  How to Build
348
397
  ===
349
398
  ```
@@ -3,7 +3,7 @@
3
3
  "karma": "6.4.4",
4
4
  "karma-coverage": "2.2.1",
5
5
  "karma-nativescript-launcher": "1.0.0",
6
- "mocha": "11.7.5",
6
+ "mocha": "11.7.6",
7
7
  "karma-mocha": "2.0.1",
8
8
  "karma-chai": "0.1.0",
9
9
  "karma-jasmine": "4.0.2",
@@ -11,6 +11,6 @@
11
11
  "@types/karma-chai": "0.1.8",
12
12
  "@types/mocha": "10.0.10",
13
13
  "@types/jasmine": "6.0.0",
14
- "@types/qunit": "2.19.13",
15
- "nyc": "17.1.0"
14
+ "@types/qunit": "2.19.14",
15
+ "nyc": "18.0.0"
16
16
  }
package/lib/.d.ts CHANGED
@@ -497,6 +497,7 @@
497
497
  /// <reference path="../test/sys-info.ts" />
498
498
  /// <reference path="../test/test-bootstrap.ts" />
499
499
  /// <reference path="../test/tns-appstore-upload.ts" />
500
+ /// <reference path="../test/tools/config-manipulation/config-transformer.ts" />
500
501
  /// <reference path="../test/tools/node-modules/node-modules-dependencies-builder.ts" />
501
502
  /// <reference path="../test/update.ts" />
502
503
  /// <reference path="../test/xcconfig-service.ts" />
package/lib/bootstrap.js CHANGED
@@ -81,7 +81,6 @@ yok_1.injector.requireCommand("run|ios", "./commands/run");
81
81
  yok_1.injector.requireCommand("run|android", "./commands/run");
82
82
  yok_1.injector.requireCommand("run|vision", "./commands/run");
83
83
  yok_1.injector.requireCommand("run|visionos", "./commands/run");
84
- yok_1.injector.requireCommand("run|macos", "./commands/run");
85
84
  yok_1.injector.requireCommand("typings", "./commands/typings");
86
85
  yok_1.injector.requireCommand("preview", "./commands/preview");
87
86
  yok_1.injector.requireCommand("debug|ios", "./commands/debug");
@@ -94,7 +93,6 @@ yok_1.injector.requireCommand("build|ios", "./commands/build");
94
93
  yok_1.injector.requireCommand("build|android", "./commands/build");
95
94
  yok_1.injector.requireCommand("build|vision", "./commands/build");
96
95
  yok_1.injector.requireCommand("build|visionos", "./commands/build");
97
- yok_1.injector.requireCommand("build|macos", "./commands/build");
98
96
  yok_1.injector.requireCommand("deploy", "./commands/deploy");
99
97
  yok_1.injector.requireCommand("embed", "./commands/embedding/embed");
100
98
  yok_1.injector.require("testExecutionService", "./services/test-execution-service");
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.BuildMacOSCommand = exports.BuildVisionOsCommand = exports.BuildAndroidCommand = exports.BuildIosCommand = exports.BuildCommandBase = void 0;
3
+ exports.BuildVisionOsCommand = exports.BuildAndroidCommand = exports.BuildIosCommand = exports.BuildCommandBase = void 0;
4
4
  const constants_1 = require("../constants");
5
5
  const command_base_1 = require("./command-base");
6
6
  const helpers_1 = require("../common/helpers");
@@ -143,33 +143,4 @@ class BuildVisionOsCommand extends BuildIosCommand {
143
143
  exports.BuildVisionOsCommand = BuildVisionOsCommand;
144
144
  yok_1.injector.registerCommand("build|vision", BuildVisionOsCommand);
145
145
  yok_1.injector.registerCommand("build|visionos", BuildVisionOsCommand);
146
- class BuildMacOSCommand extends BuildIosCommand {
147
- constructor($options, $errors, $projectData, $platformsDataService, $devicePlatformsConstants, $buildController, $platformValidationService, $logger, $buildDataService, $migrateController) {
148
- super($options, $errors, $projectData, $platformsDataService, $devicePlatformsConstants, $buildController, $platformValidationService, $logger, $buildDataService, $migrateController);
149
- this.$options = $options;
150
- this.$migrateController = $migrateController;
151
- }
152
- async execute(args) {
153
- await this.executeCore([
154
- this.$devicePlatformsConstants.macOS.toLowerCase(),
155
- ]);
156
- }
157
- async canExecute(args) {
158
- const platform = this.$devicePlatformsConstants.macOS;
159
- if (!this.$options.force) {
160
- await this.$migrateController.validate({
161
- projectDir: this.$projectData.projectDir,
162
- platforms: [platform],
163
- });
164
- }
165
- super.validatePlatform(platform);
166
- let canExecute = await super.canExecuteCommandBase(platform);
167
- if (canExecute) {
168
- canExecute = await super.validateArgs(args, platform);
169
- }
170
- return canExecute;
171
- }
172
- }
173
- exports.BuildMacOSCommand = BuildMacOSCommand;
174
- yok_1.injector.registerCommand("build|macos", BuildMacOSCommand);
175
146
  //# sourceMappingURL=build.js.map
@@ -6,7 +6,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
6
6
  return c > 3 && r && Object.defineProperty(target, key, r), r;
7
7
  };
8
8
  Object.defineProperty(exports, "__esModule", { value: true });
9
- exports.RunMacOSCommand = exports.RunVisionOSCommand = exports.RunAndroidCommand = exports.RunIosCommand = exports.RunCommandBase = void 0;
9
+ exports.RunVisionOSCommand = exports.RunAndroidCommand = exports.RunIosCommand = exports.RunCommandBase = void 0;
10
10
  const constants_1 = require("../common/constants");
11
11
  const decorators_1 = require("../common/decorators");
12
12
  const helpers_1 = require("../common/helpers");
@@ -154,42 +154,4 @@ class RunVisionOSCommand extends RunIosCommand {
154
154
  exports.RunVisionOSCommand = RunVisionOSCommand;
155
155
  yok_1.injector.registerCommand("run|vision", RunVisionOSCommand);
156
156
  yok_1.injector.registerCommand("run|visionos", RunVisionOSCommand);
157
- class RunMacOSCommand {
158
- get platform() {
159
- return this.$devicePlatformsConstants.macOS || "macOS";
160
- }
161
- constructor($buildController, $buildDataService, $devicePlatformsConstants, $errors, $migrateController, $opener, $options, $platformValidationService, $projectDataService) {
162
- this.$buildController = $buildController;
163
- this.$buildDataService = $buildDataService;
164
- this.$devicePlatformsConstants = $devicePlatformsConstants;
165
- this.$errors = $errors;
166
- this.$migrateController = $migrateController;
167
- this.$opener = $opener;
168
- this.$options = $options;
169
- this.$platformValidationService = $platformValidationService;
170
- this.$projectDataService = $projectDataService;
171
- this.allowedParameters = [];
172
- }
173
- async execute(args) {
174
- const projectData = this.$projectDataService.getProjectData();
175
- const buildData = this.$buildDataService.getBuildData(projectData.projectDir, this.platform.toLowerCase(), this.$options);
176
- const outputPath = await this.$buildController.prepareAndBuild(buildData);
177
- await this.$opener.open(outputPath, projectData.projectName);
178
- }
179
- async canExecute(args) {
180
- const projectData = this.$projectDataService.getProjectData();
181
- if (!this.$platformValidationService.isPlatformSupportedForOS(this.platform, projectData)) {
182
- this.$errors.fail(`Applications for platform ${this.platform} can not be built on this OS`);
183
- }
184
- if (!this.$options.force) {
185
- await this.$migrateController.validate({
186
- projectDir: projectData.projectDir,
187
- platforms: [this.platform],
188
- });
189
- }
190
- return this.$platformValidationService.validateOptions(this.$options.provision, this.$options.teamId, projectData, this.platform.toLowerCase());
191
- }
192
- }
193
- exports.RunMacOSCommand = RunMacOSCommand;
194
- yok_1.injector.registerCommand("run|macos", RunMacOSCommand);
195
157
  //# sourceMappingURL=run.js.map
@@ -172,8 +172,7 @@ public struct ${(0, utils_1.capitalizeFirstLetter)(name)}Model: ActivityAttribut
172
172
  }
173
173
  }
174
174
  configData.ios.SPMPackages = spmPackages;
175
- await this.$projectConfigService.setValue("", // root
176
- configData);
175
+ await this.$projectConfigService.setValue("ios.SPMPackages", spmPackages);
177
176
  if (fs.existsSync(gitIgnorePath)) {
178
177
  const gitIgnore = fs.readFileSync(gitIgnorePath, {
179
178
  encoding: "utf-8",
@@ -1197,7 +1197,6 @@ declare global {
1197
1197
  isAndroidPlatform(platform: string): boolean;
1198
1198
  isiOSPlatform(platform: string): boolean;
1199
1199
  isvisionOSPlatform(platform: string): boolean;
1200
- ismacOSPlatform?(platform: string): boolean;
1201
1200
  isApplePlatform(platform: string): boolean;
1202
1201
  normalizePlatformName(platform: string): string;
1203
1202
  validatePlatformName(platform: string): string;
@@ -1242,12 +1241,10 @@ declare global {
1242
1241
  iOS: string;
1243
1242
  Android: string;
1244
1243
  visionOS: string;
1245
- macOS?: string;
1246
1244
 
1247
1245
  isiOS(value: string): boolean;
1248
1246
  isAndroid(value: string): boolean;
1249
1247
  isvisionOS(value: string): boolean;
1250
- ismacOS?(value: string): boolean;
1251
1248
  }
1252
1249
 
1253
1250
  interface IDeviceApplication {
@@ -19,7 +19,7 @@ const helpers_1 = require("./helpers");
19
19
  const constants_1 = require("../constants");
20
20
  const os_1 = require("os");
21
21
  const detectNewline = require("detect-newline");
22
- const archiver_1 = require("archiver");
22
+ const yazl = require("yazl");
23
23
  // TODO: Add .d.ts for mkdirp module (or use it from @types repo).
24
24
  const mkdirp = require("mkdirp");
25
25
  let FileSystem = FileSystem_1 = class FileSystem {
@@ -29,26 +29,22 @@ let FileSystem = FileSystem_1 = class FileSystem {
29
29
  async zipFiles(zipFile, files, zipPathCallback) {
30
30
  //we are resolving it here instead of in the constructor, because config has dependency on file system and config shouldn't require logger
31
31
  const $logger = this.$injector.resolve("logger");
32
- const zip = (0, archiver_1.create)("zip", {
33
- zlib: {
34
- level: 9,
35
- },
36
- });
32
+ const zip = new yazl.ZipFile();
37
33
  const outFile = fs.createWriteStream(zipFile);
38
- zip.pipe(outFile);
34
+ for (const file of files) {
35
+ let relativePath = zipPathCallback(file);
36
+ relativePath = relativePath.replace(/\\/g, "/");
37
+ $logger.trace("zipping as '%s' file '%s'", relativePath, file);
38
+ zip.addFile(file, relativePath, { compress: true });
39
+ }
40
+ zip.end();
39
41
  return new Promise((resolve, reject) => {
40
42
  outFile.on("error", (err) => reject(err));
43
+ zip.outputStream.on("error", (err) => reject(err));
44
+ zip.outputStream.pipe(outFile);
41
45
  outFile.on("close", () => {
42
- $logger.trace("zip: %d bytes written", zip.pointer());
43
46
  resolve();
44
47
  });
45
- for (const file of files) {
46
- let relativePath = zipPathCallback(file);
47
- relativePath = relativePath.replace(/\\/g, "/");
48
- $logger.trace("zipping as '%s' file '%s'", relativePath, file);
49
- zip.append(fs.createReadStream(file), { name: relativePath });
50
- }
51
- zip.finalize();
52
48
  });
53
49
  }
54
50
  utimes(path, atime, mtime) {
@@ -7,7 +7,6 @@ class DevicePlatformsConstants {
7
7
  this.iOS = "iOS";
8
8
  this.Android = "Android";
9
9
  this.visionOS = "visionOS";
10
- this.macOS = "macOS";
11
10
  }
12
11
  isiOS(value) {
13
12
  return value.toLowerCase() === this.iOS.toLowerCase();
@@ -18,9 +17,6 @@ class DevicePlatformsConstants {
18
17
  isvisionOS(value) {
19
18
  return value.toLowerCase() === this.visionOS.toLowerCase();
20
19
  }
21
- ismacOS(value) {
22
- return value.toLowerCase() === this.macOS.toLowerCase();
23
- }
24
20
  }
25
21
  exports.DevicePlatformsConstants = DevicePlatformsConstants;
26
22
  yok_1.injector.register("devicePlatformsConstants", DevicePlatformsConstants);
@@ -17,7 +17,6 @@ class MobileHelper {
17
17
  this.$devicePlatformsConstants.iOS,
18
18
  this.$devicePlatformsConstants.Android,
19
19
  this.$devicePlatformsConstants.visionOS,
20
- this.$devicePlatformsConstants.macOS || "macOS",
21
20
  ];
22
21
  }
23
22
  isAndroidPlatform(platform) {
@@ -35,15 +34,8 @@ class MobileHelper {
35
34
  this.$devicePlatformsConstants.visionOS.toLowerCase() ===
36
35
  platform.toLowerCase());
37
36
  }
38
- ismacOSPlatform(platform) {
39
- const macOSPlatformName = this.$devicePlatformsConstants.macOS || "macOS";
40
- return !!(platform &&
41
- macOSPlatformName.toLowerCase() === platform.toLowerCase());
42
- }
43
37
  isApplePlatform(platform) {
44
- return (this.isiOSPlatform(platform) ||
45
- this.isvisionOSPlatform(platform) ||
46
- this.ismacOSPlatform(platform));
38
+ return this.isiOSPlatform(platform) || this.isvisionOSPlatform(platform);
47
39
  }
48
40
  normalizePlatformName(platform) {
49
41
  if (this.isAndroidPlatform(platform)) {
@@ -55,9 +47,6 @@ class MobileHelper {
55
47
  else if (this.isvisionOSPlatform(platform)) {
56
48
  return "visionOS";
57
49
  }
58
- else if (this.ismacOSPlatform(platform)) {
59
- return "macOS";
60
- }
61
50
  return undefined;
62
51
  }
63
52
  validatePlatformName(platform) {
package/lib/constants.js CHANGED
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.INCLUDE_GRADLE_NAME = exports.INFO_PLIST_FILE_NAME = exports.APP_GRADLE_FILE_NAME = exports.MANIFEST_FILE_NAME = exports.ANDROID_ANALYTICS_DATA_FILE = exports.ANDROID_ANALYTICS_DATA_DIR = exports.FONTS_DIR = exports.ASSETS_DIR = exports.MAIN_DIR = exports.SRC_DIR = exports.AWAIT_NOTIFICATION_TIMEOUT_SECONDS = exports.CODE_SIGN_ENTITLEMENTS = exports.LIB_DIR_NAME = exports.KARMA_CONFIG_NAME = exports.TSCCONFIG_TNS_JSON_NAME = exports.RSPACK_CONFIG_NAME = exports.WEBPACK_CONFIG_NAME = exports.HOOKS_DIR_NAME = exports.PLATFORMS_DIR_NAME = exports.XML_FILE_EXTENSION = exports.LIVESYNC_EXCLUDED_FILE_PATTERNS = exports.TEST_RUNNER_NAME = exports.TESTING_FRAMEWORKS = exports.LIVESYNC_EXCLUDED_DIRECTORIES = exports.DEFAULT_APP_IDENTIFIER_PREFIX = exports.NODE_MODULE_CACHE_PATH_KEY_NAME = exports.ANDROID_DEVICE_APP_ROOT_TEMPLATE = exports.PACKAGE_LOCK_JSON_FILE_NAME = exports.PACKAGE_JSON_FILE_NAME = exports.SCOPED_MACOS_RUNTIME_NAME = exports.SCOPED_VISIONOS_RUNTIME_NAME = exports.SCOPED_IOS_RUNTIME_NAME = exports.SCOPED_ANDROID_RUNTIME_NAME = exports.TNS_IOS_RUNTIME_NAME = exports.TNS_ANDROID_RUNTIME_NAME = exports.UI_MOBILE_BASE_NAME = exports.TNS_CORE_MODULES_WIDGETS_NAME = exports.RSPACK_PLUGIN_NAME = exports.WEBPACK_PLUGIN_NAME = exports.SCOPED_TNS_CORE_THEME_NAME = exports.TNS_CORE_THEME_NAME = exports.SCOPED_TNS_CORE_MODULES = exports.TNS_CORE_MODULES_NAME = exports.TNS_MODULES_FOLDER_NAME = exports.NODE_MODULES_FOLDER_NAME = exports.NATIVESCRIPT_KEY_NAME = exports.NS_BASE_PODFILE = exports.PROJECT_FRAMEWORK_FOLDER_NAME = exports.APP_RESOURCES_FOLDER_NAME = exports.APP_FOLDER_NAME = void 0;
3
+ exports.INCLUDE_GRADLE_NAME = exports.INFO_PLIST_FILE_NAME = exports.APP_GRADLE_FILE_NAME = exports.MANIFEST_FILE_NAME = exports.ANDROID_ANALYTICS_DATA_FILE = exports.ANDROID_ANALYTICS_DATA_DIR = exports.FONTS_DIR = exports.ASSETS_DIR = exports.MAIN_DIR = exports.SRC_DIR = exports.AWAIT_NOTIFICATION_TIMEOUT_SECONDS = exports.CODE_SIGN_ENTITLEMENTS = exports.LIB_DIR_NAME = exports.KARMA_CONFIG_NAME = exports.TSCCONFIG_TNS_JSON_NAME = exports.RSPACK_CONFIG_NAME = exports.WEBPACK_CONFIG_NAME = exports.HOOKS_DIR_NAME = exports.PLATFORMS_DIR_NAME = exports.XML_FILE_EXTENSION = exports.LIVESYNC_EXCLUDED_FILE_PATTERNS = exports.TEST_RUNNER_NAME = exports.TESTING_FRAMEWORKS = exports.LIVESYNC_EXCLUDED_DIRECTORIES = exports.DEFAULT_APP_IDENTIFIER_PREFIX = exports.NODE_MODULE_CACHE_PATH_KEY_NAME = exports.ANDROID_DEVICE_APP_ROOT_TEMPLATE = exports.PACKAGE_LOCK_JSON_FILE_NAME = exports.PACKAGE_JSON_FILE_NAME = exports.SCOPED_VISIONOS_RUNTIME_NAME = exports.SCOPED_IOS_RUNTIME_NAME = exports.SCOPED_ANDROID_RUNTIME_NAME = exports.TNS_IOS_RUNTIME_NAME = exports.TNS_ANDROID_RUNTIME_NAME = exports.UI_MOBILE_BASE_NAME = exports.TNS_CORE_MODULES_WIDGETS_NAME = exports.VITE_DIST_FOLDER_NAME = exports.RSPACK_PLUGIN_NAME = exports.WEBPACK_PLUGIN_NAME = exports.SCOPED_TNS_CORE_THEME_NAME = exports.TNS_CORE_THEME_NAME = exports.SCOPED_TNS_CORE_MODULES = exports.TNS_CORE_MODULES_NAME = exports.TNS_MODULES_FOLDER_NAME = exports.NODE_MODULES_FOLDER_NAME = exports.NATIVESCRIPT_KEY_NAME = exports.NS_BASE_PODFILE = exports.PROJECT_FRAMEWORK_FOLDER_NAME = exports.APP_RESOURCES_FOLDER_NAME = exports.APP_FOLDER_NAME = void 0;
4
4
  exports.JsFlavorName = exports.TsFlavorName = exports.SvelteFlavorName = exports.SolidFlavorName = exports.ReactFlavorName = exports.VueFlavorName = exports.NgFlavorName = exports.SVELTE_NAME = exports.SOLID_NAME = exports.REACT_NAME = exports.TYPESCRIPT_NAME = exports.JAVASCRIPT_NAME = exports.ANGULAR_NAME = exports.VUE_NAME = exports.ItunesConnectApplicationTypes = exports.androidAppResourcesFolderName = exports.iOSAppResourcesFolderName = exports.ITMSConstants = exports.ANALYTICS_LOCAL_TEMPLATE_PREFIX = exports.RESERVED_TEMPLATE_NAMES = exports.ReleaseType = exports.SaveOptions = exports.TemplatesV2PackageJsonKeysToRemove = exports.PackageJsonKeysToKeep = exports.LiveSyncTrackActionNames = exports.PackageVersion = exports.MetadataFilteringConstants = exports.IOS_WATCHAPP_EXTENSION_FOLDER = exports.IOS_WATCHAPP_FOLDER = exports.NATIVE_EXTENSION_FOLDER = exports.APPLICATION_RESPONSE_TIMEOUT_SECONDS = exports.NATIVE_SOURCE_FOLDER = exports.TNS_NATIVE_SOURCE_GROUP_NAME = exports.HASHES_FILE_NAME = exports.APKS_EXTENSION_NAME = exports.AAB_EXTENSION_NAME = exports.APK_EXTENSION_NAME = exports.DEPENDENCIES_JSON_NAME = exports.CONFIG_FILE_NAME_TS = exports.CONFIG_FILE_NAME_JS = exports.CONFIG_FILE_NAME_DISPLAY = exports.CONFIG_NS_APP_ENTRY = exports.CONFIG_NS_APP_RESOURCES_ENTRY = exports.CONFIG_NS_FILE_NAME = exports.RESOURCES_DIR = exports.BUNDLE_DIR = exports.APK_DIR = exports.OUTPUTS_DIR = exports.BUILD_DIR = exports.BUILD_XCCONFIG_FILE_NAME = void 0;
5
5
  exports.PackageManagers = exports.EMIT_APPENDER_EVENT_NAME = exports.LoggerConfigData = exports.LoggerLevel = exports.DeviceConnectionType = exports.LoggerAppenders = exports.IOSNativeTargetTypes = exports.IOSNativeTargetProductTypes = exports.IOSDeviceTargets = exports.RunOnDeviceEvents = exports.AndroidAppBundleMessages = exports.AndroidBundleValidatorMessages = exports.BundleValidatorMessages = exports.IosProjectConstants = exports.EXTENSION_PROVISIONING_FILENAME = exports.PODFILE_NAME = exports.PLUGINS_BUILD_DATA_FILENAME = exports.PLUGIN_BUILD_DATA_FILENAME = exports.AddPlaformErrors = exports.PACKAGE_PLACEHOLDER_NAME = exports.AndroidBuildDefaults = exports.Hooks = exports.XcodeDeprecationStringFormat = exports.MacOSDeprecationStringFormat = exports.MacOSVersions = exports.AssetConstants = exports.CLI_RESOURCES_DIR_NAME = exports.NATIVESCRIPT_PROPS_INTERNAL_DELIMITER = exports.AnalyticsEventLabelDelimiter = exports.DebugCommandErrors = exports.BUNDLER_COMPILATION_COMPLETE = exports.PREPARE_READY_EVENT_NAME = exports.INITIAL_SYNC_EVENT_NAME = exports.FILES_CHANGE_EVENT_NAME = exports.CACACHE_DIRECTORY_NAME = exports.ANDROID_APP_BUNDLE_SIGNING_ERROR_MESSAGE = exports.ANDROID_RELEASE_BUILD_ERROR_MESSAGE = exports.POST_INSTALL_COMMAND_NAME = exports.INSPECTOR_CACHE_DIRNAME = exports.VERSION_STRING = exports.DEBUGGER_DETACHED_EVENT_NAME = exports.DEBUGGER_ATTACHED_EVENT_NAME = exports.USER_INTERACTION_NEEDED_EVENT_NAME = exports.CONNECTION_ERROR_EVENT_NAME = exports.BUILD_OUTPUT_EVENT_NAME = exports.ProjectTypes = void 0;
6
6
  const path_1 = require("path");
@@ -17,6 +17,11 @@ exports.TNS_CORE_THEME_NAME = "nativescript-theme-core";
17
17
  exports.SCOPED_TNS_CORE_THEME_NAME = "@nativescript/theme";
18
18
  exports.WEBPACK_PLUGIN_NAME = "@nativescript/webpack";
19
19
  exports.RSPACK_PLUGIN_NAME = "@nativescript/rspack";
20
+ // Project-relative directory the Vite bundler writes its build output to
21
+ // before the CLI copies it into the platforms app folder. Mirrors the
22
+ // default value computed in `@nativescript/vite`'s base configuration
23
+ // (`process.env.NS_VITE_DIST_DIR || '.ns-vite-build'`).
24
+ exports.VITE_DIST_FOLDER_NAME = ".ns-vite-build";
20
25
  exports.TNS_CORE_MODULES_WIDGETS_NAME = "tns-core-modules-widgets";
21
26
  exports.UI_MOBILE_BASE_NAME = "@nativescript/ui-mobile-base";
22
27
  exports.TNS_ANDROID_RUNTIME_NAME = "tns-android";
@@ -24,7 +29,6 @@ exports.TNS_IOS_RUNTIME_NAME = "tns-ios";
24
29
  exports.SCOPED_ANDROID_RUNTIME_NAME = "@nativescript/android";
25
30
  exports.SCOPED_IOS_RUNTIME_NAME = "@nativescript/ios";
26
31
  exports.SCOPED_VISIONOS_RUNTIME_NAME = "@nativescript/visionos";
27
- exports.SCOPED_MACOS_RUNTIME_NAME = "@nativescript/macos";
28
32
  exports.PACKAGE_JSON_FILE_NAME = "package.json";
29
33
  exports.PACKAGE_LOCK_JSON_FILE_NAME = "package-lock.json";
30
34
  exports.ANDROID_DEVICE_APP_ROOT_TEMPLATE = `/data/data/%s/files`;
@@ -325,6 +329,7 @@ var IOSNativeTargetTypes;
325
329
  IOSNativeTargetTypes["watchApp"] = "watch_app";
326
330
  IOSNativeTargetTypes["watchExtension"] = "watch_extension";
327
331
  IOSNativeTargetTypes["appExtension"] = "app_extension";
332
+ IOSNativeTargetTypes["application"] = "application";
328
333
  })(IOSNativeTargetTypes || (exports.IOSNativeTargetTypes = IOSNativeTargetTypes = {}));
329
334
  const pathToLoggerAppendersDir = (0, path_1.join)(__dirname, "common", "logger", "appenders");
330
335
  exports.LoggerAppenders = {
@@ -100,7 +100,6 @@ class PrepareController extends events_1.EventEmitter {
100
100
  platform: prepareData.platform.toLowerCase(),
101
101
  };
102
102
  }
103
- this.syncMacOSBundleArtifacts(projectData, platformData);
104
103
  await this.writeRuntimePackageJson(projectData, platformData, prepareData);
105
104
  await this.$projectChangesService.savePrepareInfo(platformData, projectData, prepareData);
106
105
  this.$logger.info(`Project successfully prepared (${prepareData.platform.toLowerCase()})`);
@@ -278,33 +277,6 @@ class PrepareController extends events_1.EventEmitter {
278
277
  }
279
278
  this.$fs.writeJson(packagePath, packageData);
280
279
  }
281
- syncMacOSBundleArtifacts(projectData, platformData) {
282
- if (platformData.platformNameLowerCase !== "macos") {
283
- return;
284
- }
285
- if (process.env.NS_MACOS_IOS_BUNDLE_FALLBACK !== "1") {
286
- return;
287
- }
288
- const macosAppPath = path.join(platformData.projectRoot, projectData.projectName, "app");
289
- const hasMacBundle = this.$fs.exists(path.join(macosAppPath, "bundle.js")) ||
290
- this.$fs.exists(path.join(macosAppPath, "bundle.mjs"));
291
- if (hasMacBundle) {
292
- return;
293
- }
294
- const iosAppPath = path.join(projectData.platformsDir, "ios", projectData.projectName, "app");
295
- if (!this.$fs.exists(iosAppPath)) {
296
- return;
297
- }
298
- this.$logger.trace(`Copying bundle artifacts from ${iosAppPath} to ${macosAppPath} for macOS prepare.`);
299
- this.$fs.ensureDirectoryExists(macosAppPath);
300
- const emittedFiles = this.$fs.enumerateFilesInDirectorySync(iosAppPath);
301
- emittedFiles.forEach((sourcePath) => {
302
- const relativePath = path.relative(iosAppPath, sourcePath);
303
- const destinationPath = path.join(macosAppPath, relativePath);
304
- this.$fs.ensureDirectoryExists(path.dirname(destinationPath));
305
- this.$fs.copyFile(sourcePath, destinationPath);
306
- });
307
- }
308
280
  emitPrepareEvent(filesChangeEventData) {
309
281
  if (this.isInitialPrepareReady) {
310
282
  this.emit(constants_1.PREPARE_READY_EVENT_NAME, filesChangeEventData);
@@ -8,16 +8,27 @@ declare module "nativescript-dev-xcode" {
8
8
  }
9
9
 
10
10
  class project {
11
+ hash: any;
12
+ filepath: string;
11
13
  constructor(filename: string);
12
14
 
13
15
  parse(callback: () => void): void;
14
16
  parseSync(): void;
15
17
 
18
+ generateUuid(): string;
19
+
16
20
  writeSync(options: any): string;
17
21
 
18
22
  addFramework(filepath: string, options?: Options): void;
19
23
  removeFramework(filePath: string, options?: Options): void;
20
24
 
25
+
26
+ getProductFile(watchApptarget: target): any;
27
+ addToPbxFrameworksBuildPhase(file);
28
+ addToPbxCopyfilesBuildPhase(file, comment: string, targetid: string);
29
+ pbxFrameworksBuildPhaseObj(targetid: string): any;
30
+ pbxBuildFileSection(): {[k: string] : any};
31
+
21
32
  addPbxGroup(
22
33
  filePathsArray: any[],
23
34
  name: string,
@@ -27,17 +38,30 @@ declare module "nativescript-dev-xcode" {
27
38
 
28
39
  removePbxGroup(groupName: string, path: string): void;
29
40
 
41
+ addTargetDependency(target: string, dependencyTargets: string[]);
42
+
43
+ findTargetKey(name: string);
44
+ pbxTargetByName(name: string): target;
45
+ pbxNativeTargetSection(): {[key: string]: any};
46
+
30
47
  addToHeaderSearchPaths(options?: Options): void;
31
48
  removeFromHeaderSearchPaths(options?: Options): void;
32
49
  updateBuildProperty(key: string, value: any): void;
33
50
 
34
51
  pbxXCBuildConfigurationSection(): any;
35
52
 
53
+ buildPhaseObject(
54
+ buildPhaseType: string,
55
+ comment: string,
56
+ target: tstring
57
+ )
58
+
36
59
  addTarget(
37
60
  targetName: string,
38
61
  targetType: string,
39
62
  targetPath?: string,
40
- parentTarget?: string
63
+ parentTarget?: string,
64
+ productTargetType?: string
41
65
  ): target;
42
66
  addBuildPhase(
43
67
  filePathsArray: string[],
@@ -133,7 +133,6 @@ interface INsConfigIOS extends INsConfigPlaform {
133
133
  }
134
134
 
135
135
  interface INSConfigVisionOS extends INsConfigIOS {}
136
- interface INSConfigMacOS extends INsConfigIOS {}
137
136
 
138
137
  interface INsConfigAndroid extends INsConfigPlaform {
139
138
  v8Flags?: string;
@@ -189,7 +188,6 @@ interface INsConfig {
189
188
  ios?: INsConfigIOS;
190
189
  android?: INsConfigAndroid;
191
190
  visionos?: INSConfigVisionOS;
192
- macos?: INSConfigMacOS;
193
191
  ignoredNativeDependencies?: string[];
194
192
  hooks?: INsConfigHooks[];
195
193
  projectName?: string;
@@ -603,9 +601,7 @@ interface INativePrepare {
603
601
  }
604
602
 
605
603
  interface IBuildConfig
606
- extends IAndroidBuildOptionsSettings,
607
- IiOSBuildConfig,
608
- IProjectDir {
604
+ extends IAndroidBuildOptionsSettings, IiOSBuildConfig, IProjectDir {
609
605
  clean?: boolean;
610
606
  architectures?: string[];
611
607
  buildOutputStdio?: string;
@@ -617,7 +613,8 @@ interface IBuildConfig
617
613
  * Describes iOS-specific build configuration properties
618
614
  */
619
615
  interface IiOSBuildConfig
620
- extends IBuildForDevice,
616
+ extends
617
+ IBuildForDevice,
621
618
  IiCloudContainerEnvironment,
622
619
  IDeviceIdentifier,
623
620
  IProvision,
@@ -867,6 +864,7 @@ interface IAddExtensionsFromPathOptions extends IAddTargetFromPathOptions {
867
864
 
868
865
  interface IAddWatchAppFromPathOptions extends IAddTargetFromPathOptions {
869
866
  watchAppFolderPath: string;
867
+ disableStubBinary?: boolean;
870
868
  }
871
869
 
872
870
  interface IRemoveExtensionsOptions {
@@ -875,6 +873,37 @@ interface IRemoveExtensionsOptions {
875
873
 
876
874
  interface IRemoveWatchAppOptions extends IRemoveExtensionsOptions {}
877
875
 
876
+ interface IWatchAppJSONConfigModule {
877
+ name?: string;
878
+ path: string;
879
+ targetType?: string;
880
+ embed?: boolean;
881
+ frameworks?: Array<string | Record<string, string>>;
882
+ dependencies?: string[];
883
+ headerSearchPaths?: string[];
884
+ resources?: string[];
885
+ src?: string[];
886
+ linkerFlags?: string[];
887
+ buildConfigurationProperties?: Record<string, string>;
888
+ SPMPackages?: Array<IOSSPMPackage | string>;
889
+ }
890
+ interface IWatchAppJSONConfig {
891
+ targetType?: string;
892
+ forceAddEmbedWatchContent?: boolean;
893
+ sharedModulesBuildConfigurationProperties?: Record<string, string>;
894
+ basedir?: string;
895
+ infoPlistPath?: string;
896
+ xcprivacyPath?: string;
897
+ importSourcesFromMainFolder?: boolean;
898
+ importResourcesFromMainFolder?: boolean;
899
+ resources?: string[];
900
+ src?: string[];
901
+ resourcesExclude?: string[];
902
+ srcExclude?: string[];
903
+ modules: IWatchAppConfigModule[];
904
+ SPMPackages?: Array<IOSSPMPackage>;
905
+ }
906
+
878
907
  interface IRubyFunction {
879
908
  functionName: string;
880
909
  functionParameters?: string;
@@ -19,5 +19,4 @@ yok_1.injector.requireCommand("open|ios", path);
19
19
  yok_1.injector.requireCommand("open|android", path);
20
20
  yok_1.injector.requireCommand("open|visionos", path);
21
21
  yok_1.injector.requireCommand("open|vision", path);
22
- yok_1.injector.requireCommand("open|macos", path);
23
22
  //# sourceMappingURL=bootstrap.js.map
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.QuestionMark = exports.N = exports.C = exports.W = exports.CtrlC = exports.ShiftR = exports.R = exports.OpenMacOSCommand = exports.OpenVisionOSCommand = exports.ShiftV = exports.V = exports.OpenIOSCommand = exports.ShiftI = exports.I = exports.OpenAndroidCommand = exports.ShiftA = exports.A = void 0;
3
+ exports.QuestionMark = exports.N = exports.C = exports.W = exports.CtrlC = exports.ShiftR = exports.R = exports.OpenVisionOSCommand = exports.ShiftV = exports.V = exports.OpenIOSCommand = exports.ShiftI = exports.I = exports.OpenAndroidCommand = exports.ShiftA = exports.A = void 0;
4
4
  const fs = require("fs");
5
5
  const os_1 = require("os");
6
6
  const path = require("path");
@@ -256,57 +256,6 @@ class OpenVisionOSCommand extends ShiftV {
256
256
  }
257
257
  }
258
258
  exports.OpenVisionOSCommand = OpenVisionOSCommand;
259
- class OpenMacOSCommand {
260
- constructor($iOSProjectService, $logger, $childProcess, $projectData, $xcodeSelectService, $xcodebuildArgsService, $options) {
261
- this.$iOSProjectService = $iOSProjectService;
262
- this.$logger = $logger;
263
- this.$childProcess = $childProcess;
264
- this.$projectData = $projectData;
265
- this.$xcodeSelectService = $xcodeSelectService;
266
- this.$xcodebuildArgsService = $xcodebuildArgsService;
267
- this.$options = $options;
268
- this.key = "M";
269
- this.platform = "all";
270
- this.description = "Open project in Xcode";
271
- this.group = "macOS";
272
- this.willBlockKeyCommandExecution = true;
273
- this.isInteractive = false;
274
- }
275
- async execute() {
276
- this.$options.watch = false;
277
- this.$options.platformOverride = "macOS";
278
- const os = (0, os_1.platform)();
279
- if (os === "darwin") {
280
- this.$projectData.initializeProjectData();
281
- const macOSDir = path.resolve(this.$projectData.platformsDir, "macos");
282
- if (!fs.existsSync(macOSDir)) {
283
- const prepareCommand = yok_1.injector.resolveCommand("prepare");
284
- await prepareCommand.execute(["macos"]);
285
- if (this.isInteractive) {
286
- process.stdin.resume();
287
- }
288
- }
289
- const platformData = this.$iOSProjectService.getPlatformData(this.$projectData);
290
- const xcprojectFile = this.$xcodebuildArgsService.getXcodeProjectArgs(platformData, this.$projectData)[1];
291
- if (fs.existsSync(xcprojectFile)) {
292
- this.$xcodeSelectService
293
- .getDeveloperDirectoryPath()
294
- .then(() => this.$childProcess.exec(`open ${xcprojectFile}`, {}))
295
- .catch((e) => {
296
- this.$logger.error(e.message);
297
- });
298
- }
299
- else {
300
- this.$logger.error(`Unable to open project file: ${xcprojectFile}`);
301
- }
302
- }
303
- else {
304
- this.$logger.error("Opening a project in XCode requires macOS.");
305
- }
306
- this.$options.platformOverride = null;
307
- }
308
- }
309
- exports.OpenMacOSCommand = OpenMacOSCommand;
310
259
  class R {
311
260
  constructor($liveSyncCommandHelper) {
312
261
  this.$liveSyncCommandHelper = $liveSyncCommandHelper;
@@ -462,5 +411,4 @@ yok_1.injector.registerCommand("open|ios", OpenIOSCommand);
462
411
  yok_1.injector.registerCommand("open|visionos", OpenVisionOSCommand);
463
412
  yok_1.injector.registerCommand("open|vision", OpenVisionOSCommand);
464
413
  yok_1.injector.registerCommand("open|android", OpenAndroidCommand);
465
- yok_1.injector.registerCommand("open|macos", OpenMacOSCommand);
466
414
  //# sourceMappingURL=index.js.map