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 16/** 17 * 错误码 18 */ 19export enum Code { 20 OK = 0, 21 ERROR = -1 22} 23 24/** 25 * 字符串资源ID 26 */ 27 28export enum StringResourceId { 29 INPUT_FILE_NOT_FOUND, 30 INPUT_FILE_CONTENT_EMPTY, 31 COMMAND_INPUT_DESCRIPTION, 32 COMMAND_OUT_DESCRIPTION, 33 NOT_DTS_FILE, 34 COMMAND_LOGLEVEL_DESCRIPTION, 35 COMMAND_SPLIT_API, 36 COMMAND_RULE, 37 INVALID_PATH, 38 OUTPUT_MUST_FILE, 39 OUTPUT_MUST_DIR, 40 OUTPUT_SAME_WITH_INPUT, 41 OUTPUT_SUBDIR_INPUT, 42 START_MESSAGE, 43 COMMAND_BRANCH, 44 VERSION_HINT, 45 COMMAND_TEST 46} 47 48export enum Instruct { 49 50 /** 51 * 用于生成单行注释,文本替换成空行 52 */ 53 EMPTY_LINE = 'Instruct_new_line' 54} 55 56export class ConstantValue { 57 58 /** 59 * d.ts文件后缀名 60 */ 61 static DTS_EXTENSION = '.d.ts'; 62 63 /** 64 * nodejs 最低主版本号 65 */ 66 static MAJOR_V = 15; 67 68 /** 69 * nodejs 最低子版本号 70 */ 71 static MINOR_V = 0; 72 73 /** 74 * nodejs 最低修正版本号 75 */ 76 static PATCH_V = 0; 77}