# All files / src constants.js

100% Statements 215/215
100% Branches 0/0
100% Functions 0/0
100% Lines 120/120

Press n or j to go to the next uncovered block, b, p or k for the previous block.

    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
    181
    182
    183
    184
    185
    186
    187
    188
    189
    190
    191
    192
    193
    194
    195
    196
    197
    198
    199
    200
    201
    202
    203
    204
    205
    206
    207
    208
    209
    210
    211
    212
    213
    214
    215
    216
    217
    218
    219
    220
    221
    222
    223
    224
    225
    226
    227
    228
    229
    230
    231
    232
    233
    234
    235
    236
    237
    238
    239
    240
    241
    242
    243
    244
    245
    246
    247
    248
    249
    250
    251
    252
    253
    254
    255
    256
    257
    258
    259
    260
    261
    262
    263
    264
    265
    266
    267
    268
    269
    270
    271
    272
    273
    274
    275
    276
    277
    278
    279
    280
    281
    282
    283
    284
    285
    286
    287
    288
    289
    290
    291
    292
    293
    294
    295
    296
    297
    298
    299
    300
    301
    302
    303
    304
    305
    306
    307
    308
    309
    310
    311
    312
    313
    314
    315
    316
    317
    318
    319
    320
    321
    322
    323
    324
    325
    326
    327
    328
    329
    330
    331
    332
    333
    334
    335
    336
    337
    338
    339
    340
    341
    342
    343
    344
    345
    346
    347
    348
    349
    350
    351
    352
    353
    354
    355
    356
    357
    358
    359
    360
    3612x
    2x
    2x
    2x
    2x
    2x
    2x
    2x
    2x
    2x
    2x
    2x
    2x
    2x
    2x
    2x
    2x
    2x
    2x
    2x
    2x
    2x
    2x
    2x
    2x
    2x
    2x
    2x
    2x
    2x
    2x
    2x
    2x
    2x
    2x
    2x
    2x
    2x
    2x
    2x
    2x
    2x
    2x
    2x
    2x
    2x
    2x
    2x
    2x

    2x

    2x

    2x
    2x
    2x

    2x

    2x

    2x

    2x

    2x

    2x

    2x
    2x

    2x
    2x
    2x
    2x

    2x
    2x
    2x
    2x
    2x
    2x
    2x
    2x
    2x
    2x
    2x
    2x
    2x
    2x
    2x

    2x
    2x
    2x
    2x
    2x

    2x
    2x
    2x
    2x
    2x
    2x
    2x
    2x
    2x
    2x
    2x
    2x

    2x
    2x

    2x

    2x

    2x

    2x

    2x

    2x

    2x

    2x

    2x
    2x
    2x
    2x
    2x
    2x
    2x
    2x
    2x
    2x

    2x

    2x

     // PLATFORM
    export const ANDROID = 'android';
    export const ANDROID_AUTO = 'androidauto';
    export const ANDROID_TV = 'androidtv';
    export const ANDROID_WEAR = 'androidwear';
    export const ALEXA = 'alexa';
    export const APPLE_AUTO = 'appleauto';
    export const ASTIAN = 'astian';
    export const BLACKBERRY = 'blackberry';
    export const CHROMECAST = 'chromecast';
    export const CHROME_OS = 'chromeos';
    export const FIREFOX_OS = 'firefoxos';
    export const FIREFOX_TV = 'firefoxtv';
    export const FIRE_OS = 'fireos';
    export const FIRE_TV = 'firetv';
    export const HBBTV = 'hbbtv';
    export const IOS = 'ios';
    export const KAIOS = 'kaios';
    export const MACOS = 'macos';
    export const MEEGO = 'meego';
    export const NETCAST = 'netcast';
    export const OCCULUS = 'occulus';
    export const ORSAY = 'orsay';
    export const PS4 = 'ps4';
    export const ROKU = 'roku';
    export const SAILFISH = 'sailfish';
    export const TIVO = 'tivo';
    export const TIZEN = 'tizen';
    export const TIZEN_WATCH = 'tizenwatch';
    export const TIZEN_MOBILE = 'tizenmobile';
    export const TVOS = 'tvos';
    export const UBUNTU = 'ubuntu';
    export const UBUNTU_TOUCH = 'ubuntutouch';
    export const UNITY = 'unity';
    export const VEWD = 'vewd';
    export const VIDAA = 'vidaa';
    export const VIERACONNECT = 'vieraconnect';
    export const VIZIO = 'vizio';
    export const WATCHOS = 'watchos';
    export const WEB = 'web';
    export const WEBNEXT = 'webnext';
    export const WEBOS = 'webos';
    export const WEBIAN = 'webian';
    export const WII = 'wii';
    export const WINDOWS = 'windows';
    export const WP10 = 'wp10';
    export const WP8 = 'wp8';
    export const XBOX = 'xbox';
    export const XBOX360 = 'xbox360';
    // Kodi, Boxee, HorizonTV, Mediaroom(Ericsson), YahooSmartTV, Slingbox, Hololens, Occulus, GearVR, WebVR

    export const ICONS = {
        PHONE: '📱',
        AUTO: '🚗',
        TV: '📺',
        CONSOLE: '🎮',
        WATCH: '⌚',
        DESKTOP: '🖥️ ',
        BROWSER: '🌐',
        VOICE: '📢',
        SERVICE: '☁️'
    };

    export const OS_WINDOWS = 'windows';
    export const OS_MAC = 'mac';
    export const OS_LINUX = 'linux';

    export const OS = {
        ALL: [OS_MAC, OS_WINDOWS, OS_LINUX],
        MAC_ONLY: [OS_MAC],
        WINDOWS_ONLY: [OS_WINDOWS],
        LINUX_ONLY: [OS_LINUX]
    };

    export const PLATFORMS = {
        // ACTIVE
        android: { defaultPort: 8081, icon: ICONS.PHONE, supportedOS: OS.ALL, isActive: true, requiresSharedConfig: false },
        androidtv: { defaultPort: 8081, icon: ICONS.TV, supportedOS: OS.ALL, isActive: true, requiresSharedConfig: false },
        androidwear: { defaultPort: 8081, icon: ICONS.WATCH, supportedOS: OS.ALL, isActive: true, requiresSharedConfig: false },
        firefoxos: { defaultPort: 8089, icon: ICONS.PHONE, supportedOS: OS.ALL, isActive: true, requiresSharedConfig: true },
        firefoxtv: { defaultPort: 8088, icon: ICONS.TV, supportedOS: OS.ALL, isActive: true, requiresSharedConfig: true },
        ios: { defaultPort: 8081, icon: ICONS.PHONE, supportedOS: OS.MAC_ONLY, isActive: true, requiresSharedConfig: false },
        kaios: { defaultPort: 8086, icon: ICONS.PHONE, supportedOS: OS.ALL, isActive: true, requiresSharedConfig: true },
        macos: { defaultPort: 8084, icon: ICONS.DESKTOP, supportedOS: OS.MAC_ONLY, isActive: true, requiresSharedConfig: true },
        tizen: { defaultPort: 8083, icon: ICONS.TV, supportedOS: OS.ALL, isActive: true, requiresSharedConfig: true },
        tizenwatch: { defaultPort: 8087, icon: ICONS.WATCH, supportedOS: OS.ALL, isActive: true, requiresSharedConfig: true },
        tizenmobile: { defaultPort: 8087, icon: ICONS.PHONE, supportedOS: OS.ALL, isActive: true, requiresSharedConfig: true },
        tvos: { defaultPort: 8081, icon: ICONS.TV, supportedOS: OS.MAC_ONLY, isActive: true, requiresSharedConfig: false },
        web: { defaultPort: 8080, icon: ICONS.BROWSER, supportedOS: OS.ALL, isActive: true, requiresSharedConfig: true },
        webos: { defaultPort: 8083, icon: ICONS.TV, supportedOS: OS.ALL, isActive: true, requiresSharedConfig: true },
        windows: { defaultPort: 8085, icon: ICONS.DESKTOP, supportedOS: OS.WINDOWS_ONLY, isActive: true, requiresSharedConfig: true },
        // NON ACTIVE
        watchos: { defaultPort: 999999, icon: ICONS.PHONE, supportedOS: OS.ALL, isActive: false, requiresSharedConfig: true },
        androidauto: { defaultPort: 8081, icon: ICONS.AUTO, supportedOS: OS.ALL, isActive: false, requiresSharedConfig: true },
        alexa: { defaultPort: 999999, icon: ICONS.VOICE, supportedOS: OS.ALL, isActive: false, requiresSharedConfig: true },
        appleauto: { defaultPort: 8081, icon: ICONS.AUTO, supportedOS: OS.ALL, isActive: false, requiresSharedConfig: true },
        astian: { defaultPort: 999999, icon: ICONS.PHONE, supportedOS: OS.ALL, isActive: false, requiresSharedConfig: true },
        blackberry: { defaultPort: 999999, icon: ICONS.PHONE, supportedOS: OS.ALL, isActive: false, requiresSharedConfig: true },
        chromecast: { defaultPort: 999999, icon: ICONS.PHONE, supportedOS: OS.ALL, isActive: false, requiresSharedConfig: true },
        chromeos: { defaultPort: 999999, icon: ICONS.PHONE, supportedOS: OS.ALL, isActive: false, requiresSharedConfig: true },
        fireos: { defaultPort: 999999, icon: ICONS.PHONE, supportedOS: OS.ALL, isActive: false, requiresSharedConfig: true },
        firetv: { defaultPort: 999999, icon: ICONS.PHONE, supportedOS: OS.ALL, isActive: false, requiresSharedConfig: true },
        hbbtv: { defaultPort: 999999, icon: ICONS.PHONE, supportedOS: OS.ALL, isActive: false, requiresSharedConfig: true },
        meego: { defaultPort: 999999, icon: ICONS.PHONE, supportedOS: OS.ALL, isActive: false, requiresSharedConfig: true },
        netcast: { defaultPort: 999999, icon: ICONS.PHONE, supportedOS: OS.ALL, isActive: false, requiresSharedConfig: true },
        occulus: { defaultPort: 999999, icon: ICONS.PHONE, supportedOS: OS.ALL, isActive: false, requiresSharedConfig: true },
        orsay: { defaultPort: 999999, icon: ICONS.PHONE, supportedOS: OS.ALL, isActive: false, requiresSharedConfig: true },
        ps4: { defaultPort: 999999, icon: ICONS.PHONE, supportedOS: OS.ALL, isActive: false, requiresSharedConfig: true },
        roku: { defaultPort: 999999, icon: ICONS.PHONE, supportedOS: OS.ALL, isActive: false, requiresSharedConfig: true },
        sailfish: { defaultPort: 999999, icon: ICONS.PHONE, supportedOS: OS.ALL, isActive: false, requiresSharedConfig: true },
        tivo: { defaultPort: 999999, icon: ICONS.PHONE, supportedOS: OS.ALL, isActive: false, requiresSharedConfig: true },
        ubuntu: { defaultPort: 999999, icon: ICONS.PHONE, supportedOS: OS.ALL, isActive: false, requiresSharedConfig: true },
        ubuntutouch: { defaultPort: 999999, icon: ICONS.PHONE, supportedOS: OS.ALL, isActive: false, requiresSharedConfig: true },
        unity: { defaultPort: 999999, icon: ICONS.PHONE, supportedOS: OS.ALL, isActive: false, requiresSharedConfig: true },
        vewd: { defaultPort: 999999, icon: ICONS.PHONE, supportedOS: OS.ALL, isActive: false, requiresSharedConfig: true },
        vieraconnect: { defaultPort: 999999, icon: ICONS.PHONE, supportedOS: OS.ALL, isActive: false, requiresSharedConfig: true },
        vizio: { defaultPort: 999999, icon: ICONS.PHONE, supportedOS: OS.ALL, isActive: false, requiresSharedConfig: true },
        webnext: { defaultPort: 999999, icon: ICONS.PHONE, supportedOS: OS.ALL, isActive: false, requiresSharedConfig: true },
        webian: { defaultPort: 999999, icon: ICONS.PHONE, supportedOS: OS.ALL, isActive: false, requiresSharedConfig: true },
        wii: { defaultPort: 999999, icon: ICONS.PHONE, supportedOS: OS.ALL, isActive: false, requiresSharedConfig: true },
        wp10: { defaultPort: 999999, icon: ICONS.PHONE, supportedOS: OS.ALL, isActive: false, requiresSharedConfig: true },
        wp8: { defaultPort: 999999, icon: ICONS.PHONE, supportedOS: OS.ALL, isActive: false, requiresSharedConfig: true },
        xbox: { defaultPort: 999999, icon: ICONS.PHONE, supportedOS: OS.ALL, isActive: false, requiresSharedConfig: true },
        xbox360: { defaultPort: 999999, icon: ICONS.PHONE, supportedOS: OS.ALL, isActive: false, requiresSharedConfig: true },
    };

    export const WEB_HOSTED_PLATFORMS = [
        WEB,
        TIZEN,
        WEBOS,
        MACOS,
        WINDOWS,
        TIZEN_MOBILE,
        TIZEN_WATCH
    ];
    // PLATFORM GROUP
    export const PLATFORM_GROUP_SMARTTV = 'smarttv';
    export const PLATFORM_GROUP_ELECTRON = 'electron';
    // FORM FACTOR
    export const FORM_FACTOR_MOBILE = 'mobile';
    export const FORM_FACTOR_DESKTOP = 'desktop';
    export const FORM_FACTOR_WATCH = 'watch';
    export const FORM_FACTOR_TV = 'tv';
    // CLI
    export const CLI_ANDROID_EMULATOR = 'androidEmulator';
    export const CLI_ANDROID_ADB = 'androidAdb';
    export const CLI_ANDROID_AVDMANAGER = 'androidAvdManager';
    export const CLI_ANDROID_SDKMANAGER = 'androidSdkManager';
    export const CLI_TIZEN_EMULATOR = 'tizenEmulator';
    export const CLI_KAIOS_EMULATOR = 'tizenEmulator';
    export const CLI_TIZEN = 'tizen';
    export const CLI_SDB_TIZEN = 'tizenSdb';
    export const CLI_WEBOS_ARES = 'webosAres';
    export const CLI_WEBOS_ARES_PACKAGE = 'webosAresPackage';
    export const CLI_WEBOS_ARES_INSTALL = 'webosAresInstall';
    export const CLI_WEBOS_ARES_LAUNCH = 'webosAresLaunch';
    export const CLI_WEBOS_ARES_SETUP_DEVICE = 'webosAresSetup';
    export const CLI_WEBOS_ARES_DEVICE_INFO = 'webosAresDeviceInfo';
    export const CLI_WEBOS_ARES_NOVACOM = 'webosAresNovacom';
    // SDK
    export const ANDROID_SDK = 'ANDROID_SDK';
    export const ANDROID_NDK = 'ANDROID_NDK';
    export const TIZEN_SDK = 'TIZEN_SDK';
    export const WEBOS_SDK = 'WEBOS_SDK';
    export const KAIOS_SDK = 'KAIOS_SDK';

    export const RENATIVE_CONFIG_NAME = 'renative.json';
    export const RENATIVE_CONFIG_LOCAL_NAME = 'renative.local.json';
    export const RENATIVE_CONFIG_PRIVATE_NAME = 'renative.private.json';
    export const RENATIVE_CONFIG_TEMPLATE_NAME = 'renative.template.json';
    export const RENATIVE_CONFIG_BUILD_NAME = 'renative.build.json';
    export const RENATIVE_CONFIG_RUNTIME_NAME = 'renative.runtime.json';
    export const RENATIVE_CONFIG_WORKSPACES_NAME = 'renative.workspaces.json';
    export const RENATIVE_CONFIG_PLUGINS_NAME = 'renative.plugins.json';
    export const RENATIVE_CONFIG_TEMPLATES_NAME = 'renative.templates.json';
    export const RN_CLI_CONFIG_NAME = 'rn-cli.config.js';
    export const RN_BABEL_CONFIG_NAME = 'babel.config.js';
    export const SAMPLE_APP_ID = 'helloWorld';

    export const IS_TABLET_ABOVE_INCH = 6.5;
    export const IS_WEAR_UNDER_SIZE = 1000; // width + height

    export const PACKAGE_JSON_FILEDS = [
        'name',
        'version',
        'description',
        'keywords',
        'homepage',
        'bugs',
        'license',
        'author',
        'contributors',
        'files',
        'main',
        'browser',
        'bin',
        'man',
        'directories',
        'repository',
        'scripts',
        'config',
        'dependencies',
        'devDependencies',
        'peerDependencies',
        'bundledDependencies',
        'optionalDependencies',
        'engines',
        'engineStrict',
        'os',
        'cpu',
        'private',
        'publishConfig'
    ];
    export const SUPPORTED_PLATFORMS = [
        IOS,
        ANDROID,
        ANDROID_TV,
        ANDROID_WEAR,
        WEB,
        TIZEN,
        TIZEN_MOBILE,
        TVOS,
        WEBOS,
        MACOS,
        WINDOWS,
        TIZEN_WATCH,
        KAIOS,
        FIREFOX_OS,
        FIREFOX_TV,
    ];
    export const SUPPORTED_PLATFORMS_MAC = [
        IOS,
        ANDROID,
        ANDROID_TV,
        ANDROID_WEAR,
        WEB,
        TIZEN_MOBILE,
        TIZEN,
        TVOS,
        WEBOS,
        MACOS,
        WINDOWS,
        TIZEN_WATCH,
        KAIOS,
        FIREFOX_OS,
        FIREFOX_TV,
    ];
    export const SUPPORTED_PLATFORMS_WIN = [
        ANDROID,
        ANDROID_TV,
        ANDROID_WEAR,
        WEB,
        TIZEN,
        TVOS,
        TIZEN_MOBILE,
        WEBOS,
        WINDOWS,
        TIZEN_WATCH,
        KAIOS,
        FIREFOX_OS,
        FIREFOX_TV,
    ];
    export const SUPPORTED_PLATFORMS_LINUX = [ANDROID, ANDROID_TV, ANDROID_WEAR];
    export const SDK_PLATFORMS = {};
    SDK_PLATFORMS[ANDROID] = ANDROID_SDK;
    SDK_PLATFORMS[ANDROID_TV] = ANDROID_SDK;
    SDK_PLATFORMS[ANDROID_WEAR] = ANDROID_SDK;
    SDK_PLATFORMS[TIZEN] = TIZEN_SDK;
    SDK_PLATFORMS[TIZEN_WATCH] = TIZEN_SDK;
    SDK_PLATFORMS[TIZEN_MOBILE] = TIZEN_SDK;
    SDK_PLATFORMS[WEBOS] = WEBOS_SDK;
    SDK_PLATFORMS[KAIOS] = KAIOS_SDK;

    export default {
        PLATFORMS,
        WEB_HOSTED_PLATFORMS,
        ANDROID,
        ANDROID_AUTO,
        ANDROID_TV,
        ANDROID_WEAR,
        ALEXA,
        APPLE_AUTO,
        ASTIAN,
        BLACKBERRY,
        CHROMECAST,
        CHROME_OS,
        FIREFOX_OS,
        FIREFOX_TV,
        FIRE_OS,
        FIRE_TV,
        HBBTV,
        IOS,
        KAIOS,
        MACOS,
        MEEGO,
        NETCAST,
        OCCULUS,
        ORSAY,
        PS4,
        ROKU,
        SAILFISH,
        TIVO,
        TIZEN,
        TIZEN_WATCH,
        TIZEN_MOBILE,
        TVOS,
        UBUNTU,
        UBUNTU_TOUCH,
        UNITY,
        VEWD,
        VIERACONNECT,
        VIZIO,
        WATCHOS,
        WEB,
        WEBIAN,
        WEBNEXT,
        WEBOS,
        WII,
        WINDOWS,
        WP10,
        WP8,
        XBOX,
        XBOX360,
        CLI_ANDROID_EMULATOR,
        CLI_ANDROID_ADB,
        CLI_ANDROID_AVDMANAGER,
        CLI_ANDROID_SDKMANAGER,
        CLI_TIZEN_EMULATOR,
        CLI_TIZEN,
        CLI_SDB_TIZEN,
        CLI_WEBOS_ARES,
        CLI_WEBOS_ARES_PACKAGE,
        CLI_WEBOS_ARES_INSTALL,
        CLI_WEBOS_ARES_LAUNCH,
        CLI_WEBOS_ARES_SETUP_DEVICE,
        CLI_WEBOS_ARES_NOVACOM,
        CLI_WEBOS_ARES_DEVICE_INFO,
        CLI_KAIOS_EMULATOR,
        FORM_FACTOR_MOBILE,
        FORM_FACTOR_DESKTOP,
        FORM_FACTOR_WATCH,
        FORM_FACTOR_TV,
        ANDROID_SDK,
        ANDROID_NDK,
        TIZEN_SDK,
        WEBOS_SDK,
        KAIOS_SDK,
        RENATIVE_CONFIG_NAME,
        RENATIVE_CONFIG_PRIVATE_NAME,
        RENATIVE_CONFIG_LOCAL_NAME,
        RN_CLI_CONFIG_NAME,
        RN_BABEL_CONFIG_NAME,
        SAMPLE_APP_ID,
        PACKAGE_JSON_FILEDS,
        SUPPORTED_PLATFORMS_MAC,
        SUPPORTED_PLATFORMS_WIN,
        SUPPORTED_PLATFORMS_LINUX,
        SUPPORTED_PLATFORMS,
        SDK_PLATFORMS
    };