-
-
Notifications
You must be signed in to change notification settings - Fork 197
/
Copy pathconstants.ts
180 lines (158 loc) · 6.76 KB
/
constants.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
export const APP_FOLDER_NAME = "app";
export const APP_RESOURCES_FOLDER_NAME = "App_Resources";
export const PROJECT_FRAMEWORK_FOLDER_NAME = "framework";
export const NATIVESCRIPT_KEY_NAME = "nativescript";
export const NODE_MODULES_FOLDER_NAME = "node_modules";
export const TNS_MODULES_FOLDER_NAME = "tns_modules";
export const TNS_CORE_MODULES_NAME = "tns-core-modules";
export const TNS_ANDROID_RUNTIME_NAME = "tns-android";
export const TNS_IOS_RUNTIME_NAME = "tns-ios";
export const PACKAGE_JSON_FILE_NAME = "package.json";
export const NODE_MODULE_CACHE_PATH_KEY_NAME = "node-modules-cache-path";
export const DEFAULT_APP_IDENTIFIER_PREFIX = "org.nativescript";
export const LIVESYNC_EXCLUDED_DIRECTORIES = ["app_resources"];
export const TESTING_FRAMEWORKS = ['jasmine', 'mocha', 'qunit'];
export const TEST_RUNNER_NAME = "nativescript-unit-test-runner";
export const LIVESYNC_EXCLUDED_FILE_PATTERNS = ["**/*.js.map", "**/*.ts"];
export const XML_FILE_EXTENSION = ".xml";
export const PLATFORMS_DIR_NAME = "platforms";
export const HOOKS_DIR_NAME = "hooks";
export const LIB_DIR_NAME = "lib";
export const CODE_SIGN_ENTITLEMENTS = "CODE_SIGN_ENTITLEMENTS";
export const AWAIT_NOTIFICATION_TIMEOUT_SECONDS = 9;
export const SRC_DIR = "src";
export const MAIN_DIR = "main";
export const ASSETS_DIR = "assets";
export const MANIFEST_FILE_NAME = "AndroidManifest.xml";
export const APP_GRADLE_FILE_NAME = "app.gradle";
export const INFO_PLIST_FILE_NAME = "Info.plist";
export const INCLUDE_GRADLE_NAME = "include.gradle";
export const BUILD_XCCONFIG_FILE_NAME = "build.xcconfig";
export const BUILD_DIR = "build";
export const OUTPUTS_DIR = "outputs";
export const APK_DIR = "apk";
export const RESOURCES_DIR = "res";
export const CONFIG_NS_FILE_NAME = "nsconfig.json";
export const CONFIG_NS_APP_RESOURCES_ENTRY = "appResourcesPath";
export const CONFIG_NS_APP_ENTRY = "appPath";
export const DEPENDENCIES_JSON_NAME = "dependencies.json";
export const APK_EXTENSION_NAME = ".apk";
export class PackageVersion {
static NEXT = "next";
static LATEST = "latest";
static RC = "rc";
}
const liveSyncOperation = "LiveSync Operation";
export class LiveSyncTrackActionNames {
static LIVESYNC_OPERATION = liveSyncOperation;
static LIVESYNC_OPERATION_BUILD = `${liveSyncOperation} - Build`;
static DEVICE_INFO = `Device Info for ${liveSyncOperation}`;
}
export const PackageJsonKeysToKeep: Array<String> = ["name", "main", "android", "version", "pluginsData"];
export class SaveOptions {
static PRODUCTION = "save";
static DEV = "save-dev";
static OPTIONAL = "save-optional";
static EXACT = "save-exact";
}
export class ReleaseType {
static MAJOR = "major";
static PREMAJOR = "premajor";
static MINOR = "minor";
static PREMINOR = "preminor";
static PATCH = "patch";
static PREPATCH = "prepatch";
static PRERELEASE = "prerelease";
}
export const RESERVED_TEMPLATE_NAMES: IStringDictionary = {
"default": "tns-template-hello-world",
"tsc": "tns-template-hello-world-ts",
"typescript": "tns-template-hello-world-ts",
"ng": "tns-template-hello-world-ng",
"angular": "tns-template-hello-world-ng"
};
export class ITMSConstants {
static ApplicationMetadataFile = "metadata.xml";
static VerboseLoggingLevels = {
Informational: "informational",
Verbose: "detailed"
};
static iTMSExecutableName = "iTMSTransporter";
static iTMSDirectoryName = "itms";
}
class ItunesConnectApplicationTypesClass implements IiTunesConnectApplicationType {
public iOS = "iOS App";
public Mac = "Mac OS X App";
}
export const ItunesConnectApplicationTypes = new ItunesConnectApplicationTypesClass();
export class LiveSyncPaths {
static SYNC_DIR_NAME = "sync";
static REMOVEDSYNC_DIR_NAME = "removedsync";
static FULLSYNC_DIR_NAME = "fullsync";
static IOS_DEVICE_PROJECT_ROOT_PATH = "Library/Application Support/LiveSync";
static IOS_DEVICE_SYNC_ZIP_PATH = "Library/Application Support/LiveSync/sync.zip";
}
export const ANGULAR_NAME = "angular";
export const TYPESCRIPT_NAME = "typescript";
export const BUILD_OUTPUT_EVENT_NAME = "buildOutput";
export const CONNECTION_ERROR_EVENT_NAME = "connectionError";
export const USER_INTERACTION_NEEDED_EVENT_NAME = "userInteractionNeeded";
export const DEBUGGER_ATTACHED_EVENT_NAME = "debuggerAttached";
export const DEBUGGER_DETACHED_EVENT_NAME = "debuggerDetached";
export const VERSION_STRING = "version";
export const INSPECTOR_CACHE_DIRNAME = "ios-inspector";
export const POST_INSTALL_COMMAND_NAME = "post-install-cli";
export const ANDROID_RELEASE_BUILD_ERROR_MESSAGE = "When producing a release build, you need to specify all --key-store-* options.";
export class DebugCommandErrors {
public static UNABLE_TO_USE_FOR_DEVICE_AND_EMULATOR = "The options --for-device and --emulator cannot be used simultaneously. Please use only one of them.";
public static NO_DEVICES_EMULATORS_FOUND_FOR_OPTIONS = "Unable to find device or emulator for specified options.";
public static UNSUPPORTED_DEVICE_OS_FOR_DEBUGGING = "Unsupported device OS for debugging";
}
export const enum NativePlatformStatus {
requiresPlatformAdd = "1",
requiresPrepare = "2",
alreadyPrepared = "3"
}
export const enum DebugTools {
Chrome = "Chrome",
Inspector = "Inspector"
}
export const enum TrackActionNames {
Build = "Build",
CreateProject = "Create project",
Debug = "Debug",
Deploy = "Deploy",
LiveSync = "LiveSync",
RunSetupScript = "Run Setup Script",
CheckLocalBuildSetup = "Check Local Build Setup",
CheckEnvironmentRequirements = "Check Environment Requirements"
}
export const enum BuildStates {
Clean = "Clean",
Incremental = "Incremental"
}
export const NATIVESCRIPT_CLOUD_EXTENSION_NAME = "nativescript-cloud";
/**
* Used in ProjectDataService to concatenate the names of the properties inside nativescript key of package.json.
*/
export const NATIVESCRIPT_PROPS_INTERNAL_DELIMITER = "**|__**";
export const CLI_RESOURCES_DIR_NAME = "resources";
export class AssetConstants {
public static iOSResourcesFileName = "Contents.json";
public static iOSAssetsDirName = "Assets.xcassets";
public static iOSIconsDirName = "AppIcon.appiconset";
public static iOSSplashBackgroundsDirName = "LaunchScreen.AspectFill.imageset";
public static iOSSplashCenterImagesDirName = "LaunchScreen.Center.imageset";
public static iOSSplashImagesDirName = "LaunchImage.launchimage";
public static imageDefinitionsFileName = "image-definitions.json";
public static assets = "assets";
public static sizeDelimiter = "x";
public static defaultScale = 1;
public static defaultOverlayImageScale = 0.8;
}
// https://en.wikipedia.org/wiki/Darwin_(operating_system)#Release_history
export class MacOSVersions {
public static Sierra = "10.12";
public static HighSierra = "10.13";
}
export const MacOSDeprecationStringFormat = "Support for macOS %s is deprecated and will be removed in one of the next releases of NativeScript. Please, upgrade to the latest macOS version.";