"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
require("colors");
const preview_app_constants_1 = require("./services/livesync/playground/preview-app-constants");
const path_1 = require("path");
exports.APP_FOLDER_NAME = "app";
exports.APP_RESOURCES_FOLDER_NAME = "App_Resources";
exports.PROJECT_FRAMEWORK_FOLDER_NAME = "framework";
exports.NS_BASE_PODFILE = "NSPodfileBase";
exports.NATIVESCRIPT_KEY_NAME = "nativescript";
exports.NODE_MODULES_FOLDER_NAME = "node_modules";
exports.TNS_MODULES_FOLDER_NAME = "tns_modules";
exports.TNS_CORE_MODULES_NAME = "tns-core-modules";
exports.WEBPACK_PLUGIN_NAME = "nativescript-dev-webpack";
exports.TNS_CORE_MODULES_WIDGETS_NAME = "tns-core-modules-widgets";
exports.TNS_ANDROID_RUNTIME_NAME = "tns-android";
exports.TNS_IOS_RUNTIME_NAME = "tns-ios";
exports.PACKAGE_JSON_FILE_NAME = "package.json";
exports.PACKAGE_LOCK_JSON_FILE_NAME = "package-lock.json";
exports.ANDROID_DEVICE_APP_ROOT_TEMPLATE = `/data/data/%s/files`;
exports.NODE_MODULE_CACHE_PATH_KEY_NAME = "node-modules-cache-path";
exports.DEFAULT_APP_IDENTIFIER_PREFIX = "org.nativescript";
exports.LIVESYNC_EXCLUDED_DIRECTORIES = ["app_resources"];
exports.TESTING_FRAMEWORKS = ['jasmine', 'mocha', 'qunit'];
exports.TEST_RUNNER_NAME = "nativescript-unit-test-runner";
exports.LIVESYNC_EXCLUDED_FILE_PATTERNS = ["**/*.js.map", "**/*.ts"];
exports.XML_FILE_EXTENSION = ".xml";
exports.PLATFORMS_DIR_NAME = "platforms";
exports.HOOKS_DIR_NAME = "hooks";
exports.WEBPACK_CONFIG_NAME = "webpack.config.js";
exports.TSCCONFIG_TNS_JSON_NAME = "tsconfig.tns.json";
exports.KARMA_CONFIG_NAME = "karma.conf.js";
exports.LIB_DIR_NAME = "lib";
exports.CODE_SIGN_ENTITLEMENTS = "CODE_SIGN_ENTITLEMENTS";
exports.AWAIT_NOTIFICATION_TIMEOUT_SECONDS = 9;
exports.SRC_DIR = "src";
exports.MAIN_DIR = "main";
exports.ASSETS_DIR = "assets";
exports.ANDROID_ANALYTICS_DATA_DIR = "analytics";
exports.ANDROID_ANALYTICS_DATA_FILE = "build-statistics.json";
exports.MANIFEST_FILE_NAME = "AndroidManifest.xml";
exports.APP_GRADLE_FILE_NAME = "app.gradle";
exports.INFO_PLIST_FILE_NAME = "Info.plist";
exports.INCLUDE_GRADLE_NAME = "include.gradle";
exports.BUILD_XCCONFIG_FILE_NAME = "build.xcconfig";
exports.BUILD_DIR = "build";
exports.OUTPUTS_DIR = "outputs";
exports.APK_DIR = "apk";
exports.BUNDLE_DIR = "bundle";
exports.RESOURCES_DIR = "res";
exports.CONFIG_NS_FILE_NAME = "nsconfig.json";
exports.CONFIG_NS_APP_RESOURCES_ENTRY = "appResourcesPath";
exports.CONFIG_NS_APP_ENTRY = "appPath";
exports.DEPENDENCIES_JSON_NAME = "dependencies.json";
exports.APK_EXTENSION_NAME = ".apk";
exports.AAB_EXTENSION_NAME = ".aab";
exports.APKS_EXTENSION_NAME = ".apks";
exports.HASHES_FILE_NAME = ".nshashes";
exports.TNS_NATIVE_SOURCE_GROUP_NAME = "TNSNativeSource";
exports.NATIVE_SOURCE_FOLDER = "src";
exports.APPLICATION_RESPONSE_TIMEOUT_SECONDS = 60;
exports.NATIVE_EXTENSION_FOLDER = "extensions";
exports.IOS_WATCHAPP_FOLDER = "watchapp";
exports.IOS_WATCHAPP_EXTENSION_FOLDER = "watchextension";
class PackageVersion {
}
PackageVersion.NEXT = "next";
PackageVersion.LATEST = "latest";
PackageVersion.RC = "rc";
exports.PackageVersion = PackageVersion;
const liveSyncOperation = "LiveSync Operation";
class LiveSyncTrackActionNames {
}
LiveSyncTrackActionNames.LIVESYNC_OPERATION = liveSyncOperation;
LiveSyncTrackActionNames.LIVESYNC_OPERATION_BUILD = `${liveSyncOperation} - Build`;
LiveSyncTrackActionNames.DEVICE_INFO = `Device Info for ${liveSyncOperation}`;
exports.LiveSyncTrackActionNames = LiveSyncTrackActionNames;
exports.PackageJsonKeysToKeep = ["name", "main", "android", "version", "pluginsData"];
exports.TemplatesV2PackageJsonKeysToRemove = ["name", "version", "displayName", "templateType", "author", "keywords", "homepage", "bugs"];
class SaveOptions {
}
SaveOptions.PRODUCTION = "save";
SaveOptions.DEV = "save-dev";
SaveOptions.OPTIONAL = "save-optional";
SaveOptions.EXACT = "save-exact";
exports.SaveOptions = SaveOptions;
class ReleaseType {
}
ReleaseType.MAJOR = "major";
ReleaseType.PREMAJOR = "premajor";
ReleaseType.MINOR = "minor";
ReleaseType.PREMINOR = "preminor";
ReleaseType.PATCH = "patch";
ReleaseType.PREPATCH = "prepatch";
ReleaseType.PRERELEASE = "prerelease";
exports.ReleaseType = ReleaseType;
exports.RESERVED_TEMPLATE_NAMES = {
    "default": "tns-template-hello-world",
    "javascript": "tns-template-hello-world",
    "tsc": "tns-template-hello-world-ts",
    "vue": "tns-template-blank-vue",
    "typescript": "tns-template-hello-world-ts",
    "ng": "tns-template-hello-world-ng",
    "angular": "tns-template-hello-world-ng"
};
exports.ANALYTICS_LOCAL_TEMPLATE_PREFIX = "localTemplate_";
class ITMSConstants {
}
ITMSConstants.ApplicationMetadataFile = "metadata.xml";
ITMSConstants.VerboseLoggingLevels = {
    Informational: "informational",
    Verbose: "detailed"
};
ITMSConstants.iTMSExecutableName = "iTMSTransporter";
ITMSConstants.iTMSDirectoryName = "itms";
exports.ITMSConstants = ITMSConstants;
class ItunesConnectApplicationTypesClass {
    constructor() {
        this.iOS = "iOS App";
        this.Mac = "Mac OS X App";
    }
}
exports.iOSAppResourcesFolderName = "iOS";
exports.androidAppResourcesFolderName = "Android";
exports.ItunesConnectApplicationTypes = new ItunesConnectApplicationTypesClass();
exports.VUE_NAME = "vue";
exports.ANGULAR_NAME = "angular";
exports.JAVASCRIPT_NAME = "javascript";
exports.TYPESCRIPT_NAME = "typescript";
exports.NgFlavorName = "Angular";
exports.VueFlavorName = "Vue.js";
exports.TsFlavorName = "Plain TypeScript";
exports.JsFlavorName = "Plain JavaScript";
class ProjectTypes {
}
ProjectTypes.NgFlavorName = exports.NgFlavorName;
ProjectTypes.VueFlavorName = exports.VueFlavorName;
ProjectTypes.TsFlavorName = "Pure TypeScript";
ProjectTypes.JsFlavorName = "Pure JavaScript";
ProjectTypes.ReactFlavorName = "React";
ProjectTypes.SvelteFlavorName = "Svelte";
exports.ProjectTypes = ProjectTypes;
exports.BUILD_OUTPUT_EVENT_NAME = "buildOutput";
exports.CONNECTION_ERROR_EVENT_NAME = "connectionError";
exports.USER_INTERACTION_NEEDED_EVENT_NAME = "userInteractionNeeded";
exports.DEBUGGER_ATTACHED_EVENT_NAME = "debuggerAttached";
exports.DEBUGGER_DETACHED_EVENT_NAME = "debuggerDetached";
exports.VERSION_STRING = "version";
exports.INSPECTOR_CACHE_DIRNAME = "ios-inspector";
exports.POST_INSTALL_COMMAND_NAME = "post-install-cli";
exports.ANDROID_RELEASE_BUILD_ERROR_MESSAGE = "When producing a release build, you need to specify all --key-store-* options.";
exports.CACACHE_DIRECTORY_NAME = "_cacache";
exports.FILES_CHANGE_EVENT_NAME = "filesChangeEvent";
exports.INITIAL_SYNC_EVENT_NAME = "initialSyncEvent";
exports.PREPARE_READY_EVENT_NAME = "prepareReadyEvent";
exports.WEBPACK_COMPILATION_COMPLETE = "webpackCompilationComplete";
class DebugCommandErrors {
}
DebugCommandErrors.UNABLE_TO_USE_FOR_DEVICE_AND_EMULATOR = "The options --for-device and --emulator cannot be used simultaneously. Please use only one of them.";
DebugCommandErrors.NO_DEVICES_EMULATORS_FOUND_FOR_OPTIONS = "Unable to find device or emulator for specified options.";
DebugCommandErrors.UNSUPPORTED_DEVICE_OS_FOR_DEBUGGING = "Unsupported device OS for debugging";
exports.DebugCommandErrors = DebugCommandErrors;
exports.AnalyticsEventLabelDelimiter = "__";
exports.NATIVESCRIPT_CLOUD_EXTENSION_NAME = "nativescript-cloud";
exports.NATIVESCRIPT_PROPS_INTERNAL_DELIMITER = "**|__**";
exports.CLI_RESOURCES_DIR_NAME = "resources";
class AssetConstants {
}
AssetConstants.iOSResourcesFileName = "Contents.json";
AssetConstants.iOSAssetsDirName = "Assets.xcassets";
AssetConstants.iOSIconsDirName = "AppIcon.appiconset";
AssetConstants.iOSSplashBackgroundsDirName = "LaunchScreen.AspectFill.imageset";
AssetConstants.iOSSplashCenterImagesDirName = "LaunchScreen.Center.imageset";
AssetConstants.iOSSplashImagesDirName = "LaunchImage.launchimage";
AssetConstants.imageDefinitionsFileName = "image-definitions.json";
AssetConstants.assets = "assets";
AssetConstants.sizeDelimiter = "x";
AssetConstants.defaultScale = 1;
AssetConstants.defaultOverlayImageScale = 0.8;
exports.AssetConstants = AssetConstants;
class MacOSVersions {
}
MacOSVersions.Sierra = "10.12";
MacOSVersions.HighSierra = "10.13";
MacOSVersions.Mojave = "10.14";
exports.MacOSVersions = MacOSVersions;
exports.MacOSDeprecationStringFormat = "NativeScript does not support macOS %s and some functionality may not work. Please, upgrade to the latest macOS version.";
exports.PROGRESS_PRIVACY_POLICY_URL = "https://www.progress.com/legal/privacy-policy";
class SubscribeForNewsletterMessages {
}
SubscribeForNewsletterMessages.AgreeToReceiveEmailMsg = "I agree".green.bold + " to receive email communications from Progress Software in the form of the NativeScript Newsletter. Consent may be withdrawn at any time.";
SubscribeForNewsletterMessages.ReviewPrivacyPolicyMsg = `You can review the Progress Software Privacy Policy at \`${exports.PROGRESS_PRIVACY_POLICY_URL}\``;
SubscribeForNewsletterMessages.PromptMsg = "Input your e-mail address to agree".green + " or " + "leave empty to decline".red.bold + ":";
exports.SubscribeForNewsletterMessages = SubscribeForNewsletterMessages;
class TemplateVersions {
}
TemplateVersions.v1 = "v1";
TemplateVersions.v2 = "v2";
exports.TemplateVersions = TemplateVersions;
class ProjectTemplateErrors {
}
ProjectTemplateErrors.InvalidTemplateVersionStringFormat = "The template '%s' has a NativeScript version '%s' that is not supported. Unable to create project from it.";
exports.ProjectTemplateErrors = ProjectTemplateErrors;
class Hooks {
}
Hooks.createProject = "createProject";
exports.Hooks = Hooks;
class AndroidBuildDefaults {
}
AndroidBuildDefaults.GradleVersion = "4.4";
AndroidBuildDefaults.GradleAndroidPluginVersion = "3.1.2";
exports.AndroidBuildDefaults = AndroidBuildDefaults;
exports.PACKAGE_PLACEHOLDER_NAME = "__PACKAGE__";
class AddPlaformErrors {
}
AddPlaformErrors.InvalidFrameworkPathStringFormat = "Invalid frameworkPath: %s. Please ensure the specified frameworkPath exists.";
exports.AddPlaformErrors = AddPlaformErrors;
exports.PLUGIN_BUILD_DATA_FILENAME = "plugin-data.json";
exports.PLUGINS_BUILD_DATA_FILENAME = ".ns-plugins-build-data.json";
class PluginNativeDirNames {
}
PluginNativeDirNames.iOS = "ios";
PluginNativeDirNames.Android = "android";
exports.PluginNativeDirNames = PluginNativeDirNames;
exports.PODFILE_NAME = "Podfile";
class IosProjectConstants {
}
IosProjectConstants.XcodeProjExtName = ".xcodeproj";
IosProjectConstants.XcodeSchemeExtName = ".xcscheme";
exports.IosProjectConstants = IosProjectConstants;
class BundleValidatorMessages {
}
BundleValidatorMessages.MissingBundlePlugin = "Passing --bundle requires a bundling plugin. No bundling plugin found or the specified bundling plugin is invalid.";
BundleValidatorMessages.NotSupportedVersion = `The NativeScript CLI requires nativescript-dev-webpack %s or later to work properly. After updating nativescript-dev-webpack you need to ensure "webpack.config.js" file is up to date with the one in the new version of nativescript-dev-webpack. You can automatically update it using "./node_modules/.bin/update-ns-webpack --configs" command.`;
exports.BundleValidatorMessages = BundleValidatorMessages;
class AndroidBundleValidatorMessages {
}
AndroidBundleValidatorMessages.AAB_NOT_SUPPORTED_BY_COMMNAND_MESSAGE = "This command does not support --aab (Android App Bundle) parameter.";
AndroidBundleValidatorMessages.NOT_SUPPORTED_RUNTIME_VERSION = "Android App Bundle (--aab) option requires NativeScript Android Runtime (tns-android) version %s and above.";
AndroidBundleValidatorMessages.NOT_SUPPORTED_ANDROID_VERSION = "Cannot use the Android App Bundle (--aab) option on device '%s' with Android '%s'. The --aab options is supported on Android '%s' and above.";
exports.AndroidBundleValidatorMessages = AndroidBundleValidatorMessages;
class AndroidAppBundleMessages {
}
AndroidAppBundleMessages.ANDROID_APP_BUNDLE_DOCS_MESSAGE = "What is Android App Bundle: https://docs.nativescript.org/tooling/publishing/android-app-bundle";
AndroidAppBundleMessages.ANDROID_APP_BUNDLE_PUBLISH_DOCS_MESSAGE = "How to use Android App Bundle for publishing: https://docs.nativescript.org/tooling/publishing/publishing-android-apps#android-app-bundle";
exports.AndroidAppBundleMessages = AndroidAppBundleMessages;
exports.RunOnDeviceEvents = {
    runOnDeviceStopped: "runOnDeviceStopped",
    runOnDeviceError: "runOnDeviceError",
    previewAppLiveSyncError: preview_app_constants_1.PreviewAppLiveSyncEvents.PREVIEW_APP_LIVE_SYNC_ERROR,
    runOnDeviceExecuted: "runOnDeviceExecuted",
    runOnDeviceStarted: "runOnDeviceStarted",
    runOnDeviceNotification: "notify"
};
var IOSDeviceTargets;
(function (IOSDeviceTargets) {
    IOSDeviceTargets["ios"] = "1,2";
    IOSDeviceTargets[IOSDeviceTargets["watchos"] = 4] = "watchos";
})(IOSDeviceTargets = exports.IOSDeviceTargets || (exports.IOSDeviceTargets = {}));
var IOSNativeTargetProductTypes;
(function (IOSNativeTargetProductTypes) {
    IOSNativeTargetProductTypes["watchApp"] = "com.apple.product-type.application.watchapp2";
    IOSNativeTargetProductTypes["watchExtension"] = "com.apple.product-type.watchkit2-extension";
    IOSNativeTargetProductTypes["appExtension"] = "com.apple.product-type.app-extension";
})(IOSNativeTargetProductTypes = exports.IOSNativeTargetProductTypes || (exports.IOSNativeTargetProductTypes = {}));
var IOSNativeTargetTypes;
(function (IOSNativeTargetTypes) {
    IOSNativeTargetTypes["watchApp"] = "watch_app";
    IOSNativeTargetTypes["watchExtension"] = "watch_extension";
    IOSNativeTargetTypes["appExtension"] = "app_extension";
})(IOSNativeTargetTypes = exports.IOSNativeTargetTypes || (exports.IOSNativeTargetTypes = {}));
const pathToLoggerAppendersDir = path_1.join(__dirname, "common", "logger", "appenders");
exports.LoggerAppenders = {
    emitAppender: path_1.join(pathToLoggerAppendersDir, "emit-appender"),
    cliAppender: path_1.join(pathToLoggerAppendersDir, "cli-appender")
};
var DeviceConnectionType;
(function (DeviceConnectionType) {
    DeviceConnectionType[DeviceConnectionType["Unknown"] = 0] = "Unknown";
    DeviceConnectionType[DeviceConnectionType["USB"] = 1] = "USB";
    DeviceConnectionType[DeviceConnectionType["Wifi"] = 2] = "Wifi";
    DeviceConnectionType[DeviceConnectionType["Local"] = 10] = "Local";
})(DeviceConnectionType = exports.DeviceConnectionType || (exports.DeviceConnectionType = {}));
var LoggerLevel;
(function (LoggerLevel) {
    LoggerLevel["ALL"] = "ALL";
    LoggerLevel["TRACE"] = "TRACE";
    LoggerLevel["DEBUG"] = "DEBUG";
    LoggerLevel["INFO"] = "INFO";
    LoggerLevel["WARN"] = "WARN";
    LoggerLevel["ERROR"] = "ERROR";
    LoggerLevel["FATAL"] = "FATAL";
    LoggerLevel["MARK"] = "MARK";
    LoggerLevel["OFF"] = "OFF";
})(LoggerLevel = exports.LoggerLevel || (exports.LoggerLevel = {}));
var LoggerConfigData;
(function (LoggerConfigData) {
    LoggerConfigData["useStderr"] = "useStderr";
    LoggerConfigData["wrapMessageWithBorders"] = "wrapMessageWithBorders";
    LoggerConfigData["skipNewLine"] = "skipNewLine";
})(LoggerConfigData = exports.LoggerConfigData || (exports.LoggerConfigData = {}));
exports.EMIT_APPENDER_EVENT_NAME = "logData";
