@akylas/nativescript-cli 8.8.6 → 8.9.4

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 (51) hide show
  1. package/config/test-deps-versions-generated.json +16 -0
  2. package/docs/man_pages/project/configuration/widget-ios.md +24 -0
  3. package/docs/man_pages/project/configuration/widget.md +24 -0
  4. package/docs/man_pages/start.md +1 -1
  5. package/lib/.d.ts +2 -0
  6. package/lib/bootstrap.js +1 -0
  7. package/lib/bun-package-manager.js +1 -1
  8. package/lib/commands/appstore-upload.js +3 -6
  9. package/lib/commands/create-project.js +6 -1
  10. package/lib/commands/generate.js +2 -41
  11. package/lib/commands/widget.js +799 -0
  12. package/lib/common/file-system.js +1 -2
  13. package/lib/common/logger/logger.js +4 -4
  14. package/lib/common/mobile/android/android-emulator-services.js +1 -1
  15. package/lib/common/mobile/android/android-ini-file-parser.js +8 -6
  16. package/lib/common/mobile/android/logcat-helper.js +1 -1
  17. package/lib/common/mobile/emulator-helper.js +1 -0
  18. package/lib/common/mobile/mobile-core/devices-service.js +2 -1
  19. package/lib/common/opener.js +2 -2
  20. package/lib/common/services/hooks-service.js +23 -6
  21. package/lib/constants.js +2 -1
  22. package/lib/controllers/migrate-controller.js +8 -8
  23. package/lib/controllers/prepare-controller.js +7 -6
  24. package/lib/data/prepare-data.js +1 -0
  25. package/lib/declarations.d.ts +1 -1
  26. package/lib/definitions/ios.d.ts +11 -1
  27. package/lib/definitions/prepare.d.ts +2 -0
  28. package/lib/definitions/project.d.ts +50 -24
  29. package/lib/key-commands/index.js +28 -21
  30. package/lib/node-package-manager.js +1 -1
  31. package/lib/options.js +1 -0
  32. package/lib/services/analytics/analytics-service.js +2 -1
  33. package/lib/services/android/gradle-build-args-service.js +1 -1
  34. package/lib/services/android-plugin-build-service.js +1 -1
  35. package/lib/services/apple-portal/apple-portal-application-service.js +1 -1
  36. package/lib/services/apple-portal/apple-portal-session-service.js +36 -9
  37. package/lib/services/apple-portal/srp/srp-wrapper.js +61 -0
  38. package/lib/services/assets-generation/assets-generation-service.js +33 -15
  39. package/lib/services/ios/export-options-plist-service.js +4 -2
  40. package/lib/services/ios/ios-signing-service.js +45 -23
  41. package/lib/services/ios/spm-service.js +10 -1
  42. package/lib/services/ios/xcodebuild-service.js +2 -0
  43. package/lib/services/ios-debugger-port-service.js +1 -1
  44. package/lib/services/ios-project-service.js +45 -14
  45. package/lib/services/livesync/android-livesync-tool.js +1 -1
  46. package/lib/services/project-config-service.js +12 -3
  47. package/lib/services/webpack/webpack-compiler-service.js +10 -3
  48. package/lib/tools/config-manipulation/config-transformer.js +9 -0
  49. package/package.json +51 -56
  50. package/vendor/gradle-app/app/build.gradle +347 -119
  51. package/vendor/gradle-app/build.gradle +7 -7
@@ -0,0 +1,16 @@
1
+ {
2
+ "karma-jasmine": "4.0.2",
3
+ "karma-chai": "0.1.0",
4
+ "karma-coverage": "2.2.1",
5
+ "karma": "6.4.4",
6
+ "karma-mocha": "2.0.1",
7
+ "karma-qunit": "4.2.1",
8
+ "mocha": "11.7.1",
9
+ "nyc": "17.1.0",
10
+ "@types/jasmine": "5.1.9",
11
+ "@types/mocha": "10.0.10",
12
+ "@jsdevtools/coverage-istanbul-loader": "3.0.5",
13
+ "karma-nativescript-launcher": "1.0.0",
14
+ "@types/karma-chai": "0.1.7",
15
+ "@types/qunit": "2.19.13"
16
+ }
@@ -0,0 +1,24 @@
1
+ <% if (isJekyll) { %>---
2
+ title: ns widget ios
3
+ position: 11
4
+ ---<% } %>
5
+
6
+ # ns widget ios
7
+
8
+ ### Description
9
+
10
+ Interactively adds a new iOS widget based on a predefined template.
11
+
12
+ ### Commands
13
+
14
+ Usage | Synopsis
15
+ ------|-------
16
+ General | `$ ns widget ios`
17
+
18
+ <% if(isHtml) { %>
19
+
20
+ ### Command Limitations
21
+
22
+ * You can run `$ ns widget ios` only on macOS systems.
23
+
24
+ <% } %>
@@ -0,0 +1,24 @@
1
+ <% if (isJekyll) { %>---
2
+ title: ns widget ios
3
+ position: 11
4
+ ---<% } %>
5
+
6
+ # ns widget ios
7
+
8
+ ### Description
9
+
10
+ Interactively adds a new iOS widget based on a predefined template.
11
+
12
+ ### Commands
13
+
14
+ Usage | Synopsis
15
+ ------|-------
16
+ General | `$ ns widget ios`
17
+
18
+ <% if(isHtml) { %>
19
+
20
+ ### Command Limitations
21
+
22
+ * You can run `$ ns widget ios` only on macOS systems.
23
+
24
+ <% } %>
@@ -50,7 +50,7 @@ Command | Description
50
50
  [install](project/configuration/install.html) | Installs all platforms and dependencies described in the `package.json` file in the current directory.
51
51
  [plugin](lib-management/plugin.html) | Lets you manage the plugins for your project.
52
52
  [open](project/configuration/open.md) | Opens the native project in Xcode/Android Studio.
53
-
53
+ [widget ios](project/configuration/widget.md) | Adds a new iOS widget to the project.
54
54
  ## Publishing Commands
55
55
  Command | Description
56
56
  ---|---
package/lib/.d.ts CHANGED
@@ -48,6 +48,7 @@
48
48
  /// <reference path="commands/typings.ts" />
49
49
  /// <reference path="commands/update-platform.ts" />
50
50
  /// <reference path="commands/update.ts" />
51
+ /// <reference path="commands/widget.ts" />
51
52
  /// <reference path="common/bootstrap.ts" />
52
53
  /// <reference path="common/child-process.ts" />
53
54
  /// <reference path="common/codeGeneration/code-entity.ts" />
@@ -338,6 +339,7 @@
338
339
  /// <reference path="services/apple-portal/apple-portal-cookie-service.ts" />
339
340
  /// <reference path="services/apple-portal/apple-portal-session-service.ts" />
340
341
  /// <reference path="services/apple-portal/definitions.d.ts" />
342
+ /// <reference path="services/apple-portal/srp/srp-wrapper.ts" />
341
343
  /// <reference path="services/assets-generation/assets-generation-service.ts" />
342
344
  /// <reference path="services/build-artifacts-service.ts" />
343
345
  /// <reference path="services/build-data-service.ts" />
package/lib/bootstrap.js CHANGED
@@ -208,4 +208,5 @@ yok_1.injector.requireCommand([
208
208
  "native|add|swift",
209
209
  "native|add|objective-c",
210
210
  ], "./commands/native-add");
211
+ yok_1.injector.requireCommand(["widget", "widget|ios"], "./commands/widget");
211
212
  require("./key-commands/bootstrap");
@@ -30,7 +30,7 @@ class BunPackageManager extends base_package_manager_1.BasePackageManager {
30
30
  const packageJsonPath = path.join(pathToSave, "package.json");
31
31
  const jsonContentBefore = this.$fs.readJson(packageJsonPath);
32
32
  const flags = this.getFlagsString(config, true);
33
- let params = ["install", "--legacy-peer-deps"];
33
+ let params = ["install"];
34
34
  const isInstallingAllDependencies = packageName === pathToSave;
35
35
  if (!isInstallingAllDependencies) {
36
36
  params.push(packageName);
@@ -34,8 +34,7 @@ class PublishIOS {
34
34
  (await this.$prompter.getString("Apple ID", { allowEmpty: false }));
35
35
  const password = args[1] || (await this.$prompter.getPassword("Apple ID password"));
36
36
  const user = await this.$applePortalSessionService.createUserSession({ username, password }, {
37
- applicationSpecificPassword: this.$options
38
- .appleApplicationSpecificPassword,
37
+ applicationSpecificPassword: this.$options.appleApplicationSpecificPassword,
39
38
  sessionBase64: this.$options.appleSessionBase64,
40
39
  requireInteractiveConsole: true,
41
40
  requireApplicationSpecificPassword: true,
@@ -56,9 +55,8 @@ class PublishIOS {
56
55
  if (mobileProvisionIdentifier) {
57
56
  this.$logger.info("Building .ipa with the selected mobile provision and/or certificate. " +
58
57
  mobileProvisionIdentifier);
59
- this.$options.forDevice = true;
60
58
  this.$options.provision = mobileProvisionIdentifier;
61
- const buildData = new build_data_1.IOSBuildData(this.$projectData.projectDir, platform, { ...this.$options.argv, watch: false });
59
+ const buildData = new build_data_1.IOSBuildData(this.$projectData.projectDir, platform, { ...this.$options.argv, buildForAppStore: true, watch: false });
62
60
  ipaFilePath = await this.$buildController.prepareAndBuild(buildData);
63
61
  }
64
62
  else {
@@ -71,8 +69,7 @@ class PublishIOS {
71
69
  await this.$itmsTransporterService.upload({
72
70
  credentials: { username, password },
73
71
  user,
74
- applicationSpecificPassword: this.$options
75
- .appleApplicationSpecificPassword,
72
+ applicationSpecificPassword: this.$options.appleApplicationSpecificPassword,
76
73
  ipaFilePath,
77
74
  shouldExtractIpa: !!this.$options.ipa,
78
75
  verboseLogging: this.$logger.getLevel() === "TRACE",
@@ -154,7 +154,7 @@ class CreateProjectCommand {
154
154
  this.$logger.printMarkdown(`# Let’s create a NativeScript app!`);
155
155
  this.$logger.printMarkdown(`
156
156
  Answer the following questions to help us build the right app for you. (Note: you
157
- can skip this prompt next time using the --template option, or the --ng, --react, --vue, --svelte, --ts, or --js flags.)
157
+ can skip this prompt next time using the --template option, or using --ng, --react, --solid, --svelte, --vue, --ts, or --js flags.)
158
158
  `);
159
159
  }
160
160
  }
@@ -296,6 +296,11 @@ can skip this prompt next time using the --template option, or the --ng, --react
296
296
  value: constants.RESERVED_TEMPLATE_NAMES.solid,
297
297
  description: CreateProjectCommand.HelloWorldTemplateDescription,
298
298
  },
299
+ {
300
+ key: `${CreateProjectCommand.HelloWorldTemplateKey} using TypeScript`,
301
+ value: constants.RESERVED_TEMPLATE_NAMES.solidts,
302
+ description: `${CreateProjectCommand.HelloWorldTemplateDescription} using TypeScript`,
303
+ },
299
304
  {
300
305
  key: CreateProjectCommand.BlankVisionTemplateKey,
301
306
  value: "@nativescript/template-blank-solid-vision",
@@ -1,18 +1,16 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.GenerateCommand = void 0;
4
- const schematics_executor_1 = require("@nativescript/schematics-executor");
5
4
  const yok_1 = require("../common/yok");
6
5
  class GenerateCommand {
7
- constructor($logger, $options, $errors) {
6
+ constructor($logger, $errors) {
8
7
  this.$logger = $logger;
9
- this.$options = $options;
10
8
  this.$errors = $errors;
11
9
  this.allowedParameters = [];
12
10
  }
13
11
  async execute(_rawArgs) {
14
12
  try {
15
- await (0, schematics_executor_1.run)(this.executionOptions);
13
+ this.$logger.info("If you have ideas for this command, please discuss at https://nativescript.org/discord");
16
14
  }
17
15
  catch (error) {
18
16
  this.$errors.fail(error.message);
@@ -24,46 +22,9 @@ class GenerateCommand {
24
22
  return true;
25
23
  }
26
24
  validateExecutionOptions() {
27
- if (!this.executionOptions.schematic) {
28
- this.$errors.failWithHelp(`The generate command requires a schematic name to be specified.`);
29
- }
30
25
  }
31
26
  setExecutionOptions(rawArgs) {
32
- const options = this.parseRawArgs(rawArgs);
33
- this.executionOptions = {
34
- ...options,
35
- logger: this.$logger,
36
- directory: process.cwd(),
37
- };
38
- }
39
- parseRawArgs(rawArgs) {
40
- const collection = this.$options.collection;
41
- const schematic = rawArgs.shift();
42
- const { options, args } = parseSchematicSettings(rawArgs);
43
- return {
44
- collection,
45
- schematic,
46
- schematicOptions: options,
47
- schematicArgs: args,
48
- };
49
27
  }
50
28
  }
51
29
  exports.GenerateCommand = GenerateCommand;
52
- function parseSchematicSettings(rawArgs) {
53
- const [optionStrings, args] = partition(rawArgs, (item) => item.includes("="));
54
- const options = optionStrings
55
- .map((o) => o.split("="))
56
- .map(([key, ...value]) => [key, value.join("=")])
57
- .reduce((obj, [key, value]) => {
58
- return { ...obj, [key]: value };
59
- }, {});
60
- return { options, args };
61
- }
62
- function partition(array, predicate) {
63
- return array.reduce(([pass, fail], item) => {
64
- return predicate(item)
65
- ? [[...pass, item], fail]
66
- : [pass, [...fail, item]];
67
- }, [[], []]);
68
- }
69
30
  yok_1.injector.registerCommand("generate", GenerateCommand);