mirror of
https://github.com/openharmony/developtools_ace-ets2bundle.git
synced 2026-07-21 20:15:24 -04:00
transform js api Signed-off-by: houhaoyu <houhaoyu@huawei.com> Change-Id: I0676ed6ff10fecd1d3026eff8453a88da68bcab6
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 && validateWhiteListModule(moduleType, systemKey)) {
|
||||
if (!isProcessWhiteList && validateWhiteListModule(moduleType, systemKey) && !isSystemModule) {
|
||||
return item;
|
||||
} else if (isProcessWhiteList) {
|
||||
systemValue = item2;
|
||||
|
||||
Reference in New Issue
Block a user