@akylas/nativescript-cli 8.9.4 → 8.11.0

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 (66) hide show
  1. package/config/test-deps-versions-generated.json +10 -10
  2. package/docs/build-jekyll-md.sh +1 -1
  3. package/docs/man_pages/config/config-get.md +36 -0
  4. package/docs/man_pages/config/config-set.md +40 -0
  5. package/docs/man_pages/config/config.md +39 -0
  6. package/docs/man_pages/project/hooks/hooks.md +35 -0
  7. package/docs/man_pages/start.md +1 -0
  8. package/lib/.d.ts +8 -3
  9. package/lib/bootstrap.js +3 -1
  10. package/lib/color.js +38 -7
  11. package/lib/commands/build.js +18 -2
  12. package/lib/commands/clean.js +1 -2
  13. package/lib/commands/config.js +1 -1
  14. package/lib/commands/embedding/embed.js +1 -1
  15. package/lib/commands/hooks/common.js +79 -0
  16. package/lib/commands/hooks/hooks-lock.js +100 -0
  17. package/lib/commands/hooks/hooks.js +71 -0
  18. package/lib/commands/post-install.js +2 -2
  19. package/lib/commands/typings.js +29 -18
  20. package/lib/common/definitions/extensibility.d.ts +2 -2
  21. package/lib/common/definitions/mobile.d.ts +72 -72
  22. package/lib/common/header.js +3 -3
  23. package/lib/common/logger/layouts/cli-layout.js +1 -1
  24. package/lib/common/logger/logger.js +3 -3
  25. package/lib/common/mobile/android/android-device.js +1 -1
  26. package/lib/common/mobile/android/android-emulator-services.js +8 -6
  27. package/lib/common/mobile/device-log-provider.js +3 -4
  28. package/lib/common/project-helper.js +15 -2
  29. package/lib/common/verify-node-version.js +1 -1
  30. package/lib/constants.js +7 -4
  31. package/lib/controllers/migrate-controller.js +3 -4
  32. package/lib/controllers/prepare-controller.js +9 -9
  33. package/lib/controllers/run-controller.js +1 -1
  34. package/lib/declarations.d.ts +5 -0
  35. package/lib/definitions/hooks.d.ts +1 -0
  36. package/lib/definitions/nativescript-dev-xcode.d.ts +25 -1
  37. package/lib/definitions/project.d.ts +52 -1
  38. package/lib/definitions/temp-service.d.ts +6 -2
  39. package/lib/helpers/key-command-helper.js +2 -1
  40. package/lib/nativescript-cli.js +28 -0
  41. package/lib/options.js +4 -0
  42. package/lib/project-data.js +11 -5
  43. package/lib/services/analytics/analytics-broker-process.js +1 -1
  44. package/lib/services/analytics-settings-service.js +2 -1
  45. package/lib/services/android/gradle-build-args-service.js +7 -3
  46. package/lib/services/android/gradle-build-service.js +4 -1
  47. package/lib/services/android-project-service.js +12 -10
  48. package/lib/services/{webpack/webpack-compiler-service.js → bundler/bundler-compiler-service.js} +254 -85
  49. package/lib/services/bundler/bundler.js +2 -0
  50. package/lib/services/extensibility-service.js +1 -1
  51. package/lib/services/ios/spm-service.js +13 -2
  52. package/lib/services/ios/xcodebuild-args-service.js +7 -5
  53. package/lib/services/ios-project-service.js +0 -1
  54. package/lib/services/ios-watch-app-service.js +540 -16
  55. package/lib/services/livesync/android-livesync-tool.js +3 -1
  56. package/lib/services/plugins-service.js +1 -0
  57. package/lib/services/project-changes-service.js +1 -1
  58. package/lib/services/temp-service.js +16 -4
  59. package/lib/services/versions-service.js +2 -1
  60. package/package.json +35 -36
  61. package/vendor/aab-tool/README.txt +1 -1
  62. package/vendor/aab-tool/bundletool.jar +0 -0
  63. package/vendor/gradle-app/app/build.gradle +20 -13
  64. package/vendor/gradle-app/app/gradle.properties +45 -0
  65. package/vendor/gradle-plugin/build.gradle +7 -6
  66. package/lib/services/webpack/webpack.d.ts +0 -227
@@ -302,6 +302,7 @@ This framework comes from ${dependencyName} plugin, which is installed multiple
302
302
  if (pluginData.isPlugin) {
303
303
  pluginData.platformsData = data.platforms;
304
304
  pluginData.pluginVariables = data.variables;
305
+ pluginData.nativescript = data;
305
306
  }
306
307
  return pluginData;
307
308
  }
@@ -39,7 +39,7 @@ class ProjectChangesService {
39
39
  get currentChanges() {
40
40
  return this._changesInfo;
41
41
  }
42
- async checkForChanges(platformData, projectData, prepareData, filesChangedData) {
42
+ async checkForChanges(platformData, projectData, prepareData) {
43
43
  this._changesInfo = new ProjectChangesInfo();
44
44
  const isNewPrepareInfo = await this.ensurePrepareInfo(platformData, projectData, prepareData);
45
45
  if (!isNewPrepareInfo) {
@@ -1,20 +1,32 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.TempService = void 0;
4
- const temp = require("temp");
4
+ const fs = require("fs");
5
+ const path = require("path");
6
+ const os_1 = require("os");
5
7
  const yok_1 = require("../common/yok");
6
8
  class TempService {
7
9
  constructor($cleanupService) {
8
10
  this.$cleanupService = $cleanupService;
9
- temp.track();
10
11
  }
11
12
  async mkdirSync(affixes) {
12
- const pathToDir = temp.mkdirSync(affixes);
13
+ var _a;
14
+ const opts = typeof affixes === "string" ? { prefix: affixes } : affixes;
15
+ const baseDir = (opts === null || opts === void 0 ? void 0 : opts.dir) ? opts.dir : (0, os_1.tmpdir)();
16
+ const prefix = ((_a = opts === null || opts === void 0 ? void 0 : opts.prefix) !== null && _a !== void 0 ? _a : "ns-").replace(/\s+/g, "-");
17
+ const pathToDir = fs.mkdtempSync(path.join(baseDir, prefix));
13
18
  await this.$cleanupService.addCleanupDeleteAction(pathToDir);
14
19
  return pathToDir;
15
20
  }
16
21
  async path(options) {
17
- const pathToFile = temp.path(options);
22
+ var _a, _b;
23
+ const opts = typeof options === "string" ? { prefix: options } : options;
24
+ const baseDir = (opts === null || opts === void 0 ? void 0 : opts.dir) ? opts.dir : (0, os_1.tmpdir)();
25
+ const prefix = ((_a = opts === null || opts === void 0 ? void 0 : opts.prefix) !== null && _a !== void 0 ? _a : "ns-").replace(/\s+/g, "-");
26
+ const suffix = (_b = opts === null || opts === void 0 ? void 0 : opts.suffix) !== null && _b !== void 0 ? _b : "";
27
+ const unique = Math.random().toString(36).slice(2);
28
+ const filePath = path.join(baseDir, `${prefix}${unique}${suffix}`);
29
+ const pathToFile = filePath;
18
30
  await this.$cleanupService.addCleanupDeleteAction(pathToFile);
19
31
  return pathToFile;
20
32
  }
@@ -43,7 +43,8 @@ class VersionsService {
43
43
  const versionInformations = [];
44
44
  if (this.projectData) {
45
45
  const nodeModulesPath = path.join(this.projectData.projectDir, constants.NODE_MODULES_FOLDER_NAME);
46
- const scopedPackagePath = path.join(nodeModulesPath, constants.SCOPED_TNS_CORE_MODULES);
46
+ const packageName = this.projectData.nsConfig.corePackageName || constants.SCOPED_TNS_CORE_MODULES;
47
+ const scopedPackagePath = path.join(nodeModulesPath, packageName);
47
48
  const tnsCoreModulesPath = path.join(nodeModulesPath, constants.TNS_CORE_MODULES_NAME);
48
49
  const dependsOnNonScopedPackage = !!this.projectData.dependencies[constants.TNS_CORE_MODULES_NAME];
49
50
  const dependsOnScopedPackage = !!this.projectData.dependencies[constants.SCOPED_TNS_CORE_MODULES];
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@akylas/nativescript-cli",
3
3
  "main": "./lib/nativescript-cli-lib.js",
4
- "version": "8.9.4",
4
+ "version": "8.11.0",
5
5
  "author": "NativeScript <oss@nativescript.org>",
6
6
  "description": "Command-line interface for building NativeScript projects",
7
7
  "bin": {
@@ -56,16 +56,15 @@
56
56
  "javascript"
57
57
  ],
58
58
  "dependencies": {
59
- "@foxt/js-srp": "^0.0.3-patch2",
60
- "@nativescript/doctor": "2.0.16-rc.0",
61
- "@npmcli/arborist": "^9.0.0",
59
+ "@foxt/js-srp": "0.0.3-patch2",
60
+ "@nativescript/doctor": "2.0.17",
61
+ "@nativescript/hook": "3.0.4",
62
+ "@npmcli/arborist": "9.1.6",
63
+ "@nstudio/trapezedev-project": "7.2.3",
62
64
  "@rigor789/resolve-package-path": "1.0.7",
63
- "@rigor789/trapezedev-project": "7.1.2",
64
- "ansi-colors": "^4.1.3",
65
- "archiver": "^7.0.1",
66
- "axios": "1.11.0",
65
+ "archiver": "7.0.1",
66
+ "axios": "1.13.2",
67
67
  "byline": "5.0.0",
68
- "chalk": "4.1.2",
69
68
  "chokidar": "4.0.3",
70
69
  "cli-table3": "0.6.5",
71
70
  "color": "4.2.3",
@@ -74,57 +73,54 @@
74
73
  "email-validator": "2.0.4",
75
74
  "esprima": "4.0.1",
76
75
  "font-finder": "1.1.0",
77
- "glob": "11.0.1",
78
76
  "ios-device-lib": "0.9.4",
79
77
  "ios-mobileprovision-finder": "1.2.1",
80
78
  "ios-sim-portable": "4.5.1",
81
79
  "jimp": "1.6.0",
82
80
  "lodash": "4.17.21",
83
81
  "log4js": "6.9.1",
84
- "marked": "15.0.7",
82
+ "marked": "15.0.12",
85
83
  "marked-terminal": "7.3.0",
86
- "minimatch": "10.0.1",
84
+ "minimatch": "10.1.1",
87
85
  "mkdirp": "3.0.1",
88
86
  "mute-stream": "2.0.0",
89
87
  "nativescript-dev-xcode": "0.8.1",
90
88
  "open": "8.4.2",
91
89
  "ora": "5.4.1",
92
- "pacote": "21.0.0",
90
+ "pacote": "21.0.3",
93
91
  "pbxproj-dom": "1.2.0",
94
92
  "plist": "3.1.0",
95
93
  "plist-merge-patch": "0.2.0",
96
- "prettier": "3.5.2",
94
+ "prettier": "3.6.2",
97
95
  "prompts": "2.4.2",
98
96
  "proper-lockfile": "4.1.2",
99
- "proxy-lib": "0.4.0",
97
+ "proxy-lib": "0.4.1",
100
98
  "qr-image": "3.2.0",
101
99
  "qrcode-terminal": "0.12.0",
102
- "semver": "7.7.1",
103
- "shelljs": "0.8.5",
104
- "simple-git": "3.27.0",
100
+ "semver": "7.7.3",
101
+ "shelljs": "0.10.0",
102
+ "simple-git": "3.30.0",
105
103
  "simple-plist": "1.4.0",
106
- "source-map": "0.7.4",
107
- "tar": "7.4.3",
108
- "temp": "0.9.4",
104
+ "source-map": "0.7.6",
105
+ "tar": "7.5.2",
109
106
  "ts-morph": "25.0.1",
110
107
  "tunnel": "0.0.6",
111
108
  "typescript": "5.7.3",
112
109
  "universal-analytics": "0.5.3",
113
110
  "uuid": "11.1.0",
114
111
  "winreg": "1.2.5",
115
- "ws": "8.18.1",
112
+ "ws": "8.18.3",
116
113
  "xml2js": "0.6.2",
117
114
  "yargs": "17.7.2"
118
115
  },
119
116
  "devDependencies": {
120
117
  "@types/archiver": "^6.0.3",
121
118
  "@types/byline": "^4.2.36",
122
- "@types/chai": "5.0.1",
123
- "@types/chai-as-promised": "8.0.1",
119
+ "@types/chai": "5.2.2",
120
+ "@types/chai-as-promised": "8.0.2",
124
121
  "@types/color": "4.2.0",
125
122
  "@types/convert-source-map": "2.0.3",
126
- "@types/glob": "^8.1.0",
127
- "@types/lodash": "4.17.15",
123
+ "@types/lodash": "4.17.20",
128
124
  "@types/marked-terminal": "^6.1.1",
129
125
  "@types/node": "^22.0.0",
130
126
  "@types/npmcli__arborist": "^6.3.0",
@@ -134,21 +130,20 @@
134
130
  "@types/proper-lockfile": "4.1.4",
135
131
  "@types/qr-image": "3.2.9",
136
132
  "@types/retry": "0.12.5",
137
- "@types/semver": "7.5.8",
133
+ "@types/semver": "7.7.1",
138
134
  "@types/shelljs": "^0.8.11",
139
135
  "@types/sinon": "^17.0.3",
140
136
  "@types/tabtab": "^3.0.2",
141
137
  "@types/tar": "6.1.13",
142
- "@types/temp": "0.9.4",
143
138
  "@types/tunnel": "0.0.7",
144
139
  "@types/universal-analytics": "0.4.8",
145
140
  "@types/uuid": "^10.0.0",
146
- "@types/ws": "8.5.14",
141
+ "@types/ws": "8.18.1",
147
142
  "@types/xml2js": "0.4.14",
148
143
  "@types/yargs": "17.0.33",
149
144
  "braces": ">=3.0.3",
150
- "chai": "5.2.0",
151
- "chai-as-promised": "8.0.1",
145
+ "chai": "5.3.3",
146
+ "chai-as-promised": "8.0.2",
152
147
  "conventional-changelog-cli": "^5.0.0",
153
148
  "grunt": "1.6.1",
154
149
  "grunt-contrib-clean": "2.0.1",
@@ -159,11 +154,11 @@
159
154
  "grunt-ts": "6.0.0-beta.22",
160
155
  "husky": "9.1.7",
161
156
  "istanbul": "0.4.5",
162
- "latest-version": "9.0.0",
163
- "lint-staged": "~15.4.3",
164
- "mocha": "11.1.0",
165
- "sinon": "19.0.2",
157
+ "lint-staged": "~15.5.2",
158
+ "mocha": "11.7.4",
159
+ "sinon": "19.0.5",
166
160
  "source-map-support": "0.5.21",
161
+ "standard-version": "9.5.0",
167
162
  "xml2js": ">=0.5.0"
168
163
  },
169
164
  "optionalDependencies": {
@@ -185,5 +180,9 @@
185
180
  "lint-staged": {
186
181
  "*.ts": "prettier --write"
187
182
  },
188
- "packageManager": "yarn@4.6.0+sha512.5383cc12567a95f1d668fbe762dfe0075c595b4bfff433be478dbbe24e05251a8e8c3eb992a986667c1d53b6c3a9c85b8398c35a960587fbd9fa3a0915406728"
183
+ "packageManager": "yarn@4.10.3",
184
+ "resolutions": {
185
+ "nativescript-dev-xcode@0.8.1": "patch:nativescript-dev-xcode@npm%3A0.8.1#./.yarn/patches/nativescript-dev-xcode-npm-0.8.1-c14b82ef0b.patch",
186
+ "@nstudio/trapezedev-project@7.2.3": "patch:@nstudio/trapezedev-project@npm%3A7.2.3#./.yarn/patches/@nstudio-trapezedev-project-npm-7.2.3-6b4d535c7d.patch"
187
+ }
189
188
  }
@@ -1 +1 @@
1
- Downloaded from https://github.com/google/bundletool/releases/tag/1.15.6
1
+ Downloaded from https://github.com/google/bundletool/releases/tag/1.18.2
Binary file
@@ -219,21 +219,27 @@ android {
219
219
 
220
220
  signingConfigs {
221
221
  release {
222
- if (project.hasProperty("release")) {
223
- if (project.hasProperty("ksPath") &&
224
- project.hasProperty("ksPassword") &&
225
- project.hasProperty("alias") &&
226
- project.hasProperty("password")) {
227
-
228
- storeFile file(ksPath)
229
- storePassword ksPassword
230
- keyAlias alias
231
- keyPassword password
232
- }
222
+ if (project.hasProperty("ksPath") &&
223
+ project.hasProperty("ksPassword") &&
224
+ project.hasProperty("alias") &&
225
+ project.hasProperty("password")) {
226
+
227
+ storeFile file(ksPath)
228
+ storePassword ksPassword
229
+ keyAlias alias
230
+ keyPassword password
233
231
  }
234
232
  }
235
233
  }
236
234
  buildTypes {
235
+ debug {
236
+ if (project.hasProperty("ksPath") &&
237
+ project.hasProperty("ksPassword") &&
238
+ project.hasProperty("alias") &&
239
+ project.hasProperty("password")) {
240
+ signingConfig signingConfigs.release
241
+ }
242
+ }
237
243
  release {
238
244
  signingConfig signingConfigs.release
239
245
  }
@@ -1134,10 +1140,11 @@ tasks.configureEach({ DefaultTask currentTask ->
1134
1140
  currentTask.dependsOn(buildMetadata)
1135
1141
  }
1136
1142
 
1137
- // // ensure buildMetadata is done before R8 to allow custom proguard from metadata
1138
- if (currentTask =~ /minify.*WithR8/) {
1143
+ // ensure buildMetadata is done before R8 to allow custom proguard from metadata
1144
+ if (currentTask =~ /minify(Debug|Release)WithR8/) {
1139
1145
  buildMetadata.finalizedBy(currentTask)
1140
1146
  }
1147
+
1141
1148
  if (currentTask =~ /assemble.*Debug/ || currentTask =~ /assemble.*Release/) {
1142
1149
  currentTask.finalizedBy("validateAppIdMatch")
1143
1150
  }
@@ -0,0 +1,45 @@
1
+ # Project-wide Gradle settings.
2
+
3
+ # IDE (e.g. Android Studio) users:
4
+ # Gradle settings configured through the IDE *will override*
5
+ # any settings specified in this file.
6
+
7
+ # For more details on how to configure your build environment visit
8
+ # http://www.gradle.org/docs/current/userguide/build_environment.html
9
+
10
+ # When configured, Gradle will run in incubating parallel mode.
11
+ # This option should only be used with decoupled projects. More details, visit
12
+ # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
13
+ #org.gradle.parallel=true
14
+
15
+ # Specifies the JVM arguments used for the daemon process.
16
+ # The setting is particularly useful for tweaking memory settings.
17
+ org.gradle.jvmargs=-Xmx16384M
18
+ android.enableJetifier=true
19
+ android.useAndroidX=true
20
+
21
+ # Default versions used throughout the gradle configurations
22
+ NS_DEFAULT_BUILD_TOOLS_VERSION=35.0.0
23
+ NS_DEFAULT_COMPILE_SDK_VERSION=35
24
+ NS_DEFAULT_MIN_SDK_VERSION=21
25
+ NS_DEFAULT_ANDROID_BUILD_TOOLS_VERSION=8.12.1
26
+
27
+ ns_default_androidx_appcompat_version = 1.7.0
28
+ ns_default_androidx_exifinterface_version = 1.3.7
29
+ ns_default_androidx_fragment_version = 1.8.5
30
+ ns_default_androidx_material_version = 1.8.0
31
+ ns_default_androidx_multidex_version = 2.0.1
32
+ ns_default_androidx_transition_version = 1.5.1
33
+ ns_default_androidx_viewpager_version = 1.0.0
34
+ ns_default_asm_util_version = 9.7
35
+ ns_default_asm_version = 9.7
36
+ ns_default_bcel_version = 6.8.2
37
+ ns_default_commons_io_version = 2.6
38
+ ns_default_google_java_format_version = 1.6
39
+ ns_default_gson_version = 2.10.1
40
+ ns_default_json_version = 20180813
41
+ ns_default_junit_version = 4.13.2
42
+ ns_default_kotlin_version = 2.2.20
43
+ ns_default_kotlinx_metadata_jvm_version = 2.2.20
44
+ ns_default_mockito_core_version = 3.0.0
45
+ ns_default_spotbugs_version = 3.1.12
@@ -272,6 +272,13 @@ allprojects {
272
272
  }
273
273
  }
274
274
 
275
+
276
+ def computeCompileSdkVersion = { -> project.hasProperty("compileSdk") ? compileSdk : 35 }
277
+ def computeTargetSdkVersion = { -> project.hasProperty("targetSdk") ? targetSdk : 35 as int }
278
+ def computeBuildToolsVersion = { ->
279
+ project.hasProperty("buildToolsVersion") ? buildToolsVersion : "35.0.1"
280
+ }
281
+
275
282
  android {
276
283
  namespace "{{pluginNamespace}}"
277
284
  def applyPluginGradleConfigurations = { ->
@@ -284,12 +291,6 @@ android {
284
291
  }
285
292
  }
286
293
 
287
- def computeCompileSdkVersion = { -> project.hasProperty("compileSdk") ? project.compileSdk as int : 31 }
288
- def computeTargetSdkVersion = { -> project.hasProperty("targetSdk") ? project.targetSdk as int : 31 as int }
289
- def computeBuildToolsVersion = { ->
290
- project.hasProperty("buildToolsVersion") ? project.buildToolsVersion : "31.0.0"
291
- }
292
-
293
294
  project.ext.applyBeforePluginGradleConfiguration()
294
295
  applyPluginGradleConfigurations()
295
296
 
@@ -1,227 +0,0 @@
1
- import { EventEmitter } from "events";
2
- import { BuildData } from "../../data/build-data";
3
- import { PrepareData } from "../../data/prepare-data";
4
- import {
5
- IPlatformProjectServiceBase,
6
- IProjectData,
7
- IValidatePlatformOutput,
8
- } from "../../definitions/project";
9
- import { IOptions, IDependencyData } from "../../declarations";
10
- import { IPlatformData } from "../../definitions/platform";
11
- import { IPluginData } from "../../definitions/plugins";
12
- import { IRelease, ISpawnResult } from "../../common/declarations";
13
- import {
14
- IProjectChangesInfo,
15
- IPrepareInfo,
16
- IAddedNativePlatform,
17
- } from "../../definitions/project-changes";
18
- import { INotConfiguredEnvOptions } from "../../common/definitions/commands";
19
-
20
- declare global {
21
- interface IWebpackCompilerService extends EventEmitter {
22
- compileWithWatch(
23
- platformData: IPlatformData,
24
- projectData: IProjectData,
25
- prepareData: IPrepareData
26
- ): Promise<any>;
27
- compileWithoutWatch(
28
- platformData: IPlatformData,
29
- projectData: IProjectData,
30
- prepareData: IPrepareData
31
- ): Promise<void>;
32
- stopWebpackCompiler(platform: string): Promise<void>;
33
- }
34
-
35
- interface IWebpackEnvOptions {
36
- sourceMap?: boolean;
37
- uglify?: boolean;
38
- production?: boolean;
39
- }
40
-
41
- interface IProjectChangesService {
42
- checkForChanges(
43
- platformData: IPlatformData,
44
- projectData: IProjectData,
45
- prepareData: IPrepareData,
46
- filesChangedData?: IFilesChangeEventData
47
- ): Promise<IProjectChangesInfo>;
48
- getPrepareInfoFilePath(platformData: IPlatformData): string;
49
- getPrepareInfo(platformData: IPlatformData): IPrepareInfo;
50
- savePrepareInfo(
51
- platformData: IPlatformData,
52
- projectData: IProjectData,
53
- prepareData: IPrepareData
54
- ): Promise<void>;
55
- setNativePlatformStatus(
56
- platformData: IPlatformData,
57
- projectData: IProjectData,
58
- addedPlatform: IAddedNativePlatform
59
- ): void;
60
- currentChanges: IProjectChangesInfo;
61
- }
62
-
63
- interface IFilesChangeEventData {
64
- platform: string;
65
- files: string[];
66
- staleFiles: string[];
67
- hmrData: IPlatformHmrData;
68
- hasOnlyHotUpdateFiles: boolean;
69
- hasNativeChanges: boolean;
70
- }
71
-
72
- interface IWebpackEmitMessage {
73
- emittedFiles: string[];
74
- chunkFiles: string[];
75
- hash: string;
76
- }
77
-
78
- interface IPlatformProjectService
79
- extends NodeJS.EventEmitter,
80
- IPlatformProjectServiceBase {
81
- getPlatformData(projectData: IProjectData): IPlatformData;
82
- validate(
83
- projectData: IProjectData,
84
- options: IOptions,
85
- notConfiguredEnvOptions?: INotConfiguredEnvOptions
86
- ): Promise<IValidatePlatformOutput>;
87
- createProject(
88
- frameworkDir: string,
89
- frameworkVersion: string,
90
- projectData: IProjectData
91
- ): Promise<void>;
92
- interpolateData(projectData: IProjectData): Promise<void>;
93
- interpolateConfigurationFile(projectData: IProjectData): void;
94
-
95
- /**
96
- * Executes additional actions after native project is created.
97
- * @param {string} projectRoot Path to the real NativeScript project.
98
- * @param {IProjectData} projectData DTO with information about the project.
99
- * @returns {void}
100
- */
101
- afterCreateProject(projectRoot: string, projectData: IProjectData): void;
102
-
103
- /**
104
- * Gets first chance to validate the options provided as command line arguments.
105
- * @param {string} projectId Project identifier - for example org.nativescript.test.
106
- * @param {any} provision UUID of the provisioning profile used in iOS option validation.
107
- * @returns {void}
108
- */
109
- validateOptions(
110
- projectId?: string,
111
- provision?: true | string,
112
- teamId?: true | string
113
- ): Promise<boolean>;
114
-
115
- buildProject<T extends BuildData>(
116
- projectRoot: string,
117
- projectData: IProjectData,
118
- buildConfig: T
119
- ): Promise<void>;
120
-
121
- /**
122
- * Prepares images in Native project (for iOS).
123
- * @param {IProjectData} projectData DTO with information about the project.
124
- * @param {any} platformSpecificData Platform specific data required for project preparation.
125
- * @returns {void}
126
- */
127
- prepareProject<T extends PrepareData>(
128
- projectData: IProjectData,
129
- prepareData: T
130
- ): Promise<void>;
131
-
132
- /**
133
- * Prepares App_Resources in the native project by clearing data from other platform and applying platform specific rules.
134
- * @param {string} appResourcesDirectoryPath The place in the native project where the App_Resources are copied first.
135
- * @param {IProjectData} projectData DTO with information about the project.
136
- * @returns {void}
137
- */
138
- prepareAppResources(projectData: IProjectData): void;
139
-
140
- /**
141
- * Defines if current platform is prepared (i.e. if <project dir>/platforms/<platform> dir exists).
142
- * @param {string} projectRoot The project directory (path where root's package.json is located).
143
- * @param {IProjectData} projectData DTO with information about the project.
144
- * @returns {boolean} True in case platform is prepare (i.e. if <project dir>/platforms/<platform> dir exists), false otherwise.
145
- */
146
- isPlatformPrepared(projectRoot: string, projectData: IProjectData): boolean;
147
-
148
- preparePluginNativeCode(
149
- pluginData: IPluginData,
150
- options?: any
151
- ): Promise<void>;
152
-
153
- /**
154
- * Removes native code of a plugin (CocoaPods, jars, libs, src).
155
- * @param {IPluginData} Plugins data describing the plugin which should be cleaned.
156
- * @param {IProjectData} projectData DTO with information about the project.
157
- * @returns {void}
158
- */
159
- removePluginNativeCode(
160
- pluginData: IPluginData,
161
- projectData: IProjectData
162
- ): Promise<void>;
163
-
164
- beforePrepareAllPlugins(
165
- projectData: IProjectData,
166
- dependencies?: IDependencyData[]
167
- ): Promise<IDependencyData[]>;
168
-
169
- handleNativeDependenciesChange(
170
- projectData: IProjectData,
171
- opts: IRelease
172
- ): Promise<void>;
173
-
174
- /**
175
- * Gets the path wheren App_Resources should be copied.
176
- * @returns {string} Path to native project, where App_Resources should be copied.
177
- */
178
- getAppResourcesDestinationDirectoryPath(projectData: IProjectData): string;
179
-
180
- cleanDeviceTempFolder(
181
- deviceIdentifier: string,
182
- projectData: IProjectData
183
- ): Promise<void>;
184
- processConfigurationFilesFromAppResources(
185
- projectData: IProjectData,
186
- opts: { release: boolean }
187
- ): Promise<void>;
188
-
189
- /**
190
- * Ensures there is configuration file (AndroidManifest.xml, Info.plist) in app/App_Resources.
191
- * @param {IProjectData} projectData DTO with information about the project.
192
- * @returns {void}
193
- */
194
- ensureConfigurationFileInAppResources(projectData: IProjectData): void;
195
-
196
- /**
197
- * Stops all running processes that might hold a lock on the filesystem.
198
- * Android: Gradle daemon processes are terminated.
199
- * @param {IPlatformData} platformData The data for the specified platform.
200
- * @returns {void}
201
- */
202
- stopServices?(projectRoot: string): Promise<ISpawnResult>;
203
-
204
- /**
205
- * Removes build artifacts specific to the platform
206
- * @param {string} projectRoot The root directory of the native project.
207
- * @returns {void}
208
- */
209
- cleanProject?(projectRoot: string): Promise<void>;
210
-
211
- /**
212
- * Check the current state of the project, and validate against the options.
213
- * If there are parts in the project that are inconsistent with the desired options, marks them in the changeset flags.
214
- */
215
- checkForChanges<T extends PrepareData>(
216
- changeset: IProjectChangesInfo,
217
- prepareData: T,
218
- projectData: IProjectData
219
- ): Promise<void>;
220
-
221
- /**
222
- * Get the deployment target's version
223
- * Currently implemented only for iOS -> returns the value of IPHONEOS_DEPLOYMENT_TARGET property from xcconfig file
224
- */
225
- getDeploymentTarget?(projectData: IProjectData): any;
226
- }
227
- }