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 16import type { 17 IFileNameObfuscationOption, 18 IPrinterOption, 19 INameObfuscationOption, 20 IKeepSourcePathsAndDependency, 21 IDeclarationCommentOption, 22 IUnobfuscationOption 23} from './INameObfuscationOption'; 24 25export interface IOptions { 26 // Whether to generate compact code 27 readonly mCompact?: boolean; 28 29 // Whether to remove comments; 30 readonly mRemoveComments?: boolean; 31 32 // Whether to remove JSDoc comments; 33 readonly mRemoveDeclarationComments?: IDeclarationCommentOption; 34 35 // Whether to disable console output 36 readonly mDisableConsole?: boolean; 37 38 // Whether to do code simplification, includes variable declarations merging, expression merging... 39 readonly mSimplify?: boolean; 40 41 // Whether to do Name Obfuscation 42 readonly mNameObfuscation?: INameObfuscationOption; 43 44 mOutputDir?: string; 45 46 readonly mOhSdkPath?: string; 47 48 readonly mEnableSourceMap?: boolean; 49 50 readonly mEnableNameCache?: boolean; 51 52 readonly apiSavedDir?: string; 53 54 readonly applyReservedNamePath?: string; 55 56 readonly mRenameFileName?: IFileNameObfuscationOption; 57 58 // Whether to obfuscate the names or properties of the exported content 59 readonly mExportObfuscation?: boolean; 60 61 // Time&Memory printer option 62 readonly mPerformancePrinter?: IPrinterOption; 63 64 // The code of the file is not obfuscated, except for file name obfuscation 65 mKeepFileSourceCode?: IKeepSourcePathsAndDependency 66 67 // Whether to print unobfuscation names and the print path. 68 readonly mUnobfuscationOption?: IUnobfuscationOption; 69} 70