1/* 2 * Copyright (c) 2023 Huawei Device Co., Ltd. 3 * Licensed under the Apache License, Version 2.0 (the "License"); 4 * you may not use this file except in compliance with the License. 5 * You may obtain a copy of the License at 6 * 7 * http://www.apache.org/licenses/LICENSE-2.0 8 * 9 * Unless required by applicable law or agreed to in writing, software 10 * distributed under the License is distributed on an "AS IS" BASIS, 11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 * See the License for the specific language governing permissions and 13 * limitations under the License. 14 */ 15 16export const ENTRY_TXT: string = 'entry.txt'; 17export const FILESINFO_TXT: string = 'filesInfo.txt'; 18export const FILESINFO: string = 'filesInfo'; 19export const NPMENTRIES_TXT: string = 'npmEntries.txt'; 20export const MODULES_CACHE: string = 'modules.cache'; 21export const MODULES_ABC: string = 'modules.abc'; 22export const WIDGETS_ABC: string = 'widgets.abc'; 23export const MODULELIST_JSON: string = 'moduleList.json'; 24export const PREBUILDMODE_JSON: string = 'preBuildMode.json'; 25export const SOURCEMAPS_JSON: string = 'sourceMaps.json'; 26export const SOURCEMAPS_JSON_MERGE: string = 'sourceMapsMerge.json'; 27export const SOURCEMAPS: string = 'sourceMaps.map'; 28export const SYMBOLMAP: string = 'symbolMap.map'; 29export const PROTO_FILESINFO_TXT: string = 'protoFilesInfo.txt'; 30export const AOT_FULL: string = 'full'; 31export const AOT_TYPE: string = 'type'; 32export const AOT_PARTIAL: string = 'partial'; 33export const AOT_PROFILE_SUFFIX: string = '.ap'; 34export const NPM_ENTRIES_PROTO_BIN: string = 'npm_entries.protoBin'; 35export const PACKAGE_JSON: string = 'package.json'; 36export const FAKE_JS: string = 'fake.js'; 37export const COMPILE_CONTEXT_INFO_JSON: string = 'compileContextInfo.json'; 38export const PERFREPORT_JSON: string = 'perfReport.json'; 39 40export const ESMODULE: string = 'esmodule'; 41export const JSBUNDLE: string = 'jsbundle'; 42export const ARK: string = 'ark'; 43export const TEMPORARY: string = 'temporary'; 44export const MAIN: string = 'main'; 45export const AUXILIARY: string = 'auxiliary'; 46export const HAP_PACKAGE: string = '0'; 47export const PROJECT_PACKAGE: string = '1'; 48export const EXTNAME_ETS: string = '.ets'; 49export const EXTNAME_D_ETS: string = '.d.ets'; 50export const EXTNAME_JS: string = '.js'; 51export const EXTNAME_TS: string = '.ts'; 52export const EXTNAME_JS_MAP: string = '.js.map'; 53export const EXTNAME_TS_MAP: string = '.ts.map'; 54export const EXTNAME_MJS: string = '.mjs'; 55export const EXTNAME_CJS: string = '.cjs'; 56export const EXTNAME_D_TS: string = '.d.ts'; 57export const EXTNAME_ABC: string = '.abc'; 58export const EXTNAME_JSON: string = '.json'; 59export const EXTNAME_PROTO_BIN: string = '.protoBin'; 60export const PATCH_SYMBOL_TABLE: string = 'symbol.txt'; 61export const TEMP_JS: string = '.temp.js'; 62export const HASH_FILE_NAME: string = 'gen_hash.json'; 63export const EXTNAME_TXT: string = '.txt'; 64export const PROTOS: string = 'protos'; 65 66export const TS2ABC: string = 'ts2abc'; 67export const ES2ABC: string = 'es2abc'; 68 69export const JS: string = 'js'; 70export const TS: string = 'ts'; 71export const ETS: string = 'ets'; 72 73export const MAX_WORKER_NUMBER: number = 3; 74 75export const GEN_ABC_SCRIPT: string = 'gen_abc.js'; 76 77export const NODE_MODULES: string = 'node_modules'; 78export const OH_MODULES: string = 'oh_modules'; 79export const PACKAGES: string = 'pkg_modules'; 80export const OHPM: string = 'ohpm'; 81 82export const TS_NOCHECK: string = '// @ts-nocheck'; 83 84export const WINDOWS: string = 'Windows_NT'; 85export const LINUX: string = 'Linux'; 86export const MAC: string = 'Darwin'; 87 88export const COMMONJS: string = 'commonjs'; 89export const ESM: string = 'esm'; 90export const SCRIPT: string = 'script'; 91 92export const SRC_MAIN: string = 'src/main'; 93export const GEN_ABC_PLUGIN_NAME: string = 'Gen_Abc_Plugin'; 94export const OBFUSCATION_TOOL: string = 'Obfuscation_Tool'; 95export const BYTECODE_OBFUSCATOR_INIT = 'Bytecode_obfuscator_init'; 96 97export const SUCCESS: number = 0; 98export const FAIL: number = 1; 99 100export const red: string = '\u001b[31m'; 101export const yellow: string = '\u001b[33m'; 102export const blue: string = '\u001b[34m'; 103export const reset: string = '\u001b[39m'; 104 105export const DEBUG: string = 'debug'; 106export const RELEASE: string = 'release'; 107 108export const TRUE: string = 'true'; 109export const FALSE: string = 'false'; 110 111export const IS_CACHE_INVALID: string = 'is_cache_invalid'; 112export const ARK_COMPILER_META_INFO: string = 'ark_compiler_meta_info'; 113 114// The following strings are used to specify 'ISendable' interface. 115// 'ISendable' interface is in the 'lang' namespace of '@arkts.lang.d.ets' file. 116export const ARKTS_LANG_D_ETS = '@arkts.lang.d.ets'; 117export const LANG_NAMESPACE = 'lang'; 118export const ISENDABLE_TYPE = 'ISendable'; 119 120export const USE_SHARED: string = 'use shared'; 121export const USE_SHARED_COMMENT: string = '// "use shared"'; 122 123export const SEPARATOR_BITWISE_AND: string = '&'; 124export const SEPARATOR_AT: string = '@'; 125export const SEPARATOR_SLASH: string = '/'; 126 127export const ES_ANNOTATIONS = [ 128 '_ESConcurrentModuleRequestsAnnotation', 129 '_ESSlotNumberAnnotation', 130 '_ESAnnotation' 131]; 132 133export const DECORATOR_WHITE_LIST = [ 134 'Monitor', 135 'Track', 136 'Trace', 137]; 138 139export const BYTECODE_OBFUSCATION_PROPERTY_WHITE_LIST = [ 140 'componentClass', 141 'getReuseId', 142 'resetStateVarsOnReuse' 143]; 144 145export const IDENTIFIER_CACHE = 'IdentifierCache'; 146export const MEMBER_METHOD_CACHE = 'MemberMethodCache';