Release 3.21.0 (#315)
* Update HISTORY.md * Update package.json * Update HISTORY.md * Update startVanillaServer.js * Update startVanillaServer.js * Update startVanillaServer.js * lint
This commit is contained in:
parent
e7f8357a36
commit
a326d42a10
3 changed files with 13 additions and 2 deletions
|
|
@ -1,3 +1,7 @@
|
|||
## 3.21.0
|
||||
* 1.19.40 support (#314)
|
||||
* types: Fix missing field in ServerAdvertisement (#313) (@minerj101)
|
||||
|
||||
## 3.20.1
|
||||
* Fix buffer length calculation in ServerAdvertisement (#292) (thanks @KurtThiemann)
|
||||
* Handle Relay serialization errors by kicking (#290)
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "bedrock-protocol",
|
||||
"version": "3.20.1",
|
||||
"version": "3.21.0",
|
||||
"description": "Minecraft Bedrock Edition protocol library",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
|
|
|
|||
|
|
@ -5,7 +5,14 @@ const debug = process.env.CI ? console.debug : require('debug')('minecraft-proto
|
|||
const https = require('https')
|
||||
const { getFiles, waitFor } = require('../src/datatypes/util')
|
||||
|
||||
const head = (url) => new Promise((resolve, reject) => http.request(url, { method: 'HEAD', timeout: 500 }, resolve).on('error', reject).end())
|
||||
function head (url) {
|
||||
return new Promise((resolve, reject) => {
|
||||
const req = http.request(url, { method: 'HEAD', timeout: 500 }, resolve)
|
||||
req.on('error', reject)
|
||||
req.on('timeout', () => { req.destroy(); debug('HEAD request timeout'); reject(new Error('timeout')) })
|
||||
req.end()
|
||||
})
|
||||
}
|
||||
function get (url, outPath) {
|
||||
const file = fs.createWriteStream(outPath)
|
||||
return new Promise((resolve, reject) => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue