nativescript 8.5.3 → 8.5.4-dev.1
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/config.json +0 -5
- package/lib/.d.ts +2 -37
- package/lib/bootstrap.js +1 -12
- package/lib/color.js +5 -0
- package/lib/commands/build.js +2 -6
- package/lib/commands/clean.js +11 -10
- package/lib/commands/config.js +6 -5
- package/lib/commands/create-project.js +12 -11
- package/lib/commands/debug.js +10 -11
- package/lib/commands/plugin/list-plugins.js +3 -2
- package/lib/commands/post-install.js +3 -5
- package/lib/commands/preview.js +4 -3
- package/lib/commands/run.js +17 -19
- package/lib/commands/test-init.js +14 -15
- package/lib/commands/test.js +0 -3
- package/lib/commands/update.js +1 -1
- package/lib/common/bootstrap.js +0 -1
- package/lib/common/child-process.js +3 -3
- package/lib/common/codeGeneration/code-printer.js +1 -1
- package/lib/common/commands/device/device-log-stream.js +1 -1
- package/lib/common/commands/device/list-devices.js +7 -8
- package/lib/common/commands/generate-messages.js +1 -1
- package/lib/common/constants.js +11 -11
- package/lib/common/declarations.d.ts +1 -53
- package/lib/common/definitions/commands-service.d.ts +0 -1
- package/lib/common/definitions/commands.d.ts +0 -1
- package/lib/common/definitions/google-analytics.d.ts +0 -5
- package/lib/common/dispatchers.js +4 -7
- package/lib/common/file-system.js +18 -22
- package/lib/common/host-info.js +4 -4
- package/lib/common/http-client.js +2 -2
- package/lib/common/logger/layouts/cli-layout.js +6 -2
- package/lib/common/logger/logger.js +7 -7
- package/lib/common/mobile/android/android-debug-bridge-result-handler.js +1 -1
- package/lib/common/mobile/android/android-log-filter.js +5 -5
- package/lib/common/mobile/android/android-virtual-device-service.js +2 -2
- package/lib/common/mobile/android/genymotion/genymotion-service.js +2 -2
- package/lib/common/mobile/android/logcat-helper.js +1 -1
- package/lib/common/mobile/device-log-provider.js +8 -8
- package/lib/common/mobile/ios/device/ios-device-file-system.js +1 -1
- package/lib/common/mobile/ios/simulator/ios-emulator-services.js +1 -1
- package/lib/common/mobile/ios/simulator/ios-sim-resolver.js +1 -1
- package/lib/common/mobile/mobile-helper.js +1 -1
- package/lib/common/mobile/wp8/wp8-emulator-services.js +4 -4
- package/lib/common/opener.js +5 -1
- package/lib/common/plist-parser.js +3 -3
- package/lib/common/project-helper.js +2 -2
- package/lib/common/services/analytics/google-analytics-custom-dimensions.d.ts +7 -7
- package/lib/common/services/auto-completion-service.js +2 -2
- package/lib/common/services/commands-service.js +5 -114
- package/lib/common/services/help-service.js +16 -16
- package/lib/common/services/hooks-service.js +2 -1
- package/lib/common/services/json-file-settings-service.js +3 -3
- package/lib/common/services/lock-service.js +5 -5
- package/lib/common/services/messages-service.js +6 -6
- package/lib/common/services/net-service.js +1 -1
- package/lib/common/services/project-files-manager.js +2 -2
- package/lib/common/services/settings-service.js +2 -2
- package/lib/common/validators/project-name-validator.js +1 -1
- package/lib/common/validators/validation-result.js +1 -1
- package/lib/common/verify-node-version.js +2 -2
- package/lib/config.js +3 -8
- package/lib/constants.js +18 -32
- package/lib/controllers/build-controller.js +5 -5
- package/lib/controllers/debug-controller.js +2 -2
- package/lib/controllers/migrate-controller.js +21 -20
- package/lib/controllers/update-controller.js +5 -4
- package/lib/declarations.d.ts +0 -24
- package/lib/definitions/build.d.ts +1 -1
- package/lib/definitions/livesync.d.ts +0 -10
- package/lib/definitions/project.d.ts +0 -6
- package/lib/definitions/xcode.d.ts +1 -1
- package/lib/device-sockets/ios/app-debug-socket-proxy-factory.js +15 -4
- package/lib/device-sockets/ios/notification.js +1 -1
- package/lib/helpers/android-bundle-validator-helper.js +1 -1
- package/lib/helpers/network-connectivity-validator.js +1 -1
- package/lib/helpers/options-track-helper.js +1 -1
- package/lib/nativescript-cli.js +8 -10
- package/lib/options.js +61 -21
- package/lib/package-installation-manager.js +5 -4
- package/lib/project-data.js +9 -10
- package/lib/providers/project-files-provider.js +3 -3
- package/lib/services/analytics/analytics-broker-process.js +0 -3
- package/lib/services/analytics/analytics-broker.js +5 -5
- package/lib/services/analytics/analytics-service.js +0 -4
- package/lib/services/analytics/analytics.d.ts +1 -8
- package/lib/services/analytics/google-analytics-provider.js +1 -21
- package/lib/services/analytics-settings-service.js +3 -11
- package/lib/services/android-device-debug-service.js +3 -3
- package/lib/services/android-plugin-build-service.js +3 -3
- package/lib/services/android-resources-migration-service.js +1 -1
- package/lib/services/assets-generation/assets-generation-service.js +5 -5
- package/lib/services/{build-artefacts-service.js → build-artifacts-service.js} +4 -4
- package/lib/services/cocoapods-service.js +1 -1
- package/lib/services/device/device-install-app-service.js +3 -3
- package/lib/services/doctor-service.js +10 -9
- package/lib/services/extensibility-service.js +8 -8
- package/lib/services/ios-entitlements-service.js +1 -1
- package/lib/services/ios-project-service.js +5 -5
- package/lib/services/ios-provision-service.js +7 -7
- package/lib/services/ios-watch-app-service.js +1 -1
- package/lib/services/ip-service.js +2 -4
- package/lib/services/itmstransporter-service.js +2 -2
- package/lib/services/livesync/android-device-livesync-sockets-service.js +1 -1
- package/lib/services/livesync/android-livesync-tool.js +5 -5
- package/lib/services/livesync/ios-device-livesync-service.js +2 -2
- package/lib/services/livesync/platform-livesync-service-base.js +2 -1
- package/lib/services/log-parser-service.js +1 -5
- package/lib/services/log-source-map-service.js +10 -7
- package/lib/services/npm-config-service.js +23 -9
- package/lib/services/performance-service.js +3 -3
- package/lib/services/platform-environment-requirements.js +1 -1
- package/lib/services/plugins-service.js +19 -19
- package/lib/services/project-backup-service.js +4 -3
- package/lib/services/project-cleanup-service.js +4 -3
- package/lib/services/test-execution-service.js +2 -2
- package/lib/services/timeline-profiler-service.js +4 -1
- package/lib/services/user-settings-service.js +4 -4
- package/lib/tools/config-manipulation/config-transformer.js +3 -3
- package/lib/tools/node-modules/node-modules-builder.js +1 -1
- package/node_modules/@npmcli/move-file/LICENSE.md +22 -0
- package/node_modules/@npmcli/move-file/README.md +69 -0
- package/node_modules/@npmcli/move-file/lib/index.js +185 -0
- package/node_modules/@npmcli/move-file/node_modules/mkdirp/CHANGELOG.md +15 -0
- package/node_modules/@npmcli/move-file/node_modules/mkdirp/LICENSE +21 -0
- package/node_modules/@npmcli/move-file/node_modules/mkdirp/bin/cmd.js +68 -0
- package/node_modules/@npmcli/move-file/node_modules/mkdirp/index.js +31 -0
- package/node_modules/@npmcli/move-file/node_modules/mkdirp/lib/find-made.js +29 -0
- package/node_modules/@npmcli/move-file/node_modules/mkdirp/lib/mkdirp-manual.js +64 -0
- package/node_modules/@npmcli/move-file/node_modules/mkdirp/lib/mkdirp-native.js +39 -0
- package/node_modules/@npmcli/move-file/node_modules/mkdirp/lib/opts-arg.js +23 -0
- package/node_modules/@npmcli/move-file/node_modules/mkdirp/lib/path-arg.js +29 -0
- package/node_modules/@npmcli/move-file/node_modules/mkdirp/lib/use-native.js +10 -0
- package/node_modules/@npmcli/move-file/node_modules/mkdirp/package.json +44 -0
- package/node_modules/@npmcli/move-file/node_modules/mkdirp/readme.markdown +266 -0
- package/node_modules/@npmcli/move-file/package.json +47 -0
- package/node_modules/balanced-match/.npmignore +5 -0
- package/node_modules/balanced-match/LICENSE.md +21 -0
- package/node_modules/balanced-match/README.md +91 -0
- package/node_modules/balanced-match/index.js +59 -0
- package/node_modules/balanced-match/package.json +49 -0
- package/node_modules/brace-expansion/LICENSE +21 -0
- package/node_modules/brace-expansion/README.md +129 -0
- package/node_modules/brace-expansion/index.js +201 -0
- package/node_modules/brace-expansion/package.json +47 -0
- package/node_modules/concat-map/.travis.yml +4 -0
- package/node_modules/concat-map/LICENSE +18 -0
- package/node_modules/concat-map/README.markdown +62 -0
- package/node_modules/concat-map/example/map.js +6 -0
- package/node_modules/concat-map/index.js +13 -0
- package/node_modules/concat-map/package.json +43 -0
- package/node_modules/concat-map/test/map.js +39 -0
- package/node_modules/fs.realpath/LICENSE +43 -0
- package/node_modules/fs.realpath/README.md +33 -0
- package/node_modules/fs.realpath/index.js +66 -0
- package/node_modules/fs.realpath/old.js +303 -0
- package/node_modules/fs.realpath/package.json +26 -0
- package/node_modules/inflight/LICENSE +15 -0
- package/node_modules/inflight/README.md +37 -0
- package/node_modules/inflight/inflight.js +54 -0
- package/node_modules/inflight/package.json +29 -0
- package/node_modules/inherits/LICENSE +16 -0
- package/node_modules/inherits/README.md +42 -0
- package/node_modules/inherits/inherits.js +9 -0
- package/node_modules/inherits/inherits_browser.js +27 -0
- package/node_modules/inherits/package.json +29 -0
- package/node_modules/once/LICENSE +15 -0
- package/node_modules/once/README.md +79 -0
- package/node_modules/once/once.js +42 -0
- package/node_modules/once/package.json +33 -0
- package/node_modules/path-is-absolute/index.js +20 -0
- package/node_modules/path-is-absolute/license +21 -0
- package/node_modules/path-is-absolute/package.json +43 -0
- package/node_modules/path-is-absolute/readme.md +59 -0
- package/node_modules/rimraf/CHANGELOG.md +65 -0
- package/node_modules/rimraf/LICENSE +15 -0
- package/node_modules/rimraf/README.md +101 -0
- package/node_modules/rimraf/bin.js +68 -0
- package/node_modules/rimraf/node_modules/glob/LICENSE +21 -0
- package/node_modules/rimraf/node_modules/glob/README.md +378 -0
- package/node_modules/rimraf/node_modules/glob/common.js +238 -0
- package/node_modules/rimraf/node_modules/glob/glob.js +790 -0
- package/node_modules/rimraf/node_modules/glob/package.json +55 -0
- package/node_modules/rimraf/node_modules/glob/sync.js +486 -0
- package/node_modules/rimraf/node_modules/minimatch/LICENSE +15 -0
- package/node_modules/rimraf/node_modules/minimatch/README.md +230 -0
- package/node_modules/rimraf/node_modules/minimatch/minimatch.js +947 -0
- package/node_modules/rimraf/node_modules/minimatch/package.json +33 -0
- package/node_modules/rimraf/package.json +32 -0
- package/node_modules/rimraf/rimraf.js +360 -0
- package/node_modules/stringify-package/CHANGELOG.md +16 -0
- package/node_modules/stringify-package/LICENSE +13 -0
- package/node_modules/stringify-package/README.md +55 -0
- package/node_modules/stringify-package/index.js +18 -0
- package/node_modules/stringify-package/package.json +38 -0
- package/node_modules/wrappy/LICENSE +15 -0
- package/node_modules/wrappy/README.md +36 -0
- package/node_modules/wrappy/package.json +29 -0
- package/node_modules/wrappy/wrappy.js +33 -0
- package/package.json +88 -89
- package/lib/common/definitions/byline.d.ts +0 -4
- package/lib/common/definitions/colors.d.ts +0 -24
- package/lib/common/definitions/marked.d.ts +0 -125
- package/lib/common/definitions/open.d.ts +0 -5
- package/lib/common/definitions/osenv.d.ts +0 -4
- package/lib/common/definitions/plist.d.ts +0 -7
- package/lib/common/definitions/rimraf.d.ts +0 -9
- package/lib/common/definitions/shelljs.d.ts +0 -583
- package/lib/common/definitions/simple-plist.d.ts +0 -7
- package/lib/common/definitions/xmlhttprequest.d.ts +0 -29
- package/lib/controllers/company-insights-controller.js +0 -78
- package/lib/controllers/preview-app-controller.js +0 -251
- package/lib/definitions/company-insights-controller.d.ts +0 -59
- package/lib/definitions/email-validator.d.ts +0 -8
- package/lib/definitions/libnpmconfig.d.ts +0 -3
- package/lib/definitions/npm.d.ts +0 -12
- package/lib/definitions/preview-app-livesync.d.ts +0 -116
- package/lib/services/livesync/playground/devices/preview-devices-service.js +0 -67
- package/lib/services/livesync/playground/preview-app-constants.js +0 -23
- package/lib/services/livesync/playground/preview-app-files-service.js +0 -83
- package/lib/services/livesync/playground/preview-app-log-provider.js +0 -14
- package/lib/services/livesync/playground/preview-app-plugins-service.js +0 -134
- package/lib/services/livesync/playground/preview-qr-code-service.js +0 -109
- package/lib/services/livesync/playground/preview-schema-service.js +0 -57
- package/lib/services/livesync/playground/preview-sdk-service.js +0 -112
- package/lib/services/playground-service.js +0 -65
- package/lib/xml-validator.js +0 -47
|
@@ -152,6 +152,11 @@ class AppDebugSocketProxyFactory extends events_1.EventEmitter {
|
|
|
152
152
|
packets.on("data", (buffer) => {
|
|
153
153
|
const message = buffer.toString(encoding);
|
|
154
154
|
if (webSocket.readyState === webSocket.OPEN) {
|
|
155
|
+
if (process.env.DEBUG_DEVTOOLS_SOCKETS) {
|
|
156
|
+
console.log({
|
|
157
|
+
msgFromRuntime: JSON.parse(message),
|
|
158
|
+
});
|
|
159
|
+
}
|
|
155
160
|
webSocket.send(message);
|
|
156
161
|
}
|
|
157
162
|
else {
|
|
@@ -165,20 +170,26 @@ class AppDebugSocketProxyFactory extends events_1.EventEmitter {
|
|
|
165
170
|
this.$logger.trace("Error on debugger deviceSocket", err);
|
|
166
171
|
});
|
|
167
172
|
webSocket.on("message", (message) => {
|
|
168
|
-
const
|
|
173
|
+
const msg = message.toString();
|
|
174
|
+
if (process.env.DEBUG_DEVTOOLS_SOCKETS) {
|
|
175
|
+
console.log({
|
|
176
|
+
msgFromDevtools: JSON.parse(msg),
|
|
177
|
+
});
|
|
178
|
+
}
|
|
179
|
+
const length = Buffer.byteLength(msg, encoding);
|
|
169
180
|
const payload = Buffer.allocUnsafe(length + 4);
|
|
170
181
|
payload.writeInt32BE(length, 0);
|
|
171
|
-
payload.write(
|
|
182
|
+
payload.write(msg, 4, length, encoding);
|
|
172
183
|
appDebugSocket.write(payload);
|
|
173
184
|
});
|
|
174
185
|
appDebugSocket.on("close", () => {
|
|
175
186
|
currentAppSocket = null;
|
|
176
|
-
this.$logger.
|
|
187
|
+
this.$logger.trace("Backend socket closed!");
|
|
177
188
|
webSocket.close();
|
|
178
189
|
});
|
|
179
190
|
webSocket.on("close", () => __awaiter(this, void 0, void 0, function* () {
|
|
180
191
|
currentWebSocket = null;
|
|
181
|
-
this.$logger.
|
|
192
|
+
this.$logger.trace("Frontend socket closed!");
|
|
182
193
|
appDebugSocket.unpipe(packets);
|
|
183
194
|
packets.destroy();
|
|
184
195
|
yield device.destroyDebugSocket(appId);
|
|
@@ -22,9 +22,9 @@ class IOSNotification extends events_1.EventEmitter {
|
|
|
22
22
|
return `${appId}:NativeScript.Debug.${notification}`;
|
|
23
23
|
}
|
|
24
24
|
}
|
|
25
|
-
exports.IOSNotification = IOSNotification;
|
|
26
25
|
IOSNotification.REFRESH_REQUEST_NOTIFICATION_NAME = "RefreshRequest";
|
|
27
26
|
IOSNotification.APP_REFRESH_STARTED_NOTIFICATION_NAME = "AppRefreshStarted";
|
|
28
27
|
IOSNotification.ATTACH_REQUEST_NOTIFICATION_NAME = "AttachRequest";
|
|
29
28
|
IOSNotification.READY_FOR_ATTACH_NOTIFICATION_NAME = "ReadyForAttach";
|
|
29
|
+
exports.IOSNotification = IOSNotification;
|
|
30
30
|
yok_1.injector.register("iOSNotification", IOSNotification);
|
|
@@ -46,7 +46,7 @@ class AndroidBundleValidatorHelper extends version_validator_helper_1.VersionVal
|
|
|
46
46
|
}
|
|
47
47
|
}
|
|
48
48
|
}
|
|
49
|
-
exports.AndroidBundleValidatorHelper = AndroidBundleValidatorHelper;
|
|
50
49
|
AndroidBundleValidatorHelper.MIN_RUNTIME_VERSION = "5.0.0";
|
|
51
50
|
AndroidBundleValidatorHelper.MIN_ANDROID_WITH_AAB_SUPPORT = "4.4.0";
|
|
51
|
+
exports.AndroidBundleValidatorHelper = AndroidBundleValidatorHelper;
|
|
52
52
|
yok_1.injector.register("androidBundleValidatorHelper", AndroidBundleValidatorHelper);
|
|
@@ -40,8 +40,8 @@ class NetworkConnectivityValidator {
|
|
|
40
40
|
});
|
|
41
41
|
}
|
|
42
42
|
}
|
|
43
|
-
exports.NetworkConnectivityValidator = NetworkConnectivityValidator;
|
|
44
43
|
NetworkConnectivityValidator.DNS_LOOKUP_URL = "play.nativescript.org";
|
|
45
44
|
NetworkConnectivityValidator.NO_INTERNET_ERROR_CODE = "ENOTFOUND";
|
|
46
45
|
NetworkConnectivityValidator.NO_INTERNET_ERROR_MESSAGE = "No internet connection. Check your internet settings and try again.";
|
|
46
|
+
exports.NetworkConnectivityValidator = NetworkConnectivityValidator;
|
|
47
47
|
yok_1.injector.register("networkConnectivityValidator", NetworkConnectivityValidator);
|
|
@@ -80,9 +80,9 @@ class OptionsTracker {
|
|
|
80
80
|
}
|
|
81
81
|
}
|
|
82
82
|
}
|
|
83
|
-
exports.OptionsTracker = OptionsTracker;
|
|
84
83
|
OptionsTracker.PASSWORD_DETECTION_STRING = "password";
|
|
85
84
|
OptionsTracker.PRIVATE_REPLACE_VALUE = "private";
|
|
86
85
|
OptionsTracker.PATH_REPLACE_VALUE = "_localpath";
|
|
87
86
|
OptionsTracker.SIZE_EXEEDED_REPLACE_VALUE = "sizeExceeded";
|
|
87
|
+
exports.OptionsTracker = OptionsTracker;
|
|
88
88
|
yok_1.injector.register("optionsTracker", OptionsTracker);
|
package/lib/nativescript-cli.js
CHANGED
|
@@ -17,21 +17,26 @@ shelljs.config.fatal = true;
|
|
|
17
17
|
const errors_1 = require("./common/errors");
|
|
18
18
|
const helpers_1 = require("./common/helpers");
|
|
19
19
|
const yok_1 = require("./common/yok");
|
|
20
|
+
const color_1 = require("./color");
|
|
20
21
|
(0, errors_1.installUncaughtExceptionListener)(process.exit.bind(process, 120));
|
|
21
22
|
const logger = yok_1.injector.resolve("logger");
|
|
22
23
|
exports.originalProcessOn = process.on.bind(process);
|
|
23
24
|
process.on = (event, listener) => {
|
|
24
25
|
if (event === "SIGINT") {
|
|
25
26
|
logger.trace(`Trying to handle SIGINT event. CLI overrides this behavior and does not allow handling SIGINT as this causes issues with Ctrl + C in terminal.`);
|
|
26
|
-
const msg = "The stackTrace of the location trying to handle SIGINT is
|
|
27
|
+
const msg = "The stackTrace of the location trying to handle SIGINT is";
|
|
27
28
|
const stackTrace = new Error(msg).stack || "";
|
|
28
|
-
logger.trace(stackTrace.replace(`Error: ${msg}`, msg));
|
|
29
|
+
logger.trace(stackTrace.replace(`Error: ${msg}`, `${msg} (${color_1.color.yellow("note:")} this is not an error, just a stack-trace for debugging purposes):`));
|
|
29
30
|
}
|
|
30
31
|
else {
|
|
31
32
|
return (0, exports.originalProcessOn)(event, listener);
|
|
32
33
|
}
|
|
33
34
|
};
|
|
34
35
|
(() => __awaiter(void 0, void 0, void 0, function* () {
|
|
36
|
+
if (process.argv.includes("--get-yargs-completions")) {
|
|
37
|
+
yok_1.injector.resolve("$options");
|
|
38
|
+
return;
|
|
39
|
+
}
|
|
35
40
|
const config = yok_1.injector.resolve("$config");
|
|
36
41
|
const err = yok_1.injector.resolve("$errors");
|
|
37
42
|
err.printCallStack = config.DEBUG;
|
|
@@ -45,13 +50,6 @@ process.on = (event, listener) => {
|
|
|
45
50
|
logger.trace("Unable to load extensions. Error is: ", err);
|
|
46
51
|
}
|
|
47
52
|
const commandDispatcher = yok_1.injector.resolve("commandDispatcher");
|
|
48
|
-
|
|
49
|
-
messages.pathsToMessageJsonFiles = [];
|
|
50
|
-
if (process.argv[2] === "completion") {
|
|
51
|
-
yield commandDispatcher.completeCommand();
|
|
52
|
-
}
|
|
53
|
-
else {
|
|
54
|
-
yield commandDispatcher.dispatchCommand();
|
|
55
|
-
}
|
|
53
|
+
yield commandDispatcher.dispatchCommand();
|
|
56
54
|
yok_1.injector.dispose();
|
|
57
55
|
}))();
|
package/lib/options.js
CHANGED
|
@@ -1,4 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
2
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
12
|
exports.Options = void 0;
|
|
4
13
|
const helpers = require("./common/helpers");
|
|
@@ -7,6 +16,25 @@ const helpers_1 = require("yargs/helpers");
|
|
|
7
16
|
const _ = require("lodash");
|
|
8
17
|
const yok_1 = require("./common/yok");
|
|
9
18
|
class Options {
|
|
19
|
+
setupOptions(commandSpecificDashedOptions) {
|
|
20
|
+
if (commandSpecificDashedOptions) {
|
|
21
|
+
_.extend(this.options, commandSpecificDashedOptions);
|
|
22
|
+
this.setArgv();
|
|
23
|
+
}
|
|
24
|
+
this.argv.bundle = "webpack";
|
|
25
|
+
if (this.initialArgv.release && this.initialArgv.hmr) {
|
|
26
|
+
this.$errors.fail("The options --release and --hmr cannot be used simultaneously.");
|
|
27
|
+
}
|
|
28
|
+
if (this.argv.hmr) {
|
|
29
|
+
this.argv.hmr = !this.argv.release;
|
|
30
|
+
}
|
|
31
|
+
if (this.argv.debugBrk) {
|
|
32
|
+
this.argv.hmr = false;
|
|
33
|
+
}
|
|
34
|
+
if (this.argv.justlaunch) {
|
|
35
|
+
this.argv.hmr = false;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
10
38
|
constructor($errors, $settingsService) {
|
|
11
39
|
this.$errors = $errors;
|
|
12
40
|
this.$settingsService = $settingsService;
|
|
@@ -33,25 +61,6 @@ class Options {
|
|
|
33
61
|
this.options = _.extend({}, this.commonOptions, this.globalOptions);
|
|
34
62
|
this.setArgv();
|
|
35
63
|
}
|
|
36
|
-
setupOptions(commandSpecificDashedOptions) {
|
|
37
|
-
if (commandSpecificDashedOptions) {
|
|
38
|
-
_.extend(this.options, commandSpecificDashedOptions);
|
|
39
|
-
this.setArgv();
|
|
40
|
-
}
|
|
41
|
-
this.argv.bundle = "webpack";
|
|
42
|
-
if (this.initialArgv.release && this.initialArgv.hmr) {
|
|
43
|
-
this.$errors.fail("The options --release and --hmr cannot be used simultaneously.");
|
|
44
|
-
}
|
|
45
|
-
if (this.argv.hmr) {
|
|
46
|
-
this.argv.hmr = !this.argv.release;
|
|
47
|
-
}
|
|
48
|
-
if (this.argv.debugBrk) {
|
|
49
|
-
this.argv.hmr = false;
|
|
50
|
-
}
|
|
51
|
-
if (this.argv.justlaunch) {
|
|
52
|
-
this.argv.hmr = false;
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
64
|
get shorthands() {
|
|
56
65
|
const result = [];
|
|
57
66
|
_.each(_.keys(this.options), (optionName) => {
|
|
@@ -291,7 +300,38 @@ class Options {
|
|
|
291
300
|
_.each(this.options, (value, key) => {
|
|
292
301
|
opts[this.getDashedOptionName(key)] = value;
|
|
293
302
|
});
|
|
294
|
-
const parsed = yargs((0, helpers_1.hideBin)(process.argv))
|
|
303
|
+
const parsed = yargs((0, helpers_1.hideBin)(process.argv))
|
|
304
|
+
.version(false)
|
|
305
|
+
.help(false)
|
|
306
|
+
.completion("completion_generate_script", (current_, argv) => __awaiter(this, void 0, void 0, function* () {
|
|
307
|
+
var _a;
|
|
308
|
+
const args = argv._.slice(1);
|
|
309
|
+
const commands = yok_1.injector
|
|
310
|
+
.getRegisteredCommandsNames(false)
|
|
311
|
+
.filter((c) => c != "/?");
|
|
312
|
+
const currentDepth = args.length > 0 ? args.length - 1 : 0;
|
|
313
|
+
const current = (_a = current_ !== null && current_ !== void 0 ? current_ : args[currentDepth]) !== null && _a !== void 0 ? _a : "";
|
|
314
|
+
const matchGroups = commands.map((c) => c.split("|"));
|
|
315
|
+
const possibleMatches = matchGroups.filter((group) => {
|
|
316
|
+
return group.slice(0, currentDepth).every((g, i) => {
|
|
317
|
+
return g === args[i] || args[i].at(0) === "-";
|
|
318
|
+
});
|
|
319
|
+
});
|
|
320
|
+
const completions = [
|
|
321
|
+
...new Set(possibleMatches
|
|
322
|
+
.map((match) => {
|
|
323
|
+
return match[currentDepth];
|
|
324
|
+
})
|
|
325
|
+
.filter(Boolean)),
|
|
326
|
+
];
|
|
327
|
+
if (current.startsWith("--")) {
|
|
328
|
+
return this.optionNames.filter((o) => o !== "_").map((o) => `--${o}`);
|
|
329
|
+
}
|
|
330
|
+
if (current.startsWith("-")) {
|
|
331
|
+
return this.shorthands.map((o) => `-${o}`);
|
|
332
|
+
}
|
|
333
|
+
return completions;
|
|
334
|
+
}));
|
|
295
335
|
this.initialArgv = parsed.argv;
|
|
296
336
|
this.argv = parsed.options(opts).argv;
|
|
297
337
|
this.$settingsService.setSettings({
|
|
@@ -333,7 +373,7 @@ class Options {
|
|
|
333
373
|
});
|
|
334
374
|
}
|
|
335
375
|
}
|
|
336
|
-
exports.Options = Options;
|
|
337
376
|
Options.DASHED_OPTION_REGEX = /(.+?)([A-Z])(.*)/;
|
|
338
377
|
Options.NONDASHED_OPTION_REGEX = /(.+?)[-]([a-zA-Z])(.*)/;
|
|
378
|
+
exports.Options = Options;
|
|
339
379
|
yok_1.injector.register("options", Options);
|
|
@@ -49,12 +49,13 @@ class PackageInstallationManager {
|
|
|
49
49
|
});
|
|
50
50
|
}
|
|
51
51
|
getMaxSatisfyingVersion(packageName, versionRange) {
|
|
52
|
-
var _a;
|
|
52
|
+
var _a, _b;
|
|
53
53
|
return __awaiter(this, void 0, void 0, function* () {
|
|
54
54
|
const data = yield this.$packageManager.view(packageName, {
|
|
55
55
|
versions: true,
|
|
56
56
|
});
|
|
57
|
-
return
|
|
57
|
+
return (_b = semver
|
|
58
|
+
.maxSatisfying((_a = data === null || data === void 0 ? void 0 : data.versions) !== null && _a !== void 0 ? _a : data, versionRange)) === null || _b === void 0 ? void 0 : _b.toString();
|
|
58
59
|
});
|
|
59
60
|
}
|
|
60
61
|
getMaxSatisfyingVersionSafe(packageName, versionIdentifier) {
|
|
@@ -101,7 +102,7 @@ class PackageInstallationManager {
|
|
|
101
102
|
return yield this.installCore(packageToInstall, pathToSave, version, dependencyType);
|
|
102
103
|
}
|
|
103
104
|
catch (error) {
|
|
104
|
-
this.$logger.
|
|
105
|
+
this.$logger.trace(error);
|
|
105
106
|
throw error;
|
|
106
107
|
}
|
|
107
108
|
});
|
|
@@ -112,7 +113,7 @@ class PackageInstallationManager {
|
|
|
112
113
|
return yield this.$packageManager.uninstall(packageToUninstall, opts, projectDir);
|
|
113
114
|
}
|
|
114
115
|
catch (error) {
|
|
115
|
-
this.$logger.
|
|
116
|
+
this.$logger.trace(error);
|
|
116
117
|
throw error;
|
|
117
118
|
}
|
|
118
119
|
});
|
package/lib/project-data.js
CHANGED
|
@@ -15,6 +15,15 @@ const os_1 = require("os");
|
|
|
15
15
|
const decorators_1 = require("./common/decorators");
|
|
16
16
|
const yok_1 = require("./common/yok");
|
|
17
17
|
class ProjectData {
|
|
18
|
+
get projectId() {
|
|
19
|
+
this.warnProjectId();
|
|
20
|
+
return this.projectIdentifiers.ios;
|
|
21
|
+
}
|
|
22
|
+
set projectId(identifier) {
|
|
23
|
+
this.warnProjectId();
|
|
24
|
+
this.projectIdentifiers.ios = identifier;
|
|
25
|
+
this.projectIdentifiers.android = identifier;
|
|
26
|
+
}
|
|
18
27
|
constructor($fs, $errors, $projectHelper, $staticConfig, $options, $logger, $injector, $androidResourcesMigrationService, $devicePlatformsConstants) {
|
|
19
28
|
this.$fs = $fs;
|
|
20
29
|
this.$errors = $errors;
|
|
@@ -26,15 +35,6 @@ class ProjectData {
|
|
|
26
35
|
this.$androidResourcesMigrationService = $androidResourcesMigrationService;
|
|
27
36
|
this.$devicePlatformsConstants = $devicePlatformsConstants;
|
|
28
37
|
}
|
|
29
|
-
get projectId() {
|
|
30
|
-
this.warnProjectId();
|
|
31
|
-
return this.projectIdentifiers.ios;
|
|
32
|
-
}
|
|
33
|
-
set projectId(identifier) {
|
|
34
|
-
this.warnProjectId();
|
|
35
|
-
this.projectIdentifiers.ios = identifier;
|
|
36
|
-
this.projectIdentifiers.android = identifier;
|
|
37
|
-
}
|
|
38
38
|
get projectConfig() {
|
|
39
39
|
return this.$injector.resolve("projectConfigService");
|
|
40
40
|
}
|
|
@@ -88,7 +88,6 @@ class ProjectData {
|
|
|
88
88
|
this.buildXcconfigPath = path.join(this.appResourcesDirectoryPath, this.$devicePlatformsConstants.iOS, constants.BUILD_XCCONFIG_FILE_NAME);
|
|
89
89
|
this.podfilePath = path.join(this.appResourcesDirectoryPath, this.$devicePlatformsConstants.iOS, constants.PODFILE_NAME);
|
|
90
90
|
this.isShared = !!(this.nsConfig && this.nsConfig.shared);
|
|
91
|
-
this.previewAppSchema = this.nsConfig && this.nsConfig.previewAppSchema;
|
|
92
91
|
this.webpackConfigPath =
|
|
93
92
|
this.nsConfig && this.nsConfig.webpackConfigPath
|
|
94
93
|
? path.resolve(this.projectDir, this.nsConfig.webpackConfigPath)
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.ProjectFilesProvider = void 0;
|
|
4
|
-
const
|
|
4
|
+
const minimatch_1 = require("minimatch");
|
|
5
5
|
const constants = require("../constants");
|
|
6
6
|
const path = require("path");
|
|
7
7
|
const _ = require("lodash");
|
|
@@ -38,9 +38,9 @@ class ProjectFilesProvider extends project_files_provider_base_1.ProjectFilesPro
|
|
|
38
38
|
return mappedFilePath;
|
|
39
39
|
}
|
|
40
40
|
isFileExcluded(filePath) {
|
|
41
|
-
return !!_.find(ProjectFilesProvider.INTERNAL_NONPROJECT_FILES, (pattern) => minimatch(filePath, pattern, { nocase: true }));
|
|
41
|
+
return !!_.find(ProjectFilesProvider.INTERNAL_NONPROJECT_FILES, (pattern) => (0, minimatch_1.minimatch)(filePath, pattern, { nocase: true }));
|
|
42
42
|
}
|
|
43
43
|
}
|
|
44
|
-
exports.ProjectFilesProvider = ProjectFilesProvider;
|
|
45
44
|
ProjectFilesProvider.INTERNAL_NONPROJECT_FILES = ["**/*.ts"];
|
|
45
|
+
exports.ProjectFilesProvider = ProjectFilesProvider;
|
|
46
46
|
yok_1.injector.register("projectFilesProvider", ProjectFilesProvider);
|
|
@@ -47,9 +47,6 @@ process.on("message", (data) => __awaiter(void 0, void 0, void 0, function* () {
|
|
|
47
47
|
analyticsLoggingService.logData({
|
|
48
48
|
message: `analytics-broker-process received message of type: ${JSON.stringify(data)}`,
|
|
49
49
|
});
|
|
50
|
-
if (data.type === "PreviewAppData") {
|
|
51
|
-
return;
|
|
52
|
-
}
|
|
53
50
|
if (data.type === "FinishTracking") {
|
|
54
51
|
yield finishTracking();
|
|
55
52
|
if (process.connected) {
|
|
@@ -18,11 +18,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
18
18
|
exports.AnalyticsBroker = void 0;
|
|
19
19
|
const decorators_1 = require("../../common/decorators");
|
|
20
20
|
class AnalyticsBroker {
|
|
21
|
-
constructor($analyticsSettingsService, $injector, analyticsLoggingService) {
|
|
22
|
-
this.$analyticsSettingsService = $analyticsSettingsService;
|
|
23
|
-
this.$injector = $injector;
|
|
24
|
-
this.analyticsLoggingService = analyticsLoggingService;
|
|
25
|
-
}
|
|
26
21
|
getGoogleAnalyticsProvider() {
|
|
27
22
|
return __awaiter(this, void 0, void 0, function* () {
|
|
28
23
|
const clientId = yield this.$analyticsSettingsService.getClientId();
|
|
@@ -32,6 +27,11 @@ class AnalyticsBroker {
|
|
|
32
27
|
});
|
|
33
28
|
});
|
|
34
29
|
}
|
|
30
|
+
constructor($analyticsSettingsService, $injector, analyticsLoggingService) {
|
|
31
|
+
this.$analyticsSettingsService = $analyticsSettingsService;
|
|
32
|
+
this.$injector = $injector;
|
|
33
|
+
this.analyticsLoggingService = analyticsLoggingService;
|
|
34
|
+
}
|
|
35
35
|
sendDataForTracking(trackInfo) {
|
|
36
36
|
return __awaiter(this, void 0, void 0, function* () {
|
|
37
37
|
try {
|
|
@@ -138,10 +138,6 @@ class AnalyticsService {
|
|
|
138
138
|
yield this.trackInGoogleAnalytics(googleAnalyticsEventData);
|
|
139
139
|
});
|
|
140
140
|
}
|
|
141
|
-
trackPreviewAppData(platform, projectDir) {
|
|
142
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
143
|
-
});
|
|
144
|
-
}
|
|
145
141
|
finishTracking() {
|
|
146
142
|
return __awaiter(this, void 0, void 0, function* () {
|
|
147
143
|
return new Promise((resolve, reject) => {
|
|
@@ -1,8 +1,5 @@
|
|
|
1
1
|
import { TrackingTypes } from "../../common/declarations";
|
|
2
|
-
import {
|
|
3
|
-
IGoogleAnalyticsData,
|
|
4
|
-
IPreviewAppGoogleAnalyticsData,
|
|
5
|
-
} from "../../common/definitions/google-analytics";
|
|
2
|
+
import { IGoogleAnalyticsData } from "../../common/definitions/google-analytics";
|
|
6
3
|
|
|
7
4
|
/**
|
|
8
5
|
* Describes the information that will be passed to analytics for tracking.
|
|
@@ -45,10 +42,6 @@ interface IGoogleAnalyticsTrackingInformation
|
|
|
45
42
|
extends IGoogleAnalyticsData,
|
|
46
43
|
ITrackingInformation {}
|
|
47
44
|
|
|
48
|
-
interface IPreviewAppTrackingInformation
|
|
49
|
-
extends IPreviewAppGoogleAnalyticsData,
|
|
50
|
-
ITrackingInformation {}
|
|
51
|
-
|
|
52
45
|
/**
|
|
53
46
|
* Describes methods required to track in Google Analytics.
|
|
54
47
|
*/
|
|
@@ -22,14 +22,13 @@ const decorators_1 = require("../../common/decorators");
|
|
|
22
22
|
const _ = require("lodash");
|
|
23
23
|
const yok_1 = require("../../common/yok");
|
|
24
24
|
class GoogleAnalyticsProvider {
|
|
25
|
-
constructor(clientId, $staticConfig, $analyticsSettingsService, $logger, $proxyService, $config,
|
|
25
|
+
constructor(clientId, $staticConfig, $analyticsSettingsService, $logger, $proxyService, $config, analyticsLoggingService) {
|
|
26
26
|
this.clientId = clientId;
|
|
27
27
|
this.$staticConfig = $staticConfig;
|
|
28
28
|
this.$analyticsSettingsService = $analyticsSettingsService;
|
|
29
29
|
this.$logger = $logger;
|
|
30
30
|
this.$proxyService = $proxyService;
|
|
31
31
|
this.$config = $config;
|
|
32
|
-
this.$companyInsightsController = $companyInsightsController;
|
|
33
32
|
this.analyticsLoggingService = analyticsLoggingService;
|
|
34
33
|
}
|
|
35
34
|
trackHit(trackInfo) {
|
|
@@ -94,25 +93,6 @@ class GoogleAnalyticsProvider {
|
|
|
94
93
|
["cd4"]: sessionId,
|
|
95
94
|
["cd5"]: "Unknown",
|
|
96
95
|
};
|
|
97
|
-
const playgrounInfo = yield this.$analyticsSettingsService.getPlaygroundInfo();
|
|
98
|
-
if (playgrounInfo && playgrounInfo.id) {
|
|
99
|
-
defaultValues["cd7"] =
|
|
100
|
-
playgrounInfo.id;
|
|
101
|
-
defaultValues["cd8"] = playgrounInfo.usedTutorial.toString();
|
|
102
|
-
}
|
|
103
|
-
const companyData = yield this.$companyInsightsController.getCompanyData();
|
|
104
|
-
if (companyData) {
|
|
105
|
-
defaultValues["cd10"] =
|
|
106
|
-
companyData.name;
|
|
107
|
-
defaultValues["cd11"] =
|
|
108
|
-
companyData.country;
|
|
109
|
-
defaultValues["cd12"] =
|
|
110
|
-
companyData.revenue;
|
|
111
|
-
defaultValues["cd13"] =
|
|
112
|
-
companyData.industries;
|
|
113
|
-
defaultValues["cd14"] =
|
|
114
|
-
companyData.employeeCount;
|
|
115
|
-
}
|
|
116
96
|
customDimensions = _.merge(defaultValues, customDimensions);
|
|
117
97
|
_.each(customDimensions, (value, key) => {
|
|
118
98
|
this.analyticsLoggingService.logData({
|
|
@@ -19,14 +19,14 @@ const helpers_1 = require("../common/helpers");
|
|
|
19
19
|
const decorators_1 = require("../common/decorators");
|
|
20
20
|
const _ = require("lodash");
|
|
21
21
|
const yok_1 = require("../common/yok");
|
|
22
|
+
const color_1 = require("../color");
|
|
22
23
|
class AnalyticsSettingsService {
|
|
23
|
-
constructor($userSettingsService, $staticConfig, $hostInfo, $osInfo, $logger
|
|
24
|
+
constructor($userSettingsService, $staticConfig, $hostInfo, $osInfo, $logger) {
|
|
24
25
|
this.$userSettingsService = $userSettingsService;
|
|
25
26
|
this.$staticConfig = $staticConfig;
|
|
26
27
|
this.$hostInfo = $hostInfo;
|
|
27
28
|
this.$osInfo = $osInfo;
|
|
28
29
|
this.$logger = $logger;
|
|
29
|
-
this.$playgroundService = $playgroundService;
|
|
30
30
|
}
|
|
31
31
|
canDoRequest() {
|
|
32
32
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -39,13 +39,8 @@ class AnalyticsSettingsService {
|
|
|
39
39
|
getClientId() {
|
|
40
40
|
return this.getSettingValueOrDefault(this.$staticConfig.ANALYTICS_INSTALLATION_ID_SETTING_NAME);
|
|
41
41
|
}
|
|
42
|
-
getPlaygroundInfo(projectDir) {
|
|
43
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
44
|
-
return this.$playgroundService.getPlaygroundInfo(projectDir);
|
|
45
|
-
});
|
|
46
|
-
}
|
|
47
42
|
getClientName() {
|
|
48
|
-
return "" + this.$staticConfig.CLIENT_NAME_ALIAS
|
|
43
|
+
return "" + color_1.color.cyan.bold(this.$staticConfig.CLIENT_NAME_ALIAS);
|
|
49
44
|
}
|
|
50
45
|
getUserSessionsCount(projectName) {
|
|
51
46
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -103,9 +98,6 @@ AnalyticsSettingsService.SESSIONS_STARTED_KEY_PREFIX = "SESSIONS_STARTED_";
|
|
|
103
98
|
__decorate([
|
|
104
99
|
(0, decorators_1.exported)("analyticsSettingsService")
|
|
105
100
|
], AnalyticsSettingsService.prototype, "getClientId", null);
|
|
106
|
-
__decorate([
|
|
107
|
-
(0, decorators_1.exported)("analyticsSettingsService")
|
|
108
|
-
], AnalyticsSettingsService.prototype, "getPlaygroundInfo", null);
|
|
109
101
|
__decorate([
|
|
110
102
|
(0, decorators_1.exported)("analyticsSettingsService")
|
|
111
103
|
], AnalyticsSettingsService.prototype, "getUserAgentString", null);
|
|
@@ -23,6 +23,9 @@ const decorators_1 = require("../common/decorators");
|
|
|
23
23
|
const yok_1 = require("../common/yok");
|
|
24
24
|
const _ = require("lodash");
|
|
25
25
|
class AndroidDeviceDebugService extends debug_service_base_1.DebugServiceBase {
|
|
26
|
+
get platform() {
|
|
27
|
+
return "android";
|
|
28
|
+
}
|
|
26
29
|
constructor(device, $devicesService, $cleanupService, $errors, $logger, $androidProcessService, $staticConfig, $net, $deviceLogProvider) {
|
|
27
30
|
super(device, $devicesService);
|
|
28
31
|
this.device = device;
|
|
@@ -36,9 +39,6 @@ class AndroidDeviceDebugService extends debug_service_base_1.DebugServiceBase {
|
|
|
36
39
|
this.$deviceLogProvider = $deviceLogProvider;
|
|
37
40
|
this.deviceIdentifier = device.deviceInfo.identifier;
|
|
38
41
|
}
|
|
39
|
-
get platform() {
|
|
40
|
-
return "android";
|
|
41
|
-
}
|
|
42
42
|
debug(debugData, debugOptions) {
|
|
43
43
|
return __awaiter(this, void 0, void 0, function* () {
|
|
44
44
|
this._packageName = debugData.applicationIdentifier;
|
|
@@ -24,6 +24,9 @@ const yok_1 = require("../common/yok");
|
|
|
24
24
|
const _ = require("lodash");
|
|
25
25
|
const resolve_package_path_1 = require("@rigor789/resolve-package-path");
|
|
26
26
|
class AndroidPluginBuildService {
|
|
27
|
+
get $platformsDataService() {
|
|
28
|
+
return this.$injector.resolve("platformsDataService");
|
|
29
|
+
}
|
|
27
30
|
constructor($fs, $childProcess, $hostInfo, $androidToolsInfo, $logger, $packageManager, $projectData, $projectDataService, $devicePlatformsConstants, $errors, $filesHashService, $hooksService, $injector, $watchIgnoreListService) {
|
|
28
31
|
this.$fs = $fs;
|
|
29
32
|
this.$childProcess = $childProcess;
|
|
@@ -40,9 +43,6 @@ class AndroidPluginBuildService {
|
|
|
40
43
|
this.$injector = $injector;
|
|
41
44
|
this.$watchIgnoreListService = $watchIgnoreListService;
|
|
42
45
|
}
|
|
43
|
-
get $platformsDataService() {
|
|
44
|
-
return this.$injector.resolve("platformsDataService");
|
|
45
|
-
}
|
|
46
46
|
getAndroidSourceDirectories(source) {
|
|
47
47
|
const directories = [constants_1.RESOURCES_DIR, "java", constants_1.ASSETS_DIR, "jniLibs"];
|
|
48
48
|
const resultArr = [];
|
|
@@ -97,8 +97,8 @@ class AndroidResourcesMigrationService {
|
|
|
97
97
|
}
|
|
98
98
|
}
|
|
99
99
|
}
|
|
100
|
-
exports.AndroidResourcesMigrationService = AndroidResourcesMigrationService;
|
|
101
100
|
AndroidResourcesMigrationService.ANDROID_DIR = "Android";
|
|
102
101
|
AndroidResourcesMigrationService.ANDROID_DIR_TEMP = "Android-Updated";
|
|
103
102
|
AndroidResourcesMigrationService.ANDROID_DIR_OLD = "Android-Pre-v4";
|
|
103
|
+
exports.AndroidResourcesMigrationService = AndroidResourcesMigrationService;
|
|
104
104
|
yok_1.injector.register("androidResourcesMigrationService", AndroidResourcesMigrationService);
|
|
@@ -24,17 +24,17 @@ const _ = require("lodash");
|
|
|
24
24
|
const yok_1 = require("../../common/yok");
|
|
25
25
|
const os_1 = require("os");
|
|
26
26
|
class AssetsGenerationService {
|
|
27
|
-
constructor($logger, $projectDataService, $fs) {
|
|
28
|
-
this.$logger = $logger;
|
|
29
|
-
this.$projectDataService = $projectDataService;
|
|
30
|
-
this.$fs = $fs;
|
|
31
|
-
}
|
|
32
27
|
get propertiesToEnumerate() {
|
|
33
28
|
return {
|
|
34
29
|
icon: ["icons"],
|
|
35
30
|
splash: ["splashBackgrounds", "splashCenterImages", "splashImages"],
|
|
36
31
|
};
|
|
37
32
|
}
|
|
33
|
+
constructor($logger, $projectDataService, $fs) {
|
|
34
|
+
this.$logger = $logger;
|
|
35
|
+
this.$projectDataService = $projectDataService;
|
|
36
|
+
this.$fs = $fs;
|
|
37
|
+
}
|
|
38
38
|
generateIcons(resourceGenerationData) {
|
|
39
39
|
return __awaiter(this, void 0, void 0, function* () {
|
|
40
40
|
this.$logger.info("Generating icons ...");
|
|
@@ -9,11 +9,11 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.
|
|
12
|
+
exports.BuildArtifactsService = void 0;
|
|
13
13
|
const path = require("path");
|
|
14
14
|
const yok_1 = require("../common/yok");
|
|
15
15
|
const _ = require("lodash");
|
|
16
|
-
class
|
|
16
|
+
class BuildArtifactsService {
|
|
17
17
|
constructor($errors, $fs, $logger) {
|
|
18
18
|
this.$errors = $errors;
|
|
19
19
|
this.$fs = $fs;
|
|
@@ -94,5 +94,5 @@ class BuildArtefactsService {
|
|
|
94
94
|
});
|
|
95
95
|
}
|
|
96
96
|
}
|
|
97
|
-
exports.
|
|
98
|
-
yok_1.injector.register("
|
|
97
|
+
exports.BuildArtifactsService = BuildArtifactsService;
|
|
98
|
+
yok_1.injector.register("buildArtifactsService", BuildArtifactsService);
|
|
@@ -303,7 +303,7 @@ end`.trim();
|
|
|
303
303
|
return pods;
|
|
304
304
|
}
|
|
305
305
|
}
|
|
306
|
-
exports.CocoaPodsService = CocoaPodsService;
|
|
307
306
|
CocoaPodsService.PODFILE_POST_INSTALL_SECTION_NAME = "post_install";
|
|
308
307
|
CocoaPodsService.INSTALLER_BLOCK_PARAMETER_NAME = "installer";
|
|
308
|
+
exports.CocoaPodsService = CocoaPodsService;
|
|
309
309
|
yok_1.injector.register("cocoapodsService", CocoaPodsService);
|
|
@@ -14,9 +14,9 @@ const constants_1 = require("../../constants");
|
|
|
14
14
|
const path = require("path");
|
|
15
15
|
const yok_1 = require("../../common/yok");
|
|
16
16
|
class DeviceInstallAppService {
|
|
17
|
-
constructor($analyticsService, $
|
|
17
|
+
constructor($analyticsService, $buildArtifactsService, $buildInfoFileService, $fs, $logger, $mobileHelper, $projectDataService, $platformsDataService) {
|
|
18
18
|
this.$analyticsService = $analyticsService;
|
|
19
|
-
this.$
|
|
19
|
+
this.$buildArtifactsService = $buildArtifactsService;
|
|
20
20
|
this.$buildInfoFileService = $buildInfoFileService;
|
|
21
21
|
this.$fs = $fs;
|
|
22
22
|
this.$logger = $logger;
|
|
@@ -36,7 +36,7 @@ class DeviceInstallAppService {
|
|
|
36
36
|
projectDir: projectData.projectDir,
|
|
37
37
|
});
|
|
38
38
|
if (!packageFile) {
|
|
39
|
-
packageFile = yield this.$
|
|
39
|
+
packageFile = yield this.$buildArtifactsService.getLatestAppPackagePath(platformData, buildData);
|
|
40
40
|
}
|
|
41
41
|
yield platformData.platformProjectService.cleanDeviceTempFolder(device.deviceInfo.identifier, projectData);
|
|
42
42
|
const appIdentifier = projectData.projectIdentifiers[platform];
|