• 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 rollupObject 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
16import path from "path";
17
18// project oh_modules path
19export const OH_MODULES_OHPM_HYPIUM: string = 'oh_modules/.ohpm/@ohos+hypium@1.0.6/oh_modules/@ohos/hypium';
20export const OH_MODULES_OHOS_HYPIUM: string = 'oh_modules/@ohos/hypium';
21
22// project root path, default project name
23export const PROJECT_ROOT = path.resolve(__dirname, '../../../../test/ark_compiler_ut/testdata');
24export const DEFAULT_PROJECT: string = 'testcase_def';
25
26// project module id
27export const MODULE_ID_ROLLUP_PLACEHOLDER = "\x00rollup_plugin_ignore_empty_module_placeholder";
28
29// project build node_modules
30export const NODE_MODULES_PATH = "default/intermediates/loader_out/default/node_modules";
31export const AN_BUILD_OUTPUT_PATH = 'default/intermediates/loader_out/default/an/arm64-v8a';
32
33export const ES2ABC_PATH: string = '/build/bin/es2abc';
34export const TS2ABC_PATH: string = '/build/src/index.js';
35export const MERGERABC_PATH: string = '/build/bin/merge_abc';
36export const JS2ABC_PATH: string = '/build/bin/js2abc';
37export const AOTCOMPILER_PATH: string = '/build/bin/ark_aot_compiler';
38export const ARKROOT_PATH: string = 'bin/ark';
39export const MODULE_TEST_PATH: string = `${PROJECT_ROOT}/testTsModuleRequest/src/main/ets/`;
40export const TEST_TS: string = 'src/main/ets/pages/test.ts';
41export const TEST_ETS: string = 'src/main/ets/pages/test.ets';
42export const TEST_JS: string = 'src/main/ets/pages/test.js';
43export const TEST_JSON: string = 'src/main/ets/pages/test.json';
44export const SYMBOLMAP_MAP: string = 'entry/build/loader_out/ets/symbolMap.map';
45export const DEFAULT_ETS: string = 'entry/build/loader_out/ets';
46export const BUILD_INFO: string ='entry/build/filesInfo.txt';
47export const BUILD_NPM: string ='entry/build/npmEntries.txt';
48export const MODULES_ABC: string ='entry/build/modules.abc';
49export const PREVIEW_DEBUG_INFO: string ='entry/preview/filesInfo.txt';
50export const PREVIEW_DEBUG_NPM: string ='entry/preview/npmEntries.txt';
51export const PREVIEW_MODULES_ABC: string ='entry/preview/modules.abc';
52export const BUILD_CACHE: string ='entry/build/modules.cache';
53export const BUILD_RELEASE_CACHE: string ='entry/build/modules.cache';
54export const PREVIEW_DEBUG_CACHE: string ='entry/preview/modules.cache';
55export const DEBUG_INFO: string ="--debug-info";
56export const ENTRY_LIST: string ="--npm-module-entry-list";
57export const OUTPUT: string ="--output";
58export const FILE_THREADS: string ="--file-threads";
59export const MERGE_ABC: string ="--merge-abc";
60export const CACHE_FILE: string ="--cache-file";
61export const SIMBOL_TABLE: string ="--dump-symbol-table";
62export const TARGET_API_VERSION: string = "--target-api-version=";
63export const ARKCONFIG_TS2ABC_PATH: string = 'bin/ark/build/legacy_api8/src/index.js';
64
65export const EXPECT_ENTRY_TS: string = `${PROJECT_ROOT}/expect/expect_EntryAbility.ts`;
66export const EXPECT_INDEX_ETS: string = `${PROJECT_ROOT}/expect/expect_Index.ets`;
67export const EXPECT_SOURCEMAP_JSON: string = `${PROJECT_ROOT}/expect/sourceMaps.json`;
68export const EXPECT_TO_JS: string = `${PROJECT_ROOT}/expect/expectToJS.json`;
69export const TERSER_PROCESSED_EXPECTED_CODE: string = `${PROJECT_ROOT}/expect/terser_processed_expected_code.txt`;
70
71export const PKG_MODULES_OHPM_HYPIUM: string = 'pkg_modules/.ohpm/@ohos+hypium@1.0.6/pkg_modules/@ohos/hypium';
72export const PKG_MODULES_ENTRY: string = 'pkg_modules@entry';
73export const PKG_MODULES_OHPM_HYPIUM_SHORT: string = 'pkg_modules/@ohos/hypium';
74export const MOCK_CONFIG_PATH: string = "openharmony/mockconfig";
75
76export const OBFUSCATION_RULE_TEMPLATE_PATH: string = `${PROJECT_ROOT}/obfuscation/keepDts/obfuscation-template.txt`;
77export const OBFUSCATION_RULE_PATH: string = `${PROJECT_ROOT}/obfuscation/keepDts/obfuscation.txt`;