nativescript 9.1.2 → 9.2.0-alpha.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 (32) hide show
  1. package/config/config.json +1 -1
  2. package/config/test-deps-versions-generated.json +1 -1
  3. package/docs/man_pages/project/testing/build-android.md +2 -1
  4. package/docs/man_pages/project/testing/build-ios.md +2 -1
  5. package/docs/man_pages/project/testing/compiled-report.md +43 -0
  6. package/docs/man_pages/project/testing/compiled-verify.md +46 -0
  7. package/docs/man_pages/project/testing/run-android.md +2 -1
  8. package/docs/man_pages/project/testing/run-ios.md +2 -1
  9. package/lib/bootstrap.js +4 -0
  10. package/lib/commands/compiled-report.d.ts +40 -0
  11. package/lib/commands/compiled-report.js +153 -0
  12. package/lib/commands/compiled-verify.d.ts +16 -0
  13. package/lib/commands/compiled-verify.js +53 -0
  14. package/lib/common/services/hooks-service.js +7 -18
  15. package/lib/constants.d.ts +1 -0
  16. package/lib/constants.js +5 -4
  17. package/lib/controllers/build-controller.d.ts +4 -1
  18. package/lib/controllers/build-controller.js +25 -5
  19. package/lib/controllers/prepare-controller.d.ts +3 -1
  20. package/lib/controllers/prepare-controller.js +10 -1
  21. package/lib/data/prepare-data.d.ts +1 -0
  22. package/lib/data/prepare-data.js +1 -0
  23. package/lib/declarations.d.ts +1 -0
  24. package/lib/definitions/prepare.d.ts +5 -0
  25. package/lib/definitions/project.d.ts +32 -0
  26. package/lib/helpers/livesync-command-helper.js +2 -3
  27. package/lib/options.js +4 -0
  28. package/lib/services/compiled-release-service.d.ts +44 -0
  29. package/lib/services/compiled-release-service.js +357 -0
  30. package/lib/services/compiled-report-service.d.ts +89 -0
  31. package/lib/services/compiled-report-service.js +688 -0
  32. package/package.json +4 -4
@@ -5,5 +5,5 @@
5
5
  "USE_POD_SANDBOX": false,
6
6
  "DISABLE_HOOKS": false,
7
7
  "GA_MEASUREMENT_ID": "G-T4P12SN9HJ",
8
- "GA_API_SECRET": "I1m5adz4TrW2a1AX279pMA"
8
+ "GA_API_SECRET": ""
9
9
  }
@@ -7,7 +7,7 @@
7
7
  "karma": "6.4.4",
8
8
  "karma-coverage": "2.2.1",
9
9
  "karma-nativescript-launcher": "1.0.0",
10
- "mocha": "12.0.2",
10
+ "mocha": "12.0.3",
11
11
  "karma-mocha": "2.0.1",
12
12
  "karma-chai": "0.1.0",
13
13
  "karma-jasmine": "4.0.2",
@@ -13,13 +13,14 @@ Builds the project for Android and produces an APK that you can manually deploy
13
13
 
14
14
  Usage | Synopsis
15
15
  ---|---
16
- General | `$ ns build android [--compileSdk <API Level>] [--key-store-path <File Path> --key-store-password <Password> --key-store-alias <Name> --key-store-alias-password <Password>] [--release] [--copy-to <File Path>] [--env.*]] [--aab]`
16
+ General | `$ ns build android [--compileSdk <API Level>] [--key-store-path <File Path> --key-store-password <Password> --key-store-alias <Name> --key-store-alias-password <Password>] [--release [--compiled]] [--copy-to <File Path>] [--env.*]] [--aab]`
17
17
 
18
18
  ### Options
19
19
 
20
20
  * `--compileSdk` - Sets the Android SDK that will be used to build the project. `<API Level>` is a valid Android API level. For example: 28, 29. The minimum supported SDK is 28. <% if(isHtml) { %> For a complete list of the Android API levels and their corresponding Android versions, click [here](http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#platform).<% } %>
21
21
  * `--clean` - If set, forces the complete rebuild of the native application.
22
22
  * `--release` - If set, produces a release build. Otherwise, produces a debug build. When set, you must also specify the `--key-store-*` options.
23
+ * `--compiled` - Compiles the release build to native code with `@nativescript/compiler` (a devDependency of the project): no JavaScript runtime in the app. Implies `--release`. Set `release: { compiled: true }` in `nativescript.config.ts` to make it the default for release builds, and `--no-compiled` to opt out for one build.
23
24
  * `--key-store-path` - Specifies the file path to the keystore file (P12) which you want to use to code sign your APK. You can use the `--key-store-*` options along with `--release` to produce a signed release build. You need to specify all `--key-store-*` options.
24
25
  * `--key-store-password` - Provides the password for the keystore file specified with `--key-store-path`. You can use the `--key-store-*` options along with `--release` to produce a signed release build. You need to specify all `--key-store-*` options.
25
26
  * `--key-store-alias` - Provides the alias for the keystore file specified with `--key-store-path`. You can use the `--key-store-*` options along with `--release` to produce a signed release build. You need to specify all `--key-store-*` options.
@@ -17,11 +17,12 @@ Builds the project for iOS and produces an `APP` or `IPA` that you can manually
17
17
 
18
18
  Usage | Synopsis
19
19
  ---|---
20
- General | `$ ns build ios [--for-device] [--release] [--copy-to <File Path>] [--provision [<UUID/name>]] [--env.*]]`
20
+ General | `$ ns build ios [--for-device] [--release [--compiled]] [--copy-to <File Path>] [--provision [<UUID/name>]] [--env.*]]`
21
21
 
22
22
  ### Options
23
23
 
24
24
  * `--release` - If set, produces a release build. Otherwise, produces a debug build.
25
+ * `--compiled` - Compiles the release build to native code with `@nativescript/compiler` (a devDependency of the project): no JavaScript runtime in the app. Implies `--release`. Set `release: { compiled: true }` in `nativescript.config.ts` to make it the default for release builds, and `--no-compiled` to opt out for one build.
25
26
  * `--for-device` - If set, produces an application package that you can deploy on device. Otherwise, produces a build that you can run only in the native iOS Simulator.
26
27
  * `--i-cloud-container-environment` - If set, adds the passed `iCloudContainerEnvironment` when exporting an application package with the `--for-device` option.
27
28
  * `--copy-to` - Specifies the file path where the built `.ipa` will be copied. If it points to a non-existent directory path, it will be created. If the specified value is existing directory, the original file name will be used.
@@ -0,0 +1,43 @@
1
+ <% if (isJekyll) { %>---
2
+ title: ns compiled report
3
+ position: 21
4
+ ---<% } %>
5
+
6
+ # ns compiled report
7
+
8
+ ### Description
9
+
10
+ Reports a `--compiled` problem to NativeScript as a GitHub issue on NativeScript/NativeScript. When a compiled build fails (the compiler refuses a construct, or Swift, Kotlin, Gradle or Xcode fails on the generated code), the CLI keeps what went wrong in `platforms/compiled/<platform>/report.json` and says to run this command. For an error a compiled app throws at runtime, pass it with `--error <file>`.
11
+
12
+ The report holds the CLI, `@nativescript/compiler` and `@nativescript/core` versions, the framework and its version, the platform, Xcode or Gradle, the Android Gradle Plugin and Kotlin, the OS, the project's dependencies with their versions, the diagnostic and the source location it names. Paths are made relative to the project; the home folder, user names, tokens and passwords are removed. Its title carries a signature, a short hash of the kind of failure and its message with names and numbers abstracted, so the same problem in different apps finds the same issue.
13
+
14
+ Nothing leaves the machine until you have seen the report and agreed. The command then searches the repository's open and closed issues for the signature: if one exists, it offers to add a 👍 to it (with your environment as a comment when no earlier report has the same platform, framework and compiler and core versions), or to open it. Otherwise it files the issue with `gh`, when it is installed and signed in, or opens the repository's `--compiled` issue form, filled in, in the browser. The source lines around the location (three either side) are added only if you agree a second time; `--yes` never skips that question. In a terminal that cannot answer, it prints the report and the issue URL and sends nothing.
15
+
16
+ Each issue filed this way becomes a case in the compiler's tests (`packages/compiler/tests/diff/cases`), then a fix, and the generated table of what `--compiled` supports is updated.
17
+
18
+ ### Commands
19
+
20
+ Usage | Synopsis
21
+ ---|---
22
+ The last failed build | `$ ns compiled report [<Platform>]`
23
+ A runtime error | `$ ns compiled report <Platform> --error <file>`
24
+
25
+ ### Arguments
26
+
27
+ `<Platform>` is `ios` or `android`. Without it, the command reports the platform whose build failed last.
28
+
29
+ ### Options
30
+
31
+ * `--error <file>` - Reports the runtime error in `<file>`. `--error=-` reads it from stdin; stdin is then not a terminal, so the report and its URL are only printed.
32
+ * `--yes` - Sends the report without asking first. You are still asked before any of your code is included.
33
+ * `--dry-run` - Prints the title, labels, body and issue URL, and sends nothing.
34
+
35
+ <% if(isHtml) { %>
36
+
37
+ ### Related Commands
38
+
39
+ Command | Description
40
+ ----------|----------
41
+ [build](build.html) | Builds the project, `--compiled` to compile it to native code.
42
+ [compiled verify](compiled-verify.html) | Compares a compiled release with its JavaScript release.
43
+ <% } %>
@@ -0,0 +1,46 @@
1
+ <% if (isJekyll) { %>---
2
+ title: ns compiled verify
3
+ position: 20
4
+ ---<% } %>
5
+
6
+ # ns compiled verify
7
+
8
+ ### Description
9
+
10
+ Builds the project's JavaScript release and its compiled release (`--compiled`), runs both the same way on one iOS Simulator and compares them: a screenshot of each step, pixel by pixel, and whether either app stops running. Use it before shipping a compiled release.
11
+
12
+ The steps are the project's `verify.json`, when it has one. Each screen launches the app afresh; coordinates are points on the simulator's screen:
13
+
14
+ ```json
15
+ {
16
+ "screens": [
17
+ { "name": "home", "steps": [["shot", "start"], ["tap", 200, 400], ["wait", 1], ["type", "Ada"], ["shot", "typed"]] }
18
+ ]
19
+ }
20
+ ```
21
+
22
+ Steps: `shot <name>`, `tap <x> <y> [seconds held]`, `taps <x> <y> [count]`, `swipe <x> <y> <toX> <toY>`, `drag <x> <y> <toX> <toY> [seconds]`, `type <text>`, `wait <seconds>`, `openurl <url>`. Without `verify.json`, the app is compared once it settles after launch.
23
+
24
+ The screenshots and `report.json` are written to `platforms/compiled/verify`. The command fails when a screenshot differs or an app stops running.
25
+
26
+ <% if(isConsole && (isWindows || isLinux)) { %>WARNING: You can run this command only on macOS systems.<% } %>
27
+
28
+ ### Commands
29
+
30
+ Usage | Synopsis
31
+ ---|---
32
+ General | `$ ns compiled verify [ios]`
33
+
34
+ ### Prerequisites
35
+
36
+ * `@nativescript/compiler` as a devDependency of the project.
37
+ * Xcode with an iOS Simulator runtime.
38
+
39
+ <% if(isHtml) { %>
40
+
41
+ ### Related Commands
42
+
43
+ Command | Description
44
+ ----------|----------
45
+ [build ios](build-ios.html) | Builds the project for iOS, `--compiled` to compile it to native code.
46
+ <% } %>
@@ -17,7 +17,7 @@ When running this command without passing `--release` flag, the HMR (Hot Module
17
17
 
18
18
  Usage | Synopsis
19
19
  ---|---
20
- Run on all connected devices and running emulators | `$ ns run android [--key-store-path <File Path> --key-store-password <Password> --key-store-alias <Name> --key-store-alias-password <Password>] [--release] [--justlaunch] [--env.*]] [--aab]`
20
+ Run on all connected devices and running emulators | `$ ns run android [--key-store-path <File Path> --key-store-password <Password> --key-store-alias <Name> --key-store-alias-password <Password>] [--release [--compiled]] [--justlaunch] [--env.*]] [--aab]`
21
21
  Run on a selected connected device or running emulator. Will start emulator with specified `Device Identifier`, if not already running. | `$ ns run android --device <Device ID> [--key-store-path <File Path> --key-store-password <Password> --key-store-alias <Name> --key-store-alias-password <Password>] [--release] [--justlaunch] [--env.*]] [--aab]`
22
22
  Start a default emulator if none are running, or run application on all connected emulators. | `$ ns run android --emulator [--key-store-path <File Path> --key-store-password <Password> --key-store-alias <Name> --key-store-alias-password <Password>] [--release] [--justlaunch] [--env.*]] [--aab]`
23
23
 
@@ -29,6 +29,7 @@ Start a default emulator if none are running, or run application on all connecte
29
29
  * `--clean` - If set, forces the complete rebuild of the native application.
30
30
  * `--no-watch` - If set, changes in your code will not be reflected during the execution of this command.
31
31
  * `--release` - If set, produces a release build by running webpack in production mode and native build in release mode. Otherwise, produces a debug build. When set, you must also specify the --key-store-* options.
32
+ * `--compiled` - Compiles the release build to native code with `@nativescript/compiler` (a devDependency of the project): no JavaScript runtime in the app. Implies `--release`. Set `release: { compiled: true }` in `nativescript.config.ts` to make it the default for release builds, and `--no-compiled` to opt out for one build.
32
33
  * `--key-store-path` - Specifies the file path to the keystore file (P12) which you want to use to code sign your APK. You can use the `--key-store-*` options along with `--release` to produce a signed release build. You need to specify all `--key-store-*` options.
33
34
  * `--key-store-password` - Provides the password for the keystore file specified with `--key-store-path`. You can use the `--key-store-*` options along with `--release` to produce a signed release build. You need to specify all `--key-store-*` options.
34
35
  * `--key-store-alias` - Provides the alias for the keystore file specified with `--key-store-path`. You can use the `--key-store-*` options along with `--release` to produce a signed release build. You need to specify all `--key-store-*` options.
@@ -21,7 +21,7 @@ When running this command without passing `--release` flag, the HMR (Hot Module
21
21
 
22
22
  Usage | Synopsis
23
23
  ---|---
24
- Run on all connected devices | `$ ns run ios [--release] [--justlaunch] [--env.*]]`
24
+ Run on all connected devices | `$ ns run ios [--release [--compiled]] [--justlaunch] [--env.*]]`
25
25
  Run on a selected connected device. Will start simulator with specified `Device Identifier`, if not already running. | `$ ns run ios [--device <Device ID>] [--release] [--justlaunch] [--env.*]]`
26
26
  Start an emulator and run the app inside it | `$ ns run ios --emulator [--release] [--env.*]]`
27
27
  Start an emulator with specified device name and sdk | `$ ns run ios [--device <Device Name>] [--sdk <sdk>]`
@@ -36,6 +36,7 @@ Start an emulator with specified device identifier and sdk | `$ ns run ios [--de
36
36
  * `--clean` - If set, forces the complete rebuild of the native application.
37
37
  * `--no-watch` - If set, changes in your code will not be reflected during the execution of this command.
38
38
  * `--release` - If set, produces a release build by running webpack in production mode and native build in release mode. Otherwise, produces a debug build.
39
+ * `--compiled` - Compiles the release build to native code with `@nativescript/compiler` (a devDependency of the project): no JavaScript runtime in the app. Implies `--release`. Set `release: { compiled: true }` in `nativescript.config.ts` to make it the default for release builds, and `--no-compiled` to opt out for one build.
39
40
  * `--no-hmr` - Disables Hot Module Replacement (HMR). In this case, when a change in the code is applied, CLI will transfer the modified files and restart the application.
40
41
  * `--env.*` - Specifies additional flags that the bundler may process. Can be passed multiple times.
41
42
  * `--env.aot` - creates Ahead-Of-Time build (Angular only).
package/lib/bootstrap.js CHANGED
@@ -82,6 +82,8 @@ 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
84
  yok_1.injector.requireCommand("typings", "./commands/typings");
85
+ yok_1.injector.requireCommand("compiled|verify", "./commands/compiled-verify");
86
+ yok_1.injector.requireCommand("compiled|report", "./commands/compiled-report");
85
87
  yok_1.injector.requireCommand("preview", "./commands/preview");
86
88
  yok_1.injector.requireCommand("debug|ios", "./commands/debug");
87
89
  yok_1.injector.requireCommand("debug|android", "./commands/debug");
@@ -190,6 +192,8 @@ yok_1.injector.require("testInitializationService", "./services/test-initializat
190
192
  yok_1.injector.requirePublic("cleanupService", "./services/cleanup-service");
191
193
  yok_1.injector.require("bundlerCompilerService", "./services/bundler/bundler-compiler-service");
192
194
  yok_1.injector.require("viteHmrPortService", "./services/bundler/vite-hmr-port-service");
195
+ yok_1.injector.require("compiledReleaseService", "./services/compiled-release-service");
196
+ yok_1.injector.require("compiledReportService", "./services/compiled-report-service");
193
197
  yok_1.injector.require("applePortalSessionService", "./services/apple-portal/apple-portal-session-service");
194
198
  yok_1.injector.require("applePortalCookieService", "./services/apple-portal/apple-portal-cookie-service");
195
199
  yok_1.injector.require("applePortalApplicationService", "./services/apple-portal/apple-portal-application-service");
@@ -0,0 +1,40 @@
1
+ import { IErrors, IFileSystem, IOpener } from "../common/declarations";
2
+ import { ICommand, ICommandParameter } from "../common/definitions/commands";
3
+ import { IInjector } from "../common/definitions/yok";
4
+ import { OptionType } from "../common/enums";
5
+ import { IOptions } from "../declarations";
6
+ import { IProjectData } from "../definitions/project";
7
+ import { CompiledReportService } from "../services/compiled-report-service";
8
+ export declare class CompiledReportCommand implements ICommand {
9
+ private $compiledReportService;
10
+ private $errors;
11
+ private $fs;
12
+ private $injector;
13
+ private $logger;
14
+ private $opener;
15
+ private $options;
16
+ private $projectData;
17
+ private $prompter;
18
+ allowedParameters: ICommandParameter[];
19
+ dashedOptions: {
20
+ error: {
21
+ type: OptionType;
22
+ hasSensitiveValue: boolean;
23
+ };
24
+ yes: {
25
+ type: OptionType;
26
+ alias: string;
27
+ hasSensitiveValue: boolean;
28
+ };
29
+ };
30
+ constructor($compiledReportService: CompiledReportService, $errors: IErrors, $fs: IFileSystem, $injector: IInjector, $logger: ILogger, $opener: IOpener, $options: IOptions & {
31
+ error?: string;
32
+ yes?: boolean;
33
+ }, $projectData: IProjectData, $prompter: IPrompter);
34
+ execute(args: string[]): Promise<void>;
35
+ private readDraft;
36
+ private printReport;
37
+ private handleExisting;
38
+ private fileNew;
39
+ private writeFullBody;
40
+ }
@@ -0,0 +1,153 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CompiledReportCommand = void 0;
4
+ const fs = require("fs");
5
+ const command_params_1 = require("../common/command-params");
6
+ const enums_1 = require("../common/enums");
7
+ const helpers_1 = require("../common/helpers");
8
+ const yok_1 = require("../common/yok");
9
+ const compiled_report_service_1 = require("../services/compiled-report-service");
10
+ class CompiledReportCommand {
11
+ constructor($compiledReportService, $errors, $fs, $injector, $logger, $opener, $options, $projectData, $prompter) {
12
+ this.$compiledReportService = $compiledReportService;
13
+ this.$errors = $errors;
14
+ this.$fs = $fs;
15
+ this.$injector = $injector;
16
+ this.$logger = $logger;
17
+ this.$opener = $opener;
18
+ this.$options = $options;
19
+ this.$projectData = $projectData;
20
+ this.$prompter = $prompter;
21
+ this.allowedParameters = [
22
+ new command_params_1.StringCommandParameter(this.$injector),
23
+ ];
24
+ this.dashedOptions = {
25
+ error: { type: enums_1.OptionType.String, hasSensitiveValue: true },
26
+ yes: { type: enums_1.OptionType.Boolean, alias: "y", hasSensitiveValue: false },
27
+ };
28
+ }
29
+ async execute(args) {
30
+ var _a;
31
+ const platform = (_a = args[0]) === null || _a === void 0 ? void 0 : _a.toLowerCase();
32
+ if (platform && platform !== "ios" && platform !== "android") {
33
+ this.$errors.fail(`ns compiled report takes ios or android, not ${args[0]}.`);
34
+ }
35
+ this.$projectData.initializeProjectData();
36
+ const draft = this.readDraft(platform);
37
+ const report = await this.$compiledReportService.createReport(this.$projectData, draft);
38
+ const body = this.$compiledReportService.formatBody(report, false);
39
+ const { url, truncated } = (0, compiled_report_service_1.newIssueUrl)(report.title, this.$compiledReportService.formFields(report, false), report.labels);
40
+ this.printReport(report, body);
41
+ if (report.code) {
42
+ this.$logger.info(`The code at ${report.location.file}:${report.location.line} is not in the report; you would be asked separately before it is added.`);
43
+ }
44
+ if (this.$options.dryRun || !(0, helpers_1.isInteractive)()) {
45
+ this.$logger.info(`\nNew issue URL${truncated ? " (body cut to fit)" : ""}:\n${url}`);
46
+ this.$logger.info(this.$options.dryRun
47
+ ? "Dry run: nothing was sent."
48
+ : "Nothing was sent: run 'ns compiled report' in a terminal to send it, or open the URL above.");
49
+ return;
50
+ }
51
+ if (!this.$options.yes &&
52
+ !(await this.$prompter.confirm(`Search github.com/${compiled_report_service_1.ISSUES_REPO} for this signature and, if it is new, file it?`, () => false))) {
53
+ this.$logger.info("Nothing was sent.");
54
+ return;
55
+ }
56
+ const useGh = await this.$compiledReportService.hasGh();
57
+ const found = await this.$compiledReportService.findIssues(report.signature, useGh);
58
+ if (found === null) {
59
+ this.$logger.warn("Could not search GitHub for existing issues (offline?).");
60
+ }
61
+ if (found === null || found === void 0 ? void 0 : found.length) {
62
+ await this.handleExisting(report, found, useGh);
63
+ return;
64
+ }
65
+ await this.fileNew(report, useGh);
66
+ }
67
+ readDraft(platform) {
68
+ const errorSource = this.$options.error;
69
+ if (errorSource !== undefined) {
70
+ if (!platform) {
71
+ this.$errors.fail("Name the platform the error came from: ns compiled report ios|android --error <file>.");
72
+ }
73
+ const output = errorSource === "-"
74
+ ? fs.readFileSync(0, "utf8")
75
+ : this.$fs.exists(errorSource)
76
+ ? this.$fs.readText(errorSource)
77
+ : null;
78
+ if (output === null) {
79
+ this.$errors.fail(`No file ${errorSource}.`);
80
+ }
81
+ return {
82
+ kind: "runtime",
83
+ platform,
84
+ createdAt: new Date().toISOString(),
85
+ output,
86
+ };
87
+ }
88
+ const draft = this.$compiledReportService.loadDraft(this.$projectData, platform);
89
+ if (!draft) {
90
+ this.$errors.fail(`No failed --compiled build${platform ? ` for ${platform}` : ""} to report. ` +
91
+ "Build with --compiled first, or pass a runtime error with --error <file>.");
92
+ }
93
+ return draft;
94
+ }
95
+ printReport(report, body) {
96
+ this.$logger.info([
97
+ `Title: ${report.title}`,
98
+ `Labels: ${report.labels.join(", ")}`,
99
+ "----- body -----",
100
+ body,
101
+ "----------------",
102
+ ].join("\n"));
103
+ }
104
+ async handleExisting(report, found, useGh) {
105
+ var _a;
106
+ this.$logger.info(`Already reported:\n${found.map((issue) => ` #${issue.number} (${issue.state.toLowerCase()}) ${issue.title}\n ${issue.url}`).join("\n")}`);
107
+ const issue = (_a = found.find((i) => i.state.toLowerCase() === "open")) !== null && _a !== void 0 ? _a : found[0];
108
+ const plusOne = `Add a 👍 to #${issue.number}, and your environment (no code) if no earlier report has it`;
109
+ const open = `Open #${issue.number} in the browser`;
110
+ const choice = await this.$prompter.promptForChoice("What next?", [
111
+ ...(useGh ? [plusOne] : []),
112
+ open,
113
+ "Nothing",
114
+ ]);
115
+ if (choice === plusOne) {
116
+ const { reacted, commented } = await this.$compiledReportService.plusOne(this.$projectData, report, issue);
117
+ if (reacted || commented) {
118
+ this.$logger.info(`${commented ? "Added your environment" : "Added a 👍"} to ${issue.url}. Thank you.`);
119
+ }
120
+ }
121
+ else if (choice === open) {
122
+ this.$opener.open(issue.url);
123
+ }
124
+ }
125
+ async fileNew(report, useGh) {
126
+ let includeCode = false;
127
+ if (report.code) {
128
+ this.$logger.info(`\n${report.location.file}:\n${report.code}`);
129
+ includeCode = await this.$prompter.confirm(`Include these lines of ${report.location.file} in the public issue?`, () => false);
130
+ }
131
+ const body = this.$compiledReportService.formatBody(report, includeCode);
132
+ const created = useGh
133
+ ? await this.$compiledReportService.createIssue(this.$projectData, report, body)
134
+ : null;
135
+ if (created) {
136
+ this.$logger.info(`Filed ${created}. Thank you.`);
137
+ return;
138
+ }
139
+ const { url, truncated } = (0, compiled_report_service_1.newIssueUrl)(report.title, this.$compiledReportService.formFields(report, includeCode), report.labels);
140
+ this.$logger.info(`Opening a prefilled issue in the browser:\n${url}`);
141
+ if (truncated) {
142
+ this.$logger.warn(`Some fields were cut to fit the URL; paste the rest from ${this.writeFullBody(report, body)}.`);
143
+ }
144
+ this.$opener.open(url);
145
+ }
146
+ writeFullBody(report, body) {
147
+ const file = `${this.$compiledReportService.getReportDir(this.$projectData, report.platform)}/report.md`;
148
+ this.$fs.writeFile(file, body);
149
+ return file;
150
+ }
151
+ }
152
+ exports.CompiledReportCommand = CompiledReportCommand;
153
+ yok_1.injector.registerCommand("compiled|report", CompiledReportCommand);
@@ -0,0 +1,16 @@
1
+ import { IChildProcess, IErrors, IFileSystem } from "../common/declarations";
2
+ import { ICommand, ICommandParameter } from "../common/definitions/commands";
3
+ import { IProjectData } from "../definitions/project";
4
+ import { CompiledReleaseService } from "../services/compiled-release-service";
5
+ export declare class CompiledVerifyCommand implements ICommand {
6
+ private $childProcess;
7
+ private $compiledReleaseService;
8
+ private $errors;
9
+ private $fs;
10
+ private $logger;
11
+ private $projectData;
12
+ allowedParameters: ICommandParameter[];
13
+ constructor($childProcess: IChildProcess, $compiledReleaseService: CompiledReleaseService, $errors: IErrors, $fs: IFileSystem, $logger: ILogger, $projectData: IProjectData);
14
+ execute(args: string[]): Promise<void>;
15
+ private findApp;
16
+ }
@@ -0,0 +1,53 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CompiledVerifyCommand = void 0;
4
+ const path = require("path");
5
+ const yok_1 = require("../common/yok");
6
+ class CompiledVerifyCommand {
7
+ constructor($childProcess, $compiledReleaseService, $errors, $fs, $logger, $projectData) {
8
+ this.$childProcess = $childProcess;
9
+ this.$compiledReleaseService = $compiledReleaseService;
10
+ this.$errors = $errors;
11
+ this.$fs = $fs;
12
+ this.$logger = $logger;
13
+ this.$projectData = $projectData;
14
+ this.allowedParameters = [];
15
+ }
16
+ async execute(args) {
17
+ var _a;
18
+ const platform = ((_a = args[0]) !== null && _a !== void 0 ? _a : "ios").toLowerCase();
19
+ if (platform !== "ios") {
20
+ this.$errors.fail("ns compiled verify compares iOS builds; Android is to follow.");
21
+ }
22
+ this.$projectData.initializeProjectData();
23
+ const projectDir = this.$projectData.projectDir;
24
+ const cli = process.argv[1];
25
+ const ns = (...buildArgs) => this.$childProcess.spawnFromEvent(process.execPath, [cli, "build", "ios", ...buildArgs], "close", { cwd: projectDir, stdio: "inherit" });
26
+ this.$logger.info("Building the JavaScript release...");
27
+ await ns("--release", "--no-compiled");
28
+ this.$logger.info("Building the compiled release...");
29
+ await ns("--compiled");
30
+ const js = this.findApp(path.join(this.$projectData.platformsDir, "ios", "build", "Release-iphonesimulator"));
31
+ const compiled = this.findApp(path.join(this.$projectData.platformsDir, "compiled", "ios", "DerivedData", "Build", "Products", "Release-iphonesimulator"));
32
+ const steps = path.join(projectDir, "verify.json");
33
+ const out = path.join(this.$projectData.platformsDir, "compiled", "verify");
34
+ const verify = this.$compiledReleaseService.getCompilerBin(this.$projectData, "ns-compiled-verify");
35
+ try {
36
+ await this.$childProcess.spawnFromEvent(process.execPath, [verify, "--js", js, "--compiled", compiled, "--out", out, ...(this.$fs.exists(steps) ? ["--steps", steps] : [])], "close", { cwd: projectDir, stdio: "inherit" });
37
+ }
38
+ catch (_b) {
39
+ this.$errors.fail(`The compiled release differs from its JavaScript release: see ${out}`);
40
+ }
41
+ }
42
+ findApp(dir) {
43
+ const app = this.$fs.exists(dir)
44
+ ? this.$fs.readDirectory(dir).find((f) => f.endsWith(".app"))
45
+ : undefined;
46
+ if (!app) {
47
+ this.$errors.fail(`No simulator build in ${dir}.`);
48
+ }
49
+ return path.join(dir, app);
50
+ }
51
+ }
52
+ exports.CompiledVerifyCommand = CompiledVerifyCommand;
53
+ yok_1.injector.registerCommand("compiled|verify", CompiledVerifyCommand);
@@ -1,10 +1,4 @@
1
1
  "use strict";
2
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
- return c > 3 && r && Object.defineProperty(target, key, r), r;
7
- };
8
2
  Object.defineProperty(exports, "__esModule", { value: true });
9
3
  exports.HooksService = void 0;
10
4
  const path = require("path");
@@ -17,7 +11,6 @@ const inject_1 = require("../di/inject");
17
11
  const constants_1 = require("../../constants");
18
12
  const yok_1 = require("../yok");
19
13
  const color_1 = require("../../color");
20
- const decorators_1 = require("../decorators");
21
14
  class Hook {
22
15
  constructor(name, fullPath) {
23
16
  this.name = name;
@@ -42,12 +35,15 @@ class HooksService {
42
35
  return "hookArgs";
43
36
  }
44
37
  initialize(projectDir) {
45
- this.cachedHooks = {};
46
- this.hooksDirectories = [];
47
38
  projectDir = projectDir || this.$projectHelper.projectDir;
48
- if (projectDir) {
49
- this.hooksDirectories.push(path.join(projectDir, HooksService.HOOKS_DIRECTORY_NAME));
39
+ const hooksDirectories = projectDir
40
+ ? [path.join(projectDir, HooksService.HOOKS_DIRECTORY_NAME)]
41
+ : [];
42
+ if (_.isEqual(hooksDirectories, this.hooksDirectories)) {
43
+ return;
50
44
  }
45
+ this.cachedHooks = {};
46
+ this.hooksDirectories = hooksDirectories;
51
47
  this.$logger.trace("Hooks directories: " + util.inspect(this.hooksDirectories));
52
48
  const customHooks = this.$projectConfigService.getValue("hooks", []);
53
49
  if (customHooks.length) {
@@ -369,11 +365,4 @@ class HooksService {
369
365
  }
370
366
  exports.HooksService = HooksService;
371
367
  HooksService.HOOKS_DIRECTORY_NAME = "hooks";
372
- __decorate([
373
- (0, decorators_1.memoize)({
374
- shouldCache() {
375
- return !!this.hooksDirectories.length;
376
- },
377
- })
378
- ], HooksService.prototype, "initialize", null);
379
368
  yok_1.injector.register("hooksService", HooksService);
@@ -11,6 +11,7 @@ export declare const SCOPED_TNS_CORE_MODULES = "@nativescript/core";
11
11
  export declare const TNS_CORE_THEME_NAME = "nativescript-theme-core";
12
12
  export declare const SCOPED_TNS_CORE_THEME_NAME = "@nativescript/theme";
13
13
  export declare const WEBPACK_PLUGIN_NAME = "@nativescript/webpack";
14
+ export declare const COMPILER_PACKAGE_NAME = "@nativescript/compiler";
14
15
  export declare const RSPACK_PLUGIN_NAME = "@nativescript/rspack";
15
16
  export declare const VITE_DIST_FOLDER_NAME = ".ns-vite-build";
16
17
  export declare const TNS_CORE_MODULES_WIDGETS_NAME = "tns-core-modules-widgets";
package/lib/constants.js CHANGED
@@ -1,9 +1,9 @@
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_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
- 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_BUILD_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
- exports.IOSDeviceTargets = exports.RunOnDeviceEvents = exports.AndroidAppBundleMessages = exports.AndroidBundleValidatorMessages = exports.BundleValidatorMessages = exports.IosProjectConstants = exports.EXTENSION_PROVISIONING_FILENAME = exports.PODFILE_NAME = exports.PlatformTypes = 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.BuildStates = exports.AnalyticsEventLabelDelimiter = exports.TrackActionNames = exports.DebugTools = exports.NativePlatformStatus = exports.ShouldMigrate = 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.BUNDLETOOL_PATH_ENV_VAR = exports.BUNDLETOOL_RELEASES_URL = exports.BUNDLETOOL_SHA256 = exports.BUNDLETOOL_VERSION = exports.BUNDLETOOL_CACHE_DIRNAME = 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 = exports.JsFlavorName = void 0;
6
- exports.BuildNames = exports.PackageManagers = exports.EMIT_APPENDER_EVENT_NAME = exports.LoggerConfigData = exports.LoggerLevel = exports.DeviceConnectionType = exports.LoggerAppenders = exports.IOSNativeTargetTypes = exports.IOSNativeTargetProductTypes = void 0;
3
+ 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.COMPILER_PACKAGE_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
+ 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_BUILD_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 = exports.INCLUDE_GRADLE_NAME = void 0;
5
+ exports.RunOnDeviceEvents = exports.AndroidAppBundleMessages = exports.AndroidBundleValidatorMessages = exports.BundleValidatorMessages = exports.IosProjectConstants = exports.EXTENSION_PROVISIONING_FILENAME = exports.PODFILE_NAME = exports.PlatformTypes = 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.BuildStates = exports.AnalyticsEventLabelDelimiter = exports.TrackActionNames = exports.DebugTools = exports.NativePlatformStatus = exports.ShouldMigrate = 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.BUNDLETOOL_PATH_ENV_VAR = exports.BUNDLETOOL_RELEASES_URL = exports.BUNDLETOOL_SHA256 = exports.BUNDLETOOL_VERSION = exports.BUNDLETOOL_CACHE_DIRNAME = 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 = exports.JsFlavorName = exports.TsFlavorName = void 0;
6
+ exports.BuildNames = exports.PackageManagers = exports.EMIT_APPENDER_EVENT_NAME = exports.LoggerConfigData = exports.LoggerLevel = exports.DeviceConnectionType = exports.LoggerAppenders = exports.IOSNativeTargetTypes = exports.IOSNativeTargetProductTypes = exports.IOSDeviceTargets = void 0;
7
7
  const path_1 = require("path");
8
8
  exports.APP_FOLDER_NAME = "app";
9
9
  exports.APP_RESOURCES_FOLDER_NAME = "App_Resources";
@@ -17,6 +17,7 @@ exports.SCOPED_TNS_CORE_MODULES = "@nativescript/core";
17
17
  exports.TNS_CORE_THEME_NAME = "nativescript-theme-core";
18
18
  exports.SCOPED_TNS_CORE_THEME_NAME = "@nativescript/theme";
19
19
  exports.WEBPACK_PLUGIN_NAME = "@nativescript/webpack";
20
+ exports.COMPILER_PACKAGE_NAME = "@nativescript/compiler";
20
21
  exports.RSPACK_PLUGIN_NAME = "@nativescript/rspack";
21
22
  exports.VITE_DIST_FOLDER_NAME = ".ns-vite-build";
22
23
  exports.TNS_CORE_MODULES_WIDGETS_NAME = "tns-core-modules-widgets";
@@ -3,6 +3,7 @@ import { IProjectDataService } from "../definitions/project";
3
3
  import { IBuildController, IBuildArtifactsService, IBuildInfoFileService, IBuildData } from "../definitions/build";
4
4
  import { IAnalyticsService, IFileSystem } from "../common/declarations";
5
5
  import { IInjector } from "../common/definitions/yok";
6
+ import { CompiledReleaseService } from "../services/compiled-release-service";
6
7
  export declare class BuildController extends EventEmitter implements IBuildController {
7
8
  private $analyticsService;
8
9
  private $buildArtifactsService;
@@ -14,10 +15,12 @@ export declare class BuildController extends EventEmitter implements IBuildContr
14
15
  private $projectDataService;
15
16
  private $projectChangesService;
16
17
  private $prepareController;
17
- constructor($analyticsService: IAnalyticsService, $buildArtifactsService: IBuildArtifactsService, $buildInfoFileService: IBuildInfoFileService, $fs: IFileSystem, $logger: ILogger, $injector: IInjector, $mobileHelper: Mobile.IMobileHelper, $projectDataService: IProjectDataService, $projectChangesService: IProjectChangesService, $prepareController: IPrepareController);
18
+ private $compiledReleaseService;
19
+ constructor($analyticsService: IAnalyticsService, $buildArtifactsService: IBuildArtifactsService, $buildInfoFileService: IBuildInfoFileService, $fs: IFileSystem, $logger: ILogger, $injector: IInjector, $mobileHelper: Mobile.IMobileHelper, $projectDataService: IProjectDataService, $projectChangesService: IProjectChangesService, $prepareController: IPrepareController, $compiledReleaseService: CompiledReleaseService);
18
20
  private get $platformsDataService();
19
21
  prepareAndBuild(buildData: IBuildData): Promise<string>;
20
22
  build(buildData: IBuildData): Promise<string>;
23
+ private logBuildTime;
21
24
  buildIfNeeded(buildData: IBuildData): Promise<string>;
22
25
  shouldBuild(buildData: IBuildData): Promise<boolean>;
23
26
  }