mirror of
https://github.com/openharmony/developtools_ace-ets2bundle.git
synced 2026-07-21 12:05:24 -04:00
transform js api Signed-off-by: houhaoyu <houhaoyu@huawei.com> Change-Id: Idd0e094ae604bbacb6f72afd7ea75c2cf8220573
This commit is contained in:
@@ -16,5 +16,5 @@
|
||||
import { processSystemApi } from './validate_ui_syntax';
|
||||
|
||||
module.exports = function processSystemModule(source: string): string {
|
||||
return processSystemApi(source, false, this.resourcePath);
|
||||
return processSystemApi(source, false, this.resourcePath, true);
|
||||
};
|
||||
|
||||
@@ -735,7 +735,8 @@ export function preprocessExtend(content: string, extendCollection?: Set<string>
|
||||
});
|
||||
}
|
||||
|
||||
export function processSystemApi(content: string, isProcessWhiteList: boolean = false, sourcePath?: string): string {
|
||||
export function processSystemApi(content: string, isProcessWhiteList: boolean = false,
|
||||
sourcePath: string = null, isSystemModule: boolean = false): string {
|
||||
let REG_SYSTEM: RegExp;
|
||||
if (isProcessWhiteList) {
|
||||
REG_SYSTEM =
|
||||
@@ -761,7 +762,7 @@ export function processSystemApi(content: string, isProcessWhiteList: boolean =
|
||||
if (!VALIDATE_MODULE.includes(systemValue)){
|
||||
importModuleCollection.add(systemValue);
|
||||
}
|
||||
if (!isProcessWhiteList) {
|
||||
if (!isProcessWhiteList && !isSystemModule) {
|
||||
return item;
|
||||
} else if (isProcessWhiteList) {
|
||||
systemValue = item2;
|
||||
|
||||
Reference in New Issue
Block a user