@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
|
@@ -4,12 +4,11 @@
|
|
|
4
4
|
* Determines whether the specified URL is absolute
|
|
5
5
|
*
|
|
6
6
|
* @param {string} url The URL to test
|
|
7
|
-
*
|
|
8
7
|
* @returns {boolean} True if the specified URL is absolute, otherwise false
|
|
9
8
|
*/
|
|
10
|
-
|
|
9
|
+
module.exports = function isAbsoluteURL(url) {
|
|
11
10
|
// A URL is considered absolute if it begins with "<scheme>://" or "//" (protocol-relative URL).
|
|
12
11
|
// RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed
|
|
13
12
|
// by any combination of letters, digits, plus, period, or hyphen.
|
|
14
13
|
return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(url);
|
|
15
|
-
}
|
|
14
|
+
};
|
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
var utils = require('./../utils');
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* Determines whether the payload is an error thrown by Axios
|
|
7
7
|
*
|
|
8
8
|
* @param {*} payload The value to test
|
|
9
|
-
*
|
|
10
9
|
* @returns {boolean} True if the payload is an error thrown by Axios, otherwise false
|
|
11
10
|
*/
|
|
12
|
-
|
|
11
|
+
module.exports = function isAxiosError(payload) {
|
|
13
12
|
return utils.isObject(payload) && (payload.isAxiosError === true);
|
|
14
|
-
}
|
|
13
|
+
};
|
|
@@ -1,67 +1,68 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
import platform from '../platform/index.js';
|
|
3
|
+
var utils = require('./../utils');
|
|
5
4
|
|
|
6
|
-
|
|
5
|
+
module.exports = (
|
|
6
|
+
utils.isStandardBrowserEnv() ?
|
|
7
7
|
|
|
8
|
-
// Standard browser envs have full support of the APIs needed to test
|
|
9
|
-
// whether the request URL is of the same origin as current location.
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
8
|
+
// Standard browser envs have full support of the APIs needed to test
|
|
9
|
+
// whether the request URL is of the same origin as current location.
|
|
10
|
+
(function standardBrowserEnv() {
|
|
11
|
+
var msie = /(msie|trident)/i.test(navigator.userAgent);
|
|
12
|
+
var urlParsingNode = document.createElement('a');
|
|
13
|
+
var originURL;
|
|
14
14
|
|
|
15
|
-
|
|
16
|
-
* Parse a URL to discover
|
|
15
|
+
/**
|
|
16
|
+
* Parse a URL to discover it's components
|
|
17
17
|
*
|
|
18
18
|
* @param {String} url The URL to be parsed
|
|
19
19
|
* @returns {Object}
|
|
20
20
|
*/
|
|
21
|
-
|
|
22
|
-
|
|
21
|
+
function resolveURL(url) {
|
|
22
|
+
var href = url;
|
|
23
23
|
|
|
24
|
-
|
|
24
|
+
if (msie) {
|
|
25
25
|
// IE needs attribute set twice to normalize properties
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
26
|
+
urlParsingNode.setAttribute('href', href);
|
|
27
|
+
href = urlParsingNode.href;
|
|
28
|
+
}
|
|
29
29
|
|
|
30
|
-
|
|
30
|
+
urlParsingNode.setAttribute('href', href);
|
|
31
31
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
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
46
|
|
|
47
|
-
|
|
47
|
+
originURL = resolveURL(window.location.href);
|
|
48
48
|
|
|
49
|
-
|
|
49
|
+
/**
|
|
50
50
|
* Determine if a URL shares the same origin as the current location
|
|
51
51
|
*
|
|
52
52
|
* @param {String} requestURL The URL to test
|
|
53
53
|
* @returns {boolean} True if URL shares the same origin, otherwise false
|
|
54
54
|
*/
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
55
|
+
return function isURLSameOrigin(requestURL) {
|
|
56
|
+
var parsed = (utils.isString(requestURL)) ? resolveURL(requestURL) : requestURL;
|
|
57
|
+
return (parsed.protocol === originURL.protocol &&
|
|
58
|
+
parsed.host === originURL.host);
|
|
59
|
+
};
|
|
60
|
+
})() :
|
|
61
61
|
|
|
62
62
|
// Non standard browser envs (web workers, react-native) lack needed support.
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
63
|
+
(function nonStandardBrowserEnv() {
|
|
64
|
+
return function isURLSameOrigin() {
|
|
65
|
+
return true;
|
|
66
|
+
};
|
|
67
|
+
})()
|
|
68
|
+
);
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var utils = require('../utils');
|
|
4
|
+
|
|
5
|
+
module.exports = function normalizeHeaderName(headers, normalizedName) {
|
|
6
|
+
utils.forEach(headers, function processHeader(value, name) {
|
|
7
|
+
if (name !== normalizedName && name.toUpperCase() === normalizedName.toUpperCase()) {
|
|
8
|
+
headers[normalizedName] = value;
|
|
9
|
+
delete headers[name];
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// eslint-disable-next-line strict
|
|
2
|
-
|
|
2
|
+
module.exports = null;
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
var utils = require('./../utils');
|
|
4
4
|
|
|
5
|
-
//
|
|
5
|
+
// Headers whose duplicates are ignored by node
|
|
6
6
|
// c.f. https://nodejs.org/api/http.html#http_message_headers
|
|
7
|
-
|
|
7
|
+
var ignoreDuplicateOf = [
|
|
8
8
|
'age', 'authorization', 'content-length', 'content-type', 'etag',
|
|
9
9
|
'expires', 'from', 'host', 'if-modified-since', 'if-unmodified-since',
|
|
10
10
|
'last-modified', 'location', 'max-forwards', 'proxy-authorization',
|
|
11
11
|
'referer', 'retry-after', 'user-agent'
|
|
12
|
-
]
|
|
12
|
+
];
|
|
13
13
|
|
|
14
14
|
/**
|
|
15
15
|
* Parse headers into an object
|
|
@@ -21,33 +21,31 @@ const ignoreDuplicateOf = utils.toObjectSet([
|
|
|
21
21
|
* Transfer-Encoding: chunked
|
|
22
22
|
* ```
|
|
23
23
|
*
|
|
24
|
-
* @param {String}
|
|
25
|
-
*
|
|
24
|
+
* @param {String} headers Headers needing to be parsed
|
|
26
25
|
* @returns {Object} Headers parsed into an object
|
|
27
26
|
*/
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
27
|
+
module.exports = function parseHeaders(headers) {
|
|
28
|
+
var parsed = {};
|
|
29
|
+
var key;
|
|
30
|
+
var val;
|
|
31
|
+
var i;
|
|
33
32
|
|
|
34
|
-
|
|
35
|
-
i = line.indexOf(':');
|
|
36
|
-
key = line.substring(0, i).trim().toLowerCase();
|
|
37
|
-
val = line.substring(i + 1).trim();
|
|
33
|
+
if (!headers) { return parsed; }
|
|
38
34
|
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
35
|
+
utils.forEach(headers.split('\n'), function parser(line) {
|
|
36
|
+
i = line.indexOf(':');
|
|
37
|
+
key = utils.trim(line.substr(0, i)).toLowerCase();
|
|
38
|
+
val = utils.trim(line.substr(i + 1));
|
|
42
39
|
|
|
43
|
-
if (key
|
|
44
|
-
if (parsed[key]) {
|
|
45
|
-
|
|
40
|
+
if (key) {
|
|
41
|
+
if (parsed[key] && ignoreDuplicateOf.indexOf(key) >= 0) {
|
|
42
|
+
return;
|
|
43
|
+
}
|
|
44
|
+
if (key === 'set-cookie') {
|
|
45
|
+
parsed[key] = (parsed[key] ? parsed[key] : []).concat([val]);
|
|
46
46
|
} else {
|
|
47
|
-
parsed[key] = [val
|
|
47
|
+
parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val;
|
|
48
48
|
}
|
|
49
|
-
} else {
|
|
50
|
-
parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val;
|
|
51
49
|
}
|
|
52
50
|
});
|
|
53
51
|
|
|
@@ -18,11 +18,10 @@
|
|
|
18
18
|
* ```
|
|
19
19
|
*
|
|
20
20
|
* @param {Function} callback
|
|
21
|
-
*
|
|
22
21
|
* @returns {Function}
|
|
23
22
|
*/
|
|
24
|
-
|
|
23
|
+
module.exports = function spread(callback) {
|
|
25
24
|
return function wrap(arr) {
|
|
26
25
|
return callback.apply(null, arr);
|
|
27
26
|
};
|
|
28
|
-
}
|
|
27
|
+
};
|
|
@@ -1,117 +1,19 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
import AxiosError from '../core/AxiosError.js';
|
|
5
|
-
// temporary hotfix to avoid circular references until AxiosURLSearchParams is refactored
|
|
6
|
-
import PlatformFormData from '../platform/node/classes/FormData.js';
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
* Determines if the given thing is a array or js object.
|
|
10
|
-
*
|
|
11
|
-
* @param {string} thing - The object or array to be visited.
|
|
12
|
-
*
|
|
13
|
-
* @returns {boolean}
|
|
14
|
-
*/
|
|
15
|
-
function isVisitable(thing) {
|
|
16
|
-
return utils.isPlainObject(thing) || utils.isArray(thing);
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
/**
|
|
20
|
-
* It removes the brackets from the end of a string
|
|
21
|
-
*
|
|
22
|
-
* @param {string} key - The key of the parameter.
|
|
23
|
-
*
|
|
24
|
-
* @returns {string} the key without the brackets.
|
|
25
|
-
*/
|
|
26
|
-
function removeBrackets(key) {
|
|
27
|
-
return utils.endsWith(key, '[]') ? key.slice(0, -2) : key;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
/**
|
|
31
|
-
* It takes a path, a key, and a boolean, and returns a string
|
|
32
|
-
*
|
|
33
|
-
* @param {string} path - The path to the current key.
|
|
34
|
-
* @param {string} key - The key of the current object being iterated over.
|
|
35
|
-
* @param {string} dots - If true, the key will be rendered with dots instead of brackets.
|
|
36
|
-
*
|
|
37
|
-
* @returns {string} The path to the current key.
|
|
38
|
-
*/
|
|
39
|
-
function renderKey(path, key, dots) {
|
|
40
|
-
if (!path) return key;
|
|
41
|
-
return path.concat(key).map(function each(token, i) {
|
|
42
|
-
// eslint-disable-next-line no-param-reassign
|
|
43
|
-
token = removeBrackets(token);
|
|
44
|
-
return !dots && i ? '[' + token + ']' : token;
|
|
45
|
-
}).join(dots ? '.' : '');
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
/**
|
|
49
|
-
* If the array is an array and none of its elements are visitable, then it's a flat array.
|
|
50
|
-
*
|
|
51
|
-
* @param {Array<any>} arr - The array to check
|
|
52
|
-
*
|
|
53
|
-
* @returns {boolean}
|
|
54
|
-
*/
|
|
55
|
-
function isFlatArray(arr) {
|
|
56
|
-
return utils.isArray(arr) && !arr.some(isVisitable);
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
const predicates = utils.toFlatObject(utils, {}, null, function filter(prop) {
|
|
60
|
-
return /^is[A-Z]/.test(prop);
|
|
61
|
-
});
|
|
3
|
+
var utils = require('../utils');
|
|
62
4
|
|
|
63
5
|
/**
|
|
64
6
|
* Convert a data object to FormData
|
|
65
|
-
*
|
|
66
7
|
* @param {Object} obj
|
|
67
8
|
* @param {?Object} [formData]
|
|
68
|
-
* @param {?Object} [options]
|
|
69
|
-
* @param {Function} [options.visitor]
|
|
70
|
-
* @param {Boolean} [options.metaTokens = true]
|
|
71
|
-
* @param {Boolean} [options.dots = false]
|
|
72
|
-
* @param {?Boolean} [options.indexes = false]
|
|
73
|
-
*
|
|
74
9
|
* @returns {Object}
|
|
75
10
|
**/
|
|
76
11
|
|
|
77
|
-
|
|
78
|
-
* It converts an object into a FormData object
|
|
79
|
-
*
|
|
80
|
-
* @param {Object<any, any>} obj - The object to convert to form data.
|
|
81
|
-
* @param {string} formData - The FormData object to append to.
|
|
82
|
-
* @param {Object<string, any>} options
|
|
83
|
-
*
|
|
84
|
-
* @returns
|
|
85
|
-
*/
|
|
86
|
-
function toFormData(obj, formData, options) {
|
|
87
|
-
if (!utils.isObject(obj)) {
|
|
88
|
-
throw new TypeError('target must be an object');
|
|
89
|
-
}
|
|
90
|
-
|
|
12
|
+
function toFormData(obj, formData) {
|
|
91
13
|
// eslint-disable-next-line no-param-reassign
|
|
92
|
-
formData = formData || new
|
|
14
|
+
formData = formData || new FormData();
|
|
93
15
|
|
|
94
|
-
|
|
95
|
-
options = utils.toFlatObject(options, {
|
|
96
|
-
metaTokens: true,
|
|
97
|
-
dots: false,
|
|
98
|
-
indexes: false
|
|
99
|
-
}, false, function defined(option, source) {
|
|
100
|
-
// eslint-disable-next-line no-eq-null,eqeqeq
|
|
101
|
-
return !utils.isUndefined(source[option]);
|
|
102
|
-
});
|
|
103
|
-
|
|
104
|
-
const metaTokens = options.metaTokens;
|
|
105
|
-
// eslint-disable-next-line no-use-before-define
|
|
106
|
-
const visitor = options.visitor || defaultVisitor;
|
|
107
|
-
const dots = options.dots;
|
|
108
|
-
const indexes = options.indexes;
|
|
109
|
-
const _Blob = options.Blob || typeof Blob !== 'undefined' && Blob;
|
|
110
|
-
const useBlob = _Blob && utils.isSpecCompliantForm(formData);
|
|
111
|
-
|
|
112
|
-
if (!utils.isFunction(visitor)) {
|
|
113
|
-
throw new TypeError('visitor must be a function');
|
|
114
|
-
}
|
|
16
|
+
var stack = [];
|
|
115
17
|
|
|
116
18
|
function convertValue(value) {
|
|
117
19
|
if (value === null) return '';
|
|
@@ -120,95 +22,46 @@ function toFormData(obj, formData, options) {
|
|
|
120
22
|
return value.toISOString();
|
|
121
23
|
}
|
|
122
24
|
|
|
123
|
-
if (!useBlob && utils.isBlob(value)) {
|
|
124
|
-
throw new AxiosError('Blob is not supported. Use a Buffer instead.');
|
|
125
|
-
}
|
|
126
|
-
|
|
127
25
|
if (utils.isArrayBuffer(value) || utils.isTypedArray(value)) {
|
|
128
|
-
return
|
|
26
|
+
return typeof Blob === 'function' ? new Blob([value]) : Buffer.from(value);
|
|
129
27
|
}
|
|
130
28
|
|
|
131
29
|
return value;
|
|
132
30
|
}
|
|
133
31
|
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
* @param {String|Number} key
|
|
139
|
-
* @param {Array<String|Number>} path
|
|
140
|
-
* @this {FormData}
|
|
141
|
-
*
|
|
142
|
-
* @returns {boolean} return true to visit the each prop of the value recursively
|
|
143
|
-
*/
|
|
144
|
-
function defaultVisitor(value, key, path) {
|
|
145
|
-
let arr = value;
|
|
146
|
-
|
|
147
|
-
if (value && !path && typeof value === 'object') {
|
|
148
|
-
if (utils.endsWith(key, '{}')) {
|
|
149
|
-
// eslint-disable-next-line no-param-reassign
|
|
150
|
-
key = metaTokens ? key : key.slice(0, -2);
|
|
151
|
-
// eslint-disable-next-line no-param-reassign
|
|
152
|
-
value = JSON.stringify(value);
|
|
153
|
-
} else if (
|
|
154
|
-
(utils.isArray(value) && isFlatArray(value)) ||
|
|
155
|
-
((utils.isFileList(value) || utils.endsWith(key, '[]')) && (arr = utils.toArray(value))
|
|
156
|
-
)) {
|
|
157
|
-
// eslint-disable-next-line no-param-reassign
|
|
158
|
-
key = removeBrackets(key);
|
|
159
|
-
|
|
160
|
-
arr.forEach(function each(el, index) {
|
|
161
|
-
!(utils.isUndefined(el) || el === null) && formData.append(
|
|
162
|
-
// eslint-disable-next-line no-nested-ternary
|
|
163
|
-
indexes === true ? renderKey([key], index, dots) : (indexes === null ? key : key + '[]'),
|
|
164
|
-
convertValue(el)
|
|
165
|
-
);
|
|
166
|
-
});
|
|
167
|
-
return false;
|
|
32
|
+
function build(data, parentKey) {
|
|
33
|
+
if (utils.isPlainObject(data) || utils.isArray(data)) {
|
|
34
|
+
if (stack.indexOf(data) !== -1) {
|
|
35
|
+
throw Error('Circular reference detected in ' + parentKey);
|
|
168
36
|
}
|
|
169
|
-
}
|
|
170
|
-
|
|
171
|
-
if (isVisitable(value)) {
|
|
172
|
-
return true;
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
formData.append(renderKey(path, key, dots), convertValue(value));
|
|
176
|
-
|
|
177
|
-
return false;
|
|
178
|
-
}
|
|
179
|
-
|
|
180
|
-
const stack = [];
|
|
181
37
|
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
38
|
+
stack.push(data);
|
|
39
|
+
|
|
40
|
+
utils.forEach(data, function each(value, key) {
|
|
41
|
+
if (utils.isUndefined(value)) return;
|
|
42
|
+
var fullKey = parentKey ? parentKey + '.' + key : key;
|
|
43
|
+
var arr;
|
|
44
|
+
|
|
45
|
+
if (value && !parentKey && typeof value === 'object') {
|
|
46
|
+
if (utils.endsWith(key, '{}')) {
|
|
47
|
+
// eslint-disable-next-line no-param-reassign
|
|
48
|
+
value = JSON.stringify(value);
|
|
49
|
+
} else if (utils.endsWith(key, '[]') && (arr = utils.toArray(value))) {
|
|
50
|
+
// eslint-disable-next-line func-names
|
|
51
|
+
arr.forEach(function(el) {
|
|
52
|
+
!utils.isUndefined(el) && formData.append(fullKey, convertValue(el));
|
|
53
|
+
});
|
|
54
|
+
return;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
build(value, fullKey);
|
|
59
|
+
});
|
|
60
|
+
|
|
61
|
+
stack.pop();
|
|
62
|
+
} else {
|
|
63
|
+
formData.append(parentKey, convertValue(data));
|
|
193
64
|
}
|
|
194
|
-
|
|
195
|
-
stack.push(value);
|
|
196
|
-
|
|
197
|
-
utils.forEach(value, function each(el, key) {
|
|
198
|
-
const result = !(utils.isUndefined(el) || el === null) && visitor.call(
|
|
199
|
-
formData, el, utils.isString(key) ? key.trim() : key, path, exposedHelpers
|
|
200
|
-
);
|
|
201
|
-
|
|
202
|
-
if (result === true) {
|
|
203
|
-
build(el, path ? path.concat(key) : [key]);
|
|
204
|
-
}
|
|
205
|
-
});
|
|
206
|
-
|
|
207
|
-
stack.pop();
|
|
208
|
-
}
|
|
209
|
-
|
|
210
|
-
if (!utils.isObject(obj)) {
|
|
211
|
-
throw new TypeError('data must be an object');
|
|
212
65
|
}
|
|
213
66
|
|
|
214
67
|
build(obj);
|
|
@@ -216,4 +69,4 @@ function toFormData(obj, formData, options) {
|
|
|
216
69
|
return formData;
|
|
217
70
|
}
|
|
218
71
|
|
|
219
|
-
|
|
72
|
+
module.exports = toFormData;
|
|
@@ -1,26 +1,24 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
var VERSION = require('../env/data').version;
|
|
4
|
+
var AxiosError = require('../core/AxiosError');
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
var validators = {};
|
|
7
7
|
|
|
8
8
|
// eslint-disable-next-line func-names
|
|
9
|
-
['object', 'boolean', 'number', 'function', 'string', 'symbol'].forEach((type, i)
|
|
9
|
+
['object', 'boolean', 'number', 'function', 'string', 'symbol'].forEach(function(type, i) {
|
|
10
10
|
validators[type] = function validator(thing) {
|
|
11
11
|
return typeof thing === type || 'a' + (i < 1 ? 'n ' : ' ') + type;
|
|
12
12
|
};
|
|
13
13
|
});
|
|
14
14
|
|
|
15
|
-
|
|
15
|
+
var deprecatedWarnings = {};
|
|
16
16
|
|
|
17
17
|
/**
|
|
18
18
|
* Transitional option validator
|
|
19
|
-
*
|
|
20
19
|
* @param {function|boolean?} validator - set to false if the transitional option has been removed
|
|
21
20
|
* @param {string?} version - deprecated version / removed since version
|
|
22
21
|
* @param {string?} message - some message with additional info
|
|
23
|
-
*
|
|
24
22
|
* @returns {function}
|
|
25
23
|
*/
|
|
26
24
|
validators.transitional = function transitional(validator, version, message) {
|
|
@@ -29,7 +27,7 @@ validators.transitional = function transitional(validator, version, message) {
|
|
|
29
27
|
}
|
|
30
28
|
|
|
31
29
|
// eslint-disable-next-line func-names
|
|
32
|
-
return (value, opt, opts)
|
|
30
|
+
return function(value, opt, opts) {
|
|
33
31
|
if (validator === false) {
|
|
34
32
|
throw new AxiosError(
|
|
35
33
|
formatMessage(opt, ' has been removed' + (version ? ' in ' + version : '')),
|
|
@@ -54,26 +52,23 @@ validators.transitional = function transitional(validator, version, message) {
|
|
|
54
52
|
|
|
55
53
|
/**
|
|
56
54
|
* Assert object's properties type
|
|
57
|
-
*
|
|
58
55
|
* @param {object} options
|
|
59
56
|
* @param {object} schema
|
|
60
57
|
* @param {boolean?} allowUnknown
|
|
61
|
-
*
|
|
62
|
-
* @returns {object}
|
|
63
58
|
*/
|
|
64
59
|
|
|
65
60
|
function assertOptions(options, schema, allowUnknown) {
|
|
66
61
|
if (typeof options !== 'object') {
|
|
67
62
|
throw new AxiosError('options must be an object', AxiosError.ERR_BAD_OPTION_VALUE);
|
|
68
63
|
}
|
|
69
|
-
|
|
70
|
-
|
|
64
|
+
var keys = Object.keys(options);
|
|
65
|
+
var i = keys.length;
|
|
71
66
|
while (i-- > 0) {
|
|
72
|
-
|
|
73
|
-
|
|
67
|
+
var opt = keys[i];
|
|
68
|
+
var validator = schema[opt];
|
|
74
69
|
if (validator) {
|
|
75
|
-
|
|
76
|
-
|
|
70
|
+
var value = options[opt];
|
|
71
|
+
var result = value === undefined || validator(value, opt, options);
|
|
77
72
|
if (result !== true) {
|
|
78
73
|
throw new AxiosError('option ' + opt + ' must be ' + result, AxiosError.ERR_BAD_OPTION_VALUE);
|
|
79
74
|
}
|
|
@@ -85,7 +80,7 @@ function assertOptions(options, schema, allowUnknown) {
|
|
|
85
80
|
}
|
|
86
81
|
}
|
|
87
82
|
|
|
88
|
-
|
|
89
|
-
assertOptions,
|
|
90
|
-
validators
|
|
83
|
+
module.exports = {
|
|
84
|
+
assertOptions: assertOptions,
|
|
85
|
+
validators: validators
|
|
91
86
|
};
|