bug修复
continuous-integration/drone/push Build is failing
Details
continuous-integration/drone/push Build is failing
Details
This commit is contained in:
parent
c94563f5c8
commit
c8891848f1
23
.drone.yml
23
.drone.yml
|
@ -7,6 +7,8 @@ kind: pipeline
|
|||
name: test
|
||||
|
||||
steps:
|
||||
- name: setup-database
|
||||
image: mongo:5
|
||||
- name: test
|
||||
image: node:16
|
||||
commands:
|
||||
|
@ -25,20 +27,23 @@ steps:
|
|||
format: markdown
|
||||
message: >
|
||||
{{#success build.status}}
|
||||
✅ `{{repo.name}}` #{{build.number}} 号构建测试已通过\n
|
||||
📝 {{commit.author}} 在 `{{commit.branch}}` 的提交:\n
|
||||
✅ `{{repo.name}}` #{{build.number}} 号构建测试已通过
|
||||
|
||||
📝 {{commit.author}} 在 `{{commit.branch}}` 的提交:
|
||||
|
||||
```
|
||||
{{commit.message}}
|
||||
```
|
||||
\n🌐 {{ build.link }}
|
||||
|
||||
🌐 {{ build.link }}
|
||||
{{else}}
|
||||
❌ `{{repo.name}}` #{{build.number}} 号构建测试已失败\n
|
||||
📝 {{commit.author}} 在 `{{commit.branch}}` 的提交:\n
|
||||
❌ `{{repo.name}}` #{{build.number}} 号构建测试已失败
|
||||
|
||||
📝 {{commit.author}} 在 `{{commit.branch}}` 的提交:
|
||||
|
||||
```
|
||||
{{commit.message}}
|
||||
```
|
||||
\n🌐 {{ build.link }}
|
||||
|
||||
🌐 {{ build.link }}
|
||||
{{/success}}
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -61,6 +61,9 @@
|
|||
4. 使用 `$ node build.js` 创建运行时构建
|
||||
5. 使用 `$ node path/to/lsp-yggdrasil.full.cjs` 起飞
|
||||
|
||||
> 注:对于开发者的首次运行,您可能需要创建一个测试账户,添加环境参数:`DEVEL_FIRST_RUN=1` 即可创建一个测试玩家
|
||||
> 测试玩家的账户为: `i@lama.icu` 密码为 `123456` 您可以到 `index.js` 中自由修改
|
||||
|
||||
## 常见问题
|
||||
|
||||
- Q:支持 `https` 嘛?
|
||||
|
|
|
@ -49,7 +49,7 @@ export const setup = async () => {
|
|||
|
||||
config.custom.postRouting(server)
|
||||
|
||||
/*
|
||||
if(process.env["UNIT_TEST"] || process.env["DEVEL_FIRST_RUN"]) {
|
||||
// Create a test player
|
||||
await new models.Player({
|
||||
username: 'test',
|
||||
|
@ -63,7 +63,7 @@ export const setup = async () => {
|
|||
registerDate: Date.now(),
|
||||
permissions: [{ node: 'login', allowed: true, duration: 0, eternal: true, startDate: Date.now(), highPriority: false }]
|
||||
}).save()
|
||||
*/
|
||||
}
|
||||
}
|
||||
|
||||
const launch = async () => {
|
||||
|
|
|
@ -2,6 +2,7 @@ import { PNG } from 'pngjs'
|
|||
import fs from 'fs'
|
||||
import { createHash, createPrivateKey, createSign } from 'crypto'
|
||||
import { config } from './config.js'
|
||||
import { server } from './index.js'
|
||||
|
||||
export const ImageSecurity = {
|
||||
createImageHash: async (path, isCape) => {
|
||||
|
@ -70,7 +71,7 @@ export const ImageSecurity = {
|
|||
throw new Error('Invalid image size')
|
||||
},
|
||||
sign: async (data) => {
|
||||
return createSign('RSA-SHA1').update(data).sign(createPrivateKey(config.privateKey), 'hex')
|
||||
return createSign('RSA-SHA1').update(data).sign({ key: createPrivateKey(server.keys.privateKey) }, 'hex')
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue