提交 8772e133 编写于 作者: DCloud_JSON's avatar DCloud_JSON

修改错误的表名称uni-verify为opendb-verify-codes

上级 47e8b546
unpackage/ unpackage/
.hbuilderx .hbuilderx
node_modules node_modules
.DS_Store .DS_Store
\ No newline at end of file uni_modules_tools/copy
\ No newline at end of file
## 1.0.14(2021-06-07)
修改错误的表名称uni-verify为opendb-verify-codes
## 1.0.13(2021-06-04)
新增一键登陆界面的第三方快捷登陆按钮
## 1.0.12(2021-05-28) ## 1.0.12(2021-05-28)
修复拦截器在ios app端会报错:Unhandled promise...的问题 修复拦截器在ios app端会报错:Unhandled promise...的问题
## 1.0.10(2021-05-27) ## 1.0.10(2021-05-27)
......
{ {
"id": "uni-starter", "id": "uni-starter",
"displayName": "uni-starter", "displayName": "uni-starter",
"version": "1.0.12", "version": "1.0.14",
"description": "云端一体应用快速开发模版", "description": "云端一体应用快速开发模版",
"keywords": [ "keywords": [
"uni-starter", "uni-starter",
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
], ],
"repository": "https://codechina.csdn.net/dcloud/uni-starter.git", "repository": "https://codechina.csdn.net/dcloud/uni-starter.git",
"engines": { "engines": {
"HBuilderX": "^3.1.16" "HBuilderX": "^3.1.17"
}, },
"dcloudext": { "dcloudext": {
"category": [ "category": [
......
...@@ -219,7 +219,7 @@ exports.main = async (event, context) => { ...@@ -219,7 +219,7 @@ exports.main = async (event, context) => {
type: params.type type: params.type
}) })
// 简单限制一下客户端调用频率 // 简单限制一下客户端调用频率
const ipLimit = await db.collection('uni-verify').where({ const ipLimit = await db.collection('opendb-verify-codes').where({
ip: context.CLIENTIP, ip: context.CLIENTIP,
created_at: dbCmd.gt(Date.now() - 60000) created_at: dbCmd.gt(Date.now() - 60000)
}).get() }).get()
......
const fs = require('fs');
module.exports = function(){
console.log('开始执行脚本change_after');
let changelog = fs.readFileSync(process.cwd()+'/changelog.md', 'utf-8').split("\n")[1];
console.log(changelog);
// 这里是修改完相关敏感配置后执行的脚本,你可以在这里自定义逻辑,
// 比如执行git提交命令
var shell = require("shelljs");
var exec = shell.exec;
if (exec('git add .').code !== 0) {
shell.echo('Error: Git add failed');
shell.exit(1);
}
if (exec(`git commit -am "${changelog}"`).code !== 0) {
shell.echo('Error: Git commit failed');
shell.exit(1);
}
if (exec('git push').code !== 0) {
shell.echo('Error: Git commit failed');
shell.exit(1);
}
shell.exec(`echo git success ${changelog}`);
}
\ No newline at end of file
...@@ -5,27 +5,34 @@ ...@@ -5,27 +5,34 @@
const fs = require('fs'), const fs = require('fs'),
Hjson = require('hjson'), Hjson = require('hjson'),
config = Hjson.rt.parse(fs.readFileSync(__dirname+'/config.js', 'utf-8')) config = Hjson.rt.parse(fs.readFileSync(__dirname+'/config.js', 'utf-8'))
const change_after = require('./change_after')
if(process.argv[2] == 'change'){ if(process.argv[2] == 'change'){
change(config) change(config,()=>{
console.log('脚本change已经执行成功');
change_after()
})
}else{ }else{
recovery(config) recovery(config)
} }
function change(config){ function change(config,callback){
const total = Object.keys(config).length
let index = 0;
for (let fileName in config) { for (let fileName in config) {
let path = process.cwd() + fileName let path = process.cwd() + fileName
let copyPath = __dirname + '/copy' + fileName let copyPath = __dirname + '/copy' + fileName
let fileText = fs.readFileSync(path, 'utf-8') let fileText = fs.readFileSync(path, 'utf-8')
//保持原文件名先备份一份到脚本目录下 //保持原文件名先备份一份到/uni_modules_tools/copy目录下,然后再覆盖
writeFileRecursive(copyPath, fileText, function(err) { writeFileRecursive(copyPath, fileText, function(err) { //创建目录并写入文件
if (err) { if (err) {
return console.log(err); return console.log(err);
} }
//改写 //改写
let HfileObj = Hjson.rt.parse(fileText) let HfileObj = Hjson.rt.parse(fileText)
//递归合并,为了保留注释内容
mergeJSON(HfileObj,config[fileName]) mergeJSON(HfileObj,config[fileName])
fs.writeFile(path, Hjson.rt.stringify(HfileObj, { fs.writeFile(path, Hjson.rt.stringify(HfileObj, {
quotes: 'all', quotes: 'all',
separator: true, separator: true,
...@@ -35,6 +42,10 @@ function change(config){ ...@@ -35,6 +42,10 @@ function change(config){
if (err) { if (err) {
return console.log(err); return console.log(err);
} }
index++
if(index == total){
callback()
}
}) })
}) })
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册