cloudstructs 0.9.23 → 0.9.25
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 +78 -79
- 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/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/slack-app.js +2 -2
- package/lib/slack-events/index.js +1 -1
- package/lib/slack-textract/index.js +1 -1
- 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/toolkit-cleaner/index.js +1 -1
- package/lib/url-shortener/index.js +1 -1
- package/node_modules/@slack/logger/node_modules/@types/node/README.md +2 -2
- package/node_modules/@slack/logger/node_modules/@types/node/crypto.d.ts +23 -0
- package/node_modules/@slack/logger/node_modules/@types/node/fs/promises.d.ts +1 -1
- package/node_modules/@slack/logger/node_modules/@types/node/http.d.ts +1 -1
- package/node_modules/@slack/logger/node_modules/@types/node/http2.d.ts +4 -1
- package/node_modules/@slack/logger/node_modules/@types/node/module.d.ts +10 -0
- package/node_modules/@slack/logger/node_modules/@types/node/package.json +4 -9
- package/node_modules/@slack/logger/node_modules/@types/node/process.d.ts +61 -10
- package/node_modules/@slack/logger/node_modules/@types/node/test.d.ts +119 -0
- package/node_modules/@slack/logger/node_modules/@types/node/v8.d.ts +1 -1
- package/node_modules/@slack/logger/node_modules/@types/node/worker_threads.d.ts +33 -0
- package/node_modules/@slack/logger/node_modules/undici-types/eventsource.d.ts +0 -2
- package/node_modules/@slack/logger/node_modules/undici-types/filereader.d.ts +1 -1
- package/node_modules/@slack/logger/node_modules/undici-types/interceptors.d.ts +3 -1
- package/node_modules/@slack/logger/node_modules/undici-types/package.json +1 -1
- package/node_modules/@slack/logger/node_modules/undici-types/patch.d.ts +0 -38
- package/node_modules/@slack/logger/node_modules/undici-types/websocket.d.ts +0 -2
- package/node_modules/@slack/web-api/dist/types/response/ChatPostMessageResponse.d.ts +10 -2
- package/node_modules/@slack/web-api/dist/types/response/ChatPostMessageResponse.d.ts.map +1 -1
- package/node_modules/@slack/web-api/dist/types/response/ChatPostMessageResponse.js.map +1 -1
- package/node_modules/@slack/web-api/dist/types/response/ChatScheduleMessageResponse.d.ts +7 -0
- package/node_modules/@slack/web-api/dist/types/response/ChatScheduleMessageResponse.d.ts.map +1 -1
- package/node_modules/@slack/web-api/dist/types/response/ChatScheduleMessageResponse.js.map +1 -1
- package/node_modules/@slack/web-api/dist/types/response/ChatUpdateResponse.d.ts +7 -0
- package/node_modules/@slack/web-api/dist/types/response/ChatUpdateResponse.d.ts.map +1 -1
- package/node_modules/@slack/web-api/dist/types/response/ChatUpdateResponse.js.map +1 -1
- package/node_modules/@slack/web-api/dist/types/response/ConversationsHistoryResponse.d.ts +10 -2
- package/node_modules/@slack/web-api/dist/types/response/ConversationsHistoryResponse.d.ts.map +1 -1
- package/node_modules/@slack/web-api/dist/types/response/ConversationsHistoryResponse.js.map +1 -1
- package/node_modules/@slack/web-api/dist/types/response/ConversationsOpenResponse.d.ts +7 -0
- package/node_modules/@slack/web-api/dist/types/response/ConversationsOpenResponse.d.ts.map +1 -1
- package/node_modules/@slack/web-api/dist/types/response/ConversationsOpenResponse.js.map +1 -1
- package/node_modules/@slack/web-api/dist/types/response/ConversationsRepliesResponse.d.ts +10 -2
- package/node_modules/@slack/web-api/dist/types/response/ConversationsRepliesResponse.d.ts.map +1 -1
- package/node_modules/@slack/web-api/dist/types/response/ConversationsRepliesResponse.js.map +1 -1
- package/node_modules/@slack/web-api/dist/types/response/ConversationsRequestSharedInviteListResponse.d.ts +5 -2
- package/node_modules/@slack/web-api/dist/types/response/ConversationsRequestSharedInviteListResponse.d.ts.map +1 -1
- package/node_modules/@slack/web-api/dist/types/response/FilesInfoResponse.d.ts +7 -0
- package/node_modules/@slack/web-api/dist/types/response/FilesInfoResponse.d.ts.map +1 -1
- package/node_modules/@slack/web-api/dist/types/response/FilesInfoResponse.js.map +1 -1
- package/node_modules/@slack/web-api/dist/types/response/FilesListResponse.d.ts +7 -0
- package/node_modules/@slack/web-api/dist/types/response/FilesListResponse.d.ts.map +1 -1
- package/node_modules/@slack/web-api/dist/types/response/FilesListResponse.js.map +1 -1
- package/node_modules/@slack/web-api/dist/types/response/FilesRemoteAddResponse.d.ts +7 -0
- package/node_modules/@slack/web-api/dist/types/response/FilesRemoteAddResponse.d.ts.map +1 -1
- package/node_modules/@slack/web-api/dist/types/response/FilesRemoteAddResponse.js.map +1 -1
- package/node_modules/@slack/web-api/dist/types/response/FilesRemoteInfoResponse.d.ts +7 -0
- package/node_modules/@slack/web-api/dist/types/response/FilesRemoteInfoResponse.d.ts.map +1 -1
- package/node_modules/@slack/web-api/dist/types/response/FilesRemoteInfoResponse.js.map +1 -1
- package/node_modules/@slack/web-api/dist/types/response/FilesRemoteListResponse.d.ts +7 -0
- package/node_modules/@slack/web-api/dist/types/response/FilesRemoteListResponse.d.ts.map +1 -1
- package/node_modules/@slack/web-api/dist/types/response/FilesRemoteListResponse.js.map +1 -1
- package/node_modules/@slack/web-api/dist/types/response/FilesRemoteShareResponse.d.ts +7 -0
- package/node_modules/@slack/web-api/dist/types/response/FilesRemoteShareResponse.d.ts.map +1 -1
- package/node_modules/@slack/web-api/dist/types/response/FilesRemoteShareResponse.js.map +1 -1
- package/node_modules/@slack/web-api/dist/types/response/FilesRemoteUpdateResponse.d.ts +7 -0
- package/node_modules/@slack/web-api/dist/types/response/FilesRemoteUpdateResponse.d.ts.map +1 -1
- package/node_modules/@slack/web-api/dist/types/response/FilesRemoteUpdateResponse.js.map +1 -1
- package/node_modules/@slack/web-api/dist/types/response/FilesRevokePublicURLResponse.d.ts +7 -0
- package/node_modules/@slack/web-api/dist/types/response/FilesRevokePublicURLResponse.d.ts.map +1 -1
- package/node_modules/@slack/web-api/dist/types/response/FilesRevokePublicURLResponse.js.map +1 -1
- package/node_modules/@slack/web-api/dist/types/response/FilesSharedPublicURLResponse.d.ts +7 -0
- package/node_modules/@slack/web-api/dist/types/response/FilesSharedPublicURLResponse.d.ts.map +1 -1
- package/node_modules/@slack/web-api/dist/types/response/FilesSharedPublicURLResponse.js.map +1 -1
- package/node_modules/@slack/web-api/dist/types/response/FilesUploadResponse.d.ts +7 -0
- package/node_modules/@slack/web-api/dist/types/response/FilesUploadResponse.d.ts.map +1 -1
- package/node_modules/@slack/web-api/dist/types/response/FilesUploadResponse.js.map +1 -1
- package/node_modules/@slack/web-api/dist/types/response/PinsListResponse.d.ts +7 -0
- package/node_modules/@slack/web-api/dist/types/response/PinsListResponse.d.ts.map +1 -1
- package/node_modules/@slack/web-api/dist/types/response/PinsListResponse.js.map +1 -1
- package/node_modules/@slack/web-api/dist/types/response/ReactionsGetResponse.d.ts +7 -0
- package/node_modules/@slack/web-api/dist/types/response/ReactionsGetResponse.d.ts.map +1 -1
- package/node_modules/@slack/web-api/dist/types/response/ReactionsGetResponse.js.map +1 -1
- package/node_modules/@slack/web-api/dist/types/response/ReactionsListResponse.d.ts +10 -2
- package/node_modules/@slack/web-api/dist/types/response/ReactionsListResponse.d.ts.map +1 -1
- package/node_modules/@slack/web-api/dist/types/response/ReactionsListResponse.js.map +1 -1
- package/node_modules/@slack/web-api/dist/types/response/RtmStartResponse.d.ts +10 -2
- package/node_modules/@slack/web-api/dist/types/response/RtmStartResponse.d.ts.map +1 -1
- package/node_modules/@slack/web-api/dist/types/response/SearchAllResponse.d.ts +11 -3
- package/node_modules/@slack/web-api/dist/types/response/SearchAllResponse.d.ts.map +1 -1
- package/node_modules/@slack/web-api/dist/types/response/SearchAllResponse.js.map +1 -1
- package/node_modules/@slack/web-api/dist/types/response/SearchFilesResponse.d.ts +11 -3
- package/node_modules/@slack/web-api/dist/types/response/SearchFilesResponse.d.ts.map +1 -1
- package/node_modules/@slack/web-api/dist/types/response/SearchFilesResponse.js.map +1 -1
- package/node_modules/@slack/web-api/dist/types/response/SearchMessagesResponse.d.ts +10 -2
- package/node_modules/@slack/web-api/dist/types/response/SearchMessagesResponse.d.ts.map +1 -1
- package/node_modules/@slack/web-api/node_modules/@types/node/README.md +2 -2
- package/node_modules/@slack/web-api/node_modules/@types/node/crypto.d.ts +23 -0
- package/node_modules/@slack/web-api/node_modules/@types/node/fs/promises.d.ts +1 -1
- package/node_modules/@slack/web-api/node_modules/@types/node/http.d.ts +1 -1
- package/node_modules/@slack/web-api/node_modules/@types/node/http2.d.ts +4 -1
- package/node_modules/@slack/web-api/node_modules/@types/node/module.d.ts +10 -0
- package/node_modules/@slack/web-api/node_modules/@types/node/package.json +4 -9
- package/node_modules/@slack/web-api/node_modules/@types/node/process.d.ts +61 -10
- package/node_modules/@slack/web-api/node_modules/@types/node/test.d.ts +119 -0
- package/node_modules/@slack/web-api/node_modules/@types/node/v8.d.ts +1 -1
- package/node_modules/@slack/web-api/node_modules/@types/node/worker_threads.d.ts +33 -0
- package/node_modules/@slack/web-api/node_modules/undici-types/eventsource.d.ts +0 -2
- package/node_modules/@slack/web-api/node_modules/undici-types/filereader.d.ts +1 -1
- package/node_modules/@slack/web-api/node_modules/undici-types/interceptors.d.ts +3 -1
- package/node_modules/@slack/web-api/node_modules/undici-types/package.json +1 -1
- package/node_modules/@slack/web-api/node_modules/undici-types/patch.d.ts +0 -38
- package/node_modules/@slack/web-api/node_modules/undici-types/websocket.d.ts +0 -2
- package/node_modules/@slack/web-api/package.json +5 -4
- package/node_modules/@types/cacheable-request/node_modules/@types/node/README.md +2 -2
- package/node_modules/@types/cacheable-request/node_modules/@types/node/crypto.d.ts +23 -0
- package/node_modules/@types/cacheable-request/node_modules/@types/node/fs/promises.d.ts +1 -1
- package/node_modules/@types/cacheable-request/node_modules/@types/node/http.d.ts +1 -1
- package/node_modules/@types/cacheable-request/node_modules/@types/node/http2.d.ts +4 -1
- package/node_modules/@types/cacheable-request/node_modules/@types/node/module.d.ts +10 -0
- package/node_modules/@types/cacheable-request/node_modules/@types/node/package.json +4 -9
- package/node_modules/@types/cacheable-request/node_modules/@types/node/process.d.ts +61 -10
- package/node_modules/@types/cacheable-request/node_modules/@types/node/test.d.ts +119 -0
- package/node_modules/@types/cacheable-request/node_modules/@types/node/v8.d.ts +1 -1
- package/node_modules/@types/cacheable-request/node_modules/@types/node/worker_threads.d.ts +33 -0
- package/node_modules/@types/cacheable-request/node_modules/undici-types/eventsource.d.ts +0 -2
- package/node_modules/@types/cacheable-request/node_modules/undici-types/filereader.d.ts +1 -1
- package/node_modules/@types/cacheable-request/node_modules/undici-types/interceptors.d.ts +3 -1
- package/node_modules/@types/cacheable-request/node_modules/undici-types/package.json +1 -1
- package/node_modules/@types/cacheable-request/node_modules/undici-types/patch.d.ts +0 -38
- package/node_modules/@types/cacheable-request/node_modules/undici-types/websocket.d.ts +0 -2
- package/node_modules/@types/keyv/node_modules/@types/node/README.md +2 -2
- package/node_modules/@types/keyv/node_modules/@types/node/crypto.d.ts +23 -0
- package/node_modules/@types/keyv/node_modules/@types/node/fs/promises.d.ts +1 -1
- package/node_modules/@types/keyv/node_modules/@types/node/http.d.ts +1 -1
- package/node_modules/@types/keyv/node_modules/@types/node/http2.d.ts +4 -1
- package/node_modules/@types/keyv/node_modules/@types/node/module.d.ts +10 -0
- package/node_modules/@types/keyv/node_modules/@types/node/package.json +4 -9
- package/node_modules/@types/keyv/node_modules/@types/node/process.d.ts +61 -10
- package/node_modules/@types/keyv/node_modules/@types/node/test.d.ts +119 -0
- package/node_modules/@types/keyv/node_modules/@types/node/v8.d.ts +1 -1
- package/node_modules/@types/keyv/node_modules/@types/node/worker_threads.d.ts +33 -0
- package/node_modules/@types/keyv/node_modules/undici-types/eventsource.d.ts +0 -2
- package/node_modules/@types/keyv/node_modules/undici-types/filereader.d.ts +1 -1
- package/node_modules/@types/keyv/node_modules/undici-types/interceptors.d.ts +3 -1
- package/node_modules/@types/keyv/node_modules/undici-types/package.json +1 -1
- package/node_modules/@types/keyv/node_modules/undici-types/patch.d.ts +0 -38
- package/node_modules/@types/keyv/node_modules/undici-types/websocket.d.ts +0 -2
- package/node_modules/@types/responselike/node_modules/@types/node/README.md +2 -2
- package/node_modules/@types/responselike/node_modules/@types/node/crypto.d.ts +23 -0
- package/node_modules/@types/responselike/node_modules/@types/node/fs/promises.d.ts +1 -1
- package/node_modules/@types/responselike/node_modules/@types/node/http.d.ts +1 -1
- package/node_modules/@types/responselike/node_modules/@types/node/http2.d.ts +4 -1
- package/node_modules/@types/responselike/node_modules/@types/node/module.d.ts +10 -0
- package/node_modules/@types/responselike/node_modules/@types/node/package.json +4 -9
- package/node_modules/@types/responselike/node_modules/@types/node/process.d.ts +61 -10
- package/node_modules/@types/responselike/node_modules/@types/node/test.d.ts +119 -0
- package/node_modules/@types/responselike/node_modules/@types/node/v8.d.ts +1 -1
- package/node_modules/@types/responselike/node_modules/@types/node/worker_threads.d.ts +33 -0
- package/node_modules/@types/responselike/node_modules/undici-types/eventsource.d.ts +0 -2
- package/node_modules/@types/responselike/node_modules/undici-types/filereader.d.ts +1 -1
- package/node_modules/@types/responselike/node_modules/undici-types/interceptors.d.ts +3 -1
- package/node_modules/@types/responselike/node_modules/undici-types/package.json +1 -1
- package/node_modules/@types/responselike/node_modules/undici-types/patch.d.ts +0 -38
- package/node_modules/@types/responselike/node_modules/undici-types/websocket.d.ts +0 -2
- package/node_modules/axios/CHANGELOG.md +49 -0
- package/node_modules/axios/README.md +20 -8
- package/node_modules/axios/dist/axios.js +34 -63
- 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 +40 -71
- package/node_modules/axios/dist/browser/axios.cjs.map +1 -1
- package/node_modules/axios/dist/esm/axios.js +40 -71
- 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 +45 -75
- package/node_modules/axios/dist/node/axios.cjs.map +1 -1
- package/node_modules/axios/index.d.cts +5 -1
- package/node_modules/axios/index.d.ts +8 -1
- package/node_modules/axios/lib/adapters/http.js +4 -4
- package/node_modules/axios/lib/core/Axios.js +7 -2
- package/node_modules/axios/lib/core/mergeConfig.js +5 -5
- package/node_modules/axios/lib/env/data.js +1 -1
- package/node_modules/axios/lib/helpers/buildURL.js +7 -1
- package/node_modules/axios/lib/helpers/formDataToStream.js +2 -2
- package/node_modules/axios/lib/helpers/isURLSameOrigin.js +12 -65
- package/node_modules/axios/lib/helpers/validator.js +8 -0
- package/node_modules/axios/package.json +3 -3
- package/node_modules/domutils/lib/esm/feeds.d.ts.map +1 -1
- package/node_modules/domutils/lib/esm/feeds.js.map +1 -1
- package/node_modules/domutils/lib/esm/helpers.d.ts.map +1 -1
- package/node_modules/domutils/lib/esm/helpers.js.map +1 -1
- package/node_modules/domutils/lib/esm/index.d.ts.map +1 -1
- package/node_modules/domutils/lib/esm/index.js.map +1 -1
- package/node_modules/domutils/lib/esm/legacy.d.ts +11 -0
- package/node_modules/domutils/lib/esm/legacy.d.ts.map +1 -1
- package/node_modules/domutils/lib/esm/legacy.js +13 -0
- package/node_modules/domutils/lib/esm/legacy.js.map +1 -1
- package/node_modules/domutils/lib/esm/manipulation.d.ts.map +1 -1
- package/node_modules/domutils/lib/esm/manipulation.js.map +1 -1
- package/node_modules/domutils/lib/esm/querying.d.ts +5 -5
- package/node_modules/domutils/lib/esm/querying.d.ts.map +1 -1
- package/node_modules/domutils/lib/esm/querying.js +14 -19
- package/node_modules/domutils/lib/esm/querying.js.map +1 -1
- package/node_modules/domutils/lib/esm/stringify.d.ts.map +1 -1
- package/node_modules/domutils/lib/esm/stringify.js.map +1 -1
- package/node_modules/domutils/lib/esm/traversal.d.ts.map +1 -1
- package/node_modules/domutils/lib/esm/traversal.js.map +1 -1
- package/node_modules/domutils/lib/feeds.d.ts.map +1 -1
- package/node_modules/domutils/lib/feeds.js +1 -2
- package/node_modules/domutils/lib/feeds.js.map +1 -1
- package/node_modules/domutils/lib/helpers.d.ts.map +1 -1
- package/node_modules/domutils/lib/helpers.js +5 -5
- package/node_modules/domutils/lib/helpers.js.map +1 -1
- package/node_modules/domutils/lib/index.d.ts.map +1 -1
- package/node_modules/domutils/lib/index.js.map +1 -1
- package/node_modules/domutils/lib/legacy.d.ts +11 -0
- package/node_modules/domutils/lib/legacy.d.ts.map +1 -1
- package/node_modules/domutils/lib/legacy.js +21 -6
- package/node_modules/domutils/lib/legacy.js.map +1 -1
- package/node_modules/domutils/lib/manipulation.d.ts.map +1 -1
- package/node_modules/domutils/lib/manipulation.js +6 -7
- package/node_modules/domutils/lib/manipulation.js.map +1 -1
- package/node_modules/domutils/lib/querying.d.ts +5 -5
- package/node_modules/domutils/lib/querying.d.ts.map +1 -1
- package/node_modules/domutils/lib/querying.js +21 -27
- package/node_modules/domutils/lib/querying.js.map +1 -1
- package/node_modules/domutils/lib/stringify.d.ts.map +1 -1
- package/node_modules/domutils/lib/stringify.js +5 -6
- package/node_modules/domutils/lib/stringify.js.map +1 -1
- package/node_modules/domutils/lib/traversal.d.ts.map +1 -1
- package/node_modules/domutils/lib/traversal.js +8 -9
- package/node_modules/domutils/lib/traversal.js.map +1 -1
- package/node_modules/domutils/package.json +15 -15
- package/package.json +19 -19
|
@@ -493,8 +493,12 @@ declare namespace axios {
|
|
|
493
493
|
runWhen?: (config: InternalAxiosRequestConfig) => boolean;
|
|
494
494
|
}
|
|
495
495
|
|
|
496
|
+
type AxiosRequestInterceptorUse<T> = (onFulfilled?: ((value: T) => T | Promise<T>) | null, onRejected?: ((error: any) => any) | null, options?: AxiosInterceptorOptions) => number;
|
|
497
|
+
|
|
498
|
+
type AxiosResponseInterceptorUse<T> = (onFulfilled?: ((value: T) => T | Promise<T>) | null, onRejected?: ((error: any) => any) | null) => number;
|
|
499
|
+
|
|
496
500
|
interface AxiosInterceptorManager<V> {
|
|
497
|
-
use
|
|
501
|
+
use: V extends AxiosResponse ? AxiosResponseInterceptorUse<V> : AxiosRequestInterceptorUse<V>;
|
|
498
502
|
eject(id: number): void;
|
|
499
503
|
clear(): void;
|
|
500
504
|
}
|
|
@@ -476,8 +476,12 @@ export interface AxiosInterceptorOptions {
|
|
|
476
476
|
runWhen?: (config: InternalAxiosRequestConfig) => boolean;
|
|
477
477
|
}
|
|
478
478
|
|
|
479
|
+
type AxiosRequestInterceptorUse<T> = (onFulfilled?: ((value: T) => T | Promise<T>) | null, onRejected?: ((error: any) => any) | null, options?: AxiosInterceptorOptions) => number;
|
|
480
|
+
|
|
481
|
+
type AxiosResponseInterceptorUse<T> = (onFulfilled?: ((value: T) => T | Promise<T>) | null, onRejected?: ((error: any) => any) | null) => number;
|
|
482
|
+
|
|
479
483
|
export interface AxiosInterceptorManager<V> {
|
|
480
|
-
use
|
|
484
|
+
use: V extends AxiosResponse ? AxiosResponseInterceptorUse<V> : AxiosRequestInterceptorUse<V>;
|
|
481
485
|
eject(id: number): void;
|
|
482
486
|
clear(): void;
|
|
483
487
|
}
|
|
@@ -538,6 +542,8 @@ export function isCancel(value: any): value is Cancel;
|
|
|
538
542
|
|
|
539
543
|
export function all<T>(values: Array<T | Promise<T>>): Promise<T[]>;
|
|
540
544
|
|
|
545
|
+
export function mergeConfig<D = any>(config1: AxiosRequestConfig<D>, config2: AxiosRequestConfig<D>): AxiosRequestConfig<D>;
|
|
546
|
+
|
|
541
547
|
export interface AxiosStatic extends AxiosInstance {
|
|
542
548
|
create(config?: CreateAxiosDefaults): AxiosInstance;
|
|
543
549
|
Cancel: CancelStatic;
|
|
@@ -555,6 +561,7 @@ export interface AxiosStatic extends AxiosInstance {
|
|
|
555
561
|
getAdapter: typeof getAdapter;
|
|
556
562
|
CanceledError: typeof CanceledError;
|
|
557
563
|
AxiosHeaders: typeof AxiosHeaders;
|
|
564
|
+
mergeConfig: typeof mergeConfig;
|
|
558
565
|
}
|
|
559
566
|
|
|
560
567
|
declare const axios: AxiosStatic;
|
|
@@ -4,7 +4,7 @@ import utils from './../utils.js';
|
|
|
4
4
|
import settle from './../core/settle.js';
|
|
5
5
|
import buildFullPath from '../core/buildFullPath.js';
|
|
6
6
|
import buildURL from './../helpers/buildURL.js';
|
|
7
|
-
import
|
|
7
|
+
import proxyFromEnv from 'proxy-from-env';
|
|
8
8
|
import http from 'http';
|
|
9
9
|
import https from 'https';
|
|
10
10
|
import util from 'util';
|
|
@@ -83,7 +83,7 @@ function dispatchBeforeRedirect(options, responseDetails) {
|
|
|
83
83
|
function setProxy(options, configProxy, location) {
|
|
84
84
|
let proxy = configProxy;
|
|
85
85
|
if (!proxy && proxy !== false) {
|
|
86
|
-
const proxyUrl = getProxyForUrl(location);
|
|
86
|
+
const proxyUrl = proxyFromEnv.getProxyForUrl(location);
|
|
87
87
|
if (proxyUrl) {
|
|
88
88
|
proxy = new URL(proxyUrl);
|
|
89
89
|
}
|
|
@@ -314,7 +314,7 @@ export default isHttpAdapterSupported && function httpAdapter(config) {
|
|
|
314
314
|
} catch (e) {
|
|
315
315
|
}
|
|
316
316
|
}
|
|
317
|
-
} else if (utils.isBlob(data)) {
|
|
317
|
+
} else if (utils.isBlob(data) || utils.isFile(data)) {
|
|
318
318
|
data.size && headers.setContentType(data.type || 'application/octet-stream');
|
|
319
319
|
headers.setContentLength(data.size || 0);
|
|
320
320
|
data = stream.Readable.from(readBlob(data));
|
|
@@ -569,7 +569,7 @@ export default isHttpAdapterSupported && function httpAdapter(config) {
|
|
|
569
569
|
}
|
|
570
570
|
|
|
571
571
|
const err = new AxiosError(
|
|
572
|
-
'
|
|
572
|
+
'stream has been aborted',
|
|
573
573
|
AxiosError.ERR_BAD_RESPONSE,
|
|
574
574
|
config,
|
|
575
575
|
lastRequest
|
|
@@ -40,9 +40,9 @@ class Axios {
|
|
|
40
40
|
return await this._request(configOrUrl, config);
|
|
41
41
|
} catch (err) {
|
|
42
42
|
if (err instanceof Error) {
|
|
43
|
-
let dummy;
|
|
43
|
+
let dummy = {};
|
|
44
44
|
|
|
45
|
-
Error.captureStackTrace ? Error.captureStackTrace(dummy
|
|
45
|
+
Error.captureStackTrace ? Error.captureStackTrace(dummy) : (dummy = new Error());
|
|
46
46
|
|
|
47
47
|
// slice off the Error: ... line
|
|
48
48
|
const stack = dummy.stack ? dummy.stack.replace(/^.+\n/, '') : '';
|
|
@@ -97,6 +97,11 @@ class Axios {
|
|
|
97
97
|
}
|
|
98
98
|
}
|
|
99
99
|
|
|
100
|
+
validator.assertOptions(config, {
|
|
101
|
+
baseUrl: validators.spelling('baseURL'),
|
|
102
|
+
withXsrfToken: validators.spelling('withXSRFToken')
|
|
103
|
+
}, true);
|
|
104
|
+
|
|
100
105
|
// Set config.method
|
|
101
106
|
config.method = (config.method || this.defaults.method || 'get').toLowerCase();
|
|
102
107
|
|
|
@@ -19,7 +19,7 @@ export default function mergeConfig(config1, config2) {
|
|
|
19
19
|
config2 = config2 || {};
|
|
20
20
|
const config = {};
|
|
21
21
|
|
|
22
|
-
function getMergedValue(target, source, caseless) {
|
|
22
|
+
function getMergedValue(target, source, prop, caseless) {
|
|
23
23
|
if (utils.isPlainObject(target) && utils.isPlainObject(source)) {
|
|
24
24
|
return utils.merge.call({caseless}, target, source);
|
|
25
25
|
} else if (utils.isPlainObject(source)) {
|
|
@@ -31,11 +31,11 @@ export default function mergeConfig(config1, config2) {
|
|
|
31
31
|
}
|
|
32
32
|
|
|
33
33
|
// eslint-disable-next-line consistent-return
|
|
34
|
-
function mergeDeepProperties(a, b, caseless) {
|
|
34
|
+
function mergeDeepProperties(a, b, prop , caseless) {
|
|
35
35
|
if (!utils.isUndefined(b)) {
|
|
36
|
-
return getMergedValue(a, b, caseless);
|
|
36
|
+
return getMergedValue(a, b, prop , caseless);
|
|
37
37
|
} else if (!utils.isUndefined(a)) {
|
|
38
|
-
return getMergedValue(undefined, a, caseless);
|
|
38
|
+
return getMergedValue(undefined, a, prop , caseless);
|
|
39
39
|
}
|
|
40
40
|
}
|
|
41
41
|
|
|
@@ -93,7 +93,7 @@ export default function mergeConfig(config1, config2) {
|
|
|
93
93
|
socketPath: defaultToConfig2,
|
|
94
94
|
responseEncoding: defaultToConfig2,
|
|
95
95
|
validateStatus: mergeDirectKeys,
|
|
96
|
-
headers: (a, b) => mergeDeepProperties(headersToObject(a), headersToObject(b), true)
|
|
96
|
+
headers: (a, b , prop) => mergeDeepProperties(headersToObject(a), headersToObject(b),prop, true)
|
|
97
97
|
};
|
|
98
98
|
|
|
99
99
|
utils.forEach(Object.keys(Object.assign({}, config1, config2)), function computeConfigValue(prop) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = "1.7.
|
|
1
|
+
export const VERSION = "1.7.9";
|
|
@@ -26,7 +26,7 @@ function encode(val) {
|
|
|
26
26
|
*
|
|
27
27
|
* @param {string} url The base of the url (e.g., http://www.google.com)
|
|
28
28
|
* @param {object} [params] The params to be appended
|
|
29
|
-
* @param {?object} options
|
|
29
|
+
* @param {?(object|Function)} options
|
|
30
30
|
*
|
|
31
31
|
* @returns {string} The formatted url
|
|
32
32
|
*/
|
|
@@ -38,6 +38,12 @@ export default function buildURL(url, params, options) {
|
|
|
38
38
|
|
|
39
39
|
const _encode = options && options.encode || encode;
|
|
40
40
|
|
|
41
|
+
if (utils.isFunction(options)) {
|
|
42
|
+
options = {
|
|
43
|
+
serialize: options
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
|
|
41
47
|
const serializeFn = options && options.serialize;
|
|
42
48
|
|
|
43
49
|
let serializedParams;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import
|
|
1
|
+
import util from 'util';
|
|
2
2
|
import {Readable} from 'stream';
|
|
3
3
|
import utils from "../utils.js";
|
|
4
4
|
import readBlob from "./readBlob.js";
|
|
5
5
|
|
|
6
6
|
const BOUNDARY_ALPHABET = utils.ALPHABET.ALPHA_DIGIT + '-_';
|
|
7
7
|
|
|
8
|
-
const textEncoder = new TextEncoder();
|
|
8
|
+
const textEncoder = typeof TextEncoder === 'function' ? new TextEncoder() : new util.TextEncoder();
|
|
9
9
|
|
|
10
10
|
const CRLF = '\r\n';
|
|
11
11
|
const CRLF_BYTES = textEncoder.encode(CRLF);
|
|
@@ -1,67 +1,14 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
import utils from './../utils.js';
|
|
4
1
|
import platform from '../platform/index.js';
|
|
5
2
|
|
|
6
|
-
export default platform.hasStandardBrowserEnv ?
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
* @param {String} url The URL to be parsed
|
|
19
|
-
* @returns {Object}
|
|
20
|
-
*/
|
|
21
|
-
function resolveURL(url) {
|
|
22
|
-
let href = url;
|
|
23
|
-
|
|
24
|
-
if (msie) {
|
|
25
|
-
// IE needs attribute set twice to normalize properties
|
|
26
|
-
urlParsingNode.setAttribute('href', href);
|
|
27
|
-
href = urlParsingNode.href;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
urlParsingNode.setAttribute('href', href);
|
|
31
|
-
|
|
32
|
-
// urlParsingNode provides the UrlUtils interface - http://url.spec.whatwg.org/#urlutils
|
|
33
|
-
return {
|
|
34
|
-
href: urlParsingNode.href,
|
|
35
|
-
protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, '') : '',
|
|
36
|
-
host: urlParsingNode.host,
|
|
37
|
-
search: urlParsingNode.search ? urlParsingNode.search.replace(/^\?/, '') : '',
|
|
38
|
-
hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, '') : '',
|
|
39
|
-
hostname: urlParsingNode.hostname,
|
|
40
|
-
port: urlParsingNode.port,
|
|
41
|
-
pathname: (urlParsingNode.pathname.charAt(0) === '/') ?
|
|
42
|
-
urlParsingNode.pathname :
|
|
43
|
-
'/' + urlParsingNode.pathname
|
|
44
|
-
};
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
originURL = resolveURL(window.location.href);
|
|
48
|
-
|
|
49
|
-
/**
|
|
50
|
-
* Determine if a URL shares the same origin as the current location
|
|
51
|
-
*
|
|
52
|
-
* @param {String} requestURL The URL to test
|
|
53
|
-
* @returns {boolean} True if URL shares the same origin, otherwise false
|
|
54
|
-
*/
|
|
55
|
-
return function isURLSameOrigin(requestURL) {
|
|
56
|
-
const parsed = (utils.isString(requestURL)) ? resolveURL(requestURL) : requestURL;
|
|
57
|
-
return (parsed.protocol === originURL.protocol &&
|
|
58
|
-
parsed.host === originURL.host);
|
|
59
|
-
};
|
|
60
|
-
})() :
|
|
61
|
-
|
|
62
|
-
// Non standard browser envs (web workers, react-native) lack needed support.
|
|
63
|
-
(function nonStandardBrowserEnv() {
|
|
64
|
-
return function isURLSameOrigin() {
|
|
65
|
-
return true;
|
|
66
|
-
};
|
|
67
|
-
})();
|
|
3
|
+
export default platform.hasStandardBrowserEnv ? ((origin, isMSIE) => (url) => {
|
|
4
|
+
url = new URL(url, platform.origin);
|
|
5
|
+
|
|
6
|
+
return (
|
|
7
|
+
origin.protocol === url.protocol &&
|
|
8
|
+
origin.host === url.host &&
|
|
9
|
+
(isMSIE || origin.port === url.port)
|
|
10
|
+
);
|
|
11
|
+
})(
|
|
12
|
+
new URL(platform.origin),
|
|
13
|
+
platform.navigator && /(msie|trident)/i.test(platform.navigator.userAgent)
|
|
14
|
+
) : () => true;
|
|
@@ -52,6 +52,14 @@ validators.transitional = function transitional(validator, version, message) {
|
|
|
52
52
|
};
|
|
53
53
|
};
|
|
54
54
|
|
|
55
|
+
validators.spelling = function spelling(correctSpelling) {
|
|
56
|
+
return (value, opt) => {
|
|
57
|
+
// eslint-disable-next-line no-console
|
|
58
|
+
console.warn(`${opt} is likely a misspelling of ${correctSpelling}`);
|
|
59
|
+
return true;
|
|
60
|
+
}
|
|
61
|
+
};
|
|
62
|
+
|
|
55
63
|
/**
|
|
56
64
|
* Assert object's properties type
|
|
57
65
|
*
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "axios",
|
|
3
|
-
"version": "1.7.
|
|
3
|
+
"version": "1.7.9",
|
|
4
4
|
"description": "Promise based HTTP client for the browser and node.js",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"exports": {
|
|
@@ -163,12 +163,12 @@
|
|
|
163
163
|
"Dmitriy Mozgovoy (https://github.com/DigitalBrainJS)",
|
|
164
164
|
"Jay (https://github.com/jasonsaayman)",
|
|
165
165
|
"Emily Morehouse (https://github.com/emilyemorehouse)",
|
|
166
|
-
"Rubén Norte (https://github.com/rubennorte)",
|
|
167
166
|
"Justin Beckwith (https://github.com/JustinBeckwith)",
|
|
167
|
+
"Rubén Norte (https://github.com/rubennorte)",
|
|
168
168
|
"Martti Laine (https://github.com/codeclown)",
|
|
169
169
|
"Xianming Zhong (https://github.com/chinesedfan)",
|
|
170
|
-
"Rikki Gibson (https://github.com/RikkiGibson)",
|
|
171
170
|
"Remco Haszing (https://github.com/remcohaszing)",
|
|
171
|
+
"Rikki Gibson (https://github.com/RikkiGibson)",
|
|
172
172
|
"Yasu Flores (https://github.com/yasuf)",
|
|
173
173
|
"Ben Carp (https://github.com/carpben)"
|
|
174
174
|
],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"feeds.d.ts","sourceRoot":"https://raw.githubusercontent.com/fb55/domutils/
|
|
1
|
+
{"version":3,"file":"feeds.d.ts","sourceRoot":"https://raw.githubusercontent.com/fb55/domutils/41338488a4b941d89f58d777bd06c4feb4b20807/src/","sources":["feeds.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAW,MAAM,YAAY,CAAC;AAInD;;;;GAIG;AACH,MAAM,MAAM,mBAAmB,GACzB,OAAO,GACP,OAAO,GACP,OAAO,G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EAAE,CAAC;CACrB;AAED;;;;;;GAMG;AACH,wBAAgB,OAAO,CAAC,GAAG,EAAE,OAAO,EAAE,GAAG,IAAI,GAAG,IAAI,CAQnD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"feeds.js","sourceRoot":"https://raw.githubusercontent.com/fb55/domutils/
|
|
1
|
+
{"version":3,"file":"feeds.js","sourceRoot":"https://raw.githubusercontent.com/fb55/domutils/41338488a4b941d89f58d777bd06c4feb4b20807/src/","sources":["feeds.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAyEnD;;;;;;GAMG;AACH,MAAM,UAAU,OAAO,CAAC,GAAc;IAClC,MAAM,QAAQ,GAAG,aAAa,CAAC,WAAW,EAAE,GAAG,CAAC,CAAC;IAEjD,OAAO,CAAC,QAAQ;QACZ,CAAC,CAAC,IAAI;QACN,CAAC,CAAC,QAAQ,CAAC,IAAI,KAAK,MAAM;YACxB,CAAC,CAAC,WAAW,CAAC,QAAQ,CAAC;YACvB,CAAC,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC;AACjC,CAAC;AAED;;;;;GAKG;AACH,SAAS,WAAW,CAAC,QAAiB;;IAClC,MAAM,MAAM,GAAG,QAAQ,CAAC,QAAQ,CAAC;IAEjC,MAAM,IAAI,GAAS;QACf,IAAI,EAAE,MAAM;QACZ,KAAK,EAAE,oBAAoB,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE;;YACtD,MAAM,EAAE,QAAQ,EAAE,GAAG,IAAI,CAAC;YAC1B,MAAM,KAAK,GAAa,EAAE,KAAK,EAAE,gBAAgB,CAAC,QAAQ,CAAC,EAAE,CAAC;YAE9D,gBAAgB,CAAC,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,QAAQ,CAAC,CAAC;YAC9C,gBAAg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
|
|
1
|
-
{"version":3,"file":"helpers.d.ts","sourceRoot":"https://raw.githubusercontent.com/fb55/domutils/
|
|
1
|
+
{"version":3,"file":"helpers.d.ts","sourceRoot":"https://raw.githubusercontent.com/fb55/domutils/41338488a4b941d89f58d777bd06c4feb4b20807/src/","sources":["helpers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAe,OAAO,EAAc,MAAM,YAAY,CAAC;AAE9D;;;;;;;GAOG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,OAAO,EAAE,GAAG,OAAO,EAAE,CA6BzD;AACD;;;GAGG;AACH,0BAAkB,gBAAgB;IAC9B,YAAY,IAAI;IAChB,SAAS,IAAI;IACb,SAAS,IAAI;IACb,QAAQ,IAAI;IACZ,YAAY,KAAK;CACpB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,wBAAgB,uBAAuB,CACnC,KAAK,EAAE,OAAO,EACd,KAAK,EAAE,OAAO,GACf,MAAM,CA4CR;AAED;;;;;;;;GAQG;AACH,wBAAgB,UAAU,CAAC,CAAC,SAAS,OAAO,EAAE,KAAK,EAAE,CAAC,EAAE,GAAG,CAAC,EAAE,CAc7D"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"helpers.js","sourceRoot":"https://raw.githubusercontent.com/fb55/domutils/
|
|
1
|
+
{"version":3,"file":"helpers.js","sourceRoot":"https://raw.githubusercontent.com/fb55/domutils/41338488a4b941d89f58d777bd06c4feb4b20807/src/","sources":["helpers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAuB,MAAM,YAAY,CAAC;AAE9D;;;;;;;GAOG;AACH,MAAM,UAAU,aAAa,CAAC,KAAgB;IAC1C,IAAI,GAAG,GAAG,KAAK,CAAC,MAAM,CAAC;IAEvB;;;OAGG;IACH,OAAO,EAAE,GAAG,IAAI,CAAC,EAAE,CAAC;QAChB,MAAM,IAAI,GAAG,KAAK,CAAC,GAAG,CAAC,CAAC;QAExB;;;;WA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AAC;IACD,OAAO,gBAAgB,CAAC,SAAS,CAAC;AACtC,CAAC;AAED;;;;;;;;GAQG;AACH,MAAM,UAAU,UAAU,CAAoB,KAAU;IACpD,KAAK,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,CAAC,EAAE,GAAG,EAAE,EAAE,CAAC,CAAC,GAAG,CAAC,QAAQ,CAAC,IAAI,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;IAEnE,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE;QAChB,MAAM,QAAQ,GAAG,uBAAuB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;QAC/C,IAAI,QAAQ,GAAG,gBAAgB,CAAC,SAAS,EAAE,CAAC;YACxC,OAAO,CAAC,CAAC,CAAC;QACd,CAAC;aAAM,IAAI,QAAQ,GAAG,gBAAgB,CAAC,SAAS,EAAE,CAAC;YAC/C,OAAO,CAAC,CAAC;QACb,CAAC;QACD,OAAO,CAAC,CAAC;IACb,CAAC,CAAC,CAAC;IAEH,OAAO,KAAK,CAAC;AACjB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"https://raw.githubusercontent.com/fb55/domutils/
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"https://raw.githubusercontent.com/fb55/domutils/41338488a4b941d89f58d777bd06c4feb4b20807/src/","sources":["index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,mBAAmB,CAAC;AAClC,cAAc,eAAe,CAAC;AAC9B,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC;AAC3B,gEAAgE;AAChE,OAAO,EACH,KAAK,EACL,OAAO,EACP,MAAM,EACN,SAAS,EACT,UAAU,EACV,WAAW,GACd,MAAM,YAAY,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"https://raw.githubusercontent.com/fb55/domutils/
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"https://raw.githubusercontent.com/fb55/domutils/41338488a4b941d89f58d777bd06c4feb4b20807/src/","sources":["index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,mBAAmB,CAAC;AAClC,cAAc,eAAe,CAAC;AAC9B,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC;AAC3B,gEAAgE;AAChE,OAAO,EACH,KAAK,EACL,OAAO,EACP,MAAM,EACN,SAAS,EACT,UAAU,EACV,WAAW,GACd,MAAM,YAAY,CAAC"}
|
|
@@ -54,6 +54,17 @@ export declare function getElementById(id: string | ((id: string) => boolean), n
|
|
|
54
54
|
* @returns All nodes with the supplied `tagName`.
|
|
55
55
|
*/
|
|
56
56
|
export declare function getElementsByTagName(tagName: string | ((name: string) => boolean), nodes: AnyNode | AnyNode[], recurse?: boolean, limit?: number): Element[];
|
|
57
|
+
/**
|
|
58
|
+
* Returns all nodes with the supplied `className`.
|
|
59
|
+
*
|
|
60
|
+
* @category Legacy Query Functions
|
|
61
|
+
* @param className Class name to search for.
|
|
62
|
+
* @param nodes Nodes to search through.
|
|
63
|
+
* @param recurse Also consider child nodes.
|
|
64
|
+
* @param limit Maximum number of nodes to return.
|
|
65
|
+
* @returns All nodes with the supplied `className`.
|
|
66
|
+
*/
|
|
67
|
+
export declare function getElementsByClassName(className: string | ((name: string) => boolean), nodes: AnyNode | AnyNode[], recurse?: boolean, limit?: number): Element[];
|
|
57
68
|
/**
|
|
58
69
|
* Returns all nodes with the supplied `type`.
|
|
59
70
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"legacy.d.ts","sourceRoot":"https://raw.githubusercontent.com/fb55/domutils/
|
|
1
|
+
{"version":3,"file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GAAG,CAAC,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,EAC7C,KAAK,EAAE,OAAO,GAAG,OAAO,EAAE,EAC1B,OAAO,UAAO,EACd,KAAK,GAAE,MAAiB,GACzB,OAAO,EAAE,CAOX;AAED;;;;;;;;;GASG;AACH,wBAAgB,sBAAsB,CAClC,SAAS,EAAE,MAAM,GAAG,CAAC,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,EAC/C,KAAK,EAAE,OAAO,GAAG,OAAO,EAAE,EAC1B,OAAO,UAAO,EACd,KAAK,GAAE,MAAiB,GACzB,OAAO,EAAE,CAOX;AAED;;;;;;;;;GASG;AACH,wBAAgB,oBAAoB,CAChC,IAAI,EAAE,WAAW,GAAG,CAAC,CAAC,IAAI,EAAE,WAAW,KAAK,OAAO,CAAC,EACpD,KAAK,EAAE,OAAO,GAAG,OAAO,EAAE,EAC1B,OAAO,UAAO,EACd,KAAK,GAAE,MAAiB,GACzB,OAAO,EAAE,CAEX"}
|
|
@@ -123,6 +123,19 @@ export function getElementById(id, nodes, recurse = true) {
|
|
|
123
123
|
export function getElementsByTagName(tagName, nodes, recurse = true, limit = Infinity) {
|
|
124
124
|
return filter(Checks["tag_name"](tagName), nodes, recurse, limit);
|
|
125
125
|
}
|
|
126
|
+
/**
|
|
127
|
+
* Returns all nodes with the supplied `className`.
|
|
128
|
+
*
|
|
129
|
+
* @category Legacy Query Functions
|
|
130
|
+
* @param className Class name to search for.
|
|
131
|
+
* @param nodes Nodes to search through.
|
|
132
|
+
* @param recurse Also consider child nodes.
|
|
133
|
+
* @param limit Maximum number of nodes to return.
|
|
134
|
+
* @returns All nodes with the supplied `className`.
|
|
135
|
+
*/
|
|
136
|
+
export function getElementsByClassName(className, nodes, recurse = true, limit = Infinity) {
|
|
137
|
+
return filter(getAttribCheck("class", className), nodes, recurse, limit);
|
|
138
|
+
}
|
|
126
139
|
/**
|
|
127
140
|
* Returns all nodes with the supplied `type`.
|
|
128
141
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"legacy.js","sourceRoot":"https://raw.githubusercontent.com/fb55/domutils/
|
|
1
|
+
{"version":3,"file":"legacy.js","sourceRoot":"https://raw.githubusercontent.com/fb55/domutils/41338488a4b941d89f58d777bd06c4feb4b20807/src/","sources":["legacy.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,EAAoB,MAAM,YAAY,CAAC;AAE7D,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAqBhD;;GAEG;AACH,MAAM,MAAM,GAGR;IACA,QAAQ,CAAC,IAAI;QACT,IAAI,OAAO,IAAI,KAAK,UAAU,EAAE,CAAC;YAC7B,OAAO,CAAC,IAAa,EAAE,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAC7D,CAAC;aAAM,IAAI,IAAI,KAAK,GAAG,EAAE,CAAC;YACtB,OAAO,KAAK,CAAC;QACjB,CAAC;QACD,OAAO,CAAC,IAAa,EAAE,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,IAAI,CAAC,IAAI,KAAK,IAAI,CAAC;IAChE,CAAC;IACD,QAAQ,CAAC,IAAI;QACT,IAAI,OAAO,IAAI,KAAK,UAAU,EAAE,CAAC;YAC7B,OAAO,CAAC,IAAa,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAC9C,CAAC;QACD,OAAO,CAAC,IAAa,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,KAAK,IAAI,CAAC;IACjD,CAAC;IACD,YAAY,CAAC,IAAI;QACb,IAAI,OAAO,IAAI,KAAK,UAAU,EAAE,CAAC;YAC7B,OAAO,CAAC,IAAa,EAAE,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAC9D,CAA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AO,MAAM,CACT,cAAc,CAAC,OAAO,EAAE,SAAS,CAAC,EAClC,KAAK,EACL,OAAO,EACP,KAAK,CACK,CAAC;AACnB,CAAC;AAED;;;;;;;;;GASG;AACH,MAAM,UAAU,oBAAoB,CAChC,IAAoD,EACpD,KAA0B,EAC1B,OAAO,GAAG,IAAI,EACd,QAAgB,QAAQ;IAExB,OAAO,MAAM,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC,IAAc,CAAC,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,CAAC,CAAC;AAC7E,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"manipulation.d.ts","sourceRoot":"https://raw.githubusercontent.com/fb55/domutils/
|
|
1
|
+
{"version":3,"file":"manipulation.d.ts","sourceRoot":"https://raw.githubusercontent.com/fb55/domutils/41338488a4b941d89f58d777bd06c4feb4b20807/src/","sources":["manipulation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAExD;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,SAAS,GAAG,IAAI,CAcnD;AAED;;;;;;GAMG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,SAAS,EAAE,WAAW,EAAE,SAAS,GAAG,IAAI,CAiB5E;AAED;;;;;;GAMG;AACH,wBAAgB,WAAW,CAAC,MAAM,EAAE,UAAU,EAAE,KAAK,EAAE,SAAS,GAAG,IAAI,CAatE;AAED;;;;;;GAMG;AACH,wBAAgB,MAAM,CAAC,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,SAAS,GAAG,IAAI,CAoB7D;AAED;;;;;;GAMG;AACH,wBAAgB,YAAY,CAAC,MAAM,EAAE,UAAU,EAAE,KAAK,EAAE,SAAS,GAAG,IAAI,CAavE;AAED;;;;;;GAMG;AACH,wBAAgB,OAAO,CAAC,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,SAAS,GAAG,IAAI,CAiB9D"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"manipulation.js","sourceRoot":"https://raw.githubusercontent.com/fb55/domutils/
|
|
1
|
+
{"version":3,"file":"manipulation.js","sourceRoot":"https://raw.githubusercontent.com/fb55/domutils/41338488a4b941d89f58d777bd06c4feb4b20807/src/","sources":["manipulation.ts"],"names":[],"mappings":"AAEA;;;;;GAKG;AACH,MAAM,UAAU,aAAa,CAAC,IAAe;IACzC,IAAI,IAAI,CAAC,IAAI;QAAE,IAAI,CAAC,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC;IAC1C,IAAI,IAAI,CAAC,IAAI;QAAE,IAAI,CAAC,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC;IAE1C,IAAI,IAAI,CAAC,MAAM,EAAE,CAAC;QACd,MAAM,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC;QACpC,MAAM,WAAW,GAAG,MAAM,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;QAC7C,IAAI,WAAW,IAAI,CAAC,EAAE,CAAC;YACnB,MAAM,CAAC,MAAM,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC;QAClC,CAAC;IACL,CAAC;IACD,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;IACjB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;IACjB,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC;AACvB,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,cAAc,CAAC,IAAe,EAAE,WAAsB;IAClE,MAAM,IAAI,GAAG,CAAC,WAAW,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC,CAAC;IAC5C,IAAI,IAAI,EAAE,CAAC;QACP,IAAI,CAAC,IAAI,GAAG,WAAW,CAAC;IAC5B,CAAC;IAED,MAAM,IAAI,GAAG,CAAC,WAAW,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC,CA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AM,CAAC,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,IAAI,CAAC,CAAC;IACjD,CAAC;IAED,IAAI,IAAI,CAAC,IAAI,EAAE,CAAC;QACZ,IAAI,CAAC,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;IAC1B,CAAC;IAED,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACrB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC;IACtB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;IACjB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;AACrB,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Element, AnyNode } from "domhandler";
|
|
1
|
+
import { Element, AnyNode, ParentNode } from "domhandler";
|
|
2
2
|
/**
|
|
3
3
|
* Search a node and its children for nodes passing a test function. If `node` is not an array, it will be wrapped in one.
|
|
4
4
|
*
|
|
@@ -20,7 +20,7 @@ export declare function filter(test: (elem: AnyNode) => boolean, node: AnyNode |
|
|
|
20
20
|
* @param limit Maximum number of nodes to return.
|
|
21
21
|
* @returns All nodes passing `test`.
|
|
22
22
|
*/
|
|
23
|
-
export declare function find(test: (elem: AnyNode) => boolean, nodes: AnyNode[], recurse: boolean, limit: number): AnyNode[];
|
|
23
|
+
export declare function find(test: (elem: AnyNode) => boolean, nodes: AnyNode[] | ParentNode, recurse: boolean, limit: number): AnyNode[];
|
|
24
24
|
/**
|
|
25
25
|
* Finds the first element inside of an array that matches a test function. This is an alias for `Array.prototype.find`.
|
|
26
26
|
*
|
|
@@ -40,7 +40,7 @@ export declare function findOneChild<T>(test: (elem: T) => boolean, nodes: T[]):
|
|
|
40
40
|
* @param recurse Also consider child nodes.
|
|
41
41
|
* @returns The first node that passes `test`.
|
|
42
42
|
*/
|
|
43
|
-
export declare function findOne(test: (elem: Element) => boolean, nodes: AnyNode[], recurse?: boolean): Element | null;
|
|
43
|
+
export declare function findOne(test: (elem: Element) => boolean, nodes: AnyNode[] | ParentNode, recurse?: boolean): Element | null;
|
|
44
44
|
/**
|
|
45
45
|
* Checks if a tree of nodes contains at least one node passing a test.
|
|
46
46
|
*
|
|
@@ -49,7 +49,7 @@ export declare function findOne(test: (elem: Element) => boolean, nodes: AnyNode
|
|
|
49
49
|
* @param nodes Array of nodes to search.
|
|
50
50
|
* @returns Whether a tree of nodes contains at least one node passing the test.
|
|
51
51
|
*/
|
|
52
|
-
export declare function existsOne(test: (elem: Element) => boolean, nodes: AnyNode[]): boolean;
|
|
52
|
+
export declare function existsOne(test: (elem: Element) => boolean, nodes: AnyNode[] | ParentNode): boolean;
|
|
53
53
|
/**
|
|
54
54
|
* Search an array of nodes and their children for elements passing a test function.
|
|
55
55
|
*
|
|
@@ -60,5 +60,5 @@ export declare function existsOne(test: (elem: Element) => boolean, nodes: AnyNo
|
|
|
60
60
|
* @param nodes Array of nodes to search.
|
|
61
61
|
* @returns All nodes passing `test`.
|
|
62
62
|
*/
|
|
63
|
-
export declare function findAll(test: (elem: Element) => boolean, nodes: AnyNode[]): Element[];
|
|
63
|
+
export declare function findAll(test: (elem: Element) => boolean, nodes: AnyNode[] | ParentNode): Element[];
|
|
64
64
|
//# sourceMappingURL=querying.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"querying.d.ts","sourceRoot":"https://raw.githubusercontent.com/fb55/domutils/
|
|
1
|
+
{"version":3,"file":"querying.d.ts","sourceRoot":"https://raw.githubusercontent.com/fb55/domutils/41338488a4b941d89f58d777bd06c4feb4b20807/src/","sources":["querying.ts"],"names":[],"mappings":"AAAA,OAAO,EAAsB,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAE9E;;;;;;;;;GASG;AACH,wBAAgB,MAAM,CAClB,IAAI,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,OAAO,EAChC,IAAI,EAAE,OAAO,GAAG,OAAO,EAAE,EACzB,OAAO,UAAO,EACd,KAAK,GAAE,MAAiB,GACzB,OAAO,EAAE,CAEX;AAED;;;;;;;;;GASG;AACH,wBAAgB,IAAI,CAChB,IAAI,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,OAAO,EAChC,KAAK,EAAE,OAAO,EAAE,GAAG,UAAU,EAC7B,OAAO,EAAE,OAAO,EAChB,KAAK,EAAE,MAAM,GACd,OAAO,EAAE,CAuCX;AAED;;;;;;;;GAQG;AACH,wBAAgB,YAAY,CAAC,CAAC,EAC1B,IAAI,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,OAAO,EAC1B,KAAK,EAAE,CAAC,EAAE,GACX,CAAC,GAAG,SAAS,CAEf;AAED;;;;;;;;GAQG;AACH,wBAAgB,OAAO,CACnB,IAAI,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,OAAO,EAChC,KAAK,EAAE,OAAO,EAAE,GAAG,UAAU,EAC7B,OAAO,UAAO,GACf,OAAO,GAAG,IAAI,CAahB;AAED;;;;;;;GAOG;AACH,wBAAgB,SAAS,CACrB,IAAI,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,OAAO,EAChC,KAAK,EAAE,OAAO,EAAE,GAAG,UAAU,GAC9B,OAAO,CAMT;AAED;;;;;;;;;GASG;AACH,wBAAgB,OAAO,CACnB,IAAI,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,OAAO,EAChC,KAAK,EAAE,OAAO,EAAE,GAAG,UAAU,GAC9B,OAAO,EAAE,CA4BX"}
|
|
@@ -25,7 +25,7 @@ export function filter(test, node, recurse = true, limit = Infinity) {
|
|
|
25
25
|
export function find(test, nodes, recurse, limit) {
|
|
26
26
|
const result = [];
|
|
27
27
|
/** Stack of the arrays we are looking at. */
|
|
28
|
-
const nodeStack = [nodes];
|
|
28
|
+
const nodeStack = [Array.isArray(nodes) ? nodes : [nodes]];
|
|
29
29
|
/** Stack of the indices within the arrays. */
|
|
30
30
|
const indexStack = [0];
|
|
31
31
|
for (;;) {
|
|
@@ -79,20 +79,17 @@ export function findOneChild(test, nodes) {
|
|
|
79
79
|
* @returns The first node that passes `test`.
|
|
80
80
|
*/
|
|
81
81
|
export function findOne(test, nodes, recurse = true) {
|
|
82
|
-
|
|
83
|
-
for (let i = 0; i <
|
|
84
|
-
const node =
|
|
85
|
-
if (
|
|
86
|
-
|
|
87
|
-
}
|
|
88
|
-
else if (test(node)) {
|
|
89
|
-
elem = node;
|
|
82
|
+
const searchedNodes = Array.isArray(nodes) ? nodes : [nodes];
|
|
83
|
+
for (let i = 0; i < searchedNodes.length; i++) {
|
|
84
|
+
const node = searchedNodes[i];
|
|
85
|
+
if (isTag(node) && test(node)) {
|
|
86
|
+
return node;
|
|
90
87
|
}
|
|
91
|
-
|
|
92
|
-
|
|
88
|
+
if (recurse && hasChildren(node) && node.children.length > 0) {
|
|
89
|
+
return findOne(test, node.children, true);
|
|
93
90
|
}
|
|
94
91
|
}
|
|
95
|
-
return
|
|
92
|
+
return null;
|
|
96
93
|
}
|
|
97
94
|
/**
|
|
98
95
|
* Checks if a tree of nodes contains at least one node passing a test.
|
|
@@ -103,8 +100,8 @@ export function findOne(test, nodes, recurse = true) {
|
|
|
103
100
|
* @returns Whether a tree of nodes contains at least one node passing the test.
|
|
104
101
|
*/
|
|
105
102
|
export function existsOne(test, nodes) {
|
|
106
|
-
return nodes.some((
|
|
107
|
-
(
|
|
103
|
+
return (Array.isArray(nodes) ? nodes : [nodes]).some((node) => (isTag(node) && test(node)) ||
|
|
104
|
+
(hasChildren(node) && existsOne(test, node.children)));
|
|
108
105
|
}
|
|
109
106
|
/**
|
|
110
107
|
* Search an array of nodes and their children for elements passing a test function.
|
|
@@ -118,7 +115,7 @@ export function existsOne(test, nodes) {
|
|
|
118
115
|
*/
|
|
119
116
|
export function findAll(test, nodes) {
|
|
120
117
|
const result = [];
|
|
121
|
-
const nodeStack = [nodes];
|
|
118
|
+
const nodeStack = [Array.isArray(nodes) ? nodes : [nodes]];
|
|
122
119
|
const indexStack = [0];
|
|
123
120
|
for (;;) {
|
|
124
121
|
if (indexStack[0] >= nodeStack[0].length) {
|
|
@@ -132,11 +129,9 @@ export function findAll(test, nodes) {
|
|
|
132
129
|
continue;
|
|
133
130
|
}
|
|
134
131
|
const elem = nodeStack[0][indexStack[0]++];
|
|
135
|
-
if (
|
|
136
|
-
continue;
|
|
137
|
-
if (test(elem))
|
|
132
|
+
if (isTag(elem) && test(elem))
|
|
138
133
|
result.push(elem);
|
|
139
|
-
if (elem.children.length > 0) {
|
|
134
|
+
if (hasChildren(elem) && elem.children.length > 0) {
|
|
140
135
|
indexStack.unshift(0);
|
|
141
136
|
nodeStack.unshift(elem.children);
|
|
142
137
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"querying.js","sourceRoot":"https://raw.githubusercontent.com/fb55/domutils/
|
|
1
|
+
{"version":3,"file":"querying.js","sourceRoot":"https://raw.githubusercontent.com/fb55/domutils/41338488a4b941d89f58d777bd06c4feb4b20807/src/","sources":["querying.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,WAAW,EAAgC,MAAM,YAAY,CAAC;AAE9E;;;;;;;;;GASG;AACH,MAAM,UAAU,MAAM,CAClB,IAAgC,EAChC,IAAyB,EACzB,OAAO,GAAG,IAAI,EACd,QAAgB,QAAQ;IAExB,OAAO,IAAI,CAAC,IAAI,EAAE,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,OAAO,EAAE,KAAK,CAAC,CAAC;AAC3E,CAAC;AAED;;;;;;;;;GASG;AACH,MAAM,UAAU,IAAI,CAChB,IAAgC,EAChC,KAA6B,EAC7B,OAAgB,EAChB,KAAa;IAEb,MAAM,MAAM,GAAc,EAAE,CAAC;IAC7B,6CAA6C;IAC7C,MAAM,SAAS,GAAgB,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK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