nativescript 9.1.0-alpha.14 → 9.1.0-alpha.16
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/docs/build-jekyll-md.sh +1 -1
- package/docs/man_pages/config/config-set.md +2 -0
- package/lib/android-tools-info.js +0 -12
- package/lib/base-package-manager.js +0 -7
- package/lib/bootstrap.js +1 -5
- package/lib/bun-package-manager.js +1 -14
- package/lib/color.js +0 -4
- package/lib/commands/add-platform.js +0 -1
- package/lib/commands/apple-login.js +0 -1
- package/lib/commands/appstore-list.js +0 -1
- package/lib/commands/appstore-upload.js +0 -3
- package/lib/commands/build.js +3 -3
- package/lib/commands/clean.js +1 -22
- package/lib/commands/command-base.js +0 -1
- package/lib/commands/config.js +0 -5
- package/lib/commands/create-project.js +0 -6
- package/lib/commands/debug.js +2 -6
- package/lib/commands/deploy.js +3 -3
- package/lib/commands/embedding/embed.js +0 -7
- package/lib/commands/extensibility/install-extension.js +0 -1
- package/lib/commands/extensibility/list-extensions.js +0 -1
- package/lib/commands/extensibility/uninstall-extension.js +0 -1
- package/lib/commands/fonts.js +0 -1
- package/lib/commands/generate-assets.js +0 -1
- package/lib/commands/generate-help.js +0 -1
- package/lib/commands/generate.js +1 -48
- package/lib/commands/hooks/common.js +1 -2
- package/lib/commands/hooks/hooks-lock.js +0 -1
- package/lib/commands/hooks/hooks.js +0 -1
- package/lib/commands/info.js +0 -1
- package/lib/commands/install.js +0 -1
- package/lib/commands/list-platforms.js +0 -1
- package/lib/commands/migrate.js +0 -1
- package/lib/commands/native-add.js +0 -5
- package/lib/commands/platform-clean.js +0 -1
- package/lib/commands/plugin/add-plugin.js +0 -1
- package/lib/commands/plugin/build-plugin.js +0 -1
- package/lib/commands/plugin/create-plugin.js +0 -5
- package/lib/commands/plugin/list-plugins.js +0 -1
- package/lib/commands/plugin/remove-plugin.js +0 -2
- package/lib/commands/plugin/update-plugin.js +0 -1
- package/lib/commands/post-install.js +0 -6
- package/lib/commands/prepare.js +5 -5
- package/lib/commands/preview.js +0 -2
- package/lib/commands/remove-platform.js +0 -1
- package/lib/commands/resources/resources-update.js +0 -2
- package/lib/commands/run.js +0 -1
- package/lib/commands/setup.js +0 -1
- package/lib/commands/start.js +0 -1
- package/lib/commands/test-init.js +0 -4
- package/lib/commands/test.js +3 -9
- package/lib/commands/typings.js +1 -2
- package/lib/commands/update-platform.js +0 -5
- package/lib/commands/update.js +0 -2
- package/lib/commands/widget.js +0 -18
- package/lib/common/bootstrap.js +0 -1
- package/lib/common/child-process.js +0 -3
- package/lib/common/codeGeneration/code-entity.js +0 -1
- package/lib/common/codeGeneration/code-printer.js +0 -1
- package/lib/common/command-params.js +0 -1
- package/lib/common/commands/analytics.js +0 -3
- package/lib/common/commands/autocompletion.js +0 -3
- package/lib/common/commands/device/device-log-stream.js +0 -1
- package/lib/common/commands/device/get-file.js +0 -2
- package/lib/common/commands/device/list-applications.js +0 -1
- package/lib/common/commands/device/list-devices.js +0 -3
- package/lib/common/commands/device/list-files.js +0 -2
- package/lib/common/commands/device/put-file.js +0 -2
- package/lib/common/commands/device/run-application.js +0 -1
- package/lib/common/commands/device/stop-application.js +0 -1
- package/lib/common/commands/device/uninstall-application.js +0 -1
- package/lib/common/commands/doctor.js +3 -3
- package/lib/common/commands/generate-messages.js +0 -1
- package/lib/common/commands/help.js +0 -1
- package/lib/common/commands/package-manager-get.js +0 -1
- package/lib/common/commands/package-manager-set.js +0 -1
- package/lib/common/commands/post-install.js +0 -1
- package/lib/common/commands/preuninstall.js +2 -11
- package/lib/common/commands/proxy/proxy-base.js +0 -4
- package/lib/common/commands/proxy/proxy-clear.js +0 -1
- package/lib/common/commands/proxy/proxy-get.js +0 -1
- package/lib/common/commands/proxy/proxy-set.js +0 -1
- package/lib/common/common-lib.js +0 -1
- package/lib/common/constants.js +14 -12
- package/lib/common/declarations.d.ts +37 -117
- package/lib/common/decorators.js +0 -48
- package/lib/common/definitions/key-commands.js +8 -0
- package/lib/common/dispatchers.js +1 -10
- package/lib/common/enums.js +42 -0
- package/lib/common/errors.js +4 -13
- package/lib/common/file-system.js +2 -13
- package/lib/common/header.js +0 -3
- package/lib/common/helpers.js +3 -89
- package/lib/common/host-info.js +0 -4
- package/lib/common/http-client.js +0 -20
- package/lib/common/logger/appenders/cli-appender.js +0 -4
- package/lib/common/logger/appenders/emit-appender.js +0 -4
- package/lib/common/logger/layouts/cli-layout.js +0 -1
- package/lib/common/logger/logger.js +0 -5
- package/lib/common/messages/messages.js +0 -6
- package/lib/common/mobile/android/android-application-manager.js +1 -20
- package/lib/common/mobile/android/android-debug-bridge-result-handler.js +0 -1
- package/lib/common/mobile/android/android-debug-bridge.js +0 -6
- package/lib/common/mobile/android/android-device-file-system.js +0 -4
- package/lib/common/mobile/android/android-device-hash-service.js +0 -3
- package/lib/common/mobile/android/android-device.js +0 -8
- package/lib/common/mobile/android/android-emulator-services.js +1 -2
- package/lib/common/mobile/android/android-ini-file-parser.js +0 -9
- package/lib/common/mobile/android/android-log-filter.js +0 -4
- package/lib/common/mobile/android/android-virtual-device-service.js +0 -26
- package/lib/common/mobile/android/device-android-debug-bridge.js +0 -1
- package/lib/common/mobile/android/genymotion/genymotion-service.js +1 -6
- package/lib/common/mobile/android/genymotion/virtualbox-service.js +0 -11
- package/lib/common/mobile/android/logcat-helper.js +0 -13
- package/lib/common/mobile/application-manager-base.js +0 -6
- package/lib/common/mobile/device-emitter.js +0 -4
- package/lib/common/mobile/device-log-emitter.js +0 -1
- package/lib/common/mobile/device-log-provider-base.js +0 -1
- package/lib/common/mobile/device-log-provider.js +0 -23
- package/lib/common/mobile/device-platforms-constants.js +0 -1
- package/lib/common/mobile/emulator-helper.js +0 -3
- package/lib/common/mobile/ios/device/ios-application-manager.js +0 -3
- package/lib/common/mobile/ios/device/ios-device-file-system.js +0 -9
- package/lib/common/mobile/ios/device/ios-device-operations.js +0 -4
- package/lib/common/mobile/ios/device/ios-device.js +0 -4
- package/lib/common/mobile/ios/ios-device-base.js +0 -1
- package/lib/common/mobile/ios/ios-device-product-name-mapper.js +0 -2
- package/lib/common/mobile/ios/ios-log-filter.js +0 -1
- package/lib/common/mobile/ios/simulator/ios-emulator-services.js +0 -4
- package/lib/common/mobile/ios/simulator/ios-sim-resolver.js +0 -1
- package/lib/common/mobile/ios/simulator/ios-simulator-application-manager.js +0 -6
- package/lib/common/mobile/ios/simulator/ios-simulator-device.js +0 -5
- package/lib/common/mobile/ios/simulator/ios-simulator-file-system.js +0 -1
- package/lib/common/mobile/ios/simulator/ios-simulator-log-provider.js +0 -1
- package/lib/common/mobile/local-to-device-path-data-factory.js +0 -1
- package/lib/common/mobile/log-filter.js +0 -2
- package/lib/common/mobile/logging-levels.js +0 -1
- package/lib/common/mobile/mobile-core/android-device-discovery.js +0 -2
- package/lib/common/mobile/mobile-core/android-emulator-discovery.js +0 -3
- package/lib/common/mobile/mobile-core/android-process-service.js +0 -32
- package/lib/common/mobile/mobile-core/device-discovery.js +0 -1
- package/lib/common/mobile/mobile-core/devices-service.js +0 -69
- package/lib/common/mobile/mobile-core/ios-device-discovery.js +0 -2
- package/lib/common/mobile/mobile-core/ios-simulator-discovery.js +0 -3
- package/lib/common/mobile/mobile-helper.js +0 -1
- package/lib/common/mobile/wp8/wp8-emulator-services.js +0 -1
- package/lib/common/opener.js +0 -1
- package/lib/common/os-info.js +0 -1
- package/lib/common/plist-parser.js +0 -1
- package/lib/common/project-helper.js +0 -1
- package/lib/common/prompter.js +1 -9
- package/lib/common/queue.js +0 -1
- package/lib/common/resource-loader.js +0 -1
- package/lib/common/services/analytics/google-analytics-custom-dimensions.js +13 -0
- package/lib/common/services/auto-completion-service.js +1 -13
- package/lib/common/services/cancellation.js +2 -2
- package/lib/common/services/commands-service.js +8 -17
- package/lib/common/services/help-service.js +4 -11
- package/lib/common/services/hooks-service.js +0 -13
- package/lib/common/services/ios-notification-service.js +0 -1
- package/lib/common/services/json-file-settings-service.js +0 -6
- package/lib/common/services/lock-service.js +0 -6
- package/lib/common/services/message-contract-generator.js +0 -1
- package/lib/common/services/messages-service.js +0 -1
- package/lib/common/services/micro-templating-service.js +0 -6
- package/lib/common/services/net-service.js +0 -3
- package/lib/common/services/project-files-manager.js +0 -5
- package/lib/common/services/project-files-provider-base.js +0 -1
- package/lib/common/services/proxy-service.js +0 -1
- package/lib/common/services/qr.js +0 -1
- package/lib/common/services/settings-service.js +0 -1
- package/lib/common/services/xcode-select-service.js +0 -1
- package/lib/common/utils.js +0 -1
- package/lib/common/validators/project-name-validator.js +0 -1
- package/lib/common/validators/validation-result.js +0 -1
- package/lib/common/verify-node-version.js +2 -8
- package/lib/common/yok.js +12 -32
- package/lib/config.js +1 -22
- package/lib/constants-provider.js +0 -1
- package/lib/constants.js +54 -58
- package/lib/controllers/build-controller.js +3 -4
- package/lib/controllers/debug-controller.js +3 -8
- package/lib/controllers/deploy-controller.js +0 -1
- package/lib/controllers/migrate-controller.js +4 -90
- package/lib/controllers/platform-controller.js +2 -9
- package/lib/controllers/prepare-controller.js +8 -24
- package/lib/controllers/run-controller.js +1 -81
- package/lib/controllers/update-controller-base.js +0 -1
- package/lib/controllers/update-controller.js +0 -11
- package/lib/data/build-data.js +0 -1
- package/lib/data/controller-data-base.js +0 -1
- package/lib/data/debug-data.js +0 -1
- package/lib/data/platform-data.js +0 -1
- package/lib/data/prepare-data.js +0 -1
- package/lib/data/run-data.js +0 -1
- package/lib/definitions/project.d.ts +1 -6
- package/lib/definitions/system-warnings.js +8 -0
- package/lib/detached-processes/cleanup-js-subprocess.js +3 -8
- package/lib/detached-processes/cleanup-process.js +15 -18
- package/lib/detached-processes/detached-process-enums.js +24 -0
- package/lib/detached-processes/file-log-service.js +2 -2
- package/lib/device-path-provider.js +0 -1
- package/lib/device-sockets/ios/app-debug-socket-proxy-factory.js +0 -7
- package/lib/device-sockets/ios/notification.js +0 -3
- package/lib/device-sockets/ios/socket-request-executor.js +0 -3
- package/lib/helpers/android-bundle-validator-helper.js +1 -2
- package/lib/helpers/deploy-command-helper.js +0 -1
- package/lib/helpers/key-command-helper.js +3 -4
- package/lib/helpers/livesync-command-helper.js +2 -4
- package/lib/helpers/network-connectivity-validator.js +0 -1
- package/lib/helpers/options-track-helper.js +4 -3
- package/lib/helpers/package-path-helper.js +0 -1
- package/lib/helpers/platform-command-helper.js +2 -7
- package/lib/helpers/version-validator-helper.js +0 -1
- package/lib/key-commands/bootstrap.js +3 -3
- package/lib/key-commands/index.js +5 -5
- package/lib/nativescript-cli-lib-bootstrap.js +0 -4
- package/lib/nativescript-cli-lib.js +0 -1
- package/lib/nativescript-cli.js +2 -11
- package/lib/node/pbxproj-dom-xcode.js +0 -1
- package/lib/node/xcode.js +0 -1
- package/lib/node-package-manager.js +1 -11
- package/lib/options.js +121 -145
- package/lib/package-installation-manager.js +1 -8
- package/lib/package-manager.js +0 -2
- package/lib/platform-command-param.js +0 -1
- package/lib/pnpm-package-manager.js +1 -4
- package/lib/project-data.js +0 -12
- package/lib/providers/project-files-provider.js +0 -1
- package/lib/resolvers/livesync-service-resolver.js +0 -1
- package/lib/services/analytics/analytics-broker-process.js +8 -10
- package/lib/services/analytics/analytics-broker.js +2 -2
- package/lib/services/analytics/analytics-service.js +29 -29
- package/lib/services/analytics/google-analytics-provider.js +16 -13
- package/lib/services/analytics-settings-service.js +0 -5
- package/lib/services/android/android-bundle-tool-service.js +0 -1
- package/lib/services/android/gradle-build-args-service.js +0 -3
- package/lib/services/android/gradle-build-service.js +0 -1
- package/lib/services/android/gradle-command-service.js +0 -1
- package/lib/services/android-device-debug-service.js +0 -6
- package/lib/services/android-plugin-build-service.js +2 -31
- package/lib/services/android-project-service.js +4 -71
- package/lib/services/android-resources-migration-service.js +0 -7
- package/lib/services/apple-portal/apple-portal-application-service.js +0 -1
- package/lib/services/apple-portal/apple-portal-cookie-service.js +0 -1
- package/lib/services/apple-portal/apple-portal-session-service.js +4 -6
- package/lib/services/apple-portal/srp/srp-wrapper.js +1 -4
- package/lib/services/assets-generation/assets-generation-service.js +13 -11
- package/lib/services/build-artifacts-service.js +1 -2
- package/lib/services/build-data-service.js +0 -1
- package/lib/services/build-info-file-service.js +0 -1
- package/lib/services/bundler/bundler-compiler-service.js +26 -157
- package/lib/services/bundler/bundler.js +0 -1
- package/lib/services/cleanup-service.js +10 -13
- package/lib/services/cocoapods-platform-manager.js +0 -9
- package/lib/services/cocoapods-service.js +1 -21
- package/lib/services/debug-data-service.js +0 -1
- package/lib/services/debug-service-base.js +0 -7
- package/lib/services/device/device-install-app-service.js +1 -2
- package/lib/services/doctor-service.js +6 -21
- package/lib/services/extensibility-service.js +0 -8
- package/lib/services/files-hash-service.js +0 -1
- package/lib/services/hmr-status-service.js +0 -2
- package/lib/services/info-service.js +0 -1
- package/lib/services/initialize-service.js +2 -5
- package/lib/services/ios/export-options-plist-service.js +0 -4
- package/lib/services/ios/ios-signing-service.js +0 -4
- package/lib/services/ios/spm-service.js +10 -120
- package/lib/services/ios/xcodebuild-args-service.js +0 -29
- package/lib/services/ios/xcodebuild-command-service.js +0 -3
- package/lib/services/ios/xcodebuild-service.js +1 -2
- package/lib/services/ios-debugger-port-service.js +0 -1
- package/lib/services/ios-device-debug-service.js +0 -1
- package/lib/services/ios-entitlements-service.js +0 -1
- package/lib/services/ios-extensions-service.js +0 -1
- package/lib/services/ios-log-filter.js +0 -20
- package/lib/services/ios-native-target-service.js +5 -6
- package/lib/services/ios-project-service.js +7 -133
- package/lib/services/ios-provision-service.js +0 -3
- package/lib/services/ios-watch-app-service.js +10 -60
- package/lib/services/ip-service.js +0 -2
- package/lib/services/itmstransporter-service.js +0 -1
- package/lib/services/karma-execution.js +0 -2
- package/lib/services/livesync/android-device-livesync-service-base.js +0 -1
- package/lib/services/livesync/android-device-livesync-service.js +0 -2
- package/lib/services/livesync/android-device-livesync-sockets-service.js +0 -3
- package/lib/services/livesync/android-livesync-service.js +0 -1
- package/lib/services/livesync/android-livesync-tool.js +0 -4
- package/lib/services/livesync/device-livesync-service-base.js +0 -2
- package/lib/services/livesync/ios-device-livesync-service.js +0 -7
- package/lib/services/livesync/ios-livesync-service.js +0 -55
- package/lib/services/livesync/livesync-socket.js +0 -1
- package/lib/services/livesync/platform-livesync-service-base.js +0 -5
- package/lib/services/livesync-process-data-service.js +0 -1
- package/lib/services/log-parser-service.js +0 -1
- package/lib/services/log-source-map-service.js +0 -15
- package/lib/services/marking-mode-service.js +10 -8
- package/lib/services/metadata-filtering-service.js +0 -1
- package/lib/services/npm-config-service.js +0 -4
- package/lib/services/pacote-service.js +0 -7
- package/lib/services/performance-service.js +2 -3
- package/lib/services/platform/add-platform-service.js +2 -49
- package/lib/services/platform/platform-validation-service.js +0 -1
- package/lib/services/platform/prepare-native-platform-service.js +3 -5
- package/lib/services/platform-environment-requirements.js +4 -8
- package/lib/services/platform-project-service-base.js +0 -1
- package/lib/services/platforms-data-service.js +0 -1
- package/lib/services/plugins-service.js +2 -20
- package/lib/services/prepare-data-service.js +0 -1
- package/lib/services/project-backup-service.js +0 -4
- package/lib/services/project-changes-service.js +3 -14
- package/lib/services/project-cleanup-service.js +0 -2
- package/lib/services/project-config-service.js +2 -21
- package/lib/services/project-data-service.js +7 -36
- package/lib/services/project-name-service.js +0 -1
- package/lib/services/project-service.js +0 -10
- package/lib/services/project-templates-service.js +2 -3
- package/lib/services/qr-code-terminal-service.js +0 -1
- package/lib/services/require-service.js +0 -1
- package/lib/services/start-service.js +0 -1
- package/lib/services/temp-service.js +0 -3
- package/lib/services/terminal-spinner-service.js +0 -2
- package/lib/services/test-execution-service.js +3 -9
- package/lib/services/test-initialization-service.js +0 -4
- package/lib/services/timeline-profiler-service.js +0 -1
- package/lib/services/user-settings-service.js +0 -1
- package/lib/services/versions-service.js +5 -6
- package/lib/services/watch-ignore-list-service.js +0 -1
- package/lib/services/xcconfig-service.js +45 -12
- package/lib/services/xcproj-service.js +0 -1
- package/lib/shared-event-bus.js +0 -6
- package/lib/sys-info.js +2 -2
- package/lib/tools/config-manipulation/config-transformer.js +0 -12
- package/lib/tools/node-modules/node-modules-builder.js +0 -1
- package/lib/tools/node-modules/node-modules-dependencies-builder.js +0 -6
- package/lib/yarn-package-manager.js +0 -1
- package/lib/yarn2-package-manager.js +0 -3
- package/package.json +9 -20
- package/lib/.d.ts +0 -504
- package/lib/common/definitions/key-commands.d.ts +0 -62
- package/lib/common/services/analytics/google-analytics-custom-dimensions.d.ts +0 -16
- package/lib/definitions/system-warnings.d.ts +0 -4
- package/lib/detached-processes/detached-process-enums.d.ts +0 -70
- package/lib/services/analytics/google-analytics-cross-client-custom-dimensions.d.ts +0 -6
|
@@ -52,7 +52,6 @@ class HooksService {
|
|
|
52
52
|
}
|
|
53
53
|
}
|
|
54
54
|
static formatHookName(commandName) {
|
|
55
|
-
// Remove everything after | (including the pipe)
|
|
56
55
|
return commandName.replace(/\|[\s\S]*$/, "");
|
|
57
56
|
}
|
|
58
57
|
executeBeforeHooks(commandName, hookArguments) {
|
|
@@ -132,11 +131,6 @@ class HooksService {
|
|
|
132
131
|
this.$logger.warn(`${hook.fullPath} will NOT be executed because it has invalid arguments - ${color_1.color.grey(invalidArguments.join(", "))}.`);
|
|
133
132
|
return;
|
|
134
133
|
}
|
|
135
|
-
// HACK for backwards compatibility:
|
|
136
|
-
// In case $projectData wasn't resolved by the time we got here (most likely we got here without running a command but through a service directly)
|
|
137
|
-
// then it is probably passed as a hookArg
|
|
138
|
-
// if that is the case then pass it directly to the hook instead of trying to resolve $projectData via injector
|
|
139
|
-
// This helps make hooks stateless
|
|
140
134
|
const projectDataHookArg = hookArguments["hookArgs"] && hookArguments["hookArgs"]["projectData"];
|
|
141
135
|
if (projectDataHookArg) {
|
|
142
136
|
hookArguments["projectData"] = hookArguments["$projectData"] =
|
|
@@ -155,7 +149,6 @@ class HooksService {
|
|
|
155
149
|
this.$logger.warn(err.message || err);
|
|
156
150
|
}
|
|
157
151
|
else {
|
|
158
|
-
// Print the actual error with its callstack, so it is easy to find out which hooks is causing troubles.
|
|
159
152
|
this.$logger.error(err);
|
|
160
153
|
throw err || new Error(`Failed to execute hook: ${hook.fullPath}.`);
|
|
161
154
|
}
|
|
@@ -260,7 +253,6 @@ class HooksService {
|
|
|
260
253
|
interpreter = sheBangMatch[1];
|
|
261
254
|
}
|
|
262
255
|
if (interpreter) {
|
|
263
|
-
// Likewise, make /usr/bin/bash work like "bash".
|
|
264
256
|
shMatch = interpreter.match(/bin\/((?:ba)?sh)$/);
|
|
265
257
|
}
|
|
266
258
|
if (shMatch) {
|
|
@@ -301,7 +293,6 @@ class HooksService {
|
|
|
301
293
|
}
|
|
302
294
|
validateHookArguments(hookConstructor, hookFullPath) {
|
|
303
295
|
const invalidArguments = [];
|
|
304
|
-
// We need to annotate the hook in order to have the arguments of the constructor.
|
|
305
296
|
(0, helpers_1.annotate)(hookConstructor);
|
|
306
297
|
_.each(hookConstructor.$inject.args, (argument) => {
|
|
307
298
|
try {
|
|
@@ -322,12 +313,8 @@ HooksService.HOOKS_DIRECTORY_NAME = "hooks";
|
|
|
322
313
|
__decorate([
|
|
323
314
|
(0, decorators_1.memoize)({
|
|
324
315
|
shouldCache() {
|
|
325
|
-
// only cache if we have hooks directories, the only case to
|
|
326
|
-
// not have hooks directories is when the project dir is
|
|
327
|
-
// not set yet, ie. when creating a project.
|
|
328
316
|
return !!this.hooksDirectories.length;
|
|
329
317
|
},
|
|
330
318
|
})
|
|
331
319
|
], HooksService.prototype, "initialize", null);
|
|
332
320
|
yok_1.injector.register("hooksService", HooksService);
|
|
333
|
-
//# sourceMappingURL=hooks-service.js.map
|
|
@@ -25,8 +25,6 @@ class JsonFileSettingsService {
|
|
|
25
25
|
const dataToReturn = data.modifiedByCacheMechanism ? data.value : data;
|
|
26
26
|
if (cacheOpts && cacheOpts.cacheTimeout) {
|
|
27
27
|
if (!data.modifiedByCacheMechanism) {
|
|
28
|
-
// If data has no cache, but we want to check the timeout, consider the data as outdated.
|
|
29
|
-
// this should be a really rare case
|
|
30
28
|
return null;
|
|
31
29
|
}
|
|
32
30
|
const currentTime = Date.now();
|
|
@@ -84,8 +82,6 @@ class JsonFileSettingsService {
|
|
|
84
82
|
if (!this.$fs.exists(this.jsonSettingsFilePath)) {
|
|
85
83
|
const unexistingDirs = this.getUnexistingDirectories(this.jsonSettingsFilePath);
|
|
86
84
|
this.$fs.writeFile(this.jsonSettingsFilePath, null);
|
|
87
|
-
// when running under 'sudo' we create the <path to home dir>/.local/share/.nativescript-cli dir with root as owner
|
|
88
|
-
// and other Applications cannot access this directory anymore. (bower/heroku/etc)
|
|
89
85
|
if (process.env.SUDO_USER) {
|
|
90
86
|
for (const dir of unexistingDirs) {
|
|
91
87
|
await this.$fs.setCurrentUserAsOwner(dir, process.env.SUDO_USER);
|
|
@@ -105,7 +101,6 @@ class JsonFileSettingsService {
|
|
|
105
101
|
const unexistingDirs = [];
|
|
106
102
|
let currentDir = path.join(filePath, "..");
|
|
107
103
|
while (true) {
|
|
108
|
-
// this directory won't be created.
|
|
109
104
|
if (this.$fs.exists(currentDir)) {
|
|
110
105
|
break;
|
|
111
106
|
}
|
|
@@ -117,4 +112,3 @@ class JsonFileSettingsService {
|
|
|
117
112
|
}
|
|
118
113
|
exports.JsonFileSettingsService = JsonFileSettingsService;
|
|
119
114
|
yok_1.injector.register("jsonFileSettingsService", JsonFileSettingsService, false);
|
|
120
|
-
//# sourceMappingURL=json-file-settings-service.js.map
|
|
@@ -22,7 +22,6 @@ class LockService {
|
|
|
22
22
|
}
|
|
23
23
|
get defaultLockParams() {
|
|
24
24
|
const lockParams = {
|
|
25
|
-
// https://www.npmjs.com/package/retry#retrytimeoutsoptions
|
|
26
25
|
retriesObj: { retries: 13, minTimeout: 100, maxTimeout: 1000, factor: 2 },
|
|
27
26
|
stale: 10 * 1000,
|
|
28
27
|
realpath: false,
|
|
@@ -73,8 +72,6 @@ class LockService {
|
|
|
73
72
|
}
|
|
74
73
|
}
|
|
75
74
|
getPathsForCleanupAction(lockPath) {
|
|
76
|
-
// The proper-lockfile creates directory with the passed name and `.lock` at the end.
|
|
77
|
-
// Ensure we will take care of it as well.
|
|
78
75
|
return [lockPath, `${lockPath}.lock`];
|
|
79
76
|
}
|
|
80
77
|
getLockFileSettings(filePath, fileOpts) {
|
|
@@ -90,7 +87,6 @@ class LockService {
|
|
|
90
87
|
fileOpts.retriesObj.retries = fileOpts.retries;
|
|
91
88
|
}
|
|
92
89
|
if (fileOpts.retryWait) {
|
|
93
|
-
// backwards compatibility
|
|
94
90
|
fileOpts.retriesObj.minTimeout = fileOpts.retriesObj.maxTimeout =
|
|
95
91
|
fileOpts.retryWait;
|
|
96
92
|
}
|
|
@@ -113,6 +109,4 @@ __decorate([
|
|
|
113
109
|
(0, decorators_1.cache)()
|
|
114
110
|
], LockService.prototype, "defaultLockFilePath", null);
|
|
115
111
|
yok_1.injector.register("lockService", LockService);
|
|
116
|
-
// backwards compatibility
|
|
117
112
|
yok_1.injector.register("lockfile", LockService);
|
|
118
|
-
//# sourceMappingURL=lock-service.js.map
|
|
@@ -9,15 +9,11 @@ const _ = require("lodash");
|
|
|
9
9
|
class MicroTemplateService {
|
|
10
10
|
constructor($injector) {
|
|
11
11
|
this.$injector = $injector;
|
|
12
|
-
// Injector's dynamicCallRegex doesn't have 'g' option, which we need here.
|
|
13
|
-
// Use ( ) in order to use $1 to get whole expression later
|
|
14
12
|
this.dynamicCallRegex = new RegExp(util.format("(%s)", this.$injector.dynamicCallRegex.source), "g");
|
|
15
13
|
}
|
|
16
14
|
async parseContent(data, options) {
|
|
17
15
|
const localVariables = this.getLocalVariables(options);
|
|
18
16
|
const compiledTemplate = _.template(data.replace(this.dynamicCallRegex, 'this.$injector.getDynamicCallData("$1")'));
|
|
19
|
-
// When debugging parsing, uncomment the line below:
|
|
20
|
-
// console.log(compiledTemplate.source);
|
|
21
17
|
return await compiledTemplate.apply(this, [localVariables]);
|
|
22
18
|
}
|
|
23
19
|
isPlatform(...args) {
|
|
@@ -26,7 +22,6 @@ class MicroTemplateService {
|
|
|
26
22
|
}
|
|
27
23
|
getLocalVariables(options) {
|
|
28
24
|
const isHtml = options.isHtml;
|
|
29
|
-
// in html help we want to show all help. Only CONSOLE specific help(wrapped in if(isConsole) ) must be omitted
|
|
30
25
|
const localVariables = {
|
|
31
26
|
constants,
|
|
32
27
|
};
|
|
@@ -41,4 +36,3 @@ class MicroTemplateService {
|
|
|
41
36
|
}
|
|
42
37
|
exports.MicroTemplateService = MicroTemplateService;
|
|
43
38
|
yok_1.injector.register("microTemplateService", MicroTemplateService);
|
|
44
|
-
//# sourceMappingURL=micro-templating-service.js.map
|
|
@@ -14,7 +14,6 @@ class Net {
|
|
|
14
14
|
}
|
|
15
15
|
async getFreePort() {
|
|
16
16
|
const server = net.createServer((sock) => {
|
|
17
|
-
/* empty - noone will connect here */
|
|
18
17
|
});
|
|
19
18
|
return new Promise((resolve, reject) => {
|
|
20
19
|
let isResolved = false;
|
|
@@ -46,7 +45,6 @@ class Net {
|
|
|
46
45
|
});
|
|
47
46
|
server.once("close", () => {
|
|
48
47
|
if (!isResolved) {
|
|
49
|
-
// "close" will be emitted right after "error"
|
|
50
48
|
isResolved = true;
|
|
51
49
|
resolve(true);
|
|
52
50
|
}
|
|
@@ -120,4 +118,3 @@ class Net {
|
|
|
120
118
|
exports.Net = Net;
|
|
121
119
|
Net.DEFAULT_INTERVAL = 1000;
|
|
122
120
|
yok_1.injector.register("net", Net);
|
|
123
|
-
//# sourceMappingURL=net-service.js.map
|
|
@@ -53,7 +53,6 @@ class ProjectFilesManager {
|
|
|
53
53
|
this.processPlatformSpecificFilesCore(platform, files, projectFilesConfig);
|
|
54
54
|
}
|
|
55
55
|
processPlatformSpecificFilesCore(platform, files, projectFilesConfig) {
|
|
56
|
-
// Renames the files that have `platform` as substring and removes the files from other platform
|
|
57
56
|
_.each(files, (filePath) => {
|
|
58
57
|
const projectFileInfo = this.$projectFilesProvider.getProjectFileInfo(filePath, platform, projectFilesConfig);
|
|
59
58
|
if (!projectFileInfo.shouldIncludeFile) {
|
|
@@ -61,7 +60,6 @@ class ProjectFilesManager {
|
|
|
61
60
|
}
|
|
62
61
|
else if (projectFileInfo.onDeviceFileName) {
|
|
63
62
|
const onDeviceFilePath = path.join(path.dirname(filePath), projectFileInfo.onDeviceFileName);
|
|
64
|
-
// Fix .js.map entries
|
|
65
63
|
const extension = path.extname(projectFileInfo.onDeviceFileName);
|
|
66
64
|
if (onDeviceFilePath !== filePath) {
|
|
67
65
|
if (extension === ".js" || extension === ".map") {
|
|
@@ -75,8 +73,6 @@ class ProjectFilesManager {
|
|
|
75
73
|
fileContent = fileContent.replace(new RegExp(oldName, "g"), newName);
|
|
76
74
|
this.$fs.writeFile(filePath, fileContent);
|
|
77
75
|
}
|
|
78
|
-
// Rename the file
|
|
79
|
-
// this.$fs.rename is not called as it is error prone on some systems with slower hard drives and rigorous antivirus software
|
|
80
76
|
this.$fs.writeFile(onDeviceFilePath, this.$fs.readText(filePath));
|
|
81
77
|
this.$fs.deleteFile(filePath);
|
|
82
78
|
}
|
|
@@ -89,4 +85,3 @@ class ProjectFilesManager {
|
|
|
89
85
|
}
|
|
90
86
|
exports.ProjectFilesManager = ProjectFilesManager;
|
|
91
87
|
yok_1.injector.register("projectFilesManager", ProjectFilesManager);
|
|
92
|
-
//# sourceMappingURL=project-files-manager.js.map
|
package/lib/common/utils.js
CHANGED
|
@@ -1,16 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
// This function must be separate to avoid dependencies on C++ modules - it must execute precisely when other functions cannot
|
|
3
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
3
|
exports.verifyNodeVersion = verifyNodeVersion;
|
|
5
4
|
exports.getNodeWarning = getNodeWarning;
|
|
6
5
|
const color_1 = require("../color");
|
|
7
|
-
|
|
8
|
-
/* tslint:disable:no-var-keyword no-var-requires prefer-const*/
|
|
6
|
+
const system_warnings_1 = require("../definitions/system-warnings");
|
|
9
7
|
var os = require("os");
|
|
10
8
|
var semver = require("semver");
|
|
11
9
|
var util = require("util");
|
|
12
|
-
// These versions cannot be used with CLI due to bugs in the node itself.
|
|
13
|
-
// We are absolutely sure we cannot work with them, so inform the user if he is trying to use any of them and exit the process.
|
|
14
10
|
var versionsCausingFailure = ["0.10.34", "4.0.0", "4.2.0", "5.0.0"];
|
|
15
11
|
var minimumRequiredVersion = "8.0.0";
|
|
16
12
|
function getNodeVersionOpts() {
|
|
@@ -74,11 +70,9 @@ function getNodeWarning() {
|
|
|
74
70
|
if (warningMessage) {
|
|
75
71
|
nodeWarn = {
|
|
76
72
|
message: warningMessage,
|
|
77
|
-
severity:
|
|
73
|
+
severity: system_warnings_1.SystemWarningsSeverity.medium,
|
|
78
74
|
};
|
|
79
75
|
}
|
|
80
76
|
}
|
|
81
77
|
return nodeWarn;
|
|
82
78
|
}
|
|
83
|
-
/* tslint:enable */
|
|
84
|
-
//# sourceMappingURL=verify-node-version.js.map
|
package/lib/common/yok.js
CHANGED
|
@@ -7,15 +7,9 @@ const path = require("path");
|
|
|
7
7
|
const _ = require("lodash");
|
|
8
8
|
const helpers_1 = require("./helpers");
|
|
9
9
|
const constants_1 = require("./constants");
|
|
10
|
+
const constants_2 = require("./constants");
|
|
10
11
|
let indent = "";
|
|
11
12
|
function trace(formatStr, ...args) {
|
|
12
|
-
// uncomment following lines when debugging dependency injection
|
|
13
|
-
// const items: any[] = [];
|
|
14
|
-
// for (let _i = 1; _i < arguments.length; _i++) {
|
|
15
|
-
// items[_i - 1] = arguments[_i];
|
|
16
|
-
// }
|
|
17
|
-
// const util = require("util");
|
|
18
|
-
// console.log(util.format.apply(util, [indent + formatStr].concat(args)));
|
|
19
13
|
}
|
|
20
14
|
function pushIndent() {
|
|
21
15
|
indent += " ";
|
|
@@ -33,7 +27,6 @@ function forEachName(names, action) {
|
|
|
33
27
|
}
|
|
34
28
|
function register(...rest) {
|
|
35
29
|
return function (target) {
|
|
36
|
-
// TODO: Check if 'rest' has more arguments that have to be registered
|
|
37
30
|
exports.injector.register(rest[0], target);
|
|
38
31
|
};
|
|
39
32
|
}
|
|
@@ -52,7 +45,7 @@ class Yok {
|
|
|
52
45
|
}
|
|
53
46
|
requireCommand(names, file) {
|
|
54
47
|
forEachName(names, (commandName) => {
|
|
55
|
-
const commands = commandName.split(
|
|
48
|
+
const commands = commandName.split(constants_2.CommandsDelimiters.HierarchicalCommand);
|
|
56
49
|
if (commands.length > 1) {
|
|
57
50
|
if (_.startsWith(commands[1], "*") &&
|
|
58
51
|
this.modules[this.createCommandName(commands[0])]) {
|
|
@@ -62,7 +55,7 @@ class Yok {
|
|
|
62
55
|
if (!this.hierarchicalCommands[parentCommandName]) {
|
|
63
56
|
this.hierarchicalCommands[parentCommandName] = [];
|
|
64
57
|
}
|
|
65
|
-
this.hierarchicalCommands[parentCommandName].push(_.tail(commands).join(
|
|
58
|
+
this.hierarchicalCommands[parentCommandName].push(_.tail(commands).join(constants_2.CommandsDelimiters.HierarchicalCommand));
|
|
66
59
|
}
|
|
67
60
|
if (commands.length > 1 &&
|
|
68
61
|
!this.modules[this.createCommandName(commands[0])]) {
|
|
@@ -133,7 +126,7 @@ class Yok {
|
|
|
133
126
|
}
|
|
134
127
|
registerCommand(names, resolver) {
|
|
135
128
|
forEachName(names, (name) => {
|
|
136
|
-
const commands = name.split(
|
|
129
|
+
const commands = name.split(constants_2.CommandsDelimiters.HierarchicalCommand);
|
|
137
130
|
this.register(this.createCommandName(name), resolver);
|
|
138
131
|
if (commands.length > 1) {
|
|
139
132
|
this.createHierarchicalCommand(commands[0]);
|
|
@@ -145,7 +138,7 @@ class Yok {
|
|
|
145
138
|
}
|
|
146
139
|
getDefaultCommand(name, commandArguments) {
|
|
147
140
|
const subCommands = this.hierarchicalCommands[name];
|
|
148
|
-
const defaultCommand = _.find(subCommands, (command) => _.some(command.split(
|
|
141
|
+
const defaultCommand = _.find(subCommands, (command) => _.some(command.split(constants_2.CommandsDelimiters.HierarchicalCommand), (c) => _.startsWith(c, constants_2.CommandsDelimiters.DefaultCommandSymbol)));
|
|
149
142
|
return defaultCommand;
|
|
150
143
|
}
|
|
151
144
|
buildHierarchicalCommand(parentCommandName, commandLineArguments) {
|
|
@@ -161,7 +154,7 @@ class Yok {
|
|
|
161
154
|
remainingArguments = _.tail(remainingArguments);
|
|
162
155
|
if ((matchingSubCommandName = _.find(subCommands, (sc) => sc === currentSubCommandName ||
|
|
163
156
|
sc ===
|
|
164
|
-
`${
|
|
157
|
+
`${constants_2.CommandsDelimiters.DefaultCommandSymbol}${currentSubCommandName}`))) {
|
|
165
158
|
finalSubCommandName = matchingSubCommandName;
|
|
166
159
|
finalRemainingArguments = remainingArguments;
|
|
167
160
|
}
|
|
@@ -170,8 +163,8 @@ class Yok {
|
|
|
170
163
|
finalSubCommandName =
|
|
171
164
|
this.getDefaultCommand(parentCommandName, commandLineArguments) || "";
|
|
172
165
|
finalRemainingArguments = _.difference(commandLineArguments, finalSubCommandName
|
|
173
|
-
.split(
|
|
174
|
-
.map((command) => _.startsWith(command,
|
|
166
|
+
.split(constants_2.CommandsDelimiters.HierarchicalCommand)
|
|
167
|
+
.map((command) => _.startsWith(command, constants_2.CommandsDelimiters.DefaultCommandSymbol)
|
|
175
168
|
? command.substr(1)
|
|
176
169
|
: command));
|
|
177
170
|
}
|
|
@@ -202,9 +195,7 @@ class Yok {
|
|
|
202
195
|
commandName = defaultCommand
|
|
203
196
|
? this.getHierarchicalCommandName(name, defaultCommand)
|
|
204
197
|
: "help";
|
|
205
|
-
|
|
206
|
-
// for example "ns run ios", we have to remove the "ios" option from the arguments that we'll pass to the command.
|
|
207
|
-
if (_.includes(this.hierarchicalCommands[name], "*" /* CommandsDelimiters.DefaultCommandSymbol */ + args[0])) {
|
|
198
|
+
if (_.includes(this.hierarchicalCommands[name], constants_2.CommandsDelimiters.DefaultCommandSymbol + args[0])) {
|
|
208
199
|
commandArguments = _.tail(args);
|
|
209
200
|
}
|
|
210
201
|
else {
|
|
@@ -213,13 +204,11 @@ class Yok {
|
|
|
213
204
|
}
|
|
214
205
|
}
|
|
215
206
|
else {
|
|
216
|
-
//Execute only default command without arguments
|
|
217
207
|
if (defaultCommand) {
|
|
218
208
|
commandName = this.getHierarchicalCommandName(name, defaultCommand);
|
|
219
209
|
}
|
|
220
210
|
else {
|
|
221
211
|
commandName = "help";
|
|
222
|
-
// Show command-line help
|
|
223
212
|
const options = this.resolve("options");
|
|
224
213
|
options.help = true;
|
|
225
214
|
}
|
|
@@ -231,7 +220,7 @@ class Yok {
|
|
|
231
220
|
exports.injector.registerCommand(name, factory);
|
|
232
221
|
}
|
|
233
222
|
getHierarchicalCommandName(parentCommandName, subCommandName) {
|
|
234
|
-
return [parentCommandName, subCommandName].join(
|
|
223
|
+
return [parentCommandName, subCommandName].join(constants_2.CommandsDelimiters.HierarchicalCommand);
|
|
235
224
|
}
|
|
236
225
|
async isValidHierarchicalCommand(commandName, commandArguments) {
|
|
237
226
|
if (_.includes(Object.keys(this.hierarchicalCommands), commandName)) {
|
|
@@ -239,8 +228,6 @@ class Yok {
|
|
|
239
228
|
if (subCommands) {
|
|
240
229
|
const fullCommandName = this.buildHierarchicalCommand(commandName, commandArguments);
|
|
241
230
|
if (!fullCommandName) {
|
|
242
|
-
// In case buildHierarchicalCommand doesn't find a valid command
|
|
243
|
-
// there isn't a valid command or default with those arguments
|
|
244
231
|
const errors = exports.injector.resolve("errors");
|
|
245
232
|
errors.failWithHelp(constants_1.ERROR_NO_VALID_SUBCOMMAND_FORMAT, commandName);
|
|
246
233
|
}
|
|
@@ -250,8 +237,8 @@ class Yok {
|
|
|
250
237
|
return false;
|
|
251
238
|
}
|
|
252
239
|
isDefaultCommand(commandName) {
|
|
253
|
-
return (commandName.indexOf(
|
|
254
|
-
commandName.indexOf(
|
|
240
|
+
return (commandName.indexOf(constants_2.CommandsDelimiters.DefaultCommandSymbol) > 0 &&
|
|
241
|
+
commandName.indexOf(constants_2.CommandsDelimiters.HierarchicalCommand) > 0);
|
|
255
242
|
}
|
|
256
243
|
register(name, resolver, shared) {
|
|
257
244
|
shared = shared === undefined ? true : shared;
|
|
@@ -298,12 +285,6 @@ class Yok {
|
|
|
298
285
|
return this.resolveByName(param, ctorArguments);
|
|
299
286
|
}
|
|
300
287
|
}
|
|
301
|
-
/* Regex to match dynamic calls in the following format:
|
|
302
|
-
#{moduleName.functionName} or
|
|
303
|
-
#{moduleName.functionName(param1)} or
|
|
304
|
-
#{moduleName.functionName(param1, param2)} - multiple parameters separated with comma are supported
|
|
305
|
-
Check dynamicCall method for sample usage of this regular expression and see how to determine the passed parameters
|
|
306
|
-
*/
|
|
307
288
|
get dynamicCallRegex() {
|
|
308
289
|
return /#{([^.]+)\.([^}]+?)(\((.+)\))*}/;
|
|
309
290
|
}
|
|
@@ -431,4 +412,3 @@ function setGlobalInjector(inj) {
|
|
|
431
412
|
global.$injector = exports.injector = inj;
|
|
432
413
|
return inj;
|
|
433
414
|
}
|
|
434
|
-
//# sourceMappingURL=yok.js.map
|
package/lib/config.js
CHANGED
|
@@ -7,10 +7,8 @@ const os = require("os");
|
|
|
7
7
|
const _ = require("lodash");
|
|
8
8
|
const yok_1 = require("./common/yok");
|
|
9
9
|
class Configuration {
|
|
10
|
-
/*don't require logger and everything that has logger as dependency in config.js due to cyclic dependency*/
|
|
11
10
|
constructor($fs) {
|
|
12
11
|
this.$fs = $fs;
|
|
13
|
-
// User specific config
|
|
14
12
|
this.DEBUG = false;
|
|
15
13
|
this.ANDROID_DEBUG_UI = null;
|
|
16
14
|
this.USE_POD_SANDBOX = false;
|
|
@@ -49,7 +47,6 @@ class StaticConfig {
|
|
|
49
47
|
this._userAgent = null;
|
|
50
48
|
}
|
|
51
49
|
get disableCommandHooks() {
|
|
52
|
-
// Never set this to false because it will duplicate execution of hooks realized through method decoration
|
|
53
50
|
return true;
|
|
54
51
|
}
|
|
55
52
|
get HTML_CLI_HELPERS_DIR() {
|
|
@@ -91,7 +88,6 @@ class StaticConfig {
|
|
|
91
88
|
async getAdbFilePathCore() {
|
|
92
89
|
const $childProcess = this.$injector.resolve("$childProcess");
|
|
93
90
|
try {
|
|
94
|
-
// Do NOT use the adb wrapper because it will end blow up with Segmentation fault because the wrapper uses this method!!!
|
|
95
91
|
const proc = await $childProcess.spawnFromEvent("adb", ["version"], "exit", undefined, { throwError: false });
|
|
96
92
|
if (proc.stderr) {
|
|
97
93
|
return await this.spawnPrivateAdb();
|
|
@@ -104,40 +100,23 @@ class StaticConfig {
|
|
|
104
100
|
}
|
|
105
101
|
return "adb";
|
|
106
102
|
}
|
|
107
|
-
/*
|
|
108
|
-
Problem:
|
|
109
|
-
1. Adb forks itself as a server which keeps running until adb kill-server is invoked or crashes
|
|
110
|
-
2. On Windows running processes lock their image files due to memory mapping. Locked files prevent their parent directories from deletion and cannot be overwritten.
|
|
111
|
-
3. Update and uninstall scenarios are broken
|
|
112
|
-
Solution:
|
|
113
|
-
- Copy adb and associated files into a temporary directory. Let this copy of adb run persistently
|
|
114
|
-
- On Posix OSes, immediately delete the file to not take file space
|
|
115
|
-
- Tie common lib version to updates of adb, so that when we integrate a newer adb we can use it
|
|
116
|
-
- Adb is named differently on OSes and may have additional files. The code is hairy to accommodate these differences
|
|
117
|
-
*/
|
|
118
103
|
async spawnPrivateAdb() {
|
|
119
104
|
const $fs = this.$injector.resolve("$fs"), $childProcess = this.$injector.resolve("$childProcess"), $hostInfo = this.$injector.resolve("$hostInfo");
|
|
120
|
-
// prepare the directory to host our copy of adb
|
|
121
105
|
const defaultAdbDirPath = path.join(__dirname, "common", "resources", "platform-tools", "android", process.platform);
|
|
122
106
|
const pathToPackageJson = path.join(__dirname, "..", "package.json");
|
|
123
107
|
const nsCliVersion = require(pathToPackageJson).version;
|
|
124
108
|
const tmpDir = path.join(os.tmpdir(), `nativescript-cli-${nsCliVersion}`);
|
|
125
109
|
$fs.createDirectory(tmpDir);
|
|
126
|
-
// copy the adb and associated files
|
|
127
110
|
const targetAdb = path.join(tmpDir, "adb");
|
|
128
|
-
// In case directory is missing or it's empty, copy the new adb
|
|
129
111
|
if (!$fs.exists(tmpDir) || !$fs.readDirectory(tmpDir).length) {
|
|
130
|
-
shelljs.cp(path.join(defaultAdbDirPath, "*"), tmpDir);
|
|
131
|
-
// adb loses its executable bit when packed inside electron asar file. Manually fix the issue
|
|
112
|
+
shelljs.cp(path.join(defaultAdbDirPath, "*"), tmpDir);
|
|
132
113
|
if (!$hostInfo.isWindows) {
|
|
133
114
|
shelljs.chmod("+x", targetAdb);
|
|
134
115
|
}
|
|
135
116
|
}
|
|
136
|
-
// let adb start its global server
|
|
137
117
|
await $childProcess.spawnFromEvent(targetAdb, ["start-server"], "exit");
|
|
138
118
|
return targetAdb;
|
|
139
119
|
}
|
|
140
120
|
}
|
|
141
121
|
exports.StaticConfig = StaticConfig;
|
|
142
122
|
yok_1.injector.register("staticConfig", StaticConfig);
|
|
143
|
-
//# sourceMappingURL=config.js.map
|