updated .gitignore and seafile-ignore.txt using npm/sysconfig/*-ignore-find2merge.sh
This commit is contained in:
parent
31febc9a1a
commit
2a4f962e1c
19
.gitignore
vendored
19
.gitignore
vendored
@ -1,12 +1,25 @@
|
|||||||
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
|
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
|
||||||
|
# how to include another gitignore?
|
||||||
|
# https://stackoverflow.com/questions/7005142/can-i-include-other-gitignore-file-in-a-gitignore-file-like-include-in-c-li
|
||||||
|
# https://github.com/github/gitignore
|
||||||
|
# https://github.com/SlideWave/gitignore-include?tab=readme-ov-file#examples
|
||||||
|
# https://gitignore.io
|
||||||
|
|
||||||
### 目录 #################################################################
|
### .gitignore_global ###
|
||||||
|
|
||||||
|
# Self defined extension to ignore all files/folders containing .gitignore
|
||||||
|
*.gitignore.*
|
||||||
|
*.gitignore.*/
|
||||||
|
*.gitignore
|
||||||
|
*.gitignore/
|
||||||
|
!.gitignore
|
||||||
|
|
||||||
# 通用
|
# 通用
|
||||||
.svn/
|
.svn/
|
||||||
.deploy_git/
|
.deploy_git/
|
||||||
.idea/
|
.idea/
|
||||||
.sass-cache/
|
.sass-cache/
|
||||||
|
.wrangler
|
||||||
/test/unit/coverage/
|
/test/unit/coverage/
|
||||||
/test/e2e/reports/
|
/test/e2e/reports/
|
||||||
node_modules/
|
node_modules/
|
||||||
@ -70,7 +83,6 @@ _desktop.ini
|
|||||||
/db.json
|
/db.json
|
||||||
|
|
||||||
# wo
|
# wo
|
||||||
*.gitignore.*
|
|
||||||
# 服务端
|
# 服务端
|
||||||
/_archive/*
|
/_archive/*
|
||||||
/_datastore/*
|
/_datastore/*
|
||||||
@ -86,3 +98,6 @@ pages4loader.json5
|
|||||||
|
|
||||||
# 保留
|
# 保留
|
||||||
!.gitkeep
|
!.gitkeep
|
||||||
|
|
||||||
|
### .gitignore_local ###
|
||||||
|
|
||||||
|
69
messenger.js
69
messenger.js
@ -18,6 +18,18 @@ module.exports = {
|
|||||||
return await sender.smtpTransporter
|
return await sender.smtpTransporter
|
||||||
.sendMail(messageObject)
|
.sendMail(messageObject)
|
||||||
.then((result) => {
|
.then((result) => {
|
||||||
|
/*
|
||||||
|
{
|
||||||
|
accepted: [ 'anolaxy+1@outlook.com' ],
|
||||||
|
rejected: [],
|
||||||
|
envelopeTime: 159,
|
||||||
|
messageTime: 160,
|
||||||
|
messageSize: 1055,
|
||||||
|
response: '250 Ok',
|
||||||
|
envelope: { from: 'hi@babely.cc', to: [ 'anolaxy+1@outlook.com' ] },
|
||||||
|
messageId: '<f78681c8-f5d7-4149-4abf-4b940497535f@babely.cc>'
|
||||||
|
}
|
||||||
|
*/
|
||||||
if (result.messageId && result.response === '250 Ok') {
|
if (result.messageId && result.response === '250 Ok') {
|
||||||
console.log(result)
|
console.log(result)
|
||||||
return { _state: 'MSG_SENT_SUCCESS' }
|
return { _state: 'MSG_SENT_SUCCESS' }
|
||||||
@ -46,10 +58,10 @@ module.exports = {
|
|||||||
return await this.sendSmsDxton({ phone, config, msg })
|
return await this.sendSmsDxton({ phone, config, msg })
|
||||||
} else if (config.vendor === 'ALIYUN') {
|
} else if (config.vendor === 'ALIYUN') {
|
||||||
return await this.sendSmsAliyun({ phone, config, msgParam, msgTemplate, signName })
|
return await this.sendSmsAliyun({ phone, config, msgParam, msgTemplate, signName })
|
||||||
} else if (config.vendor === 'UNICLOUD') {
|
|
||||||
return await this.sendSmsUnicloud({ phone, config, msgParam, msgTemplate, appid })
|
|
||||||
} else if (config.vendor === 'TENCENT') {
|
} else if (config.vendor === 'TENCENT') {
|
||||||
return await this.sendSmsTencent({ phone, config, msgParam, msgTemplate, appid, signName })
|
return await this.sendSmsTencent({ phone, config, msgParam, msgTemplate, appid, signName })
|
||||||
|
} else if (config.vendor === 'UNICLOUD') {
|
||||||
|
return await this.sendSmsUnicloud({ phone, config, msgParam, msgTemplate, appid })
|
||||||
} else {
|
} else {
|
||||||
return { _state: 'SMS_UNKNOWN_VENDOR', error: { unknownVendor: config.vendor } }
|
return { _state: 'SMS_UNKNOWN_VENDOR', error: { unknownVendor: config.vendor } }
|
||||||
}
|
}
|
||||||
@ -125,6 +137,33 @@ module.exports = {
|
|||||||
)
|
)
|
||||||
},
|
},
|
||||||
|
|
||||||
|
async sendSmsTencent ({ phone, config, msgTemplate, msgParam, appid, signName } = {}) {
|
||||||
|
sender.smsClientTencent = sender.smsClientTencent || new (require('tencentcloud-sdk-nodejs').sms.v20210111.Client)(config) // https://cloud.tencent.com/document/product/382/43197
|
||||||
|
|
||||||
|
return await sender.smsClientTencent
|
||||||
|
.SendSms({
|
||||||
|
// API: https://cloud.tencent.com/document/product/382/55981
|
||||||
|
PhoneNumberSet: [phone.replace('-', '')],
|
||||||
|
SmsSdkAppId: appid || config.appid,
|
||||||
|
SignName: typeof signName !== 'undefined' ? signName : config.signName, // 腾讯云的国际短信可以没有签名,因此允许传入参数 signName:'' 来覆盖默认的 config.signName
|
||||||
|
TemplateId: msgTemplate || config.msgTemplate,
|
||||||
|
TemplateParamSet: Object.values(msgParam),
|
||||||
|
})
|
||||||
|
.then(
|
||||||
|
function ({ SendStatusSet, RequestId } = {}) {
|
||||||
|
let { SerialNo, PhoneNumber, Fee, Code, Message, IsoCode } = SendStatusSet[0]
|
||||||
|
if (Code === 'Ok') {
|
||||||
|
return { _state: 'MSG_SENT_SUCCESS' }
|
||||||
|
} else {
|
||||||
|
return { _state: 'MSG_SEND_FAIL', error: { SendStatusSet, RequestId } }
|
||||||
|
}
|
||||||
|
},
|
||||||
|
function (error) {
|
||||||
|
return { _state: 'SMS_SEND_ERROR', error }
|
||||||
|
}
|
||||||
|
)
|
||||||
|
},
|
||||||
|
|
||||||
async sendSmsUnicloud ({ phone, config, msgTemplate, msgParam, appid } = {}) {
|
async sendSmsUnicloud ({ phone, config, msgTemplate, msgParam, appid } = {}) {
|
||||||
try {
|
try {
|
||||||
const result = await uniCloud.sendSms({
|
const result = await uniCloud.sendSms({
|
||||||
@ -146,30 +185,4 @@ module.exports = {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
async sendSmsTencent ({ phone, config, msgTemplate, msgParam, appid, signName } = {}) {
|
|
||||||
sender.smsClientTencent = sender.smsClientTencent || new (require('tencentcloud-sdk-nodejs').sms.v20210111.Client)(config) // https://cloud.tencent.com/document/product/382/43197
|
|
||||||
|
|
||||||
return await sender.smsClientTencent
|
|
||||||
.SendSms({
|
|
||||||
// API: https://cloud.tencent.com/document/product/382/55981
|
|
||||||
PhoneNumberSet: [phone.replace('-', '')],
|
|
||||||
SmsSdkAppId: appid || config.appid,
|
|
||||||
SignName: signName || config.signName,
|
|
||||||
TemplateId: msgTemplate || config.msgTemplate,
|
|
||||||
TemplateParamSet: Object.values(msgParam),
|
|
||||||
})
|
|
||||||
.then(
|
|
||||||
function ({ SendStatusSet, RequestId } = {}) {
|
|
||||||
let { SerialNo, PhoneNumber, Fee, Code, Message, IsoCode } = SendStatusSet[0]
|
|
||||||
if (Code === 'Ok') {
|
|
||||||
return { _state: 'MSG_SENT_SUCCESS' }
|
|
||||||
} else {
|
|
||||||
return { _state: 'MSG_SEND_FAIL', error: { SendStatusSet, RequestId } }
|
|
||||||
}
|
|
||||||
},
|
|
||||||
function (error) {
|
|
||||||
return { _state: 'SMS_SEND_ERROR', error }
|
|
||||||
}
|
|
||||||
)
|
|
||||||
},
|
|
||||||
}
|
}
|
||||||
|
@ -6,6 +6,8 @@
|
|||||||
# 文件在服务器端的后续更改会被同步到客户端,如果客户端也同时修改了这些文件,系统会生成冲突文件。
|
# 文件在服务器端的后续更改会被同步到客户端,如果客户端也同时修改了这些文件,系统会生成冲突文件。
|
||||||
# seafile-ignore.txt 只能忽略还没有被同步的文件。对于已经被同步的文件,如果后来把它添加到 seafile-ignore.txt 中,系统只会忽略后续更改,已经上传的版本不会受影响。
|
# seafile-ignore.txt 只能忽略还没有被同步的文件。对于已经被同步的文件,如果后来把它添加到 seafile-ignore.txt 中,系统只会忽略后续更改,已经上传的版本不会受影响。
|
||||||
|
|
||||||
|
### seafile-ignore_global ###
|
||||||
|
|
||||||
# 自定义的后缀名,凡有 sfignore 后缀的都不进行同步
|
# 自定义的后缀名,凡有 sfignore 后缀的都不进行同步
|
||||||
*.sfignore
|
*.sfignore
|
||||||
*.sfignore.*
|
*.sfignore.*
|
||||||
@ -41,14 +43,15 @@ package-lock.json
|
|||||||
|
|
||||||
pages4loader.json5
|
pages4loader.json5
|
||||||
|
|
||||||
.svn/
|
|
||||||
*/.svn/
|
|
||||||
|
|
||||||
.deploy_git/
|
.deploy_git/
|
||||||
*/.deploy_git/
|
*/.deploy_git/
|
||||||
|
|
||||||
|
# HBuilder 目录
|
||||||
unpackage/
|
unpackage/
|
||||||
*/unpackage/
|
*/unpackage/
|
||||||
|
|
||||||
Icon
|
Icon
|
||||||
OneDrive/Icon
|
OneDrive/Icon
|
||||||
|
|
||||||
|
### seafile-ignore_local ###
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user