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