@wopee-io/wopee.wdio 4.0.0 → 4.7.0
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/build/adapter/fullPageScreenshotAdapter/default.d.ts +4 -0
- package/build/adapter/fullPageScreenshotAdapter/default.d.ts.map +1 -0
- package/build/adapter/fullPageScreenshotAdapter/default.js +13 -0
- package/build/adapter/fullPageScreenshotAdapter/default.js.map +1 -0
- package/build/adapter/fullPageScreenshotAdapter/fullPageScreenshotAdapter.d.ts +1 -9
- package/build/adapter/fullPageScreenshotAdapter/fullPageScreenshotAdapter.d.ts.map +1 -1
- package/build/adapter/fullPageScreenshotAdapter/fullPageScreenshotAdapter.interface.d.ts +24 -0
- package/build/adapter/fullPageScreenshotAdapter/fullPageScreenshotAdapter.interface.d.ts.map +1 -0
- package/build/adapter/fullPageScreenshotAdapter/fullPageScreenshotAdapter.interface.js +2 -0
- package/build/adapter/fullPageScreenshotAdapter/fullPageScreenshotAdapter.interface.js.map +1 -0
- package/build/adapter/fullPageScreenshotAdapter/fullPageScreenshotAdapter.js +8 -18
- package/build/adapter/fullPageScreenshotAdapter/fullPageScreenshotAdapter.js.map +1 -1
- package/build/adapter/fullPageScreenshotAdapter/swipe.d.ts +4 -0
- package/build/adapter/fullPageScreenshotAdapter/swipe.d.ts.map +1 -0
- package/build/adapter/fullPageScreenshotAdapter/swipe.js +19 -0
- package/build/adapter/fullPageScreenshotAdapter/swipe.js.map +1 -0
- package/build/core/domain/valueObjects/track.interface.d.ts +7 -3
- package/build/core/domain/valueObjects/track.interface.d.ts.map +1 -1
- package/build/core/domain/valueObjects/track.interface.js.map +1 -1
- package/build/{port/clientSideOperationPort → core/ports}/clientSideOperationPort.d.ts +1 -1
- package/build/core/ports/clientSideOperationPort.d.ts.map +1 -0
- package/build/core/ports/clientSideOperationPort.js.map +1 -0
- package/build/domain/model/config.interface.d.ts +2 -2
- package/build/domain/model/config.interface.d.ts.map +1 -1
- package/build/domain/model/config.interface.js.map +1 -1
- package/build/domain/model/instances.interface.d.ts +2 -2
- package/build/domain/model/instances.interface.d.ts.map +1 -1
- package/build/domain/model/instances.interface.js.map +1 -1
- package/build/domain/model/screenshotOutput.interface.d.ts +2 -2
- package/build/domain/model/screenshotOutput.interface.d.ts.map +1 -1
- package/build/domain/model/screenshotOutput.interface.js.map +1 -1
- package/build/domain/model/service.interface.d.ts +2 -2
- package/build/domain/model/service.interface.d.ts.map +1 -1
- package/build/domain/model/service.interface.js.map +1 -1
- package/build/domain/service/afterScreenshot.js.map +1 -1
- package/build/domain/service/wopeeService.d.ts +5 -5
- package/build/domain/service/wopeeService.d.ts.map +1 -1
- package/build/domain/service/wopeeService.js +17 -14
- package/build/domain/service/wopeeService.js.map +1 -1
- package/build/index.d.ts +3 -0
- package/build/index.d.ts.map +1 -1
- package/build/index.js +3 -0
- package/build/index.js.map +1 -1
- package/build/infrastructure/adapters/desktopBrowserClientOperationAdapter/clientSideScripts/getDocumentScrollHeight.d.ts.map +1 -0
- package/build/infrastructure/adapters/desktopBrowserClientOperationAdapter/clientSideScripts/getDocumentScrollHeight.js.map +1 -0
- package/build/{adapter → infrastructure/adapters}/desktopBrowserClientOperationAdapter/clientSideScripts/getElementPositionTopDom.d.ts +1 -1
- package/build/infrastructure/adapters/desktopBrowserClientOperationAdapter/clientSideScripts/getElementPositionTopDom.d.ts.map +1 -0
- package/build/infrastructure/adapters/desktopBrowserClientOperationAdapter/clientSideScripts/getElementPositionTopDom.js.map +1 -0
- package/build/{adapter → infrastructure/adapters}/desktopBrowserClientOperationAdapter/clientSideScripts/getElementPositionTopWindow.d.ts +1 -1
- package/build/infrastructure/adapters/desktopBrowserClientOperationAdapter/clientSideScripts/getElementPositionTopWindow.d.ts.map +1 -0
- package/build/infrastructure/adapters/desktopBrowserClientOperationAdapter/clientSideScripts/getElementPositionTopWindow.js.map +1 -0
- package/build/{adapter → infrastructure/adapters}/desktopBrowserClientOperationAdapter/clientSideScripts/getScreenDimensions.d.ts +1 -1
- package/build/infrastructure/adapters/desktopBrowserClientOperationAdapter/clientSideScripts/getScreenDimensions.d.ts.map +1 -0
- package/build/infrastructure/adapters/desktopBrowserClientOperationAdapter/clientSideScripts/getScreenDimensions.js.map +1 -0
- package/build/infrastructure/adapters/desktopBrowserClientOperationAdapter/clientSideScripts/screenDimensions.interfaces.d.ts.map +1 -0
- package/build/infrastructure/adapters/desktopBrowserClientOperationAdapter/clientSideScripts/screenDimensions.interfaces.js.map +1 -0
- package/build/infrastructure/adapters/desktopBrowserClientOperationAdapter/clientSideScripts/scrollElementIntoView.d.ts.map +1 -0
- package/build/infrastructure/adapters/desktopBrowserClientOperationAdapter/clientSideScripts/scrollElementIntoView.js.map +1 -0
- package/build/infrastructure/adapters/desktopBrowserClientOperationAdapter/clientSideScripts/scrollToPosition.d.ts.map +1 -0
- package/build/infrastructure/adapters/desktopBrowserClientOperationAdapter/clientSideScripts/scrollToPosition.js.map +1 -0
- package/build/{adapter → infrastructure/adapters}/desktopBrowserClientOperationAdapter/desktopBrowserClientOperationAdapter.d.ts +4 -4
- package/build/infrastructure/adapters/desktopBrowserClientOperationAdapter/desktopBrowserClientOperationAdapter.d.ts.map +1 -0
- package/build/infrastructure/adapters/desktopBrowserClientOperationAdapter/desktopBrowserClientOperationAdapter.js.map +1 -0
- package/build/{adapter/driven → infrastructure/adapters}/wdioLoggerAdapter/wdioLoggerAdapter.d.ts +1 -1
- package/build/infrastructure/adapters/wdioLoggerAdapter/wdioLoggerAdapter.d.ts.map +1 -0
- package/build/{adapter → infrastructure/adapters}/wdioLoggerAdapter/wdioLoggerAdapter.js +1 -1
- package/build/infrastructure/adapters/wdioLoggerAdapter/wdioLoggerAdapter.js.map +1 -0
- package/build/utils/versionMetadata.js +2 -2
- package/docs/mobile_native.md +14 -1
- package/node_modules/@autonomous-testing/sdk/.commit.hbs +71 -0
- package/node_modules/@autonomous-testing/sdk/.github/workflows/ci_cd.yaml +12 -0
- package/node_modules/@autonomous-testing/sdk/build/core/domain/entities/createIntegrationScenarioPayload.interface.d.ts +14 -0
- package/node_modules/@autonomous-testing/sdk/build/core/domain/entities/createIntegrationScenarioPayload.interface.js +10 -0
- package/node_modules/@autonomous-testing/sdk/build/core/domain/entities/createIntegrationStepPayload.interface.d.ts +32 -0
- package/node_modules/@autonomous-testing/sdk/build/core/domain/entities/createIntegrationStepPayload.interface.js +16 -0
- package/node_modules/@autonomous-testing/sdk/build/core/domain/entities/createIntegrationSuitePayload.interface.d.ts +11 -0
- package/node_modules/@autonomous-testing/sdk/build/core/domain/entities/createIntegrationSuitePayload.interface.js +9 -0
- package/node_modules/@autonomous-testing/sdk/build/core/domain/entities/index.d.ts +14 -0
- package/node_modules/@autonomous-testing/sdk/build/core/domain/entities/index.js +16 -0
- package/node_modules/@autonomous-testing/sdk/build/core/domain/entities/integrationScenario.interface.d.ts +14 -0
- package/node_modules/@autonomous-testing/sdk/build/core/domain/entities/integrationScenario.interface.js +10 -0
- package/node_modules/@autonomous-testing/sdk/build/core/domain/entities/integrationStep.interface.d.ts +24 -0
- package/node_modules/@autonomous-testing/sdk/build/core/domain/entities/integrationStep.interface.js +20 -0
- package/node_modules/@autonomous-testing/sdk/build/core/domain/entities/integrationSuite.interface.d.ts +14 -0
- package/node_modules/@autonomous-testing/sdk/build/core/domain/entities/integrationSuite.interface.js +10 -0
- package/node_modules/@autonomous-testing/sdk/build/core/domain/index.d.ts +1 -1
- package/node_modules/@autonomous-testing/sdk/build/core/domain/index.js +1 -1
- package/node_modules/@autonomous-testing/sdk/build/core/index.d.ts +2 -2
- package/node_modules/@autonomous-testing/sdk/build/core/index.js +2 -2
- package/node_modules/@autonomous-testing/sdk/build/core/ports/api.d.ts +16 -0
- package/node_modules/@autonomous-testing/sdk/build/core/ports/api.js +7 -0
- package/node_modules/@autonomous-testing/sdk/build/core/ports/index.d.ts +3 -3
- package/node_modules/@autonomous-testing/sdk/build/core/ports/index.js +5 -5
- package/node_modules/@autonomous-testing/sdk/build/index.d.ts +4 -3
- package/node_modules/@autonomous-testing/sdk/build/index.js +5 -3
- package/node_modules/@autonomous-testing/sdk/build/infrastructure/adapters/apolloAdapter/adapter.d.ts +19 -0
- package/node_modules/@autonomous-testing/sdk/build/infrastructure/adapters/apolloAdapter/adapter.js +123 -0
- package/node_modules/@autonomous-testing/sdk/build/infrastructure/adapters/apolloAdapter/factories.d.ts +9 -0
- package/node_modules/@autonomous-testing/sdk/build/infrastructure/adapters/apolloAdapter/factories.js +144 -0
- package/node_modules/@autonomous-testing/sdk/build/infrastructure/adapters/apolloAdapter/index.d.ts +4 -0
- package/node_modules/@autonomous-testing/sdk/build/infrastructure/adapters/apolloAdapter/index.js +8 -0
- package/node_modules/@autonomous-testing/sdk/build/infrastructure/adapters/apolloAdapter/interface.d.ts +235 -0
- package/node_modules/@autonomous-testing/sdk/build/infrastructure/adapters/apolloAdapter/interface.js +82 -0
- package/node_modules/@autonomous-testing/sdk/build/infrastructure/adapters/apolloAdapter/mutations.d.ts +5 -0
- package/node_modules/@autonomous-testing/sdk/build/infrastructure/adapters/{apolloTrackAdapter/apolloTrackAdapterQueries.js → apolloAdapter/mutations.js} +19 -36
- package/node_modules/@autonomous-testing/sdk/build/infrastructure/adapters/consoleLogger/consoleLogger.d.ts +1 -1
- package/node_modules/@autonomous-testing/sdk/build/infrastructure/adapters/consoleLogger/index.d.ts +1 -1
- package/node_modules/@autonomous-testing/sdk/build/infrastructure/adapters/consoleLogger/index.js +2 -2
- package/node_modules/@autonomous-testing/sdk/build/infrastructure/adapters/index.d.ts +3 -3
- package/node_modules/@autonomous-testing/sdk/build/infrastructure/adapters/index.js +3 -3
- package/node_modules/@autonomous-testing/sdk/build/infrastructure/adapters/noLogger/index.d.ts +1 -1
- package/node_modules/@autonomous-testing/sdk/build/infrastructure/adapters/noLogger/index.js +2 -2
- package/node_modules/@autonomous-testing/sdk/build/infrastructure/adapters/noLogger/noLogger.d.ts +1 -1
- package/node_modules/@autonomous-testing/sdk/build/infrastructure/index.d.ts +2 -2
- package/node_modules/@autonomous-testing/sdk/build/infrastructure/index.js +2 -2
- package/node_modules/@autonomous-testing/sdk/build/infrastructure/services/apolloAdapterService/apolloAdapterService.d.ts +4 -0
- package/node_modules/@autonomous-testing/sdk/build/infrastructure/services/apolloAdapterService/apolloAdapterService.js +12 -0
- package/node_modules/@autonomous-testing/sdk/build/infrastructure/services/apolloAdapterService/apolloService.interface.d.ts +7 -0
- package/node_modules/@autonomous-testing/sdk/build/{core/domain/valueObjects/index.js → infrastructure/services/apolloAdapterService/apolloService.interface.js} +1 -1
- package/node_modules/@autonomous-testing/sdk/build/infrastructure/services/apolloAdapterService/index.d.ts +4 -0
- package/node_modules/@autonomous-testing/sdk/build/infrastructure/services/apolloAdapterService/index.js +6 -0
- package/node_modules/@autonomous-testing/sdk/build/infrastructure/services/index.d.ts +2 -2
- package/node_modules/@autonomous-testing/sdk/build/infrastructure/services/index.js +2 -2
- package/node_modules/@autonomous-testing/sdk/build/infrastructure/services/loggerService/loggerOptions.interface.d.ts +16 -2
- package/node_modules/@autonomous-testing/sdk/build/infrastructure/services/loggerService/loggerOptions.interface.js +12 -0
- package/node_modules/@autonomous-testing/sdk/build/infrastructure/services/loggerService/loggerService.d.ts +2 -2
- package/node_modules/@autonomous-testing/sdk/build/infrastructure/services/loggerService/loggerService.js +17 -9
- package/node_modules/@autonomous-testing/sdk/build/shared/index.d.ts +2 -2
- package/node_modules/@autonomous-testing/sdk/build/shared/index.js +2 -2
- package/node_modules/@autonomous-testing/sdk/build/shared/metadata/versionMetadata.js +2 -2
- package/node_modules/@autonomous-testing/sdk/build/shared/utils/index.d.ts +3 -2
- package/node_modules/@autonomous-testing/sdk/build/shared/utils/index.js +4 -3
- package/node_modules/@autonomous-testing/sdk/build/shared/utils/mergeDicts/index.d.ts +3 -0
- package/node_modules/@autonomous-testing/sdk/build/shared/utils/mergeDicts/index.js +7 -0
- package/node_modules/@autonomous-testing/sdk/build/shared/utils/mergeDicts/mergeDicts.d.ts +17 -0
- package/node_modules/@autonomous-testing/sdk/build/shared/utils/mergeDicts/mergeDicts.js +29 -0
- package/node_modules/@autonomous-testing/sdk/build/shared/utils/zodHelper/index.d.ts +1 -1
- package/node_modules/@autonomous-testing/sdk/build/shared/utils/zodHelper/index.js +2 -2
- package/node_modules/@autonomous-testing/sdk/package.json +5 -8
- package/node_modules/@autonomous-testing/sdk/release.config.mjs +55 -0
- package/node_modules/axios/CHANGELOG.md +941 -950
- package/node_modules/axios/LICENSE +16 -4
- package/node_modules/axios/README.md +124 -828
- package/node_modules/axios/SECURITY.md +3 -4
- package/node_modules/axios/UPGRADE_GUIDE.md +168 -0
- package/node_modules/axios/dist/axios.js +2343 -3920
- package/node_modules/axios/dist/axios.map +1 -0
- package/node_modules/axios/dist/axios.min.js +3 -2
- package/node_modules/axios/dist/axios.min.map +1 -0
- package/node_modules/axios/index.d.ts +83 -391
- package/node_modules/axios/index.js +1 -43
- package/node_modules/axios/lib/adapters/http.js +219 -480
- package/node_modules/axios/lib/adapters/xhr.js +93 -61
- package/node_modules/axios/lib/axios.js +22 -47
- package/node_modules/axios/lib/cancel/CancelToken.js +89 -91
- package/node_modules/axios/lib/cancel/CanceledError.js +6 -9
- package/node_modules/axios/lib/cancel/isCancel.js +2 -2
- package/node_modules/axios/lib/core/Axios.js +98 -166
- package/node_modules/axios/lib/core/AxiosError.js +9 -23
- package/node_modules/axios/lib/core/InterceptorManager.js +45 -62
- package/node_modules/axios/lib/core/buildFullPath.js +4 -5
- package/node_modules/axios/lib/core/dispatchRequest.js +32 -26
- package/node_modules/axios/lib/core/mergeConfig.js +53 -59
- package/node_modules/axios/lib/core/settle.js +4 -6
- package/node_modules/axios/lib/core/transformData.js +9 -15
- package/node_modules/axios/lib/defaults/env/FormData.js +2 -0
- package/node_modules/axios/lib/defaults/index.js +57 -72
- package/node_modules/axios/lib/defaults/transitional.js +1 -1
- package/node_modules/axios/lib/env/data.js +3 -1
- package/node_modules/axios/lib/helpers/bind.js +7 -3
- package/node_modules/axios/lib/helpers/buildURL.js +33 -26
- package/node_modules/axios/lib/helpers/combineURLs.js +3 -4
- package/node_modules/axios/lib/helpers/cookies.js +50 -39
- package/node_modules/axios/lib/helpers/deprecatedMethod.js +2 -4
- package/node_modules/axios/lib/helpers/isAbsoluteURL.js +2 -3
- package/node_modules/axios/lib/helpers/isAxiosError.js +3 -4
- package/node_modules/axios/lib/helpers/isURLSameOrigin.js +46 -45
- package/node_modules/axios/lib/helpers/normalizeHeaderName.js +12 -0
- package/node_modules/axios/lib/helpers/null.js +1 -1
- package/node_modules/axios/lib/helpers/parseHeaders.js +22 -24
- package/node_modules/axios/lib/helpers/parseProtocol.js +3 -3
- package/node_modules/axios/lib/helpers/spread.js +2 -3
- package/node_modules/axios/lib/helpers/toFormData.js +36 -183
- package/node_modules/axios/lib/helpers/validator.js +15 -20
- package/node_modules/axios/lib/utils.js +187 -445
- package/node_modules/axios/package.json +33 -165
- package/node_modules/axios/tsconfig.json +14 -0
- package/node_modules/axios/tslint.json +6 -0
- package/node_modules/process/.eslintrc +21 -0
- package/node_modules/process/LICENSE +22 -0
- package/node_modules/process/README.md +26 -0
- package/node_modules/process/browser.js +184 -0
- package/node_modules/process/index.js +2 -0
- package/node_modules/process/package.json +27 -0
- package/node_modules/process/test.js +199 -0
- package/package.json +2 -2
- package/build/adapter/desktopBrowserClientOperationAdapter/clientSideScripts/getDocumentScrollHeight.d.ts.map +0 -1
- package/build/adapter/desktopBrowserClientOperationAdapter/clientSideScripts/getDocumentScrollHeight.js.map +0 -1
- package/build/adapter/desktopBrowserClientOperationAdapter/clientSideScripts/getElementPositionTopDom.d.ts.map +0 -1
- package/build/adapter/desktopBrowserClientOperationAdapter/clientSideScripts/getElementPositionTopDom.js.map +0 -1
- package/build/adapter/desktopBrowserClientOperationAdapter/clientSideScripts/getElementPositionTopWindow.d.ts.map +0 -1
- package/build/adapter/desktopBrowserClientOperationAdapter/clientSideScripts/getElementPositionTopWindow.js.map +0 -1
- package/build/adapter/desktopBrowserClientOperationAdapter/clientSideScripts/getScreenDimensions.d.ts.map +0 -1
- package/build/adapter/desktopBrowserClientOperationAdapter/clientSideScripts/getScreenDimensions.js.map +0 -1
- package/build/adapter/desktopBrowserClientOperationAdapter/clientSideScripts/screenDimensions.interfaces.d.ts.map +0 -1
- package/build/adapter/desktopBrowserClientOperationAdapter/clientSideScripts/screenDimensions.interfaces.js.map +0 -1
- package/build/adapter/desktopBrowserClientOperationAdapter/clientSideScripts/scrollElementIntoView.d.ts.map +0 -1
- package/build/adapter/desktopBrowserClientOperationAdapter/clientSideScripts/scrollElementIntoView.js.map +0 -1
- package/build/adapter/desktopBrowserClientOperationAdapter/clientSideScripts/scrollToPosition.d.ts.map +0 -1
- package/build/adapter/desktopBrowserClientOperationAdapter/clientSideScripts/scrollToPosition.js.map +0 -1
- package/build/adapter/desktopBrowserClientOperationAdapter/desktopBrowserClientOperationAdapter.d.ts.map +0 -1
- package/build/adapter/desktopBrowserClientOperationAdapter/desktopBrowserClientOperationAdapter.js.map +0 -1
- package/build/adapter/driven/wdioLoggerAdapter/wdioLoggerAdapter.d.ts.map +0 -1
- package/build/adapter/driven/wdioLoggerAdapter/wdioLoggerAdapter.js +0 -20
- package/build/adapter/driven/wdioLoggerAdapter/wdioLoggerAdapter.js.map +0 -1
- package/build/adapter/wdioLoggerAdapter/wdioLoggerAdapter.d.ts +0 -10
- package/build/adapter/wdioLoggerAdapter/wdioLoggerAdapter.d.ts.map +0 -1
- package/build/adapter/wdioLoggerAdapter/wdioLoggerAdapter.js.map +0 -1
- package/build/port/clientSideOperationPort/clientSideOperationPort.d.ts.map +0 -1
- package/build/port/clientSideOperationPort/clientSideOperationPort.js.map +0 -1
- package/node_modules/@autonomous-testing/sdk/build/core/domain/valueObjects/imageTrackingResult.interface.d.ts +0 -3
- package/node_modules/@autonomous-testing/sdk/build/core/domain/valueObjects/imageTrackingResult.interface.js +0 -3
- package/node_modules/@autonomous-testing/sdk/build/core/domain/valueObjects/index.d.ts +0 -4
- package/node_modules/@autonomous-testing/sdk/build/core/domain/valueObjects/trackPayload.interface.d.ts +0 -3
- package/node_modules/@autonomous-testing/sdk/build/core/domain/valueObjects/trackPayload.interface.js +0 -3
- package/node_modules/@autonomous-testing/sdk/build/core/ports/imageTracker.d.ts +0 -6
- package/node_modules/@autonomous-testing/sdk/build/core/ports/imageTracker.js +0 -7
- package/node_modules/@autonomous-testing/sdk/build/infrastructure/adapters/apolloTrackAdapter/apolloTrackAdapter.d.ts +0 -39
- package/node_modules/@autonomous-testing/sdk/build/infrastructure/adapters/apolloTrackAdapter/apolloTrackAdapter.default.d.ts +0 -16
- package/node_modules/@autonomous-testing/sdk/build/infrastructure/adapters/apolloTrackAdapter/apolloTrackAdapter.default.js +0 -31
- package/node_modules/@autonomous-testing/sdk/build/infrastructure/adapters/apolloTrackAdapter/apolloTrackAdapter.interface.d.ts +0 -93
- package/node_modules/@autonomous-testing/sdk/build/infrastructure/adapters/apolloTrackAdapter/apolloTrackAdapter.interface.js +0 -14
- package/node_modules/@autonomous-testing/sdk/build/infrastructure/adapters/apolloTrackAdapter/apolloTrackAdapter.js +0 -153
- package/node_modules/@autonomous-testing/sdk/build/infrastructure/adapters/apolloTrackAdapter/apolloTrackAdapterQueries.d.ts +0 -5
- package/node_modules/@autonomous-testing/sdk/build/infrastructure/adapters/apolloTrackAdapter/apolloTrackAdapterUtils.d.ts +0 -9
- package/node_modules/@autonomous-testing/sdk/build/infrastructure/adapters/apolloTrackAdapter/apolloTrackAdapterUtils.js +0 -26
- package/node_modules/@autonomous-testing/sdk/build/infrastructure/adapters/apolloTrackAdapter/index.d.ts +0 -7
- package/node_modules/@autonomous-testing/sdk/build/infrastructure/adapters/apolloTrackAdapter/index.js +0 -8
- package/node_modules/@autonomous-testing/sdk/build/infrastructure/services/apolloTrackAdapterService/apolloTrackAdapterService.d.ts +0 -4
- package/node_modules/@autonomous-testing/sdk/build/infrastructure/services/apolloTrackAdapterService/apolloTrackAdapterService.interface.d.ts +0 -51
- package/node_modules/@autonomous-testing/sdk/build/infrastructure/services/apolloTrackAdapterService/apolloTrackAdapterService.interface.js +0 -24
- package/node_modules/@autonomous-testing/sdk/build/infrastructure/services/apolloTrackAdapterService/apolloTrackAdapterService.js +0 -13
- package/node_modules/@autonomous-testing/sdk/build/infrastructure/services/apolloTrackAdapterService/index.d.ts +0 -4
- package/node_modules/@autonomous-testing/sdk/build/infrastructure/services/apolloTrackAdapterService/index.js +0 -6
- package/node_modules/axios/MIGRATION_GUIDE.md +0 -3
- package/node_modules/axios/dist/axios.js.map +0 -1
- package/node_modules/axios/dist/axios.min.js.map +0 -1
- package/node_modules/axios/dist/browser/axios.cjs +0 -3638
- package/node_modules/axios/dist/browser/axios.cjs.map +0 -1
- package/node_modules/axios/dist/esm/axios.js +0 -3661
- package/node_modules/axios/dist/esm/axios.js.map +0 -1
- package/node_modules/axios/dist/esm/axios.min.js +0 -2
- package/node_modules/axios/dist/esm/axios.min.js.map +0 -1
- package/node_modules/axios/dist/node/axios.cjs +0 -4705
- package/node_modules/axios/dist/node/axios.cjs.map +0 -1
- package/node_modules/axios/index.d.cts +0 -545
- package/node_modules/axios/lib/adapters/adapters.js +0 -79
- package/node_modules/axios/lib/adapters/fetch.js +0 -227
- package/node_modules/axios/lib/core/AxiosHeaders.js +0 -302
- package/node_modules/axios/lib/env/classes/FormData.js +0 -2
- package/node_modules/axios/lib/helpers/AxiosTransformStream.js +0 -192
- package/node_modules/axios/lib/helpers/AxiosURLSearchParams.js +0 -58
- package/node_modules/axios/lib/helpers/HttpStatusCode.js +0 -71
- package/node_modules/axios/lib/helpers/ZlibHeaderTransformStream.js +0 -28
- package/node_modules/axios/lib/helpers/callbackify.js +0 -16
- package/node_modules/axios/lib/helpers/composeSignals.js +0 -46
- package/node_modules/axios/lib/helpers/formDataToJSON.js +0 -95
- package/node_modules/axios/lib/helpers/formDataToStream.js +0 -111
- package/node_modules/axios/lib/helpers/fromDataURI.js +0 -53
- package/node_modules/axios/lib/helpers/progressEventReducer.js +0 -32
- package/node_modules/axios/lib/helpers/readBlob.js +0 -15
- package/node_modules/axios/lib/helpers/resolveConfig.js +0 -57
- package/node_modules/axios/lib/helpers/speedometer.js +0 -55
- package/node_modules/axios/lib/helpers/throttle.js +0 -35
- package/node_modules/axios/lib/helpers/toURLEncodedForm.js +0 -18
- package/node_modules/axios/lib/helpers/trackStream.js +0 -55
- package/node_modules/axios/lib/platform/browser/classes/Blob.js +0 -3
- package/node_modules/axios/lib/platform/browser/classes/FormData.js +0 -3
- package/node_modules/axios/lib/platform/browser/classes/URLSearchParams.js +0 -4
- package/node_modules/axios/lib/platform/browser/index.js +0 -13
- package/node_modules/axios/lib/platform/common/utils.js +0 -50
- package/node_modules/axios/lib/platform/index.js +0 -7
- package/node_modules/axios/lib/platform/node/classes/FormData.js +0 -3
- package/node_modules/axios/lib/platform/node/classes/URLSearchParams.js +0 -4
- package/node_modules/axios/lib/platform/node/index.js +0 -12
- package/node_modules/proxy-from-env/.eslintrc +0 -29
- package/node_modules/proxy-from-env/.travis.yml +0 -10
- package/node_modules/proxy-from-env/LICENSE +0 -20
- package/node_modules/proxy-from-env/README.md +0 -131
- package/node_modules/proxy-from-env/index.js +0 -108
- package/node_modules/proxy-from-env/package.json +0 -34
- package/node_modules/proxy-from-env/test.js +0 -483
- /package/build/{port/clientSideOperationPort → core/ports}/clientSideOperationPort.js +0 -0
- /package/build/{adapter → infrastructure/adapters}/desktopBrowserClientOperationAdapter/clientSideScripts/getDocumentScrollHeight.d.ts +0 -0
- /package/build/{adapter → infrastructure/adapters}/desktopBrowserClientOperationAdapter/clientSideScripts/getDocumentScrollHeight.js +0 -0
- /package/build/{adapter → infrastructure/adapters}/desktopBrowserClientOperationAdapter/clientSideScripts/getElementPositionTopDom.js +0 -0
- /package/build/{adapter → infrastructure/adapters}/desktopBrowserClientOperationAdapter/clientSideScripts/getElementPositionTopWindow.js +0 -0
- /package/build/{adapter → infrastructure/adapters}/desktopBrowserClientOperationAdapter/clientSideScripts/getScreenDimensions.js +0 -0
- /package/build/{adapter → infrastructure/adapters}/desktopBrowserClientOperationAdapter/clientSideScripts/screenDimensions.interfaces.d.ts +0 -0
- /package/build/{adapter → infrastructure/adapters}/desktopBrowserClientOperationAdapter/clientSideScripts/screenDimensions.interfaces.js +0 -0
- /package/build/{adapter → infrastructure/adapters}/desktopBrowserClientOperationAdapter/clientSideScripts/scrollElementIntoView.d.ts +0 -0
- /package/build/{adapter → infrastructure/adapters}/desktopBrowserClientOperationAdapter/clientSideScripts/scrollElementIntoView.js +0 -0
- /package/build/{adapter → infrastructure/adapters}/desktopBrowserClientOperationAdapter/clientSideScripts/scrollToPosition.d.ts +0 -0
- /package/build/{adapter → infrastructure/adapters}/desktopBrowserClientOperationAdapter/clientSideScripts/scrollToPosition.js +0 -0
- /package/build/{adapter → infrastructure/adapters}/desktopBrowserClientOperationAdapter/desktopBrowserClientOperationAdapter.js +0 -0
- /package/node_modules/{mime-db → mime-types/node_modules/mime-db}/HISTORY.md +0 -0
- /package/node_modules/{mime-db → mime-types/node_modules/mime-db}/LICENSE +0 -0
- /package/node_modules/{mime-db → mime-types/node_modules/mime-db}/README.md +0 -0
- /package/node_modules/{mime-db → mime-types/node_modules/mime-db}/db.json +0 -0
- /package/node_modules/{mime-db → mime-types/node_modules/mime-db}/index.js +0 -0
- /package/node_modules/{mime-db → mime-types/node_modules/mime-db}/package.json +0 -0
|
@@ -1,315 +1,96 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
import AxiosTransformStream from '../helpers/AxiosTransformStream.js';
|
|
22
|
-
import {EventEmitter} from 'events';
|
|
23
|
-
import formDataToStream from "../helpers/formDataToStream.js";
|
|
24
|
-
import readBlob from "../helpers/readBlob.js";
|
|
25
|
-
import ZlibHeaderTransformStream from '../helpers/ZlibHeaderTransformStream.js';
|
|
26
|
-
import callbackify from "../helpers/callbackify.js";
|
|
27
|
-
|
|
28
|
-
const zlibOptions = {
|
|
29
|
-
flush: zlib.constants.Z_SYNC_FLUSH,
|
|
30
|
-
finishFlush: zlib.constants.Z_SYNC_FLUSH
|
|
31
|
-
};
|
|
32
|
-
|
|
33
|
-
const brotliOptions = {
|
|
34
|
-
flush: zlib.constants.BROTLI_OPERATION_FLUSH,
|
|
35
|
-
finishFlush: zlib.constants.BROTLI_OPERATION_FLUSH
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
const isBrotliSupported = utils.isFunction(zlib.createBrotliDecompress);
|
|
39
|
-
|
|
40
|
-
const {http: httpFollow, https: httpsFollow} = followRedirects;
|
|
41
|
-
|
|
42
|
-
const isHttps = /https:?/;
|
|
43
|
-
|
|
44
|
-
const supportedProtocols = platform.protocols.map(protocol => {
|
|
45
|
-
return protocol + ':';
|
|
46
|
-
});
|
|
47
|
-
|
|
48
|
-
/**
|
|
49
|
-
* If the proxy or config beforeRedirects functions are defined, call them with the options
|
|
50
|
-
* object.
|
|
51
|
-
*
|
|
52
|
-
* @param {Object<string, any>} options - The options object that was passed to the request.
|
|
53
|
-
*
|
|
54
|
-
* @returns {Object<string, any>}
|
|
55
|
-
*/
|
|
56
|
-
function dispatchBeforeRedirect(options, responseDetails) {
|
|
57
|
-
if (options.beforeRedirects.proxy) {
|
|
58
|
-
options.beforeRedirects.proxy(options);
|
|
59
|
-
}
|
|
60
|
-
if (options.beforeRedirects.config) {
|
|
61
|
-
options.beforeRedirects.config(options, responseDetails);
|
|
62
|
-
}
|
|
63
|
-
}
|
|
3
|
+
var utils = require('./../utils');
|
|
4
|
+
var settle = require('./../core/settle');
|
|
5
|
+
var buildFullPath = require('../core/buildFullPath');
|
|
6
|
+
var buildURL = require('./../helpers/buildURL');
|
|
7
|
+
var http = require('http');
|
|
8
|
+
var https = require('https');
|
|
9
|
+
var httpFollow = require('follow-redirects').http;
|
|
10
|
+
var httpsFollow = require('follow-redirects').https;
|
|
11
|
+
var url = require('url');
|
|
12
|
+
var zlib = require('zlib');
|
|
13
|
+
var VERSION = require('./../env/data').version;
|
|
14
|
+
var transitionalDefaults = require('../defaults/transitional');
|
|
15
|
+
var AxiosError = require('../core/AxiosError');
|
|
16
|
+
var CanceledError = require('../cancel/CanceledError');
|
|
17
|
+
|
|
18
|
+
var isHttps = /https:?/;
|
|
19
|
+
|
|
20
|
+
var supportedProtocols = [ 'http:', 'https:', 'file:' ];
|
|
64
21
|
|
|
65
22
|
/**
|
|
66
|
-
* If the proxy or config afterRedirects functions are defined, call them with the options
|
|
67
23
|
*
|
|
68
24
|
* @param {http.ClientRequestArgs} options
|
|
69
|
-
* @param {AxiosProxyConfig}
|
|
25
|
+
* @param {AxiosProxyConfig} proxy
|
|
70
26
|
* @param {string} location
|
|
71
|
-
*
|
|
72
|
-
* @returns {http.ClientRequestArgs}
|
|
73
27
|
*/
|
|
74
|
-
function setProxy(options,
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
28
|
+
function setProxy(options, proxy, location) {
|
|
29
|
+
options.hostname = proxy.host;
|
|
30
|
+
options.host = proxy.host;
|
|
31
|
+
options.port = proxy.port;
|
|
32
|
+
options.path = location;
|
|
33
|
+
|
|
34
|
+
// Basic proxy authorization
|
|
35
|
+
if (proxy.auth) {
|
|
36
|
+
var base64 = Buffer.from(proxy.auth.username + ':' + proxy.auth.password, 'utf8').toString('base64');
|
|
37
|
+
options.headers['Proxy-Authorization'] = 'Basic ' + base64;
|
|
81
38
|
}
|
|
82
|
-
if (proxy) {
|
|
83
|
-
// Basic proxy authorization
|
|
84
|
-
if (proxy.username) {
|
|
85
|
-
proxy.auth = (proxy.username || '') + ':' + (proxy.password || '');
|
|
86
|
-
}
|
|
87
39
|
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
}
|
|
93
|
-
const base64 = Buffer
|
|
94
|
-
.from(proxy.auth, 'utf8')
|
|
95
|
-
.toString('base64');
|
|
96
|
-
options.headers['Proxy-Authorization'] = 'Basic ' + base64;
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
options.headers.host = options.hostname + (options.port ? ':' + options.port : '');
|
|
100
|
-
const proxyHost = proxy.hostname || proxy.host;
|
|
101
|
-
options.hostname = proxyHost;
|
|
102
|
-
// Replace 'host' since options is not a URL object
|
|
103
|
-
options.host = proxyHost;
|
|
104
|
-
options.port = proxy.port;
|
|
105
|
-
options.path = location;
|
|
106
|
-
if (proxy.protocol) {
|
|
107
|
-
options.protocol = proxy.protocol.includes(':') ? proxy.protocol : `${proxy.protocol}:`;
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
options.beforeRedirects.proxy = function beforeRedirect(redirectOptions) {
|
|
112
|
-
// Configure proxy for redirected request, passing the original config proxy to apply
|
|
113
|
-
// the exact same logic as if the redirected request was performed by axios directly.
|
|
114
|
-
setProxy(redirectOptions, configProxy, redirectOptions.href);
|
|
40
|
+
// If a proxy is used, any redirects must also pass through the proxy
|
|
41
|
+
options.beforeRedirect = function beforeRedirect(redirection) {
|
|
42
|
+
redirection.headers.host = redirection.host;
|
|
43
|
+
setProxy(redirection, proxy, redirection.href);
|
|
115
44
|
};
|
|
116
45
|
}
|
|
117
46
|
|
|
118
|
-
const isHttpAdapterSupported = typeof process !== 'undefined' && utils.kindOf(process) === 'process';
|
|
119
|
-
|
|
120
|
-
// temporary hotfix
|
|
121
|
-
|
|
122
|
-
const wrapAsync = (asyncExecutor) => {
|
|
123
|
-
return new Promise((resolve, reject) => {
|
|
124
|
-
let onDone;
|
|
125
|
-
let isDone;
|
|
126
|
-
|
|
127
|
-
const done = (value, isRejected) => {
|
|
128
|
-
if (isDone) return;
|
|
129
|
-
isDone = true;
|
|
130
|
-
onDone && onDone(value, isRejected);
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
const _resolve = (value) => {
|
|
134
|
-
done(value);
|
|
135
|
-
resolve(value);
|
|
136
|
-
};
|
|
137
|
-
|
|
138
|
-
const _reject = (reason) => {
|
|
139
|
-
done(reason, true);
|
|
140
|
-
reject(reason);
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
asyncExecutor(_resolve, _reject, (onDoneHandler) => (onDone = onDoneHandler)).catch(_reject);
|
|
144
|
-
})
|
|
145
|
-
};
|
|
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
|
-
|
|
159
47
|
/*eslint consistent-return:0*/
|
|
160
|
-
|
|
161
|
-
return
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
const method = config.method.toUpperCase();
|
|
165
|
-
let isDone;
|
|
166
|
-
let rejected = false;
|
|
167
|
-
let req;
|
|
168
|
-
|
|
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
|
-
if (err) {
|
|
175
|
-
return cb(err);
|
|
176
|
-
}
|
|
177
|
-
|
|
178
|
-
const addresses = utils.isArray(arg0) ? arg0.map(addr => buildAddressEntry(addr)) : [buildAddressEntry(arg0, arg1)];
|
|
179
|
-
|
|
180
|
-
opt.all ? cb(err, addresses) : cb(err, addresses[0].address, addresses[0].family);
|
|
181
|
-
});
|
|
182
|
-
}
|
|
183
|
-
}
|
|
184
|
-
|
|
185
|
-
// temporary internal emitter until the AxiosRequest class will be implemented
|
|
186
|
-
const emitter = new EventEmitter();
|
|
187
|
-
|
|
188
|
-
const onFinished = () => {
|
|
48
|
+
module.exports = function httpAdapter(config) {
|
|
49
|
+
return new Promise(function dispatchHttpRequest(resolvePromise, rejectPromise) {
|
|
50
|
+
var onCanceled;
|
|
51
|
+
function done() {
|
|
189
52
|
if (config.cancelToken) {
|
|
190
|
-
config.cancelToken.unsubscribe(
|
|
53
|
+
config.cancelToken.unsubscribe(onCanceled);
|
|
191
54
|
}
|
|
192
55
|
|
|
193
56
|
if (config.signal) {
|
|
194
|
-
config.signal.removeEventListener('abort',
|
|
57
|
+
config.signal.removeEventListener('abort', onCanceled);
|
|
195
58
|
}
|
|
196
|
-
|
|
197
|
-
emitter.removeAllListeners();
|
|
198
59
|
}
|
|
60
|
+
var resolve = function resolve(value) {
|
|
61
|
+
done();
|
|
62
|
+
resolvePromise(value);
|
|
63
|
+
};
|
|
64
|
+
var rejected = false;
|
|
65
|
+
var reject = function reject(value) {
|
|
66
|
+
done();
|
|
67
|
+
rejected = true;
|
|
68
|
+
rejectPromise(value);
|
|
69
|
+
};
|
|
70
|
+
var data = config.data;
|
|
71
|
+
var headers = config.headers;
|
|
72
|
+
var headerNames = {};
|
|
199
73
|
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
if (isRejected) {
|
|
203
|
-
rejected = true;
|
|
204
|
-
onFinished();
|
|
205
|
-
}
|
|
74
|
+
Object.keys(headers).forEach(function storeLowerName(name) {
|
|
75
|
+
headerNames[name.toLowerCase()] = name;
|
|
206
76
|
});
|
|
207
77
|
|
|
208
|
-
function abort(reason) {
|
|
209
|
-
emitter.emit('abort', !reason || reason.type ? new CanceledError(null, config, req) : reason);
|
|
210
|
-
}
|
|
211
|
-
|
|
212
|
-
emitter.once('abort', reject);
|
|
213
|
-
|
|
214
|
-
if (config.cancelToken || config.signal) {
|
|
215
|
-
config.cancelToken && config.cancelToken.subscribe(abort);
|
|
216
|
-
if (config.signal) {
|
|
217
|
-
config.signal.aborted ? abort() : config.signal.addEventListener('abort', abort);
|
|
218
|
-
}
|
|
219
|
-
}
|
|
220
|
-
|
|
221
|
-
// Parse url
|
|
222
|
-
const fullPath = buildFullPath(config.baseURL, config.url);
|
|
223
|
-
const parsed = new URL(fullPath, 'http://localhost');
|
|
224
|
-
const protocol = parsed.protocol || supportedProtocols[0];
|
|
225
|
-
|
|
226
|
-
if (protocol === 'data:') {
|
|
227
|
-
let convertedData;
|
|
228
|
-
|
|
229
|
-
if (method !== 'GET') {
|
|
230
|
-
return settle(resolve, reject, {
|
|
231
|
-
status: 405,
|
|
232
|
-
statusText: 'method not allowed',
|
|
233
|
-
headers: {},
|
|
234
|
-
config
|
|
235
|
-
});
|
|
236
|
-
}
|
|
237
|
-
|
|
238
|
-
try {
|
|
239
|
-
convertedData = fromDataURI(config.url, responseType === 'blob', {
|
|
240
|
-
Blob: config.env && config.env.Blob
|
|
241
|
-
});
|
|
242
|
-
} catch (err) {
|
|
243
|
-
throw AxiosError.from(err, AxiosError.ERR_BAD_REQUEST, config);
|
|
244
|
-
}
|
|
245
|
-
|
|
246
|
-
if (responseType === 'text') {
|
|
247
|
-
convertedData = convertedData.toString(responseEncoding);
|
|
248
|
-
|
|
249
|
-
if (!responseEncoding || responseEncoding === 'utf8') {
|
|
250
|
-
convertedData = utils.stripBOM(convertedData);
|
|
251
|
-
}
|
|
252
|
-
} else if (responseType === 'stream') {
|
|
253
|
-
convertedData = stream.Readable.from(convertedData);
|
|
254
|
-
}
|
|
255
|
-
|
|
256
|
-
return settle(resolve, reject, {
|
|
257
|
-
data: convertedData,
|
|
258
|
-
status: 200,
|
|
259
|
-
statusText: 'OK',
|
|
260
|
-
headers: new AxiosHeaders(),
|
|
261
|
-
config
|
|
262
|
-
});
|
|
263
|
-
}
|
|
264
|
-
|
|
265
|
-
if (supportedProtocols.indexOf(protocol) === -1) {
|
|
266
|
-
return reject(new AxiosError(
|
|
267
|
-
'Unsupported protocol ' + protocol,
|
|
268
|
-
AxiosError.ERR_BAD_REQUEST,
|
|
269
|
-
config
|
|
270
|
-
));
|
|
271
|
-
}
|
|
272
|
-
|
|
273
|
-
const headers = AxiosHeaders.from(config.headers).normalize();
|
|
274
|
-
|
|
275
78
|
// Set User-Agent (required by some servers)
|
|
276
79
|
// See https://github.com/axios/axios/issues/69
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
const onDownloadProgress = config.onDownloadProgress;
|
|
282
|
-
const onUploadProgress = config.onUploadProgress;
|
|
283
|
-
const maxRate = config.maxRate;
|
|
284
|
-
let maxUploadRate = undefined;
|
|
285
|
-
let maxDownloadRate = undefined;
|
|
286
|
-
|
|
287
|
-
// support for spec compliant FormData objects
|
|
288
|
-
if (utils.isSpecCompliantForm(data)) {
|
|
289
|
-
const userBoundary = headers.getContentType(/boundary=([-_\w\d]{10,70})/i);
|
|
290
|
-
|
|
291
|
-
data = formDataToStream(data, (formHeaders) => {
|
|
292
|
-
headers.set(formHeaders);
|
|
293
|
-
}, {
|
|
294
|
-
tag: `axios-${VERSION}-boundary`,
|
|
295
|
-
boundary: userBoundary && userBoundary[1] || undefined
|
|
296
|
-
});
|
|
297
|
-
// support for https://www.npmjs.com/package/form-data api
|
|
298
|
-
} else if (utils.isFormData(data) && utils.isFunction(data.getHeaders)) {
|
|
299
|
-
headers.set(data.getHeaders());
|
|
300
|
-
|
|
301
|
-
if (!headers.hasContentLength()) {
|
|
302
|
-
try {
|
|
303
|
-
const knownLength = await util.promisify(data.getLength).call(data);
|
|
304
|
-
Number.isFinite(knownLength) && knownLength >= 0 && headers.setContentLength(knownLength);
|
|
305
|
-
/*eslint no-empty:0*/
|
|
306
|
-
} catch (e) {
|
|
307
|
-
}
|
|
80
|
+
if ('user-agent' in headerNames) {
|
|
81
|
+
// User-Agent is specified; handle case where no UA header is desired
|
|
82
|
+
if (!headers[headerNames['user-agent']]) {
|
|
83
|
+
delete headers[headerNames['user-agent']];
|
|
308
84
|
}
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
85
|
+
// Otherwise, use specified value
|
|
86
|
+
} else {
|
|
87
|
+
// Only set header if it hasn't been set in config
|
|
88
|
+
headers['User-Agent'] = 'axios/' + VERSION;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
// support for https://www.npmjs.com/package/form-data api
|
|
92
|
+
if (utils.isFormData(data) && utils.isFunction(data.getHeaders)) {
|
|
93
|
+
Object.assign(headers, data.getHeaders());
|
|
313
94
|
} else if (data && !utils.isStream(data)) {
|
|
314
95
|
if (Buffer.isBuffer(data)) {
|
|
315
96
|
// Nothing to do...
|
|
@@ -325,9 +106,6 @@ export default isHttpAdapterSupported && function httpAdapter(config) {
|
|
|
325
106
|
));
|
|
326
107
|
}
|
|
327
108
|
|
|
328
|
-
// Add Content-Length header if data exists
|
|
329
|
-
headers.setContentLength(data.length, false);
|
|
330
|
-
|
|
331
109
|
if (config.maxBodyLength > -1 && data.length > config.maxBodyLength) {
|
|
332
110
|
return reject(new AxiosError(
|
|
333
111
|
'Request body larger than maxBodyLength limit',
|
|
@@ -335,116 +113,145 @@ export default isHttpAdapterSupported && function httpAdapter(config) {
|
|
|
335
113
|
config
|
|
336
114
|
));
|
|
337
115
|
}
|
|
338
|
-
}
|
|
339
|
-
|
|
340
|
-
const contentLength = utils.toFiniteNumber(headers.getContentLength());
|
|
341
|
-
|
|
342
|
-
if (utils.isArray(maxRate)) {
|
|
343
|
-
maxUploadRate = maxRate[0];
|
|
344
|
-
maxDownloadRate = maxRate[1];
|
|
345
|
-
} else {
|
|
346
|
-
maxUploadRate = maxDownloadRate = maxRate;
|
|
347
|
-
}
|
|
348
116
|
|
|
349
|
-
|
|
350
|
-
if (!
|
|
351
|
-
|
|
117
|
+
// Add Content-Length header if data exists
|
|
118
|
+
if (!headerNames['content-length']) {
|
|
119
|
+
headers['Content-Length'] = data.length;
|
|
352
120
|
}
|
|
353
|
-
|
|
354
|
-
data = stream.pipeline([data, new AxiosTransformStream({
|
|
355
|
-
length: contentLength,
|
|
356
|
-
maxRate: utils.toFiniteNumber(maxUploadRate)
|
|
357
|
-
})], utils.noop);
|
|
358
|
-
|
|
359
|
-
onUploadProgress && data.on('progress', progress => {
|
|
360
|
-
onUploadProgress(Object.assign(progress, {
|
|
361
|
-
upload: true
|
|
362
|
-
}));
|
|
363
|
-
});
|
|
364
121
|
}
|
|
365
122
|
|
|
366
123
|
// HTTP basic authentication
|
|
367
|
-
|
|
124
|
+
var auth = undefined;
|
|
368
125
|
if (config.auth) {
|
|
369
|
-
|
|
370
|
-
|
|
126
|
+
var username = config.auth.username || '';
|
|
127
|
+
var password = config.auth.password || '';
|
|
371
128
|
auth = username + ':' + password;
|
|
372
129
|
}
|
|
373
130
|
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
131
|
+
// Parse url
|
|
132
|
+
var fullPath = buildFullPath(config.baseURL, config.url);
|
|
133
|
+
var parsed = url.parse(fullPath);
|
|
134
|
+
var protocol = parsed.protocol || supportedProtocols[0];
|
|
135
|
+
|
|
136
|
+
if (supportedProtocols.indexOf(protocol) === -1) {
|
|
137
|
+
return reject(new AxiosError(
|
|
138
|
+
'Unsupported protocol ' + protocol,
|
|
139
|
+
AxiosError.ERR_BAD_REQUEST,
|
|
140
|
+
config
|
|
141
|
+
));
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
if (!auth && parsed.auth) {
|
|
145
|
+
var urlAuth = parsed.auth.split(':');
|
|
146
|
+
var urlUsername = urlAuth[0] || '';
|
|
147
|
+
var urlPassword = urlAuth[1] || '';
|
|
377
148
|
auth = urlUsername + ':' + urlPassword;
|
|
378
149
|
}
|
|
379
150
|
|
|
380
|
-
auth &&
|
|
151
|
+
if (auth && headerNames.authorization) {
|
|
152
|
+
delete headers[headerNames.authorization];
|
|
153
|
+
}
|
|
381
154
|
|
|
382
|
-
|
|
155
|
+
var isHttpsRequest = isHttps.test(protocol);
|
|
156
|
+
var agent = isHttpsRequest ? config.httpsAgent : config.httpAgent;
|
|
383
157
|
|
|
384
158
|
try {
|
|
385
|
-
path
|
|
386
|
-
parsed.pathname + parsed.search,
|
|
387
|
-
config.params,
|
|
388
|
-
config.paramsSerializer
|
|
389
|
-
).replace(/^\?/, '');
|
|
159
|
+
buildURL(parsed.path, config.params, config.paramsSerializer).replace(/^\?/, '');
|
|
390
160
|
} catch (err) {
|
|
391
|
-
|
|
161
|
+
var customErr = new Error(err.message);
|
|
392
162
|
customErr.config = config;
|
|
393
163
|
customErr.url = config.url;
|
|
394
164
|
customErr.exists = true;
|
|
395
|
-
|
|
165
|
+
reject(customErr);
|
|
396
166
|
}
|
|
397
167
|
|
|
398
|
-
|
|
399
|
-
'
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
const options = {
|
|
404
|
-
path,
|
|
405
|
-
method: method,
|
|
406
|
-
headers: headers.toJSON(),
|
|
168
|
+
var options = {
|
|
169
|
+
path: buildURL(parsed.path, config.params, config.paramsSerializer).replace(/^\?/, ''),
|
|
170
|
+
method: config.method.toUpperCase(),
|
|
171
|
+
headers: headers,
|
|
172
|
+
agent: agent,
|
|
407
173
|
agents: { http: config.httpAgent, https: config.httpsAgent },
|
|
408
|
-
auth
|
|
409
|
-
protocol,
|
|
410
|
-
family,
|
|
411
|
-
beforeRedirect: dispatchBeforeRedirect,
|
|
412
|
-
beforeRedirects: {}
|
|
174
|
+
auth: auth
|
|
413
175
|
};
|
|
414
176
|
|
|
415
|
-
// cacheable-lookup integration hotfix
|
|
416
|
-
!utils.isUndefined(lookup) && (options.lookup = lookup);
|
|
417
|
-
|
|
418
177
|
if (config.socketPath) {
|
|
419
178
|
options.socketPath = config.socketPath;
|
|
420
179
|
} else {
|
|
421
180
|
options.hostname = parsed.hostname;
|
|
422
181
|
options.port = parsed.port;
|
|
423
|
-
setProxy(options, config.proxy, protocol + '//' + parsed.hostname + (parsed.port ? ':' + parsed.port : '') + options.path);
|
|
424
182
|
}
|
|
425
183
|
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
184
|
+
var proxy = config.proxy;
|
|
185
|
+
if (!proxy && proxy !== false) {
|
|
186
|
+
var proxyEnv = protocol.slice(0, -1) + '_proxy';
|
|
187
|
+
var proxyUrl = process.env[proxyEnv] || process.env[proxyEnv.toUpperCase()];
|
|
188
|
+
if (proxyUrl) {
|
|
189
|
+
var parsedProxyUrl = url.parse(proxyUrl);
|
|
190
|
+
var noProxyEnv = process.env.no_proxy || process.env.NO_PROXY;
|
|
191
|
+
var shouldProxy = true;
|
|
192
|
+
|
|
193
|
+
if (noProxyEnv) {
|
|
194
|
+
var noProxy = noProxyEnv.split(',').map(function trim(s) {
|
|
195
|
+
return s.trim();
|
|
196
|
+
});
|
|
197
|
+
|
|
198
|
+
shouldProxy = !noProxy.some(function proxyMatch(proxyElement) {
|
|
199
|
+
if (!proxyElement) {
|
|
200
|
+
return false;
|
|
201
|
+
}
|
|
202
|
+
if (proxyElement === '*') {
|
|
203
|
+
return true;
|
|
204
|
+
}
|
|
205
|
+
if (proxyElement[0] === '.' &&
|
|
206
|
+
parsed.hostname.substr(parsed.hostname.length - proxyElement.length) === proxyElement) {
|
|
207
|
+
return true;
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
return parsed.hostname === proxyElement;
|
|
211
|
+
});
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
if (shouldProxy) {
|
|
215
|
+
proxy = {
|
|
216
|
+
host: parsedProxyUrl.hostname,
|
|
217
|
+
port: parsedProxyUrl.port,
|
|
218
|
+
protocol: parsedProxyUrl.protocol
|
|
219
|
+
};
|
|
220
|
+
|
|
221
|
+
if (parsedProxyUrl.auth) {
|
|
222
|
+
var proxyUrlAuth = parsedProxyUrl.auth.split(':');
|
|
223
|
+
proxy.auth = {
|
|
224
|
+
username: proxyUrlAuth[0],
|
|
225
|
+
password: proxyUrlAuth[1]
|
|
226
|
+
};
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
if (proxy) {
|
|
233
|
+
options.headers.host = parsed.hostname + (parsed.port ? ':' + parsed.port : '');
|
|
234
|
+
setProxy(options, proxy, protocol + '//' + parsed.hostname + (parsed.port ? ':' + parsed.port : '') + options.path);
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
var transport;
|
|
238
|
+
var isHttpsProxy = isHttpsRequest && (proxy ? isHttps.test(proxy.protocol) : true);
|
|
429
239
|
if (config.transport) {
|
|
430
240
|
transport = config.transport;
|
|
431
241
|
} else if (config.maxRedirects === 0) {
|
|
432
|
-
transport =
|
|
242
|
+
transport = isHttpsProxy ? https : http;
|
|
433
243
|
} else {
|
|
434
244
|
if (config.maxRedirects) {
|
|
435
245
|
options.maxRedirects = config.maxRedirects;
|
|
436
246
|
}
|
|
437
247
|
if (config.beforeRedirect) {
|
|
438
|
-
options.
|
|
248
|
+
options.beforeRedirect = config.beforeRedirect;
|
|
439
249
|
}
|
|
440
|
-
transport =
|
|
250
|
+
transport = isHttpsProxy ? httpsFollow : httpFollow;
|
|
441
251
|
}
|
|
442
252
|
|
|
443
253
|
if (config.maxBodyLength > -1) {
|
|
444
254
|
options.maxBodyLength = config.maxBodyLength;
|
|
445
|
-
} else {
|
|
446
|
-
// follow-redirects does not skip comparison, so it should always succeed for axios -1 unlimited
|
|
447
|
-
options.maxBodyLength = Infinity;
|
|
448
255
|
}
|
|
449
256
|
|
|
450
257
|
if (config.insecureHTTPParser) {
|
|
@@ -452,155 +259,94 @@ export default isHttpAdapterSupported && function httpAdapter(config) {
|
|
|
452
259
|
}
|
|
453
260
|
|
|
454
261
|
// Create the request
|
|
455
|
-
req = transport.request(options, function handleResponse(res) {
|
|
456
|
-
if (req.
|
|
457
|
-
|
|
458
|
-
const streams = [res];
|
|
262
|
+
var req = transport.request(options, function handleResponse(res) {
|
|
263
|
+
if (req.aborted) return;
|
|
459
264
|
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
if (onDownloadProgress) {
|
|
463
|
-
const transformStream = new AxiosTransformStream({
|
|
464
|
-
length: utils.toFiniteNumber(responseLength),
|
|
465
|
-
maxRate: utils.toFiniteNumber(maxDownloadRate)
|
|
466
|
-
});
|
|
467
|
-
|
|
468
|
-
onDownloadProgress && transformStream.on('progress', progress => {
|
|
469
|
-
onDownloadProgress(Object.assign(progress, {
|
|
470
|
-
download: true
|
|
471
|
-
}));
|
|
472
|
-
});
|
|
473
|
-
|
|
474
|
-
streams.push(transformStream);
|
|
475
|
-
}
|
|
476
|
-
|
|
477
|
-
// decompress the response body transparently if required
|
|
478
|
-
let responseStream = res;
|
|
265
|
+
// uncompress the response body transparently if required
|
|
266
|
+
var stream = res;
|
|
479
267
|
|
|
480
268
|
// return the last request in case of redirects
|
|
481
|
-
|
|
269
|
+
var lastRequest = res.req || req;
|
|
482
270
|
|
|
483
|
-
// if decompress disabled we should not decompress
|
|
484
|
-
if (config.decompress !== false && res.headers['content-encoding']) {
|
|
485
|
-
// if no content, but headers still say that it is encoded,
|
|
486
|
-
// remove the header not confuse downstream operations
|
|
487
|
-
if (method === 'HEAD' || res.statusCode === 204) {
|
|
488
|
-
delete res.headers['content-encoding'];
|
|
489
|
-
}
|
|
490
271
|
|
|
491
|
-
|
|
272
|
+
// if no content, is HEAD request or decompress disabled we should not decompress
|
|
273
|
+
if (res.statusCode !== 204 && lastRequest.method !== 'HEAD' && config.decompress !== false) {
|
|
274
|
+
switch (res.headers['content-encoding']) {
|
|
492
275
|
/*eslint default-case:0*/
|
|
493
276
|
case 'gzip':
|
|
494
|
-
case 'x-gzip':
|
|
495
277
|
case 'compress':
|
|
496
|
-
case 'x-compress':
|
|
497
|
-
// add the unzipper to the body stream processing pipeline
|
|
498
|
-
streams.push(zlib.createUnzip(zlibOptions));
|
|
499
|
-
|
|
500
|
-
// remove the content-encoding in order to not confuse downstream operations
|
|
501
|
-
delete res.headers['content-encoding'];
|
|
502
|
-
break;
|
|
503
278
|
case 'deflate':
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
// add the unzipper to the body stream processing pipeline
|
|
507
|
-
streams.push(zlib.createUnzip(zlibOptions));
|
|
279
|
+
// add the unzipper to the body stream processing pipeline
|
|
280
|
+
stream = stream.pipe(zlib.createUnzip());
|
|
508
281
|
|
|
509
282
|
// remove the content-encoding in order to not confuse downstream operations
|
|
510
283
|
delete res.headers['content-encoding'];
|
|
511
284
|
break;
|
|
512
|
-
case 'br':
|
|
513
|
-
if (isBrotliSupported) {
|
|
514
|
-
streams.push(zlib.createBrotliDecompress(brotliOptions));
|
|
515
|
-
delete res.headers['content-encoding'];
|
|
516
|
-
}
|
|
517
285
|
}
|
|
518
286
|
}
|
|
519
287
|
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
const offListeners = stream.finished(responseStream, () => {
|
|
523
|
-
offListeners();
|
|
524
|
-
onFinished();
|
|
525
|
-
});
|
|
526
|
-
|
|
527
|
-
const response = {
|
|
288
|
+
var response = {
|
|
528
289
|
status: res.statusCode,
|
|
529
290
|
statusText: res.statusMessage,
|
|
530
|
-
headers:
|
|
531
|
-
config,
|
|
291
|
+
headers: res.headers,
|
|
292
|
+
config: config,
|
|
532
293
|
request: lastRequest
|
|
533
294
|
};
|
|
534
295
|
|
|
535
|
-
if (responseType === 'stream') {
|
|
536
|
-
response.data =
|
|
296
|
+
if (config.responseType === 'stream') {
|
|
297
|
+
response.data = stream;
|
|
537
298
|
settle(resolve, reject, response);
|
|
538
299
|
} else {
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
responseStream.on('data', function handleStreamData(chunk) {
|
|
300
|
+
var responseBuffer = [];
|
|
301
|
+
var totalResponseBytes = 0;
|
|
302
|
+
stream.on('data', function handleStreamData(chunk) {
|
|
543
303
|
responseBuffer.push(chunk);
|
|
544
304
|
totalResponseBytes += chunk.length;
|
|
545
305
|
|
|
546
306
|
// make sure the content length is not over the maxContentLength if specified
|
|
547
307
|
if (config.maxContentLength > -1 && totalResponseBytes > config.maxContentLength) {
|
|
548
|
-
// stream.
|
|
308
|
+
// stream.destoy() emit aborted event before calling reject() on Node.js v16
|
|
549
309
|
rejected = true;
|
|
550
|
-
|
|
310
|
+
stream.destroy();
|
|
551
311
|
reject(new AxiosError('maxContentLength size of ' + config.maxContentLength + ' exceeded',
|
|
552
312
|
AxiosError.ERR_BAD_RESPONSE, config, lastRequest));
|
|
553
313
|
}
|
|
554
314
|
});
|
|
555
315
|
|
|
556
|
-
|
|
316
|
+
stream.on('aborted', function handlerStreamAborted() {
|
|
557
317
|
if (rejected) {
|
|
558
318
|
return;
|
|
559
319
|
}
|
|
560
|
-
|
|
561
|
-
|
|
320
|
+
stream.destroy();
|
|
321
|
+
reject(new AxiosError(
|
|
562
322
|
'maxContentLength size of ' + config.maxContentLength + ' exceeded',
|
|
563
323
|
AxiosError.ERR_BAD_RESPONSE,
|
|
564
324
|
config,
|
|
565
325
|
lastRequest
|
|
566
|
-
);
|
|
567
|
-
responseStream.destroy(err);
|
|
568
|
-
reject(err);
|
|
326
|
+
));
|
|
569
327
|
});
|
|
570
328
|
|
|
571
|
-
|
|
572
|
-
if (req.
|
|
329
|
+
stream.on('error', function handleStreamError(err) {
|
|
330
|
+
if (req.aborted) return;
|
|
573
331
|
reject(AxiosError.from(err, null, config, lastRequest));
|
|
574
332
|
});
|
|
575
333
|
|
|
576
|
-
|
|
334
|
+
stream.on('end', function handleStreamEnd() {
|
|
577
335
|
try {
|
|
578
|
-
|
|
579
|
-
if (responseType !== 'arraybuffer') {
|
|
580
|
-
responseData = responseData.toString(responseEncoding);
|
|
581
|
-
if (!responseEncoding || responseEncoding === 'utf8') {
|
|
336
|
+
var responseData = responseBuffer.length === 1 ? responseBuffer[0] : Buffer.concat(responseBuffer);
|
|
337
|
+
if (config.responseType !== 'arraybuffer') {
|
|
338
|
+
responseData = responseData.toString(config.responseEncoding);
|
|
339
|
+
if (!config.responseEncoding || config.responseEncoding === 'utf8') {
|
|
582
340
|
responseData = utils.stripBOM(responseData);
|
|
583
341
|
}
|
|
584
342
|
}
|
|
585
343
|
response.data = responseData;
|
|
586
344
|
} catch (err) {
|
|
587
|
-
|
|
345
|
+
reject(AxiosError.from(err, null, config, response.request, response));
|
|
588
346
|
}
|
|
589
347
|
settle(resolve, reject, response);
|
|
590
348
|
});
|
|
591
349
|
}
|
|
592
|
-
|
|
593
|
-
emitter.once('abort', err => {
|
|
594
|
-
if (!responseStream.destroyed) {
|
|
595
|
-
responseStream.emit('error', err);
|
|
596
|
-
responseStream.destroy();
|
|
597
|
-
}
|
|
598
|
-
});
|
|
599
|
-
});
|
|
600
|
-
|
|
601
|
-
emitter.once('abort', err => {
|
|
602
|
-
reject(err);
|
|
603
|
-
req.destroy(err);
|
|
604
350
|
});
|
|
605
351
|
|
|
606
352
|
// Handle errors
|
|
@@ -619,9 +365,9 @@ export default isHttpAdapterSupported && function httpAdapter(config) {
|
|
|
619
365
|
// Handle request timeout
|
|
620
366
|
if (config.timeout) {
|
|
621
367
|
// This is forcing a int timeout to avoid problems if the `req` interface doesn't handle other types.
|
|
622
|
-
|
|
368
|
+
var timeout = parseInt(config.timeout, 10);
|
|
623
369
|
|
|
624
|
-
if (
|
|
370
|
+
if (isNaN(timeout)) {
|
|
625
371
|
reject(new AxiosError(
|
|
626
372
|
'error trying to parse `config.timeout` to int',
|
|
627
373
|
AxiosError.ERR_BAD_OPTION_VALUE,
|
|
@@ -635,51 +381,44 @@ export default isHttpAdapterSupported && function httpAdapter(config) {
|
|
|
635
381
|
// Sometime, the response will be very slow, and does not respond, the connect event will be block by event loop system.
|
|
636
382
|
// And timer callback will be fired, and abort() will be invoked before connection, then get "socket hang up" and code ECONNRESET.
|
|
637
383
|
// At this time, if we have a large number of request, nodejs will hang up some socket on background. and the number will up and up.
|
|
638
|
-
// And then these socket which be hang up will
|
|
384
|
+
// And then these socket which be hang up will devoring CPU little by little.
|
|
639
385
|
// ClientRequest.setTimeout will be fired on the specify milliseconds, and can make sure that abort() will be fired after connect.
|
|
640
386
|
req.setTimeout(timeout, function handleRequestTimeout() {
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
const transitional = config.transitional || transitionalDefaults;
|
|
644
|
-
if (config.timeoutErrorMessage) {
|
|
645
|
-
timeoutErrorMessage = config.timeoutErrorMessage;
|
|
646
|
-
}
|
|
387
|
+
req.abort();
|
|
388
|
+
var transitional = config.transitional || transitionalDefaults;
|
|
647
389
|
reject(new AxiosError(
|
|
648
|
-
|
|
390
|
+
'timeout of ' + timeout + 'ms exceeded',
|
|
649
391
|
transitional.clarifyTimeoutError ? AxiosError.ETIMEDOUT : AxiosError.ECONNABORTED,
|
|
650
392
|
config,
|
|
651
393
|
req
|
|
652
394
|
));
|
|
653
|
-
abort();
|
|
654
395
|
});
|
|
655
396
|
}
|
|
656
397
|
|
|
398
|
+
if (config.cancelToken || config.signal) {
|
|
399
|
+
// Handle cancellation
|
|
400
|
+
// eslint-disable-next-line func-names
|
|
401
|
+
onCanceled = function(cancel) {
|
|
402
|
+
if (req.aborted) return;
|
|
657
403
|
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
let errored = false;
|
|
662
|
-
|
|
663
|
-
data.on('end', () => {
|
|
664
|
-
ended = true;
|
|
665
|
-
});
|
|
404
|
+
req.abort();
|
|
405
|
+
reject(!cancel || (cancel && cancel.type) ? new CanceledError() : cancel);
|
|
406
|
+
};
|
|
666
407
|
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
}
|
|
408
|
+
config.cancelToken && config.cancelToken.subscribe(onCanceled);
|
|
409
|
+
if (config.signal) {
|
|
410
|
+
config.signal.aborted ? onCanceled() : config.signal.addEventListener('abort', onCanceled);
|
|
411
|
+
}
|
|
412
|
+
}
|
|
671
413
|
|
|
672
|
-
data.on('close', () => {
|
|
673
|
-
if (!ended && !errored) {
|
|
674
|
-
abort(new CanceledError('Request stream has been aborted', config, req));
|
|
675
|
-
}
|
|
676
|
-
});
|
|
677
414
|
|
|
678
|
-
|
|
415
|
+
// Send the request
|
|
416
|
+
if (utils.isStream(data)) {
|
|
417
|
+
data.on('error', function handleStreamError(err) {
|
|
418
|
+
reject(AxiosError.from(err, config, null, req));
|
|
419
|
+
}).pipe(req);
|
|
679
420
|
} else {
|
|
680
421
|
req.end(data);
|
|
681
422
|
}
|
|
682
423
|
});
|
|
683
|
-
}
|
|
684
|
-
|
|
685
|
-
export const __setProxy = setProxy;
|
|
424
|
+
};
|