node-red-contrib-tak-registration 0.11.1 → 0.11.5
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/node_modules/@types/node/LICENSE +0 -0
- package/node_modules/@types/node/README.md +4 -5
- package/node_modules/@types/node/assert/strict.d.ts +4 -4
- package/node_modules/@types/node/assert.d.ts +50 -26
- package/node_modules/@types/node/async_hooks.d.ts +13 -6
- package/node_modules/@types/node/buffer.d.ts +46 -38
- package/node_modules/@types/node/child_process.d.ts +278 -138
- package/node_modules/@types/node/cluster.d.ts +107 -89
- package/node_modules/@types/node/console.d.ts +18 -15
- package/node_modules/@types/node/constants.d.ts +12 -11
- package/node_modules/@types/node/crypto.d.ts +746 -268
- package/node_modules/@types/node/dgram.d.ts +82 -46
- package/node_modules/@types/node/diagnostics_channel.d.ts +3 -3
- package/node_modules/@types/node/dns/promises.d.ts +37 -26
- package/node_modules/@types/node/dns.d.ts +204 -63
- package/node_modules/@types/node/dom-events.d.ts +67 -71
- package/node_modules/@types/node/domain.d.ts +4 -4
- package/node_modules/@types/node/events.d.ts +99 -8
- package/node_modules/@types/node/fs/promises.d.ts +122 -85
- package/node_modules/@types/node/fs.d.ts +520 -316
- package/node_modules/@types/node/globals.d.ts +346 -286
- package/node_modules/@types/node/globals.global.d.ts +0 -0
- package/node_modules/@types/node/http.d.ts +321 -189
- package/node_modules/@types/node/http2.d.ts +630 -377
- package/node_modules/@types/node/https.d.ts +221 -112
- package/node_modules/@types/node/index.d.ts +0 -45
- package/node_modules/@types/node/inspector.d.ts +0 -1
- package/node_modules/@types/node/module.d.ts +75 -31
- package/node_modules/@types/node/net.d.ts +149 -93
- package/node_modules/@types/node/os.d.ts +10 -9
- package/node_modules/@types/node/package.json +88 -90
- package/node_modules/@types/node/path.d.ts +13 -13
- package/node_modules/@types/node/perf_hooks.d.ts +19 -18
- package/node_modules/@types/node/process.d.ts +170 -126
- package/node_modules/@types/node/punycode.d.ts +4 -4
- package/node_modules/@types/node/querystring.d.ts +14 -4
- package/node_modules/@types/node/readline/promises.d.ts +12 -7
- package/node_modules/@types/node/readline.d.ts +69 -56
- package/node_modules/@types/node/repl.d.ts +67 -61
- package/node_modules/@types/node/stream/consumers.d.ts +10 -10
- package/node_modules/@types/node/stream/promises.d.ts +56 -15
- package/node_modules/@types/node/stream/web.d.ts +40 -20
- package/node_modules/@types/node/stream.d.ts +365 -232
- package/node_modules/@types/node/string_decoder.d.ts +8 -8
- package/node_modules/@types/node/test.d.ts +133 -212
- package/node_modules/@types/node/timers/promises.d.ts +4 -4
- package/node_modules/@types/node/timers.d.ts +26 -11
- package/node_modules/@types/node/tls.d.ts +152 -72
- package/node_modules/@types/node/trace_events.d.ts +3 -3
- package/node_modules/@types/node/ts4.8/assert/strict.d.ts +4 -4
- package/node_modules/@types/node/ts4.8/assert.d.ts +50 -26
- package/node_modules/@types/node/ts4.8/async_hooks.d.ts +13 -6
- package/node_modules/@types/node/ts4.8/buffer.d.ts +47 -39
- package/node_modules/@types/node/ts4.8/child_process.d.ts +278 -138
- package/node_modules/@types/node/ts4.8/cluster.d.ts +107 -89
- package/node_modules/@types/node/ts4.8/console.d.ts +18 -15
- package/node_modules/@types/node/ts4.8/constants.d.ts +12 -11
- package/node_modules/@types/node/ts4.8/crypto.d.ts +746 -268
- package/node_modules/@types/node/ts4.8/dgram.d.ts +82 -46
- package/node_modules/@types/node/ts4.8/diagnostics_channel.d.ts +3 -3
- package/node_modules/@types/node/ts4.8/dns/promises.d.ts +37 -26
- package/node_modules/@types/node/ts4.8/dns.d.ts +204 -63
- package/node_modules/@types/node/ts4.8/dom-events.d.ts +67 -71
- package/node_modules/@types/node/ts4.8/domain.d.ts +4 -4
- package/node_modules/@types/node/ts4.8/events.d.ts +99 -8
- package/node_modules/@types/node/ts4.8/fs/promises.d.ts +122 -85
- package/node_modules/@types/node/ts4.8/fs.d.ts +520 -316
- package/node_modules/@types/node/ts4.8/globals.d.ts +346 -286
- package/node_modules/@types/node/ts4.8/globals.global.d.ts +0 -0
- package/node_modules/@types/node/ts4.8/http.d.ts +321 -189
- package/node_modules/@types/node/ts4.8/http2.d.ts +630 -377
- package/node_modules/@types/node/ts4.8/https.d.ts +221 -112
- package/node_modules/@types/node/ts4.8/index.d.ts +0 -0
- package/node_modules/@types/node/ts4.8/inspector.d.ts +0 -1
- package/node_modules/@types/node/ts4.8/module.d.ts +75 -31
- package/node_modules/@types/node/ts4.8/net.d.ts +149 -93
- package/node_modules/@types/node/ts4.8/os.d.ts +10 -9
- package/node_modules/@types/node/ts4.8/path.d.ts +13 -13
- package/node_modules/@types/node/ts4.8/perf_hooks.d.ts +19 -18
- package/node_modules/@types/node/ts4.8/process.d.ts +170 -126
- package/node_modules/@types/node/ts4.8/punycode.d.ts +4 -4
- package/node_modules/@types/node/ts4.8/querystring.d.ts +14 -4
- package/node_modules/@types/node/ts4.8/readline/promises.d.ts +12 -7
- package/node_modules/@types/node/ts4.8/readline.d.ts +69 -56
- package/node_modules/@types/node/ts4.8/repl.d.ts +67 -61
- package/node_modules/@types/node/ts4.8/stream/consumers.d.ts +10 -10
- package/node_modules/@types/node/ts4.8/stream/promises.d.ts +56 -15
- package/node_modules/@types/node/ts4.8/stream/web.d.ts +40 -20
- package/node_modules/@types/node/ts4.8/stream.d.ts +494 -223
- package/node_modules/@types/node/ts4.8/string_decoder.d.ts +8 -8
- package/node_modules/@types/node/ts4.8/test.d.ts +135 -214
- package/node_modules/@types/node/ts4.8/timers/promises.d.ts +4 -4
- package/node_modules/@types/node/ts4.8/timers.d.ts +26 -11
- package/node_modules/@types/node/ts4.8/tls.d.ts +152 -72
- package/node_modules/@types/node/ts4.8/trace_events.d.ts +3 -3
- package/node_modules/@types/node/ts4.8/tty.d.ts +10 -10
- package/node_modules/@types/node/ts4.8/url.d.ts +26 -14
- package/node_modules/@types/node/ts4.8/util.d.ts +187 -120
- package/node_modules/@types/node/ts4.8/v8.d.ts +4 -4
- package/node_modules/@types/node/ts4.8/vm.d.ts +58 -50
- package/node_modules/@types/node/ts4.8/wasi.d.ts +10 -4
- package/node_modules/@types/node/ts4.8/worker_threads.d.ts +83 -86
- package/node_modules/@types/node/ts4.8/zlib.d.ts +9 -9
- package/node_modules/@types/node/tty.d.ts +10 -10
- package/node_modules/@types/node/url.d.ts +26 -14
- package/node_modules/@types/node/util.d.ts +187 -120
- package/node_modules/@types/node/v8.d.ts +4 -4
- package/node_modules/@types/node/vm.d.ts +58 -50
- package/node_modules/@types/node/wasi.d.ts +10 -4
- package/node_modules/@types/node/worker_threads.d.ts +83 -86
- package/node_modules/@types/node/zlib.d.ts +9 -9
- package/node_modules/axios/CHANGELOG.md +225 -0
- package/node_modules/axios/README.md +273 -9
- package/node_modules/axios/dist/axios.js +249 -178
- package/node_modules/axios/dist/axios.js.map +1 -1
- package/node_modules/axios/dist/axios.min.js +1 -1
- package/node_modules/axios/dist/axios.min.js.map +1 -1
- package/node_modules/axios/dist/browser/axios.cjs +213 -193
- package/node_modules/axios/dist/browser/axios.cjs.map +1 -1
- package/node_modules/axios/dist/esm/axios.js +213 -193
- package/node_modules/axios/dist/esm/axios.js.map +1 -1
- package/node_modules/axios/dist/esm/axios.min.js +1 -1
- package/node_modules/axios/dist/esm/axios.min.js.map +1 -1
- package/node_modules/axios/dist/node/axios.cjs +297 -213
- package/node_modules/axios/dist/node/axios.cjs.map +1 -1
- package/node_modules/axios/index.d.cts +20 -11
- package/node_modules/axios/index.d.ts +21 -12
- package/node_modules/axios/lib/adapters/adapters.js +33 -15
- package/node_modules/axios/lib/adapters/http.js +25 -12
- package/node_modules/axios/lib/adapters/xhr.js +17 -10
- package/node_modules/axios/lib/core/mergeConfig.js +1 -0
- package/node_modules/axios/lib/defaults/index.js +1 -1
- package/node_modules/axios/lib/env/data.js +1 -1
- package/node_modules/axios/lib/helpers/cookies.js +39 -49
- package/node_modules/axios/lib/helpers/isURLSameOrigin.js +2 -2
- package/node_modules/axios/lib/platform/browser/index.js +0 -51
- package/node_modules/axios/lib/platform/common/utils.js +47 -0
- package/node_modules/axios/lib/platform/index.js +5 -1
- package/node_modules/axios/package.json +2 -1
- package/node_modules/call-bind/.eslintrc +0 -1
- package/node_modules/call-bind/.nycrc +0 -4
- package/node_modules/call-bind/CHANGELOG.md +35 -0
- package/node_modules/call-bind/README.md +63 -1
- package/node_modules/call-bind/index.js +10 -13
- package/node_modules/call-bind/package.json +33 -23
- package/node_modules/call-bind/test/callBound.js +0 -1
- package/node_modules/call-bind/test/index.js +18 -4
- package/node_modules/{function-bind → deep-equal}/.editorconfig +1 -1
- package/node_modules/deep-equal/.eslintrc +6 -0
- package/node_modules/deep-equal/.nycrc +17 -0
- package/node_modules/deep-equal/CHANGELOG.md +204 -4
- package/node_modules/deep-equal/assert.js +3 -0
- package/node_modules/deep-equal/package.json +39 -17
- package/node_modules/deep-equal/readme.markdown +28 -12
- package/node_modules/deep-equal/test/_tape.js +24 -3
- package/node_modules/deep-equal/test/cmp.js +1047 -48
- package/node_modules/define-data-property/CHANGELOG.md +10 -0
- package/node_modules/define-data-property/index.d.ts.map +1 -1
- package/node_modules/define-data-property/index.js +8 -0
- package/node_modules/define-data-property/package.json +11 -9
- package/node_modules/define-data-property/test/index.js +6 -11
- package/node_modules/define-data-property/tsconfig.json +1 -0
- package/node_modules/fast-xml-parser/CHANGELOG.md +11 -0
- package/node_modules/fast-xml-parser/package.json +5 -5
- package/node_modules/fast-xml-parser/src/xmlbuilder/json2xml.js +1 -0
- package/node_modules/fast-xml-parser/src/xmlbuilder/orderedJs2Xml.js +4 -0
- package/node_modules/fast-xml-parser/src/xmlparser/OrderedObjParser.js +6 -3
- package/node_modules/follow-redirects/index.js +16 -4
- package/node_modules/follow-redirects/package.json +2 -3
- package/node_modules/function-bind/.eslintrc +11 -5
- package/node_modules/function-bind/.github/FUNDING.yml +12 -0
- package/node_modules/function-bind/.github/SECURITY.md +3 -0
- package/node_modules/function-bind/.nycrc +13 -0
- package/node_modules/function-bind/CHANGELOG.md +136 -0
- package/node_modules/function-bind/README.md +25 -27
- package/node_modules/function-bind/implementation.js +44 -12
- package/node_modules/function-bind/package.json +38 -14
- package/node_modules/get-intrinsic/CHANGELOG.md +8 -0
- package/node_modules/get-intrinsic/index.js +1 -1
- package/node_modules/get-intrinsic/package.json +11 -11
- package/node_modules/has-property-descriptors/CHANGELOG.md +11 -0
- package/node_modules/has-property-descriptors/package.json +13 -6
- package/node_modules/hasown/.eslintrc +5 -0
- package/node_modules/hasown/.github/FUNDING.yml +12 -0
- package/node_modules/hasown/.nycrc +13 -0
- package/node_modules/hasown/CHANGELOG.md +20 -0
- package/node_modules/hasown/LICENSE +21 -0
- package/node_modules/hasown/README.md +40 -0
- package/node_modules/hasown/index.d.ts +3 -0
- package/node_modules/hasown/index.d.ts.map +1 -0
- package/node_modules/hasown/index.js +8 -0
- package/node_modules/hasown/package.json +91 -0
- package/node_modules/hasown/tsconfig.json +49 -0
- package/node_modules/set-function-length/.eslintrc +27 -0
- package/node_modules/set-function-length/.github/FUNDING.yml +12 -0
- package/node_modules/set-function-length/.nycrc +13 -0
- package/node_modules/set-function-length/CHANGELOG.md +41 -0
- package/node_modules/set-function-length/LICENSE +21 -0
- package/node_modules/set-function-length/README.md +56 -0
- package/node_modules/set-function-length/env.js +19 -0
- package/node_modules/set-function-length/index.js +41 -0
- package/node_modules/set-function-length/package.json +84 -0
- package/node_modules/undici-types/README.md +6 -0
- package/node_modules/undici-types/agent.d.ts +31 -0
- package/node_modules/undici-types/api.d.ts +43 -0
- package/node_modules/undici-types/balanced-pool.d.ts +18 -0
- package/node_modules/undici-types/cache.d.ts +36 -0
- package/node_modules/undici-types/client.d.ts +97 -0
- package/node_modules/undici-types/connector.d.ts +34 -0
- package/node_modules/undici-types/content-type.d.ts +21 -0
- package/node_modules/undici-types/cookies.d.ts +28 -0
- package/node_modules/undici-types/diagnostics-channel.d.ts +67 -0
- package/node_modules/undici-types/dispatcher.d.ts +241 -0
- package/node_modules/undici-types/errors.d.ts +128 -0
- package/node_modules/undici-types/fetch.d.ts +209 -0
- package/node_modules/undici-types/file.d.ts +39 -0
- package/node_modules/undici-types/filereader.d.ts +54 -0
- package/node_modules/undici-types/formdata.d.ts +108 -0
- package/node_modules/undici-types/global-dispatcher.d.ts +9 -0
- package/node_modules/undici-types/global-origin.d.ts +7 -0
- package/node_modules/undici-types/handlers.d.ts +9 -0
- package/node_modules/undici-types/header.d.ts +4 -0
- package/node_modules/undici-types/index.d.ts +63 -0
- package/node_modules/undici-types/interceptors.d.ts +5 -0
- package/node_modules/undici-types/mock-agent.d.ts +50 -0
- package/node_modules/undici-types/mock-client.d.ts +25 -0
- package/node_modules/undici-types/mock-errors.d.ts +12 -0
- package/node_modules/undici-types/mock-interceptor.d.ts +93 -0
- package/node_modules/undici-types/mock-pool.d.ts +25 -0
- package/node_modules/undici-types/package.json +55 -0
- package/node_modules/undici-types/patch.d.ts +71 -0
- package/node_modules/undici-types/pool-stats.d.ts +19 -0
- package/node_modules/undici-types/pool.d.ts +28 -0
- package/node_modules/undici-types/proxy-agent.d.ts +30 -0
- package/node_modules/undici-types/readable.d.ts +61 -0
- package/node_modules/undici-types/webidl.d.ts +220 -0
- package/node_modules/undici-types/websocket.d.ts +131 -0
- package/package.json +3 -3
- package/tak-ingest.js +42 -23
- package/tak-registration.html +4 -4
- package/node_modules/define-data-property/tsinit +0 -109
- package/node_modules/function-bind/.jscs.json +0 -176
- package/node_modules/function-bind/.npmignore +0 -22
- package/node_modules/function-bind/.travis.yml +0 -168
- package/node_modules/has/LICENSE-MIT +0 -22
- package/node_modules/has/README.md +0 -18
- package/node_modules/has/package.json +0 -48
- package/node_modules/has/src/index.js +0 -5
- package/node_modules/has/test/index.js +0 -10
|
@@ -8,6 +8,8 @@ type MethodsHeaders = Partial<{
|
|
|
8
8
|
|
|
9
9
|
type AxiosHeaderMatcher = (this: AxiosHeaders, value: string, name: string, headers: RawAxiosHeaders) => boolean;
|
|
10
10
|
|
|
11
|
+
type AxiosHeaderParser = (this: AxiosHeaders, value: axios.AxiosHeaderValue, header: string) => any;
|
|
12
|
+
|
|
11
13
|
type CommonRequestHeadersList = 'Accept' | 'Content-Length' | 'User-Agent'| 'Content-Encoding' | 'Authorization';
|
|
12
14
|
|
|
13
15
|
type ContentType = axios.AxiosHeaderValue | 'text/html' | 'text/plain' | 'multipart/form-data' | 'application/json' | 'application/x-www-form-urlencoded' | 'application/octet-stream';
|
|
@@ -16,18 +18,18 @@ type CommonResponseHeadersList = 'Server' | 'Content-Type' | 'Content-Length' |
|
|
|
16
18
|
|
|
17
19
|
declare class AxiosHeaders {
|
|
18
20
|
constructor(
|
|
19
|
-
headers?: RawAxiosHeaders | AxiosHeaders
|
|
21
|
+
headers?: RawAxiosHeaders | AxiosHeaders | string
|
|
20
22
|
);
|
|
21
23
|
|
|
22
24
|
[key: string]: any;
|
|
23
25
|
|
|
24
26
|
set(headerName?: string, value?: axios.AxiosHeaderValue, rewrite?: boolean | AxiosHeaderMatcher): AxiosHeaders;
|
|
25
|
-
set(headers?: RawAxiosHeaders | AxiosHeaders, rewrite?: boolean): AxiosHeaders;
|
|
27
|
+
set(headers?: RawAxiosHeaders | AxiosHeaders | string, rewrite?: boolean): AxiosHeaders;
|
|
26
28
|
|
|
27
29
|
get(headerName: string, parser: RegExp): RegExpExecArray | null;
|
|
28
|
-
get(headerName: string, matcher?: true |
|
|
30
|
+
get(headerName: string, matcher?: true | AxiosHeaderParser): axios.AxiosHeaderValue;
|
|
29
31
|
|
|
30
|
-
has(header: string, matcher?:
|
|
32
|
+
has(header: string, matcher?: AxiosHeaderMatcher): boolean;
|
|
31
33
|
|
|
32
34
|
delete(header: string | string[], matcher?: AxiosHeaderMatcher): boolean;
|
|
33
35
|
|
|
@@ -244,10 +246,7 @@ declare namespace axios {
|
|
|
244
246
|
interface AxiosProxyConfig {
|
|
245
247
|
host: string;
|
|
246
248
|
port: number;
|
|
247
|
-
auth?:
|
|
248
|
-
username: string;
|
|
249
|
-
password: string;
|
|
250
|
-
};
|
|
249
|
+
auth?: AxiosBasicCredentials;
|
|
251
250
|
protocol?: string;
|
|
252
251
|
}
|
|
253
252
|
|
|
@@ -362,6 +361,15 @@ declare namespace axios {
|
|
|
362
361
|
|
|
363
362
|
type AxiosAdapterConfig = AxiosAdapter | AxiosAdapterName;
|
|
364
363
|
|
|
364
|
+
type AddressFamily = 4 | 6 | undefined;
|
|
365
|
+
|
|
366
|
+
interface LookupAddressEntry {
|
|
367
|
+
address: string;
|
|
368
|
+
family?: AddressFamily;
|
|
369
|
+
}
|
|
370
|
+
|
|
371
|
+
type LookupAddress = string | LookupAddressEntry;
|
|
372
|
+
|
|
365
373
|
interface AxiosRequestConfig<D = any> {
|
|
366
374
|
url?: string;
|
|
367
375
|
method?: Method | string;
|
|
@@ -403,9 +411,10 @@ declare namespace axios {
|
|
|
403
411
|
FormData?: new (...args: any[]) => object;
|
|
404
412
|
};
|
|
405
413
|
formSerializer?: FormSerializerOptions;
|
|
406
|
-
family?:
|
|
407
|
-
lookup?: ((hostname: string, options: object, cb: (err: Error | null, address:
|
|
408
|
-
((hostname: string, options: object) => Promise<[address:
|
|
414
|
+
family?: AddressFamily;
|
|
415
|
+
lookup?: ((hostname: string, options: object, cb: (err: Error | null, address: LookupAddress | LookupAddress[], family?: AddressFamily) => void) => void) |
|
|
416
|
+
((hostname: string, options: object) => Promise<[address: LookupAddressEntry | LookupAddressEntry[], family?: AddressFamily] | LookupAddress>);
|
|
417
|
+
withXSRFToken?: boolean | ((config: InternalAxiosRequestConfig) => boolean | undefined);
|
|
409
418
|
}
|
|
410
419
|
|
|
411
420
|
// Alias
|
|
@@ -9,22 +9,24 @@ type MethodsHeaders = Partial<{
|
|
|
9
9
|
[Key in Method as Lowercase<Key>]: AxiosHeaders;
|
|
10
10
|
} & {common: AxiosHeaders}>;
|
|
11
11
|
|
|
12
|
-
type AxiosHeaderMatcher = (this: AxiosHeaders, value: string, name: string
|
|
12
|
+
type AxiosHeaderMatcher = string | RegExp | ((this: AxiosHeaders, value: string, name: string) => boolean);
|
|
13
|
+
|
|
14
|
+
type AxiosHeaderParser = (this: AxiosHeaders, value: AxiosHeaderValue, header: string) => any;
|
|
13
15
|
|
|
14
16
|
export class AxiosHeaders {
|
|
15
17
|
constructor(
|
|
16
|
-
headers?: RawAxiosHeaders | AxiosHeaders
|
|
18
|
+
headers?: RawAxiosHeaders | AxiosHeaders | string
|
|
17
19
|
);
|
|
18
20
|
|
|
19
21
|
[key: string]: any;
|
|
20
22
|
|
|
21
23
|
set(headerName?: string, value?: AxiosHeaderValue, rewrite?: boolean | AxiosHeaderMatcher): AxiosHeaders;
|
|
22
|
-
set(headers?: RawAxiosHeaders | AxiosHeaders, rewrite?: boolean): AxiosHeaders;
|
|
24
|
+
set(headers?: RawAxiosHeaders | AxiosHeaders | string, rewrite?: boolean): AxiosHeaders;
|
|
23
25
|
|
|
24
26
|
get(headerName: string, parser: RegExp): RegExpExecArray | null;
|
|
25
|
-
get(headerName: string, matcher?: true |
|
|
27
|
+
get(headerName: string, matcher?: true | AxiosHeaderParser): AxiosHeaderValue;
|
|
26
28
|
|
|
27
|
-
has(header: string, matcher?:
|
|
29
|
+
has(header: string, matcher?: AxiosHeaderMatcher): boolean;
|
|
28
30
|
|
|
29
31
|
delete(header: string | string[], matcher?: AxiosHeaderMatcher): boolean;
|
|
30
32
|
|
|
@@ -119,10 +121,7 @@ export interface AxiosBasicCredentials {
|
|
|
119
121
|
export interface AxiosProxyConfig {
|
|
120
122
|
host: string;
|
|
121
123
|
port: number;
|
|
122
|
-
auth?:
|
|
123
|
-
username: string;
|
|
124
|
-
password: string;
|
|
125
|
-
};
|
|
124
|
+
auth?: AxiosBasicCredentials;
|
|
126
125
|
protocol?: string;
|
|
127
126
|
}
|
|
128
127
|
|
|
@@ -303,6 +302,15 @@ type AxiosAdapterName = 'xhr' | 'http' | string;
|
|
|
303
302
|
|
|
304
303
|
type AxiosAdapterConfig = AxiosAdapter | AxiosAdapterName;
|
|
305
304
|
|
|
305
|
+
export type AddressFamily = 4 | 6 | undefined;
|
|
306
|
+
|
|
307
|
+
export interface LookupAddressEntry {
|
|
308
|
+
address: string;
|
|
309
|
+
family?: AddressFamily;
|
|
310
|
+
}
|
|
311
|
+
|
|
312
|
+
export type LookupAddress = string | LookupAddressEntry;
|
|
313
|
+
|
|
306
314
|
export interface AxiosRequestConfig<D = any> {
|
|
307
315
|
url?: string;
|
|
308
316
|
method?: Method | string;
|
|
@@ -344,9 +352,10 @@ export interface AxiosRequestConfig<D = any> {
|
|
|
344
352
|
FormData?: new (...args: any[]) => object;
|
|
345
353
|
};
|
|
346
354
|
formSerializer?: FormSerializerOptions;
|
|
347
|
-
family?:
|
|
348
|
-
lookup?: ((hostname: string, options: object, cb: (err: Error | null, address:
|
|
349
|
-
((hostname: string, options: object) => Promise<[address:
|
|
355
|
+
family?: AddressFamily;
|
|
356
|
+
lookup?: ((hostname: string, options: object, cb: (err: Error | null, address: LookupAddress | LookupAddress[], family?: AddressFamily) => void) => void) |
|
|
357
|
+
((hostname: string, options: object) => Promise<[address: LookupAddressEntry | LookupAddressEntry[], family?: AddressFamily] | LookupAddress>);
|
|
358
|
+
withXSRFToken?: boolean | ((config: InternalAxiosRequestConfig) => boolean | undefined);
|
|
350
359
|
}
|
|
351
360
|
|
|
352
361
|
// Alias
|
|
@@ -9,7 +9,7 @@ const knownAdapters = {
|
|
|
9
9
|
}
|
|
10
10
|
|
|
11
11
|
utils.forEach(knownAdapters, (fn, value) => {
|
|
12
|
-
if(fn) {
|
|
12
|
+
if (fn) {
|
|
13
13
|
try {
|
|
14
14
|
Object.defineProperty(fn, 'name', {value});
|
|
15
15
|
} catch (e) {
|
|
@@ -19,6 +19,10 @@ utils.forEach(knownAdapters, (fn, value) => {
|
|
|
19
19
|
}
|
|
20
20
|
});
|
|
21
21
|
|
|
22
|
+
const renderReason = (reason) => `- ${reason}`;
|
|
23
|
+
|
|
24
|
+
const isResolvedHandle = (adapter) => utils.isFunction(adapter) || adapter === null || adapter === false;
|
|
25
|
+
|
|
22
26
|
export default {
|
|
23
27
|
getAdapter: (adapters) => {
|
|
24
28
|
adapters = utils.isArray(adapters) ? adapters : [adapters];
|
|
@@ -27,30 +31,44 @@ export default {
|
|
|
27
31
|
let nameOrAdapter;
|
|
28
32
|
let adapter;
|
|
29
33
|
|
|
34
|
+
const rejectedReasons = {};
|
|
35
|
+
|
|
30
36
|
for (let i = 0; i < length; i++) {
|
|
31
37
|
nameOrAdapter = adapters[i];
|
|
32
|
-
|
|
38
|
+
let id;
|
|
39
|
+
|
|
40
|
+
adapter = nameOrAdapter;
|
|
41
|
+
|
|
42
|
+
if (!isResolvedHandle(nameOrAdapter)) {
|
|
43
|
+
adapter = knownAdapters[(id = String(nameOrAdapter)).toLowerCase()];
|
|
44
|
+
|
|
45
|
+
if (adapter === undefined) {
|
|
46
|
+
throw new AxiosError(`Unknown adapter '${id}'`);
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
if (adapter) {
|
|
33
51
|
break;
|
|
34
52
|
}
|
|
53
|
+
|
|
54
|
+
rejectedReasons[id || '#' + i] = adapter;
|
|
35
55
|
}
|
|
36
56
|
|
|
37
57
|
if (!adapter) {
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
'
|
|
58
|
+
|
|
59
|
+
const reasons = Object.entries(rejectedReasons)
|
|
60
|
+
.map(([id, state]) => `adapter ${id} ` +
|
|
61
|
+
(state === false ? 'is not supported by the environment' : 'is not available in the build')
|
|
42
62
|
);
|
|
43
|
-
}
|
|
44
63
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
`Unknown adapter '${nameOrAdapter}'`
|
|
49
|
-
);
|
|
50
|
-
}
|
|
64
|
+
let s = length ?
|
|
65
|
+
(reasons.length > 1 ? 'since :\n' + reasons.map(renderReason).join('\n') : ' ' + renderReason(reasons[0])) :
|
|
66
|
+
'as no adapter specified';
|
|
51
67
|
|
|
52
|
-
|
|
53
|
-
|
|
68
|
+
throw new AxiosError(
|
|
69
|
+
`There is no suitable adapter to dispatch the request ` + s,
|
|
70
|
+
'ERR_NOT_SUPPORT'
|
|
71
|
+
);
|
|
54
72
|
}
|
|
55
73
|
|
|
56
74
|
return adapter;
|
|
@@ -144,6 +144,18 @@ const wrapAsync = (asyncExecutor) => {
|
|
|
144
144
|
})
|
|
145
145
|
};
|
|
146
146
|
|
|
147
|
+
const resolveFamily = ({address, family}) => {
|
|
148
|
+
if (!utils.isString(address)) {
|
|
149
|
+
throw TypeError('address must be a string');
|
|
150
|
+
}
|
|
151
|
+
return ({
|
|
152
|
+
address,
|
|
153
|
+
family: family || (address.indexOf('.') < 0 ? 6 : 4)
|
|
154
|
+
});
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
const buildAddressEntry = (address, family) => resolveFamily(utils.isObject(address) ? address : {address, family});
|
|
158
|
+
|
|
147
159
|
/*eslint consistent-return:0*/
|
|
148
160
|
export default isHttpAdapterSupported && function httpAdapter(config) {
|
|
149
161
|
return wrapAsync(async function dispatchHttpRequest(resolve, reject, onDone) {
|
|
@@ -154,15 +166,16 @@ export default isHttpAdapterSupported && function httpAdapter(config) {
|
|
|
154
166
|
let rejected = false;
|
|
155
167
|
let req;
|
|
156
168
|
|
|
157
|
-
if (lookup
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
169
|
+
if (lookup) {
|
|
170
|
+
const _lookup = callbackify(lookup, (value) => utils.isArray(value) ? value : [value]);
|
|
171
|
+
// hotfix to support opt.all option which is required for node 20.x
|
|
172
|
+
lookup = (hostname, opt, cb) => {
|
|
173
|
+
_lookup(hostname, opt, (err, arg0, arg1) => {
|
|
174
|
+
const addresses = utils.isArray(arg0) ? arg0.map(addr => buildAddressEntry(addr)) : [buildAddressEntry(arg0, arg1)];
|
|
175
|
+
|
|
176
|
+
opt.all ? cb(err, addresses) : cb(err, addresses[0].address, addresses[0].family);
|
|
177
|
+
});
|
|
178
|
+
}
|
|
166
179
|
}
|
|
167
180
|
|
|
168
181
|
// temporary internal emitter until the AxiosRequest class will be implemented
|
|
@@ -471,7 +484,7 @@ export default isHttpAdapterSupported && function httpAdapter(config) {
|
|
|
471
484
|
delete res.headers['content-encoding'];
|
|
472
485
|
}
|
|
473
486
|
|
|
474
|
-
switch (res.headers['content-encoding']) {
|
|
487
|
+
switch ((res.headers['content-encoding'] || '').toLowerCase()) {
|
|
475
488
|
/*eslint default-case:0*/
|
|
476
489
|
case 'gzip':
|
|
477
490
|
case 'x-gzip':
|
|
@@ -567,7 +580,7 @@ export default isHttpAdapterSupported && function httpAdapter(config) {
|
|
|
567
580
|
}
|
|
568
581
|
response.data = responseData;
|
|
569
582
|
} catch (err) {
|
|
570
|
-
reject(AxiosError.from(err, null, config, response.request, response));
|
|
583
|
+
return reject(AxiosError.from(err, null, config, response.request, response));
|
|
571
584
|
}
|
|
572
585
|
settle(resolve, reject, response);
|
|
573
586
|
});
|
|
@@ -604,7 +617,7 @@ export default isHttpAdapterSupported && function httpAdapter(config) {
|
|
|
604
617
|
// This is forcing a int timeout to avoid problems if the `req` interface doesn't handle other types.
|
|
605
618
|
const timeout = parseInt(config.timeout, 10);
|
|
606
619
|
|
|
607
|
-
if (isNaN(timeout)) {
|
|
620
|
+
if (Number.isNaN(timeout)) {
|
|
608
621
|
reject(new AxiosError(
|
|
609
622
|
'error trying to parse `config.timeout` to int',
|
|
610
623
|
AxiosError.ERR_BAD_OPTION_VALUE,
|
|
@@ -49,7 +49,7 @@ export default isXHRAdapterSupported && function (config) {
|
|
|
49
49
|
return new Promise(function dispatchXhrRequest(resolve, reject) {
|
|
50
50
|
let requestData = config.data;
|
|
51
51
|
const requestHeaders = AxiosHeaders.from(config.headers).normalize();
|
|
52
|
-
|
|
52
|
+
let {responseType, withXSRFToken} = config;
|
|
53
53
|
let onCanceled;
|
|
54
54
|
function done() {
|
|
55
55
|
if (config.cancelToken) {
|
|
@@ -61,11 +61,15 @@ export default isXHRAdapterSupported && function (config) {
|
|
|
61
61
|
}
|
|
62
62
|
}
|
|
63
63
|
|
|
64
|
+
let contentType;
|
|
65
|
+
|
|
64
66
|
if (utils.isFormData(requestData)) {
|
|
65
|
-
if (platform.
|
|
67
|
+
if (platform.hasStandardBrowserEnv || platform.hasStandardBrowserWebWorkerEnv) {
|
|
66
68
|
requestHeaders.setContentType(false); // Let the browser set it
|
|
67
|
-
} else {
|
|
68
|
-
|
|
69
|
+
} else if ((contentType = requestHeaders.getContentType()) !== false) {
|
|
70
|
+
// fix semicolon duplication issue for ReactNative FormData implementation
|
|
71
|
+
const [type, ...tokens] = contentType ? contentType.split(';').map(token => token.trim()).filter(Boolean) : [];
|
|
72
|
+
requestHeaders.setContentType([type || 'multipart/form-data', ...tokens].join('; '));
|
|
69
73
|
}
|
|
70
74
|
}
|
|
71
75
|
|
|
@@ -181,13 +185,16 @@ export default isXHRAdapterSupported && function (config) {
|
|
|
181
185
|
// Add xsrf header
|
|
182
186
|
// This is only done if running in a standard browser environment.
|
|
183
187
|
// Specifically not if we're in a web worker, or react-native.
|
|
184
|
-
if
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
+
if(platform.hasStandardBrowserEnv) {
|
|
189
|
+
withXSRFToken && utils.isFunction(withXSRFToken) && (withXSRFToken = withXSRFToken(config));
|
|
190
|
+
|
|
191
|
+
if (withXSRFToken || (withXSRFToken !== false && isURLSameOrigin(fullPath))) {
|
|
192
|
+
// Add xsrf header
|
|
193
|
+
const xsrfValue = config.xsrfHeaderName && config.xsrfCookieName && cookies.read(config.xsrfCookieName);
|
|
188
194
|
|
|
189
|
-
|
|
190
|
-
|
|
195
|
+
if (xsrfValue) {
|
|
196
|
+
requestHeaders.set(config.xsrfHeaderName, xsrfValue);
|
|
197
|
+
}
|
|
191
198
|
}
|
|
192
199
|
}
|
|
193
200
|
|
|
@@ -75,6 +75,7 @@ export default function mergeConfig(config1, config2) {
|
|
|
75
75
|
timeout: defaultToConfig2,
|
|
76
76
|
timeoutMessage: defaultToConfig2,
|
|
77
77
|
withCredentials: defaultToConfig2,
|
|
78
|
+
withXSRFToken: defaultToConfig2,
|
|
78
79
|
adapter: defaultToConfig2,
|
|
79
80
|
responseType: defaultToConfig2,
|
|
80
81
|
xsrfCookieName: defaultToConfig2,
|
|
@@ -37,7 +37,7 @@ const defaults = {
|
|
|
37
37
|
|
|
38
38
|
transitional: transitionalDefaults,
|
|
39
39
|
|
|
40
|
-
adapter:
|
|
40
|
+
adapter: ['xhr', 'http'],
|
|
41
41
|
|
|
42
42
|
transformRequest: [function transformRequest(data, headers) {
|
|
43
43
|
const contentType = headers.getContentType() || '';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = "1.
|
|
1
|
+
export const VERSION = "1.6.2";
|
|
@@ -1,52 +1,42 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
1
|
import utils from './../utils.js';
|
|
4
2
|
import platform from '../platform/index.js';
|
|
5
3
|
|
|
6
|
-
export default platform.
|
|
7
|
-
|
|
8
|
-
// Standard browser envs support document.cookie
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
// Non standard browser env (web workers, react-native) lack needed support.
|
|
46
|
-
(function nonStandardBrowserEnv() {
|
|
47
|
-
return {
|
|
48
|
-
write: function write() {},
|
|
49
|
-
read: function read() { return null; },
|
|
50
|
-
remove: function remove() {}
|
|
51
|
-
};
|
|
52
|
-
})();
|
|
4
|
+
export default platform.hasStandardBrowserEnv ?
|
|
5
|
+
|
|
6
|
+
// Standard browser envs support document.cookie
|
|
7
|
+
{
|
|
8
|
+
write(name, value, expires, path, domain, secure) {
|
|
9
|
+
const cookie = [name + '=' + encodeURIComponent(value)];
|
|
10
|
+
|
|
11
|
+
utils.isNumber(expires) && cookie.push('expires=' + new Date(expires).toGMTString());
|
|
12
|
+
|
|
13
|
+
utils.isString(path) && cookie.push('path=' + path);
|
|
14
|
+
|
|
15
|
+
utils.isString(domain) && cookie.push('domain=' + domain);
|
|
16
|
+
|
|
17
|
+
secure === true && cookie.push('secure');
|
|
18
|
+
|
|
19
|
+
document.cookie = cookie.join('; ');
|
|
20
|
+
},
|
|
21
|
+
|
|
22
|
+
read(name) {
|
|
23
|
+
const match = document.cookie.match(new RegExp('(^|;\\s*)(' + name + ')=([^;]*)'));
|
|
24
|
+
return (match ? decodeURIComponent(match[3]) : null);
|
|
25
|
+
},
|
|
26
|
+
|
|
27
|
+
remove(name) {
|
|
28
|
+
this.write(name, '', Date.now() - 86400000);
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
:
|
|
33
|
+
|
|
34
|
+
// Non-standard browser env (web workers, react-native) lack needed support.
|
|
35
|
+
{
|
|
36
|
+
write() {},
|
|
37
|
+
read() {
|
|
38
|
+
return null;
|
|
39
|
+
},
|
|
40
|
+
remove() {}
|
|
41
|
+
};
|
|
42
|
+
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
import utils from './../utils.js';
|
|
4
4
|
import platform from '../platform/index.js';
|
|
5
5
|
|
|
6
|
-
export default platform.
|
|
6
|
+
export default platform.hasStandardBrowserEnv ?
|
|
7
7
|
|
|
8
8
|
// Standard browser envs have full support of the APIs needed to test
|
|
9
9
|
// whether the request URL is of the same origin as current location.
|
|
@@ -13,7 +13,7 @@ export default platform.isStandardBrowserEnv ?
|
|
|
13
13
|
let originURL;
|
|
14
14
|
|
|
15
15
|
/**
|
|
16
|
-
* Parse a URL to discover
|
|
16
|
+
* Parse a URL to discover its components
|
|
17
17
|
*
|
|
18
18
|
* @param {String} url The URL to be parsed
|
|
19
19
|
* @returns {Object}
|
|
@@ -2,55 +2,6 @@ import URLSearchParams from './classes/URLSearchParams.js'
|
|
|
2
2
|
import FormData from './classes/FormData.js'
|
|
3
3
|
import Blob from './classes/Blob.js'
|
|
4
4
|
|
|
5
|
-
/**
|
|
6
|
-
* Determine if we're running in a standard browser environment
|
|
7
|
-
*
|
|
8
|
-
* This allows axios to run in a web worker, and react-native.
|
|
9
|
-
* Both environments support XMLHttpRequest, but not fully standard globals.
|
|
10
|
-
*
|
|
11
|
-
* web workers:
|
|
12
|
-
* typeof window -> undefined
|
|
13
|
-
* typeof document -> undefined
|
|
14
|
-
*
|
|
15
|
-
* react-native:
|
|
16
|
-
* navigator.product -> 'ReactNative'
|
|
17
|
-
* nativescript
|
|
18
|
-
* navigator.product -> 'NativeScript' or 'NS'
|
|
19
|
-
*
|
|
20
|
-
* @returns {boolean}
|
|
21
|
-
*/
|
|
22
|
-
const isStandardBrowserEnv = (() => {
|
|
23
|
-
let product;
|
|
24
|
-
if (typeof navigator !== 'undefined' && (
|
|
25
|
-
(product = navigator.product) === 'ReactNative' ||
|
|
26
|
-
product === 'NativeScript' ||
|
|
27
|
-
product === 'NS')
|
|
28
|
-
) {
|
|
29
|
-
return false;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
return typeof window !== 'undefined' && typeof document !== 'undefined';
|
|
33
|
-
})();
|
|
34
|
-
|
|
35
|
-
/**
|
|
36
|
-
* Determine if we're running in a standard browser webWorker environment
|
|
37
|
-
*
|
|
38
|
-
* Although the `isStandardBrowserEnv` method indicates that
|
|
39
|
-
* `allows axios to run in a web worker`, the WebWorker will still be
|
|
40
|
-
* filtered out due to its judgment standard
|
|
41
|
-
* `typeof window !== 'undefined' && typeof document !== 'undefined'`.
|
|
42
|
-
* This leads to a problem when axios post `FormData` in webWorker
|
|
43
|
-
*/
|
|
44
|
-
const isStandardBrowserWebWorkerEnv = (() => {
|
|
45
|
-
return (
|
|
46
|
-
typeof WorkerGlobalScope !== 'undefined' &&
|
|
47
|
-
// eslint-disable-next-line no-undef
|
|
48
|
-
self instanceof WorkerGlobalScope &&
|
|
49
|
-
typeof self.importScripts === 'function'
|
|
50
|
-
);
|
|
51
|
-
})();
|
|
52
|
-
|
|
53
|
-
|
|
54
5
|
export default {
|
|
55
6
|
isBrowser: true,
|
|
56
7
|
classes: {
|
|
@@ -58,7 +9,5 @@ export default {
|
|
|
58
9
|
FormData,
|
|
59
10
|
Blob
|
|
60
11
|
},
|
|
61
|
-
isStandardBrowserEnv,
|
|
62
|
-
isStandardBrowserWebWorkerEnv,
|
|
63
12
|
protocols: ['http', 'https', 'file', 'blob', 'url', 'data']
|
|
64
13
|
};
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
const hasBrowserEnv = typeof window !== 'undefined' && typeof document !== 'undefined';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Determine if we're running in a standard browser environment
|
|
5
|
+
*
|
|
6
|
+
* This allows axios to run in a web worker, and react-native.
|
|
7
|
+
* Both environments support XMLHttpRequest, but not fully standard globals.
|
|
8
|
+
*
|
|
9
|
+
* web workers:
|
|
10
|
+
* typeof window -> undefined
|
|
11
|
+
* typeof document -> undefined
|
|
12
|
+
*
|
|
13
|
+
* react-native:
|
|
14
|
+
* navigator.product -> 'ReactNative'
|
|
15
|
+
* nativescript
|
|
16
|
+
* navigator.product -> 'NativeScript' or 'NS'
|
|
17
|
+
*
|
|
18
|
+
* @returns {boolean}
|
|
19
|
+
*/
|
|
20
|
+
const hasStandardBrowserEnv = (
|
|
21
|
+
(product) => {
|
|
22
|
+
return hasBrowserEnv && ['ReactNative', 'NativeScript', 'NS'].indexOf(product) < 0
|
|
23
|
+
})(typeof navigator !== 'undefined' && navigator.product);
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Determine if we're running in a standard browser webWorker environment
|
|
27
|
+
*
|
|
28
|
+
* Although the `isStandardBrowserEnv` method indicates that
|
|
29
|
+
* `allows axios to run in a web worker`, the WebWorker will still be
|
|
30
|
+
* filtered out due to its judgment standard
|
|
31
|
+
* `typeof window !== 'undefined' && typeof document !== 'undefined'`.
|
|
32
|
+
* This leads to a problem when axios post `FormData` in webWorker
|
|
33
|
+
*/
|
|
34
|
+
const hasStandardBrowserWebWorkerEnv = (() => {
|
|
35
|
+
return (
|
|
36
|
+
typeof WorkerGlobalScope !== 'undefined' &&
|
|
37
|
+
// eslint-disable-next-line no-undef
|
|
38
|
+
self instanceof WorkerGlobalScope &&
|
|
39
|
+
typeof self.importScripts === 'function'
|
|
40
|
+
);
|
|
41
|
+
})();
|
|
42
|
+
|
|
43
|
+
export {
|
|
44
|
+
hasBrowserEnv,
|
|
45
|
+
hasStandardBrowserWebWorkerEnv,
|
|
46
|
+
hasStandardBrowserEnv
|
|
47
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "axios",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.6.2",
|
|
4
4
|
"description": "Promise based HTTP client for the browser and node.js",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"exports": {
|
|
@@ -121,6 +121,7 @@
|
|
|
121
121
|
"karma-sauce-launcher": "^4.3.6",
|
|
122
122
|
"karma-sinon": "^1.0.5",
|
|
123
123
|
"karma-sourcemap-loader": "^0.3.8",
|
|
124
|
+
"memoizee": "^0.4.15",
|
|
124
125
|
"minimist": "^1.2.7",
|
|
125
126
|
"mocha": "^10.0.0",
|
|
126
127
|
"multer": "^1.4.4",
|