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
|
@@ -46,7 +46,6 @@ class AndroidDebugBridgeResultHandler {
|
|
|
46
46
|
}
|
|
47
47
|
}
|
|
48
48
|
}
|
|
49
|
-
exports.AndroidDebugBridgeResultHandler = AndroidDebugBridgeResultHandler;
|
|
50
49
|
AndroidDebugBridgeResultHandler.ANDROID_DEBUG_BRIDGE_ERRORS = [
|
|
51
50
|
{
|
|
52
51
|
name: "device unauthorized",
|
|
@@ -329,4 +328,5 @@ AndroidDebugBridgeResultHandler.ANDROID_DEBUG_BRIDGE_ERRORS = [
|
|
|
329
328
|
resultCode: -7,
|
|
330
329
|
},
|
|
331
330
|
];
|
|
331
|
+
exports.AndroidDebugBridgeResultHandler = AndroidDebugBridgeResultHandler;
|
|
332
332
|
yok_1.injector.register("androidDebugBridgeResultHandler", AndroidDebugBridgeResultHandler);
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.AndroidLogFilter = void 0;
|
|
4
4
|
const yok_1 = require("../../yok");
|
|
5
|
-
const
|
|
5
|
+
const os_1 = require("os");
|
|
6
6
|
class AndroidLogFilter {
|
|
7
7
|
constructor($loggingLevels) {
|
|
8
8
|
this.$loggingLevels = $loggingLevels;
|
|
@@ -13,15 +13,15 @@ class AndroidLogFilter {
|
|
|
13
13
|
const log = this.getConsoleLogFromLine(data, loggingOptions.applicationPid);
|
|
14
14
|
if (log) {
|
|
15
15
|
if (log.tag) {
|
|
16
|
-
return `${log.tag}: ${log.message}` +
|
|
16
|
+
return `${log.tag}: ${log.message}` + os_1.EOL;
|
|
17
17
|
}
|
|
18
18
|
else {
|
|
19
|
-
return log.message +
|
|
19
|
+
return log.message + os_1.EOL;
|
|
20
20
|
}
|
|
21
21
|
}
|
|
22
22
|
return null;
|
|
23
23
|
}
|
|
24
|
-
return data +
|
|
24
|
+
return data + os_1.EOL;
|
|
25
25
|
}
|
|
26
26
|
getConsoleLogFromLine(lineText, pid) {
|
|
27
27
|
if (pid && lineText.indexOf(pid) < 0) {
|
|
@@ -45,7 +45,7 @@ class AndroidLogFilter {
|
|
|
45
45
|
return consoleLogMessage;
|
|
46
46
|
}
|
|
47
47
|
}
|
|
48
|
-
exports.AndroidLogFilter = AndroidLogFilter;
|
|
49
48
|
AndroidLogFilter.LINE_REGEX = /.\/(.+?)\s*\(\s*\d+?\): (.*)/;
|
|
50
49
|
AndroidLogFilter.API_LEVEL_23_LINE_REGEX = /.+?\s+?(?:[A-Z]\s+?)([A-Za-z \.]+?)\s*?\: (.*)/;
|
|
50
|
+
exports.AndroidLogFilter = AndroidLogFilter;
|
|
51
51
|
yok_1.injector.register("androidLogFilter", AndroidLogFilter);
|
|
@@ -20,7 +20,7 @@ const net = require("net");
|
|
|
20
20
|
const path = require("path");
|
|
21
21
|
const os_1 = require("os");
|
|
22
22
|
const _ = require("lodash");
|
|
23
|
-
const
|
|
23
|
+
const os_2 = require("os");
|
|
24
24
|
const constants_1 = require("../../constants");
|
|
25
25
|
const decorators_1 = require("../../decorators");
|
|
26
26
|
const helpers_1 = require("../../helpers");
|
|
@@ -211,7 +211,7 @@ class AndroidVirtualDeviceService {
|
|
|
211
211
|
get pathToAvdHomeDir() {
|
|
212
212
|
const searchPaths = [
|
|
213
213
|
process.env.ANDROID_AVD_HOME,
|
|
214
|
-
path.join(
|
|
214
|
+
path.join((0, os_2.homedir)(), constants_1.AndroidVirtualDevice.ANDROID_DIR_NAME, constants_1.AndroidVirtualDevice.AVD_DIR_NAME),
|
|
215
215
|
];
|
|
216
216
|
return searchPaths.find((p) => p && this.$fs.exists(p));
|
|
217
217
|
}
|
|
@@ -21,7 +21,7 @@ const helpers_1 = require("../../../helpers");
|
|
|
21
21
|
const os_1 = require("os");
|
|
22
22
|
const path = require("path");
|
|
23
23
|
const _ = require("lodash");
|
|
24
|
-
const
|
|
24
|
+
const os_2 = require("os");
|
|
25
25
|
const decorators_1 = require("../../../decorators");
|
|
26
26
|
const constants_2 = require("../../../../constants");
|
|
27
27
|
const yok_1 = require("../../../yok");
|
|
@@ -119,7 +119,7 @@ class AndroidGenymotionService {
|
|
|
119
119
|
"/Applications/Genymotion.app/Contents/MacOS/player.app/Contents/MacOS/player",
|
|
120
120
|
"/Applications/Genymotion.app/Contents/MacOS/player",
|
|
121
121
|
],
|
|
122
|
-
linux: [path.join(
|
|
122
|
+
linux: [path.join((0, os_2.homedir)(), "genymotion", "player")],
|
|
123
123
|
win32: [
|
|
124
124
|
`${process.env["PROGRAMFILES"]}\\Genymobile\\Genymotion\\player.exe`,
|
|
125
125
|
`${process.env["PROGRAMFILES(X86)"]}\\Genymobile\\Genymotion\\player.exe`,
|
|
@@ -11,9 +11,9 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.LogcatHelper = void 0;
|
|
13
13
|
const byline = require("byline");
|
|
14
|
-
const device_android_debug_bridge_1 = require("./device-android-debug-bridge");
|
|
15
14
|
const semver = require("semver");
|
|
16
15
|
const yok_1 = require("../../yok");
|
|
16
|
+
const device_android_debug_bridge_1 = require("./device-android-debug-bridge");
|
|
17
17
|
class LogcatHelper {
|
|
18
18
|
constructor($deviceLogProvider, $devicePlatformsConstants, $logger, $injector, $devicesService) {
|
|
19
19
|
this.$deviceLogProvider = $deviceLogProvider;
|
|
@@ -4,8 +4,8 @@ exports.DeviceLogProvider = void 0;
|
|
|
4
4
|
const device_log_provider_base_1 = require("./device-log-provider-base");
|
|
5
5
|
const constants_1 = require("../constants");
|
|
6
6
|
const yok_1 = require("../yok");
|
|
7
|
-
const chalk = require("chalk");
|
|
8
7
|
const constants_2 = require("../../constants");
|
|
8
|
+
const color_1 = require("../../color");
|
|
9
9
|
class DeviceLogProvider extends device_log_provider_base_1.DeviceLogProviderBase {
|
|
10
10
|
constructor($logFilter, $logger, $logSourceMapService, $timelineProfilerService, $options) {
|
|
11
11
|
super($logFilter, $logger, $logSourceMapService);
|
|
@@ -17,15 +17,15 @@ class DeviceLogProvider extends device_log_provider_base_1.DeviceLogProviderBase
|
|
|
17
17
|
this.consoleLogLevelRegex = /^CONSOLE (LOG|INFO|WARN|ERROR|TRACE|INFO( .+)):\s/;
|
|
18
18
|
this.consoleLevelColor = {
|
|
19
19
|
log: (line) => line,
|
|
20
|
-
info:
|
|
21
|
-
warn:
|
|
22
|
-
error:
|
|
23
|
-
trace:
|
|
24
|
-
time:
|
|
20
|
+
info: color_1.color.cyanBright,
|
|
21
|
+
warn: color_1.color.yellowBright,
|
|
22
|
+
error: color_1.color.redBright,
|
|
23
|
+
trace: color_1.color.grey,
|
|
24
|
+
time: color_1.color.greenBright,
|
|
25
25
|
};
|
|
26
26
|
this.deviceColorMap = new Map();
|
|
27
27
|
this.colorPool = [
|
|
28
|
-
"
|
|
28
|
+
"bgBlackBright",
|
|
29
29
|
"bgMagentaBright",
|
|
30
30
|
"bgBlueBright",
|
|
31
31
|
"bgWhiteBright",
|
|
@@ -110,7 +110,7 @@ class DeviceLogProvider extends device_log_provider_base_1.DeviceLogProviderBase
|
|
|
110
110
|
.join("")
|
|
111
111
|
.trim();
|
|
112
112
|
toLog.split("\n").forEach((actualLine) => {
|
|
113
|
-
this.printLine(
|
|
113
|
+
this.printLine(color_1.color[this.getDeviceColor(deviceIdentifier)](" "), this.consoleLevelColor[level](actualLine));
|
|
114
114
|
});
|
|
115
115
|
}
|
|
116
116
|
}
|
|
@@ -17,7 +17,7 @@ class IOSSimResolver {
|
|
|
17
17
|
return path.join(require.resolve(IOSSimResolver.iOSSimName), "..", IOSSimResolver.iOSStandaloneExecutableName);
|
|
18
18
|
}
|
|
19
19
|
}
|
|
20
|
-
exports.IOSSimResolver = IOSSimResolver;
|
|
21
20
|
IOSSimResolver.iOSSimName = "ios-sim-portable";
|
|
22
21
|
IOSSimResolver.iOSStandaloneExecutableName = "ios-sim-standalone.js";
|
|
22
|
+
exports.IOSSimResolver = IOSSimResolver;
|
|
23
23
|
yok_1.injector.register("iOSSimResolver", IOSSimResolver);
|
|
@@ -12,15 +12,15 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
12
12
|
const path = require("path");
|
|
13
13
|
const yok_1 = require("../../yok");
|
|
14
14
|
class Wp8EmulatorServices {
|
|
15
|
-
constructor($logger, $childProcess) {
|
|
16
|
-
this.$logger = $logger;
|
|
17
|
-
this.$childProcess = $childProcess;
|
|
18
|
-
}
|
|
19
15
|
static get programFilesPath() {
|
|
20
16
|
return process.arch === "x64"
|
|
21
17
|
? process.env["PROGRAMFILES(X86)"]
|
|
22
18
|
: process.env.ProgramFiles;
|
|
23
19
|
}
|
|
20
|
+
constructor($logger, $childProcess) {
|
|
21
|
+
this.$logger = $logger;
|
|
22
|
+
this.$childProcess = $childProcess;
|
|
23
|
+
}
|
|
24
24
|
getEmulatorId() {
|
|
25
25
|
return __awaiter(this, void 0, void 0, function* () {
|
|
26
26
|
return "";
|
package/lib/common/opener.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.PlistParser = void 0;
|
|
4
|
-
const
|
|
4
|
+
const simple_plist_1 = require("simple-plist");
|
|
5
5
|
const yok_1 = require("./yok");
|
|
6
6
|
class PlistParser {
|
|
7
7
|
parseFile(plistFilePath) {
|
|
8
8
|
return new Promise((resolve, reject) => {
|
|
9
|
-
|
|
9
|
+
(0, simple_plist_1.readFile)(plistFilePath, (err, obj) => {
|
|
10
10
|
if (err) {
|
|
11
11
|
reject(err);
|
|
12
12
|
}
|
|
@@ -17,7 +17,7 @@ class PlistParser {
|
|
|
17
17
|
});
|
|
18
18
|
}
|
|
19
19
|
parseFileSync(plistFilePath) {
|
|
20
|
-
return
|
|
20
|
+
return (0, simple_plist_1.readFileSync)(plistFilePath);
|
|
21
21
|
}
|
|
22
22
|
}
|
|
23
23
|
exports.PlistParser = PlistParser;
|
|
@@ -25,13 +25,13 @@ class ProjectHelper {
|
|
|
25
25
|
const projectFilePath = path.join(projectDir, this.$staticConfig.PROJECT_FILE_NAME);
|
|
26
26
|
if (this.$fs.exists(projectFilePath) &&
|
|
27
27
|
this.isProjectFileCorrect(projectFilePath)) {
|
|
28
|
-
this.$logger.
|
|
28
|
+
this.$logger.trace("Project directory is '%s'.", projectDir);
|
|
29
29
|
this.cachedProjectDir = projectDir;
|
|
30
30
|
break;
|
|
31
31
|
}
|
|
32
32
|
const dir = path.dirname(projectDir);
|
|
33
33
|
if (dir === projectDir) {
|
|
34
|
-
this.$logger.
|
|
34
|
+
this.$logger.trace("No project found at or above '%s'.", this.$options.path || path.resolve("."));
|
|
35
35
|
break;
|
|
36
36
|
}
|
|
37
37
|
projectDir = dir;
|
|
@@ -5,12 +5,12 @@ declare const enum GoogleAnalyticsCustomDimensions {
|
|
|
5
5
|
sessionID = "cd4",
|
|
6
6
|
client = "cd5",
|
|
7
7
|
nodeVersion = "cd6",
|
|
8
|
-
playgroundId = "cd7",
|
|
9
|
-
usedTutorial = "cd8",
|
|
8
|
+
// playgroundId = "cd7",
|
|
9
|
+
// usedTutorial = "cd8",
|
|
10
10
|
isShared = "cd9",
|
|
11
|
-
companyName = "cd10",
|
|
12
|
-
companyCountry = "cd11",
|
|
13
|
-
companyRevenue = "cd12",
|
|
14
|
-
companyIndustries = "cd13",
|
|
15
|
-
companyEmployeeCount = "cd14",
|
|
11
|
+
// companyName = "cd10",
|
|
12
|
+
// companyCountry = "cd11",
|
|
13
|
+
// companyRevenue = "cd12",
|
|
14
|
+
// companyIndustries = "cd13",
|
|
15
|
+
// companyEmployeeCount = "cd14",
|
|
16
16
|
}
|
|
@@ -16,7 +16,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
16
16
|
};
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
18
|
exports.AutoCompletionService = void 0;
|
|
19
|
-
const
|
|
19
|
+
const os_1 = require("os");
|
|
20
20
|
const path = require("path");
|
|
21
21
|
const util = require("util");
|
|
22
22
|
const _ = require("lodash");
|
|
@@ -212,7 +212,7 @@ class AutoCompletionService {
|
|
|
212
212
|
});
|
|
213
213
|
}
|
|
214
214
|
getHomePath(fileName) {
|
|
215
|
-
return path.join(
|
|
215
|
+
return path.join((0, os_1.homedir)(), fileName);
|
|
216
216
|
}
|
|
217
217
|
}
|
|
218
218
|
AutoCompletionService.COMPLETION_START_COMMENT_PATTERN = "###-%s-completion-start-###";
|
|
@@ -8,13 +8,6 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
8
8
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
|
-
var __asyncValues = (this && this.__asyncValues) || function (o) {
|
|
12
|
-
if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
13
|
-
var m = o[Symbol.asyncIterator], i;
|
|
14
|
-
return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
|
|
15
|
-
function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
|
|
16
|
-
function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }
|
|
17
|
-
};
|
|
18
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
19
12
|
exports.CommandsService = void 0;
|
|
20
13
|
const jaroWinklerDistance = require("../vendor/jaro-winkler_distance");
|
|
@@ -29,8 +22,10 @@ class CommandArgumentsValidationHelper {
|
|
|
29
22
|
}
|
|
30
23
|
}
|
|
31
24
|
class CommandsService {
|
|
32
|
-
|
|
33
|
-
this
|
|
25
|
+
get currentCommandData() {
|
|
26
|
+
return _.last(this.commands);
|
|
27
|
+
}
|
|
28
|
+
constructor($errors, $hooksService, $injector, $logger, $options, $staticConfig, $extensibilityService, $optionsTracker) {
|
|
34
29
|
this.$errors = $errors;
|
|
35
30
|
this.$hooksService = $hooksService;
|
|
36
31
|
this.$injector = $injector;
|
|
@@ -41,9 +36,6 @@ class CommandsService {
|
|
|
41
36
|
this.$optionsTracker = $optionsTracker;
|
|
42
37
|
this.commands = [];
|
|
43
38
|
}
|
|
44
|
-
get currentCommandData() {
|
|
45
|
-
return _.last(this.commands);
|
|
46
|
-
}
|
|
47
39
|
allCommands(opts) {
|
|
48
40
|
const commands = this.$injector.getRegisteredCommandsNames(opts.includeDevCommands);
|
|
49
41
|
return _.reject(commands, (command) => _.includes(command, "|"));
|
|
@@ -64,13 +56,6 @@ class CommandsService {
|
|
|
64
56
|
path: beautifiedCommandName,
|
|
65
57
|
title: beautifiedCommandName,
|
|
66
58
|
};
|
|
67
|
-
const playgrounInfo = yield this.$analyticsSettingsService.getPlaygroundInfo(null);
|
|
68
|
-
if (playgrounInfo && playgrounInfo.id) {
|
|
69
|
-
googleAnalyticsPageData.customDimensions = {
|
|
70
|
-
["cd7"]: playgrounInfo.id,
|
|
71
|
-
["cd8"]: playgrounInfo.usedTutorial.toString(),
|
|
72
|
-
};
|
|
73
|
-
}
|
|
74
59
|
yield analyticsService.trackInGoogleAnalytics(googleAnalyticsPageData);
|
|
75
60
|
yield this.$optionsTracker.trackOptions(this.$options);
|
|
76
61
|
}
|
|
@@ -272,106 +257,12 @@ class CommandsService {
|
|
|
272
257
|
this.$logger.fatal(message.join("\n"));
|
|
273
258
|
}
|
|
274
259
|
}
|
|
275
|
-
completeCommand() {
|
|
276
|
-
var e_1, _a;
|
|
277
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
278
|
-
const tabtab = require("tabtab");
|
|
279
|
-
const completeCallback = (err, data) => {
|
|
280
|
-
if (err || !data) {
|
|
281
|
-
return;
|
|
282
|
-
}
|
|
283
|
-
const commands = this.$injector.getRegisteredCommandsNames(false);
|
|
284
|
-
const splittedLine = data.line.split(/[ ]+/);
|
|
285
|
-
const line = _.filter(splittedLine, (w) => w !== "");
|
|
286
|
-
let commandName = line[line.length - 2];
|
|
287
|
-
const childrenCommands = this.$injector.getChildrenCommandsNames(commandName);
|
|
288
|
-
if (data.last && _.startsWith(data.last, "--")) {
|
|
289
|
-
return tabtab.log(_.keys(this.$options.options), data, "--");
|
|
290
|
-
}
|
|
291
|
-
if (data.last && _.startsWith(data.last, "-")) {
|
|
292
|
-
return tabtab.log(this.$options.shorthands, data, "-");
|
|
293
|
-
}
|
|
294
|
-
if (data.words === 1) {
|
|
295
|
-
const allCommands = this.allCommands({ includeDevCommands: false });
|
|
296
|
-
return tabtab.log(allCommands, data);
|
|
297
|
-
}
|
|
298
|
-
if (data.words >= 2) {
|
|
299
|
-
if (data.words !== line.length) {
|
|
300
|
-
commandName = `${line[data.words - 2]}|${line[data.words - 1]}`;
|
|
301
|
-
}
|
|
302
|
-
else {
|
|
303
|
-
commandName = `${line[line.length - 1]}`;
|
|
304
|
-
}
|
|
305
|
-
}
|
|
306
|
-
const command = this.$injector.resolveCommand(commandName);
|
|
307
|
-
if (command) {
|
|
308
|
-
const completionData = command.completionData;
|
|
309
|
-
if (completionData) {
|
|
310
|
-
return tabtab.log(completionData, data);
|
|
311
|
-
}
|
|
312
|
-
else {
|
|
313
|
-
return this.logChildrenCommandsNames(commandName, commands, tabtab, data);
|
|
314
|
-
}
|
|
315
|
-
}
|
|
316
|
-
else if (childrenCommands) {
|
|
317
|
-
let nonDefaultSubCommands = _.reject(childrenCommands, (children) => children[0] === "*");
|
|
318
|
-
let sanitizedChildrenCommands = [];
|
|
319
|
-
if (data.words !== line.length) {
|
|
320
|
-
sanitizedChildrenCommands = nonDefaultSubCommands.map((commandToMap) => {
|
|
321
|
-
const pipePosition = commandToMap.indexOf("|");
|
|
322
|
-
return commandToMap.substring(0, pipePosition !== -1 ? pipePosition : commandToMap.length);
|
|
323
|
-
});
|
|
324
|
-
}
|
|
325
|
-
else {
|
|
326
|
-
nonDefaultSubCommands = nonDefaultSubCommands.filter((commandNameToFilter) => commandNameToFilter.indexOf("|") !== -1);
|
|
327
|
-
sanitizedChildrenCommands = nonDefaultSubCommands.map((commandToMap) => {
|
|
328
|
-
const pipePosition = commandToMap.lastIndexOf("|");
|
|
329
|
-
return commandToMap.substring(pipePosition !== -1 ? pipePosition + 1 : 0, commandToMap.length);
|
|
330
|
-
});
|
|
331
|
-
}
|
|
332
|
-
return tabtab.log(sanitizedChildrenCommands, data);
|
|
333
|
-
}
|
|
334
|
-
else {
|
|
335
|
-
return this.logChildrenCommandsNames(commandName, commands, tabtab, data);
|
|
336
|
-
}
|
|
337
|
-
};
|
|
338
|
-
const aliases = ["ns", "nsc", "tns", "nativescript"];
|
|
339
|
-
try {
|
|
340
|
-
for (var aliases_1 = __asyncValues(aliases), aliases_1_1; aliases_1_1 = yield aliases_1.next(), !aliases_1_1.done;) {
|
|
341
|
-
const alias = aliases_1_1.value;
|
|
342
|
-
yield tabtab.complete(alias, completeCallback);
|
|
343
|
-
}
|
|
344
|
-
}
|
|
345
|
-
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
346
|
-
finally {
|
|
347
|
-
try {
|
|
348
|
-
if (aliases_1_1 && !aliases_1_1.done && (_a = aliases_1.return)) yield _a.call(aliases_1);
|
|
349
|
-
}
|
|
350
|
-
finally { if (e_1) throw e_1.error; }
|
|
351
|
-
}
|
|
352
|
-
return true;
|
|
353
|
-
});
|
|
354
|
-
}
|
|
355
260
|
beautifyCommandName(commandName) {
|
|
356
261
|
if (commandName.indexOf("*") > 0) {
|
|
357
|
-
return commandName.
|
|
262
|
+
return commandName.substring(0, commandName.indexOf("|"));
|
|
358
263
|
}
|
|
359
264
|
return commandName;
|
|
360
265
|
}
|
|
361
|
-
logChildrenCommandsNames(commandName, commands, tabtab, data) {
|
|
362
|
-
const matchingCommands = commands
|
|
363
|
-
.filter((commandToFilter) => {
|
|
364
|
-
return (commandToFilter.indexOf(commandName + "|") !== -1 &&
|
|
365
|
-
commandToFilter !== commandName);
|
|
366
|
-
})
|
|
367
|
-
.map((commandToMap) => {
|
|
368
|
-
const commandResult = commandToMap.replace(commandName + "|", "");
|
|
369
|
-
return commandResult.substring(0, commandResult.indexOf("|") !== -1
|
|
370
|
-
? commandResult.indexOf("|")
|
|
371
|
-
: commandResult.length);
|
|
372
|
-
});
|
|
373
|
-
return tabtab.log(matchingCommands, data);
|
|
374
|
-
}
|
|
375
266
|
}
|
|
376
267
|
exports.CommandsService = CommandsService;
|
|
377
268
|
yok_1.injector.register("commandsService", CommandsService);
|
|
@@ -12,23 +12,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
12
12
|
exports.HelpService = void 0;
|
|
13
13
|
const path = require("path");
|
|
14
14
|
const os_1 = require("os");
|
|
15
|
-
const
|
|
15
|
+
const marked_1 = require("marked");
|
|
16
16
|
const yok_1 = require("../yok");
|
|
17
17
|
const _ = require("lodash");
|
|
18
18
|
class HelpService {
|
|
19
|
-
constructor($logger, $injector, $errors, $fs, $staticConfig, $extensibilityService, $microTemplateService, $opener) {
|
|
20
|
-
this.$logger = $logger;
|
|
21
|
-
this.$injector = $injector;
|
|
22
|
-
this.$errors = $errors;
|
|
23
|
-
this.$fs = $fs;
|
|
24
|
-
this.$staticConfig = $staticConfig;
|
|
25
|
-
this.$extensibilityService = $extensibilityService;
|
|
26
|
-
this.$microTemplateService = $microTemplateService;
|
|
27
|
-
this.$opener = $opener;
|
|
28
|
-
this.pathToImages = this.$staticConfig.HTML_CLI_HELPERS_DIR;
|
|
29
|
-
this.pathToHtmlPages = this.$staticConfig.HTML_PAGES_DIR;
|
|
30
|
-
this.pathToManPages = this.$staticConfig.MAN_PAGES_DIR;
|
|
31
|
-
}
|
|
32
19
|
get newLineRegex() {
|
|
33
20
|
return /\r?\n/g;
|
|
34
21
|
}
|
|
@@ -44,6 +31,19 @@ class HelpService {
|
|
|
44
31
|
get pathToIndexHtml() {
|
|
45
32
|
return path.join(this.$staticConfig.HTML_PAGES_DIR, "index.html");
|
|
46
33
|
}
|
|
34
|
+
constructor($logger, $injector, $errors, $fs, $staticConfig, $extensibilityService, $microTemplateService, $opener) {
|
|
35
|
+
this.$logger = $logger;
|
|
36
|
+
this.$injector = $injector;
|
|
37
|
+
this.$errors = $errors;
|
|
38
|
+
this.$fs = $fs;
|
|
39
|
+
this.$staticConfig = $staticConfig;
|
|
40
|
+
this.$extensibilityService = $extensibilityService;
|
|
41
|
+
this.$microTemplateService = $microTemplateService;
|
|
42
|
+
this.$opener = $opener;
|
|
43
|
+
this.pathToImages = this.$staticConfig.HTML_CLI_HELPERS_DIR;
|
|
44
|
+
this.pathToHtmlPages = this.$staticConfig.HTML_PAGES_DIR;
|
|
45
|
+
this.pathToManPages = this.$staticConfig.MAN_PAGES_DIR;
|
|
46
|
+
}
|
|
47
47
|
openHelpForCommandInBrowser(commandData) {
|
|
48
48
|
return __awaiter(this, void 0, void 0, function* () {
|
|
49
49
|
const { commandName } = commandData;
|
|
@@ -136,7 +136,7 @@ class HelpService {
|
|
|
136
136
|
const outputText = yield this.$microTemplateService.parseContent(helpText, {
|
|
137
137
|
isHtml: true,
|
|
138
138
|
});
|
|
139
|
-
const htmlText = marked(outputText);
|
|
139
|
+
const htmlText = (0, marked_1.marked)(outputText);
|
|
140
140
|
const filePath = pathToMdFile
|
|
141
141
|
.replace(path.basename(pathToMdPages), path.basename(pathToHtmlPages))
|
|
142
142
|
.replace(mdFileName, htmlFileName);
|
|
@@ -237,7 +237,6 @@ class HelpService {
|
|
|
237
237
|
});
|
|
238
238
|
}
|
|
239
239
|
}
|
|
240
|
-
exports.HelpService = HelpService;
|
|
241
240
|
HelpService.MARKDOWN_FILE_EXTENSION = ".md";
|
|
242
241
|
HelpService.HTML_FILE_EXTENSION = ".html";
|
|
243
242
|
HelpService.MAN_PAGE_NAME_REGEX = /@MAN_PAGE_NAME@/g;
|
|
@@ -249,4 +248,5 @@ HelpService.EXTENSION_NAME_REGEX = /@EXTENSION_NAME@/g;
|
|
|
249
248
|
HelpService.MARKDOWN_LINK_REGEX = /\[([\w \-\`\<\>\*\:\\]+?)\]\([\s\S]+?\)/g;
|
|
250
249
|
HelpService.SPAN_REGEX = /([\s\S]*?)(?:\r?\n)?<span.*?>([\s\S]*?)<\/span>(?:\r?\n)*/g;
|
|
251
250
|
HelpService.NEW_LINE_REGEX = /<\/?\s*?br\s*?\/?>/g;
|
|
251
|
+
exports.HelpService = HelpService;
|
|
252
252
|
yok_1.injector.register("helpService", HelpService);
|
|
@@ -22,6 +22,7 @@ const _ = require("lodash");
|
|
|
22
22
|
const helpers_1 = require("../helpers");
|
|
23
23
|
const constants_1 = require("../../constants");
|
|
24
24
|
const yok_1 = require("../yok");
|
|
25
|
+
const color_1 = require("../../color");
|
|
25
26
|
const decorators_1 = require("../decorators");
|
|
26
27
|
class Hook {
|
|
27
28
|
constructor(name, fullPath) {
|
|
@@ -125,7 +126,7 @@ class HooksService {
|
|
|
125
126
|
this.$logger.trace(`Validating ${hookName} arguments.`);
|
|
126
127
|
const invalidArguments = this.validateHookArguments(hookEntryPoint, hook.fullPath);
|
|
127
128
|
if (invalidArguments.length) {
|
|
128
|
-
this.$logger.warn(`${hook.fullPath} will NOT be executed because it has invalid arguments - ${invalidArguments.join(", ")
|
|
129
|
+
this.$logger.warn(`${hook.fullPath} will NOT be executed because it has invalid arguments - ${color_1.color.grey(invalidArguments.join(", "))}.`);
|
|
129
130
|
return;
|
|
130
131
|
}
|
|
131
132
|
const projectDataHookArg = hookArguments["hookArgs"] && hookArguments["hookArgs"]["projectData"];
|
|
@@ -15,6 +15,9 @@ const helpers_1 = require("../helpers");
|
|
|
15
15
|
const _ = require("lodash");
|
|
16
16
|
const yok_1 = require("../yok");
|
|
17
17
|
class JsonFileSettingsService {
|
|
18
|
+
get lockFilePath() {
|
|
19
|
+
return `${this.jsonSettingsFilePath}.lock`;
|
|
20
|
+
}
|
|
18
21
|
constructor(jsonFileSettingsPath, $fs, $lockService, $logger) {
|
|
19
22
|
this.$fs = $fs;
|
|
20
23
|
this.$lockService = $lockService;
|
|
@@ -23,9 +26,6 @@ class JsonFileSettingsService {
|
|
|
23
26
|
this.jsonSettingsData = null;
|
|
24
27
|
this.jsonSettingsFilePath = jsonFileSettingsPath;
|
|
25
28
|
}
|
|
26
|
-
get lockFilePath() {
|
|
27
|
-
return `${this.jsonSettingsFilePath}.lock`;
|
|
28
|
-
}
|
|
29
29
|
getSettingValue(settingName, cacheOpts) {
|
|
30
30
|
return __awaiter(this, void 0, void 0, function* () {
|
|
31
31
|
const action = () => __awaiter(this, void 0, void 0, function* () {
|
|
@@ -23,11 +23,6 @@ const helpers_1 = require("../helpers");
|
|
|
23
23
|
const yok_1 = require("../yok");
|
|
24
24
|
const _ = require("lodash");
|
|
25
25
|
class LockService {
|
|
26
|
-
constructor($fs, $settingsService, $cleanupService) {
|
|
27
|
-
this.$fs = $fs;
|
|
28
|
-
this.$settingsService = $settingsService;
|
|
29
|
-
this.$cleanupService = $cleanupService;
|
|
30
|
-
}
|
|
31
26
|
get defaultLockFilePath() {
|
|
32
27
|
return this.getAbsoluteLockFilePath("lockfile.lock");
|
|
33
28
|
}
|
|
@@ -42,6 +37,11 @@ class LockService {
|
|
|
42
37
|
};
|
|
43
38
|
return lockParams;
|
|
44
39
|
}
|
|
40
|
+
constructor($fs, $settingsService, $cleanupService) {
|
|
41
|
+
this.$fs = $fs;
|
|
42
|
+
this.$settingsService = $settingsService;
|
|
43
|
+
this.$cleanupService = $cleanupService;
|
|
44
|
+
}
|
|
45
45
|
executeActionWithLock(action, lockFilePath, lockOpts) {
|
|
46
46
|
return __awaiter(this, void 0, void 0, function* () {
|
|
47
47
|
const releaseFunc = yield this.lock(lockFilePath, lockOpts);
|
|
@@ -6,12 +6,6 @@ const path_1 = require("path");
|
|
|
6
6
|
const _ = require("lodash");
|
|
7
7
|
const yok_1 = require("../yok");
|
|
8
8
|
class MessagesService {
|
|
9
|
-
constructor($fs) {
|
|
10
|
-
this.$fs = $fs;
|
|
11
|
-
this._pathsToMessageJsonFiles = null;
|
|
12
|
-
this._messageJsonFilesContentsCache = null;
|
|
13
|
-
this._pathsToMessageJsonFiles = [this.pathToDefaultMessageJson];
|
|
14
|
-
}
|
|
15
9
|
get pathToDefaultMessageJson() {
|
|
16
10
|
return (0, path_1.join)(__dirname, "..", "resources", "messages", "errorMessages.json");
|
|
17
11
|
}
|
|
@@ -22,6 +16,12 @@ class MessagesService {
|
|
|
22
16
|
}
|
|
23
17
|
return this._messageJsonFilesContentsCache;
|
|
24
18
|
}
|
|
19
|
+
constructor($fs) {
|
|
20
|
+
this.$fs = $fs;
|
|
21
|
+
this._pathsToMessageJsonFiles = null;
|
|
22
|
+
this._messageJsonFilesContentsCache = null;
|
|
23
|
+
this._pathsToMessageJsonFiles = [this.pathToDefaultMessageJson];
|
|
24
|
+
}
|
|
25
25
|
get pathsToMessageJsonFiles() {
|
|
26
26
|
if (!this._pathsToMessageJsonFiles) {
|
|
27
27
|
throw new Error("No paths to message json files provided.");
|
|
@@ -10,7 +10,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.ProjectFilesManager = void 0;
|
|
13
|
-
const
|
|
13
|
+
const minimatch_1 = require("minimatch");
|
|
14
14
|
const path = require("path");
|
|
15
15
|
const util = require("util");
|
|
16
16
|
const _ = require("lodash");
|
|
@@ -32,7 +32,7 @@ class ProjectFilesManager {
|
|
|
32
32
|
return projectFiles;
|
|
33
33
|
}
|
|
34
34
|
isFileExcluded(filePath, excludedProjectDirsAndFiles) {
|
|
35
|
-
const isInExcludedList = !!_.find(excludedProjectDirsAndFiles, (pattern) => minimatch(filePath, pattern, { nocase: true }));
|
|
35
|
+
const isInExcludedList = !!_.find(excludedProjectDirsAndFiles, (pattern) => (0, minimatch_1.minimatch)(filePath, pattern, { nocase: true }));
|
|
36
36
|
return (isInExcludedList || this.$projectFilesProvider.isFileExcluded(filePath));
|
|
37
37
|
}
|
|
38
38
|
createLocalToDevicePaths(deviceAppData, projectFilesPath, files, excludedProjectDirsAndFiles, projectFilesConfig) {
|
|
@@ -9,7 +9,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
9
9
|
exports.SettingsService = void 0;
|
|
10
10
|
const decorators_1 = require("../decorators");
|
|
11
11
|
const path = require("path");
|
|
12
|
-
const
|
|
12
|
+
const os_1 = require("os");
|
|
13
13
|
const yok_1 = require("../yok");
|
|
14
14
|
class SettingsService {
|
|
15
15
|
constructor($staticConfig, $hostInfo) {
|
|
@@ -31,7 +31,7 @@ class SettingsService {
|
|
|
31
31
|
getDefaultProfileDir() {
|
|
32
32
|
const defaultProfileDirLocation = this.$hostInfo.isWindows
|
|
33
33
|
? process.env.AppData
|
|
34
|
-
: path.join(
|
|
34
|
+
: path.join((0, os_1.homedir)(), ".local", "share");
|
|
35
35
|
return path.join(defaultProfileDirLocation, this.$staticConfig.PROFILE_DIR_NAME);
|
|
36
36
|
}
|
|
37
37
|
}
|