node-red-contrib-tak-registration 0.8.0 → 0.8.3

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.
Files changed (75) hide show
  1. package/README.md +2 -0
  2. package/node_modules/@types/node/README.md +1 -1
  3. package/node_modules/@types/node/child_process.d.ts +5 -0
  4. package/node_modules/@types/node/dgram.d.ts +5 -0
  5. package/node_modules/@types/node/events.d.ts +35 -0
  6. package/node_modules/@types/node/fs/promises.d.ts +5 -0
  7. package/node_modules/@types/node/fs.d.ts +43 -5
  8. package/node_modules/@types/node/globals.d.ts +22 -0
  9. package/node_modules/@types/node/index.d.ts +1 -1
  10. package/node_modules/@types/node/inspector.d.ts +1 -1
  11. package/node_modules/@types/node/module.d.ts +103 -0
  12. package/node_modules/@types/node/net.d.ts +5 -0
  13. package/node_modules/@types/node/package.json +2 -2
  14. package/node_modules/@types/node/stream.d.ts +143 -0
  15. package/node_modules/@types/node/test.d.ts +33 -4
  16. package/node_modules/@types/node/timers.d.ts +12 -2
  17. package/node_modules/@types/node/ts4.8/child_process.d.ts +5 -0
  18. package/node_modules/@types/node/ts4.8/dgram.d.ts +5 -0
  19. package/node_modules/@types/node/ts4.8/events.d.ts +35 -0
  20. package/node_modules/@types/node/ts4.8/fs/promises.d.ts +5 -0
  21. package/node_modules/@types/node/ts4.8/fs.d.ts +43 -5
  22. package/node_modules/@types/node/ts4.8/globals.d.ts +22 -0
  23. package/node_modules/@types/node/ts4.8/inspector.d.ts +1 -1
  24. package/node_modules/@types/node/ts4.8/module.d.ts +103 -0
  25. package/node_modules/@types/node/ts4.8/net.d.ts +5 -0
  26. package/node_modules/@types/node/ts4.8/stream.d.ts +762 -728
  27. package/node_modules/@types/node/ts4.8/test.d.ts +97 -50
  28. package/node_modules/@types/node/ts4.8/timers.d.ts +12 -2
  29. package/node_modules/@types/node/ts4.8/vm.d.ts +2 -1
  30. package/node_modules/@types/node/vm.d.ts +2 -1
  31. package/node_modules/axios/CHANGELOG.md +23 -0
  32. package/node_modules/axios/README.md +33 -5
  33. package/node_modules/axios/dist/axios.js +26 -18
  34. package/node_modules/axios/dist/axios.js.map +1 -1
  35. package/node_modules/axios/dist/axios.min.js +1 -1
  36. package/node_modules/axios/dist/axios.min.js.map +1 -1
  37. package/node_modules/axios/dist/browser/axios.cjs +24 -20
  38. package/node_modules/axios/dist/browser/axios.cjs.map +1 -1
  39. package/node_modules/axios/dist/esm/axios.js +26 -21
  40. package/node_modules/axios/dist/esm/axios.js.map +1 -1
  41. package/node_modules/axios/dist/esm/axios.min.js +1 -1
  42. package/node_modules/axios/dist/esm/axios.min.js.map +1 -1
  43. package/node_modules/axios/dist/node/axios.cjs +27 -21
  44. package/node_modules/axios/dist/node/axios.cjs.map +1 -1
  45. package/node_modules/axios/index.d.cts +1 -0
  46. package/node_modules/axios/index.d.ts +3 -0
  47. package/node_modules/axios/index.js +2 -0
  48. package/node_modules/axios/lib/adapters/http.js +3 -1
  49. package/node_modules/axios/lib/axios.js +3 -0
  50. package/node_modules/axios/lib/core/Axios.js +2 -4
  51. package/node_modules/axios/lib/core/AxiosHeaders.js +11 -1
  52. package/node_modules/axios/lib/defaults/index.js +4 -11
  53. package/node_modules/axios/lib/env/data.js +1 -1
  54. package/node_modules/axios/lib/utils.js +3 -2
  55. package/node_modules/axios/package.json +3 -1
  56. package/node_modules/protobufjs/dist/light/protobuf.js +24 -13
  57. package/node_modules/protobufjs/dist/light/protobuf.js.map +1 -1
  58. package/node_modules/protobufjs/dist/light/protobuf.min.js +3 -3
  59. package/node_modules/protobufjs/dist/light/protobuf.min.js.map +1 -1
  60. package/node_modules/protobufjs/dist/minimal/protobuf.js +12 -7
  61. package/node_modules/protobufjs/dist/minimal/protobuf.js.map +1 -1
  62. package/node_modules/protobufjs/dist/minimal/protobuf.min.js +3 -3
  63. package/node_modules/protobufjs/dist/minimal/protobuf.min.js.map +1 -1
  64. package/node_modules/protobufjs/dist/protobuf.js +40 -18
  65. package/node_modules/protobufjs/dist/protobuf.js.map +1 -1
  66. package/node_modules/protobufjs/dist/protobuf.min.js +3 -3
  67. package/node_modules/protobufjs/dist/protobuf.min.js.map +1 -1
  68. package/node_modules/protobufjs/package.json +1 -1
  69. package/node_modules/protobufjs/src/converter.js +2 -2
  70. package/node_modules/protobufjs/src/parse.js +4 -1
  71. package/node_modules/protobufjs/src/reader.js +8 -3
  72. package/node_modules/protobufjs/src/tokenize.js +2 -4
  73. package/package.json +3 -3
  74. package/tak-ingest.js +1 -1
  75. package/tak-registration.js +14 -5
@@ -162,33 +162,33 @@ declare module 'node:test' {
162
162
  * @param [fn='A no-op function'] The function under suite declaring all subtests and subsuites. The first argument to this function is a {@link SuiteContext} object.
163
163
  * @return Immediately fulfilled with `undefined`.
164
164
  */
165
- function describe(name?: string, options?: TestOptions, fn?: SuiteFn): void;
166
- function describe(name?: string, fn?: SuiteFn): void;
167
- function describe(options?: TestOptions, fn?: SuiteFn): void;
168
- function describe(fn?: SuiteFn): void;
165
+ function describe(name?: string, options?: TestOptions, fn?: SuiteFn): Promise<void>;
166
+ function describe(name?: string, fn?: SuiteFn): Promise<void>;
167
+ function describe(options?: TestOptions, fn?: SuiteFn): Promise<void>;
168
+ function describe(fn?: SuiteFn): Promise<void>;
169
169
  namespace describe {
170
170
  /**
171
171
  * Shorthand for skipping a suite, same as `describe([name], { skip: true }[, fn])`.
172
172
  */
173
- function skip(name?: string, options?: TestOptions, fn?: SuiteFn): void;
174
- function skip(name?: string, fn?: SuiteFn): void;
175
- function skip(options?: TestOptions, fn?: SuiteFn): void;
176
- function skip(fn?: SuiteFn): void;
173
+ function skip(name?: string, options?: TestOptions, fn?: SuiteFn): Promise<void>;
174
+ function skip(name?: string, fn?: SuiteFn): Promise<void>;
175
+ function skip(options?: TestOptions, fn?: SuiteFn): Promise<void>;
176
+ function skip(fn?: SuiteFn): Promise<void>;
177
177
  /**
178
178
  * Shorthand for marking a suite as `TODO`, same as `describe([name], { todo: true }[, fn])`.
179
179
  */
180
- function todo(name?: string, options?: TestOptions, fn?: SuiteFn): void;
181
- function todo(name?: string, fn?: SuiteFn): void;
182
- function todo(options?: TestOptions, fn?: SuiteFn): void;
183
- function todo(fn?: SuiteFn): void;
180
+ function todo(name?: string, options?: TestOptions, fn?: SuiteFn): Promise<void>;
181
+ function todo(name?: string, fn?: SuiteFn): Promise<void>;
182
+ function todo(options?: TestOptions, fn?: SuiteFn): Promise<void>;
183
+ function todo(fn?: SuiteFn): Promise<void>;
184
184
  /**
185
185
  * Shorthand for marking a suite as `only`, same as `describe([name], { only: true }[, fn])`.
186
186
  * @since v18.15.0
187
187
  */
188
- function only(name?: string, options?: TestOptions, fn?: SuiteFn): void;
189
- function only(name?: string, fn?: SuiteFn): void;
190
- function only(options?: TestOptions, fn?: SuiteFn): void;
191
- function only(fn?: SuiteFn): void;
188
+ function only(name?: string, options?: TestOptions, fn?: SuiteFn): Promise<void>;
189
+ function only(name?: string, fn?: SuiteFn): Promise<void>;
190
+ function only(options?: TestOptions, fn?: SuiteFn): Promise<void>;
191
+ function only(fn?: SuiteFn): Promise<void>;
192
192
  }
193
193
  /**
194
194
  * Shorthand for `test()`.
@@ -196,69 +196,78 @@ declare module 'node:test' {
196
196
  * The `it()` function is imported from the `node:test` module.
197
197
  * @since v18.6.0, v16.17.0
198
198
  */
199
- function it(name?: string, options?: TestOptions, fn?: TestFn): void;
200
- function it(name?: string, fn?: TestFn): void;
201
- function it(options?: TestOptions, fn?: TestFn): void;
202
- function it(fn?: TestFn): void;
199
+ function it(name?: string, options?: TestOptions, fn?: TestFn): Promise<void>;
200
+ function it(name?: string, fn?: TestFn): Promise<void>;
201
+ function it(options?: TestOptions, fn?: TestFn): Promise<void>;
202
+ function it(fn?: TestFn): Promise<void>;
203
203
  namespace it {
204
204
  /**
205
205
  * Shorthand for skipping a test, same as `it([name], { skip: true }[, fn])`.
206
206
  */
207
- function skip(name?: string, options?: TestOptions, fn?: TestFn): void;
208
- function skip(name?: string, fn?: TestFn): void;
209
- function skip(options?: TestOptions, fn?: TestFn): void;
210
- function skip(fn?: TestFn): void;
207
+ function skip(name?: string, options?: TestOptions, fn?: TestFn): Promise<void>;
208
+ function skip(name?: string, fn?: TestFn): Promise<void>;
209
+ function skip(options?: TestOptions, fn?: TestFn): Promise<void>;
210
+ function skip(fn?: TestFn): Promise<void>;
211
211
  /**
212
212
  * Shorthand for marking a test as `TODO`, same as `it([name], { todo: true }[, fn])`.
213
213
  */
214
- function todo(name?: string, options?: TestOptions, fn?: TestFn): void;
215
- function todo(name?: string, fn?: TestFn): void;
216
- function todo(options?: TestOptions, fn?: TestFn): void;
217
- function todo(fn?: TestFn): void;
214
+ function todo(name?: string, options?: TestOptions, fn?: TestFn): Promise<void>;
215
+ function todo(name?: string, fn?: TestFn): Promise<void>;
216
+ function todo(options?: TestOptions, fn?: TestFn): Promise<void>;
217
+ function todo(fn?: TestFn): Promise<void>;
218
218
  /**
219
219
  * Shorthand for marking a test as `only`, same as `it([name], { only: true }[, fn])`.
220
220
  * @since v18.15.0
221
221
  */
222
- function only(name?: string, options?: TestOptions, fn?: TestFn): void;
223
- function only(name?: string, fn?: TestFn): void;
224
- function only(options?: TestOptions, fn?: TestFn): void;
225
- function only(fn?: TestFn): void;
222
+ function only(name?: string, options?: TestOptions, fn?: TestFn): Promise<void>;
223
+ function only(name?: string, fn?: TestFn): Promise<void>;
224
+ function only(options?: TestOptions, fn?: TestFn): Promise<void>;
225
+ function only(fn?: TestFn): Promise<void>;
226
226
  }
227
227
  /**
228
228
  * Shorthand for skipping a test, same as `test([name], { skip: true }[, fn])`.
229
229
  * @since v20.2.0
230
230
  */
231
- function skip(name?: string, options?: TestOptions, fn?: TestFn): void;
232
- function skip(name?: string, fn?: TestFn): void;
233
- function skip(options?: TestOptions, fn?: TestFn): void;
234
- function skip(fn?: TestFn): void;
231
+ function skip(name?: string, options?: TestOptions, fn?: TestFn): Promise<void>;
232
+ function skip(name?: string, fn?: TestFn): Promise<void>;
233
+ function skip(options?: TestOptions, fn?: TestFn): Promise<void>;
234
+ function skip(fn?: TestFn): Promise<void>;
235
235
  /**
236
236
  * Shorthand for marking a test as `TODO`, same as `test([name], { todo: true }[, fn])`.
237
237
  * @since v20.2.0
238
238
  */
239
- function todo(name?: string, options?: TestOptions, fn?: TestFn): void;
240
- function todo(name?: string, fn?: TestFn): void;
241
- function todo(options?: TestOptions, fn?: TestFn): void;
242
- function todo(fn?: TestFn): void;
239
+ function todo(name?: string, options?: TestOptions, fn?: TestFn): Promise<void>;
240
+ function todo(name?: string, fn?: TestFn): Promise<void>;
241
+ function todo(options?: TestOptions, fn?: TestFn): Promise<void>;
242
+ function todo(fn?: TestFn): Promise<void>;
243
243
  /**
244
244
  * Shorthand for marking a test as `only`, same as `test([name], { only: true }[, fn])`.
245
245
  * @since v20.2.0
246
246
  */
247
- function only(name?: string, options?: TestOptions, fn?: TestFn): void;
248
- function only(name?: string, fn?: TestFn): void;
249
- function only(options?: TestOptions, fn?: TestFn): void;
250
- function only(fn?: TestFn): void;
247
+ function only(name?: string, options?: TestOptions, fn?: TestFn): Promise<void>;
248
+ function only(name?: string, fn?: TestFn): Promise<void>;
249
+ function only(options?: TestOptions, fn?: TestFn): Promise<void>;
250
+ function only(fn?: TestFn): Promise<void>;
251
251
  /**
252
252
  * The type of a function under test. The first argument to this function is a
253
253
  * {@link TestContext} object. If the test uses callbacks, the callback function is passed as
254
254
  * the second argument.
255
255
  */
256
- type TestFn = (t: TestContext, done: (result?: any) => void) => any;
256
+ type TestFn = (t: TestContext, done: (result?: any) => void) => void | Promise<void>;
257
257
  /**
258
258
  * The type of a function under Suite.
259
- * If the test uses callbacks, the callback function is passed as an argument
260
259
  */
261
- type SuiteFn = (done: (result?: any) => void) => void;
260
+ type SuiteFn = (s: SuiteContext) => void | Promise<void>;
261
+ interface TestShard {
262
+ /**
263
+ * A positive integer between 1 and `<total>` that specifies the index of the shard to run.
264
+ */
265
+ index: number;
266
+ /**
267
+ * A positive integer that specifies the total number of shards to split the test files to.
268
+ */
269
+ total: number;
270
+ }
262
271
  interface RunOptions {
263
272
  /**
264
273
  * If a number is provided, then that many files would run in parallel.
@@ -301,9 +310,15 @@ declare module 'node:test' {
301
310
  */
302
311
  setup?: (root: unknown) => void | Promise<void>;
303
312
  /**
304
- * Whether to run in watch mode or not. Default: false.
313
+ * Whether to run in watch mode or not.
314
+ * @default false
315
+ */
316
+ watch?: boolean | undefined;
317
+ /**
318
+ * Running tests in a specific shard.
319
+ * @default undefined
305
320
  */
306
- watch?: boolean;
321
+ shard?: TestShard | undefined;
307
322
  }
308
323
  class Test extends AsyncResource {
309
324
  concurrency: number;
@@ -504,6 +519,24 @@ declare module 'node:test' {
504
519
  */
505
520
  readonly mock: MockTracker;
506
521
  }
522
+ /**
523
+ * An instance of `SuiteContext` is passed to each suite function in order to
524
+ * interact with the test runner. However, the `SuiteContext` constructor is not
525
+ * exposed as part of the API.
526
+ * @since v18.7.0, v16.17.0
527
+ */
528
+ class SuiteContext {
529
+ /**
530
+ * The name of the suite.
531
+ * @since v18.8.0, v16.18.0
532
+ */
533
+ readonly name: string;
534
+ /**
535
+ * Can be used to abort test subtasks when the test has been aborted.
536
+ * @since v18.7.0, v16.17.0
537
+ */
538
+ readonly signal: AbortSignal;
539
+ }
507
540
  interface TestOptions {
508
541
  /**
509
542
  * If a number is provided, then that many tests would run in parallel.
@@ -615,7 +648,7 @@ declare module 'node:test' {
615
648
  * The hook function. If the hook uses callbacks, the callback function is passed as the
616
649
  * second argument.
617
650
  */
618
- type HookFn = (done: (result?: any) => void) => any;
651
+ type HookFn = (s: SuiteContext, done: (result?: any) => void) => any;
619
652
  /**
620
653
  * Configuration options for hooks.
621
654
  * @since v18.8.0
@@ -1192,6 +1225,10 @@ declare module 'node:test' {
1192
1225
  * @since v20.4.0
1193
1226
  */
1194
1227
  runAll(): void;
1228
+ /**
1229
+ * Calls {@link MockTimers.reset()}.
1230
+ */
1231
+ [Symbol.dispose](): void;
1195
1232
  }
1196
1233
  export { test as default, run, test, describe, it, before, after, beforeEach, afterEach, mock, skip, only, todo };
1197
1234
  }
@@ -1223,6 +1260,11 @@ interface TestFail {
1223
1260
  * The error thrown by the test.
1224
1261
  */
1225
1262
  error: Error;
1263
+ /**
1264
+ * The type of the test, used to denote whether this is a suite.
1265
+ * @since 20.0.0, 19.9.0, 18.17.0
1266
+ */
1267
+ type?: 'suite';
1226
1268
  };
1227
1269
  /**
1228
1270
  * The test name.
@@ -1258,6 +1300,11 @@ interface TestPass {
1258
1300
  * The duration of the test in milliseconds.
1259
1301
  */
1260
1302
  duration_ms: number;
1303
+ /**
1304
+ * The type of the test, used to denote whether this is a suite.
1305
+ * @since 20.0.0, 19.9.0, 18.17.0
1306
+ */
1307
+ type?: 'suite';
1261
1308
  };
1262
1309
  /**
1263
1310
  * The test name.
@@ -68,6 +68,11 @@ declare module 'timers' {
68
68
  */
69
69
  hasRef(): boolean;
70
70
  _onImmediate: Function; // to distinguish it from the Timeout class
71
+ /**
72
+ * Cancels the immediate. This is similar to calling `clearImmediate()`.
73
+ * @since v20.5.0
74
+ */
75
+ [Symbol.dispose](): void;
71
76
  }
72
77
  /**
73
78
  * This object is created internally and is returned from `setTimeout()` and `setInterval()`. It can be passed to either `clearTimeout()` or `clearInterval()` in order to cancel the
@@ -114,6 +119,11 @@ declare module 'timers' {
114
119
  */
115
120
  refresh(): this;
116
121
  [Symbol.toPrimitive](): number;
122
+ /**
123
+ * Cancels the timeout.
124
+ * @since v20.5.0
125
+ */
126
+ [Symbol.dispose](): void;
117
127
  }
118
128
  }
119
129
  /**
@@ -163,10 +173,10 @@ declare module 'timers' {
163
173
  * @param args Optional arguments to pass when the `callback` is called.
164
174
  * @return for use with {@link clearInterval}
165
175
  */
166
- function setInterval<TArgs extends any[]>(callback: (...args: TArgs) => void, ms?: number, ...args: TArgs): NodeJS.Timer;
176
+ function setInterval<TArgs extends any[]>(callback: (...args: TArgs) => void, ms?: number, ...args: TArgs): NodeJS.Timeout;
167
177
  // util.promisify no rest args compability
168
178
  // tslint:disable-next-line void-return
169
- function setInterval(callback: (args: void) => void, ms?: number): NodeJS.Timer;
179
+ function setInterval(callback: (args: void) => void, ms?: number): NodeJS.Timeout;
170
180
  namespace setInterval {
171
181
  const __promisify__: typeof setIntervalPromise;
172
182
  }
@@ -37,6 +37,7 @@
37
37
  * @see [source](https://github.com/nodejs/node/blob/v20.2.0/lib/vm.js)
38
38
  */
39
39
  declare module 'vm' {
40
+ import { ImportAssertions } from 'node:module';
40
41
  interface Context extends NodeJS.Dict<any> {}
41
42
  interface BaseOptions {
42
43
  /**
@@ -66,7 +67,7 @@ declare module 'vm' {
66
67
  * Called during evaluation of this module when `import()` is called.
67
68
  * If this option is not specified, calls to `import()` will reject with `ERR_VM_DYNAMIC_IMPORT_CALLBACK_MISSING`.
68
69
  */
69
- importModuleDynamically?: ((specifier: string, script: Script, importAssertions: Object) => Module) | undefined;
70
+ importModuleDynamically?: ((specifier: string, script: Script, importAssertions: ImportAssertions) => Module) | undefined;
70
71
  }
71
72
  interface RunningScriptOptions extends BaseOptions {
72
73
  /**
@@ -37,6 +37,7 @@
37
37
  * @see [source](https://github.com/nodejs/node/blob/v20.2.0/lib/vm.js)
38
38
  */
39
39
  declare module 'vm' {
40
+ import { ImportAssertions } from 'node:module';
40
41
  interface Context extends NodeJS.Dict<any> {}
41
42
  interface BaseOptions {
42
43
  /**
@@ -66,7 +67,7 @@ declare module 'vm' {
66
67
  * Called during evaluation of this module when `import()` is called.
67
68
  * If this option is not specified, calls to `import()` will reject with `ERR_VM_DYNAMIC_IMPORT_CALLBACK_MISSING`.
68
69
  */
69
- importModuleDynamically?: ((specifier: string, script: Script, importAssertions: Object) => Module) | undefined;
70
+ importModuleDynamically?: ((specifier: string, script: Script, importAssertions: ImportAssertions) => Module) | undefined;
70
71
  }
71
72
  interface RunningScriptOptions extends BaseOptions {
72
73
  /**
@@ -1,5 +1,28 @@
1
1
  # Changelog
2
2
 
3
+ # [1.5.0](https://github.com/axios/axios/compare/v1.4.0...v1.5.0) (2023-08-26)
4
+
5
+
6
+ ### Bug Fixes
7
+
8
+ * **adapter:** make adapter loading error more clear by using platform-specific adapters explicitly ([#5837](https://github.com/axios/axios/issues/5837)) ([9a414bb](https://github.com/axios/axios/commit/9a414bb6c81796a95c6c7fe668637825458e8b6d))
9
+ * **dns:** fixed `cacheable-lookup` integration; ([#5836](https://github.com/axios/axios/issues/5836)) ([b3e327d](https://github.com/axios/axios/commit/b3e327dcc9277bdce34c7ef57beedf644b00d628))
10
+ * **headers:** added support for setting header names that overlap with class methods; ([#5831](https://github.com/axios/axios/issues/5831)) ([d8b4ca0](https://github.com/axios/axios/commit/d8b4ca0ea5f2f05efa4edfe1e7684593f9f68273))
11
+ * **headers:** fixed common Content-Type header merging; ([#5832](https://github.com/axios/axios/issues/5832)) ([8fda276](https://github.com/axios/axios/commit/8fda2766b1e6bcb72c3fabc146223083ef13ce17))
12
+
13
+
14
+ ### Features
15
+
16
+ * export getAdapter function ([#5324](https://github.com/axios/axios/issues/5324)) ([ca73eb8](https://github.com/axios/axios/commit/ca73eb878df0ae2dace81fe3a7f1fb5986231bf1))
17
+ * **export:** export adapters without `unsafe` prefix ([#5839](https://github.com/axios/axios/issues/5839)) ([1601f4a](https://github.com/axios/axios/commit/1601f4a27a81ab47fea228f1e244b2c4e3ce28bf))
18
+
19
+ ### Contributors to this release
20
+
21
+ - <img src="https://avatars.githubusercontent.com/u/12586868?v&#x3D;4&amp;s&#x3D;18" alt="avatar" width="18"/> [Dmitriy Mozgovoy](https://github.com/DigitalBrainJS "+66/-29 (#5839 #5837 #5836 #5832 #5831 )")
22
+ - <img src="https://avatars.githubusercontent.com/u/102841186?v&#x3D;4&amp;s&#x3D;18" alt="avatar" width="18"/> [夜葬](https://github.com/geekact "+42/-0 (#5324 )")
23
+ - <img src="https://avatars.githubusercontent.com/u/65978976?v&#x3D;4&amp;s&#x3D;18" alt="avatar" width="18"/> [Jonathan Budiman](https://github.com/JBudiman00 "+30/-0 (#5788 )")
24
+ - <img src="https://avatars.githubusercontent.com/u/5492927?v&#x3D;4&amp;s&#x3D;18" alt="avatar" width="18"/> [Michael Di Prisco](https://github.com/Cadienvan "+3/-5 (#5791 )")
25
+
3
26
  # [1.4.0](https://github.com/axios/axios/compare/v1.3.6...v1.4.0) (2023-04-27)
4
27
 
5
28
 
@@ -215,7 +215,7 @@ async function getUser() {
215
215
  }
216
216
  ```
217
217
 
218
- > **Note** `async/await` is part of ECMAScript 2017 and is not supported in Internet
218
+ > **Note**: `async/await` is part of ECMAScript 2017 and is not supported in Internet
219
219
  > Explorer and older browsers, so use with caution.
220
220
 
221
221
  Performing a `POST` request
@@ -764,6 +764,36 @@ and when the response was fulfilled
764
764
 
765
765
  Read [the interceptor tests](./test/specs/interceptors.spec.js) for seeing all this in code.
766
766
 
767
+ ## Error Types
768
+
769
+ There are many different axios error messages that can appear that can provide basic information about the specifics of the error and where opportunities may lie in debugging.
770
+
771
+ The general structure of axios errors is as follows:
772
+ | Property | Definition |
773
+ | -------- | ---------- |
774
+ | message | A quick summary of the error message and the status it failed with. |
775
+ | name | This defines where the error originated from. For axios, it will always be an 'AxiosError'. |
776
+ | stack | Provides the stack trace of the error. |
777
+ | config | An axios config object with specific instance configurations defined by the user from when the request was made |
778
+ | code | Represents an axios identified error. The table below lists out specific definitions for internal axios error. |
779
+ | status | HTTP response status code. See [here](https://en.wikipedia.org/wiki/List_of_HTTP_status_codes) for common HTTP response status code meanings.
780
+
781
+ Below is a list of potential axios identified error
782
+ | Code | Definition |
783
+ | -------- | ---------- |
784
+ | ERR_BAD_OPTION_VALUE | Invalid or unsupported value provided in axios configuration. |
785
+ | ERR_BAD_OPTION | Invalid option provided in axios configuration. |
786
+ | ECONNABORTED | Request timed out due to exceeding timeout specified in axios configuration. |
787
+ | ETIMEDOUT | Request timed out due to exceeding default axios timelimit. |
788
+ | ERR_NETWORK | Network-related issue.
789
+ | ERR_FR_TOO_MANY_REDIRECTS | Request is redirected too many times; exceeds max redirects specified in axios configuration.
790
+ | ERR_DEPRECATED | Deprecated feature or method used in axios.
791
+ | ERR_BAD_RESPONSE | Response cannot be parsed properly or is in an unexpected format.
792
+ | ERR_BAD_REQUEST | Requested has unexpected format or missing required parameters. |
793
+ | ERR_CANCELED | Feature or method is canceled explicitly by the user.
794
+ | ERR_NOT_SUPPORT | Feature or method not supported in the current axios environment.
795
+ | ERR_INVALID_URL | Invalid URL provided for axios request.
796
+
767
797
  ## Handling Errors
768
798
 
769
799
  the default behavior is to reject every response that returns with a status code that falls out of the range of 2xx and treat it as an error.
@@ -931,8 +961,7 @@ axios.post('https://something.com/', querystring.stringify({ foo: 'bar' }));
931
961
 
932
962
  You can also use the [`qs`](https://github.com/ljharb/qs) library.
933
963
 
934
- > **Note**
935
- > The `qs` library is preferable if you need to stringify nested objects, as the `querystring` method has [known issues](https://github.com/nodejs/node-v0.x-archive/issues/1665) with that use case.
964
+ > **Note**: The `qs` library is preferable if you need to stringify nested objects, as the `querystring` method has [known issues](https://github.com/nodejs/node-v0.x-archive/issues/1665) with that use case.
936
965
 
937
966
  ### 🆕 Automatic serialization to URLSearchParams
938
967
 
@@ -1048,8 +1077,7 @@ Axios FormData serializer supports some special endings to perform the following
1048
1077
  - `{}` - serialize the value with JSON.stringify
1049
1078
  - `[]` - unwrap the array-like object as separate fields with the same key
1050
1079
 
1051
- > **Note**
1052
- > unwrap/expand operation will be used by default on arrays and FileList objects
1080
+ > **Note**: unwrap/expand operation will be used by default on arrays and FileList objects
1053
1081
 
1054
1082
  FormData serializer supports additional options via `config.formSerializer: object` property to handle rare cases:
1055
1083
 
@@ -1,4 +1,4 @@
1
- // Axios v1.4.0 Copyright (c) 2023 Matt Zabriskie and contributors
1
+ // Axios v1.5.0 Copyright (c) 2023 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) :
@@ -625,8 +625,9 @@
625
625
  var descriptors = Object.getOwnPropertyDescriptors(obj);
626
626
  var reducedDescriptors = {};
627
627
  forEach(descriptors, function (descriptor, name) {
628
- if (reducer(descriptor, name, obj) !== false) {
629
- reducedDescriptors[name] = descriptor;
628
+ var ret;
629
+ if ((ret = reducer(descriptor, name, obj)) !== false) {
630
+ reducedDescriptors[name] = ret || descriptor;
630
631
  }
631
632
  });
632
633
  Object.defineProperties(obj, reducedDescriptors);
@@ -1361,10 +1362,6 @@
1361
1362
  return null;
1362
1363
  }
1363
1364
 
1364
- var DEFAULT_CONTENT_TYPE = {
1365
- 'Content-Type': undefined
1366
- };
1367
-
1368
1365
  /**
1369
1366
  * It takes a string, tries to parse it, and if it fails, it returns the stringified version
1370
1367
  * of the input
@@ -1390,7 +1387,7 @@
1390
1387
  }
1391
1388
  var defaults = {
1392
1389
  transitional: transitionalDefaults,
1393
- adapter: ['xhr', 'http'],
1390
+ adapter: platform.isNode ? 'http' : 'xhr',
1394
1391
  transformRequest: [function transformRequest(data, headers) {
1395
1392
  var contentType = headers.getContentType() || '';
1396
1393
  var hasJSONContentType = contentType.indexOf('application/json') > -1;
@@ -1471,16 +1468,14 @@
1471
1468
  },
1472
1469
  headers: {
1473
1470
  common: {
1474
- 'Accept': 'application/json, text/plain, */*'
1471
+ 'Accept': 'application/json, text/plain, */*',
1472
+ 'Content-Type': undefined
1475
1473
  }
1476
1474
  }
1477
1475
  };
1478
- utils.forEach(['delete', 'get', 'head'], function forEachMethodNoData(method) {
1476
+ utils.forEach(['delete', 'get', 'head', 'post', 'put', 'patch'], function (method) {
1479
1477
  defaults.headers[method] = {};
1480
1478
  });
1481
- utils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {
1482
- defaults.headers[method] = utils.merge(DEFAULT_CONTENT_TYPE);
1483
- });
1484
1479
  var defaults$1 = defaults;
1485
1480
 
1486
1481
  // RawAxiosHeaders whose duplicates are ignored by node
@@ -1781,7 +1776,20 @@
1781
1776
  return AxiosHeaders;
1782
1777
  }(Symbol.iterator, Symbol.toStringTag);
1783
1778
  AxiosHeaders.accessor(['Content-Type', 'Content-Length', 'Accept', 'Accept-Encoding', 'User-Agent', 'Authorization']);
1784
- utils.freezeMethods(AxiosHeaders.prototype);
1779
+
1780
+ // reserved names hotfix
1781
+ utils.reduceDescriptors(AxiosHeaders.prototype, function (_ref3, key) {
1782
+ var value = _ref3.value;
1783
+ var mapped = key[0].toUpperCase() + key.slice(1); // map `set` => `Set`
1784
+ return {
1785
+ get: function get() {
1786
+ return value;
1787
+ },
1788
+ set: function set(headerValue) {
1789
+ this[mapped] = headerValue;
1790
+ }
1791
+ };
1792
+ });
1785
1793
  utils.freezeMethods(AxiosHeaders);
1786
1794
  var AxiosHeaders$1 = AxiosHeaders;
1787
1795
 
@@ -2440,7 +2448,7 @@
2440
2448
  return config;
2441
2449
  }
2442
2450
 
2443
- var VERSION = "1.4.0";
2451
+ var VERSION = "1.5.0";
2444
2452
 
2445
2453
  var validators$1 = {};
2446
2454
 
@@ -2582,11 +2590,10 @@
2582
2590
 
2583
2591
  // Set config.method
2584
2592
  config.method = (config.method || this.defaults.method || 'get').toLowerCase();
2585
- var contextHeaders;
2586
2593
 
2587
2594
  // Flatten headers
2588
- contextHeaders = headers && utils.merge(headers.common, headers[config.method]);
2589
- contextHeaders && utils.forEach(['delete', 'get', 'head', 'post', 'put', 'patch', 'common'], function (method) {
2595
+ var contextHeaders = headers && utils.merge(headers.common, headers[config.method]);
2596
+ headers && utils.forEach(['delete', 'get', 'head', 'post', 'put', 'patch', 'common'], function (method) {
2590
2597
  delete headers[method];
2591
2598
  });
2592
2599
  config.headers = AxiosHeaders$1.concat(contextHeaders, headers);
@@ -2973,6 +2980,7 @@
2973
2980
  axios.formToJSON = function (thing) {
2974
2981
  return formDataToJSON(utils.isHTMLForm(thing) ? new FormData(thing) : thing);
2975
2982
  };
2983
+ axios.getAdapter = adapters.getAdapter;
2976
2984
  axios.HttpStatusCode = HttpStatusCode$1;
2977
2985
  axios["default"] = axios;
2978
2986