mirror of
https://github.com/tenrok/axios.git
synced 2026-06-20 20:00:40 +03:00
chore(release): v1.7.7 (#6585)
Co-authored-by: DigitalBrainJS <12586868+DigitalBrainJS@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
364993f0d8
commit
5b8a826771
Vendored
+97
-68
@@ -1,4 +1,4 @@
|
||||
// Axios v1.7.6 Copyright (c) 2024 Matt Zabriskie and contributors
|
||||
// Axios v1.7.7 Copyright (c) 2024 Matt Zabriskie and contributors
|
||||
(function (global, factory) {
|
||||
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
|
||||
typeof define === 'function' && define.amd ? define(factory) :
|
||||
@@ -3167,7 +3167,7 @@
|
||||
}, streamChunk);
|
||||
});
|
||||
var readBytes = /*#__PURE__*/function () {
|
||||
var _ref = _wrapAsyncGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(iterable, chunkSize, encode) {
|
||||
var _ref = _wrapAsyncGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(iterable, chunkSize) {
|
||||
var _iteratorAbruptCompletion, _didIteratorError, _iteratorError, _iterator, _step, chunk;
|
||||
return _regeneratorRuntime().wrap(function _callee$(_context2) {
|
||||
while (1) switch (_context2.prev = _context2.next) {
|
||||
@@ -3175,82 +3175,111 @@
|
||||
_iteratorAbruptCompletion = false;
|
||||
_didIteratorError = false;
|
||||
_context2.prev = 2;
|
||||
_iterator = _asyncIterator(iterable);
|
||||
_iterator = _asyncIterator(readStream(iterable));
|
||||
case 4:
|
||||
_context2.next = 6;
|
||||
return _awaitAsyncGenerator(_iterator.next());
|
||||
case 6:
|
||||
if (!(_iteratorAbruptCompletion = !(_step = _context2.sent).done)) {
|
||||
_context2.next = 27;
|
||||
_context2.next = 12;
|
||||
break;
|
||||
}
|
||||
chunk = _step.value;
|
||||
_context2.t0 = _asyncGeneratorDelegate;
|
||||
_context2.t1 = _asyncIterator;
|
||||
_context2.t2 = streamChunk;
|
||||
if (!ArrayBuffer.isView(chunk)) {
|
||||
_context2.next = 15;
|
||||
break;
|
||||
}
|
||||
_context2.t3 = chunk;
|
||||
_context2.next = 18;
|
||||
break;
|
||||
case 15:
|
||||
_context2.next = 17;
|
||||
return _awaitAsyncGenerator(encode(String(chunk)));
|
||||
case 17:
|
||||
_context2.t3 = _context2.sent;
|
||||
case 18:
|
||||
_context2.t4 = _context2.t3;
|
||||
_context2.t5 = chunkSize;
|
||||
_context2.t6 = (0, _context2.t2)(_context2.t4, _context2.t5);
|
||||
_context2.t7 = (0, _context2.t1)(_context2.t6);
|
||||
_context2.t8 = _awaitAsyncGenerator;
|
||||
return _context2.delegateYield((0, _context2.t0)(_context2.t7, _context2.t8), "t9", 24);
|
||||
case 24:
|
||||
return _context2.delegateYield(_asyncGeneratorDelegate(_asyncIterator(streamChunk(chunk, chunkSize))), "t0", 9);
|
||||
case 9:
|
||||
_iteratorAbruptCompletion = false;
|
||||
_context2.next = 4;
|
||||
break;
|
||||
case 27:
|
||||
_context2.next = 33;
|
||||
case 12:
|
||||
_context2.next = 18;
|
||||
break;
|
||||
case 29:
|
||||
_context2.prev = 29;
|
||||
_context2.t10 = _context2["catch"](2);
|
||||
case 14:
|
||||
_context2.prev = 14;
|
||||
_context2.t1 = _context2["catch"](2);
|
||||
_didIteratorError = true;
|
||||
_iteratorError = _context2.t10;
|
||||
case 33:
|
||||
_context2.prev = 33;
|
||||
_context2.prev = 34;
|
||||
_iteratorError = _context2.t1;
|
||||
case 18:
|
||||
_context2.prev = 18;
|
||||
_context2.prev = 19;
|
||||
if (!(_iteratorAbruptCompletion && _iterator["return"] != null)) {
|
||||
_context2.next = 38;
|
||||
_context2.next = 23;
|
||||
break;
|
||||
}
|
||||
_context2.next = 38;
|
||||
_context2.next = 23;
|
||||
return _awaitAsyncGenerator(_iterator["return"]());
|
||||
case 38:
|
||||
_context2.prev = 38;
|
||||
case 23:
|
||||
_context2.prev = 23;
|
||||
if (!_didIteratorError) {
|
||||
_context2.next = 41;
|
||||
_context2.next = 26;
|
||||
break;
|
||||
}
|
||||
throw _iteratorError;
|
||||
case 41:
|
||||
return _context2.finish(38);
|
||||
case 42:
|
||||
return _context2.finish(33);
|
||||
case 43:
|
||||
case 26:
|
||||
return _context2.finish(23);
|
||||
case 27:
|
||||
return _context2.finish(18);
|
||||
case 28:
|
||||
case "end":
|
||||
return _context2.stop();
|
||||
}
|
||||
}, _callee, null, [[2, 29, 33, 43], [34,, 38, 42]]);
|
||||
}, _callee, null, [[2, 14, 18, 28], [19,, 23, 27]]);
|
||||
}));
|
||||
return function readBytes(_x, _x2, _x3) {
|
||||
return function readBytes(_x, _x2) {
|
||||
return _ref.apply(this, arguments);
|
||||
};
|
||||
}();
|
||||
var trackStream = function trackStream(stream, chunkSize, onProgress, onFinish, encode) {
|
||||
var iterator = readBytes(stream, chunkSize, encode);
|
||||
var readStream = /*#__PURE__*/function () {
|
||||
var _ref2 = _wrapAsyncGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(stream) {
|
||||
var reader, _yield$_awaitAsyncGen, done, value;
|
||||
return _regeneratorRuntime().wrap(function _callee2$(_context3) {
|
||||
while (1) switch (_context3.prev = _context3.next) {
|
||||
case 0:
|
||||
if (!stream[Symbol.asyncIterator]) {
|
||||
_context3.next = 3;
|
||||
break;
|
||||
}
|
||||
return _context3.delegateYield(_asyncGeneratorDelegate(_asyncIterator(stream)), "t0", 2);
|
||||
case 2:
|
||||
return _context3.abrupt("return");
|
||||
case 3:
|
||||
reader = stream.getReader();
|
||||
_context3.prev = 4;
|
||||
case 5:
|
||||
_context3.next = 7;
|
||||
return _awaitAsyncGenerator(reader.read());
|
||||
case 7:
|
||||
_yield$_awaitAsyncGen = _context3.sent;
|
||||
done = _yield$_awaitAsyncGen.done;
|
||||
value = _yield$_awaitAsyncGen.value;
|
||||
if (!done) {
|
||||
_context3.next = 12;
|
||||
break;
|
||||
}
|
||||
return _context3.abrupt("break", 16);
|
||||
case 12:
|
||||
_context3.next = 14;
|
||||
return value;
|
||||
case 14:
|
||||
_context3.next = 5;
|
||||
break;
|
||||
case 16:
|
||||
_context3.prev = 16;
|
||||
_context3.next = 19;
|
||||
return _awaitAsyncGenerator(reader.cancel());
|
||||
case 19:
|
||||
return _context3.finish(16);
|
||||
case 20:
|
||||
case "end":
|
||||
return _context3.stop();
|
||||
}
|
||||
}, _callee2, null, [[4,, 16, 20]]);
|
||||
}));
|
||||
return function readStream(_x3) {
|
||||
return _ref2.apply(this, arguments);
|
||||
};
|
||||
}();
|
||||
var trackStream = function trackStream(stream, chunkSize, onProgress, onFinish) {
|
||||
var iterator = readBytes(stream, chunkSize);
|
||||
var bytes = 0;
|
||||
var done;
|
||||
var _onFinish = function _onFinish(e) {
|
||||
@@ -3261,25 +3290,25 @@
|
||||
};
|
||||
return new ReadableStream({
|
||||
pull: function pull(controller) {
|
||||
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
|
||||
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3() {
|
||||
var _yield$iterator$next, _done, value, len, loadedBytes;
|
||||
return _regeneratorRuntime().wrap(function _callee2$(_context3) {
|
||||
while (1) switch (_context3.prev = _context3.next) {
|
||||
return _regeneratorRuntime().wrap(function _callee3$(_context4) {
|
||||
while (1) switch (_context4.prev = _context4.next) {
|
||||
case 0:
|
||||
_context3.prev = 0;
|
||||
_context3.next = 3;
|
||||
_context4.prev = 0;
|
||||
_context4.next = 3;
|
||||
return iterator.next();
|
||||
case 3:
|
||||
_yield$iterator$next = _context3.sent;
|
||||
_yield$iterator$next = _context4.sent;
|
||||
_done = _yield$iterator$next.done;
|
||||
value = _yield$iterator$next.value;
|
||||
if (!_done) {
|
||||
_context3.next = 10;
|
||||
_context4.next = 10;
|
||||
break;
|
||||
}
|
||||
_onFinish();
|
||||
controller.close();
|
||||
return _context3.abrupt("return");
|
||||
return _context4.abrupt("return");
|
||||
case 10:
|
||||
len = value.byteLength;
|
||||
if (onProgress) {
|
||||
@@ -3287,18 +3316,18 @@
|
||||
onProgress(loadedBytes);
|
||||
}
|
||||
controller.enqueue(new Uint8Array(value));
|
||||
_context3.next = 19;
|
||||
_context4.next = 19;
|
||||
break;
|
||||
case 15:
|
||||
_context3.prev = 15;
|
||||
_context3.t0 = _context3["catch"](0);
|
||||
_onFinish(_context3.t0);
|
||||
throw _context3.t0;
|
||||
_context4.prev = 15;
|
||||
_context4.t0 = _context4["catch"](0);
|
||||
_onFinish(_context4.t0);
|
||||
throw _context4.t0;
|
||||
case 19:
|
||||
case "end":
|
||||
return _context3.stop();
|
||||
return _context4.stop();
|
||||
}
|
||||
}, _callee2, null, [[0, 15]]);
|
||||
}, _callee3, null, [[0, 15]]);
|
||||
}))();
|
||||
},
|
||||
cancel: function cancel(reason) {
|
||||
@@ -3493,7 +3522,7 @@
|
||||
}
|
||||
if (_request.body) {
|
||||
_progressEventDecorat = progressEventDecorator(requestContentLength, progressEventReducer(asyncDecorator(onUploadProgress))), _progressEventDecorat2 = _slicedToArray(_progressEventDecorat, 2), onProgress = _progressEventDecorat2[0], flush = _progressEventDecorat2[1];
|
||||
data = trackStream(_request.body, DEFAULT_CHUNK_SIZE, onProgress, flush, encodeText);
|
||||
data = trackStream(_request.body, DEFAULT_CHUNK_SIZE, onProgress, flush);
|
||||
}
|
||||
case 15:
|
||||
if (!utils$1.isString(withCredentials)) {
|
||||
@@ -3526,7 +3555,7 @@
|
||||
response = new Response(trackStream(response.body, DEFAULT_CHUNK_SIZE, _onProgress, function () {
|
||||
_flush && _flush();
|
||||
unsubscribe && unsubscribe();
|
||||
}, encodeText), options);
|
||||
}), options);
|
||||
}
|
||||
responseType = responseType || 'text';
|
||||
_context4.next = 26;
|
||||
@@ -3688,7 +3717,7 @@
|
||||
});
|
||||
}
|
||||
|
||||
var VERSION = "1.7.6";
|
||||
var VERSION = "1.7.7";
|
||||
|
||||
var validators$1 = {};
|
||||
|
||||
|
||||
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+29
-9
@@ -1,4 +1,4 @@
|
||||
// Axios v1.7.6 Copyright (c) 2024 Matt Zabriskie and contributors
|
||||
// Axios v1.7.7 Copyright (c) 2024 Matt Zabriskie and contributors
|
||||
'use strict';
|
||||
|
||||
function bind(fn, thisArg) {
|
||||
@@ -2699,14 +2699,34 @@ const streamChunk = function* (chunk, chunkSize) {
|
||||
}
|
||||
};
|
||||
|
||||
const readBytes = async function* (iterable, chunkSize, encode) {
|
||||
for await (const chunk of iterable) {
|
||||
yield* streamChunk(ArrayBuffer.isView(chunk) ? chunk : (await encode(String(chunk))), chunkSize);
|
||||
const readBytes = async function* (iterable, chunkSize) {
|
||||
for await (const chunk of readStream(iterable)) {
|
||||
yield* streamChunk(chunk, chunkSize);
|
||||
}
|
||||
};
|
||||
|
||||
const trackStream = (stream, chunkSize, onProgress, onFinish, encode) => {
|
||||
const iterator = readBytes(stream, chunkSize, encode);
|
||||
const readStream = async function* (stream) {
|
||||
if (stream[Symbol.asyncIterator]) {
|
||||
yield* stream;
|
||||
return;
|
||||
}
|
||||
|
||||
const reader = stream.getReader();
|
||||
try {
|
||||
for (;;) {
|
||||
const {done, value} = await reader.read();
|
||||
if (done) {
|
||||
break;
|
||||
}
|
||||
yield value;
|
||||
}
|
||||
} finally {
|
||||
await reader.cancel();
|
||||
}
|
||||
};
|
||||
|
||||
const trackStream = (stream, chunkSize, onProgress, onFinish) => {
|
||||
const iterator = readBytes(stream, chunkSize);
|
||||
|
||||
let bytes = 0;
|
||||
let done;
|
||||
@@ -2886,7 +2906,7 @@ var fetchAdapter = isFetchSupported && (async (config) => {
|
||||
progressEventReducer(asyncDecorator(onUploadProgress))
|
||||
);
|
||||
|
||||
data = trackStream(_request.body, DEFAULT_CHUNK_SIZE, onProgress, flush, encodeText);
|
||||
data = trackStream(_request.body, DEFAULT_CHUNK_SIZE, onProgress, flush);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2929,7 +2949,7 @@ var fetchAdapter = isFetchSupported && (async (config) => {
|
||||
trackStream(response.body, DEFAULT_CHUNK_SIZE, onProgress, () => {
|
||||
flush && flush();
|
||||
unsubscribe && unsubscribe();
|
||||
}, encodeText),
|
||||
}),
|
||||
options
|
||||
);
|
||||
}
|
||||
@@ -3113,7 +3133,7 @@ function dispatchRequest(config) {
|
||||
});
|
||||
}
|
||||
|
||||
const VERSION = "1.7.6";
|
||||
const VERSION = "1.7.7";
|
||||
|
||||
const validators$1 = {};
|
||||
|
||||
|
||||
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+29
-9
@@ -1,4 +1,4 @@
|
||||
// Axios v1.7.6 Copyright (c) 2024 Matt Zabriskie and contributors
|
||||
// Axios v1.7.7 Copyright (c) 2024 Matt Zabriskie and contributors
|
||||
function bind(fn, thisArg) {
|
||||
return function wrap() {
|
||||
return fn.apply(thisArg, arguments);
|
||||
@@ -2697,14 +2697,34 @@ const streamChunk = function* (chunk, chunkSize) {
|
||||
}
|
||||
};
|
||||
|
||||
const readBytes = async function* (iterable, chunkSize, encode) {
|
||||
for await (const chunk of iterable) {
|
||||
yield* streamChunk(ArrayBuffer.isView(chunk) ? chunk : (await encode(String(chunk))), chunkSize);
|
||||
const readBytes = async function* (iterable, chunkSize) {
|
||||
for await (const chunk of readStream(iterable)) {
|
||||
yield* streamChunk(chunk, chunkSize);
|
||||
}
|
||||
};
|
||||
|
||||
const trackStream = (stream, chunkSize, onProgress, onFinish, encode) => {
|
||||
const iterator = readBytes(stream, chunkSize, encode);
|
||||
const readStream = async function* (stream) {
|
||||
if (stream[Symbol.asyncIterator]) {
|
||||
yield* stream;
|
||||
return;
|
||||
}
|
||||
|
||||
const reader = stream.getReader();
|
||||
try {
|
||||
for (;;) {
|
||||
const {done, value} = await reader.read();
|
||||
if (done) {
|
||||
break;
|
||||
}
|
||||
yield value;
|
||||
}
|
||||
} finally {
|
||||
await reader.cancel();
|
||||
}
|
||||
};
|
||||
|
||||
const trackStream = (stream, chunkSize, onProgress, onFinish) => {
|
||||
const iterator = readBytes(stream, chunkSize);
|
||||
|
||||
let bytes = 0;
|
||||
let done;
|
||||
@@ -2884,7 +2904,7 @@ const fetchAdapter = isFetchSupported && (async (config) => {
|
||||
progressEventReducer(asyncDecorator(onUploadProgress))
|
||||
);
|
||||
|
||||
data = trackStream(_request.body, DEFAULT_CHUNK_SIZE, onProgress, flush, encodeText);
|
||||
data = trackStream(_request.body, DEFAULT_CHUNK_SIZE, onProgress, flush);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2927,7 +2947,7 @@ const fetchAdapter = isFetchSupported && (async (config) => {
|
||||
trackStream(response.body, DEFAULT_CHUNK_SIZE, onProgress, () => {
|
||||
flush && flush();
|
||||
unsubscribe && unsubscribe();
|
||||
}, encodeText),
|
||||
}),
|
||||
options
|
||||
);
|
||||
}
|
||||
@@ -3111,7 +3131,7 @@ function dispatchRequest(config) {
|
||||
});
|
||||
}
|
||||
|
||||
const VERSION$1 = "1.7.6";
|
||||
const VERSION$1 = "1.7.7";
|
||||
|
||||
const validators$1 = {};
|
||||
|
||||
|
||||
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+30
-10
@@ -1,4 +1,4 @@
|
||||
// Axios v1.7.6 Copyright (c) 2024 Matt Zabriskie and contributors
|
||||
// Axios v1.7.7 Copyright (c) 2024 Matt Zabriskie and contributors
|
||||
'use strict';
|
||||
|
||||
const FormData$1 = require('form-data');
|
||||
@@ -2071,7 +2071,7 @@ function buildFullPath(baseURL, requestedURL) {
|
||||
return requestedURL;
|
||||
}
|
||||
|
||||
const VERSION = "1.7.6";
|
||||
const VERSION = "1.7.7";
|
||||
|
||||
function parseProtocol(url) {
|
||||
const match = /^([-+\w]{1,25})(:?\/\/|:)/.exec(url);
|
||||
@@ -2963,7 +2963,7 @@ const httpAdapter = isHttpAdapterSupported && function httpAdapter(config) {
|
||||
if (config.socketPath) {
|
||||
options.socketPath = config.socketPath;
|
||||
} else {
|
||||
options.hostname = parsed.hostname;
|
||||
options.hostname = parsed.hostname.startsWith("[") ? parsed.hostname.slice(1, -1) : parsed.hostname;
|
||||
options.port = parsed.port;
|
||||
setProxy(options, config.proxy, protocol + '//' + parsed.hostname + (parsed.port ? ':' + parsed.port : '') + options.path);
|
||||
}
|
||||
@@ -3730,14 +3730,34 @@ const streamChunk = function* (chunk, chunkSize) {
|
||||
}
|
||||
};
|
||||
|
||||
const readBytes = async function* (iterable, chunkSize, encode) {
|
||||
for await (const chunk of iterable) {
|
||||
yield* streamChunk(ArrayBuffer.isView(chunk) ? chunk : (await encode(String(chunk))), chunkSize);
|
||||
const readBytes = async function* (iterable, chunkSize) {
|
||||
for await (const chunk of readStream(iterable)) {
|
||||
yield* streamChunk(chunk, chunkSize);
|
||||
}
|
||||
};
|
||||
|
||||
const trackStream = (stream, chunkSize, onProgress, onFinish, encode) => {
|
||||
const iterator = readBytes(stream, chunkSize, encode);
|
||||
const readStream = async function* (stream) {
|
||||
if (stream[Symbol.asyncIterator]) {
|
||||
yield* stream;
|
||||
return;
|
||||
}
|
||||
|
||||
const reader = stream.getReader();
|
||||
try {
|
||||
for (;;) {
|
||||
const {done, value} = await reader.read();
|
||||
if (done) {
|
||||
break;
|
||||
}
|
||||
yield value;
|
||||
}
|
||||
} finally {
|
||||
await reader.cancel();
|
||||
}
|
||||
};
|
||||
|
||||
const trackStream = (stream, chunkSize, onProgress, onFinish) => {
|
||||
const iterator = readBytes(stream, chunkSize);
|
||||
|
||||
let bytes = 0;
|
||||
let done;
|
||||
@@ -3917,7 +3937,7 @@ const fetchAdapter = isFetchSupported && (async (config) => {
|
||||
progressEventReducer(asyncDecorator(onUploadProgress))
|
||||
);
|
||||
|
||||
data = trackStream(_request.body, DEFAULT_CHUNK_SIZE, onProgress, flush, encodeText);
|
||||
data = trackStream(_request.body, DEFAULT_CHUNK_SIZE, onProgress, flush);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3960,7 +3980,7 @@ const fetchAdapter = isFetchSupported && (async (config) => {
|
||||
trackStream(response.body, DEFAULT_CHUNK_SIZE, onProgress, () => {
|
||||
flush && flush();
|
||||
unsubscribe && unsubscribe();
|
||||
}, encodeText),
|
||||
}),
|
||||
options
|
||||
);
|
||||
}
|
||||
|
||||
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user