nativescript 9.1.2 → 9.1.3-dev.2026-11-07-42333391420
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 +1 -1
- package/lib/bootstrap.js +85 -76
- package/lib/commands/add-platform.d.ts +9 -12
- package/lib/commands/add-platform.js +26 -16
- package/lib/commands/apple-login.d.ts +1 -14
- package/lib/commands/apple-login.js +20 -27
- package/lib/commands/appstore-list.d.ts +8 -15
- package/lib/commands/appstore-list.js +31 -28
- package/lib/commands/appstore-upload.d.ts +19 -19
- package/lib/commands/appstore-upload.js +81 -66
- package/lib/commands/build.d.ts +39 -58
- package/lib/commands/build.js +69 -133
- package/lib/commands/clean.d.ts +4 -22
- package/lib/commands/clean.js +166 -161
- package/lib/commands/command-base.d.ts +19 -16
- package/lib/commands/command-base.js +51 -29
- package/lib/commands/config.d.ts +3 -30
- package/lib/commands/config.js +80 -86
- package/lib/commands/create-project.d.ts +26 -38
- package/lib/commands/create-project.js +342 -352
- package/lib/commands/debug.d.ts +51 -53
- package/lib/commands/debug.js +145 -148
- package/lib/commands/deploy.d.ts +1 -32
- package/lib/commands/deploy.js +44 -47
- package/lib/commands/embedding/embed.d.ts +13 -24
- package/lib/commands/embedding/embed.js +47 -56
- package/lib/commands/extensibility/install-extension.d.ts +1 -10
- package/lib/commands/extensibility/install-extension.js +22 -20
- package/lib/commands/extensibility/list-extensions.d.ts +1 -9
- package/lib/commands/extensibility/list-extensions.js +15 -17
- package/lib/commands/extensibility/uninstall-extension.d.ts +1 -10
- package/lib/commands/extensibility/uninstall-extension.js +21 -19
- package/lib/commands/fonts.d.ts +1 -12
- package/lib/commands/fonts.js +24 -23
- package/lib/commands/generate-assets.d.ts +6 -29
- package/lib/commands/generate-assets.js +35 -53
- package/lib/commands/generate-help.d.ts +1 -8
- package/lib/commands/generate-help.js +12 -13
- package/lib/commands/generate.d.ts +1 -12
- package/lib/commands/generate.js +13 -24
- package/lib/commands/hooks/common.d.ts +3 -12
- package/lib/commands/hooks/common.js +68 -63
- package/lib/commands/hooks/hooks-lock.d.ts +2 -24
- package/lib/commands/hooks/hooks-lock.js +68 -85
- package/lib/commands/hooks/hooks.d.ts +2 -17
- package/lib/commands/hooks/hooks.js +61 -56
- package/lib/commands/info.d.ts +1 -8
- package/lib/commands/info.js +12 -13
- package/lib/commands/install.d.ts +6 -25
- package/lib/commands/install.js +64 -57
- package/lib/commands/list-platforms.d.ts +1 -11
- package/lib/commands/list-platforms.js +24 -23
- package/lib/commands/migrate.d.ts +1 -13
- package/lib/commands/migrate.js +25 -24
- package/lib/commands/native-add.d.ts +5 -49
- package/lib/commands/native-add.js +180 -212
- package/lib/commands/open.d.ts +9 -0
- package/lib/commands/open.js +155 -0
- package/lib/commands/platform-clean.d.ts +7 -11
- package/lib/commands/platform-clean.js +29 -19
- package/lib/commands/plugin/add-plugin.d.ts +1 -13
- package/lib/commands/plugin/add-plugin.js +27 -23
- package/lib/commands/plugin/build-plugin.d.ts +10 -13
- package/lib/commands/plugin/build-plugin.js +29 -21
- package/lib/commands/plugin/create-plugin.d.ts +18 -16
- package/lib/commands/plugin/create-plugin.js +83 -71
- package/lib/commands/plugin/list-plugins.d.ts +1 -12
- package/lib/commands/plugin/list-plugins.js +30 -29
- package/lib/commands/plugin/remove-plugin.d.ts +1 -14
- package/lib/commands/plugin/remove-plugin.js +28 -26
- package/lib/commands/plugin/update-plugin.d.ts +1 -13
- package/lib/commands/plugin/update-plugin.js +31 -28
- package/lib/commands/post-install.d.ts +6 -8
- package/lib/commands/post-install.js +24 -17
- package/lib/commands/prepare.d.ts +13 -40
- package/lib/commands/prepare.js +43 -50
- package/lib/commands/preview.d.ts +11 -14
- package/lib/commands/preview.js +76 -60
- package/lib/commands/remove-platform.d.ts +1 -14
- package/lib/commands/remove-platform.js +23 -21
- package/lib/commands/resources/resources-update.d.ts +1 -13
- package/lib/commands/resources/resources-update.js +25 -22
- package/lib/commands/run.d.ts +44 -61
- package/lib/commands/run.js +119 -139
- package/lib/commands/setup.d.ts +1 -8
- package/lib/commands/setup.js +11 -13
- package/lib/commands/start.d.ts +1 -9
- package/lib/commands/start.js +12 -15
- package/lib/commands/test-init.d.ts +20 -0
- package/lib/commands/test-init.js +66 -49
- package/lib/commands/test.d.ts +51 -1
- package/lib/commands/test.js +143 -148
- package/lib/commands/typings.d.ts +15 -14
- package/lib/commands/typings.js +41 -28
- package/lib/commands/update-platform.d.ts +5 -11
- package/lib/commands/update-platform.js +25 -18
- package/lib/commands/update.d.ts +10 -14
- package/lib/commands/update.js +46 -37
- package/lib/commands/widget.d.ts +1 -24
- package/lib/commands/widget.js +17 -34
- package/lib/common/bootstrap.js +37 -27
- package/lib/common/commands/analytics.d.ts +6 -30
- package/lib/common/commands/analytics.js +51 -62
- package/lib/common/commands/autocompletion.d.ts +4 -35
- package/lib/common/commands/autocompletion.js +61 -68
- package/lib/common/commands/device/device-log-stream.d.ts +3 -16
- package/lib/common/commands/device/device-log-stream.js +31 -27
- package/lib/common/commands/device/get-file.d.ts +4 -14
- package/lib/common/commands/device/get-file.js +28 -28
- package/lib/common/commands/device/list-applications.d.ts +3 -10
- package/lib/common/commands/device/list-applications.js +21 -19
- package/lib/common/commands/device/list-devices.d.ts +15 -15
- package/lib/common/commands/device/list-devices.js +113 -119
- package/lib/common/commands/device/list-files.d.ts +3 -14
- package/lib/common/commands/device/list-files.js +27 -28
- package/lib/common/commands/device/put-file.d.ts +3 -14
- package/lib/common/commands/device/put-file.js +27 -29
- package/lib/common/commands/device/run-application.d.ts +3 -13
- package/lib/common/commands/device/run-application.js +24 -26
- package/lib/common/commands/device/stop-application.d.ts +3 -10
- package/lib/common/commands/device/stop-application.js +21 -24
- package/lib/common/commands/device/uninstall-application.d.ts +3 -10
- package/lib/common/commands/device/uninstall-application.js +19 -18
- package/lib/common/commands/doctor.d.ts +3 -23
- package/lib/common/commands/doctor.js +18 -49
- package/lib/common/commands/generate-messages.d.ts +3 -13
- package/lib/common/commands/generate-messages.js +26 -24
- package/lib/common/commands/help.d.ts +3 -14
- package/lib/common/commands/help.js +22 -22
- package/lib/common/commands/package-manager-get.d.ts +1 -10
- package/lib/common/commands/package-manager-get.js +13 -19
- package/lib/common/commands/package-manager-set.d.ts +1 -11
- package/lib/common/commands/package-manager-set.js +17 -20
- package/lib/common/commands/post-install.d.ts +1 -9
- package/lib/common/commands/post-install.js +11 -14
- package/lib/common/commands/preuninstall.d.ts +1 -16
- package/lib/common/commands/preuninstall.js +27 -28
- package/lib/common/commands/proxy/proxy-base.d.ts +1 -13
- package/lib/common/commands/proxy/proxy-base.js +7 -18
- package/lib/common/commands/proxy/proxy-clear.d.ts +1 -9
- package/lib/common/commands/proxy/proxy-clear.js +16 -17
- package/lib/common/commands/proxy/proxy-get.d.ts +1 -9
- package/lib/common/commands/proxy/proxy-get.js +15 -16
- package/lib/common/commands/proxy/proxy-set.d.ts +12 -19
- package/lib/common/commands/proxy/proxy-set.js +100 -87
- package/lib/common/contracts/command-context.d.ts +3 -0
- package/lib/common/contracts/command-context.js +5 -0
- package/lib/common/contracts/command-preconditions.d.ts +4 -0
- package/lib/common/contracts/command-preconditions.js +5 -0
- package/lib/common/contracts/command-registry.d.ts +10 -5
- package/lib/common/contracts/command-registry.js +18 -1
- package/lib/common/contracts/commands-service.d.ts +10 -0
- package/lib/common/contracts/{key-command-registry.js → commands-service.js} +6 -6
- package/lib/common/contracts/index.d.ts +6 -2
- package/lib/common/contracts/index.js +9 -3
- package/lib/common/contracts/key-shortcuts.d.ts +31 -0
- package/lib/common/contracts/key-shortcuts.js +25 -0
- package/lib/common/define-command.d.ts +82 -10
- package/lib/common/define-command.js +219 -15
- package/lib/common/definitions/commands-service.d.ts +26 -2
- package/lib/common/definitions/commands.d.ts +6 -1
- package/lib/common/definitions/yok.d.ts +1 -7
- package/lib/common/deprecation.js +1 -1
- package/lib/common/di/index.d.ts +2 -2
- package/lib/common/di/index.js +2 -1
- package/lib/common/di/inject.d.ts +1 -0
- package/lib/common/di/inject.js +5 -0
- package/lib/common/di/injector.js +30 -2
- package/lib/common/di/providers.d.ts +6 -1
- package/lib/common/di/providers.js +10 -0
- package/lib/common/errors.d.ts +1 -0
- package/lib/common/errors.js +28 -20
- package/lib/common/helpers.js +1 -1
- package/lib/common/opener.d.ts +1 -0
- package/lib/common/opener.js +11 -0
- package/lib/common/services/command-definition-adapter.d.ts +11 -5
- package/lib/common/services/command-definition-adapter.js +261 -30
- package/lib/common/services/commands-service.d.ts +18 -2
- package/lib/common/services/commands-service.js +225 -42
- package/lib/common/services/help-service.js +4 -0
- package/lib/common/yok.d.ts +1 -8
- package/lib/common/yok.js +11 -31
- package/lib/contracts/errors.d.ts +1 -0
- package/lib/contracts/index.d.ts +10 -2
- package/lib/contracts/index.js +17 -1
- package/lib/contracts/provide-project.d.ts +2 -0
- package/lib/contracts/provide-project.js +18 -0
- package/lib/controllers/prepare-controller.d.ts +0 -1
- package/lib/controllers/prepare-controller.js +11 -5
- package/lib/controllers/run-controller.d.ts +1 -0
- package/lib/controllers/run-controller.js +61 -1
- package/lib/declarations.d.ts +1 -1
- package/lib/definitions/livesync.d.ts +39 -37
- package/lib/definitions/run.d.ts +10 -3
- package/lib/helpers/livesync-command-helper.js +3 -2
- package/lib/options.d.ts +1 -1
- package/lib/options.js +4 -2
- package/lib/services/android/gradle-build-args-service.d.ts +3 -3
- package/lib/services/android/gradle-build-args-service.js +4 -4
- package/lib/services/bundler/bundler-compiler-service.d.ts +3 -0
- package/lib/services/bundler/bundler-compiler-service.js +52 -11
- package/lib/services/extensibility-service.d.ts +1 -0
- package/lib/services/extensibility-service.js +12 -20
- package/lib/services/key-shortcut-registry.d.ts +6 -0
- package/lib/services/key-shortcut-registry.js +32 -0
- package/lib/services/key-shortcuts.d.ts +55 -0
- package/lib/services/key-shortcuts.js +389 -0
- package/lib/services/livesync-process-data-service.d.ts +1 -1
- package/lib/services/livesync-process-data-service.js +5 -2
- package/lib/services/start-service.d.ts +4 -4
- package/lib/services/start-service.js +67 -34
- package/package.json +4 -4
- package/lib/common/contracts/key-command-registry.d.ts +0 -7
- package/lib/common/definitions/key-commands.d.ts +0 -25
- package/lib/common/definitions/key-commands.js +0 -8
- package/lib/helpers/key-command-helper.d.ts +0 -13
- package/lib/helpers/key-command-helper.js +0 -117
- package/lib/key-commands/bootstrap.d.ts +0 -1
- package/lib/key-commands/bootstrap.js +0 -22
- package/lib/key-commands/index.d.ts +0 -166
- package/lib/key-commands/index.js +0 -414
|
@@ -1,90 +1,105 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.PublishIOSCommand = void 0;
|
|
4
4
|
const path = require("path");
|
|
5
|
-
const
|
|
5
|
+
const define_command_1 = require("../common/define-command");
|
|
6
|
+
const di_1 = require("../common/di");
|
|
6
7
|
const build_data_1 = require("../data/build-data");
|
|
7
|
-
const
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
this.$
|
|
8
|
+
const project_data_1 = require("../contracts/project-data");
|
|
9
|
+
const command_base_1 = require("./command-base");
|
|
10
|
+
const publishIOSCommandOptions = {
|
|
11
|
+
appleApplicationSpecificPassword: (0, define_command_1.stringOption)(),
|
|
12
|
+
appleSessionBase64: (0, define_command_1.stringOption)(),
|
|
13
|
+
ipa: (0, define_command_1.stringOption)(),
|
|
14
|
+
provision: (0, define_command_1.objectOption)(),
|
|
15
|
+
release: (0, define_command_1.booleanOption)(),
|
|
16
|
+
teamId: (0, define_command_1.objectOption)(),
|
|
17
|
+
};
|
|
18
|
+
class PublishIOSCommand extends (0, define_command_1.Command)({
|
|
19
|
+
name: ["publish|ios", "appstore|upload"],
|
|
20
|
+
description: "Uploads a project to App Store Connect.",
|
|
21
|
+
options: publishIOSCommandOptions,
|
|
22
|
+
params: "any",
|
|
23
|
+
providers: [(0, command_base_1.provideProject)()],
|
|
24
|
+
}) {
|
|
25
|
+
constructor() {
|
|
26
|
+
super(...arguments);
|
|
27
|
+
this.$applePortalSessionService = (0, di_1.inject)("applePortalSessionService");
|
|
28
|
+
this.$buildController = (0, di_1.inject)("buildController");
|
|
29
|
+
this.$devicePlatformsConstants = (0, di_1.inject)("devicePlatformsConstants");
|
|
30
|
+
this.$hostInfo = (0, di_1.inject)("hostInfo");
|
|
31
|
+
this.$itmsTransporterService = (0, di_1.inject)("itmsTransporterService");
|
|
32
|
+
this.$logger = (0, di_1.inject)("logger");
|
|
33
|
+
this.$options = (0, di_1.inject)("options");
|
|
34
|
+
this.$platformValidationService = (0, di_1.inject)("platformValidationService");
|
|
35
|
+
this.$projectData = (0, di_1.inject)(project_data_1.ProjectData);
|
|
36
|
+
this.$prompter = (0, di_1.inject)("prompter");
|
|
29
37
|
}
|
|
30
|
-
|
|
38
|
+
canExecute() {
|
|
39
|
+
if (!this.$hostInfo.isDarwin) {
|
|
40
|
+
this.context.fail("iOS publishing is only available on macOS.", {
|
|
41
|
+
help: false,
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
if (!this.$platformValidationService.isPlatformSupportedForOS(this.$devicePlatformsConstants.iOS, this.$projectData)) {
|
|
45
|
+
this.context.fail(`Applications for platform ${this.$devicePlatformsConstants.iOS} can not be built on this OS`, { help: false });
|
|
46
|
+
}
|
|
47
|
+
return true;
|
|
48
|
+
}
|
|
49
|
+
async run() {
|
|
31
50
|
var _a;
|
|
32
|
-
await this.$itmsTransporterService.validate(this
|
|
33
|
-
const username = args[0] ||
|
|
51
|
+
await this.$itmsTransporterService.validate(this.options.appleApplicationSpecificPassword);
|
|
52
|
+
const username = this.args[0] ||
|
|
34
53
|
(await this.$prompter.getString("Apple ID", { allowEmpty: false }));
|
|
35
|
-
const password = args[1] || (await this.$prompter.getPassword("Apple ID password"));
|
|
36
|
-
const user = await this
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
requireInteractiveConsole: true,
|
|
40
|
-
requireApplicationSpecificPassword: true,
|
|
41
|
-
});
|
|
42
|
-
if (!user.areCredentialsValid) {
|
|
43
|
-
this.$errors.fail(`Invalid username and password combination. Used '${username}' as the username.`);
|
|
44
|
-
}
|
|
45
|
-
const mobileProvisionIdentifier = (_a = this.$options.provision) !== null && _a !== void 0 ? _a : args[2];
|
|
46
|
-
let ipaFilePath = this.$options.ipa
|
|
47
|
-
? path.resolve(this.$options.ipa)
|
|
48
|
-
: null;
|
|
54
|
+
const password = this.args[1] || (await this.$prompter.getPassword("Apple ID password"));
|
|
55
|
+
const user = await this.createUserSession(username, password);
|
|
56
|
+
const mobileProvisionIdentifier = (_a = this.options.provision) !== null && _a !== void 0 ? _a : this.args[2];
|
|
57
|
+
let ipaFilePath = this.options.ipa ? path.resolve(this.options.ipa) : null;
|
|
49
58
|
if (!mobileProvisionIdentifier && !ipaFilePath) {
|
|
50
59
|
this.$logger.warn("No mobile provision identifier set. A default mobile provision will be used. You can set one in app/App_Resources/iOS/build.xcconfig");
|
|
51
60
|
}
|
|
52
61
|
this.$options.release = true;
|
|
53
62
|
if (!ipaFilePath) {
|
|
54
|
-
|
|
55
|
-
if (mobileProvisionIdentifier) {
|
|
56
|
-
this.$logger.info("Building .ipa with the selected mobile provision and/or certificate. " +
|
|
57
|
-
mobileProvisionIdentifier);
|
|
58
|
-
this.$options.provision = mobileProvisionIdentifier;
|
|
59
|
-
const buildData = new build_data_1.IOSBuildData(this.$projectData.projectDir, platform, { ...this.$options.argv, buildForAppStore: true, watch: false });
|
|
60
|
-
ipaFilePath = await this.$buildController.prepareAndBuild(buildData);
|
|
61
|
-
}
|
|
62
|
-
else {
|
|
63
|
-
this.$logger.info("No .ipa, mobile provision or certificate set. Perfect! Now we'll build .xcarchive and let Xcode pick the distribution certificate and provisioning profile for you when exporting .ipa for AppStore submission.");
|
|
64
|
-
const buildData = new build_data_1.IOSBuildData(this.$projectData.projectDir, platform, { ...this.$options.argv, buildForAppStore: true, watch: false });
|
|
65
|
-
ipaFilePath = await this.$buildController.prepareAndBuild(buildData);
|
|
66
|
-
this.$logger.info(`Export at: ${ipaFilePath}`);
|
|
67
|
-
}
|
|
63
|
+
ipaFilePath = await this.buildIpa(mobileProvisionIdentifier);
|
|
68
64
|
}
|
|
69
65
|
await this.$itmsTransporterService.upload({
|
|
70
66
|
credentials: { username, password },
|
|
71
67
|
user,
|
|
72
|
-
applicationSpecificPassword: this
|
|
68
|
+
applicationSpecificPassword: this.options.appleApplicationSpecificPassword,
|
|
73
69
|
ipaFilePath,
|
|
74
|
-
shouldExtractIpa: !!this
|
|
70
|
+
shouldExtractIpa: !!this.options.ipa,
|
|
75
71
|
verboseLogging: this.$logger.getLevel() === "TRACE",
|
|
76
|
-
teamId: this
|
|
72
|
+
teamId: this.options.teamId,
|
|
77
73
|
});
|
|
78
74
|
}
|
|
79
|
-
async
|
|
80
|
-
|
|
81
|
-
this
|
|
75
|
+
async createUserSession(username, password) {
|
|
76
|
+
const user = await this.$applePortalSessionService.createUserSession({ username, password }, {
|
|
77
|
+
applicationSpecificPassword: this.options.appleApplicationSpecificPassword,
|
|
78
|
+
sessionBase64: this.options.appleSessionBase64,
|
|
79
|
+
requireInteractiveConsole: true,
|
|
80
|
+
requireApplicationSpecificPassword: true,
|
|
81
|
+
});
|
|
82
|
+
if (!user.areCredentialsValid) {
|
|
83
|
+
this.context.fail(`Invalid username and password combination. Used '${username}' as the username.`, { help: false });
|
|
82
84
|
}
|
|
83
|
-
|
|
84
|
-
|
|
85
|
+
return user;
|
|
86
|
+
}
|
|
87
|
+
async buildIpa(mobileProvisionIdentifier) {
|
|
88
|
+
const platform = this.$devicePlatformsConstants.iOS.toLowerCase();
|
|
89
|
+
if (mobileProvisionIdentifier) {
|
|
90
|
+
this.$logger.info("Building .ipa with the selected mobile provision and/or certificate. " +
|
|
91
|
+
mobileProvisionIdentifier);
|
|
92
|
+
this.$options.provision = mobileProvisionIdentifier;
|
|
93
|
+
const buildData = new build_data_1.IOSBuildData(this.$projectData.projectDir, platform, { ...this.$options.argv, buildForAppStore: true, watch: false });
|
|
94
|
+
return await this.$buildController.prepareAndBuild(buildData);
|
|
95
|
+
}
|
|
96
|
+
else {
|
|
97
|
+
this.$logger.info("No .ipa, mobile provision or certificate set. Perfect! Now we'll build .xcarchive and let Xcode pick the distribution certificate and provisioning profile for you when exporting .ipa for AppStore submission.");
|
|
98
|
+
const buildData = new build_data_1.IOSBuildData(this.$projectData.projectDir, platform, { ...this.$options.argv, buildForAppStore: true, watch: false });
|
|
99
|
+
const ipaFilePath = await this.$buildController.prepareAndBuild(buildData);
|
|
100
|
+
this.$logger.info(`Export at: ${ipaFilePath}`);
|
|
101
|
+
return ipaFilePath;
|
|
85
102
|
}
|
|
86
|
-
return true;
|
|
87
103
|
}
|
|
88
104
|
}
|
|
89
|
-
exports.
|
|
90
|
-
yok_1.injector.registerCommand(["publish|ios", "appstore|upload"], PublishIOS);
|
|
105
|
+
exports.PublishIOSCommand = PublishIOSCommand;
|
package/lib/commands/build.d.ts
CHANGED
|
@@ -1,58 +1,39 @@
|
|
|
1
|
-
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
}
|
|
41
|
-
export declare class BuildAndroidCommand extends BuildCommandBase implements ICommand {
|
|
42
|
-
protected $options: IOptions;
|
|
43
|
-
protected $errors: IErrors;
|
|
44
|
-
protected $androidBundleValidatorHelper: IAndroidBundleValidatorHelper;
|
|
45
|
-
protected $logger: ILogger;
|
|
46
|
-
private $migrateController;
|
|
47
|
-
allowedParameters: ICommandParameter[];
|
|
48
|
-
constructor($options: IOptions, $errors: IErrors, $projectData: IProjectData, platformsDataService: IPlatformsDataService, $devicePlatformsConstants: Mobile.IDevicePlatformsConstants, $buildController: IBuildController, $platformValidationService: IPlatformValidationService, $androidBundleValidatorHelper: IAndroidBundleValidatorHelper, $buildDataService: IBuildDataService, $logger: ILogger, $migrateController: IMigrateController);
|
|
49
|
-
execute(args: string[]): Promise<void>;
|
|
50
|
-
canExecute(args: string[]): Promise<boolean>;
|
|
51
|
-
}
|
|
52
|
-
export declare class BuildVisionOsCommand extends BuildIosCommand implements ICommand {
|
|
53
|
-
protected $options: IOptions;
|
|
54
|
-
protected $migrateController: IMigrateController;
|
|
55
|
-
constructor($options: IOptions, $errors: IErrors, $projectData: IProjectData, $platformsDataService: IPlatformsDataService, $devicePlatformsConstants: Mobile.IDevicePlatformsConstants, $buildController: IBuildController, $platformValidationService: IPlatformValidationService, $logger: ILogger, $buildDataService: IBuildDataService, $migrateController: IMigrateController);
|
|
56
|
-
execute(args: string[]): Promise<void>;
|
|
57
|
-
canExecute(args: string[]): Promise<boolean>;
|
|
58
|
-
}
|
|
1
|
+
export declare const iosBuildCommand: import("../common/define-command").NamedCommand<{
|
|
2
|
+
watch: import("../common/define-command").DefaultedCommandOptionSpec<boolean>;
|
|
3
|
+
hmr: import("../common/define-command").DefaultedCommandOptionSpec<boolean>;
|
|
4
|
+
force: import("../common/define-command").CommandOptionSpec<boolean>;
|
|
5
|
+
release: import("../common/define-command").CommandOptionSpec<boolean>;
|
|
6
|
+
aab: import("../common/define-command").CommandOptionSpec<boolean>;
|
|
7
|
+
keyStorePath: import("../common/define-command").CommandOptionSpec<string>;
|
|
8
|
+
keyStorePassword: import("../common/define-command").CommandOptionSpec<string>;
|
|
9
|
+
keyStoreAlias: import("../common/define-command").CommandOptionSpec<string>;
|
|
10
|
+
keyStoreAliasPassword: import("../common/define-command").CommandOptionSpec<string>;
|
|
11
|
+
provision: import("../common/define-command").CommandOptionSpec<any>;
|
|
12
|
+
teamId: import("../common/define-command").CommandOptionSpec<any>;
|
|
13
|
+
}, string, void, "build|ios">;
|
|
14
|
+
export declare const androidBuildCommand: import("../common/define-command").NamedCommand<{
|
|
15
|
+
watch: import("../common/define-command").DefaultedCommandOptionSpec<boolean>;
|
|
16
|
+
hmr: import("../common/define-command").DefaultedCommandOptionSpec<boolean>;
|
|
17
|
+
force: import("../common/define-command").CommandOptionSpec<boolean>;
|
|
18
|
+
release: import("../common/define-command").CommandOptionSpec<boolean>;
|
|
19
|
+
aab: import("../common/define-command").CommandOptionSpec<boolean>;
|
|
20
|
+
keyStorePath: import("../common/define-command").CommandOptionSpec<string>;
|
|
21
|
+
keyStorePassword: import("../common/define-command").CommandOptionSpec<string>;
|
|
22
|
+
keyStoreAlias: import("../common/define-command").CommandOptionSpec<string>;
|
|
23
|
+
keyStoreAliasPassword: import("../common/define-command").CommandOptionSpec<string>;
|
|
24
|
+
provision: import("../common/define-command").CommandOptionSpec<any>;
|
|
25
|
+
teamId: import("../common/define-command").CommandOptionSpec<any>;
|
|
26
|
+
}, string, void, "build|android">;
|
|
27
|
+
export declare const visionBuildCommand: import("../common/define-command").NamedCommand<{
|
|
28
|
+
watch: import("../common/define-command").DefaultedCommandOptionSpec<boolean>;
|
|
29
|
+
hmr: import("../common/define-command").DefaultedCommandOptionSpec<boolean>;
|
|
30
|
+
force: import("../common/define-command").CommandOptionSpec<boolean>;
|
|
31
|
+
release: import("../common/define-command").CommandOptionSpec<boolean>;
|
|
32
|
+
aab: import("../common/define-command").CommandOptionSpec<boolean>;
|
|
33
|
+
keyStorePath: import("../common/define-command").CommandOptionSpec<string>;
|
|
34
|
+
keyStorePassword: import("../common/define-command").CommandOptionSpec<string>;
|
|
35
|
+
keyStoreAlias: import("../common/define-command").CommandOptionSpec<string>;
|
|
36
|
+
keyStoreAliasPassword: import("../common/define-command").CommandOptionSpec<string>;
|
|
37
|
+
provision: import("../common/define-command").CommandOptionSpec<any>;
|
|
38
|
+
teamId: import("../common/define-command").CommandOptionSpec<any>;
|
|
39
|
+
}, string, void, readonly ["build|vision", "build|visionos"]>;
|
package/lib/commands/build.js
CHANGED
|
@@ -1,146 +1,82 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.visionBuildCommand = exports.androidBuildCommand = exports.iosBuildCommand = void 0;
|
|
4
4
|
const constants_1 = require("../constants");
|
|
5
5
|
const command_base_1 = require("./command-base");
|
|
6
6
|
const helpers_1 = require("../common/helpers");
|
|
7
|
-
const
|
|
8
|
-
const
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
const
|
|
30
|
-
const
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
}
|
|
42
|
-
const result = await this.$platformValidationService.validateOptions(this.$options.provision, this.$options.teamId, this.$projectData, platform);
|
|
43
|
-
return result;
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
exports.BuildCommandBase = BuildCommandBase;
|
|
47
|
-
class BuildIosCommand extends BuildCommandBase {
|
|
48
|
-
constructor($options, $errors, $projectData, $platformsDataService, $devicePlatformsConstants, $buildController, $platformValidationService, $logger, $buildDataService, $migrateController) {
|
|
49
|
-
super($options, $errors, $projectData, $platformsDataService, $devicePlatformsConstants, $buildController, $platformValidationService, $buildDataService, $logger);
|
|
50
|
-
this.$options = $options;
|
|
51
|
-
this.$migrateController = $migrateController;
|
|
52
|
-
this.allowedParameters = [];
|
|
53
|
-
}
|
|
54
|
-
async execute(args) {
|
|
55
|
-
await this.executeCore([this.$devicePlatformsConstants.iOS.toLowerCase()]);
|
|
56
|
-
}
|
|
57
|
-
async canExecute(args) {
|
|
58
|
-
const platform = this.$devicePlatformsConstants.iOS;
|
|
59
|
-
if (!this.$options.force) {
|
|
60
|
-
await this.$migrateController.validate({
|
|
61
|
-
projectDir: this.$projectData.projectDir,
|
|
7
|
+
const define_command_1 = require("../common/define-command");
|
|
8
|
+
const di_1 = require("../common/di");
|
|
9
|
+
const project_data_1 = require("../contracts/project-data");
|
|
10
|
+
const buildCommandOptions = {
|
|
11
|
+
...command_base_1.platformSigningOptions,
|
|
12
|
+
watch: (0, define_command_1.booleanOption)({ default: false }),
|
|
13
|
+
hmr: (0, define_command_1.booleanOption)({ default: false }),
|
|
14
|
+
force: (0, define_command_1.booleanOption)(),
|
|
15
|
+
release: (0, define_command_1.booleanOption)(),
|
|
16
|
+
aab: (0, define_command_1.booleanOption)(),
|
|
17
|
+
keyStorePath: (0, define_command_1.stringOption)(),
|
|
18
|
+
keyStorePassword: (0, define_command_1.stringOption)(),
|
|
19
|
+
keyStoreAlias: (0, define_command_1.stringOption)(),
|
|
20
|
+
keyStoreAliasPassword: (0, define_command_1.stringOption)(),
|
|
21
|
+
};
|
|
22
|
+
const defineBuildCommand = (name, buildPlatform) => (0, define_command_1.defineCommand)({
|
|
23
|
+
name,
|
|
24
|
+
description: "Builds the project for the selected target platform.",
|
|
25
|
+
options: buildCommandOptions,
|
|
26
|
+
params: "none",
|
|
27
|
+
providers: [(0, command_base_1.provideProject)()],
|
|
28
|
+
async canExecute(context) {
|
|
29
|
+
const $devicePlatformsConstants = (0, di_1.inject)("devicePlatformsConstants");
|
|
30
|
+
const $migrateController = (0, di_1.inject)("migrateController");
|
|
31
|
+
const $platformValidationService = (0, di_1.inject)("platformValidationService");
|
|
32
|
+
const $projectData = (0, di_1.inject)(project_data_1.ProjectData);
|
|
33
|
+
const platform = $devicePlatformsConstants[buildPlatform];
|
|
34
|
+
const isAndroid = $devicePlatformsConstants.isAndroid(platform);
|
|
35
|
+
const $androidBundleValidatorHelper = isAndroid
|
|
36
|
+
? (0, di_1.inject)("androidBundleValidatorHelper")
|
|
37
|
+
: null;
|
|
38
|
+
if (!context.options.force) {
|
|
39
|
+
await $migrateController.validate({
|
|
40
|
+
projectDir: $projectData.projectDir,
|
|
62
41
|
platforms: [platform],
|
|
63
42
|
});
|
|
64
43
|
}
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
if (canExecute) {
|
|
68
|
-
canExecute = await super.validateArgs(args, platform);
|
|
44
|
+
if (isAndroid) {
|
|
45
|
+
$androidBundleValidatorHelper.validateRuntimeVersion($projectData);
|
|
69
46
|
}
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
}
|
|
73
|
-
exports.BuildIosCommand = BuildIosCommand;
|
|
74
|
-
yok_1.injector.registerCommand("build|ios", BuildIosCommand);
|
|
75
|
-
class BuildAndroidCommand extends BuildCommandBase {
|
|
76
|
-
constructor($options, $errors, $projectData, platformsDataService, $devicePlatformsConstants, $buildController, $platformValidationService, $androidBundleValidatorHelper, $buildDataService, $logger, $migrateController) {
|
|
77
|
-
super($options, $errors, $projectData, platformsDataService, $devicePlatformsConstants, $buildController, $platformValidationService, $buildDataService, $logger);
|
|
78
|
-
this.$options = $options;
|
|
79
|
-
this.$errors = $errors;
|
|
80
|
-
this.$androidBundleValidatorHelper = $androidBundleValidatorHelper;
|
|
81
|
-
this.$logger = $logger;
|
|
82
|
-
this.$migrateController = $migrateController;
|
|
83
|
-
this.allowedParameters = [];
|
|
84
|
-
}
|
|
85
|
-
async execute(args) {
|
|
86
|
-
await this.executeCore([
|
|
87
|
-
this.$devicePlatformsConstants.Android.toLowerCase(),
|
|
88
|
-
]);
|
|
89
|
-
if (this.$options.aab) {
|
|
90
|
-
this.$logger.info(constants_1.AndroidAppBundleMessages.ANDROID_APP_BUNDLE_DOCS_MESSAGE);
|
|
91
|
-
if (this.$options.release) {
|
|
92
|
-
this.$logger.info(constants_1.AndroidAppBundleMessages.ANDROID_APP_BUNDLE_PUBLISH_DOCS_MESSAGE);
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
async canExecute(args) {
|
|
97
|
-
const platform = this.$devicePlatformsConstants.Android;
|
|
98
|
-
if (!this.$options.force) {
|
|
99
|
-
await this.$migrateController.validate({
|
|
100
|
-
projectDir: this.$projectData.projectDir,
|
|
101
|
-
platforms: [platform],
|
|
102
|
-
});
|
|
47
|
+
else if (!$platformValidationService.isPlatformSupportedForOS(platform, $projectData)) {
|
|
48
|
+
context.fail(`Applications for platform ${platform} can not be built on this OS`, { help: false });
|
|
103
49
|
}
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
if (canExecute) {
|
|
107
|
-
if (this.$options.release && !(0, helpers_1.hasValidAndroidSigning)(this.$options)) {
|
|
108
|
-
this.$errors.failWithHelp(constants_1.ANDROID_RELEASE_BUILD_ERROR_MESSAGE);
|
|
109
|
-
}
|
|
110
|
-
canExecute = await super.validateArgs(args, platform);
|
|
50
|
+
if (!(await (0, command_base_1.canExecuteCommandBase)(context, platform))) {
|
|
51
|
+
return false;
|
|
111
52
|
}
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
yok_1.injector.registerCommand("build|android", BuildAndroidCommand);
|
|
117
|
-
class BuildVisionOsCommand extends BuildIosCommand {
|
|
118
|
-
constructor($options, $errors, $projectData, $platformsDataService, $devicePlatformsConstants, $buildController, $platformValidationService, $logger, $buildDataService, $migrateController) {
|
|
119
|
-
super($options, $errors, $projectData, $platformsDataService, $devicePlatformsConstants, $buildController, $platformValidationService, $logger, $buildDataService, $migrateController);
|
|
120
|
-
this.$options = $options;
|
|
121
|
-
this.$migrateController = $migrateController;
|
|
122
|
-
}
|
|
123
|
-
async execute(args) {
|
|
124
|
-
await this.executeCore([
|
|
125
|
-
this.$devicePlatformsConstants.visionOS.toLowerCase(),
|
|
126
|
-
]);
|
|
127
|
-
}
|
|
128
|
-
async canExecute(args) {
|
|
129
|
-
const platform = this.$devicePlatformsConstants.visionOS;
|
|
130
|
-
if (!this.$options.force) {
|
|
131
|
-
await this.$migrateController.validate({
|
|
132
|
-
projectDir: this.$projectData.projectDir,
|
|
133
|
-
platforms: [platform],
|
|
134
|
-
});
|
|
53
|
+
if (isAndroid &&
|
|
54
|
+
context.options.release &&
|
|
55
|
+
!(0, helpers_1.hasValidAndroidSigning)(context.options)) {
|
|
56
|
+
context.fail(constants_1.ANDROID_RELEASE_BUILD_ERROR_MESSAGE);
|
|
135
57
|
}
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
58
|
+
return (0, command_base_1.validatePlatformOptions)(context, platform);
|
|
59
|
+
},
|
|
60
|
+
async run(context) {
|
|
61
|
+
const $buildController = (0, di_1.inject)("buildController");
|
|
62
|
+
const $buildDataService = (0, di_1.inject)("buildDataService");
|
|
63
|
+
const $devicePlatformsConstants = (0, di_1.inject)("devicePlatformsConstants");
|
|
64
|
+
const $logger = (0, di_1.inject)("logger");
|
|
65
|
+
const $options = (0, di_1.inject)("options");
|
|
66
|
+
const $projectData = (0, di_1.inject)(project_data_1.ProjectData);
|
|
67
|
+
const platform = $devicePlatformsConstants[buildPlatform];
|
|
68
|
+
const isAndroid = $devicePlatformsConstants.isAndroid(platform);
|
|
69
|
+
const buildData = $buildDataService.getBuildData($projectData.projectDir, platform.toLowerCase(), $options);
|
|
70
|
+
const outputPath = await $buildController.prepareAndBuild(buildData);
|
|
71
|
+
if (isAndroid && context.options.aab) {
|
|
72
|
+
$logger.info(constants_1.AndroidAppBundleMessages.ANDROID_APP_BUNDLE_DOCS_MESSAGE);
|
|
73
|
+
if (context.options.release) {
|
|
74
|
+
$logger.info(constants_1.AndroidAppBundleMessages.ANDROID_APP_BUNDLE_PUBLISH_DOCS_MESSAGE);
|
|
75
|
+
}
|
|
140
76
|
}
|
|
141
|
-
return
|
|
142
|
-
}
|
|
143
|
-
}
|
|
144
|
-
exports.
|
|
145
|
-
|
|
146
|
-
|
|
77
|
+
return outputPath;
|
|
78
|
+
},
|
|
79
|
+
});
|
|
80
|
+
exports.iosBuildCommand = defineBuildCommand("build|ios", "iOS");
|
|
81
|
+
exports.androidBuildCommand = defineBuildCommand("build|android", "Android");
|
|
82
|
+
exports.visionBuildCommand = defineBuildCommand(["build|vision", "build|visionos"], "visionOS");
|
package/lib/commands/clean.d.ts
CHANGED
|
@@ -1,22 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
import { IChildProcess } from "../common/declarations";
|
|
6
|
-
export declare class CleanCommand implements ICommand {
|
|
7
|
-
private $projectCleanupService;
|
|
8
|
-
private $projectConfigService;
|
|
9
|
-
private $projectData;
|
|
10
|
-
private $terminalSpinnerService;
|
|
11
|
-
private $projectService;
|
|
12
|
-
private $prompter;
|
|
13
|
-
private $logger;
|
|
14
|
-
private $options;
|
|
15
|
-
private $childProcess;
|
|
16
|
-
private $staticConfig;
|
|
17
|
-
allowedParameters: ICommandParameter[];
|
|
18
|
-
constructor($projectCleanupService: IProjectCleanupService, $projectConfigService: IProjectConfigService, $projectData: IProjectData, $terminalSpinnerService: ITerminalSpinnerService, $projectService: IProjectService, $prompter: IPrompter, $logger: ILogger, $options: IOptions, $childProcess: IChildProcess, $staticConfig: IStaticConfig);
|
|
19
|
-
execute(args: string[]): Promise<void>;
|
|
20
|
-
private cleanMultipleProjects;
|
|
21
|
-
private getNSProjectPathsInDirectory;
|
|
22
|
-
}
|
|
1
|
+
export declare const cleanCommandDefinition: import("../common/define-command").NamedCommand<{
|
|
2
|
+
dryRun: import("../common/define-command").CommandOptionSpec<boolean>;
|
|
3
|
+
json: import("../common/define-command").CommandOptionSpec<boolean>;
|
|
4
|
+
}, void, void, "clean">;
|