tencentcloud-sdk-nodejs-faceid 4.0.1041 → 4.1.46
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +27 -5
- package/es/index.js +1 -0
- package/es/services/faceid/index.js +4 -0
- package/es/services/faceid/v20180301/faceid_client.js +117 -0
- package/es/services/faceid/v20180301/faceid_models.js +0 -0
- package/es/services/faceid/v20180301/index.js +6 -0
- package/es/services/index.js +1 -0
- package/package.json +26 -8
- package/tencentcloud/services/faceid/v20180301/faceid_client.js +2 -1
- package/tencentcloud/services/faceid/v20180301/faceid_models.d.ts +31 -15
- package/tencentcloud/services/faceid/v20180301/index.js +2 -1
- package/index.d.ts +0 -2
- package/index.js +0 -6
- package/prettier.config.js +0 -38
- package/src/index.ts +0 -1
- package/src/services/faceid/index.ts +0 -5
- package/src/services/faceid/v20180301/faceid_client.ts +0 -494
- package/src/services/faceid/v20180301/faceid_models.ts +0 -3427
- package/src/services/faceid/v20180301/index.ts +0 -6
- package/src/services/index.ts +0 -1
- package/tsconfig.json +0 -33
- package/typings/index.d.ts +0 -2
package/README.md
CHANGED
|
@@ -44,18 +44,40 @@ npm install tencentcloud-sdk-nodejs-vpc --save
|
|
|
44
44
|
|
|
45
45
|
### 安装全产品 SDK
|
|
46
46
|
|
|
47
|
+
如果项目依赖的云产品较多,可以引入全产品 SDK。
|
|
48
|
+
|
|
47
49
|
```
|
|
48
50
|
npm install tencentcloud-sdk-nodejs --save
|
|
49
51
|
```
|
|
50
52
|
|
|
51
|
-
全产品 SDK
|
|
53
|
+
全产品 SDK 包含所有云产品调用代码和 TypeScript 类型文件,体积偏大。对于体积敏感的场景,推荐安装指定产品 SDK。
|
|
54
|
+
|
|
55
|
+
如果既希望全产品调用,又对包体积比较敏感,可以使用 Slim 版本 SDK。Slim SDK 移除类型文件,并进行了代码压缩,适合体积敏感场景使用:
|
|
56
|
+
|
|
57
|
+
```
|
|
58
|
+
npm install tencentcloud-sdk-slim-nodejs --save
|
|
59
|
+
```
|
|
52
60
|
|
|
53
61
|
## 通过源码包安装
|
|
54
62
|
|
|
55
|
-
1.
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
63
|
+
1. clone 代码到本地:
|
|
64
|
+
```
|
|
65
|
+
git clone https://github.com/tencentcloud/tencentcloud-sdk-nodejs
|
|
66
|
+
# 或者
|
|
67
|
+
git clone https://gitee.com/tencentcloud/tencentcloud-sdk-nodejs
|
|
68
|
+
```
|
|
69
|
+
2. 在项目根目录执行以下命令完成构建:
|
|
70
|
+
```
|
|
71
|
+
npm install && npm run build
|
|
72
|
+
```
|
|
73
|
+
3. 打包 NPM 压缩文件,例如 `tencentcloud-sdk-nodejs-4.0.0.tgz`
|
|
74
|
+
```
|
|
75
|
+
npm pack
|
|
76
|
+
```
|
|
77
|
+
4. 安装包到你的项目里:
|
|
78
|
+
```
|
|
79
|
+
npm install /path/to/tencentcloud-sdk-nodejs/tencentcloud-sdk-nodejs-4.0.0.tgz
|
|
80
|
+
```
|
|
59
81
|
|
|
60
82
|
# 示例
|
|
61
83
|
|
package/es/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./services";
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
import * as TencentCloudCommon from "tencentcloud-sdk-nodejs-common";
|
|
2
|
+
export class Client extends TencentCloudCommon.AbstractClient {
|
|
3
|
+
constructor(clientConfig) {
|
|
4
|
+
super("faceid.tencentcloudapi.com", "2018-03-01", clientConfig);
|
|
5
|
+
}
|
|
6
|
+
async GetLiveCode(req, cb) {
|
|
7
|
+
return this.request("GetLiveCode", req, cb);
|
|
8
|
+
}
|
|
9
|
+
async GetFaceIdRiskInfo(req, cb) {
|
|
10
|
+
return this.request("GetFaceIdRiskInfo", req, cb);
|
|
11
|
+
}
|
|
12
|
+
async GetWeChatBillDetails(req, cb) {
|
|
13
|
+
return this.request("GetWeChatBillDetails", req, cb);
|
|
14
|
+
}
|
|
15
|
+
async CheckIdCardInformation(req, cb) {
|
|
16
|
+
return this.request("CheckIdCardInformation", req, cb);
|
|
17
|
+
}
|
|
18
|
+
async CheckEidTokenStatus(req, cb) {
|
|
19
|
+
return this.request("CheckEidTokenStatus", req, cb);
|
|
20
|
+
}
|
|
21
|
+
async BankCard4EVerification(req, cb) {
|
|
22
|
+
return this.request("BankCard4EVerification", req, cb);
|
|
23
|
+
}
|
|
24
|
+
async EncryptedPhoneVerification(req, cb) {
|
|
25
|
+
return this.request("EncryptedPhoneVerification", req, cb);
|
|
26
|
+
}
|
|
27
|
+
async GetActionSequence(req, cb) {
|
|
28
|
+
return this.request("GetActionSequence", req, cb);
|
|
29
|
+
}
|
|
30
|
+
async GetDetectInfoEnhanced(req, cb) {
|
|
31
|
+
return this.request("GetDetectInfoEnhanced", req, cb);
|
|
32
|
+
}
|
|
33
|
+
async GetFaceIdToken(req, cb) {
|
|
34
|
+
return this.request("GetFaceIdToken", req, cb);
|
|
35
|
+
}
|
|
36
|
+
async CheckPhoneAndName(req, cb) {
|
|
37
|
+
return this.request("CheckPhoneAndName", req, cb);
|
|
38
|
+
}
|
|
39
|
+
async BankCardVerification(req, cb) {
|
|
40
|
+
return this.request("BankCardVerification", req, cb);
|
|
41
|
+
}
|
|
42
|
+
async ImageRecognitionV2(req, cb) {
|
|
43
|
+
return this.request("ImageRecognitionV2", req, cb);
|
|
44
|
+
}
|
|
45
|
+
async LivenessCompare(req, cb) {
|
|
46
|
+
return this.request("LivenessCompare", req, cb);
|
|
47
|
+
}
|
|
48
|
+
async IdCardOCRVerification(req, cb) {
|
|
49
|
+
return this.request("IdCardOCRVerification", req, cb);
|
|
50
|
+
}
|
|
51
|
+
async GetFaceIdResult(req, cb) {
|
|
52
|
+
return this.request("GetFaceIdResult", req, cb);
|
|
53
|
+
}
|
|
54
|
+
async ImageRecognition(req, cb) {
|
|
55
|
+
return this.request("ImageRecognition", req, cb);
|
|
56
|
+
}
|
|
57
|
+
async GetEidToken(req, cb) {
|
|
58
|
+
return this.request("GetEidToken", req, cb);
|
|
59
|
+
}
|
|
60
|
+
async DetectAIFakeFaces(req, cb) {
|
|
61
|
+
return this.request("DetectAIFakeFaces", req, cb);
|
|
62
|
+
}
|
|
63
|
+
async PhoneVerification(req, cb) {
|
|
64
|
+
return this.request("PhoneVerification", req, cb);
|
|
65
|
+
}
|
|
66
|
+
async MobileStatus(req, cb) {
|
|
67
|
+
return this.request("MobileStatus", req, cb);
|
|
68
|
+
}
|
|
69
|
+
async CheckIdNameDate(req, cb) {
|
|
70
|
+
return this.request("CheckIdNameDate", req, cb);
|
|
71
|
+
}
|
|
72
|
+
async PhoneVerificationCMCC(req, cb) {
|
|
73
|
+
return this.request("PhoneVerificationCMCC", req, cb);
|
|
74
|
+
}
|
|
75
|
+
async MinorsVerification(req, cb) {
|
|
76
|
+
return this.request("MinorsVerification", req, cb);
|
|
77
|
+
}
|
|
78
|
+
async GetFaceidRiskInfoToken(req, cb) {
|
|
79
|
+
return this.request("GetFaceidRiskInfoToken", req, cb);
|
|
80
|
+
}
|
|
81
|
+
async Liveness(req, cb) {
|
|
82
|
+
return this.request("Liveness", req, cb);
|
|
83
|
+
}
|
|
84
|
+
async PhoneVerificationCUCC(req, cb) {
|
|
85
|
+
return this.request("PhoneVerificationCUCC", req, cb);
|
|
86
|
+
}
|
|
87
|
+
async LivenessRecognition(req, cb) {
|
|
88
|
+
return this.request("LivenessRecognition", req, cb);
|
|
89
|
+
}
|
|
90
|
+
async ParseNfcData(req, cb) {
|
|
91
|
+
return this.request("ParseNfcData", req, cb);
|
|
92
|
+
}
|
|
93
|
+
async IdCardVerification(req, cb) {
|
|
94
|
+
return this.request("IdCardVerification", req, cb);
|
|
95
|
+
}
|
|
96
|
+
async MobileNetworkTimeVerification(req, cb) {
|
|
97
|
+
return this.request("MobileNetworkTimeVerification", req, cb);
|
|
98
|
+
}
|
|
99
|
+
async GetEidResult(req, cb) {
|
|
100
|
+
return this.request("GetEidResult", req, cb);
|
|
101
|
+
}
|
|
102
|
+
async DetectAuth(req, cb) {
|
|
103
|
+
return this.request("DetectAuth", req, cb);
|
|
104
|
+
}
|
|
105
|
+
async CheckBankCardInformation(req, cb) {
|
|
106
|
+
return this.request("CheckBankCardInformation", req, cb);
|
|
107
|
+
}
|
|
108
|
+
async GetDetectInfo(req, cb) {
|
|
109
|
+
return this.request("GetDetectInfo", req, cb);
|
|
110
|
+
}
|
|
111
|
+
async BankCard2EVerification(req, cb) {
|
|
112
|
+
return this.request("BankCard2EVerification", req, cb);
|
|
113
|
+
}
|
|
114
|
+
async PhoneVerificationCTCC(req, cb) {
|
|
115
|
+
return this.request("PhoneVerificationCTCC", req, cb);
|
|
116
|
+
}
|
|
117
|
+
}
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { faceid } from "./faceid";
|
package/package.json
CHANGED
|
@@ -1,16 +1,26 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tencentcloud-sdk-nodejs-faceid",
|
|
3
|
-
"version": "4.
|
|
4
|
-
"description": "
|
|
5
|
-
"main": "tencentcloud/index.js",
|
|
3
|
+
"version": "4.1.46",
|
|
4
|
+
"description": "腾讯云 API NODEJS SDK",
|
|
5
|
+
"main": "./tencentcloud/index.js",
|
|
6
|
+
"module": "./es/index.js",
|
|
7
|
+
"types": "./tencentcloud/index.d.ts",
|
|
6
8
|
"scripts": {
|
|
7
9
|
"test": "mocha -t 10000",
|
|
8
|
-
"build": "
|
|
9
|
-
"
|
|
10
|
+
"build": "concurrently 'npm:build:cjs' 'npm:build:es'",
|
|
11
|
+
"build:cjs": "tsc -p tsconfig.json",
|
|
12
|
+
"build:es": "tsc -p tsconfig.es.json",
|
|
13
|
+
"build:slim": "node ./scripts/build_slim.js",
|
|
14
|
+
"prettier": "prettier --config prettier.config.js --write 'src/**/*.{tsx,ts,jsx,js,css,json,vue}'",
|
|
15
|
+
"clean": "rimraf tencentcloud es"
|
|
10
16
|
},
|
|
11
17
|
"engines": {
|
|
12
18
|
"node": ">=10"
|
|
13
19
|
},
|
|
20
|
+
"files": [
|
|
21
|
+
"tencentcloud",
|
|
22
|
+
"es"
|
|
23
|
+
],
|
|
14
24
|
"keywords": [
|
|
15
25
|
"tencentcloudapi",
|
|
16
26
|
"tencentcloud",
|
|
@@ -22,7 +32,7 @@
|
|
|
22
32
|
"author": "tencentcloudapi",
|
|
23
33
|
"license": "Apache-2.0",
|
|
24
34
|
"dependencies": {
|
|
25
|
-
"tencentcloud-sdk-nodejs-common": "
|
|
35
|
+
"tencentcloud-sdk-nodejs-common": "*",
|
|
26
36
|
"tslib": "1.13.0"
|
|
27
37
|
},
|
|
28
38
|
"directories": {
|
|
@@ -35,14 +45,22 @@
|
|
|
35
45
|
},
|
|
36
46
|
"devDependencies": {
|
|
37
47
|
"@types/form-data": "^2.5.0",
|
|
48
|
+
"@types/json-bigint": "^1.0.1",
|
|
38
49
|
"@types/node": "^14.0.26",
|
|
39
50
|
"@types/node-fetch": "^2.5.7",
|
|
51
|
+
"@types/uuid": "^9.0.8",
|
|
40
52
|
"@typescript-eslint/eslint-plugin": "^2.34.0",
|
|
41
53
|
"@typescript-eslint/parser": "^2.34.0",
|
|
54
|
+
"babel-eslint": "^10.0.2",
|
|
42
55
|
"chai": "^4.2.0",
|
|
56
|
+
"concurrently": "^6.5.1",
|
|
57
|
+
"esbuild": "^0.25.0",
|
|
43
58
|
"eslint": "^6.8.0",
|
|
44
|
-
"
|
|
59
|
+
"eslint-plugin-react": "^7.17.0",
|
|
60
|
+
"mocha": "^8.4.0",
|
|
61
|
+
"prettier": "^2.3.0",
|
|
62
|
+
"rimraf": "^5.0.10",
|
|
45
63
|
"ts-node": "^8.10.2",
|
|
46
64
|
"typescript": "^3.9.7"
|
|
47
65
|
}
|
|
48
|
-
}
|
|
66
|
+
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.Client = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
4
5
|
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
5
6
|
/*
|
|
6
7
|
* Copyright (c) 2018 THL A29 Limited, a Tencent company. All Rights Reserved.
|
|
@@ -18,7 +19,7 @@ exports.Client = void 0;
|
|
|
18
19
|
* specific language governing permissions and limitations
|
|
19
20
|
* under the License.
|
|
20
21
|
*/
|
|
21
|
-
const TencentCloudCommon = require("tencentcloud-sdk-nodejs-common");
|
|
22
|
+
const TencentCloudCommon = tslib_1.__importStar(require("tencentcloud-sdk-nodejs-common"));
|
|
22
23
|
/**
|
|
23
24
|
* faceid client
|
|
24
25
|
* @class
|
|
@@ -544,6 +544,7 @@ export interface DetectAuthRequest {
|
|
|
544
544
|
RedirectUrl?: string;
|
|
545
545
|
/**
|
|
546
546
|
* 透传字段,在获取验证结果时返回。
|
|
547
|
+
- 最长长度1024位。
|
|
547
548
|
*/
|
|
548
549
|
Extra?: string;
|
|
549
550
|
/**
|
|
@@ -894,17 +895,19 @@ export interface LivenessRequest {
|
|
|
894
895
|
*/
|
|
895
896
|
export interface DetectAIFakeFacesRequest {
|
|
896
897
|
/**
|
|
897
|
-
*
|
|
898
|
+
* 传入需要进行检测的带有人脸的图片或视频(当前仅支持单人脸检测),使用base64编码的形式。
|
|
898
899
|
- 图片的Base64值:
|
|
899
900
|
建议整体图像480x640的分辨率,脸部 大小 100X100 以上。
|
|
900
|
-
Base64
|
|
901
|
+
Base64编码后的图片数据大小建议不超过3M、最大不可超过10M,仅支持jpg、png格式。
|
|
901
902
|
请使用标准的Base64编码方式(带=补位),编码规范参考RFC4648。
|
|
902
903
|
|
|
903
904
|
- 视频的Base64值:
|
|
904
|
-
Base64
|
|
905
|
+
Base64编码后的大小建议不超过8M、最大不可超过10M,支持mp4、avi、flv格式。
|
|
905
906
|
请使用标准的Base64编码方式(带=补位),编码规范参考RFC4648。
|
|
906
907
|
视频时长最大支持20s,建议时长2~5s。
|
|
907
908
|
建议视频分辨率为480x640,帧率在25fps~30fps之间。
|
|
909
|
+
|
|
910
|
+
示例值:/9j/4AAQSkZJRg.....s97n//2Q==
|
|
908
911
|
*/
|
|
909
912
|
FaceInput?: string;
|
|
910
913
|
/**
|
|
@@ -1144,11 +1147,6 @@ export interface GetFaceIdResultResponse {
|
|
|
1144
1147
|
/**
|
|
1145
1148
|
* plus版:描述当前请求所在设备的风险标签。
|
|
1146
1149
|
- 详情如下:
|
|
1147
|
-
01-设备疑似被Root/设备疑似越狱。
|
|
1148
|
-
02-设备疑似被注入。
|
|
1149
|
-
03-设备疑似为模拟器。
|
|
1150
|
-
04-设备疑似存在风险操作。
|
|
1151
|
-
05-摄像头疑似被劫持。
|
|
1152
1150
|
06-疑似黑产设备。
|
|
1153
1151
|
null-无设备风险。
|
|
1154
1152
|
- 增强版:此字段不生效,默认为null。
|
|
@@ -1196,6 +1194,16 @@ export interface GetFaceIdResultResponse {
|
|
|
1196
1194
|
注意:此字段可能返回 null,表示取不到有效值。
|
|
1197
1195
|
*/
|
|
1198
1196
|
DeviceInfoLevel?: string;
|
|
1197
|
+
/**
|
|
1198
|
+
* 敏感数据加密信息。
|
|
1199
|
+
注意:此字段可能返回 null,表示取不到有效值。
|
|
1200
|
+
*/
|
|
1201
|
+
Encryption?: Encryption;
|
|
1202
|
+
/**
|
|
1203
|
+
* 加密后的数据。
|
|
1204
|
+
注意:此字段可能返回 null,表示取不到有效值。
|
|
1205
|
+
*/
|
|
1206
|
+
EncryptedBody?: string;
|
|
1199
1207
|
/**
|
|
1200
1208
|
* 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。
|
|
1201
1209
|
*/
|
|
@@ -1528,9 +1536,7 @@ export interface CheckIdCardInformationResponse {
|
|
|
1528
1536
|
*/
|
|
1529
1537
|
Sim?: number;
|
|
1530
1538
|
/**
|
|
1531
|
-
*
|
|
1532
|
-
- 成功情况返回Success,。
|
|
1533
|
-
- 错误情况请参考下方错误码 列表中FailedOperation部分
|
|
1539
|
+
* 业务错误码。- 成功情况返回Success。- 错误情况请参考下方错误码 列表中FailedOperation部分
|
|
1534
1540
|
*/
|
|
1535
1541
|
Result?: string;
|
|
1536
1542
|
/**
|
|
@@ -2066,11 +2072,11 @@ export interface MinorsVerificationResponse {
|
|
|
2066
2072
|
-7: 未查询到身份信息
|
|
2067
2073
|
-8: 权威数据源升级中,请稍后再试
|
|
2068
2074
|
*/
|
|
2069
|
-
Result
|
|
2075
|
+
Result?: string;
|
|
2070
2076
|
/**
|
|
2071
2077
|
* 业务结果描述。
|
|
2072
2078
|
*/
|
|
2073
|
-
Description
|
|
2079
|
+
Description?: string;
|
|
2074
2080
|
/**
|
|
2075
2081
|
* 该字段的值为年龄区间。格式为[a,b),
|
|
2076
2082
|
[0,8)表示年龄小于8周岁区间,不包括8岁;
|
|
@@ -2078,7 +2084,7 @@ export interface MinorsVerificationResponse {
|
|
|
2078
2084
|
[16,18)表示年龄16-18周岁区间,不包括18岁;
|
|
2079
2085
|
[18,+)表示年龄大于18周岁。
|
|
2080
2086
|
*/
|
|
2081
|
-
AgeRange
|
|
2087
|
+
AgeRange?: string;
|
|
2082
2088
|
/**
|
|
2083
2089
|
* 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。
|
|
2084
2090
|
*/
|
|
@@ -2365,6 +2371,7 @@ export interface DetectInfoText {
|
|
|
2365
2371
|
2:动作活体
|
|
2366
2372
|
3:静默活体
|
|
2367
2373
|
4:一闪活体(动作+光线)
|
|
2374
|
+
5:远近活体
|
|
2368
2375
|
注意:此字段可能返回 null,表示取不到有效值。
|
|
2369
2376
|
*/
|
|
2370
2377
|
LivenessMode?: number;
|
|
@@ -2785,6 +2792,15 @@ export interface GetFaceIdResultRequest {
|
|
|
2785
2792
|
- 默认false:不需要。
|
|
2786
2793
|
*/
|
|
2787
2794
|
IsNeedBestFrame?: boolean;
|
|
2795
|
+
/**
|
|
2796
|
+
* 是否对回包整体进行加密。
|
|
2797
|
+
*/
|
|
2798
|
+
IsEncryptResponse?: boolean;
|
|
2799
|
+
/**
|
|
2800
|
+
* 是否需要对返回中的敏感信息进行加密。
|
|
2801
|
+
只需指定加密算法Algorithm即可,其余字段传入默认值。
|
|
2802
|
+
*/
|
|
2803
|
+
Encryption?: Encryption;
|
|
2788
2804
|
}
|
|
2789
2805
|
/**
|
|
2790
2806
|
* CheckPhoneAndName返回参数结构体
|
|
@@ -2860,7 +2876,7 @@ export interface GetFaceIdTokenRequest {
|
|
|
2860
2876
|
*/
|
|
2861
2877
|
UseCos?: boolean;
|
|
2862
2878
|
/**
|
|
2863
|
-
*
|
|
2879
|
+
* 敏感数据加密信息。对传入信息(姓名、身份证号、自传照片)有加密需求的用户可使用此参数,详情请点击左侧链接。
|
|
2864
2880
|
*/
|
|
2865
2881
|
Encryption?: Encryption;
|
|
2866
2882
|
/**
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.v20180301 = void 0;
|
|
4
|
-
const
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const Models = tslib_1.__importStar(require("./faceid_models"));
|
|
5
6
|
const faceid_client_1 = require("./faceid_client");
|
|
6
7
|
exports.v20180301 = {
|
|
7
8
|
Client: faceid_client_1.Client,
|
package/index.d.ts
DELETED
package/index.js
DELETED
package/prettier.config.js
DELETED
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
// prettier.config.js
|
|
2
|
-
module.exports = {
|
|
3
|
-
// 一行最多 100 字符
|
|
4
|
-
printWidth: 100,
|
|
5
|
-
// 使用 4 个空格缩进
|
|
6
|
-
tabWidth: 2,
|
|
7
|
-
// 不使用缩进符,而使用空格
|
|
8
|
-
useTabs: false,
|
|
9
|
-
// 行尾需要有分号
|
|
10
|
-
semi: false,
|
|
11
|
-
// 使用单引号
|
|
12
|
-
singleQuote: false,
|
|
13
|
-
// 对象的 key 仅在必要时用引号
|
|
14
|
-
quoteProps: "as-needed",
|
|
15
|
-
// jsx 不使用单引号,而使用双引号
|
|
16
|
-
jsxSingleQuote: false,
|
|
17
|
-
// 末尾不需要逗号
|
|
18
|
-
trailingComma: "es5",
|
|
19
|
-
// 大括号内的首尾需要空格
|
|
20
|
-
bracketSpacing: true,
|
|
21
|
-
// jsx 标签的反尖括号需要换行
|
|
22
|
-
jsxBracketSameLine: false,
|
|
23
|
-
// 箭头函数,只有一个参数的时候,也需要括号
|
|
24
|
-
arrowParens: "always",
|
|
25
|
-
// 每个文件格式化的范围是文件的全部内容
|
|
26
|
-
rangeStart: 0,
|
|
27
|
-
rangeEnd: Infinity,
|
|
28
|
-
// 不需要写文件开头的 @prettier
|
|
29
|
-
requirePragma: false,
|
|
30
|
-
// 不需要自动在文件开头插入 @prettier
|
|
31
|
-
insertPragma: false,
|
|
32
|
-
// 使用默认的折行标准
|
|
33
|
-
proseWrap: "preserve",
|
|
34
|
-
// 根据显示样式决定 html 要不要折行
|
|
35
|
-
htmlWhitespaceSensitivity: "css",
|
|
36
|
-
// 换行符使用 lf
|
|
37
|
-
endOfLine: "lf",
|
|
38
|
-
}
|
package/src/index.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./services"
|