cloudstructs 0.9.28 → 0.9.30
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.jsii +4 -4
- package/assets/slack-textract/detect.lambda/index.js +63 -34
- package/lib/codecommit-mirror/index.js +2 -2
- package/lib/dmarc/index.js +1 -1
- package/lib/ecs-service-roller/index.js +2 -2
- package/lib/email-receiver/receiver.js +1 -1
- package/lib/email-receiver/whitelist-function.js +2 -2
- package/lib/mjml-template/index.js +1 -1
- package/lib/saml-identity-provider/index.js +2 -2
- package/lib/slack-app/manifest.js +1 -1
- package/lib/slack-app/provider-function.js +2 -2
- package/lib/slack-app/slack-app.js +2 -2
- package/lib/slack-events/events-function.js +2 -2
- package/lib/slack-events/index.js +1 -1
- package/lib/slack-textract/detect-function.js +2 -2
- package/lib/slack-textract/index.js +1 -1
- package/lib/ssl-server-test/analyze-function.js +2 -2
- package/lib/ssl-server-test/extract-grade-function.js +2 -2
- package/lib/ssl-server-test/index.js +1 -1
- package/lib/state-machine-cr-provider/index.js +1 -1
- package/lib/static-website/index.js +1 -1
- package/lib/static-website/origin-request-function.js +2 -2
- package/lib/toolkit-cleaner/clean-images-function.js +2 -2
- package/lib/toolkit-cleaner/clean-objects-function.js +2 -2
- package/lib/toolkit-cleaner/extract-template-hashes-function.js +2 -2
- package/lib/toolkit-cleaner/get-stack-names-function.js +2 -2
- package/lib/toolkit-cleaner/index.js +1 -1
- package/lib/url-shortener/index.js +1 -1
- package/lib/url-shortener/redirect-function.js +2 -2
- package/lib/url-shortener/shortener-function.js +2 -2
- package/node_modules/@babel/runtime/helpers/esm/wrapRegExp.js +4 -3
- package/node_modules/@babel/runtime/helpers/wrapRegExp.js +4 -3
- package/node_modules/@babel/runtime/package.json +1 -1
- package/node_modules/@slack/logger/node_modules/@types/node/README.md +1 -1
- package/node_modules/@slack/logger/node_modules/@types/node/buffer.buffer.d.ts +112 -38
- package/node_modules/@slack/logger/node_modules/@types/node/buffer.d.ts +4 -11
- package/node_modules/@slack/logger/node_modules/@types/node/constants.d.ts +14 -12
- package/node_modules/@slack/logger/node_modules/@types/node/crypto.d.ts +36 -1
- package/node_modules/@slack/logger/node_modules/@types/node/module.d.ts +4 -4
- package/node_modules/@slack/logger/node_modules/@types/node/package.json +2 -2
- package/node_modules/@slack/logger/node_modules/@types/node/stream/web.d.ts +6 -1
- package/node_modules/@slack/logger/node_modules/@types/node/stream.d.ts +936 -1005
- package/node_modules/@slack/logger/node_modules/@types/node/ts5.6/buffer.buffer.d.ts +107 -35
- package/node_modules/@slack/web-api/README.md +4 -4
- package/node_modules/@slack/web-api/dist/WebClient.d.ts +30 -1
- package/node_modules/@slack/web-api/dist/WebClient.d.ts.map +1 -1
- package/node_modules/@slack/web-api/dist/WebClient.js +15 -2
- package/node_modules/@slack/web-api/dist/WebClient.js.map +1 -1
- package/node_modules/@slack/web-api/dist/methods.d.ts +1 -1
- package/node_modules/@slack/web-api/dist/methods.js +1 -1
- package/node_modules/@slack/web-api/node_modules/@types/node/README.md +1 -1
- package/node_modules/@slack/web-api/node_modules/@types/node/buffer.buffer.d.ts +112 -38
- package/node_modules/@slack/web-api/node_modules/@types/node/buffer.d.ts +4 -11
- package/node_modules/@slack/web-api/node_modules/@types/node/constants.d.ts +14 -12
- package/node_modules/@slack/web-api/node_modules/@types/node/crypto.d.ts +36 -1
- package/node_modules/@slack/web-api/node_modules/@types/node/module.d.ts +4 -4
- package/node_modules/@slack/web-api/node_modules/@types/node/package.json +2 -2
- package/node_modules/@slack/web-api/node_modules/@types/node/stream/web.d.ts +6 -1
- package/node_modules/@slack/web-api/node_modules/@types/node/stream.d.ts +936 -1005
- package/node_modules/@slack/web-api/node_modules/@types/node/ts5.6/buffer.buffer.d.ts +107 -35
- package/node_modules/@slack/web-api/package.json +8 -6
- package/node_modules/@types/cacheable-request/node_modules/@types/node/README.md +1 -1
- package/node_modules/@types/cacheable-request/node_modules/@types/node/buffer.buffer.d.ts +112 -38
- package/node_modules/@types/cacheable-request/node_modules/@types/node/buffer.d.ts +4 -11
- package/node_modules/@types/cacheable-request/node_modules/@types/node/constants.d.ts +14 -12
- package/node_modules/@types/cacheable-request/node_modules/@types/node/crypto.d.ts +36 -1
- package/node_modules/@types/cacheable-request/node_modules/@types/node/module.d.ts +4 -4
- package/node_modules/@types/cacheable-request/node_modules/@types/node/package.json +2 -2
- package/node_modules/@types/cacheable-request/node_modules/@types/node/stream/web.d.ts +6 -1
- package/node_modules/@types/cacheable-request/node_modules/@types/node/stream.d.ts +936 -1005
- package/node_modules/@types/cacheable-request/node_modules/@types/node/ts5.6/buffer.buffer.d.ts +107 -35
- package/node_modules/@types/keyv/node_modules/@types/node/README.md +1 -1
- package/node_modules/@types/keyv/node_modules/@types/node/buffer.buffer.d.ts +112 -38
- package/node_modules/@types/keyv/node_modules/@types/node/buffer.d.ts +4 -11
- package/node_modules/@types/keyv/node_modules/@types/node/constants.d.ts +14 -12
- package/node_modules/@types/keyv/node_modules/@types/node/crypto.d.ts +36 -1
- package/node_modules/@types/keyv/node_modules/@types/node/module.d.ts +4 -4
- package/node_modules/@types/keyv/node_modules/@types/node/package.json +2 -2
- package/node_modules/@types/keyv/node_modules/@types/node/stream/web.d.ts +6 -1
- package/node_modules/@types/keyv/node_modules/@types/node/stream.d.ts +936 -1005
- package/node_modules/@types/keyv/node_modules/@types/node/ts5.6/buffer.buffer.d.ts +107 -35
- package/node_modules/@types/responselike/node_modules/@types/node/README.md +1 -1
- package/node_modules/@types/responselike/node_modules/@types/node/buffer.buffer.d.ts +112 -38
- package/node_modules/@types/responselike/node_modules/@types/node/buffer.d.ts +4 -11
- package/node_modules/@types/responselike/node_modules/@types/node/constants.d.ts +14 -12
- package/node_modules/@types/responselike/node_modules/@types/node/crypto.d.ts +36 -1
- package/node_modules/@types/responselike/node_modules/@types/node/module.d.ts +4 -4
- package/node_modules/@types/responselike/node_modules/@types/node/package.json +2 -2
- package/node_modules/@types/responselike/node_modules/@types/node/stream/web.d.ts +6 -1
- package/node_modules/@types/responselike/node_modules/@types/node/stream.d.ts +936 -1005
- package/node_modules/@types/responselike/node_modules/@types/node/ts5.6/buffer.buffer.d.ts +107 -35
- package/node_modules/abbrev/package.json +9 -11
- package/node_modules/axios/CHANGELOG.md +97 -0
- package/node_modules/axios/README.md +35 -13
- package/node_modules/axios/dist/axios.js +14 -25
- package/node_modules/axios/dist/axios.js.map +1 -1
- package/node_modules/axios/dist/axios.min.js +2 -1
- package/node_modules/axios/dist/axios.min.js.map +1 -1
- package/node_modules/axios/dist/browser/axios.cjs +14 -28
- package/node_modules/axios/dist/browser/axios.cjs.map +1 -1
- package/node_modules/axios/dist/esm/axios.js +14 -28
- package/node_modules/axios/dist/esm/axios.js.map +1 -1
- package/node_modules/axios/dist/esm/axios.min.js +2 -1
- package/node_modules/axios/dist/esm/axios.min.js.map +1 -1
- package/node_modules/axios/dist/node/axios.cjs +44 -31
- package/node_modules/axios/dist/node/axios.cjs.map +1 -1
- package/node_modules/axios/index.d.cts +1 -0
- package/node_modules/axios/index.d.ts +1 -0
- package/node_modules/axios/lib/adapters/http.js +1 -1
- package/node_modules/axios/lib/core/Axios.js +10 -1
- package/node_modules/axios/lib/core/buildFullPath.js +3 -2
- package/node_modules/axios/lib/env/data.js +1 -1
- package/node_modules/axios/lib/helpers/formDataToStream.js +3 -2
- package/node_modules/axios/lib/helpers/resolveConfig.js +1 -1
- package/node_modules/axios/lib/platform/node/index.js +26 -0
- package/node_modules/axios/lib/utils.js +0 -22
- package/node_modules/axios/package.json +4 -4
- package/node_modules/foreground-child/dist/commonjs/all-signals.d.ts +0 -1
- package/node_modules/foreground-child/dist/commonjs/all-signals.d.ts.map +1 -1
- package/node_modules/foreground-child/dist/commonjs/index.d.ts +1 -8
- package/node_modules/foreground-child/dist/commonjs/index.d.ts.map +1 -1
- package/node_modules/foreground-child/dist/commonjs/index.js +2 -2
- package/node_modules/foreground-child/dist/commonjs/index.js.map +1 -1
- package/node_modules/foreground-child/dist/commonjs/proxy-signals.d.ts +0 -1
- package/node_modules/foreground-child/dist/commonjs/proxy-signals.d.ts.map +1 -1
- package/node_modules/foreground-child/dist/commonjs/watchdog.d.ts +0 -1
- package/node_modules/foreground-child/dist/commonjs/watchdog.d.ts.map +1 -1
- package/node_modules/foreground-child/dist/esm/all-signals.d.ts +0 -1
- package/node_modules/foreground-child/dist/esm/all-signals.d.ts.map +1 -1
- package/node_modules/foreground-child/dist/esm/index.d.ts +1 -8
- package/node_modules/foreground-child/dist/esm/index.d.ts.map +1 -1
- package/node_modules/foreground-child/dist/esm/proxy-signals.d.ts +0 -1
- package/node_modules/foreground-child/dist/esm/proxy-signals.d.ts.map +1 -1
- package/node_modules/foreground-child/dist/esm/watchdog.d.ts +0 -1
- package/node_modules/foreground-child/dist/esm/watchdog.d.ts.map +1 -1
- package/node_modules/foreground-child/package.json +6 -11
- package/node_modules/js-beautify/README.md +8 -8
- package/node_modules/js-beautify/package.json +2 -2
- package/node_modules/nopt/README.md +8 -9
- package/node_modules/nopt/lib/nopt-lib.js +5 -40
- package/node_modules/nopt/lib/nopt.js +0 -4
- package/node_modules/nopt/package.json +9 -10
- package/package.json +19 -19
- package/node_modules/axios/SECURITY.md +0 -6
- /package/node_modules/{path-key → cross-spawn/node_modules/path-key}/index.d.ts +0 -0
- /package/node_modules/{path-key → cross-spawn/node_modules/path-key}/index.js +0 -0
- /package/node_modules/{path-key → cross-spawn/node_modules/path-key}/license +0 -0
- /package/node_modules/{path-key → cross-spawn/node_modules/path-key}/package.json +0 -0
- /package/node_modules/{path-key → cross-spawn/node_modules/path-key}/readme.md +0 -0
|
@@ -24,7 +24,7 @@ declare module "buffer" {
|
|
|
24
24
|
* @param array The octets to store.
|
|
25
25
|
* @deprecated since v10.0.0 - Use `Buffer.from(array)` instead.
|
|
26
26
|
*/
|
|
27
|
-
new(array:
|
|
27
|
+
new(array: ArrayLike<number>): Buffer;
|
|
28
28
|
/**
|
|
29
29
|
* Produces a Buffer backed by the same allocated memory as
|
|
30
30
|
* the given {ArrayBuffer}/{SharedArrayBuffer}.
|
|
@@ -33,20 +33,6 @@ declare module "buffer" {
|
|
|
33
33
|
* @deprecated since v10.0.0 - Use `Buffer.from(arrayBuffer[, byteOffset[, length]])` instead.
|
|
34
34
|
*/
|
|
35
35
|
new(arrayBuffer: ArrayBuffer | SharedArrayBuffer): Buffer;
|
|
36
|
-
/**
|
|
37
|
-
* Allocates a new buffer containing the given {array} of octets.
|
|
38
|
-
*
|
|
39
|
-
* @param array The octets to store.
|
|
40
|
-
* @deprecated since v10.0.0 - Use `Buffer.from(array)` instead.
|
|
41
|
-
*/
|
|
42
|
-
new(array: readonly any[]): Buffer;
|
|
43
|
-
/**
|
|
44
|
-
* Copies the passed {buffer} data onto a new {Buffer} instance.
|
|
45
|
-
*
|
|
46
|
-
* @param buffer The buffer to copy.
|
|
47
|
-
* @deprecated since v10.0.0 - Use `Buffer.from(buffer)` instead.
|
|
48
|
-
*/
|
|
49
|
-
new(buffer: Buffer): Buffer;
|
|
50
36
|
/**
|
|
51
37
|
* Allocates a new `Buffer` using an `array` of bytes in the range `0` – `255`.
|
|
52
38
|
* Array entries outside that range will be truncated to fit into it.
|
|
@@ -58,40 +44,120 @@ declare module "buffer" {
|
|
|
58
44
|
* const buf = Buffer.from([0x62, 0x75, 0x66, 0x66, 0x65, 0x72]);
|
|
59
45
|
* ```
|
|
60
46
|
*
|
|
61
|
-
* If `array` is an `Array
|
|
47
|
+
* If `array` is an `Array`-like object (that is, one with a `length` property of
|
|
62
48
|
* type `number`), it is treated as if it is an array, unless it is a `Buffer` or
|
|
63
|
-
* a `Uint8Array`. This means all other `TypedArray` variants get treated as an
|
|
49
|
+
* a `Uint8Array`. This means all other `TypedArray` variants get treated as an
|
|
50
|
+
* `Array`. To create a `Buffer` from the bytes backing a `TypedArray`, use
|
|
51
|
+
* `Buffer.copyBytesFrom()`.
|
|
64
52
|
*
|
|
65
53
|
* A `TypeError` will be thrown if `array` is not an `Array` or another type
|
|
66
54
|
* appropriate for `Buffer.from()` variants.
|
|
67
55
|
*
|
|
68
|
-
* `Buffer.from(array)` and `Buffer.from(string)` may also use the internal
|
|
56
|
+
* `Buffer.from(array)` and `Buffer.from(string)` may also use the internal
|
|
57
|
+
* `Buffer` pool like `Buffer.allocUnsafe()` does.
|
|
69
58
|
* @since v5.10.0
|
|
70
59
|
*/
|
|
60
|
+
from(array: WithImplicitCoercion<ArrayLike<number>>): Buffer;
|
|
61
|
+
/**
|
|
62
|
+
* This creates a view of the `ArrayBuffer` without copying the underlying
|
|
63
|
+
* memory. For example, when passed a reference to the `.buffer` property of a
|
|
64
|
+
* `TypedArray` instance, the newly created `Buffer` will share the same
|
|
65
|
+
* allocated memory as the `TypedArray`'s underlying `ArrayBuffer`.
|
|
66
|
+
*
|
|
67
|
+
* ```js
|
|
68
|
+
* import { Buffer } from 'node:buffer';
|
|
69
|
+
*
|
|
70
|
+
* const arr = new Uint16Array(2);
|
|
71
|
+
*
|
|
72
|
+
* arr[0] = 5000;
|
|
73
|
+
* arr[1] = 4000;
|
|
74
|
+
*
|
|
75
|
+
* // Shares memory with `arr`.
|
|
76
|
+
* const buf = Buffer.from(arr.buffer);
|
|
77
|
+
*
|
|
78
|
+
* console.log(buf);
|
|
79
|
+
* // Prints: <Buffer 88 13 a0 0f>
|
|
80
|
+
*
|
|
81
|
+
* // Changing the original Uint16Array changes the Buffer also.
|
|
82
|
+
* arr[1] = 6000;
|
|
83
|
+
*
|
|
84
|
+
* console.log(buf);
|
|
85
|
+
* // Prints: <Buffer 88 13 70 17>
|
|
86
|
+
* ```
|
|
87
|
+
*
|
|
88
|
+
* The optional `byteOffset` and `length` arguments specify a memory range within
|
|
89
|
+
* the `arrayBuffer` that will be shared by the `Buffer`.
|
|
90
|
+
*
|
|
91
|
+
* ```js
|
|
92
|
+
* import { Buffer } from 'node:buffer';
|
|
93
|
+
*
|
|
94
|
+
* const ab = new ArrayBuffer(10);
|
|
95
|
+
* const buf = Buffer.from(ab, 0, 2);
|
|
96
|
+
*
|
|
97
|
+
* console.log(buf.length);
|
|
98
|
+
* // Prints: 2
|
|
99
|
+
* ```
|
|
100
|
+
*
|
|
101
|
+
* A `TypeError` will be thrown if `arrayBuffer` is not an `ArrayBuffer` or a
|
|
102
|
+
* `SharedArrayBuffer` or another type appropriate for `Buffer.from()`
|
|
103
|
+
* variants.
|
|
104
|
+
*
|
|
105
|
+
* It is important to remember that a backing `ArrayBuffer` can cover a range
|
|
106
|
+
* of memory that extends beyond the bounds of a `TypedArray` view. A new
|
|
107
|
+
* `Buffer` created using the `buffer` property of a `TypedArray` may extend
|
|
108
|
+
* beyond the range of the `TypedArray`:
|
|
109
|
+
*
|
|
110
|
+
* ```js
|
|
111
|
+
* import { Buffer } from 'node:buffer';
|
|
112
|
+
*
|
|
113
|
+
* const arrA = Uint8Array.from([0x63, 0x64, 0x65, 0x66]); // 4 elements
|
|
114
|
+
* const arrB = new Uint8Array(arrA.buffer, 1, 2); // 2 elements
|
|
115
|
+
* console.log(arrA.buffer === arrB.buffer); // true
|
|
116
|
+
*
|
|
117
|
+
* const buf = Buffer.from(arrB.buffer);
|
|
118
|
+
* console.log(buf);
|
|
119
|
+
* // Prints: <Buffer 63 64 65 66>
|
|
120
|
+
* ```
|
|
121
|
+
* @since v5.10.0
|
|
122
|
+
* @param arrayBuffer An `ArrayBuffer`, `SharedArrayBuffer`, for example the
|
|
123
|
+
* `.buffer` property of a `TypedArray`.
|
|
124
|
+
* @param byteOffset Index of first byte to expose. **Default:** `0`.
|
|
125
|
+
* @param length Number of bytes to expose. **Default:**
|
|
126
|
+
* `arrayBuffer.byteLength - byteOffset`.
|
|
127
|
+
*/
|
|
71
128
|
from(
|
|
72
129
|
arrayBuffer: WithImplicitCoercion<ArrayBuffer | SharedArrayBuffer>,
|
|
73
130
|
byteOffset?: number,
|
|
74
131
|
length?: number,
|
|
75
132
|
): Buffer;
|
|
76
133
|
/**
|
|
77
|
-
* Creates a new Buffer
|
|
78
|
-
*
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
*
|
|
84
|
-
*
|
|
85
|
-
*
|
|
134
|
+
* Creates a new `Buffer` containing `string`. The `encoding` parameter identifies
|
|
135
|
+
* the character encoding to be used when converting `string` into bytes.
|
|
136
|
+
*
|
|
137
|
+
* ```js
|
|
138
|
+
* import { Buffer } from 'node:buffer';
|
|
139
|
+
*
|
|
140
|
+
* const buf1 = Buffer.from('this is a tést');
|
|
141
|
+
* const buf2 = Buffer.from('7468697320697320612074c3a97374', 'hex');
|
|
142
|
+
*
|
|
143
|
+
* console.log(buf1.toString());
|
|
144
|
+
* // Prints: this is a tést
|
|
145
|
+
* console.log(buf2.toString());
|
|
146
|
+
* // Prints: this is a tést
|
|
147
|
+
* console.log(buf1.toString('latin1'));
|
|
148
|
+
* // Prints: this is a tést
|
|
149
|
+
* ```
|
|
150
|
+
*
|
|
151
|
+
* A `TypeError` will be thrown if `string` is not a string or another type
|
|
152
|
+
* appropriate for `Buffer.from()` variants.
|
|
153
|
+
*
|
|
154
|
+
* `Buffer.from(string)` may also use the internal `Buffer` pool like
|
|
155
|
+
* `Buffer.allocUnsafe()` does.
|
|
156
|
+
* @since v5.10.0
|
|
157
|
+
* @param string A string to encode.
|
|
158
|
+
* @param encoding The encoding of `string`. **Default:** `'utf8'`.
|
|
86
159
|
*/
|
|
87
|
-
from(
|
|
88
|
-
str:
|
|
89
|
-
| WithImplicitCoercion<string>
|
|
90
|
-
| {
|
|
91
|
-
[Symbol.toPrimitive](hint: "string"): string;
|
|
92
|
-
},
|
|
93
|
-
encoding?: BufferEncoding,
|
|
94
|
-
): Buffer;
|
|
160
|
+
from(string: WithImplicitCoercion<string>, encoding?: BufferEncoding): Buffer;
|
|
95
161
|
/**
|
|
96
162
|
* Creates a new Buffer using the passed {data}
|
|
97
163
|
* @param values to create a new Buffer
|
|
@@ -382,4 +448,10 @@ declare module "buffer" {
|
|
|
382
448
|
subarray(start?: number, end?: number): Buffer;
|
|
383
449
|
}
|
|
384
450
|
}
|
|
451
|
+
/** @deprecated Use `Buffer.allocUnsafeSlow()` instead. */
|
|
452
|
+
var SlowBuffer: {
|
|
453
|
+
/** @deprecated Use `Buffer.allocUnsafeSlow()` instead. */
|
|
454
|
+
new(size: number): Buffer;
|
|
455
|
+
prototype: Buffer;
|
|
456
|
+
};
|
|
385
457
|
}
|
|
@@ -1,27 +1,26 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "abbrev",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0",
|
|
4
4
|
"description": "Like ruby's abbrev module, but in js",
|
|
5
5
|
"author": "GitHub Inc.",
|
|
6
6
|
"main": "lib/index.js",
|
|
7
7
|
"scripts": {
|
|
8
8
|
"test": "tap",
|
|
9
|
-
"lint": "
|
|
9
|
+
"lint": "eslint \"**/*.js\"",
|
|
10
10
|
"postlint": "template-oss-check",
|
|
11
11
|
"template-oss-apply": "template-oss-apply --force",
|
|
12
|
-
"lintfix": "npm run
|
|
12
|
+
"lintfix": "npm run lint -- --fix",
|
|
13
13
|
"snap": "tap",
|
|
14
|
-
"posttest": "npm run lint"
|
|
15
|
-
"eslint": "eslint \"**/*.{js,cjs,ts,mjs,jsx,tsx}\""
|
|
14
|
+
"posttest": "npm run lint"
|
|
16
15
|
},
|
|
17
16
|
"repository": {
|
|
18
17
|
"type": "git",
|
|
19
|
-
"url": "
|
|
18
|
+
"url": "https://github.com/npm/abbrev-js.git"
|
|
20
19
|
},
|
|
21
20
|
"license": "ISC",
|
|
22
21
|
"devDependencies": {
|
|
23
|
-
"@npmcli/eslint-config": "^
|
|
24
|
-
"@npmcli/template-oss": "4.
|
|
22
|
+
"@npmcli/eslint-config": "^4.0.0",
|
|
23
|
+
"@npmcli/template-oss": "4.8.0",
|
|
25
24
|
"tap": "^16.3.0"
|
|
26
25
|
},
|
|
27
26
|
"tap": {
|
|
@@ -35,11 +34,10 @@
|
|
|
35
34
|
"lib/"
|
|
36
35
|
],
|
|
37
36
|
"engines": {
|
|
38
|
-
"node": "^
|
|
37
|
+
"node": "^14.17.0 || ^16.13.0 || >=18.0.0"
|
|
39
38
|
},
|
|
40
39
|
"templateOSS": {
|
|
41
40
|
"//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.",
|
|
42
|
-
"version": "4.
|
|
43
|
-
"publish": true
|
|
41
|
+
"version": "4.8.0"
|
|
44
42
|
}
|
|
45
43
|
}
|
|
@@ -1,5 +1,102 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [1.8.4](https://github.com/axios/axios/compare/v1.8.3...v1.8.4) (2025-03-19)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Bug Fixes
|
|
7
|
+
|
|
8
|
+
* **buildFullPath:** handle `allowAbsoluteUrls: false` without `baseURL` ([#6833](https://github.com/axios/axios/issues/6833)) ([f10c2e0](https://github.com/axios/axios/commit/f10c2e0de7fde0051f848609a29c2906d0caa1d9))
|
|
9
|
+
|
|
10
|
+
### Contributors to this release
|
|
11
|
+
|
|
12
|
+
- <img src="https://avatars.githubusercontent.com/u/8029107?v=4&s=18" alt="avatar" width="18"/> [Marc Hassan](https://github.com/mhassan1 "+5/-1 (#6833 )")
|
|
13
|
+
|
|
14
|
+
## [1.8.3](https://github.com/axios/axios/compare/v1.8.2...v1.8.3) (2025-03-10)
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
### Bug Fixes
|
|
18
|
+
|
|
19
|
+
* add missing type for allowAbsoluteUrls ([#6818](https://github.com/axios/axios/issues/6818)) ([10fa70e](https://github.com/axios/axios/commit/10fa70ef14fe39558b15a179f0e82f5f5e5d11b2))
|
|
20
|
+
* **xhr/fetch:** pass `allowAbsoluteUrls` to `buildFullPath` in `xhr` and `fetch` adapters ([#6814](https://github.com/axios/axios/issues/6814)) ([ec159e5](https://github.com/axios/axios/commit/ec159e507bdf08c04ba1a10fe7710094e9e50ec9))
|
|
21
|
+
|
|
22
|
+
### Contributors to this release
|
|
23
|
+
|
|
24
|
+
- <img src="https://avatars.githubusercontent.com/u/3238291?v=4&s=18" alt="avatar" width="18"/> [Ashcon Partovi](https://github.com/Electroid "+6/-0 (#6811 )")
|
|
25
|
+
- <img src="https://avatars.githubusercontent.com/u/28559054?v=4&s=18" alt="avatar" width="18"/> [StefanBRas](https://github.com/StefanBRas "+4/-0 (#6818 )")
|
|
26
|
+
- <img src="https://avatars.githubusercontent.com/u/8029107?v=4&s=18" alt="avatar" width="18"/> [Marc Hassan](https://github.com/mhassan1 "+2/-2 (#6814 )")
|
|
27
|
+
|
|
28
|
+
## [1.8.2](https://github.com/axios/axios/compare/v1.8.1...v1.8.2) (2025-03-07)
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
### Bug Fixes
|
|
32
|
+
|
|
33
|
+
* **http-adapter:** add allowAbsoluteUrls to path building ([#6810](https://github.com/axios/axios/issues/6810)) ([fb8eec2](https://github.com/axios/axios/commit/fb8eec214ce7744b5ca787f2c3b8339b2f54b00f))
|
|
34
|
+
|
|
35
|
+
### Contributors to this release
|
|
36
|
+
|
|
37
|
+
- <img src="https://avatars.githubusercontent.com/u/14166260?v=4&s=18" alt="avatar" width="18"/> [Fasoro-Joseph Alexander](https://github.com/lexcorp16 "+1/-1 (#6810 )")
|
|
38
|
+
|
|
39
|
+
## [1.8.1](https://github.com/axios/axios/compare/v1.8.0...v1.8.1) (2025-02-26)
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
### Bug Fixes
|
|
43
|
+
|
|
44
|
+
* **utils:** move `generateString` to platform utils to avoid importing crypto module into client builds; ([#6789](https://github.com/axios/axios/issues/6789)) ([36a5a62](https://github.com/axios/axios/commit/36a5a620bec0b181451927f13ac85b9888b86cec))
|
|
45
|
+
|
|
46
|
+
### Contributors to this release
|
|
47
|
+
|
|
48
|
+
- <img src="https://avatars.githubusercontent.com/u/12586868?v=4&s=18" alt="avatar" width="18"/> [Dmitriy Mozgovoy](https://github.com/DigitalBrainJS "+51/-47 (#6789 )")
|
|
49
|
+
|
|
50
|
+
# [1.8.0](https://github.com/axios/axios/compare/v1.7.9...v1.8.0) (2025-02-25)
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
### Bug Fixes
|
|
54
|
+
|
|
55
|
+
* **examples:** application crashed when navigating examples in browser ([#5938](https://github.com/axios/axios/issues/5938)) ([1260ded](https://github.com/axios/axios/commit/1260ded634ec101dd5ed05d3b70f8e8f899dba6c))
|
|
56
|
+
* missing word in SUPPORT_QUESTION.yml ([#6757](https://github.com/axios/axios/issues/6757)) ([1f890b1](https://github.com/axios/axios/commit/1f890b13f2c25a016f3c84ae78efb769f244133e))
|
|
57
|
+
* **utils:** replace getRandomValues with crypto module ([#6788](https://github.com/axios/axios/issues/6788)) ([23a25af](https://github.com/axios/axios/commit/23a25af0688d1db2c396deb09229d2271cc24f6c))
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
### Features
|
|
61
|
+
|
|
62
|
+
* Add config for ignoring absolute URLs ([#5902](https://github.com/axios/axios/issues/5902)) ([#6192](https://github.com/axios/axios/issues/6192)) ([32c7bcc](https://github.com/axios/axios/commit/32c7bcc0f233285ba27dec73a4b1e81fb7a219b3))
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
### Reverts
|
|
66
|
+
|
|
67
|
+
* Revert "chore: expose fromDataToStream to be consumable (#6731)" (#6732) ([1317261](https://github.com/axios/axios/commit/1317261125e9c419fe9f126867f64d28f9c1efda)), closes [#6731](https://github.com/axios/axios/issues/6731) [#6732](https://github.com/axios/axios/issues/6732)
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
### BREAKING CHANGES
|
|
71
|
+
|
|
72
|
+
* code relying on the above will now combine the URLs instead of prefer request URL
|
|
73
|
+
|
|
74
|
+
* feat: add config option for allowing absolute URLs
|
|
75
|
+
|
|
76
|
+
* fix: add default value for allowAbsoluteUrls in buildFullPath
|
|
77
|
+
|
|
78
|
+
* fix: typo in flow control when setting allowAbsoluteUrls
|
|
79
|
+
|
|
80
|
+
### Contributors to this release
|
|
81
|
+
|
|
82
|
+
- <img src="https://avatars.githubusercontent.com/u/7661715?v=4&s=18" alt="avatar" width="18"/> [Michael Toscano](https://github.com/GethosTheWalrus "+42/-8 (#6192 )")
|
|
83
|
+
- <img src="https://avatars.githubusercontent.com/u/22686401?v=4&s=18" alt="avatar" width="18"/> [Willian Agostini](https://github.com/WillianAgostini "+26/-3 (#6788 #6777 )")
|
|
84
|
+
- <img src="https://avatars.githubusercontent.com/u/72578270?v=4&s=18" alt="avatar" width="18"/> [Naron](https://github.com/naronchen "+27/-0 (#5901 )")
|
|
85
|
+
- <img src="https://avatars.githubusercontent.com/u/47430686?v=4&s=18" alt="avatar" width="18"/> [shravan || श्रvan](https://github.com/shravan20 "+7/-3 (#6116 )")
|
|
86
|
+
- <img src="https://avatars.githubusercontent.com/u/145078271?v=4&s=18" alt="avatar" width="18"/> [Justin Dhillon](https://github.com/justindhillon "+0/-7 (#6312 )")
|
|
87
|
+
- <img src="https://avatars.githubusercontent.com/u/30925732?v=4&s=18" alt="avatar" width="18"/> [yionr](https://github.com/yionr "+5/-1 (#6129 )")
|
|
88
|
+
- <img src="https://avatars.githubusercontent.com/u/534166?v=4&s=18" alt="avatar" width="18"/> [Shin'ya Ueoka](https://github.com/ueokande "+3/-3 (#5935 )")
|
|
89
|
+
- <img src="https://avatars.githubusercontent.com/u/33569?v=4&s=18" alt="avatar" width="18"/> [Dan Dascalescu](https://github.com/dandv "+3/-3 (#5908 #6757 )")
|
|
90
|
+
- <img src="https://avatars.githubusercontent.com/u/16476523?v=4&s=18" alt="avatar" width="18"/> [Nitin Ramnani](https://github.com/NitinRamnani "+2/-2 (#5938 )")
|
|
91
|
+
- <img src="https://avatars.githubusercontent.com/u/152275799?v=4&s=18" alt="avatar" width="18"/> [Shay Molcho](https://github.com/shaymolcho "+2/-2 (#6770 )")
|
|
92
|
+
- <img src="https://avatars.githubusercontent.com/u/4814473?v=4&s=18" alt="avatar" width="18"/> [Jay](https://github.com/jasonsaayman "+0/-3 (#6732 )")
|
|
93
|
+
- fancy45daddy
|
|
94
|
+
- <img src="https://avatars.githubusercontent.com/u/127725897?v=4&s=18" alt="avatar" width="18"/> [Habip Akyol](https://github.com/habipakyol "+1/-1 (#6030 )")
|
|
95
|
+
- <img src="https://avatars.githubusercontent.com/u/54869395?v=4&s=18" alt="avatar" width="18"/> [Bailey Lissington](https://github.com/llamington "+1/-1 (#6771 )")
|
|
96
|
+
- <img src="https://avatars.githubusercontent.com/u/14969290?v=4&s=18" alt="avatar" width="18"/> [Bernardo da Eira Duarte](https://github.com/bernardoduarte "+1/-1 (#6480 )")
|
|
97
|
+
- <img src="https://avatars.githubusercontent.com/u/117800149?v=4&s=18" alt="avatar" width="18"/> [Shivam Batham](https://github.com/Shivam-Batham "+1/-1 (#5949 )")
|
|
98
|
+
- <img src="https://avatars.githubusercontent.com/u/67861627?v=4&s=18" alt="avatar" width="18"/> [Lipin Kariappa](https://github.com/lipinnnnn "+1/-1 (#5936 )")
|
|
99
|
+
|
|
3
100
|
## [1.7.9](https://github.com/axios/axios/compare/v1.7.8...v1.7.9) (2024-12-04)
|
|
4
101
|
|
|
5
102
|
|
|
@@ -3,8 +3,11 @@
|
|
|
3
3
|
</td><td align="center" width="33.333333333333336%"> <a href="https://www.principal.com/about-us?utm_source=axios&utm_medium=sponsorlist&utm_campaign=sponsorship" style="padding: 10px; display: inline-block"> <img width="133px" height="43px" src="https://axios-http.com/assets/sponsors/principal.svg" alt="Principal Financial Group"/> </a> <p align="center" title="We’re bound by one common purpose: to give you the financial tools, resources and information you need to live your best life.">We’re bound by one common purpose: to give you the financial tools, resources and information you ne...</p> <p align="center"> <a href="https://www.principal.com/about-us?utm_source=axios&utm_medium=readme_sponsorlist&utm_campaign=sponsorship"><b>www.principal.com</b></a> </p>
|
|
4
4
|
</td><td align="center" width="33.333333333333336%"> <a href="https://www.descope.com/?utm_source=axios&utm_medium=referral&utm_campaign=axios-oss-sponsorship" style="padding: 10px; display: inline-block"> <picture> <source width="200px" height="52px" media="(prefers-color-scheme: dark)" srcset="https://axios-http.com/assets/sponsors/descope_white.png"> <img width="200px" height="52px" src="https://axios-http.com/assets/sponsors/descope.png" alt="Descope"/> </picture> </a> <p align="center" title="Hi, we're Descope! We are building something in the authentication space for app developers and can’t wait to place it in your hands.">Hi, we're Descope! We are building something in the authentication space for app developers and...</p> <p align="center"> <a href="https://www.descope.com/?utm_source=axios&utm_medium=referral&utm_campaign=axios-oss-sponsorship"><b>Website</b></a> | <a href="https://docs.descope.com/?utm_source=axios&utm_medium=referral&utm_campaign=axios-oss-sponsorship"><b>Documentation</b></a> | <a href="https://www.descope.com/community?utm_source=axios&utm_medium=referral&utm_campaign=axios-oss-sponsorship"><b>Community</b></a> </p>
|
|
5
5
|
</td></tr><tr width="33.333333333333336%"><td align="center" width="33.333333333333336%"> <a href="https://buzzoid.com/buy-instagram-followers/?utm_source=axios&utm_medium=sponsorlist&utm_campaign=sponsorship" style="padding: 10px; display: inline-block"> <img width="62px" height="70px" src="https://axios-http.com/assets/sponsors/opencollective/buzzoid-buy-instagram-followers.png" alt="Buzzoid - Buy Instagram Followers"/> </a> <p align="center" title="At Buzzoid, you can buy Instagram followers quickly, safely, and easily with just a few clicks. Rated world's #1 IG service since 2012.">At Buzzoid, you can buy Instagram followers quickly, safely, and easily with just a few clicks. Rate...</p> <p align="center"> <a href="https://buzzoid.com/buy-instagram-followers/?utm_source=axios&utm_medium=readme_sponsorlist&utm_campaign=sponsorship"><b>buzzoid.com</b></a> </p>
|
|
6
|
-
</td><td align="center" width="33.333333333333336%"> <a href="https://www.famety.com
|
|
6
|
+
</td><td align="center" width="33.333333333333336%"> <a href="https://www.famety.com/?utm_source=axios&utm_medium=sponsorlist&utm_campaign=sponsorship" style="padding: 10px; display: inline-block"> <img width="70px" height="70px" src="https://axios-http.com/assets/sponsors/opencollective/famety-buy-instagram-followers.png" alt="Famety - Buy Instagram Followers"/> </a> <p align="center" title="At Famety, you can grow your social media following quickly, safely, and easily with just a few clicks. Rated the world’s #1 social media service since 2013.">At Famety, you can grow your social media following quickly, safely, and easily with just a few clic...</p> <p align="center"> <a href="https://www.famety.com/?utm_source=axios&utm_medium=readme_sponsorlist&utm_campaign=sponsorship"><b>www.famety.com</b></a> </p>
|
|
7
7
|
</td><td align="center" width="33.333333333333336%"> <a href="https://poprey.com/?utm_source=axios&utm_medium=sponsorlist&utm_campaign=sponsorship" style="padding: 10px; display: inline-block"> <img width="70px" height="70px" src="https://axios-http.com/assets/sponsors/opencollective/instagram-likes.png" alt="Poprey - Buy Instagram Likes"/> </a> <p align="center" title="Buy Instagram Likes">Buy Instagram Likes</p> <p align="center"> <a href="https://poprey.com/?utm_source=axios&utm_medium=readme_sponsorlist&utm_campaign=sponsorship"><b>poprey.com</b></a> </p>
|
|
8
|
+
</td></tr><tr width="33.333333333333336%"><td align="center" width="33.333333333333336%"> <a href="https://musicza.co.za/?utm_source=axios&utm_medium=sponsorlist&utm_campaign=sponsorship" style="padding: 10px; display: inline-block"> <img width="124px" height="52px" src="https://axios-http.com/assets/sponsors/opencollective/musicza.png" alt="Tubidy"/> </a> <p align="center" title="Tubidy: Free Music and Video Downloads | MP3, MP4">Tubidy: Free Music and Video Downloads | MP3, MP4</p> <p align="center"> <a href="https://musicza.co.za/?utm_source=axios&utm_medium=readme_sponsorlist&utm_campaign=sponsorship"><b>musicza.co.za</b></a> </p>
|
|
9
|
+
</td><td align="center" width="33.333333333333336%"> <a href="https://ssmarket.net/buy-youtube-subscribers?utm_source=axios&utm_medium=sponsorlist&utm_campaign=sponsorship" style="padding: 10px; display: inline-block"> <img width="70px" height="70px" src="https://axios-http.com/assets/sponsors/opencollective/youtube-subscribers-ssmarket.png" alt="Buy Youtube Subscribers"/> </a> <p align="center" title="SS Market offers professional social media services that rapidly increase your YouTube subscriber count, elevating your channel to a powerful position.">SS Market offers professional social media services that rapidly increase your YouTube subscriber co...</p> <p align="center"> <a href="https://ssmarket.net/buy-youtube-subscribers?utm_source=axios&utm_medium=readme_sponsorlist&utm_campaign=sponsorship"><b>ssmarket.net</b></a> </p>
|
|
10
|
+
</td><td align="center" width="33.333333333333336%"> <a href="https://twicsy.com/buy-instagram-followers?utm_source=axios&utm_medium=sponsorlist&utm_campaign=sponsorship" style="padding: 10px; display: inline-block"> <img width="85px" height="70px" src="https://axios-http.com/assets/sponsors/opencollective/buy-instagram-followers-twicsy.png" alt="Buy Instagram Followers Twicsy"/> </a> <p align="center" title="Buy real Instagram followers from Twicsy starting at only $2.97. Twicsy has been voted the best site to buy followers from the likes of US Magazine.">Buy real Instagram followers from Twicsy starting at only $2.97. Twicsy has been voted the best site...</p> <p align="center"> <a href="https://twicsy.com/buy-instagram-followers?utm_source=axios&utm_medium=readme_sponsorlist&utm_campaign=sponsorship"><b>twicsy.com</b></a> </p>
|
|
8
11
|
</td></tr><tr width="33.333333333333336%"><td align="center" width="33.333333333333336%"> <a href="https://opencollective.com/axios/contribute">💜 Become a sponsor</a>
|
|
9
12
|
</td><td align="center" width="33.333333333333336%"> <a href="https://opencollective.com/axios/contribute">💜 Become a sponsor</a>
|
|
10
13
|
</td><td align="center" width="33.333333333333336%"> <a href="https://opencollective.com/axios/contribute">💜 Become a sponsor</a>
|
|
@@ -135,6 +138,12 @@ Using pnpm:
|
|
|
135
138
|
$ pnpm add axios
|
|
136
139
|
```
|
|
137
140
|
|
|
141
|
+
Using bun:
|
|
142
|
+
|
|
143
|
+
```bash
|
|
144
|
+
$ bun add axios
|
|
145
|
+
```
|
|
146
|
+
|
|
138
147
|
Once the package is installed, you can import the library using `import` or `require` approach:
|
|
139
148
|
|
|
140
149
|
```js
|
|
@@ -157,7 +166,7 @@ const axios = require('axios');
|
|
|
157
166
|
console.log(axios.isCancel('something'));
|
|
158
167
|
```
|
|
159
168
|
|
|
160
|
-
For some bundlers and some ES6
|
|
169
|
+
For some bundlers and some ES6 linters you may need to do the following:
|
|
161
170
|
|
|
162
171
|
```js
|
|
163
172
|
import { default as axios } from 'axios';
|
|
@@ -372,11 +381,16 @@ These are the available config options for making requests. Only the `url` is re
|
|
|
372
381
|
// `method` is the request method to be used when making the request
|
|
373
382
|
method: 'get', // default
|
|
374
383
|
|
|
375
|
-
// `baseURL` will be prepended to `url` unless `url` is absolute.
|
|
384
|
+
// `baseURL` will be prepended to `url` unless `url` is absolute and option `allowAbsoluteUrls` is set to true.
|
|
376
385
|
// It can be convenient to set `baseURL` for an instance of axios to pass relative URLs
|
|
377
386
|
// to methods of that instance.
|
|
378
387
|
baseURL: 'https://some-domain.com/api/',
|
|
379
388
|
|
|
389
|
+
// `allowAbsoluteUrls` determines whether or not absolute URLs will override a configured `baseUrl`.
|
|
390
|
+
// When set to true (default), absolute values for `url` will override `baseUrl`.
|
|
391
|
+
// When set to false, absolute values for `url` will always be prepended by `baseUrl`.
|
|
392
|
+
allowAbsoluteUrls: true,
|
|
393
|
+
|
|
380
394
|
// `transformRequest` allows changes to the request data before it is sent to the server
|
|
381
395
|
// This is only applicable for request methods 'PUT', 'POST', 'PATCH' and 'DELETE'
|
|
382
396
|
// The last function in the array must return a string or an instance of Buffer, ArrayBuffer,
|
|
@@ -408,13 +422,13 @@ These are the available config options for making requests. Only the `url` is re
|
|
|
408
422
|
// `paramsSerializer` is an optional config that allows you to customize serializing `params`.
|
|
409
423
|
paramsSerializer: {
|
|
410
424
|
|
|
411
|
-
//Custom encoder function which sends key/value pairs in an iterative fashion.
|
|
425
|
+
// Custom encoder function which sends key/value pairs in an iterative fashion.
|
|
412
426
|
encode?: (param: string): string => { /* Do custom operations here and return transformed string */ },
|
|
413
427
|
|
|
414
428
|
// Custom serializer function for the entire parameter. Allows user to mimic pre 1.x behaviour.
|
|
415
429
|
serialize?: (params: Record<string, any>, options?: ParamsSerializerOptions ),
|
|
416
430
|
|
|
417
|
-
//Configuration for formatting array indexes in the params.
|
|
431
|
+
// Configuration for formatting array indexes in the params.
|
|
418
432
|
indexes: false // Three available options: (1) indexes: null (leads to no brackets), (2) (default) indexes: false (leads to empty brackets), (3) indexes: true (leads to brackets with indexes).
|
|
419
433
|
},
|
|
420
434
|
|
|
@@ -448,7 +462,7 @@ These are the available config options for making requests. Only the `url` is re
|
|
|
448
462
|
},
|
|
449
463
|
// Also, you can set the name of the built-in adapter, or provide an array with their names
|
|
450
464
|
// to choose the first available in the environment
|
|
451
|
-
adapter: 'xhr' // 'fetch' | 'http' | ['xhr', 'http', 'fetch']
|
|
465
|
+
adapter: 'xhr', // 'fetch' | 'http' | ['xhr', 'http', 'fetch']
|
|
452
466
|
|
|
453
467
|
// `auth` indicates that HTTP Basic auth should be used, and supplies credentials.
|
|
454
468
|
// This will set an `Authorization` header, overwriting any existing
|
|
@@ -528,7 +542,11 @@ These are the available config options for making requests. Only the `url` is re
|
|
|
528
542
|
// If both are specified, `socketPath` is used.
|
|
529
543
|
socketPath: null, // default
|
|
530
544
|
|
|
531
|
-
// `transport` determines the transport method that will be used to make the request.
|
|
545
|
+
// `transport` determines the transport method that will be used to make the request.
|
|
546
|
+
// If defined, it will be used. Otherwise, if `maxRedirects` is 0,
|
|
547
|
+
// the default `http` or `https` library will be used, depending on the protocol specified in `protocol`.
|
|
548
|
+
// Otherwise, the `httpFollow` or `httpsFollow` library will be used, again depending on the protocol,
|
|
549
|
+
// which can handle redirects.
|
|
532
550
|
transport: undefined, // default
|
|
533
551
|
|
|
534
552
|
// `httpAgent` and `httpsAgent` define a custom agent to be used when performing http
|
|
@@ -690,7 +708,7 @@ instance.defaults.headers.common['Authorization'] = AUTH_TOKEN;
|
|
|
690
708
|
|
|
691
709
|
### Config order of precedence
|
|
692
710
|
|
|
693
|
-
Config will be merged with an order of precedence. The order is library defaults found in [lib/defaults.js](https://github.com/axios/axios/blob/
|
|
711
|
+
Config will be merged with an order of precedence. The order is library defaults found in [lib/defaults/index.js](https://github.com/axios/axios/blob/main/lib/defaults/index.js#L49), then `defaults` property of the instance, and finally `config` argument for the request. The latter will take precedence over the former. Here's an example.
|
|
694
712
|
|
|
695
713
|
```js
|
|
696
714
|
// Create an instance using the config defaults provided by the library
|
|
@@ -712,8 +730,11 @@ instance.get('/longRequest', {
|
|
|
712
730
|
You can intercept requests or responses before they are handled by `then` or `catch`.
|
|
713
731
|
|
|
714
732
|
```js
|
|
733
|
+
|
|
734
|
+
const instance = axios.create();
|
|
735
|
+
|
|
715
736
|
// Add a request interceptor
|
|
716
|
-
|
|
737
|
+
instance.interceptors.request.use(function (config) {
|
|
717
738
|
// Do something before request is sent
|
|
718
739
|
return config;
|
|
719
740
|
}, function (error) {
|
|
@@ -722,7 +743,7 @@ axios.interceptors.request.use(function (config) {
|
|
|
722
743
|
});
|
|
723
744
|
|
|
724
745
|
// Add a response interceptor
|
|
725
|
-
|
|
746
|
+
instance.interceptors.response.use(function (response) {
|
|
726
747
|
// Any status code that lie within the range of 2xx cause this function to trigger
|
|
727
748
|
// Do something with response data
|
|
728
749
|
return response;
|
|
@@ -736,7 +757,8 @@ axios.interceptors.response.use(function (response) {
|
|
|
736
757
|
If you need to remove an interceptor later you can.
|
|
737
758
|
|
|
738
759
|
```js
|
|
739
|
-
const
|
|
760
|
+
const instance = axios.create();
|
|
761
|
+
const myInterceptor = instance.interceptors.request.use(function () {/*...*/});
|
|
740
762
|
axios.interceptors.request.eject(myInterceptor);
|
|
741
763
|
```
|
|
742
764
|
|
|
@@ -815,7 +837,7 @@ The general structure of axios errors is as follows:
|
|
|
815
837
|
| code | Represents an axios identified error. The table below lists out specific definitions for internal axios error. |
|
|
816
838
|
| status | HTTP response status code. See [here](https://en.wikipedia.org/wiki/List_of_HTTP_status_codes) for common HTTP response status code meanings.
|
|
817
839
|
|
|
818
|
-
Below is a list of potential axios identified error
|
|
840
|
+
Below is a list of potential axios identified error:
|
|
819
841
|
| Code | Definition |
|
|
820
842
|
| -------- | ---------- |
|
|
821
843
|
| ERR_BAD_OPTION_VALUE | Invalid or unsupported value provided in axios configuration. |
|
|
@@ -1126,7 +1148,7 @@ to a `FormData` object by following custom rules.
|
|
|
1126
1148
|
- `metaTokens: boolean = true` - add the special ending (e.g `user{}: '{"name": "John"}'`) in the FormData key.
|
|
1127
1149
|
The back-end body-parser could potentially use this meta-information to automatically parse the value as JSON.
|
|
1128
1150
|
|
|
1129
|
-
- `indexes: null|false|true = false` - controls how indexes will be added to unwrapped keys of `flat` array-like objects
|
|
1151
|
+
- `indexes: null|false|true = false` - controls how indexes will be added to unwrapped keys of `flat` array-like objects.
|
|
1130
1152
|
|
|
1131
1153
|
- `null` - don't add brackets (`arr: 1`, `arr: 2`, `arr: 3`)
|
|
1132
1154
|
- `false`(default) - add empty brackets (`arr[]: 1`, `arr[]: 2`, `arr[]: 3`)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
/*! Axios v1.8.4 Copyright (c) 2025 Matt Zabriskie and contributors */
|
|
2
2
|
(function (global, factory) {
|
|
3
3
|
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
|
|
4
4
|
typeof define === 'function' && define.amd ? define(factory) :
|
|
@@ -1266,23 +1266,6 @@
|
|
|
1266
1266
|
var toFiniteNumber = function toFiniteNumber(value, defaultValue) {
|
|
1267
1267
|
return value != null && Number.isFinite(value = +value) ? value : defaultValue;
|
|
1268
1268
|
};
|
|
1269
|
-
var ALPHA = 'abcdefghijklmnopqrstuvwxyz';
|
|
1270
|
-
var DIGIT = '0123456789';
|
|
1271
|
-
var ALPHABET = {
|
|
1272
|
-
DIGIT: DIGIT,
|
|
1273
|
-
ALPHA: ALPHA,
|
|
1274
|
-
ALPHA_DIGIT: ALPHA + ALPHA.toUpperCase() + DIGIT
|
|
1275
|
-
};
|
|
1276
|
-
var generateString = function generateString() {
|
|
1277
|
-
var size = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 16;
|
|
1278
|
-
var alphabet = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : ALPHABET.ALPHA_DIGIT;
|
|
1279
|
-
var str = '';
|
|
1280
|
-
var length = alphabet.length;
|
|
1281
|
-
while (size--) {
|
|
1282
|
-
str += alphabet[Math.random() * length | 0];
|
|
1283
|
-
}
|
|
1284
|
-
return str;
|
|
1285
|
-
};
|
|
1286
1269
|
|
|
1287
1270
|
/**
|
|
1288
1271
|
* If the thing is a FormData object, return true, otherwise return false.
|
|
@@ -1399,8 +1382,6 @@
|
|
|
1399
1382
|
findKey: findKey,
|
|
1400
1383
|
global: _global,
|
|
1401
1384
|
isContextDefined: isContextDefined,
|
|
1402
|
-
ALPHABET: ALPHABET,
|
|
1403
|
-
generateString: generateString,
|
|
1404
1385
|
isSpecCompliantForm: isSpecCompliantForm,
|
|
1405
1386
|
toJSONObject: toJSONObject,
|
|
1406
1387
|
isAsyncFn: isAsyncFn,
|
|
@@ -2720,8 +2701,9 @@
|
|
|
2720
2701
|
*
|
|
2721
2702
|
* @returns {string} The combined full path
|
|
2722
2703
|
*/
|
|
2723
|
-
function buildFullPath(baseURL, requestedURL) {
|
|
2724
|
-
|
|
2704
|
+
function buildFullPath(baseURL, requestedURL, allowAbsoluteUrls) {
|
|
2705
|
+
var isRelativeUrl = !isAbsoluteURL(requestedURL);
|
|
2706
|
+
if (baseURL && (isRelativeUrl || allowAbsoluteUrls == false)) {
|
|
2725
2707
|
return combineURLs(baseURL, requestedURL);
|
|
2726
2708
|
}
|
|
2727
2709
|
return requestedURL;
|
|
@@ -2840,7 +2822,7 @@
|
|
|
2840
2822
|
headers = newConfig.headers,
|
|
2841
2823
|
auth = newConfig.auth;
|
|
2842
2824
|
newConfig.headers = headers = AxiosHeaders$1.from(headers);
|
|
2843
|
-
newConfig.url = buildURL(buildFullPath(newConfig.baseURL, newConfig.url), config.params, config.paramsSerializer);
|
|
2825
|
+
newConfig.url = buildURL(buildFullPath(newConfig.baseURL, newConfig.url, newConfig.allowAbsoluteUrls), config.params, config.paramsSerializer);
|
|
2844
2826
|
|
|
2845
2827
|
// HTTP basic authentication
|
|
2846
2828
|
if (auth) {
|
|
@@ -3676,7 +3658,7 @@
|
|
|
3676
3658
|
});
|
|
3677
3659
|
}
|
|
3678
3660
|
|
|
3679
|
-
var VERSION = "1.
|
|
3661
|
+
var VERSION = "1.8.4";
|
|
3680
3662
|
|
|
3681
3663
|
var validators$1 = {};
|
|
3682
3664
|
|
|
@@ -3867,6 +3849,13 @@
|
|
|
3867
3849
|
}, true);
|
|
3868
3850
|
}
|
|
3869
3851
|
}
|
|
3852
|
+
|
|
3853
|
+
// Set config.allowAbsoluteUrls
|
|
3854
|
+
if (config.allowAbsoluteUrls !== undefined) ; else if (this.defaults.allowAbsoluteUrls !== undefined) {
|
|
3855
|
+
config.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls;
|
|
3856
|
+
} else {
|
|
3857
|
+
config.allowAbsoluteUrls = true;
|
|
3858
|
+
}
|
|
3870
3859
|
validator.assertOptions(config, {
|
|
3871
3860
|
baseUrl: validators.spelling('baseURL'),
|
|
3872
3861
|
withXsrfToken: validators.spelling('withXSRFToken')
|
|
@@ -3939,7 +3928,7 @@
|
|
|
3939
3928
|
key: "getUri",
|
|
3940
3929
|
value: function getUri(config) {
|
|
3941
3930
|
config = mergeConfig(this.defaults, config);
|
|
3942
|
-
var fullPath = buildFullPath(config.baseURL, config.url);
|
|
3931
|
+
var fullPath = buildFullPath(config.baseURL, config.url, config.allowAbsoluteUrls);
|
|
3943
3932
|
return buildURL(fullPath, config.params, config.paramsSerializer);
|
|
3944
3933
|
}
|
|
3945
3934
|
}]);
|