mirror of
https://github.com/danbulant/discord.js
synced 2026-07-05 19:20:42 +00:00
Webpack build for branch 11.1-dev: a8d34e340b
This commit is contained in:
parent
8e86d905a2
commit
9ee217d215
2 changed files with 24 additions and 22 deletions
|
|
@ -3579,7 +3579,7 @@ class Permissions {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Data that can be resolved to give a permission number. This can be:
|
* Data that can be resolved to give a permission number. This can be:
|
||||||
* - A string (see {@link Permissions.flags})
|
* - A string (see {@link Permissions.FLAGS})
|
||||||
* - A permission number
|
* - A permission number
|
||||||
* @typedef {string|number} PermissionResolvable
|
* @typedef {string|number} PermissionResolvable
|
||||||
*/
|
*/
|
||||||
|
|
@ -20131,13 +20131,13 @@ module.exports = {
|
||||||
]
|
]
|
||||||
],
|
],
|
||||||
"_from": "snekfetch@>=3.1.0 <4.0.0",
|
"_from": "snekfetch@>=3.1.0 <4.0.0",
|
||||||
"_id": "snekfetch@3.1.6",
|
"_id": "snekfetch@3.1.7",
|
||||||
"_inCache": true,
|
"_inCache": true,
|
||||||
"_location": "/snekfetch",
|
"_location": "/snekfetch",
|
||||||
"_nodeVersion": "7.9.0",
|
"_nodeVersion": "8.0.0-rc.0",
|
||||||
"_npmOperationalInternal": {
|
"_npmOperationalInternal": {
|
||||||
"host": "packages-12-west.internal.npmjs.com",
|
"host": "packages-12-west.internal.npmjs.com",
|
||||||
"tmp": "tmp/snekfetch-3.1.6.tgz_1493569353717_0.8596337598282844"
|
"tmp": "tmp/snekfetch-3.1.7.tgz_1494815163487_0.09571001585572958"
|
||||||
},
|
},
|
||||||
"_npmUser": {
|
"_npmUser": {
|
||||||
"name": "snek",
|
"name": "snek",
|
||||||
|
|
@ -20157,8 +20157,8 @@ module.exports = {
|
||||||
"_requiredBy": [
|
"_requiredBy": [
|
||||||
"/"
|
"/"
|
||||||
],
|
],
|
||||||
"_resolved": "https://registry.npmjs.org/snekfetch/-/snekfetch-3.1.6.tgz",
|
"_resolved": "https://registry.npmjs.org/snekfetch/-/snekfetch-3.1.7.tgz",
|
||||||
"_shasum": "3090d5cd3f5bc1e456f8aafa5024f64b7ca5b1e0",
|
"_shasum": "5eb980d29c3b455bf0b13359647909b0737315e9",
|
||||||
"_shrinkwrap": null,
|
"_shrinkwrap": null,
|
||||||
"_spec": "snekfetch@^3.1.0",
|
"_spec": "snekfetch@^3.1.0",
|
||||||
"_where": "/home/travis/build/hydrabolt/discord.js",
|
"_where": "/home/travis/build/hydrabolt/discord.js",
|
||||||
|
|
@ -20167,18 +20167,18 @@ module.exports = {
|
||||||
"email": "me@gus.host"
|
"email": "me@gus.host"
|
||||||
},
|
},
|
||||||
"bugs": {
|
"bugs": {
|
||||||
"url": "https://github.com/GusCaplan/snekfetch/issues"
|
"url": "https://github.com/devsnek/snekfetch/issues"
|
||||||
},
|
},
|
||||||
"dependencies": {},
|
"dependencies": {},
|
||||||
"description": "Just do http requests without all that weird nastiness from other libs",
|
"description": "Just do http requests without all that weird nastiness from other libs",
|
||||||
"devDependencies": {},
|
"devDependencies": {},
|
||||||
"directories": {},
|
"directories": {},
|
||||||
"dist": {
|
"dist": {
|
||||||
"shasum": "3090d5cd3f5bc1e456f8aafa5024f64b7ca5b1e0",
|
"shasum": "5eb980d29c3b455bf0b13359647909b0737315e9",
|
||||||
"tarball": "https://registry.npmjs.org/snekfetch/-/snekfetch-3.1.6.tgz"
|
"tarball": "https://registry.npmjs.org/snekfetch/-/snekfetch-3.1.7.tgz"
|
||||||
},
|
},
|
||||||
"gitHead": "b03a6bb7d3b73ac3a4b27c7cfffcfbaa87d38700",
|
"gitHead": "f47ae6179addc843c76041a5b0a1013c67759729",
|
||||||
"homepage": "https://github.com/GusCaplan/snekfetch#readme",
|
"homepage": "https://github.com/devsnek/snekfetch#readme",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"maintainers": [
|
"maintainers": [
|
||||||
|
|
@ -20200,10 +20200,10 @@ module.exports = {
|
||||||
"readme": "ERROR: No README data found!",
|
"readme": "ERROR: No README data found!",
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "git+https://github.com/GusCaplan/snekfetch.git"
|
"url": "git+https://github.com/devsnek/snekfetch.git"
|
||||||
},
|
},
|
||||||
"scripts": {},
|
"scripts": {},
|
||||||
"version": "3.1.6"
|
"version": "3.1.7"
|
||||||
};
|
};
|
||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
|
|
@ -20372,30 +20372,32 @@ class Snekfetch extends Stream.Readable {
|
||||||
const concated = Buffer.concat(body);
|
const concated = Buffer.concat(body);
|
||||||
|
|
||||||
if (this._shouldRedirect(response)) {
|
if (this._shouldRedirect(response)) {
|
||||||
|
let method = this.request.method;
|
||||||
if ([301, 302].includes(response.statusCode)) {
|
if ([301, 302].includes(response.statusCode)) {
|
||||||
this.method = this.method === 'HEAD' ? 'HEAD' : 'GET';
|
if (method !== 'HEAD') method = 'GET';
|
||||||
this.data = null;
|
this.data = null;
|
||||||
} else if (response.statusCode === 303) {
|
} else if (response.statusCode === 303) {
|
||||||
this.method = 'GET';
|
method = 'GET';
|
||||||
}
|
}
|
||||||
|
|
||||||
const headers = {};
|
const headers = {};
|
||||||
if (this.request._headerNames) {
|
if (this.request._headerNames) {
|
||||||
for (const name of Object.keys(this.request._headerNames)) {
|
for (const name of Object.keys(this.request._headerNames)) {
|
||||||
|
if (name.toLowerCase() === 'host') continue;
|
||||||
headers[this.request._headerNames[name]] = this.request._headers[name];
|
headers[this.request._headerNames[name]] = this.request._headers[name];
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
for (const name of Object.keys(this.request._headers)) {
|
for (const name of Object.keys(this.request._headers)) {
|
||||||
|
if (name.toLowerCase() === 'host') continue;
|
||||||
const header = this.request._headers[name];
|
const header = this.request._headers[name];
|
||||||
headers[header.name] = header.value;
|
headers[header.name] = header.value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
resolve(new Snekfetch(
|
const newURL = /^https?:\/\//i.test(response.headers.location) ?
|
||||||
this.method,
|
response.headers.location :
|
||||||
URL.resolve(makeURLFromRequest(request), response.headers.location),
|
URL.resolve(makeURLFromRequest(request), response.headers.location);
|
||||||
{ data: this.data, headers }
|
resolve(new Snekfetch(method, newURL, { data: this.data, headers }));
|
||||||
));
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
4
discord.11.1-dev.min.js
vendored
4
discord.11.1-dev.min.js
vendored
File diff suppressed because one or more lines are too long
Loading…
Reference in a new issue