Webpack build for branch 11.3-dev: 6683c40a6f

This commit is contained in:
Travis CI 2017-12-21 08:35:59 +00:00
parent 18c2b5fac8
commit 1d2337100d
2 changed files with 173 additions and 60 deletions

View file

@ -5377,6 +5377,7 @@ const MessageCollector = __webpack_require__(43);
const Collection = __webpack_require__(3);
const Attachment = __webpack_require__(21);
const RichEmbed = __webpack_require__(20);
const Snowflake = __webpack_require__(5);
const util = __webpack_require__(7);
/**
@ -5763,11 +5764,18 @@ class TextBasedChannel {
* @returns {Promise<Collection<Snowflake, Message>>} Deleted messages
*/
bulkDelete(messages, filterOld = false) {
if (!isNaN(messages)) return this.fetchMessages({ limit: messages }).then(msgs => this.bulkDelete(msgs, filterOld));
if (messages instanceof Array || messages instanceof Collection) {
const messageIDs = messages instanceof Collection ? messages.keyArray() : messages.map(m => m.id);
let messageIDs = messages instanceof Collection ? messages.keyArray() : messages.map(m => m.id);
if (filterOld) {
messageIDs = messageIDs.filter(id => Date.now() - Snowflake.deconstruct(id).date.getTime() < 1209600000);
}
if (messageIDs.length === 0) return new Collection();
if (messageIDs.length === 1) {
return this.fetchMessage(messageIDs[0]).then(msg => msg.delete().then(() => new Collection([[msg.id, msg]])));
}
return this.client.rest.methods.bulkDeleteMessages(this, messageIDs, filterOld);
}
if (!isNaN(messages)) return this.fetchMessages({ limit: messages }).then(msgs => this.bulkDelete(msgs, filterOld));
throw new TypeError('The messages must be an Array, Collection, or number.');
}
@ -9795,29 +9803,66 @@ module.exports = Webhook;
"use strict";
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "delete", function() { return delete_; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "delete", function() { return _delete; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__index_js__ = __webpack_require__(62);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__index_js___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__index_js__);
/* harmony default export */ __webpack_exports__["default"] = (__WEBPACK_IMPORTED_MODULE_0__index_js___default.a);
const version = __WEBPACK_IMPORTED_MODULE_0__index_js___default.a.version;
/* harmony export (immutable) */ __webpack_exports__["version"] = version;
const METHODS = __WEBPACK_IMPORTED_MODULE_0__index_js___default.a.METHODS;
/* harmony export (immutable) */ __webpack_exports__["METHODS"] = METHODS;
const acl = __WEBPACK_IMPORTED_MODULE_0__index_js___default.a.acl;
/* harmony export (immutable) */ __webpack_exports__["acl"] = acl;
const bind = __WEBPACK_IMPORTED_MODULE_0__index_js___default.a.bind;
/* harmony export (immutable) */ __webpack_exports__["bind"] = bind;
const checkout = __WEBPACK_IMPORTED_MODULE_0__index_js___default.a.checkout;
/* harmony export (immutable) */ __webpack_exports__["checkout"] = checkout;
const connect = __WEBPACK_IMPORTED_MODULE_0__index_js___default.a.connect;
/* harmony export (immutable) */ __webpack_exports__["connect"] = connect;
const copy = __WEBPACK_IMPORTED_MODULE_0__index_js___default.a.copy;
/* harmony export (immutable) */ __webpack_exports__["copy"] = copy;
const _delete = __WEBPACK_IMPORTED_MODULE_0__index_js___default.a.delete;
const get = __WEBPACK_IMPORTED_MODULE_0__index_js___default.a.get;
/* harmony export (immutable) */ __webpack_exports__["get"] = get;
const head = __WEBPACK_IMPORTED_MODULE_0__index_js___default.a.head;
/* harmony export (immutable) */ __webpack_exports__["head"] = head;
const post = __WEBPACK_IMPORTED_MODULE_0__index_js___default.a.post;
/* harmony export (immutable) */ __webpack_exports__["post"] = post;
const link = __WEBPACK_IMPORTED_MODULE_0__index_js___default.a.link;
/* harmony export (immutable) */ __webpack_exports__["link"] = link;
const put = __WEBPACK_IMPORTED_MODULE_0__index_js___default.a.put;
/* harmony export (immutable) */ __webpack_exports__["put"] = put;
const lock = __WEBPACK_IMPORTED_MODULE_0__index_js___default.a.lock;
/* harmony export (immutable) */ __webpack_exports__["lock"] = lock;
const delete_ = __WEBPACK_IMPORTED_MODULE_0__index_js___default.a.delete;
const merge = __WEBPACK_IMPORTED_MODULE_0__index_js___default.a.merge;
/* harmony export (immutable) */ __webpack_exports__["merge"] = merge;
const connect = __WEBPACK_IMPORTED_MODULE_0__index_js___default.a.connect;
/* harmony export (immutable) */ __webpack_exports__["connect"] = connect;
const mkactivity = __WEBPACK_IMPORTED_MODULE_0__index_js___default.a.mkactivity;
/* harmony export (immutable) */ __webpack_exports__["mkactivity"] = mkactivity;
const mkcalendar = __WEBPACK_IMPORTED_MODULE_0__index_js___default.a.mkcalendar;
/* harmony export (immutable) */ __webpack_exports__["mkcalendar"] = mkcalendar;
const mkcol = __WEBPACK_IMPORTED_MODULE_0__index_js___default.a.mkcol;
/* harmony export (immutable) */ __webpack_exports__["mkcol"] = mkcol;
const move = __WEBPACK_IMPORTED_MODULE_0__index_js___default.a.move;
/* harmony export (immutable) */ __webpack_exports__["move"] = move;
const notify = __WEBPACK_IMPORTED_MODULE_0__index_js___default.a.notify;
/* harmony export (immutable) */ __webpack_exports__["notify"] = notify;
const options = __WEBPACK_IMPORTED_MODULE_0__index_js___default.a.options;
/* harmony export (immutable) */ __webpack_exports__["options"] = options;
@ -9825,6 +9870,51 @@ const options = __WEBPACK_IMPORTED_MODULE_0__index_js___default.a.options;
const patch = __WEBPACK_IMPORTED_MODULE_0__index_js___default.a.patch;
/* harmony export (immutable) */ __webpack_exports__["patch"] = patch;
const post = __WEBPACK_IMPORTED_MODULE_0__index_js___default.a.post;
/* harmony export (immutable) */ __webpack_exports__["post"] = post;
const propfind = __WEBPACK_IMPORTED_MODULE_0__index_js___default.a.propfind;
/* harmony export (immutable) */ __webpack_exports__["propfind"] = propfind;
const proppatch = __WEBPACK_IMPORTED_MODULE_0__index_js___default.a.proppatch;
/* harmony export (immutable) */ __webpack_exports__["proppatch"] = proppatch;
const purge = __WEBPACK_IMPORTED_MODULE_0__index_js___default.a.purge;
/* harmony export (immutable) */ __webpack_exports__["purge"] = purge;
const put = __WEBPACK_IMPORTED_MODULE_0__index_js___default.a.put;
/* harmony export (immutable) */ __webpack_exports__["put"] = put;
const rebind = __WEBPACK_IMPORTED_MODULE_0__index_js___default.a.rebind;
/* harmony export (immutable) */ __webpack_exports__["rebind"] = rebind;
const report = __WEBPACK_IMPORTED_MODULE_0__index_js___default.a.report;
/* harmony export (immutable) */ __webpack_exports__["report"] = report;
const search = __WEBPACK_IMPORTED_MODULE_0__index_js___default.a.search;
/* harmony export (immutable) */ __webpack_exports__["search"] = search;
const subscribe = __WEBPACK_IMPORTED_MODULE_0__index_js___default.a.subscribe;
/* harmony export (immutable) */ __webpack_exports__["subscribe"] = subscribe;
const trace = __WEBPACK_IMPORTED_MODULE_0__index_js___default.a.trace;
/* harmony export (immutable) */ __webpack_exports__["trace"] = trace;
const unbind = __WEBPACK_IMPORTED_MODULE_0__index_js___default.a.unbind;
/* harmony export (immutable) */ __webpack_exports__["unbind"] = unbind;
const unlink = __WEBPACK_IMPORTED_MODULE_0__index_js___default.a.unlink;
/* harmony export (immutable) */ __webpack_exports__["unlink"] = unlink;
const unlock = __WEBPACK_IMPORTED_MODULE_0__index_js___default.a.unlock;
/* harmony export (immutable) */ __webpack_exports__["unlock"] = unlock;
const unsubscribe = __WEBPACK_IMPORTED_MODULE_0__index_js___default.a.unsubscribe;
/* harmony export (immutable) */ __webpack_exports__["unsubscribe"] = unsubscribe;
const brew = __WEBPACK_IMPORTED_MODULE_0__index_js___default.a.brew;
/* harmony export (immutable) */ __webpack_exports__["brew"] = brew;
/***/ }),
@ -12354,27 +12444,27 @@ module.exports = DiscordAPIError;
/* 33 */
/***/ (function(module, exports) {
var g;
// This works in non-strict mode
g = (function() {
return this;
})();
try {
// This works if eval is allowed (see CSP)
g = g || Function("return this")() || (1,eval)("this");
} catch(e) {
// This works if the window reference is available
if(typeof window === "object")
g = window;
}
// g can still be undefined, but nothing to do about it...
// We return undefined, instead of nothing here, so it's
// easier to handle this case. if(!global) { ...}
module.exports = g;
var g;
// This works in non-strict mode
g = (function() {
return this;
})();
try {
// This works if eval is allowed (see CSP)
g = g || Function("return this")() || (1,eval)("this");
} catch(e) {
// This works if the window reference is available
if(typeof window === "object")
g = window;
}
// g can still be undefined, but nothing to do about it...
// We return undefined, instead of nothing here, so it's
// easier to handle this case. if(!global) { ...}
module.exports = g;
/***/ }),
@ -15831,7 +15921,7 @@ const transport = browser ? __webpack_require__(67) : __webpack_require__(68);
class Snekfetch extends transport.Extension {
/**
* Options to pass to the Snekfetch constructor
* @typedef {object} snekfetchOptions
* @typedef {object} SnekfetchOptions
* @memberof Snekfetch
* @property {object} [headers] Headers to initialize the request with
* @property {object|string|Buffer} [data] Data to initialize the request with
@ -15849,14 +15939,16 @@ class Snekfetch extends transport.Extension {
* `new Snekfetch(method, url [, options])`
* @param {string} method HTTP method
* @param {string} url URL
* @param {Snekfetch.snekfetchOptions} opts Options
* @param {SnekfetchOptions} [opts] Options
*/
constructor(method, url, opts = {}) {
super();
this.options = Object.assign({ version: 1, qs: querystring, followRedirects: true }, opts);
this.request = transport.buildRequest.call(this, method, url, opts);
if (opts.query) this.query(opts.query);
if (opts.data) this.send(opts.data);
if (opts.query)
this.query(opts.query);
if (opts.data)
this.send(opts.data);
}
/**
@ -15867,12 +15959,15 @@ class Snekfetch extends transport.Extension {
*/
query(name, value) {
this._checkModify();
if (!this.request.query) this.request.query = {};
if (!this.request.query)
this.request.query = {};
if (name !== null && typeof name === 'object') {
for (const [k, v] of Object.entries(name)) this.query(k, v);
for (const [k, v] of Object.entries(name))
this.query(k, v);
} else {
this.request.query[name] = value;
}
return this;
}
@ -15885,10 +15980,12 @@ class Snekfetch extends transport.Extension {
set(name, value) {
this._checkModify();
if (name !== null && typeof name === 'object') {
for (const key of Object.keys(name)) this.set(key, name[key]);
for (const key of Object.keys(name))
this.set(key, name[key]);
} else {
this.request.setHeader(name, value);
}
return this;
}
@ -15903,10 +16000,12 @@ class Snekfetch extends transport.Extension {
this._checkModify();
const form = this._getFormData();
if (typeof args[0] === 'object') {
for (const [k, v] of Object.entries(args[0])) this.attach(k, v);
for (const [k, v] of Object.entries(args[0]))
this.attach(k, v);
} else {
form.append(...args);
}
return this;
}
@ -15923,8 +16022,10 @@ class Snekfetch extends transport.Extension {
const header = this.request.getHeader('content-type');
let serialize;
if (header) {
if (header.includes('json')) serialize = JSON.stringify;
else if (header.includes('urlencoded')) serialize = this.options.qs.stringify;
if (header.includes('json'))
serialize = JSON.stringify;
else if (header.includes('urlencoded'))
serialize = this.options.qs.stringify;
} else {
this.set('Content-Type', 'application/json');
serialize = JSON.stringify;
@ -15937,14 +16038,16 @@ class Snekfetch extends transport.Extension {
}
then(resolver, rejector) {
if (this._response) return this._response.then(resolver, rejector);
if (this._response)
return this._response.then(resolver, rejector);
// eslint-disable-next-line no-return-assign
return this._response = transport.finalizeRequest.call(this)
.then(({ response, raw, redirect, headers }) => {
if (redirect) {
let method = this.request.method;
if ([301, 302].includes(response.statusCode)) {
if (method !== 'HEAD') method = 'GET';
if (method !== 'HEAD')
method = 'GET';
this.data = null;
} else if (response.statusCode === 303) {
method = 'GET';
@ -15955,6 +16058,7 @@ class Snekfetch extends transport.Extension {
return new Snekfetch(method, redirect, {
data: this.data,
headers: redirectHeaders,
version: this.options.version,
});
}
@ -16026,21 +16130,23 @@ class Snekfetch extends transport.Extension {
}
_getFormData() {
if (!(this.data instanceof transport.FormData)) {
if (!(this.data instanceof transport.FormData))
this.data = new transport.FormData();
}
return this.data;
}
_finalizeRequest() {
if (!this.request) return;
if (!this.request.getHeader('user-agent')) {
if (!this.request)
return;
if (!this.request.getHeader('user-agent'))
this.set('User-Agent', `snekfetch/${Snekfetch.version} (${Package.homepage})`);
}
if (this.request.method !== 'HEAD') this.set('Accept-Encoding', 'gzip, deflate');
if (this.data && this.data.getBoundary) {
if (this.request.method !== 'HEAD')
this.set('Accept-Encoding', 'gzip, deflate');
if (this.data && this.data.getBoundary)
this.set('Content-Type', `multipart/form-data; boundary=${this.data.getBoundary()}`);
}
if (this.request.query) {
const [path, query] = this.request.path.split('?');
this.request.path = `${path}?${this.options.qs.stringify(this.request.query)}${query ? `&${query}` : ''}`;
@ -16048,7 +16154,8 @@ class Snekfetch extends transport.Extension {
}
_checkModify() {
if (this.response) throw new Error('Cannot modify request after it has been sent!');
if (this.response)
throw new Error('Cannot modify request after it has been sent!');
}
}
@ -16064,7 +16171,10 @@ Snekfetch.version = Package.version;
*/
Snekfetch.METHODS = transport.METHODS.concat('BREW').filter((m) => m !== 'M-SEARCH');
for (const method of Snekfetch.METHODS) {
Snekfetch[method.toLowerCase()] = (url, opts) => new Snekfetch(method, url, opts);
Snekfetch[method.toLowerCase()] = function runMethod(url, opts) {
const Constructor = this.prototype instanceof Snekfetch ? this : Snekfetch;
return new Constructor(method, url, opts);
};
}
module.exports = Snekfetch;
@ -16262,7 +16372,7 @@ var objectKeys = Object.keys || function (obj) {
/* 66 */
/***/ (function(module, exports) {
module.exports = {"_args":[[{"raw":"snekfetch@^3.3.0","scope":null,"escapedName":"snekfetch","name":"snekfetch","rawSpec":"^3.3.0","spec":">=3.3.0 <4.0.0","type":"range"},"/home/travis/build/hydrabolt/discord.js"]],"_from":"snekfetch@>=3.3.0 <4.0.0","_id":"snekfetch@3.5.8","_inCache":true,"_location":"/snekfetch","_nodeVersion":"9.0.0-rc.0","_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/snekfetch-3.5.8.tgz_1509162386511_0.6893350400496274"},"_npmUser":{"name":"snek","email":"me@gus.host"},"_npmVersion":"5.3.0","_phantomChildren":{},"_requested":{"raw":"snekfetch@^3.3.0","scope":null,"escapedName":"snekfetch","name":"snekfetch","rawSpec":"^3.3.0","spec":">=3.3.0 <4.0.0","type":"range"},"_requiredBy":["/"],"_resolved":"https://registry.npmjs.org/snekfetch/-/snekfetch-3.5.8.tgz","_shasum":"4d4e539f8435352105e74c392f62f66740a27d6c","_shrinkwrap":null,"_spec":"snekfetch@^3.3.0","_where":"/home/travis/build/hydrabolt/discord.js","author":{"name":"Gus Caplan","email":"me@gus.host"},"browser":{"./src/node/index.js":false,"./src/meta.js":false},"bugs":{"url":"https://github.com/devsnek/snekfetch/issues"},"dependencies":{},"description":"Just do http requests without all that weird nastiness from other libs","devDependencies":{"coveralls":"^3.0.0","docma":"^1.5.1","eslint":"^4.8.0","jest":"^21.2.1","jsdoc-dynamic":"^1.0.4","json-filter-loader":"^1.0.0","node-fetch":"github:bitinn/node-fetch","uglifyjs-webpack-plugin":"^1.0.0-beta.2","webpack":"^3.8.1"},"directories":{},"dist":{"integrity":"sha512-osq7soqKBObV4u/WE9tGQT/m5JdqTU1PWVPcT0We3sKZ99h9QA7wSj7ZWrwEwgRbELeO5BrVCanYjDYtVYcwrQ==","shasum":"4d4e539f8435352105e74c392f62f66740a27d6c","tarball":"https://registry.npmjs.org/snekfetch/-/snekfetch-3.5.8.tgz"},"gitHead":"437b9d7e2811e8ad4110fc70aef13bff2ccc9f50","homepage":"https://snekfetch.js.org/","jest":{"collectCoverage":true,"collectCoverageFrom":["src/**/*.js","!src/qs_mock.js","!src/node/mimeOfBuffer.js","!src/node/transports/http2.js"],"verbose":true},"license":"MIT","main":"index.js","maintainers":[{"name":"snek","email":"me@gus.host"}],"module":"esm.mjs","name":"snekfetch","optionalDependencies":{},"readme":"ERROR: No README data found!","repository":{"type":"git","url":"git+https://github.com/devsnek/snekfetch.git"},"scripts":{"build:browser":"webpack","docs":"node docs.js","lint":"npx eslint src","prepublish":"npm run build:browser","test":"node ./node_modules/.bin/jest","test:coveralls":"cat ./coverage/lcov.info | coveralls"},"unpkg":"browser.js","version":"3.5.8"}
module.exports = {"_args":[[{"raw":"snekfetch@^3.3.0","scope":null,"escapedName":"snekfetch","name":"snekfetch","rawSpec":"^3.3.0","spec":">=3.3.0 <4.0.0","type":"range"},"/home/travis/build/hydrabolt/discord.js"]],"_from":"snekfetch@>=3.3.0 <4.0.0","_id":"snekfetch@3.6.1","_inCache":true,"_location":"/snekfetch","_nodeVersion":"9.2.0","_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/snekfetch-3.6.1.tgz_1512521936072_0.6785762289073318"},"_npmUser":{"name":"snek","email":"me@gus.host"},"_npmVersion":"5.5.1","_phantomChildren":{},"_requested":{"raw":"snekfetch@^3.3.0","scope":null,"escapedName":"snekfetch","name":"snekfetch","rawSpec":"^3.3.0","spec":">=3.3.0 <4.0.0","type":"range"},"_requiredBy":["/"],"_resolved":"https://registry.npmjs.org/snekfetch/-/snekfetch-3.6.1.tgz","_shasum":"9b77fa946cfa15c7041940593a2689dc547427ea","_shrinkwrap":null,"_spec":"snekfetch@^3.3.0","_where":"/home/travis/build/hydrabolt/discord.js","author":{"name":"Gus Caplan","email":"me@gus.host"},"browser":{"./src/node/index.js":false,"./src/meta.js":false},"bugs":{"url":"https://github.com/devsnek/snekfetch/issues"},"dependencies":{},"description":"Just do http requests without all that weird nastiness from other libs","devDependencies":{"coveralls":"^3.0.0","docma":"^1.5.1","eslint":"^4.8.0","jest":"^21.2.1","jsdoc-dynamic":"^1.0.4","json-filter-loader":"^1.0.0","node-fetch":"github:bitinn/node-fetch","uglifyjs-webpack-plugin":"^1.0.0-beta.2","webpack":"^3.8.1"},"directories":{},"dist":{"integrity":"sha512-aLEvf1YR440pINb0LEo/SL2Q2s/A26+YEqPlx09A0XpGH7qWp8iqIFFolVILHn2yudWXJne9QWyQu+lzDp+ksQ==","shasum":"9b77fa946cfa15c7041940593a2689dc547427ea","tarball":"https://registry.npmjs.org/snekfetch/-/snekfetch-3.6.1.tgz"},"gitHead":"ac841a9405292502aad905ec3c63ce28ddd82f24","homepage":"https://snekfetch.js.org/","jest":{"collectCoverage":true,"collectCoverageFrom":["src/**/*.js","!src/qs_mock.js","!src/node/mimeOfBuffer.js","!src/node/transports/http2.js"],"verbose":true},"jsdelivr":"browser.js","license":"MIT","main":"index.js","maintainers":[{"name":"snek","email":"me@gus.host"}],"module":"esm.mjs","name":"snekfetch","optionalDependencies":{},"readme":"ERROR: No README data found!","repository":{"type":"git","url":"git+https://github.com/devsnek/snekfetch.git"},"scripts":{"build:browser":"webpack","docs":"node docs.js","lint":"npx eslint src","prepublish":"npm run build:browser","test":"node ./node_modules/.bin/jest","test:coveralls":"cat ./coverage/lcov.info | coveralls"},"unpkg":"browser.js","version":"3.6.1"}
/***/ }),
/* 67 */
@ -16280,19 +16390,18 @@ function buildRequest(method, url) {
getHeader(name) {
return this.headers[name.toLowerCase()];
},
getHeaders() {
return this.headers;
},
};
}
function finalizeRequest() {
this._finalizeRequest();
if (this.data) this.request.body = this.data;
if (this.data)
this.request.body = this.data;
return window.fetch(this.request.path, this.request)
.then((r) => r.text().then((t) => {
const headers = {};
for (const [k, v] of r.headers.entries()) headers[k.toLowerCase()] = v;
for (const [k, v] of r.headers.entries())
headers[k.toLowerCase()] = v;
return { response: r, raw: t, headers };
}));
}
@ -16363,6 +16472,10 @@ exports.tmpdir = exports.tmpDir = function () {
exports.EOL = '\n';
exports.homedir = function () {
return '/'
};
/***/ }),
/* 70 */

File diff suppressed because one or more lines are too long