nativescript 9.0.0-alpha.0 → 9.0.0-alpha.10
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.
- package/config/test-deps-versions-generated.json +16 -1
- package/lib/.d.ts +3 -3
- package/lib/bootstrap.js +1 -1
- package/lib/color.js +38 -7
- package/lib/commands/clean.js +1 -2
- package/lib/commands/embedding/embed.js +1 -1
- package/lib/commands/post-install.js +2 -2
- package/lib/commands/typings.js +12 -12
- package/lib/common/header.js +3 -3
- package/lib/common/logger/layouts/cli-layout.js +1 -1
- package/lib/common/logger/logger.js +2 -2
- package/lib/common/mobile/android/android-emulator-services.js +9 -7
- package/lib/common/mobile/device-log-provider.js +3 -4
- package/lib/common/mobile/emulator-helper.js +1 -0
- package/lib/common/services/hooks-service.js +23 -6
- package/lib/common/verify-node-version.js +1 -1
- package/lib/constants.js +6 -4
- package/lib/controllers/migrate-controller.js +3 -4
- package/lib/controllers/prepare-controller.js +9 -9
- package/lib/definitions/project.d.ts +19 -1
- package/lib/definitions/temp-service.d.ts +6 -2
- package/lib/helpers/key-command-helper.js +2 -1
- package/lib/project-data.js +10 -4
- package/lib/services/analytics-settings-service.js +2 -1
- package/lib/services/bundler/bundler-compiler-service.js +641 -0
- package/lib/services/bundler/bundler.js +2 -0
- package/lib/services/ios/spm-service.js +1 -1
- package/lib/services/livesync/android-livesync-tool.js +3 -1
- package/lib/services/temp-service.js +16 -4
- package/package.json +28 -33
- package/vendor/gradle-plugin/build.gradle +3 -3
- package/lib/services/webpack/webpack-compiler-service.js +0 -396
- package/lib/services/webpack/webpack.d.ts +0 -226
|
@@ -1 +1,16 @@
|
|
|
1
|
-
{
|
|
1
|
+
{
|
|
2
|
+
"@jsdevtools/coverage-istanbul-loader": "3.0.5",
|
|
3
|
+
"karma": "6.4.4",
|
|
4
|
+
"karma-coverage": "2.2.1",
|
|
5
|
+
"karma-nativescript-launcher": "1.0.0",
|
|
6
|
+
"mocha": "11.7.2",
|
|
7
|
+
"karma-mocha": "2.0.1",
|
|
8
|
+
"karma-chai": "0.1.0",
|
|
9
|
+
"karma-jasmine": "4.0.2",
|
|
10
|
+
"karma-qunit": "4.2.1",
|
|
11
|
+
"@types/karma-chai": "0.1.7",
|
|
12
|
+
"@types/mocha": "10.0.10",
|
|
13
|
+
"@types/jasmine": "5.1.9",
|
|
14
|
+
"@types/qunit": "2.19.13",
|
|
15
|
+
"nyc": "17.1.0"
|
|
16
|
+
}
|
package/lib/.d.ts
CHANGED
|
@@ -344,6 +344,8 @@
|
|
|
344
344
|
/// <reference path="services/build-artifacts-service.ts" />
|
|
345
345
|
/// <reference path="services/build-data-service.ts" />
|
|
346
346
|
/// <reference path="services/build-info-file-service.ts" />
|
|
347
|
+
/// <reference path="services/bundler/bundler-compiler-service.ts" />
|
|
348
|
+
/// <reference path="services/bundler/bundler.ts" />
|
|
347
349
|
/// <reference path="services/cleanup-service.ts" />
|
|
348
350
|
/// <reference path="services/cocoapods-platform-manager.ts" />
|
|
349
351
|
/// <reference path="services/cocoapods-service.ts" />
|
|
@@ -419,8 +421,6 @@
|
|
|
419
421
|
/// <reference path="services/user-settings-service.ts" />
|
|
420
422
|
/// <reference path="services/versions-service.ts" />
|
|
421
423
|
/// <reference path="services/watch-ignore-list-service.ts" />
|
|
422
|
-
/// <reference path="services/webpack/webpack-compiler-service.ts" />
|
|
423
|
-
/// <reference path="services/webpack/webpack.d.ts" />
|
|
424
424
|
/// <reference path="services/xcconfig-service.ts" />
|
|
425
425
|
/// <reference path="services/xcproj-service.ts" />
|
|
426
426
|
/// <reference path="shared-event-bus.ts" />
|
|
@@ -465,6 +465,7 @@
|
|
|
465
465
|
/// <reference path="../test/services/android-plugin-build-service.ts" />
|
|
466
466
|
/// <reference path="../test/services/android-project-service.ts" />
|
|
467
467
|
/// <reference path="../test/services/android/gradle-build-args-service.ts" />
|
|
468
|
+
/// <reference path="../test/services/bundler/bundler-compiler-service.ts" />
|
|
468
469
|
/// <reference path="../test/services/doctor-service.ts" />
|
|
469
470
|
/// <reference path="../test/services/extensibility-service.ts" />
|
|
470
471
|
/// <reference path="../test/services/ios-debugger-port-service.ts" />
|
|
@@ -487,7 +488,6 @@
|
|
|
487
488
|
/// <reference path="../test/services/project-data-service.ts" />
|
|
488
489
|
/// <reference path="../test/services/test-execution-service.ts" />
|
|
489
490
|
/// <reference path="../test/services/user-settings-service.ts" />
|
|
490
|
-
/// <reference path="../test/services/webpack/webpack-compiler-service.ts" />
|
|
491
491
|
/// <reference path="../test/stubs.ts" />
|
|
492
492
|
/// <reference path="../test/sys-info.ts" />
|
|
493
493
|
/// <reference path="../test/test-bootstrap.ts" />
|
package/lib/bootstrap.js
CHANGED
|
@@ -185,7 +185,7 @@ yok_1.injector.require("qrCodeTerminalService", "./services/qr-code-terminal-ser
|
|
|
185
185
|
yok_1.injector.require("testInitializationService", "./services/test-initialization-service");
|
|
186
186
|
yok_1.injector.require("networkConnectivityValidator", "./helpers/network-connectivity-validator");
|
|
187
187
|
yok_1.injector.requirePublic("cleanupService", "./services/cleanup-service");
|
|
188
|
-
yok_1.injector.require("
|
|
188
|
+
yok_1.injector.require("bundlerCompilerService", "./services/bundler/bundler-compiler-service");
|
|
189
189
|
yok_1.injector.require("applePortalSessionService", "./services/apple-portal/apple-portal-session-service");
|
|
190
190
|
yok_1.injector.require("applePortalCookieService", "./services/apple-portal/apple-portal-cookie-service");
|
|
191
191
|
yok_1.injector.require("applePortalApplicationService", "./services/apple-portal/apple-portal-application-service");
|
package/lib/color.js
CHANGED
|
@@ -1,10 +1,41 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.color = void 0;
|
|
3
|
+
exports.stripColors = exports.color = void 0;
|
|
4
|
+
const node_util_1 = require("node:util");
|
|
5
|
+
exports.color = {
|
|
6
|
+
reset: (text) => (0, node_util_1.styleText)("reset", text),
|
|
7
|
+
bold: (text) => (0, node_util_1.styleText)("bold", text),
|
|
8
|
+
dim: (text) => (0, node_util_1.styleText)("dim", text),
|
|
9
|
+
italic: (text) => (0, node_util_1.styleText)("italic", text),
|
|
10
|
+
underline: (text) => (0, node_util_1.styleText)("underline", text),
|
|
11
|
+
inverse: (text) => (0, node_util_1.styleText)("inverse", text),
|
|
12
|
+
hidden: (text) => (0, node_util_1.styleText)("hidden", text),
|
|
13
|
+
strikethrough: (text) => (0, node_util_1.styleText)("strikethrough", text),
|
|
14
|
+
black: (text) => (0, node_util_1.styleText)("black", text),
|
|
15
|
+
red: (text) => (0, node_util_1.styleText)("red", text),
|
|
16
|
+
blue: (text) => (0, node_util_1.styleText)("blue", text),
|
|
17
|
+
magenta: (text) => (0, node_util_1.styleText)("magenta", text),
|
|
18
|
+
cyan: (text) => (0, node_util_1.styleText)("cyan", text),
|
|
19
|
+
white: (text) => (0, node_util_1.styleText)("white", text),
|
|
20
|
+
gray: (text) => (0, node_util_1.styleText)("gray", text),
|
|
21
|
+
yellow: (text) => (0, node_util_1.styleText)("yellow", text),
|
|
22
|
+
green: (text) => (0, node_util_1.styleText)("green", text),
|
|
23
|
+
grey: (text) => (0, node_util_1.styleText)("grey", text),
|
|
24
|
+
bgBlack: (text) => (0, node_util_1.styleText)("bgBlack", text),
|
|
25
|
+
bgBlackBright: (text) => (0, node_util_1.styleText)("bgBlackBright", text),
|
|
26
|
+
bgRed: (text) => (0, node_util_1.styleText)("bgRed", text),
|
|
27
|
+
bgGreen: (text) => (0, node_util_1.styleText)("bgGreen", text),
|
|
28
|
+
bgYellow: (text) => (0, node_util_1.styleText)("bgYellow", text),
|
|
29
|
+
bgBlue: (text) => (0, node_util_1.styleText)("bgBlue", text),
|
|
30
|
+
bgMagenta: (text) => (0, node_util_1.styleText)("bgMagenta", text),
|
|
31
|
+
bgCyan: (text) => (0, node_util_1.styleText)("bgCyan", text),
|
|
32
|
+
bgWhite: (text) => (0, node_util_1.styleText)("bgWhite", text),
|
|
33
|
+
cyanBright: (text) => (0, node_util_1.styleText)("cyanBright", text),
|
|
34
|
+
whiteBright: (text) => (0, node_util_1.styleText)("whiteBright", text),
|
|
35
|
+
greenBright: (text) => (0, node_util_1.styleText)("greenBright", text),
|
|
36
|
+
yellowBright: (text) => (0, node_util_1.styleText)("yellowBright", text),
|
|
37
|
+
redBright: (text) => (0, node_util_1.styleText)("redBright", text),
|
|
38
|
+
styleText: node_util_1.styleText,
|
|
39
|
+
};
|
|
40
|
+
const stripColors = (text) => (0, node_util_1.stripVTControlCharacters)(text);
|
|
4
41
|
exports.stripColors = stripColors;
|
|
5
|
-
const ansi = require("ansi-colors");
|
|
6
|
-
const chalk = require("chalk");
|
|
7
|
-
function stripColors(formatStr) {
|
|
8
|
-
return ansi.stripColor(formatStr);
|
|
9
|
-
}
|
|
10
|
-
exports.color = chalk;
|
package/lib/commands/clean.js
CHANGED
|
@@ -69,7 +69,6 @@ class CleanCommand {
|
|
|
69
69
|
constants.HOOKS_DIR_NAME,
|
|
70
70
|
constants.PLATFORMS_DIR_NAME,
|
|
71
71
|
constants.NODE_MODULES_FOLDER_NAME,
|
|
72
|
-
constants.PACKAGE_LOCK_JSON_FILE_NAME,
|
|
73
72
|
];
|
|
74
73
|
try {
|
|
75
74
|
const overridePathsToClean = this.$projectConfigService.getValue("cli.pathsToClean");
|
|
@@ -166,7 +165,7 @@ class CleanCommand {
|
|
|
166
165
|
optionsPerPage: process.stdout.rows - 6,
|
|
167
166
|
});
|
|
168
167
|
this.$logger.clearScreen();
|
|
169
|
-
spinner.warn(`This will run "${color_1.color.yellow(`ns clean`)}" in all the selected projects and ${color_1.color.red
|
|
168
|
+
spinner.warn(`This will run "${color_1.color.yellow(`ns clean`)}" in all the selected projects and ${color_1.color.styleText(["red", "bold"], "delete files from your system")}!`);
|
|
170
169
|
spinner.warn(`This action cannot be undone!`);
|
|
171
170
|
let confirmed = await this.$prompter.confirm("Are you sure you want to clean the selected projects?");
|
|
172
171
|
if (!confirmed) {
|
|
@@ -31,7 +31,7 @@ class EmbedCommand extends prepare_1.PrepareCommand {
|
|
|
31
31
|
const hostProjectPath = args[1];
|
|
32
32
|
const resolvedHostProjectPath = this.resolveHostProjectPath(hostProjectPath);
|
|
33
33
|
if (!this.$fs.exists(resolvedHostProjectPath)) {
|
|
34
|
-
this.$logger.error(`The host project path ${color_1.color.yellow(hostProjectPath)} (resolved to: ${color_1.color.yellow
|
|
34
|
+
this.$logger.error(`The host project path ${color_1.color.yellow(hostProjectPath)} (resolved to: ${color_1.color.styleText(["yellow", "dim"], resolvedHostProjectPath)}) does not exist.`);
|
|
35
35
|
return;
|
|
36
36
|
}
|
|
37
37
|
this.$options["hostProjectPath"] = resolvedHostProjectPath;
|
|
@@ -32,10 +32,10 @@ class PostInstallCliCommand {
|
|
|
32
32
|
}
|
|
33
33
|
async postCommandAction(args) {
|
|
34
34
|
this.$logger.info("");
|
|
35
|
-
this.$logger.info(color_1.color.green
|
|
35
|
+
this.$logger.info(color_1.color.styleText(["green", "bold"], "You have successfully installed the NativeScript CLI!"));
|
|
36
36
|
this.$logger.info("");
|
|
37
37
|
this.$logger.info("Your next step is to create a new project:");
|
|
38
|
-
this.$logger.info(color_1.color.green
|
|
38
|
+
this.$logger.info(color_1.color.styleText(["green", "bold"], "ns create"));
|
|
39
39
|
this.$logger.info("");
|
|
40
40
|
this.$logger.printMarkdown("If you have any questions, check Stack Overflow: `https://stackoverflow.com/questions/tagged/nativescript` and our public Discord channel: `https://nativescript.org/discord`");
|
|
41
41
|
}
|
package/lib/commands/typings.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.TypingsCommand = void 0;
|
|
4
|
-
const
|
|
4
|
+
const promises_1 = require("node:fs/promises");
|
|
5
5
|
const os_1 = require("os");
|
|
6
6
|
const path = require("path");
|
|
7
7
|
const color_1 = require("../color");
|
|
@@ -51,16 +51,12 @@ class TypingsCommand {
|
|
|
51
51
|
return;
|
|
52
52
|
}
|
|
53
53
|
const pattern = `${target.replaceAll(":", "/")}/**/*.{jar,aar}`;
|
|
54
|
-
const
|
|
54
|
+
const items = [];
|
|
55
|
+
for await (const item of (0, promises_1.glob)(pattern, {
|
|
55
56
|
cwd: gradleFiles,
|
|
56
|
-
})
|
|
57
|
-
if (!res || res.length === 0) {
|
|
58
|
-
this.$logger.warn("No files found");
|
|
59
|
-
return [];
|
|
60
|
-
}
|
|
61
|
-
const items = res.map((item) => {
|
|
57
|
+
})) {
|
|
62
58
|
const [group, artifact, version, sha1, file] = item.split(path.sep);
|
|
63
|
-
|
|
59
|
+
items.push({
|
|
64
60
|
id: sha1 + version,
|
|
65
61
|
group,
|
|
66
62
|
artifact,
|
|
@@ -68,8 +64,12 @@ class TypingsCommand {
|
|
|
68
64
|
sha1,
|
|
69
65
|
file,
|
|
70
66
|
path: path.resolve(gradleFiles, item),
|
|
71
|
-
};
|
|
72
|
-
}
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
if (items.length === 0) {
|
|
70
|
+
this.$logger.warn("No files found");
|
|
71
|
+
return [];
|
|
72
|
+
}
|
|
73
73
|
this.$logger.clearScreen();
|
|
74
74
|
const choices = await this.$prompter.promptForChoice(`Select dependencies to generate typings for (${color_1.color.greenBright(target)})`, items
|
|
75
75
|
.sort((a, b) => {
|
|
@@ -84,7 +84,7 @@ class TypingsCommand {
|
|
|
84
84
|
})
|
|
85
85
|
.map((item) => {
|
|
86
86
|
return {
|
|
87
|
-
title: `${color_1.color.white(item.group)}:${color_1.color.greenBright(item.artifact)}:${color_1.color.yellow(item.version)} - ${color_1.color.cyanBright
|
|
87
|
+
title: `${color_1.color.white(item.group)}:${color_1.color.greenBright(item.artifact)}:${color_1.color.yellow(item.version)} - ${color_1.color.styleText(["cyanBright", "bold"], item.file)}`,
|
|
88
88
|
value: item.id,
|
|
89
89
|
};
|
|
90
90
|
}), true, {
|
package/lib/common/header.js
CHANGED
|
@@ -10,14 +10,14 @@ function printHeader() {
|
|
|
10
10
|
const version = $staticConfig.version;
|
|
11
11
|
const header = [
|
|
12
12
|
color_1.color.dim("│ "),
|
|
13
|
-
color_1.color.cyanBright
|
|
14
|
-
color_1.color.whiteBright
|
|
13
|
+
color_1.color.styleText(["cyanBright", "bold"], "{N} NativeScript "),
|
|
14
|
+
color_1.color.styleText(["whiteBright", "bold"], "CLI"),
|
|
15
15
|
color_1.color.dim(` [v${version}] `),
|
|
16
16
|
].join("");
|
|
17
17
|
const tagLine = [
|
|
18
18
|
color_1.color.dim("│ "),
|
|
19
19
|
color_1.color.dim(" → "),
|
|
20
|
-
color_1.color.whiteBright
|
|
20
|
+
color_1.color.styleText(["whiteBright", "bold"], "Empower JavaScript with native APIs "),
|
|
21
21
|
].join("");
|
|
22
22
|
const headerLength = (0, color_1.stripColors)(header).length;
|
|
23
23
|
const tagLineLength = (0, color_1.stripColors)(tagLine).length;
|
|
@@ -19,7 +19,7 @@ function layout(config) {
|
|
|
19
19
|
return msg;
|
|
20
20
|
}
|
|
21
21
|
if (logEvent.level.isEqualTo(constants_1.LoggerLevel.ERROR)) {
|
|
22
|
-
return color_1.color.red
|
|
22
|
+
return color_1.color.styleText(["red", "bold"], msg);
|
|
23
23
|
}
|
|
24
24
|
if (logEvent.level.isEqualTo(constants_1.LoggerLevel.WARN)) {
|
|
25
25
|
return color_1.color.yellow(msg);
|
|
@@ -110,8 +110,8 @@ class Logger {
|
|
|
110
110
|
const opts = {
|
|
111
111
|
unescape: true,
|
|
112
112
|
link: color_1.color.red,
|
|
113
|
-
strong: color_1.color.green
|
|
114
|
-
firstHeading: color_1.color.blue
|
|
113
|
+
strong: (str) => color_1.color.styleText(["green", "bold"], str),
|
|
114
|
+
firstHeading: (str) => color_1.color.styleText(["blue", "bold"], str),
|
|
115
115
|
tableOptions: {
|
|
116
116
|
chars: { mid: "", "left-mid": "", "mid-mid": "", "right-mid": "" },
|
|
117
117
|
style: {
|
|
@@ -37,14 +37,16 @@ class AndroidEmulatorServices {
|
|
|
37
37
|
async getRunningEmulatorName(emulatorId) {
|
|
38
38
|
let result = await this.$androidVirtualDeviceService.getRunningEmulatorName(emulatorId);
|
|
39
39
|
if (!result) {
|
|
40
|
-
result =
|
|
40
|
+
result =
|
|
41
|
+
await this.$androidGenymotionService.getRunningEmulatorName(emulatorId);
|
|
41
42
|
}
|
|
42
43
|
return result;
|
|
43
44
|
}
|
|
44
45
|
async getRunningEmulatorImageIdentifier(emulatorId) {
|
|
45
46
|
let result = await this.$androidVirtualDeviceService.getRunningEmulatorImageIdentifier(emulatorId);
|
|
46
47
|
if (!result) {
|
|
47
|
-
result =
|
|
48
|
+
result =
|
|
49
|
+
await this.$androidGenymotionService.getRunningEmulatorImageIdentifier(emulatorId);
|
|
48
50
|
}
|
|
49
51
|
return result;
|
|
50
52
|
}
|
|
@@ -116,13 +118,13 @@ class AndroidEmulatorServices {
|
|
|
116
118
|
let pathToEmulatorExecutable = null;
|
|
117
119
|
let startEmulatorArgs = null;
|
|
118
120
|
if (emulator.vendor === constants_1.AndroidVirtualDevice.AVD_VENDOR_NAME) {
|
|
119
|
-
pathToEmulatorExecutable =
|
|
120
|
-
.pathToEmulatorExecutable;
|
|
121
|
+
pathToEmulatorExecutable =
|
|
122
|
+
this.$androidVirtualDeviceService.pathToEmulatorExecutable;
|
|
121
123
|
startEmulatorArgs = this.$androidVirtualDeviceService.startEmulatorArgs(emulator.imageIdentifier);
|
|
122
124
|
}
|
|
123
125
|
else if (emulator.vendor === constants_1.AndroidVirtualDevice.GENYMOTION_VENDOR_NAME) {
|
|
124
|
-
pathToEmulatorExecutable =
|
|
125
|
-
.pathToEmulatorExecutable;
|
|
126
|
+
pathToEmulatorExecutable =
|
|
127
|
+
this.$androidGenymotionService.pathToEmulatorExecutable;
|
|
126
128
|
startEmulatorArgs = this.$androidGenymotionService.startEmulatorArgs(emulator.imageIdentifier);
|
|
127
129
|
}
|
|
128
130
|
this.$logger.info(`Starting Android emulator with image ${emulator.imageIdentifier}`);
|
|
@@ -146,7 +148,7 @@ class AndroidEmulatorServices {
|
|
|
146
148
|
}
|
|
147
149
|
const minVersion = semver.coerce(constants_1.AndroidVirtualDevice.MIN_ANDROID_VERSION);
|
|
148
150
|
const bestVersion = best && best.version && semver.coerce(best.version);
|
|
149
|
-
return bestVersion
|
|
151
|
+
return !bestVersion || semver.gte(bestVersion, minVersion) ? best : null;
|
|
150
152
|
}
|
|
151
153
|
async waitForEmulatorBootToComplete(emulator, endTimeEpoch, timeout) {
|
|
152
154
|
this.$logger.info("Waiting for emulator device initialization...", {
|
|
@@ -25,13 +25,12 @@ class DeviceLogProvider extends device_log_provider_base_1.DeviceLogProviderBase
|
|
|
25
25
|
};
|
|
26
26
|
this.deviceColorMap = new Map();
|
|
27
27
|
this.colorPool = [
|
|
28
|
-
"
|
|
29
|
-
"bgMagentaBright",
|
|
28
|
+
"bgGray",
|
|
30
29
|
"bgBlueBright",
|
|
31
30
|
"bgWhiteBright",
|
|
32
31
|
"bgCyanBright",
|
|
33
32
|
"bgYellowBright",
|
|
34
|
-
"
|
|
33
|
+
"bgMagentaBright",
|
|
35
34
|
];
|
|
36
35
|
this.colorPoolIndex = 0;
|
|
37
36
|
}
|
|
@@ -113,7 +112,7 @@ class DeviceLogProvider extends device_log_provider_base_1.DeviceLogProviderBase
|
|
|
113
112
|
.join("")
|
|
114
113
|
.trimEnd();
|
|
115
114
|
toLog.split("\n").forEach((actualLine) => {
|
|
116
|
-
this.printLine(color_1.color
|
|
115
|
+
this.printLine(color_1.color.styleText(this.getDeviceColor(deviceIdentifier), " "), this.consoleLevelColor[level](actualLine));
|
|
117
116
|
});
|
|
118
117
|
}
|
|
119
118
|
}
|
|
@@ -93,24 +93,38 @@ class HooksService {
|
|
|
93
93
|
}
|
|
94
94
|
return _.flatten(results);
|
|
95
95
|
}
|
|
96
|
+
isESModule(hook) {
|
|
97
|
+
const ext = path.extname(hook.fullPath).toLowerCase();
|
|
98
|
+
return ext === ".mjs";
|
|
99
|
+
}
|
|
96
100
|
async executeHook(directoryPath, hookName, hook, hookArguments) {
|
|
97
101
|
hookArguments = hookArguments || {};
|
|
98
102
|
let result;
|
|
99
103
|
const relativePath = path.relative(directoryPath, hook.fullPath);
|
|
100
104
|
const trackId = relativePath.replace(new RegExp("\\" + path.sep, "g"), constants_1.AnalyticsEventLabelDelimiter);
|
|
105
|
+
const isESM = this.isESModule(hook);
|
|
101
106
|
let command = this.getSheBangInterpreter(hook);
|
|
102
107
|
let inProc = false;
|
|
103
108
|
if (!command) {
|
|
104
109
|
command = hook.fullPath;
|
|
105
|
-
if ([".mjs", ".js"].includes(path.extname(hook.fullPath).toLowerCase())) {
|
|
110
|
+
if ([".mjs", ".cjs", ".js"].includes(path.extname(hook.fullPath).toLowerCase())) {
|
|
106
111
|
command = process.argv[0];
|
|
107
|
-
inProc =
|
|
112
|
+
inProc = isESM
|
|
113
|
+
? true
|
|
114
|
+
: this.shouldExecuteInProcess(this.$fs.readText(hook.fullPath));
|
|
108
115
|
}
|
|
109
116
|
}
|
|
110
117
|
const startTime = this.$performanceService.now();
|
|
111
118
|
if (inProc) {
|
|
112
119
|
this.$logger.trace("Executing %s hook at location %s in-process", hookName, hook.fullPath);
|
|
113
|
-
|
|
120
|
+
let hookEntryPoint;
|
|
121
|
+
if (isESM) {
|
|
122
|
+
const { default: hookFn } = await Promise.resolve(`${hook.fullPath}`).then(s => require(s));
|
|
123
|
+
hookEntryPoint = hookFn;
|
|
124
|
+
}
|
|
125
|
+
else {
|
|
126
|
+
hookEntryPoint = require(hook.fullPath);
|
|
127
|
+
}
|
|
114
128
|
this.$logger.trace(`Validating ${hookName} arguments.`);
|
|
115
129
|
const invalidArguments = this.validateHookArguments(hookEntryPoint, hook.fullPath);
|
|
116
130
|
if (invalidArguments.length) {
|
|
@@ -119,7 +133,8 @@ class HooksService {
|
|
|
119
133
|
}
|
|
120
134
|
const projectDataHookArg = hookArguments["hookArgs"] && hookArguments["hookArgs"]["projectData"];
|
|
121
135
|
if (projectDataHookArg) {
|
|
122
|
-
hookArguments["projectData"] = hookArguments["$projectData"] =
|
|
136
|
+
hookArguments["projectData"] = hookArguments["$projectData"] =
|
|
137
|
+
projectDataHookArg;
|
|
123
138
|
}
|
|
124
139
|
const maybePromise = this.$injector.resolve(hookEntryPoint, hookArguments);
|
|
125
140
|
if (maybePromise) {
|
|
@@ -215,9 +230,11 @@ class HooksService {
|
|
|
215
230
|
prepareEnvironment(hookFullPath) {
|
|
216
231
|
const clientName = this.$staticConfig.CLIENT_NAME.toUpperCase();
|
|
217
232
|
const environment = {};
|
|
218
|
-
environment[util.format("%s-COMMANDLINE", clientName)] =
|
|
233
|
+
environment[util.format("%s-COMMANDLINE", clientName)] =
|
|
234
|
+
process.argv.join(" ");
|
|
219
235
|
environment[util.format("%s-HOOK_FULL_PATH", clientName)] = hookFullPath;
|
|
220
|
-
environment[util.format("%s-VERSION", clientName)] =
|
|
236
|
+
environment[util.format("%s-VERSION", clientName)] =
|
|
237
|
+
this.$staticConfig.version;
|
|
221
238
|
return {
|
|
222
239
|
cwd: this.$projectHelper.projectDir,
|
|
223
240
|
stdio: "inherit",
|
|
@@ -28,7 +28,7 @@ function verifyNodeVersion() {
|
|
|
28
28
|
if (versionsCausingFailure.indexOf(nodeVer) !== -1 ||
|
|
29
29
|
!semver.valid(nodeVer) ||
|
|
30
30
|
semver.lt(nodeVer, minimumRequiredVersion)) {
|
|
31
|
-
console.error(color_1.color.
|
|
31
|
+
console.error(color_1.color.bold(color_1.color.red(util.format("%sNode.js '%s' is not supported. To be able to work with %s CLI, install any Node.js version in the following range: %s.%s", os.EOL, nodeVer, cliName, supportedVersionsRange, os.EOL))));
|
|
32
32
|
process.exit(1);
|
|
33
33
|
}
|
|
34
34
|
}
|
package/lib/constants.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
exports.
|
|
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.
|
|
3
|
+
exports.BUILD_XCCONFIG_FILE_NAME = 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.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.ProjectTypes = 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 = void 0;
|
|
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 = void 0;
|
|
6
6
|
const path_1 = require("path");
|
|
7
7
|
exports.APP_FOLDER_NAME = "app";
|
|
8
8
|
exports.APP_RESOURCES_FOLDER_NAME = "App_Resources";
|
|
@@ -16,6 +16,7 @@ exports.SCOPED_TNS_CORE_MODULES = "@nativescript/core";
|
|
|
16
16
|
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
|
+
exports.RSPACK_PLUGIN_NAME = "@nativescript/rspack";
|
|
19
20
|
exports.TNS_CORE_MODULES_WIDGETS_NAME = "tns-core-modules-widgets";
|
|
20
21
|
exports.UI_MOBILE_BASE_NAME = "@nativescript/ui-mobile-base";
|
|
21
22
|
exports.TNS_ANDROID_RUNTIME_NAME = "tns-android";
|
|
@@ -36,6 +37,7 @@ exports.XML_FILE_EXTENSION = ".xml";
|
|
|
36
37
|
exports.PLATFORMS_DIR_NAME = "platforms";
|
|
37
38
|
exports.HOOKS_DIR_NAME = "hooks";
|
|
38
39
|
exports.WEBPACK_CONFIG_NAME = "webpack.config.js";
|
|
40
|
+
exports.RSPACK_CONFIG_NAME = "rspack.config.js";
|
|
39
41
|
exports.TSCCONFIG_TNS_JSON_NAME = "tsconfig.tns.json";
|
|
40
42
|
exports.KARMA_CONFIG_NAME = "karma.conf.js";
|
|
41
43
|
exports.LIB_DIR_NAME = "lib";
|
|
@@ -214,7 +216,7 @@ exports.CACACHE_DIRECTORY_NAME = "_cacache";
|
|
|
214
216
|
exports.FILES_CHANGE_EVENT_NAME = "filesChangeEvent";
|
|
215
217
|
exports.INITIAL_SYNC_EVENT_NAME = "initialSyncEvent";
|
|
216
218
|
exports.PREPARE_READY_EVENT_NAME = "prepareReadyEvent";
|
|
217
|
-
exports.
|
|
219
|
+
exports.BUNDLER_COMPILATION_COMPLETE = "bundlerCompilationComplete";
|
|
218
220
|
class DebugCommandErrors {
|
|
219
221
|
}
|
|
220
222
|
exports.DebugCommandErrors = DebugCommandErrors;
|
|
@@ -10,7 +10,8 @@ const simple_git_1 = require("simple-git");
|
|
|
10
10
|
const update_controller_base_1 = require("./update-controller-base");
|
|
11
11
|
const helpers_1 = require("../common/helpers");
|
|
12
12
|
const yok_1 = require("../common/yok");
|
|
13
|
-
const
|
|
13
|
+
const fs = require("fs");
|
|
14
|
+
const os_1 = require("os");
|
|
14
15
|
const color_1 = require("../color");
|
|
15
16
|
class MigrateController extends update_controller_base_1.UpdateControllerBase {
|
|
16
17
|
constructor($fs, $platformCommandHelper, $platformsDataService, $packageInstallationManager, $packageManager, $pacoteService, $logger, $errors, $pluginsService, $projectDataService, $projectConfigService, $options, $resources, $injector, $settingsService, $staticConfig, $terminalSpinnerService, $projectCleanupService, $projectBackupService, $childProcess) {
|
|
@@ -710,9 +711,7 @@ class MigrateController extends update_controller_base_1.UpdateControllerBase {
|
|
|
710
711
|
if (polyfillsPath) {
|
|
711
712
|
return "./" + path.relative(projectDir, polyfillsPath);
|
|
712
713
|
}
|
|
713
|
-
const tempDir =
|
|
714
|
-
prefix: "migrate-angular-polyfills",
|
|
715
|
-
});
|
|
714
|
+
const tempDir = fs.mkdtempSync(path.join((0, os_1.tmpdir)(), "migrate-angular-polyfills-"));
|
|
716
715
|
await this.$pacoteService.extractPackage(constants.RESERVED_TEMPLATE_NAMES["angular"], tempDir);
|
|
717
716
|
this.$fs.copyFile(path.resolve(tempDir, "src/polyfills.ts"), possiblePaths[0]);
|
|
718
717
|
this.$fs.deleteDirectory(tempDir);
|
|
@@ -16,7 +16,7 @@ const helpers_1 = require("../common/helpers");
|
|
|
16
16
|
const yok_1 = require("../common/yok");
|
|
17
17
|
const constants_1 = require("../constants");
|
|
18
18
|
class PrepareController extends events_1.EventEmitter {
|
|
19
|
-
constructor($platformController, $hooksService, $fs, $logger, $options, $mobileHelper, $nodeModulesDependenciesBuilder, $platformsDataService, $pluginsService, $prepareNativePlatformService, $projectChangesService, $projectDataService, $
|
|
19
|
+
constructor($platformController, $hooksService, $fs, $logger, $options, $mobileHelper, $nodeModulesDependenciesBuilder, $platformsDataService, $pluginsService, $prepareNativePlatformService, $projectChangesService, $projectDataService, $bundlerCompilerService, $watchIgnoreListService, $analyticsService, $markingModeService, $projectConfigService, $projectService) {
|
|
20
20
|
super();
|
|
21
21
|
this.$platformController = $platformController;
|
|
22
22
|
this.$hooksService = $hooksService;
|
|
@@ -30,7 +30,7 @@ class PrepareController extends events_1.EventEmitter {
|
|
|
30
30
|
this.$prepareNativePlatformService = $prepareNativePlatformService;
|
|
31
31
|
this.$projectChangesService = $projectChangesService;
|
|
32
32
|
this.$projectDataService = $projectDataService;
|
|
33
|
-
this.$
|
|
33
|
+
this.$bundlerCompilerService = $bundlerCompilerService;
|
|
34
34
|
this.$watchIgnoreListService = $watchIgnoreListService;
|
|
35
35
|
this.$analyticsService = $analyticsService;
|
|
36
36
|
this.$markingModeService = $markingModeService;
|
|
@@ -66,8 +66,8 @@ class PrepareController extends events_1.EventEmitter {
|
|
|
66
66
|
this.watchersData[projectDir] &&
|
|
67
67
|
this.watchersData[projectDir][platformLowerCase] &&
|
|
68
68
|
this.watchersData[projectDir][platformLowerCase].hasWebpackCompilerProcess) {
|
|
69
|
-
await this.$
|
|
70
|
-
this.$
|
|
69
|
+
await this.$bundlerCompilerService.stopBundlerCompiler(platformLowerCase);
|
|
70
|
+
this.$bundlerCompilerService.removeListener(constants_1.BUNDLER_COMPILATION_COMPLETE, this.webpackCompilerHandler);
|
|
71
71
|
this.watchersData[projectDir][platformLowerCase].hasWebpackCompilerProcess = false;
|
|
72
72
|
}
|
|
73
73
|
}
|
|
@@ -89,7 +89,7 @@ class PrepareController extends events_1.EventEmitter {
|
|
|
89
89
|
result = await this.startWatchersWithPrepare(platformData, projectData, prepareData);
|
|
90
90
|
}
|
|
91
91
|
else {
|
|
92
|
-
await this.$
|
|
92
|
+
await this.$bundlerCompilerService.compileWithoutWatch(platformData, projectData, prepareData);
|
|
93
93
|
const hasNativeChanges = await this.$prepareNativePlatformService.prepareNativePlatform(platformData, projectData, prepareData);
|
|
94
94
|
result = {
|
|
95
95
|
hasNativeChanges,
|
|
@@ -149,9 +149,9 @@ class PrepareController extends events_1.EventEmitter {
|
|
|
149
149
|
}
|
|
150
150
|
};
|
|
151
151
|
this.webpackCompilerHandler = handler.bind(this);
|
|
152
|
-
this.$
|
|
152
|
+
this.$bundlerCompilerService.on(constants_1.BUNDLER_COMPILATION_COMPLETE, this.webpackCompilerHandler);
|
|
153
153
|
this.watchersData[projectData.projectDir][platformData.platformNameLowerCase].hasWebpackCompilerProcess = true;
|
|
154
|
-
await this.$
|
|
154
|
+
await this.$bundlerCompilerService.compileWithWatch(platformData, projectData, prepareData);
|
|
155
155
|
}
|
|
156
156
|
}
|
|
157
157
|
async startNativeWatcherWithPrepare(platformData, projectData, prepareData) {
|
|
@@ -293,7 +293,7 @@ class PrepareController extends events_1.EventEmitter {
|
|
|
293
293
|
if (this.pausedFileWatch) {
|
|
294
294
|
for (const watcher of watchers) {
|
|
295
295
|
for (const platform in watcher) {
|
|
296
|
-
await this.$
|
|
296
|
+
await this.$bundlerCompilerService.stopBundlerCompiler(platform);
|
|
297
297
|
watcher[platform].hasWebpackCompilerProcess = false;
|
|
298
298
|
}
|
|
299
299
|
}
|
|
@@ -303,7 +303,7 @@ class PrepareController extends events_1.EventEmitter {
|
|
|
303
303
|
for (const platform in watcher) {
|
|
304
304
|
const args = watcher[platform].prepareArguments;
|
|
305
305
|
watcher[platform].hasWebpackCompilerProcess = true;
|
|
306
|
-
await this.$
|
|
306
|
+
await this.$bundlerCompilerService.compileWithWatch(args.platformData, args.projectData, args.prepareData);
|
|
307
307
|
}
|
|
308
308
|
}
|
|
309
309
|
}
|
|
@@ -121,6 +121,7 @@ export interface IOSLocalSPMPackage extends IOSSPMPackageBase {
|
|
|
121
121
|
}
|
|
122
122
|
|
|
123
123
|
export type IOSSPMPackage = IOSRemoteSPMPackage | IOSLocalSPMPackage;
|
|
124
|
+
export type BundlerType = "webpack" | "rspack" | "vite";
|
|
124
125
|
|
|
125
126
|
interface INsConfigIOS extends INsConfigPlaform {
|
|
126
127
|
discardUncaughtJsExceptions?: boolean;
|
|
@@ -182,6 +183,8 @@ interface INsConfig {
|
|
|
182
183
|
shared?: boolean;
|
|
183
184
|
overridePods?: string;
|
|
184
185
|
webpackConfigPath?: string;
|
|
186
|
+
bundlerConfigPath?: string;
|
|
187
|
+
bundler?: BundlerType;
|
|
185
188
|
ios?: INsConfigIOS;
|
|
186
189
|
android?: INsConfigAndroid;
|
|
187
190
|
visionos?: INSConfigVisionOS;
|
|
@@ -215,13 +218,28 @@ interface IProjectData extends ICreateProjectData {
|
|
|
215
218
|
* Value is true when project has nativescript.config and it has `shared: true` in it.
|
|
216
219
|
*/
|
|
217
220
|
isShared: boolean;
|
|
218
|
-
|
|
219
221
|
/**
|
|
222
|
+
* Specifies the bundler used to build the application.
|
|
223
|
+
*
|
|
224
|
+
* - `"webpack"`: Uses Webpack for traditional bundling.
|
|
225
|
+
* - `"rspack"`: Uses Rspack for fast bundling.
|
|
226
|
+
* - `"vite"`: Uses Vite for fast bundling.
|
|
227
|
+
*
|
|
228
|
+
* @default "webpack"
|
|
229
|
+
*/
|
|
230
|
+
bundler: BundlerType;
|
|
231
|
+
/**
|
|
232
|
+
* @deprecated Use bundlerConfigPath
|
|
220
233
|
* Defines the path to the configuration file passed to webpack process.
|
|
221
234
|
* By default this is the webpack.config.js at the root of the application.
|
|
222
235
|
* The value can be changed by setting `webpackConfigPath` in nativescript.config.
|
|
223
236
|
*/
|
|
224
237
|
webpackConfigPath: string;
|
|
238
|
+
/**
|
|
239
|
+
* Defines the path to the bundler configuration file passed to the compiler.
|
|
240
|
+
* The value can be changed by setting `bundlerConfigPath` in nativescript.config.
|
|
241
|
+
*/
|
|
242
|
+
bundlerConfigPath: string;
|
|
225
243
|
projectName: string;
|
|
226
244
|
|
|
227
245
|
/**
|
|
@@ -1,9 +1,13 @@
|
|
|
1
|
-
|
|
1
|
+
export type AffixOptions = {
|
|
2
|
+
prefix?: string;
|
|
3
|
+
suffix?: string;
|
|
4
|
+
dir?: string;
|
|
5
|
+
};
|
|
2
6
|
|
|
3
7
|
/**
|
|
4
8
|
* Declares wrapped functions of temp module
|
|
5
9
|
*/
|
|
6
|
-
interface ITempService {
|
|
10
|
+
export interface ITempService {
|
|
7
11
|
mkdirSync(affixes: string | AffixOptions): Promise<string>;
|
|
8
12
|
path(options: string | AffixOptions): Promise<string>;
|
|
9
13
|
}
|