chore: 支持手动上传证书并部署

This commit is contained in:
xiaojunnuo
2025-03-18 00:52:50 +08:00
parent 29a6a992f0
commit de40be430b
74 changed files with 1040 additions and 597 deletions
+2 -2
View File
@@ -16,7 +16,7 @@
"@typescript-eslint/ban-ts-comment": "off",
"@typescript-eslint/ban-ts-ignore": "off",
"@typescript-eslint/no-explicit-any": "off",
// "no-unused-expressions": "off",
"max-len": [0, 160, 2, { "ignoreUrls": true }]
"@typescript-eslint/no-empty-function": "off",
"@typescript-eslint/no-unused-vars": "off"
}
}
+7
View File
@@ -0,0 +1,7 @@
{
"printWidth": 220,
"bracketSpacing": true,
"singleQuote": false,
"trailingComma": "es5",
"arrowParens": "avoid"
}
+3 -3
View File
@@ -7,8 +7,8 @@ function sha256(data: string, digest: BinaryToTextEncoding = 'hex') {
return crypto.createHash('sha256').update(data).digest(digest);
}
function HmacSha256(data: string, key: string, digest: BinaryToTextEncoding = 'base64') {
return crypto.createHmac('sha256', Buffer.from(key, 'base64')).update(data).digest(digest);
function hmacSha256(data: string, digest: BinaryToTextEncoding = 'base64') {
return crypto.createHmac('sha256', data).update(Buffer.alloc(0)).digest(digest);
}
function base64(data: string) {
@@ -18,5 +18,5 @@ export const hashUtils = {
md5,
sha256,
base64,
HmacSha256,
hmacSha256,
};