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:
extremeheat 2022-10-29 03:24:52 -04:00 committed by GitHub
commit a326d42a10
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 13 additions and 2 deletions

View file

@ -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)

View file

@ -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": {

View file

@ -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) => {