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: string = 'sourceMaps.map'; 27export const SYMBOLMAP: string = 'symbolMap.map'; 28export const PROTO_FILESINFO_TXT: string = 'protoFilesInfo.txt'; 29export const AOT_FULL: string = 'full'; 30export const AOT_TYPE: string = 'type'; 31export const AOT_PARTIAL: string = 'partial'; 32export const AOT_PROFILE_SUFFIX: string = '.ap'; 33export const NPM_ENTRIES_PROTO_BIN: string = 'npm_entries.protoBin'; 34export const PACKAGE_JSON: string = 'package.json'; 35export const FAKE_JS: string = 'fake.js'; 36export const COMPILE_CONTEXT_INFO_JSON: string = 'compileContextInfo.json'; 37 38export const ESMODULE: string = 'esmodule'; 39export const JSBUNDLE: string = 'jsbundle'; 40export const ARK: string = 'ark'; 41export const TEMPORARY: string = 'temporary'; 42export const MAIN: string = 'main'; 43export const AUXILIARY: string = 'auxiliary'; 44export const HAP_PACKAGE: string = '0'; 45export const PROJECT_PACKAGE: string = '1'; 46export const EXTNAME_ETS: string = '.ets'; 47export const EXTNAME_D_ETS: string = '.d.ets'; 48export const EXTNAME_JS: string = '.js'; 49export const EXTNAME_TS: string = '.ts'; 50export const EXTNAME_JS_MAP: string = '.js.map'; 51export const EXTNAME_TS_MAP: string = '.ts.map'; 52export const EXTNAME_MJS: string = '.mjs'; 53export const EXTNAME_CJS: string = '.cjs'; 54export const EXTNAME_D_TS: string = '.d.ts'; 55export const EXTNAME_ABC: string = '.abc'; 56export const EXTNAME_JSON: string = '.json'; 57export const EXTNAME_PROTO_BIN: string = '.protoBin'; 58export const PATCH_SYMBOL_TABLE: string = 'symbol.txt'; 59export const TEMP_JS: string = '.temp.js'; 60export const HASH_FILE_NAME: string = 'gen_hash.json'; 61export const EXTNAME_TXT: string = '.txt'; 62export const PROTOS: string = 'protos'; 63 64export const TS2ABC: string = 'ts2abc'; 65export const ES2ABC: string = 'es2abc'; 66 67export const JS: string = 'js'; 68export const TS: string = 'ts'; 69export const ETS: string = 'ets'; 70 71export const MAX_WORKER_NUMBER: number = 3; 72 73export const GEN_ABC_SCRIPT: string = 'gen_abc.js'; 74 75export const NODE_MODULES: string = 'node_modules'; 76export const OH_MODULES: string = 'oh_modules'; 77export const PACKAGES: string = 'pkg_modules'; 78export const OHPM: string = 'ohpm'; 79 80export const TS_NOCHECK: string = '// @ts-nocheck'; 81 82export const WINDOWS: string = 'Windows_NT'; 83export const LINUX: string = 'Linux'; 84export const MAC: string = 'Darwin'; 85 86export const COMMONJS: string = 'commonjs'; 87export const ESM: string = 'esm'; 88export const SCRIPT: string = 'script'; 89 90export const SRC_MAIN: string = 'src/main'; 91export const GEN_ABC_PLUGIN_NAME: string = 'Gen_Abc_Plugin'; 92export const OBFUSCATION_TOOL: string = 'Obfuscation_Tool'; 93 94export const SUCCESS: number = 0; 95export const FAIL: number = 1; 96 97export const red: string = '\u001b[31m'; 98export const yellow: string = '\u001b[33m'; 99export const blue: string = '\u001b[34m'; 100export const reset: string = '\u001b[39m'; 101 102export const DEBUG: string = 'debug'; 103export const RELEASE: string = 'release'; 104 105export const TRUE: string = 'true'; 106export const FALSE: string = 'false'; 107 108export const IS_CACHE_INVALID: string = 'is_cache_invalid'; 109export const ARK_COMPILER_META_INFO: string = 'ark_compiler_meta_info'; 110 111// The following strings are used to specify 'ISendable' interface. 112// 'ISendable' interface is in the 'lang' namespace of '@arkts.lang.d.ets' file. 113export const ARKTS_LANG_D_ETS = '@arkts.lang.d.ets'; 114export const LANG_NAMESPACE = 'lang'; 115export const ISENDABLE_TYPE = 'ISendable'; 116 117export const USE_SHARED: string = 'use shared'; 118export const USE_SHARED_COMMENT: string = '// "use shared"'; 119 120export const SEPARATOR_BITWISE_AND: string = '&'; 121export const SEPARATOR_AT: string = '@'; 122export const SEPARATOR_SLASH: string = '/'; 123