nativescript 8.8.3 → 8.9.0-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/.d.ts +1 -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 -17
- package/lib/color.js +0 -3
- 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 +3 -10
- package/lib/commands/build.js +2 -3
- package/lib/commands/clean.js +1 -22
- package/lib/commands/command-base.js +0 -1
- package/lib/commands/config.js +0 -3
- package/lib/commands/create-project.js +0 -6
- package/lib/commands/debug.js +1 -6
- package/lib/commands/deploy.js +2 -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 +2 -12
- 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 +3 -4
- 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 +2 -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/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 +2 -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 +0 -11
- package/lib/common/decorators.js +0 -48
- package/lib/common/dispatchers.js +1 -10
- package/lib/common/errors.js +3 -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 +0 -5
- package/lib/common/mobile/android/genymotion/virtualbox-service.js +0 -11
- package/lib/common/mobile/android/logcat-helper.js +1 -14
- 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 -1
- 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/auto-completion-service.js +1 -13
- package/lib/common/services/cancellation.js +1 -2
- package/lib/common/services/commands-service.js +6 -17
- package/lib/common/services/help-service.js +3 -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 +1 -8
- package/lib/common/yok.js +11 -32
- package/lib/config.js +1 -22
- package/lib/constants-provider.js +0 -1
- package/lib/constants.js +0 -53
- 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 +3 -91
- package/lib/controllers/platform-controller.js +1 -9
- package/lib/controllers/prepare-controller.js +9 -19
- package/lib/controllers/run-controller.js +1 -17
- 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 +1 -1
- package/lib/data/run-data.js +0 -1
- package/lib/declarations.d.ts +1 -1
- package/lib/definitions/prepare.d.ts +2 -0
- package/lib/detached-processes/cleanup-js-subprocess.js +2 -8
- package/lib/detached-processes/cleanup-process.js +14 -18
- package/lib/detached-processes/file-log-service.js +1 -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 +2 -4
- package/lib/helpers/livesync-command-helper.js +1 -4
- package/lib/helpers/network-connectivity-validator.js +0 -1
- package/lib/helpers/options-track-helper.js +2 -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 +2 -3
- package/lib/key-commands/index.js +32 -26
- package/lib/nativescript-cli-lib-bootstrap.js +0 -4
- package/lib/nativescript-cli-lib.js +0 -1
- package/lib/nativescript-cli.js +1 -10
- 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 +119 -143
- 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 +6 -10
- package/lib/services/analytics/analytics-broker.js +1 -2
- package/lib/services/analytics/analytics-service.js +25 -29
- package/lib/services/analytics/google-analytics-provider.js +12 -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 +0 -29
- 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 +1 -2
- package/lib/services/apple-portal/apple-portal-cookie-service.js +0 -1
- package/lib/services/apple-portal/apple-portal-session-service.js +42 -15
- package/lib/services/apple-portal/srp/srp-wrapper.js +76 -0
- package/lib/services/assets-generation/assets-generation-service.js +5 -16
- 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/cleanup-service.js +9 -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 +1 -5
- package/lib/services/ios/export-options-plist-service.js +4 -6
- package/lib/services/ios/ios-signing-service.js +45 -27
- package/lib/services/ios/spm-service.js +0 -9
- package/lib/services/ios/xcodebuild-args-service.js +0 -9
- package/lib/services/ios/xcodebuild-command-service.js +0 -1
- package/lib/services/ios/xcodebuild-service.js +2 -1
- 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 +4 -6
- package/lib/services/ios-project-service.js +2 -94
- package/lib/services/ios-provision-service.js +0 -3
- package/lib/services/ios-watch-app-service.js +0 -1
- 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 -2
- 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 +5 -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 +1 -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 +2 -5
- package/lib/services/platform-environment-requirements.js +3 -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 -22
- 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 -1
- package/lib/services/terminal-spinner-service.js +0 -2
- package/lib/services/test-execution-service.js +2 -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 +4 -6
- package/lib/services/watch-ignore-list-service.js +0 -1
- package/lib/services/webpack/webpack-compiler-service.js +9 -44
- package/lib/services/xcconfig-service.js +0 -2
- package/lib/services/xcproj-service.js +0 -1
- package/lib/shared-event-bus.js +0 -6
- package/lib/sys-info.js +1 -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 +3 -2
|
@@ -32,7 +32,6 @@ class IOSDeviceDiscovery extends device_discovery_1.DeviceDiscovery {
|
|
|
32
32
|
return;
|
|
33
33
|
}
|
|
34
34
|
if (this.$mobileHelper.isvisionOSPlatform(options.platform)) {
|
|
35
|
-
// look for ios devices - same logic.
|
|
36
35
|
options.platform = this.$devicePlatformsConstants.iOS;
|
|
37
36
|
}
|
|
38
37
|
yield this.$iosDeviceOperations.startLookingForDevices((deviceInfo) => {
|
|
@@ -62,4 +61,3 @@ class IOSDeviceDiscovery extends device_discovery_1.DeviceDiscovery {
|
|
|
62
61
|
}
|
|
63
62
|
exports.IOSDeviceDiscovery = IOSDeviceDiscovery;
|
|
64
63
|
yok_1.injector.register("iOSDeviceDiscovery", IOSDeviceDiscovery);
|
|
65
|
-
//# sourceMappingURL=ios-device-discovery.js.map
|
|
@@ -40,14 +40,12 @@ class IOSSimulatorDiscovery extends device_discovery_1.DeviceDiscovery {
|
|
|
40
40
|
return __awaiter(this, void 0, void 0, function* () {
|
|
41
41
|
if (this.$hostInfo.isDarwin) {
|
|
42
42
|
const currentSimulators = yield this.$iOSSimResolver.iOSSim.getRunningSimulators();
|
|
43
|
-
// Remove old simulators
|
|
44
43
|
_(this.cachedSimulators)
|
|
45
44
|
.reject((s) => _.some(currentSimulators, (simulator) => simulator &&
|
|
46
45
|
s &&
|
|
47
46
|
simulator.id === s.id &&
|
|
48
47
|
simulator.state === s.state))
|
|
49
48
|
.each((s) => this.deleteAndRemoveDevice(s));
|
|
50
|
-
// Add new simulators
|
|
51
49
|
_(currentSimulators)
|
|
52
50
|
.reject((s) => _.some(this.cachedSimulators, (simulator) => simulator &&
|
|
53
51
|
s &&
|
|
@@ -109,4 +107,3 @@ class IOSSimulatorDiscovery extends device_discovery_1.DeviceDiscovery {
|
|
|
109
107
|
}
|
|
110
108
|
exports.IOSSimulatorDiscovery = IOSSimulatorDiscovery;
|
|
111
109
|
yok_1.injector.register("iOSSimulatorDiscovery", IOSSimulatorDiscovery);
|
|
112
|
-
//# sourceMappingURL=ios-simulator-discovery.js.map
|
|
@@ -80,4 +80,3 @@ class Wp8EmulatorServices {
|
|
|
80
80
|
Wp8EmulatorServices.WP8_LAUNCHER = "XapDeployCmd.exe";
|
|
81
81
|
Wp8EmulatorServices.WP8_LAUNCHER_PATH = "Microsoft SDKs\\Windows Phone\\v8.0\\Tools\\XAP Deployment";
|
|
82
82
|
yok_1.injector.register("wp8EmulatorServices", Wp8EmulatorServices);
|
|
83
|
-
//# sourceMappingURL=wp8-emulator-services.js.map
|
package/lib/common/opener.js
CHANGED
package/lib/common/os-info.js
CHANGED
package/lib/common/prompter.js
CHANGED
|
@@ -36,7 +36,6 @@ class Prompter {
|
|
|
36
36
|
else {
|
|
37
37
|
const result = {};
|
|
38
38
|
_.each(questions, (s) => {
|
|
39
|
-
// Curly brackets needed because s.default() may return false and break the loop
|
|
40
39
|
result[s.name] = s.default();
|
|
41
40
|
});
|
|
42
41
|
return result;
|
|
@@ -138,9 +137,7 @@ class Prompter {
|
|
|
138
137
|
}
|
|
139
138
|
muteStdout() {
|
|
140
139
|
if (helpers.isInteractive()) {
|
|
141
|
-
process.stdin.setRawMode(true);
|
|
142
|
-
// We need to create mute-stream and to pass it as output to ctrlcReader
|
|
143
|
-
// This will prevent the prompter to show the user's text twice on the console
|
|
140
|
+
process.stdin.setRawMode(true);
|
|
144
141
|
this.muteStreamInstance = new MuteStream();
|
|
145
142
|
this.muteStreamInstance.pipe(process.stdout);
|
|
146
143
|
this.muteStreamInstance.mute();
|
|
@@ -149,7 +146,6 @@ class Prompter {
|
|
|
149
146
|
output: this.muteStreamInstance,
|
|
150
147
|
});
|
|
151
148
|
this.ctrlcReader.on("SIGINT", () => {
|
|
152
|
-
// enable terminal cursor
|
|
153
149
|
process.stdout.write("\x1B[?25h");
|
|
154
150
|
process.exit();
|
|
155
151
|
});
|
|
@@ -159,7 +155,6 @@ class Prompter {
|
|
|
159
155
|
if (helpers.isInteractive()) {
|
|
160
156
|
process.stdin.setRawMode(false);
|
|
161
157
|
if (this.muteStreamInstance) {
|
|
162
|
-
// We need to clean the event listeners from the process.stdout because the MuteStream.pipe function calls the pipe function of the Node js Stream which adds event listeners and this can cause memory leak if we display more than ~10 prompts.
|
|
163
158
|
this.cleanEventListeners(process.stdout);
|
|
164
159
|
this.muteStreamInstance.unmute();
|
|
165
160
|
this.muteStreamInstance = null;
|
|
@@ -168,8 +163,6 @@ class Prompter {
|
|
|
168
163
|
}
|
|
169
164
|
}
|
|
170
165
|
cleanEventListeners(stream) {
|
|
171
|
-
// The events names and listeners names can be found here https://github.com/nodejs/node/blob/master/lib/stream.js
|
|
172
|
-
// Which event cause memory leak can be tested with stream.listeners("event-name") and if the listeners count keeps increasing with each prompt we need to remove the listener.
|
|
173
166
|
const memoryLeakEvents = [
|
|
174
167
|
{
|
|
175
168
|
eventName: "close",
|
|
@@ -196,4 +189,3 @@ class Prompter {
|
|
|
196
189
|
}
|
|
197
190
|
exports.Prompter = Prompter;
|
|
198
191
|
yok_1.injector.register("prompter", Prompter);
|
|
199
|
-
//# sourceMappingURL=prompter.js.map
|
package/lib/common/queue.js
CHANGED
|
@@ -36,15 +36,12 @@ class AutoCompletionService {
|
|
|
36
36
|
get shellProfiles() {
|
|
37
37
|
return [
|
|
38
38
|
this.getHomePath(".bashrc"),
|
|
39
|
-
this.getHomePath(".zshrc"),
|
|
39
|
+
this.getHomePath(".zshrc"),
|
|
40
40
|
];
|
|
41
41
|
}
|
|
42
42
|
get cliRunCommandsFile() {
|
|
43
43
|
let cliRunCommandsFile = this.getHomePath(util.format(".%src", this.$staticConfig.CLIENT_NAME.toLowerCase()));
|
|
44
44
|
if (this.$hostInfo.isWindows) {
|
|
45
|
-
// on Windows bash, file is incorrectly written as C:\Users\<username>, which leads to errors when trying to execute the script:
|
|
46
|
-
// $ source ~/.bashrc
|
|
47
|
-
// sh.exe": C:Usersusername.appbuilderrc: No such file or directory
|
|
48
45
|
cliRunCommandsFile = cliRunCommandsFile.replace(/\\/g, "/");
|
|
49
46
|
}
|
|
50
47
|
return cliRunCommandsFile;
|
|
@@ -59,9 +56,7 @@ class AutoCompletionService {
|
|
|
59
56
|
return new RegExp(util.format("%s[\\s\\S]*%s", AutoCompletionService.GENERATED_TABTAB_COMPLETION_START, AutoCompletionService.GENERATED_TABTAB_COMPLETION_END));
|
|
60
57
|
}
|
|
61
58
|
removeObsoleteAutoCompletion() {
|
|
62
|
-
// In previous releases we were writing directly in .bash_profile, .bashrc, .zshrc and .profile - remove this old code
|
|
63
59
|
const shellProfilesToBeCleared = this.shellProfiles;
|
|
64
|
-
// Add .profile only here as we do not want new autocompletion in this file, but we have to remove our old code from it.
|
|
65
60
|
shellProfilesToBeCleared.push(this.getHomePath(".profile"));
|
|
66
61
|
shellProfilesToBeCleared.forEach((file) => {
|
|
67
62
|
try {
|
|
@@ -114,7 +109,6 @@ class AutoCompletionService {
|
|
|
114
109
|
this.isNewAutoCompletionEnabledInFile(filePath) ||
|
|
115
110
|
this.isObsoleteAutoCompletionEnabledInFile(filePath);
|
|
116
111
|
if (!result) {
|
|
117
|
-
// break each
|
|
118
112
|
return false;
|
|
119
113
|
}
|
|
120
114
|
});
|
|
@@ -142,7 +136,6 @@ class AutoCompletionService {
|
|
|
142
136
|
_.each(this.shellProfiles, (shellProfile) => {
|
|
143
137
|
result = this.isObsoleteAutoCompletionEnabledInFile(shellProfile);
|
|
144
138
|
if (!result) {
|
|
145
|
-
// break each
|
|
146
139
|
return false;
|
|
147
140
|
}
|
|
148
141
|
});
|
|
@@ -181,8 +174,6 @@ class AutoCompletionService {
|
|
|
181
174
|
}
|
|
182
175
|
catch (err) {
|
|
183
176
|
this.$logger.info("Unable to update %s. Command-line completion might not work.", fileName);
|
|
184
|
-
// When npm is installed with sudo, in some cases the installation cannot write to shell profiles
|
|
185
|
-
// Advise the user how to enable autocompletion after the installation is completed.
|
|
186
177
|
if ((err.code === "EPERM" || err.code === "EACCES") &&
|
|
187
178
|
!this.$hostInfo.isWindows &&
|
|
188
179
|
process.env.SUDO_USER) {
|
|
@@ -203,7 +194,6 @@ class AutoCompletionService {
|
|
|
203
194
|
}
|
|
204
195
|
}
|
|
205
196
|
catch (err) {
|
|
206
|
-
// If file does not exist, autocompletion was not working for it, so ignore this error.
|
|
207
197
|
if (err.code !== "ENOENT") {
|
|
208
198
|
this.$logger.info("Failed to update %s. Auto-completion may still work or work incorrectly. ", fileName);
|
|
209
199
|
this.$logger.info(err);
|
|
@@ -236,7 +226,6 @@ class AutoCompletionService {
|
|
|
236
226
|
this.$fs.writeFile(filePath, newText);
|
|
237
227
|
}
|
|
238
228
|
}
|
|
239
|
-
// The generated seems to be inconsistent in it's start/end markers so adding our own.
|
|
240
229
|
this.$fs.appendFile(filePath, `\n${AutoCompletionService.GENERATED_TABTAB_COMPLETION_START}\n`);
|
|
241
230
|
yield this.$childProcess.exec(`"${process.argv[0]}" "${pathToExecutableFile}" completion_generate_script >> "${filePath}"`);
|
|
242
231
|
this.$fs.appendFile(filePath, this.completionAliasDefinition);
|
|
@@ -274,4 +263,3 @@ __decorate([
|
|
|
274
263
|
], AutoCompletionService.prototype, "completionShellScriptContent", null);
|
|
275
264
|
exports.AutoCompletionService = AutoCompletionService;
|
|
276
265
|
yok_1.injector.register("autoCompletionService", AutoCompletionService);
|
|
277
|
-
//# sourceMappingURL=auto-completion-service.js.map
|
|
@@ -38,7 +38,7 @@ class CancellationService {
|
|
|
38
38
|
.watch(triggerFile, { ignoreInitial: true })
|
|
39
39
|
.on("unlink", (filePath) => {
|
|
40
40
|
this.$logger.info(`Exiting process as the file ${filePath} has been deleted. Probably reinstalling CLI while there's a working instance.`);
|
|
41
|
-
process.exit(132
|
|
41
|
+
process.exit(132);
|
|
42
42
|
});
|
|
43
43
|
if (watcher) {
|
|
44
44
|
this.watches[name] = watcher;
|
|
@@ -65,4 +65,3 @@ class CancellationService {
|
|
|
65
65
|
}
|
|
66
66
|
}
|
|
67
67
|
yok_1.injector.register("cancellation", CancellationService);
|
|
68
|
-
//# sourceMappingURL=cancellation.js.map
|
|
@@ -48,11 +48,11 @@ class CommandsService {
|
|
|
48
48
|
if (!this.$staticConfig.disableAnalytics &&
|
|
49
49
|
!command.disableAnalytics &&
|
|
50
50
|
!this.$options.disableAnalytics) {
|
|
51
|
-
const analyticsService = this.$injector.resolve("analyticsService");
|
|
51
|
+
const analyticsService = this.$injector.resolve("analyticsService");
|
|
52
52
|
yield analyticsService.checkConsent();
|
|
53
53
|
const beautifiedCommandName = this.beautifyCommandName(commandName).replace(/\|/g, " ");
|
|
54
54
|
const googleAnalyticsPageData = {
|
|
55
|
-
googleAnalyticsDataType: "pageview"
|
|
55
|
+
googleAnalyticsDataType: "pageview",
|
|
56
56
|
path: beautifiedCommandName,
|
|
57
57
|
title: beautifiedCommandName,
|
|
58
58
|
};
|
|
@@ -62,11 +62,10 @@ class CommandsService {
|
|
|
62
62
|
const shouldExecuteHooks = !this.$staticConfig.disableCommandHooks &&
|
|
63
63
|
(command.enableHooks === undefined || command.enableHooks === true);
|
|
64
64
|
if (shouldExecuteHooks) {
|
|
65
|
-
// Handle correctly hierarchical commands
|
|
66
65
|
const hierarchicalCommandName = this.$injector.buildHierarchicalCommand(commandName, commandArguments);
|
|
67
66
|
if (hierarchicalCommandName) {
|
|
68
|
-
commandName = helpers.stringReplaceAll(hierarchicalCommandName.commandName, "|*"
|
|
69
|
-
commandName = helpers.stringReplaceAll(commandName, "|"
|
|
67
|
+
commandName = helpers.stringReplaceAll(hierarchicalCommandName.commandName, "|*", "-");
|
|
68
|
+
commandName = helpers.stringReplaceAll(commandName, "|", "-");
|
|
70
69
|
}
|
|
71
70
|
yield this.$hooksService.executeBeforeHooks(commandName);
|
|
72
71
|
}
|
|
@@ -117,7 +116,6 @@ class CommandsService {
|
|
|
117
116
|
yield this.executeCommandAction(commandName, commandArguments, this.executeCommandUnchecked);
|
|
118
117
|
}
|
|
119
118
|
else {
|
|
120
|
-
// If canExecuteCommand returns false, the command cannot be executed or there's no such command at all.
|
|
121
119
|
const command = this.$injector.resolveCommand(commandName);
|
|
122
120
|
if (command) {
|
|
123
121
|
let commandWithArgs = commandName;
|
|
@@ -135,15 +133,12 @@ class CommandsService {
|
|
|
135
133
|
const command = this.$injector.resolveCommand(commandName);
|
|
136
134
|
const beautifiedName = helpers.stringReplaceAll(commandName, "|", " ");
|
|
137
135
|
if (command) {
|
|
138
|
-
// Verify command is enabled
|
|
139
136
|
if (command.isDisabled) {
|
|
140
137
|
this.$errors.fail("This command is not applicable to your environment.");
|
|
141
138
|
}
|
|
142
|
-
// If command wants to handle canExecute logic on its own.
|
|
143
139
|
if (command.canExecute) {
|
|
144
140
|
return yield command.canExecute(commandArguments);
|
|
145
141
|
}
|
|
146
|
-
// First part of hierarchical commands should be validated in specific way.
|
|
147
142
|
if (yield this.$injector.isValidHierarchicalCommand(commandName, commandArguments)) {
|
|
148
143
|
return true;
|
|
149
144
|
}
|
|
@@ -155,8 +150,8 @@ class CommandsService {
|
|
|
155
150
|
}
|
|
156
151
|
const commandInfo = {
|
|
157
152
|
inputStrings: [commandName, ...commandArguments],
|
|
158
|
-
commandDelimiter: "|"
|
|
159
|
-
defaultCommandDelimiter: "|*"
|
|
153
|
+
commandDelimiter: "|",
|
|
154
|
+
defaultCommandDelimiter: "|*",
|
|
160
155
|
};
|
|
161
156
|
const extensionData = yield this.$extensibilityService.getExtensionNameWhereCommandIsRegistered(commandInfo);
|
|
162
157
|
if (extensionData) {
|
|
@@ -174,13 +169,11 @@ class CommandsService {
|
|
|
174
169
|
return __awaiter(this, void 0, void 0, function* () {
|
|
175
170
|
const commandArgsHelper = new CommandArgumentsValidationHelper(true, commandArguments);
|
|
176
171
|
if (mandatoryParams.length > 0) {
|
|
177
|
-
// If command has more mandatory params than the passed ones, we shouldn't execute it
|
|
178
172
|
if (mandatoryParams.length > commandArguments.length) {
|
|
179
173
|
const customErrorMessages = _.map(mandatoryParams, (mp) => mp.errorMessage);
|
|
180
174
|
customErrorMessages.splice(0, 0, "You need to provide all the required parameters.");
|
|
181
175
|
this.$errors.failWithHelp(customErrorMessages.join(os_1.EOL));
|
|
182
176
|
}
|
|
183
|
-
// If we reach here, the commandArguments are at least as much as mandatoryParams. Now we should verify that we have each of them.
|
|
184
177
|
for (let mandatoryParamIndex = 0; mandatoryParamIndex < mandatoryParams.length; ++mandatoryParamIndex) {
|
|
185
178
|
const mandatoryParam = mandatoryParams[mandatoryParamIndex];
|
|
186
179
|
let argument = null;
|
|
@@ -209,14 +202,12 @@ class CommandsService {
|
|
|
209
202
|
if (!commandArgsHelper.isValid) {
|
|
210
203
|
return false;
|
|
211
204
|
}
|
|
212
|
-
// Command doesn't have any allowedParameters
|
|
213
205
|
if (!command.allowedParameters || command.allowedParameters.length === 0) {
|
|
214
206
|
if (commandArguments.length > 0) {
|
|
215
207
|
this.$errors.failWithHelp("This command doesn't accept parameters.");
|
|
216
208
|
}
|
|
217
209
|
}
|
|
218
210
|
else {
|
|
219
|
-
// Exclude mandatory params, we've already checked them
|
|
220
211
|
const unverifiedAllowedParams = command.allowedParameters.filter((param) => !param.mandatory);
|
|
221
212
|
for (let remainingArgsIndex = 0; remainingArgsIndex < commandArgsHelper.remainingArguments.length; ++remainingArgsIndex) {
|
|
222
213
|
const argument = commandArgsHelper.remainingArguments[remainingArgsIndex];
|
|
@@ -230,7 +221,6 @@ class CommandsService {
|
|
|
230
221
|
}
|
|
231
222
|
if (parameter) {
|
|
232
223
|
const index = unverifiedAllowedParams.indexOf(parameter);
|
|
233
|
-
// Remove the matched parameter from unverifiedAllowedParams collection, so it will not be used to verify another argument.
|
|
234
224
|
unverifiedAllowedParams.splice(index, 1);
|
|
235
225
|
}
|
|
236
226
|
else {
|
|
@@ -276,4 +266,3 @@ class CommandsService {
|
|
|
276
266
|
}
|
|
277
267
|
exports.CommandsService = CommandsService;
|
|
278
268
|
yok_1.injector.register("commandsService", CommandsService);
|
|
279
|
-
//# sourceMappingURL=commands-service.js.map
|
|
@@ -52,7 +52,6 @@ class HelpService {
|
|
|
52
52
|
this.$logger.trace("Opening help for command '%s'. FileName is '%s'.", commandName, htmlPage);
|
|
53
53
|
this.$fs.ensureDirectoryExists(this.pathToHtmlPages);
|
|
54
54
|
if (!this.tryOpeningSelectedPage(htmlPage)) {
|
|
55
|
-
// HTML pages may have been skipped on post-install, lets generate them.
|
|
56
55
|
this.$logger.trace("Required HTML file '%s' is missing. Let's try generating HTML files and see if we'll find it.", htmlPage);
|
|
57
56
|
yield this.generateHtmlPages();
|
|
58
57
|
if (!this.tryOpeningSelectedPage(htmlPage)) {
|
|
@@ -114,11 +113,6 @@ class HelpService {
|
|
|
114
113
|
this.$logger.printMarkdown(help);
|
|
115
114
|
});
|
|
116
115
|
}
|
|
117
|
-
/**
|
|
118
|
-
* Gets the help content for a specific command that should be shown on the terminal.
|
|
119
|
-
* @param {string} commandName Name of the command for which to read the help.
|
|
120
|
-
* @returns {Promise<string>} Help content of the command parsed with all terminal rules applied (stripped content that should be shown only for html help).
|
|
121
|
-
*/
|
|
122
116
|
getCommandLineHelpForCommand(commandData) {
|
|
123
117
|
return __awaiter(this, void 0, void 0, function* () {
|
|
124
118
|
const helpText = yield this.readMdFileForCommand(commandData);
|
|
@@ -132,7 +126,6 @@ class HelpService {
|
|
|
132
126
|
return commandLineHelp;
|
|
133
127
|
});
|
|
134
128
|
}
|
|
135
|
-
// This method should return Promise in order to generate all html pages simultaneously.
|
|
136
129
|
createHtmlPage(htmlPageGenerationData) {
|
|
137
130
|
return __awaiter(this, void 0, void 0, function* () {
|
|
138
131
|
const { basicHtmlPage, pathToMdFile, pathToMdPages, pathToHtmlPages, extensionName, } = htmlPageGenerationData;
|
|
@@ -184,8 +177,8 @@ class HelpService {
|
|
|
184
177
|
const commandName = commandData.commandName;
|
|
185
178
|
const commandInfo = {
|
|
186
179
|
inputStrings: [commandName, ...commandData.commandArguments],
|
|
187
|
-
commandDelimiter: "|"
|
|
188
|
-
defaultCommandDelimiter: "|*"
|
|
180
|
+
commandDelimiter: "|",
|
|
181
|
+
defaultCommandDelimiter: "|*",
|
|
189
182
|
};
|
|
190
183
|
const extensionData = yield this.$extensibilityService.getExtensionNameWhereCommandIsRegistered(commandInfo);
|
|
191
184
|
if (extensionData) {
|
|
@@ -254,7 +247,6 @@ HelpService.RELATIVE_PATH_TO_INDEX_REGEX = /@RELATIVE_PATH_TO_INDEX@/g;
|
|
|
254
247
|
HelpService.EXTENSION_NAME_REGEX = /@EXTENSION_NAME@/g;
|
|
255
248
|
HelpService.MARKDOWN_LINK_REGEX = /\[([\w \-\`\<\>\*\:\\]+?)\]\([\s\S]+?\)/g;
|
|
256
249
|
HelpService.SPAN_REGEX = /([\s\S]*?)(?:\r?\n)?<span.*?>([\s\S]*?)<\/span>(?:\r?\n)*/g;
|
|
257
|
-
HelpService.NEW_LINE_REGEX = /<\/?\s*?br\s*?\/?>/g;
|
|
250
|
+
HelpService.NEW_LINE_REGEX = /<\/?\s*?br\s*?\/?>/g;
|
|
258
251
|
exports.HelpService = HelpService;
|
|
259
252
|
yok_1.injector.register("helpService", HelpService);
|
|
260
|
-
//# sourceMappingURL=help-service.js.map
|
|
@@ -61,7 +61,6 @@ class HooksService {
|
|
|
61
61
|
}
|
|
62
62
|
}
|
|
63
63
|
static formatHookName(commandName) {
|
|
64
|
-
// Remove everything after | (including the pipe)
|
|
65
64
|
return commandName.replace(/\|[\s\S]*$/, "");
|
|
66
65
|
}
|
|
67
66
|
executeBeforeHooks(commandName, hookArguments) {
|
|
@@ -130,11 +129,6 @@ class HooksService {
|
|
|
130
129
|
this.$logger.warn(`${hook.fullPath} will NOT be executed because it has invalid arguments - ${color_1.color.grey(invalidArguments.join(", "))}.`);
|
|
131
130
|
return;
|
|
132
131
|
}
|
|
133
|
-
// HACK for backwards compatibility:
|
|
134
|
-
// 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)
|
|
135
|
-
// then it is probably passed as a hookArg
|
|
136
|
-
// if that is the case then pass it directly to the hook instead of trying to resolve $projectData via injector
|
|
137
|
-
// This helps make hooks stateless
|
|
138
132
|
const projectDataHookArg = hookArguments["hookArgs"] && hookArguments["hookArgs"]["projectData"];
|
|
139
133
|
if (projectDataHookArg) {
|
|
140
134
|
hookArguments["projectData"] = hookArguments["$projectData"] = projectDataHookArg;
|
|
@@ -152,7 +146,6 @@ class HooksService {
|
|
|
152
146
|
this.$logger.warn(err.message || err);
|
|
153
147
|
}
|
|
154
148
|
else {
|
|
155
|
-
// Print the actual error with its callstack, so it is easy to find out which hooks is causing troubles.
|
|
156
149
|
this.$logger.error(err);
|
|
157
150
|
throw err || new Error(`Failed to execute hook: ${hook.fullPath}.`);
|
|
158
151
|
}
|
|
@@ -258,7 +251,6 @@ class HooksService {
|
|
|
258
251
|
interpreter = sheBangMatch[1];
|
|
259
252
|
}
|
|
260
253
|
if (interpreter) {
|
|
261
|
-
// Likewise, make /usr/bin/bash work like "bash".
|
|
262
254
|
shMatch = interpreter.match(/bin\/((?:ba)?sh)$/);
|
|
263
255
|
}
|
|
264
256
|
if (shMatch) {
|
|
@@ -299,7 +291,6 @@ class HooksService {
|
|
|
299
291
|
}
|
|
300
292
|
validateHookArguments(hookConstructor, hookFullPath) {
|
|
301
293
|
const invalidArguments = [];
|
|
302
|
-
// We need to annotate the hook in order to have the arguments of the constructor.
|
|
303
294
|
(0, helpers_1.annotate)(hookConstructor);
|
|
304
295
|
_.each(hookConstructor.$inject.args, (argument) => {
|
|
305
296
|
try {
|
|
@@ -319,13 +310,9 @@ HooksService.HOOKS_DIRECTORY_NAME = "hooks";
|
|
|
319
310
|
__decorate([
|
|
320
311
|
(0, decorators_1.memoize)({
|
|
321
312
|
shouldCache() {
|
|
322
|
-
// only cache if we have hooks directories, the only case to
|
|
323
|
-
// not have hooks directories is when the project dir is
|
|
324
|
-
// not set yet, ie. when creating a project.
|
|
325
313
|
return !!this.hooksDirectories.length;
|
|
326
314
|
},
|
|
327
315
|
})
|
|
328
316
|
], HooksService.prototype, "initialize", null);
|
|
329
317
|
exports.HooksService = HooksService;
|
|
330
318
|
yok_1.injector.register("hooksService", HooksService);
|
|
331
|
-
//# sourceMappingURL=hooks-service.js.map
|
|
@@ -35,8 +35,6 @@ class JsonFileSettingsService {
|
|
|
35
35
|
const dataToReturn = data.modifiedByCacheMechanism ? data.value : data;
|
|
36
36
|
if (cacheOpts && cacheOpts.cacheTimeout) {
|
|
37
37
|
if (!data.modifiedByCacheMechanism) {
|
|
38
|
-
// If data has no cache, but we want to check the timeout, consider the data as outdated.
|
|
39
|
-
// this should be a really rare case
|
|
40
38
|
return null;
|
|
41
39
|
}
|
|
42
40
|
const currentTime = Date.now();
|
|
@@ -102,8 +100,6 @@ class JsonFileSettingsService {
|
|
|
102
100
|
if (!this.$fs.exists(this.jsonSettingsFilePath)) {
|
|
103
101
|
const unexistingDirs = this.getUnexistingDirectories(this.jsonSettingsFilePath);
|
|
104
102
|
this.$fs.writeFile(this.jsonSettingsFilePath, null);
|
|
105
|
-
// when running under 'sudo' we create the <path to home dir>/.local/share/.nativescript-cli dir with root as owner
|
|
106
|
-
// and other Applications cannot access this directory anymore. (bower/heroku/etc)
|
|
107
103
|
if (process.env.SUDO_USER) {
|
|
108
104
|
for (const dir of unexistingDirs) {
|
|
109
105
|
yield this.$fs.setCurrentUserAsOwner(dir, process.env.SUDO_USER);
|
|
@@ -124,7 +120,6 @@ class JsonFileSettingsService {
|
|
|
124
120
|
const unexistingDirs = [];
|
|
125
121
|
let currentDir = path.join(filePath, "..");
|
|
126
122
|
while (true) {
|
|
127
|
-
// this directory won't be created.
|
|
128
123
|
if (this.$fs.exists(currentDir)) {
|
|
129
124
|
break;
|
|
130
125
|
}
|
|
@@ -136,4 +131,3 @@ class JsonFileSettingsService {
|
|
|
136
131
|
}
|
|
137
132
|
exports.JsonFileSettingsService = JsonFileSettingsService;
|
|
138
133
|
yok_1.injector.register("jsonFileSettingsService", JsonFileSettingsService, false);
|
|
139
|
-
//# sourceMappingURL=json-file-settings-service.js.map
|
|
@@ -31,7 +31,6 @@ class LockService {
|
|
|
31
31
|
}
|
|
32
32
|
get defaultLockParams() {
|
|
33
33
|
const lockParams = {
|
|
34
|
-
// https://www.npmjs.com/package/retry#retrytimeoutsoptions
|
|
35
34
|
retriesObj: { retries: 13, minTimeout: 100, maxTimeout: 1000, factor: 2 },
|
|
36
35
|
stale: 10 * 1000,
|
|
37
36
|
realpath: false,
|
|
@@ -90,8 +89,6 @@ class LockService {
|
|
|
90
89
|
});
|
|
91
90
|
}
|
|
92
91
|
getPathsForCleanupAction(lockPath) {
|
|
93
|
-
// The proper-lockfile creates directory with the passed name and `.lock` at the end.
|
|
94
|
-
// Ensure we will take care of it as well.
|
|
95
92
|
return [lockPath, `${lockPath}.lock`];
|
|
96
93
|
}
|
|
97
94
|
getLockFileSettings(filePath, fileOpts) {
|
|
@@ -107,7 +104,6 @@ class LockService {
|
|
|
107
104
|
fileOpts.retriesObj.retries = fileOpts.retries;
|
|
108
105
|
}
|
|
109
106
|
if (fileOpts.retryWait) {
|
|
110
|
-
// backwards compatibility
|
|
111
107
|
fileOpts.retriesObj.minTimeout = fileOpts.retriesObj.maxTimeout =
|
|
112
108
|
fileOpts.retryWait;
|
|
113
109
|
}
|
|
@@ -130,6 +126,4 @@ __decorate([
|
|
|
130
126
|
], LockService.prototype, "defaultLockFilePath", null);
|
|
131
127
|
exports.LockService = LockService;
|
|
132
128
|
yok_1.injector.register("lockService", LockService);
|
|
133
|
-
// backwards compatibility
|
|
134
129
|
yok_1.injector.register("lockfile", LockService);
|
|
135
|
-
//# sourceMappingURL=lock-service.js.map
|
|
@@ -18,16 +18,12 @@ const _ = require("lodash");
|
|
|
18
18
|
class MicroTemplateService {
|
|
19
19
|
constructor($injector) {
|
|
20
20
|
this.$injector = $injector;
|
|
21
|
-
// Injector's dynamicCallRegex doesn't have 'g' option, which we need here.
|
|
22
|
-
// Use ( ) in order to use $1 to get whole expression later
|
|
23
21
|
this.dynamicCallRegex = new RegExp(util.format("(%s)", this.$injector.dynamicCallRegex.source), "g");
|
|
24
22
|
}
|
|
25
23
|
parseContent(data, options) {
|
|
26
24
|
return __awaiter(this, void 0, void 0, function* () {
|
|
27
25
|
const localVariables = this.getLocalVariables(options);
|
|
28
26
|
const compiledTemplate = _.template(data.replace(this.dynamicCallRegex, 'this.$injector.getDynamicCallData("$1")'));
|
|
29
|
-
// When debugging parsing, uncomment the line below:
|
|
30
|
-
// console.log(compiledTemplate.source);
|
|
31
27
|
return yield compiledTemplate.apply(this, [localVariables]);
|
|
32
28
|
});
|
|
33
29
|
}
|
|
@@ -37,7 +33,6 @@ class MicroTemplateService {
|
|
|
37
33
|
}
|
|
38
34
|
getLocalVariables(options) {
|
|
39
35
|
const isHtml = options.isHtml;
|
|
40
|
-
// in html help we want to show all help. Only CONSOLE specific help(wrapped in if(isConsole) ) must be omitted
|
|
41
36
|
const localVariables = {
|
|
42
37
|
constants,
|
|
43
38
|
};
|
|
@@ -52,4 +47,3 @@ class MicroTemplateService {
|
|
|
52
47
|
}
|
|
53
48
|
exports.MicroTemplateService = MicroTemplateService;
|
|
54
49
|
yok_1.injector.register("microTemplateService", MicroTemplateService);
|
|
55
|
-
//# sourceMappingURL=micro-templating-service.js.map
|
|
@@ -24,7 +24,6 @@ class Net {
|
|
|
24
24
|
getFreePort() {
|
|
25
25
|
return __awaiter(this, void 0, void 0, function* () {
|
|
26
26
|
const server = net.createServer((sock) => {
|
|
27
|
-
/* empty - noone will connect here */
|
|
28
27
|
});
|
|
29
28
|
return new Promise((resolve, reject) => {
|
|
30
29
|
let isResolved = false;
|
|
@@ -58,7 +57,6 @@ class Net {
|
|
|
58
57
|
});
|
|
59
58
|
server.once("close", () => {
|
|
60
59
|
if (!isResolved) {
|
|
61
|
-
// "close" will be emitted right after "error"
|
|
62
60
|
isResolved = true;
|
|
63
61
|
resolve(true);
|
|
64
62
|
}
|
|
@@ -137,4 +135,3 @@ class Net {
|
|
|
137
135
|
Net.DEFAULT_INTERVAL = 1000;
|
|
138
136
|
exports.Net = Net;
|
|
139
137
|
yok_1.injector.register("net", Net);
|
|
140
|
-
//# sourceMappingURL=net-service.js.map
|
|
@@ -66,7 +66,6 @@ class ProjectFilesManager {
|
|
|
66
66
|
this.processPlatformSpecificFilesCore(platform, files, projectFilesConfig);
|
|
67
67
|
}
|
|
68
68
|
processPlatformSpecificFilesCore(platform, files, projectFilesConfig) {
|
|
69
|
-
// Renames the files that have `platform` as substring and removes the files from other platform
|
|
70
69
|
_.each(files, (filePath) => {
|
|
71
70
|
const projectFileInfo = this.$projectFilesProvider.getProjectFileInfo(filePath, platform, projectFilesConfig);
|
|
72
71
|
if (!projectFileInfo.shouldIncludeFile) {
|
|
@@ -74,7 +73,6 @@ class ProjectFilesManager {
|
|
|
74
73
|
}
|
|
75
74
|
else if (projectFileInfo.onDeviceFileName) {
|
|
76
75
|
const onDeviceFilePath = path.join(path.dirname(filePath), projectFileInfo.onDeviceFileName);
|
|
77
|
-
// Fix .js.map entries
|
|
78
76
|
const extension = path.extname(projectFileInfo.onDeviceFileName);
|
|
79
77
|
if (onDeviceFilePath !== filePath) {
|
|
80
78
|
if (extension === ".js" || extension === ".map") {
|
|
@@ -88,8 +86,6 @@ class ProjectFilesManager {
|
|
|
88
86
|
fileContent = fileContent.replace(new RegExp(oldName, "g"), newName);
|
|
89
87
|
this.$fs.writeFile(filePath, fileContent);
|
|
90
88
|
}
|
|
91
|
-
// Rename the file
|
|
92
|
-
// this.$fs.rename is not called as it is error prone on some systems with slower hard drives and rigorous antivirus software
|
|
93
89
|
this.$fs.writeFile(onDeviceFilePath, this.$fs.readText(filePath));
|
|
94
90
|
this.$fs.deleteFile(filePath);
|
|
95
91
|
}
|
|
@@ -102,4 +98,3 @@ class ProjectFilesManager {
|
|
|
102
98
|
}
|
|
103
99
|
exports.ProjectFilesManager = ProjectFilesManager;
|
|
104
100
|
yok_1.injector.register("projectFilesManager", ProjectFilesManager);
|
|
105
|
-
//# sourceMappingURL=project-files-manager.js.map
|
package/lib/common/utils.js
CHANGED
|
@@ -86,4 +86,3 @@ ProjectNameValidator.INVALID_FILENAMES = [
|
|
|
86
86
|
ProjectNameValidator.INVALID_EXTENSIONS = [];
|
|
87
87
|
exports.ProjectNameValidator = ProjectNameValidator;
|
|
88
88
|
yok_1.injector.register("projectNameValidator", ProjectNameValidator);
|
|
89
|
-
//# sourceMappingURL=project-name-validator.js.map
|