appium-uiautomator2-driver 8.7.0 → 8.7.2
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/CHANGELOG.md +12 -0
- package/README.md +36 -2
- package/node_modules/@appium/base-driver/build/lib/basedriver/commands/bidi-subscriptions.d.ts +12 -0
- package/node_modules/@appium/base-driver/build/lib/basedriver/commands/bidi-subscriptions.d.ts.map +1 -0
- package/node_modules/@appium/base-driver/build/lib/basedriver/commands/bidi-subscriptions.js +33 -0
- package/node_modules/@appium/base-driver/build/lib/basedriver/commands/bidi-subscriptions.js.map +1 -0
- package/node_modules/@appium/base-driver/build/lib/basedriver/commands/bidi.d.ts.map +1 -1
- package/node_modules/@appium/base-driver/build/lib/basedriver/commands/bidi.js +49 -9
- package/node_modules/@appium/base-driver/build/lib/basedriver/commands/bidi.js.map +1 -1
- package/node_modules/@appium/base-driver/build/lib/basedriver/commands/timeout.js +1 -1
- package/node_modules/@appium/base-driver/build/lib/basedriver/commands/timeout.js.map +1 -1
- package/node_modules/@appium/base-driver/build/lib/basedriver/driver.d.ts.map +1 -1
- package/node_modules/@appium/base-driver/build/lib/basedriver/driver.js +2 -0
- package/node_modules/@appium/base-driver/build/lib/basedriver/driver.js.map +1 -1
- package/node_modules/@appium/base-driver/build/lib/basedriver/helpers.d.ts.map +1 -1
- package/node_modules/@appium/base-driver/build/lib/basedriver/helpers.js +40 -3
- package/node_modules/@appium/base-driver/build/lib/basedriver/helpers.js.map +1 -1
- package/node_modules/@appium/base-driver/build/lib/express/middleware.d.ts +17 -6
- package/node_modules/@appium/base-driver/build/lib/express/middleware.d.ts.map +1 -1
- package/node_modules/@appium/base-driver/build/lib/express/middleware.js +11 -7
- package/node_modules/@appium/base-driver/build/lib/express/middleware.js.map +1 -1
- package/node_modules/@appium/base-driver/build/lib/express/server.d.ts +1 -0
- package/node_modules/@appium/base-driver/build/lib/express/server.d.ts.map +1 -1
- package/node_modules/@appium/base-driver/build/lib/express/server.js +4 -3
- package/node_modules/@appium/base-driver/build/lib/express/server.js.map +1 -1
- package/node_modules/@appium/base-driver/build/lib/protocol/bidi-commands.d.ts +1 -2
- package/node_modules/@appium/base-driver/build/lib/protocol/bidi-commands.d.ts.map +1 -1
- package/node_modules/@appium/base-driver/build/lib/protocol/bidi-commands.js +8 -3
- package/node_modules/@appium/base-driver/build/lib/protocol/bidi-commands.js.map +1 -1
- package/node_modules/@appium/base-driver/lib/basedriver/commands/bidi-subscriptions.ts +36 -0
- package/node_modules/@appium/base-driver/lib/basedriver/commands/bidi.ts +56 -9
- package/node_modules/@appium/base-driver/lib/basedriver/commands/timeout.ts +1 -1
- package/node_modules/@appium/base-driver/lib/basedriver/driver.ts +2 -0
- package/node_modules/@appium/base-driver/lib/basedriver/helpers.ts +41 -3
- package/node_modules/@appium/base-driver/lib/express/middleware.ts +32 -12
- package/node_modules/@appium/base-driver/lib/express/server.ts +7 -2
- package/node_modules/@appium/base-driver/lib/protocol/bidi-commands.ts +9 -3
- package/node_modules/@appium/base-driver/package.json +10 -10
- package/node_modules/@appium/base-driver/tsconfig.json +1 -1
- package/node_modules/@appium/logger/CHANGELOG.md +8 -0
- package/node_modules/@appium/logger/package.json +3 -3
- package/node_modules/@appium/support/build/lib/fs.d.ts.map +1 -1
- package/node_modules/@appium/support/build/lib/fs.js +7 -0
- package/node_modules/@appium/support/build/lib/fs.js.map +1 -1
- package/node_modules/@appium/support/build/lib/index.d.ts.map +1 -1
- package/node_modules/@appium/support/build/lib/net.d.ts.map +1 -1
- package/node_modules/@appium/support/build/lib/net.js +6 -2
- package/node_modules/@appium/support/build/lib/net.js.map +1 -1
- package/node_modules/@appium/support/build/lib/npm.d.ts.map +1 -1
- package/node_modules/@appium/support/build/lib/npm.js +2 -1
- package/node_modules/@appium/support/build/lib/npm.js.map +1 -1
- package/node_modules/@appium/support/build/lib/util.d.ts.map +1 -1
- package/node_modules/@appium/support/build/lib/util.js +23 -5
- package/node_modules/@appium/support/build/lib/util.js.map +1 -1
- package/node_modules/@appium/support/build/lib/zip.d.ts +2 -1
- package/node_modules/@appium/support/build/lib/zip.d.ts.map +1 -1
- package/node_modules/@appium/support/build/lib/zip.js +195 -71
- package/node_modules/@appium/support/build/lib/zip.js.map +1 -1
- package/node_modules/@appium/support/lib/fs.ts +8 -1
- package/node_modules/@appium/support/lib/net.ts +7 -2
- package/node_modules/@appium/support/lib/npm.ts +2 -1
- package/node_modules/@appium/support/lib/util.ts +22 -4
- package/node_modules/@appium/support/lib/zip.ts +234 -80
- package/node_modules/@appium/support/package.json +11 -11
- package/node_modules/@appium/types/build/lib/commands/basedriver.d.ts +6 -4
- package/node_modules/@appium/types/build/lib/commands/basedriver.d.ts.map +1 -1
- package/node_modules/@appium/types/lib/commands/basedriver.ts +4 -4
- package/node_modules/@appium/types/package.json +4 -4
- package/node_modules/appium-adb/CHANGELOG.md +37 -0
- package/node_modules/appium-adb/README.md +1 -1
- package/node_modules/appium-adb/build/lib/tools/aab-utils.js +34 -34
- package/node_modules/appium-adb/build/lib/tools/aab-utils.js.map +1 -1
- package/node_modules/appium-adb/build/lib/tools/android-manifest.js +1 -1
- package/node_modules/appium-adb/build/lib/tools/android-manifest.js.map +1 -1
- package/node_modules/appium-adb/build/lib/tools/apk-signing.d.ts.map +1 -1
- package/node_modules/appium-adb/build/lib/tools/apk-signing.js +21 -9
- package/node_modules/appium-adb/build/lib/tools/apk-signing.js.map +1 -1
- package/node_modules/appium-adb/build/lib/tools/apks-utils.d.ts.map +1 -1
- package/node_modules/appium-adb/build/lib/tools/apks-utils.js +6 -5
- package/node_modules/appium-adb/build/lib/tools/apks-utils.js.map +1 -1
- package/node_modules/appium-adb/build/lib/tools/app-commands.d.ts.map +1 -1
- package/node_modules/appium-adb/build/lib/tools/app-commands.js +63 -62
- package/node_modules/appium-adb/build/lib/tools/app-commands.js.map +1 -1
- package/node_modules/appium-adb/build/lib/tools/device-settings.js +1 -1
- package/node_modules/appium-adb/build/lib/tools/device-settings.js.map +1 -1
- package/node_modules/appium-adb/build/lib/tools/lockmgmt.d.ts.map +1 -1
- package/node_modules/appium-adb/build/lib/tools/lockmgmt.js +3 -9
- package/node_modules/appium-adb/build/lib/tools/lockmgmt.js.map +1 -1
- package/node_modules/appium-adb/build/lib/tools/system-calls.d.ts.map +1 -1
- package/node_modules/appium-adb/build/lib/tools/system-calls.js +7 -6
- package/node_modules/appium-adb/build/lib/tools/system-calls.js.map +1 -1
- package/node_modules/appium-adb/build/lib/tools/types.d.ts +4 -0
- package/node_modules/appium-adb/build/lib/tools/types.d.ts.map +1 -1
- package/node_modules/appium-adb/build/lib/utils/helpers/index.d.ts +1 -0
- package/node_modules/appium-adb/build/lib/utils/helpers/index.d.ts.map +1 -1
- package/node_modules/appium-adb/build/lib/utils/helpers/index.js +1 -0
- package/node_modules/appium-adb/build/lib/utils/helpers/index.js.map +1 -1
- package/node_modules/appium-adb/build/lib/utils/helpers/redact.d.ts +19 -0
- package/node_modules/appium-adb/build/lib/utils/helpers/redact.d.ts.map +1 -0
- package/node_modules/appium-adb/build/lib/utils/helpers/redact.js +57 -0
- package/node_modules/appium-adb/build/lib/utils/helpers/redact.js.map +1 -0
- package/node_modules/appium-adb/build/lib/utils/index.d.ts +2 -0
- package/node_modules/appium-adb/build/lib/utils/index.d.ts.map +1 -1
- package/node_modules/appium-adb/build/lib/utils/index.js +2 -0
- package/node_modules/appium-adb/build/lib/utils/index.js.map +1 -1
- package/node_modules/appium-adb/lib/tools/aab-utils.ts +35 -35
- package/node_modules/appium-adb/lib/tools/android-manifest.ts +1 -1
- package/node_modules/appium-adb/lib/tools/apk-signing.ts +26 -9
- package/node_modules/appium-adb/lib/tools/apks-utils.ts +13 -5
- package/node_modules/appium-adb/lib/tools/app-commands.ts +59 -68
- package/node_modules/appium-adb/lib/tools/device-settings.ts +1 -1
- package/node_modules/appium-adb/lib/tools/lockmgmt.ts +3 -8
- package/node_modules/appium-adb/lib/tools/system-calls.ts +15 -6
- package/node_modules/appium-adb/lib/tools/types.ts +4 -0
- package/node_modules/appium-adb/lib/utils/helpers/index.ts +1 -0
- package/node_modules/appium-adb/lib/utils/helpers/redact.ts +59 -0
- package/node_modules/appium-adb/lib/utils/index.ts +2 -0
- package/node_modules/appium-adb/package.json +10 -13
- package/node_modules/appium-android-driver/CHANGELOG.md +31 -0
- package/node_modules/appium-android-driver/build/lib/commands/context/exports.d.ts.map +1 -1
- package/node_modules/appium-android-driver/build/lib/commands/context/exports.js +10 -6
- package/node_modules/appium-android-driver/build/lib/commands/context/exports.js.map +1 -1
- package/node_modules/appium-android-driver/build/lib/commands/file-actions.d.ts.map +1 -1
- package/node_modules/appium-android-driver/build/lib/commands/file-actions.js +55 -35
- package/node_modules/appium-android-driver/build/lib/commands/file-actions.js.map +1 -1
- package/node_modules/appium-android-driver/build/lib/commands/log.js +2 -2
- package/node_modules/appium-android-driver/build/lib/commands/log.js.map +1 -1
- package/node_modules/appium-android-driver/lib/commands/context/exports.ts +10 -6
- package/node_modules/appium-android-driver/lib/commands/file-actions.ts +58 -39
- package/node_modules/appium-android-driver/lib/commands/log.ts +2 -2
- package/node_modules/appium-android-driver/package.json +1 -1
- package/node_modules/appium-chromedriver/CHANGELOG.md +80 -0
- package/node_modules/appium-chromedriver/README.md +2 -4
- package/node_modules/appium-chromedriver/build/lib/commands/version.d.ts.map +1 -1
- package/node_modules/appium-chromedriver/build/lib/commands/version.js +9 -0
- package/node_modules/appium-chromedriver/build/lib/commands/version.js.map +1 -1
- package/node_modules/appium-chromedriver/config/mapping.json +9 -1
- package/node_modules/appium-chromedriver/lib/commands/version.ts +10 -0
- package/node_modules/appium-chromedriver/package.json +10 -13
- package/node_modules/appium-uiautomator2-server/CHANGELOG.md +19 -0
- package/node_modules/appium-uiautomator2-server/README.md +5 -2
- package/node_modules/appium-uiautomator2-server/apks/appium-uiautomator2-server-debug-androidTest.apk +0 -0
- package/node_modules/appium-uiautomator2-server/apks/appium-uiautomator2-server-debug-androidTest.apk.idsig +0 -0
- package/node_modules/appium-uiautomator2-server/apks/{appium-uiautomator2-server-v10.6.6.apk → appium-uiautomator2-server-v10.7.1.apk} +0 -0
- package/node_modules/appium-uiautomator2-server/apks/appium-uiautomator2-server-v10.7.1.apk.idsig +0 -0
- package/node_modules/appium-uiautomator2-server/package.json +12 -14
- package/node_modules/asyncbox/README.md +43 -0
- package/node_modules/asyncbox/build/cjs/lib/asyncfilter.d.ts +9 -0
- package/node_modules/asyncbox/build/cjs/lib/asyncfilter.d.ts.map +1 -0
- package/node_modules/asyncbox/build/cjs/lib/asyncfilter.js +35 -0
- package/node_modules/asyncbox/build/cjs/lib/asyncfilter.js.map +1 -0
- package/node_modules/asyncbox/build/cjs/lib/asyncmap.d.ts +9 -0
- package/node_modules/asyncbox/build/cjs/lib/asyncmap.d.ts.map +1 -0
- package/node_modules/asyncbox/build/cjs/lib/asyncmap.js +23 -0
- package/node_modules/asyncbox/build/cjs/lib/asyncmap.js.map +1 -0
- package/node_modules/asyncbox/build/cjs/lib/errors.d.ts +9 -0
- package/node_modules/asyncbox/build/cjs/lib/errors.d.ts.map +1 -0
- package/node_modules/asyncbox/build/cjs/lib/errors.js +20 -0
- package/node_modules/asyncbox/build/cjs/lib/errors.js.map +1 -0
- package/node_modules/asyncbox/build/cjs/lib/index.d.ts +12 -0
- package/node_modules/asyncbox/build/cjs/lib/index.d.ts.map +1 -0
- package/node_modules/asyncbox/build/cjs/lib/index.js +24 -0
- package/node_modules/asyncbox/build/cjs/lib/index.js.map +1 -0
- package/node_modules/asyncbox/build/cjs/lib/limit-function.d.ts +3 -0
- package/node_modules/asyncbox/build/cjs/lib/limit-function.d.ts.map +1 -0
- package/node_modules/asyncbox/build/cjs/lib/limit-function.js +15 -0
- package/node_modules/asyncbox/build/cjs/lib/limit-function.js.map +1 -0
- package/node_modules/asyncbox/build/cjs/lib/lock.d.ts +74 -0
- package/node_modules/asyncbox/build/cjs/lib/lock.d.ts.map +1 -0
- package/node_modules/asyncbox/build/cjs/lib/lock.js +295 -0
- package/node_modules/asyncbox/build/cjs/lib/lock.js.map +1 -0
- package/node_modules/asyncbox/build/cjs/lib/long-sleep.d.ts +15 -0
- package/node_modules/asyncbox/build/cjs/lib/long-sleep.d.ts.map +1 -0
- package/node_modules/asyncbox/build/cjs/lib/long-sleep.js +36 -0
- package/node_modules/asyncbox/build/cjs/lib/long-sleep.js.map +1 -0
- package/node_modules/asyncbox/build/cjs/lib/retry.d.ts +17 -0
- package/node_modules/asyncbox/build/cjs/lib/retry.d.ts.map +1 -0
- package/node_modules/asyncbox/build/cjs/lib/retry.js +57 -0
- package/node_modules/asyncbox/build/cjs/lib/retry.js.map +1 -0
- package/node_modules/asyncbox/build/cjs/lib/sleep.d.ts +20 -0
- package/node_modules/asyncbox/build/cjs/lib/sleep.d.ts.map +1 -0
- package/node_modules/asyncbox/build/cjs/lib/sleep.js +61 -0
- package/node_modules/asyncbox/build/cjs/lib/sleep.js.map +1 -0
- package/node_modules/asyncbox/build/cjs/lib/wait-for-condition.d.ts +18 -0
- package/node_modules/asyncbox/build/cjs/lib/wait-for-condition.d.ts.map +1 -0
- package/node_modules/asyncbox/build/cjs/lib/wait-for-condition.js +51 -0
- package/node_modules/asyncbox/build/cjs/lib/wait-for-condition.js.map +1 -0
- package/node_modules/asyncbox/build/cjs/lib/with-timeout.d.ts +16 -0
- package/node_modules/asyncbox/build/cjs/lib/with-timeout.d.ts.map +1 -0
- package/node_modules/asyncbox/build/cjs/lib/with-timeout.js +45 -0
- package/node_modules/asyncbox/build/cjs/lib/with-timeout.js.map +1 -0
- package/node_modules/asyncbox/build/esm/lib/asyncfilter.d.ts +9 -0
- package/node_modules/asyncbox/build/esm/lib/asyncfilter.d.ts.map +1 -0
- package/node_modules/asyncbox/build/esm/lib/asyncfilter.js +32 -0
- package/node_modules/asyncbox/build/esm/lib/asyncfilter.js.map +1 -0
- package/node_modules/asyncbox/build/esm/lib/asyncmap.d.ts +9 -0
- package/node_modules/asyncbox/build/esm/lib/asyncmap.d.ts.map +1 -0
- package/node_modules/asyncbox/build/esm/lib/asyncmap.js +20 -0
- package/node_modules/asyncbox/build/esm/lib/asyncmap.js.map +1 -0
- package/node_modules/asyncbox/build/esm/lib/errors.d.ts +9 -0
- package/node_modules/asyncbox/build/esm/lib/errors.d.ts.map +1 -0
- package/node_modules/asyncbox/build/esm/lib/errors.js +15 -0
- package/node_modules/asyncbox/build/esm/lib/errors.js.map +1 -0
- package/node_modules/asyncbox/build/esm/lib/index.d.ts +12 -0
- package/node_modules/asyncbox/build/esm/lib/index.d.ts.map +1 -0
- package/node_modules/asyncbox/build/esm/lib/index.js +10 -0
- package/node_modules/asyncbox/build/esm/lib/index.js.map +1 -0
- package/node_modules/asyncbox/build/esm/lib/limit-function.d.ts +3 -0
- package/node_modules/asyncbox/build/esm/lib/limit-function.d.ts.map +1 -0
- package/node_modules/asyncbox/build/esm/lib/limit-function.js +12 -0
- package/node_modules/asyncbox/build/esm/lib/limit-function.js.map +1 -0
- package/node_modules/asyncbox/build/esm/lib/lock.d.ts +74 -0
- package/node_modules/asyncbox/build/esm/lib/lock.d.ts.map +1 -0
- package/node_modules/asyncbox/build/esm/lib/lock.js +291 -0
- package/node_modules/asyncbox/build/esm/lib/lock.js.map +1 -0
- package/node_modules/asyncbox/build/esm/lib/long-sleep.d.ts +15 -0
- package/node_modules/asyncbox/build/esm/lib/long-sleep.d.ts.map +1 -0
- package/node_modules/asyncbox/build/esm/lib/long-sleep.js +33 -0
- package/node_modules/asyncbox/build/esm/lib/long-sleep.js.map +1 -0
- package/node_modules/asyncbox/build/esm/lib/retry.d.ts +17 -0
- package/node_modules/asyncbox/build/esm/lib/retry.d.ts.map +1 -0
- package/node_modules/asyncbox/build/esm/lib/retry.js +53 -0
- package/node_modules/asyncbox/build/esm/lib/retry.js.map +1 -0
- package/node_modules/asyncbox/build/esm/lib/sleep.d.ts +20 -0
- package/node_modules/asyncbox/build/esm/lib/sleep.d.ts.map +1 -0
- package/node_modules/asyncbox/build/esm/lib/sleep.js +58 -0
- package/node_modules/asyncbox/build/esm/lib/sleep.js.map +1 -0
- package/node_modules/asyncbox/build/esm/lib/wait-for-condition.d.ts +18 -0
- package/node_modules/asyncbox/build/esm/lib/wait-for-condition.d.ts.map +1 -0
- package/node_modules/asyncbox/build/esm/lib/wait-for-condition.js +48 -0
- package/node_modules/asyncbox/build/esm/lib/wait-for-condition.js.map +1 -0
- package/node_modules/asyncbox/build/esm/lib/with-timeout.d.ts +16 -0
- package/node_modules/asyncbox/build/esm/lib/with-timeout.d.ts.map +1 -0
- package/node_modules/asyncbox/build/esm/lib/with-timeout.js +42 -0
- package/node_modules/asyncbox/build/esm/lib/with-timeout.js.map +1 -0
- package/node_modules/asyncbox/lib/asyncfilter.ts +38 -0
- package/node_modules/asyncbox/lib/asyncmap.ts +29 -0
- package/node_modules/asyncbox/lib/errors.ts +15 -0
- package/node_modules/asyncbox/lib/index.ts +21 -0
- package/node_modules/asyncbox/lib/limit-function.ts +18 -0
- package/node_modules/asyncbox/lib/lock.ts +360 -0
- package/node_modules/asyncbox/lib/long-sleep.ts +38 -0
- package/node_modules/asyncbox/lib/retry.ts +61 -0
- package/node_modules/asyncbox/lib/sleep.ts +79 -0
- package/node_modules/asyncbox/lib/wait-for-condition.ts +52 -0
- package/node_modules/asyncbox/lib/with-timeout.ts +43 -0
- package/node_modules/asyncbox/package.json +8 -8
- package/node_modules/bare-fs/binding.c +52 -23
- package/node_modules/bare-fs/index.d.ts +12 -10
- package/node_modules/bare-fs/index.js +43 -10
- package/node_modules/bare-fs/package.json +2 -1
- package/node_modules/bare-fs/prebuilds/darwin-arm64/bare-fs.bare +0 -0
- package/node_modules/bare-fs/prebuilds/linux-arm64/bare-fs.bare +0 -0
- package/node_modules/bare-fs/prebuilds/linux-x64/bare-fs.bare +0 -0
- package/node_modules/bare-fs/prebuilds/win32-x64/bare-fs.bare +0 -0
- package/node_modules/bare-url/README.md +4 -0
- package/node_modules/bare-url/index.d.ts +3 -0
- package/node_modules/bare-url/index.js +42 -18
- package/node_modules/bare-url/lib/errors.js +4 -0
- package/node_modules/bare-url/package.json +1 -1
- package/node_modules/bare-url/prebuilds/darwin-arm64/bare-url.bare +0 -0
- package/node_modules/bare-url/prebuilds/linux-arm64/bare-url.bare +0 -0
- package/node_modules/bare-url/prebuilds/linux-x64/bare-url.bare +0 -0
- package/node_modules/bare-url/prebuilds/win32-x64/bare-url.bare +0 -0
- package/node_modules/body-parser/README.md +17 -13
- package/node_modules/body-parser/lib/read.js +74 -57
- package/node_modules/body-parser/lib/types/json.js +11 -11
- package/node_modules/body-parser/lib/types/urlencoded.js +5 -5
- package/node_modules/body-parser/lib/utils.js +0 -15
- package/node_modules/body-parser/package.json +7 -12
- package/node_modules/bplist-creator/README.md +26 -6
- package/node_modules/bplist-creator/dist/index.cjs +508 -0
- package/node_modules/bplist-creator/dist/index.cjs.map +7 -0
- package/node_modules/bplist-creator/dist/index.d.cts +12 -0
- package/node_modules/bplist-creator/dist/index.d.ts +12 -0
- package/node_modules/bplist-creator/dist/index.mjs +472 -0
- package/node_modules/bplist-creator/dist/index.mjs.map +7 -0
- package/node_modules/bplist-creator/package.json +43 -9
- package/node_modules/bplist-parser/README.md +37 -3
- package/node_modules/bplist-parser/dist/index.cjs +385 -0
- package/node_modules/bplist-parser/dist/index.cjs.map +7 -0
- package/node_modules/bplist-parser/dist/index.d.cts +13 -0
- package/node_modules/bplist-parser/dist/index.d.ts +13 -0
- package/node_modules/bplist-parser/{bplistParser.js → dist/index.mjs} +141 -171
- package/node_modules/bplist-parser/dist/index.mjs.map +7 -0
- package/node_modules/bplist-parser/package.json +39 -12
- package/node_modules/brace-expansion/dist/commonjs/index.d.ts +4 -0
- package/node_modules/brace-expansion/dist/commonjs/index.d.ts.map +1 -1
- package/node_modules/brace-expansion/dist/commonjs/index.js +69 -25
- package/node_modules/brace-expansion/dist/commonjs/index.js.map +1 -1
- package/node_modules/brace-expansion/dist/esm/index.d.ts +4 -0
- package/node_modules/brace-expansion/dist/esm/index.d.ts.map +1 -1
- package/node_modules/brace-expansion/dist/esm/index.js +68 -24
- package/node_modules/brace-expansion/dist/esm/index.js.map +1 -1
- package/node_modules/brace-expansion/package.json +2 -1
- package/node_modules/follow-redirects/README.md +27 -1
- package/node_modules/follow-redirects/index.js +11 -6
- package/node_modules/follow-redirects/package.json +1 -1
- package/node_modules/io.appium.settings/CHANGELOG.md +72 -0
- package/node_modules/io.appium.settings/README.md +126 -0
- package/node_modules/io.appium.settings/apks/settings_apk-debug.apk +0 -0
- package/node_modules/io.appium.settings/build/lib/client.d.ts +4 -0
- package/node_modules/io.appium.settings/build/lib/client.d.ts.map +1 -1
- package/node_modules/io.appium.settings/build/lib/client.js +4 -0
- package/node_modules/io.appium.settings/build/lib/client.js.map +1 -1
- package/node_modules/io.appium.settings/build/lib/commands/clipboard.d.ts.map +1 -1
- package/node_modules/io.appium.settings/build/lib/commands/clipboard.js +1 -1
- package/node_modules/io.appium.settings/build/lib/commands/clipboard.js.map +1 -1
- package/node_modules/io.appium.settings/build/lib/commands/jpeg-stream.d.ts +55 -0
- package/node_modules/io.appium.settings/build/lib/commands/jpeg-stream.d.ts.map +1 -0
- package/node_modules/io.appium.settings/build/lib/commands/jpeg-stream.js +156 -0
- package/node_modules/io.appium.settings/build/lib/commands/jpeg-stream.js.map +1 -0
- package/node_modules/io.appium.settings/build/lib/commands/media-projection.d.ts.map +1 -1
- package/node_modules/io.appium.settings/build/lib/commands/media-projection.js.map +1 -1
- package/node_modules/io.appium.settings/build/lib/commands/media.js +1 -1
- package/node_modules/io.appium.settings/build/lib/commands/media.js.map +1 -1
- package/node_modules/io.appium.settings/build/lib/commands/network.js +1 -1
- package/node_modules/io.appium.settings/build/lib/commands/network.js.map +1 -1
- package/node_modules/io.appium.settings/build/lib/commands/types.d.ts +65 -0
- package/node_modules/io.appium.settings/build/lib/commands/types.d.ts.map +1 -1
- package/node_modules/io.appium.settings/build/lib/commands/video-stream.d.ts +56 -0
- package/node_modules/io.appium.settings/build/lib/commands/video-stream.d.ts.map +1 -0
- package/node_modules/io.appium.settings/build/lib/commands/video-stream.js +166 -0
- package/node_modules/io.appium.settings/build/lib/commands/video-stream.js.map +1 -0
- package/node_modules/io.appium.settings/build/lib/constants.d.ts +7 -0
- package/node_modules/io.appium.settings/build/lib/constants.d.ts.map +1 -1
- package/node_modules/io.appium.settings/build/lib/constants.js +7 -0
- package/node_modules/io.appium.settings/build/lib/constants.js.map +1 -1
- package/node_modules/io.appium.settings/build/lib/index.js +1 -1
- package/node_modules/io.appium.settings/build/lib/index.js.map +1 -1
- package/node_modules/io.appium.settings/build/lib/{utils.d.ts → utils/apk-path.d.ts} +1 -1
- package/node_modules/io.appium.settings/build/lib/utils/apk-path.d.ts.map +1 -0
- package/node_modules/io.appium.settings/build/lib/{utils.js → utils/apk-path.js} +1 -1
- package/node_modules/io.appium.settings/build/lib/utils/apk-path.js.map +1 -0
- package/node_modules/io.appium.settings/build/lib/utils/index.d.ts +5 -0
- package/node_modules/io.appium.settings/build/lib/utils/index.d.ts.map +1 -0
- package/node_modules/io.appium.settings/build/lib/utils/index.js +4 -0
- package/node_modules/io.appium.settings/build/lib/utils/index.js.map +1 -0
- package/node_modules/io.appium.settings/build/lib/utils/streaming-protocol.d.ts +47 -0
- package/node_modules/io.appium.settings/build/lib/utils/streaming-protocol.d.ts.map +1 -0
- package/node_modules/io.appium.settings/build/lib/utils/streaming-protocol.js +67 -0
- package/node_modules/io.appium.settings/build/lib/utils/streaming-protocol.js.map +1 -0
- package/node_modules/io.appium.settings/build/lib/utils/streaming-transport.d.ts +142 -0
- package/node_modules/io.appium.settings/build/lib/utils/streaming-transport.d.ts.map +1 -0
- package/node_modules/io.appium.settings/build/lib/utils/streaming-transport.js +416 -0
- package/node_modules/io.appium.settings/build/lib/utils/streaming-transport.js.map +1 -0
- package/node_modules/io.appium.settings/lib/client.ts +5 -0
- package/node_modules/io.appium.settings/lib/commands/clipboard.ts +1 -0
- package/node_modules/io.appium.settings/lib/commands/jpeg-stream.ts +175 -0
- package/node_modules/io.appium.settings/lib/commands/media-projection.ts +1 -5
- package/node_modules/io.appium.settings/lib/commands/media.ts +1 -1
- package/node_modules/io.appium.settings/lib/commands/network.ts +1 -1
- package/node_modules/io.appium.settings/lib/commands/types.ts +70 -0
- package/node_modules/io.appium.settings/lib/commands/video-stream.ts +185 -0
- package/node_modules/io.appium.settings/lib/constants.ts +10 -0
- package/node_modules/io.appium.settings/lib/index.ts +1 -1
- package/node_modules/io.appium.settings/lib/utils/index.ts +4 -0
- package/node_modules/io.appium.settings/lib/utils/streaming-protocol.ts +93 -0
- package/node_modules/io.appium.settings/lib/utils/streaming-transport.ts +450 -0
- package/node_modules/io.appium.settings/package.json +17 -20
- package/node_modules/lru-cache/dist/commonjs/react-native/diagnostics-channel-react-native.d.ts.map +1 -0
- package/node_modules/lru-cache/dist/commonjs/react-native/diagnostics-channel-react-native.js.map +1 -0
- package/node_modules/lru-cache/dist/commonjs/react-native/diagnostics-channel.d.ts +5 -0
- package/node_modules/lru-cache/dist/commonjs/react-native/diagnostics-channel.js +7 -0
- package/node_modules/lru-cache/dist/commonjs/react-native/index.d.ts +1400 -0
- package/node_modules/lru-cache/dist/commonjs/react-native/index.d.ts.map +1 -0
- package/node_modules/lru-cache/dist/commonjs/react-native/index.js +1733 -0
- package/node_modules/lru-cache/dist/commonjs/react-native/index.js.map +1 -0
- package/node_modules/lru-cache/dist/commonjs/react-native/perf.d.ts +12 -0
- package/node_modules/lru-cache/dist/commonjs/react-native/perf.d.ts.map +1 -0
- package/node_modules/lru-cache/dist/commonjs/react-native/perf.js +10 -0
- package/node_modules/lru-cache/dist/commonjs/react-native/perf.js.map +1 -0
- package/node_modules/lru-cache/dist/esm/react-native/diagnostics-channel-react-native.d.ts.map +1 -0
- package/node_modules/lru-cache/dist/esm/react-native/diagnostics-channel-react-native.js.map +1 -0
- package/node_modules/lru-cache/dist/esm/react-native/diagnostics-channel.d.ts +5 -0
- package/node_modules/lru-cache/dist/esm/react-native/diagnostics-channel.js +4 -0
- package/node_modules/lru-cache/dist/esm/react-native/index.d.ts +1400 -0
- package/node_modules/lru-cache/dist/esm/react-native/index.d.ts.map +1 -0
- package/node_modules/lru-cache/dist/esm/react-native/index.js +1729 -0
- package/node_modules/lru-cache/dist/esm/react-native/index.js.map +1 -0
- package/node_modules/lru-cache/dist/esm/react-native/perf.d.ts +12 -0
- package/node_modules/lru-cache/dist/esm/react-native/perf.d.ts.map +1 -0
- package/node_modules/lru-cache/dist/esm/react-native/perf.js +7 -0
- package/node_modules/lru-cache/dist/esm/react-native/perf.js.map +1 -0
- package/node_modules/lru-cache/package.json +27 -1
- package/node_modules/morgan/README.md +49 -10
- package/node_modules/morgan/index.js +24 -6
- package/node_modules/morgan/package.json +6 -6
- package/node_modules/on-finished/index.js +14 -2
- package/node_modules/on-finished/package.json +11 -7
- package/node_modules/p-limit/index.d.ts +2 -0
- package/node_modules/p-limit/index.js +17 -1
- package/node_modules/p-limit/package.json +1 -1
- package/node_modules/p-limit/readme.md +2 -0
- package/node_modules/proxy-addr/HISTORY.md +60 -54
- package/node_modules/proxy-addr/README.md +1 -1
- package/node_modules/proxy-addr/index.js +32 -0
- package/node_modules/proxy-addr/package.json +8 -4
- package/node_modules/qs/.editorconfig +1 -1
- package/node_modules/qs/.github/THREAT_MODEL.md +4 -2
- package/node_modules/qs/CHANGELOG.md +61 -14
- package/node_modules/qs/README.md +57 -4
- package/node_modules/qs/dist/qs.js +19 -19
- package/node_modules/qs/eslint.config.mjs +61 -50
- package/node_modules/qs/lib/formats.js +7 -2
- package/node_modules/qs/lib/parse.js +105 -8
- package/node_modules/qs/lib/stringify.js +9 -7
- package/node_modules/qs/lib/utils.js +145 -13
- package/node_modules/qs/package.json +8 -8
- package/node_modules/qs/test/parse.js +440 -2
- package/node_modules/qs/test/stringify.js +485 -33
- package/node_modules/qs/test/utils.js +245 -3
- package/node_modules/readable-stream/lib/internal/shims/process.js +19 -0
- package/node_modules/readable-stream/lib/internal/streams/destroy.js +1 -1
- package/node_modules/readable-stream/lib/internal/streams/duplexify.js +1 -1
- package/node_modules/readable-stream/lib/internal/streams/end-of-stream.js +1 -1
- package/node_modules/readable-stream/lib/internal/streams/from.js +1 -1
- package/node_modules/readable-stream/lib/internal/streams/legacy.js +6 -1
- package/node_modules/readable-stream/lib/internal/streams/pipeline.js +1 -1
- package/node_modules/readable-stream/lib/internal/streams/readable.js +1 -1
- package/node_modules/readable-stream/lib/internal/streams/writable.js +1 -1
- package/node_modules/readable-stream/package.json +3 -2
- package/node_modules/sharp/dist/index.d.cts +2 -2
- package/node_modules/sharp/dist/index.d.mts +3 -3
- package/node_modules/sharp/dist/is.cjs +8 -2
- package/node_modules/sharp/dist/is.mjs +8 -2
- package/node_modules/sharp/dist/operation.cjs +2 -2
- package/node_modules/sharp/dist/operation.mjs +2 -2
- package/node_modules/sharp/dist/output.cjs +1 -0
- package/node_modules/sharp/dist/output.mjs +1 -0
- package/node_modules/sharp/dist/resize.cjs +14 -14
- package/node_modules/sharp/dist/resize.mjs +14 -14
- package/node_modules/sharp/dist/sharp.cjs +3 -3
- package/node_modules/sharp/dist/sharp.mjs +3 -3
- package/node_modules/sharp/lib/index.d.ts +2 -2
- package/node_modules/sharp/package.json +35 -35
- package/node_modules/sharp/src/binding.gyp +1 -1
- package/node_modules/sharp/src/common.cc +4 -4
- package/node_modules/sharp/src/common.h +2 -2
- package/node_modules/sharp/src/pipeline.cc +31 -6
- package/node_modules/sharp/src/utilities.cc +1 -1
- package/node_modules/shell-quote/README.md +37 -4
- package/node_modules/shell-quote/package.json +10 -6
- package/node_modules/shell-quote/parse.d.ts +1 -1
- package/node_modules/shell-quote/parse.js +63 -11
- package/node_modules/shell-quote/quote.d.ts +2 -1
- package/node_modules/shell-quote/quote.js +23 -3
- package/node_modules/spdx-license-ids/index.json +13 -0
- package/node_modules/spdx-license-ids/package.json +1 -1
- package/node_modules/stream-buffers/.codeclimate.yml +12 -0
- package/node_modules/stream-buffers/.eslintignore +1 -0
- package/node_modules/stream-buffers/.eslintrc +25 -0
- package/node_modules/stream-buffers/.github/workflows/codeql-analysis.yml +71 -0
- package/node_modules/stream-buffers/.github/workflows/node.js.yml +31 -0
- package/node_modules/stream-buffers/.mailmap +1 -0
- package/node_modules/stream-buffers/.nvmrc +1 -0
- package/node_modules/stream-buffers/README.md +65 -65
- package/node_modules/stream-buffers/lib/constants.js +8 -6
- package/node_modules/stream-buffers/lib/readable_streambuffer.js +114 -136
- package/node_modules/stream-buffers/lib/streambuffer.js +5 -3
- package/node_modules/stream-buffers/lib/writable_streambuffer.js +72 -97
- package/node_modules/stream-buffers/package.json +7 -5
- package/node_modules/tar-stream/package.json +7 -7
- package/node_modules/type-fest/index.d.ts +7 -7
- package/node_modules/type-fest/package.json +2 -1
- package/node_modules/type-fest/readme.md +7 -16
- package/node_modules/type-fest/source/all-extend.d.ts +9 -7
- package/node_modules/type-fest/source/array-reverse.d.ts +13 -12
- package/node_modules/type-fest/source/array-tail.d.ts +3 -3
- package/node_modules/type-fest/source/delimiter-case.d.ts +1 -1
- package/node_modules/type-fest/source/get.d.ts +1 -1
- package/node_modules/type-fest/source/int-closed-range.d.ts +4 -1
- package/node_modules/type-fest/source/int-range.d.ts +56 -9
- package/node_modules/type-fest/source/internal/array.d.ts +14 -13
- package/node_modules/type-fest/source/internal/numeric.d.ts +0 -38
- package/node_modules/type-fest/source/internal/object.d.ts +30 -1
- package/node_modules/type-fest/source/is-boolean-literal.d.ts +39 -0
- package/node_modules/type-fest/source/is-literal.d.ts +43 -269
- package/node_modules/type-fest/source/is-numeric-literal.d.ts +50 -0
- package/node_modules/type-fest/source/is-string-literal.d.ts +72 -0
- package/node_modules/type-fest/source/is-symbol-literal.d.ts +39 -0
- package/node_modules/type-fest/source/is-tuple.d.ts +3 -3
- package/node_modules/type-fest/source/jsonify.d.ts +1 -5
- package/node_modules/type-fest/source/merge-deep.d.ts +3 -3
- package/node_modules/type-fest/source/remove-prefix.d.ts +1 -1
- package/node_modules/type-fest/source/remove-suffix.d.ts +1 -1
- package/node_modules/type-fest/source/rename-keys.d.ts +163 -0
- package/node_modules/type-fest/source/set-required.d.ts +10 -9
- package/node_modules/type-fest/source/shared-union-fields-deep.d.ts +6 -4
- package/node_modules/type-fest/source/some-extend.d.ts +9 -7
- package/node_modules/type-fest/source/split-on-rest-element.d.ts +14 -13
- package/node_modules/type-fest/source/split.d.ts +22 -11
- package/node_modules/type-fest/source/string-repeat.d.ts +1 -1
- package/node_modules/type-fest/source/string-to-array.d.ts +1 -1
- package/node_modules/type-fest/source/tsconfig-json.d.ts +1 -1
- package/node_modules/type-fest/source/typed-array.d.ts +6 -0
- package/node_modules/type-fest/source/union-max.d.ts +56 -0
- package/node_modules/type-fest/source/writable.d.ts +2 -2
- package/node_modules/uuid/package.json +17 -17
- package/node_modules/ws/lib/websocket.js +17 -3
- package/node_modules/ws/package.json +1 -1
- package/node_modules/xpath/LICENSE +22 -22
- package/node_modules/xpath/package.json +43 -43
- package/node_modules/xpath/xpath.d.ts +51 -51
- package/node_modules/xpath/xpath.js +17 -2
- package/package.json +7 -7
- package/node_modules/@appium/base-driver/node_modules/asyncbox/LICENSE +0 -203
- package/node_modules/@appium/base-driver/node_modules/asyncbox/README.md +0 -215
- package/node_modules/@appium/base-driver/node_modules/asyncbox/build/cjs/lib/asyncbox.d.ts +0 -103
- package/node_modules/@appium/base-driver/node_modules/asyncbox/build/cjs/lib/asyncbox.d.ts.map +0 -1
- package/node_modules/@appium/base-driver/node_modules/asyncbox/build/cjs/lib/asyncbox.js +0 -301
- package/node_modules/@appium/base-driver/node_modules/asyncbox/build/cjs/lib/asyncbox.js.map +0 -1
- package/node_modules/@appium/base-driver/node_modules/asyncbox/build/cjs/lib/types.d.ts +0 -84
- package/node_modules/@appium/base-driver/node_modules/asyncbox/build/cjs/lib/types.d.ts.map +0 -1
- package/node_modules/@appium/base-driver/node_modules/asyncbox/build/cjs/lib/types.js +0 -3
- package/node_modules/@appium/base-driver/node_modules/asyncbox/build/cjs/lib/types.js.map +0 -1
- package/node_modules/@appium/base-driver/node_modules/asyncbox/build/cjs/package.json +0 -3
- package/node_modules/@appium/base-driver/node_modules/asyncbox/build/esm/lib/asyncbox.d.ts +0 -103
- package/node_modules/@appium/base-driver/node_modules/asyncbox/build/esm/lib/asyncbox.d.ts.map +0 -1
- package/node_modules/@appium/base-driver/node_modules/asyncbox/build/esm/lib/asyncbox.js +0 -288
- package/node_modules/@appium/base-driver/node_modules/asyncbox/build/esm/lib/asyncbox.js.map +0 -1
- package/node_modules/@appium/base-driver/node_modules/asyncbox/build/esm/lib/types.d.ts +0 -84
- package/node_modules/@appium/base-driver/node_modules/asyncbox/build/esm/lib/types.d.ts.map +0 -1
- package/node_modules/@appium/base-driver/node_modules/asyncbox/build/esm/lib/types.js +0 -2
- package/node_modules/@appium/base-driver/node_modules/asyncbox/build/esm/lib/types.js.map +0 -1
- package/node_modules/@appium/base-driver/node_modules/asyncbox/build/esm/package.json +0 -3
- package/node_modules/@appium/base-driver/node_modules/asyncbox/lib/asyncbox.ts +0 -365
- package/node_modules/@appium/base-driver/node_modules/asyncbox/lib/types.ts +0 -88
- package/node_modules/@appium/base-driver/node_modules/asyncbox/package.json +0 -74
- package/node_modules/@appium/base-driver/node_modules/axios/CHANGELOG.md +0 -1872
- package/node_modules/@appium/base-driver/node_modules/axios/LICENSE +0 -7
- package/node_modules/@appium/base-driver/node_modules/axios/MIGRATION_GUIDE.md +0 -877
- package/node_modules/@appium/base-driver/node_modules/axios/README.md +0 -2623
- package/node_modules/@appium/base-driver/node_modules/axios/dist/axios.js +0 -5509
- package/node_modules/@appium/base-driver/node_modules/axios/dist/axios.min.js +0 -5
- package/node_modules/@appium/base-driver/node_modules/axios/dist/axios.min.js.map +0 -1
- package/node_modules/@appium/base-driver/node_modules/axios/dist/browser/axios.cjs +0 -5469
- package/node_modules/@appium/base-driver/node_modules/axios/dist/esm/axios.js +0 -5490
- package/node_modules/@appium/base-driver/node_modules/axios/dist/esm/axios.min.js +0 -3
- package/node_modules/@appium/base-driver/node_modules/axios/dist/esm/axios.min.js.map +0 -1
- package/node_modules/@appium/base-driver/node_modules/axios/dist/node/axios.cjs +0 -6356
- package/node_modules/@appium/base-driver/node_modules/axios/index.d.cts +0 -762
- package/node_modules/@appium/base-driver/node_modules/axios/index.d.ts +0 -783
- package/node_modules/@appium/base-driver/node_modules/axios/index.js +0 -45
- package/node_modules/@appium/base-driver/node_modules/axios/lib/adapters/README.md +0 -36
- package/node_modules/@appium/base-driver/node_modules/axios/lib/adapters/adapters.js +0 -132
- package/node_modules/@appium/base-driver/node_modules/axios/lib/adapters/fetch.js +0 -643
- package/node_modules/@appium/base-driver/node_modules/axios/lib/adapters/http.js +0 -1406
- package/node_modules/@appium/base-driver/node_modules/axios/lib/adapters/xhr.js +0 -228
- package/node_modules/@appium/base-driver/node_modules/axios/lib/axios.js +0 -89
- package/node_modules/@appium/base-driver/node_modules/axios/lib/cancel/CancelToken.js +0 -135
- package/node_modules/@appium/base-driver/node_modules/axios/lib/cancel/CanceledError.js +0 -22
- package/node_modules/@appium/base-driver/node_modules/axios/lib/cancel/isCancel.js +0 -5
- package/node_modules/@appium/base-driver/node_modules/axios/lib/core/Axios.js +0 -301
- package/node_modules/@appium/base-driver/node_modules/axios/lib/core/AxiosError.js +0 -219
- package/node_modules/@appium/base-driver/node_modules/axios/lib/core/AxiosHeaders.js +0 -474
- package/node_modules/@appium/base-driver/node_modules/axios/lib/core/InterceptorManager.js +0 -72
- package/node_modules/@appium/base-driver/node_modules/axios/lib/core/README.md +0 -8
- package/node_modules/@appium/base-driver/node_modules/axios/lib/core/buildFullPath.js +0 -88
- package/node_modules/@appium/base-driver/node_modules/axios/lib/core/dispatchRequest.js +0 -89
- package/node_modules/@appium/base-driver/node_modules/axios/lib/core/mergeConfig.js +0 -174
- package/node_modules/@appium/base-driver/node_modules/axios/lib/core/setFormDataHeaders.js +0 -27
- package/node_modules/@appium/base-driver/node_modules/axios/lib/core/settle.js +0 -27
- package/node_modules/@appium/base-driver/node_modules/axios/lib/core/transformData.js +0 -28
- package/node_modules/@appium/base-driver/node_modules/axios/lib/defaults/index.js +0 -177
- package/node_modules/@appium/base-driver/node_modules/axios/lib/defaults/transitional.js +0 -10
- package/node_modules/@appium/base-driver/node_modules/axios/lib/env/README.md +0 -3
- package/node_modules/@appium/base-driver/node_modules/axios/lib/env/classes/FormData.js +0 -2
- package/node_modules/@appium/base-driver/node_modules/axios/lib/env/data.js +0 -1
- package/node_modules/@appium/base-driver/node_modules/axios/lib/helpers/AxiosTransformStream.js +0 -156
- package/node_modules/@appium/base-driver/node_modules/axios/lib/helpers/AxiosURLSearchParams.js +0 -59
- package/node_modules/@appium/base-driver/node_modules/axios/lib/helpers/Http2Sessions.js +0 -119
- package/node_modules/@appium/base-driver/node_modules/axios/lib/helpers/HttpStatusCode.js +0 -78
- package/node_modules/@appium/base-driver/node_modules/axios/lib/helpers/README.md +0 -7
- package/node_modules/@appium/base-driver/node_modules/axios/lib/helpers/ZlibHeaderTransformStream.js +0 -29
- package/node_modules/@appium/base-driver/node_modules/axios/lib/helpers/bind.js +0 -14
- package/node_modules/@appium/base-driver/node_modules/axios/lib/helpers/buildURL.js +0 -69
- package/node_modules/@appium/base-driver/node_modules/axios/lib/helpers/callbackify.js +0 -18
- package/node_modules/@appium/base-driver/node_modules/axios/lib/helpers/combineURLs.js +0 -23
- package/node_modules/@appium/base-driver/node_modules/axios/lib/helpers/composeSignals.js +0 -68
- package/node_modules/@appium/base-driver/node_modules/axios/lib/helpers/cookies.js +0 -64
- package/node_modules/@appium/base-driver/node_modules/axios/lib/helpers/deprecatedMethod.js +0 -31
- package/node_modules/@appium/base-driver/node_modules/axios/lib/helpers/estimateDataURLDecodedBytes.js +0 -166
- package/node_modules/@appium/base-driver/node_modules/axios/lib/helpers/formDataToJSON.js +0 -125
- package/node_modules/@appium/base-driver/node_modules/axios/lib/helpers/formDataToStream.js +0 -119
- package/node_modules/@appium/base-driver/node_modules/axios/lib/helpers/fromDataURI.js +0 -68
- package/node_modules/@appium/base-driver/node_modules/axios/lib/helpers/isAbsoluteURL.js +0 -19
- package/node_modules/@appium/base-driver/node_modules/axios/lib/helpers/isAxiosError.js +0 -14
- package/node_modules/@appium/base-driver/node_modules/axios/lib/helpers/isURLSameOrigin.js +0 -16
- package/node_modules/@appium/base-driver/node_modules/axios/lib/helpers/null.js +0 -2
- package/node_modules/@appium/base-driver/node_modules/axios/lib/helpers/parseHeaders.js +0 -71
- package/node_modules/@appium/base-driver/node_modules/axios/lib/helpers/parseProtocol.js +0 -6
- package/node_modules/@appium/base-driver/node_modules/axios/lib/helpers/progressEventReducer.js +0 -54
- package/node_modules/@appium/base-driver/node_modules/axios/lib/helpers/readBlob.js +0 -15
- package/node_modules/@appium/base-driver/node_modules/axios/lib/helpers/resolveConfig.js +0 -105
- package/node_modules/@appium/base-driver/node_modules/axios/lib/helpers/sanitizeHeaderValue.js +0 -60
- package/node_modules/@appium/base-driver/node_modules/axios/lib/helpers/shouldBypassProxy.js +0 -329
- package/node_modules/@appium/base-driver/node_modules/axios/lib/helpers/speedometer.js +0 -55
- package/node_modules/@appium/base-driver/node_modules/axios/lib/helpers/spread.js +0 -28
- package/node_modules/@appium/base-driver/node_modules/axios/lib/helpers/throttle.js +0 -44
- package/node_modules/@appium/base-driver/node_modules/axios/lib/helpers/toFormData.js +0 -286
- package/node_modules/@appium/base-driver/node_modules/axios/lib/helpers/toURLEncodedForm.js +0 -19
- package/node_modules/@appium/base-driver/node_modules/axios/lib/helpers/trackStream.js +0 -89
- package/node_modules/@appium/base-driver/node_modules/axios/lib/helpers/validator.js +0 -112
- package/node_modules/@appium/base-driver/node_modules/axios/lib/platform/browser/classes/Blob.js +0 -3
- package/node_modules/@appium/base-driver/node_modules/axios/lib/platform/browser/classes/FormData.js +0 -3
- package/node_modules/@appium/base-driver/node_modules/axios/lib/platform/browser/classes/URLSearchParams.js +0 -4
- package/node_modules/@appium/base-driver/node_modules/axios/lib/platform/browser/index.js +0 -13
- package/node_modules/@appium/base-driver/node_modules/axios/lib/platform/common/utils.js +0 -52
- package/node_modules/@appium/base-driver/node_modules/axios/lib/platform/index.js +0 -7
- package/node_modules/@appium/base-driver/node_modules/axios/lib/platform/node/classes/Buffer.js +0 -11
- package/node_modules/@appium/base-driver/node_modules/axios/lib/platform/node/classes/FormData.js +0 -3
- package/node_modules/@appium/base-driver/node_modules/axios/lib/platform/node/classes/URLSearchParams.js +0 -4
- package/node_modules/@appium/base-driver/node_modules/axios/lib/platform/node/index.js +0 -37
- package/node_modules/@appium/base-driver/node_modules/axios/lib/utils.js +0 -1029
- package/node_modules/@appium/base-driver/node_modules/axios/package.json +0 -203
- package/node_modules/@appium/support/node_modules/asyncbox/LICENSE +0 -203
- package/node_modules/@appium/support/node_modules/asyncbox/README.md +0 -215
- package/node_modules/@appium/support/node_modules/asyncbox/build/cjs/lib/asyncbox.d.ts +0 -103
- package/node_modules/@appium/support/node_modules/asyncbox/build/cjs/lib/asyncbox.d.ts.map +0 -1
- package/node_modules/@appium/support/node_modules/asyncbox/build/cjs/lib/asyncbox.js +0 -301
- package/node_modules/@appium/support/node_modules/asyncbox/build/cjs/lib/asyncbox.js.map +0 -1
- package/node_modules/@appium/support/node_modules/asyncbox/build/cjs/lib/types.d.ts +0 -84
- package/node_modules/@appium/support/node_modules/asyncbox/build/cjs/lib/types.d.ts.map +0 -1
- package/node_modules/@appium/support/node_modules/asyncbox/build/cjs/lib/types.js +0 -3
- package/node_modules/@appium/support/node_modules/asyncbox/build/cjs/lib/types.js.map +0 -1
- package/node_modules/@appium/support/node_modules/asyncbox/build/cjs/package.json +0 -3
- package/node_modules/@appium/support/node_modules/asyncbox/build/esm/lib/asyncbox.d.ts +0 -103
- package/node_modules/@appium/support/node_modules/asyncbox/build/esm/lib/asyncbox.d.ts.map +0 -1
- package/node_modules/@appium/support/node_modules/asyncbox/build/esm/lib/asyncbox.js +0 -288
- package/node_modules/@appium/support/node_modules/asyncbox/build/esm/lib/asyncbox.js.map +0 -1
- package/node_modules/@appium/support/node_modules/asyncbox/build/esm/lib/types.d.ts +0 -84
- package/node_modules/@appium/support/node_modules/asyncbox/build/esm/lib/types.d.ts.map +0 -1
- package/node_modules/@appium/support/node_modules/asyncbox/build/esm/lib/types.js +0 -2
- package/node_modules/@appium/support/node_modules/asyncbox/build/esm/lib/types.js.map +0 -1
- package/node_modules/@appium/support/node_modules/asyncbox/build/esm/package.json +0 -3
- package/node_modules/@appium/support/node_modules/asyncbox/lib/asyncbox.ts +0 -365
- package/node_modules/@appium/support/node_modules/asyncbox/lib/types.ts +0 -88
- package/node_modules/@appium/support/node_modules/asyncbox/package.json +0 -74
- package/node_modules/@appium/support/node_modules/axios/CHANGELOG.md +0 -1872
- package/node_modules/@appium/support/node_modules/axios/LICENSE +0 -7
- package/node_modules/@appium/support/node_modules/axios/MIGRATION_GUIDE.md +0 -877
- package/node_modules/@appium/support/node_modules/axios/README.md +0 -2623
- package/node_modules/@appium/support/node_modules/axios/dist/axios.js +0 -5509
- package/node_modules/@appium/support/node_modules/axios/dist/axios.min.js +0 -5
- package/node_modules/@appium/support/node_modules/axios/dist/axios.min.js.map +0 -1
- package/node_modules/@appium/support/node_modules/axios/dist/browser/axios.cjs +0 -5469
- package/node_modules/@appium/support/node_modules/axios/dist/esm/axios.js +0 -5490
- package/node_modules/@appium/support/node_modules/axios/dist/esm/axios.min.js +0 -3
- package/node_modules/@appium/support/node_modules/axios/dist/esm/axios.min.js.map +0 -1
- package/node_modules/@appium/support/node_modules/axios/dist/node/axios.cjs +0 -6356
- package/node_modules/@appium/support/node_modules/axios/index.d.cts +0 -762
- package/node_modules/@appium/support/node_modules/axios/index.d.ts +0 -783
- package/node_modules/@appium/support/node_modules/axios/index.js +0 -45
- package/node_modules/@appium/support/node_modules/axios/lib/adapters/README.md +0 -36
- package/node_modules/@appium/support/node_modules/axios/lib/adapters/adapters.js +0 -132
- package/node_modules/@appium/support/node_modules/axios/lib/adapters/fetch.js +0 -643
- package/node_modules/@appium/support/node_modules/axios/lib/adapters/http.js +0 -1406
- package/node_modules/@appium/support/node_modules/axios/lib/adapters/xhr.js +0 -228
- package/node_modules/@appium/support/node_modules/axios/lib/axios.js +0 -89
- package/node_modules/@appium/support/node_modules/axios/lib/cancel/CancelToken.js +0 -135
- package/node_modules/@appium/support/node_modules/axios/lib/cancel/CanceledError.js +0 -22
- package/node_modules/@appium/support/node_modules/axios/lib/cancel/isCancel.js +0 -5
- package/node_modules/@appium/support/node_modules/axios/lib/core/Axios.js +0 -301
- package/node_modules/@appium/support/node_modules/axios/lib/core/AxiosError.js +0 -219
- package/node_modules/@appium/support/node_modules/axios/lib/core/AxiosHeaders.js +0 -474
- package/node_modules/@appium/support/node_modules/axios/lib/core/InterceptorManager.js +0 -72
- package/node_modules/@appium/support/node_modules/axios/lib/core/README.md +0 -8
- package/node_modules/@appium/support/node_modules/axios/lib/core/buildFullPath.js +0 -88
- package/node_modules/@appium/support/node_modules/axios/lib/core/dispatchRequest.js +0 -89
- package/node_modules/@appium/support/node_modules/axios/lib/core/mergeConfig.js +0 -174
- package/node_modules/@appium/support/node_modules/axios/lib/core/setFormDataHeaders.js +0 -27
- package/node_modules/@appium/support/node_modules/axios/lib/core/settle.js +0 -27
- package/node_modules/@appium/support/node_modules/axios/lib/core/transformData.js +0 -28
- package/node_modules/@appium/support/node_modules/axios/lib/defaults/index.js +0 -177
- package/node_modules/@appium/support/node_modules/axios/lib/defaults/transitional.js +0 -10
- package/node_modules/@appium/support/node_modules/axios/lib/env/README.md +0 -3
- package/node_modules/@appium/support/node_modules/axios/lib/env/classes/FormData.js +0 -2
- package/node_modules/@appium/support/node_modules/axios/lib/env/data.js +0 -1
- package/node_modules/@appium/support/node_modules/axios/lib/helpers/AxiosTransformStream.js +0 -156
- package/node_modules/@appium/support/node_modules/axios/lib/helpers/AxiosURLSearchParams.js +0 -59
- package/node_modules/@appium/support/node_modules/axios/lib/helpers/Http2Sessions.js +0 -119
- package/node_modules/@appium/support/node_modules/axios/lib/helpers/HttpStatusCode.js +0 -78
- package/node_modules/@appium/support/node_modules/axios/lib/helpers/README.md +0 -7
- package/node_modules/@appium/support/node_modules/axios/lib/helpers/ZlibHeaderTransformStream.js +0 -29
- package/node_modules/@appium/support/node_modules/axios/lib/helpers/bind.js +0 -14
- package/node_modules/@appium/support/node_modules/axios/lib/helpers/buildURL.js +0 -69
- package/node_modules/@appium/support/node_modules/axios/lib/helpers/callbackify.js +0 -18
- package/node_modules/@appium/support/node_modules/axios/lib/helpers/combineURLs.js +0 -23
- package/node_modules/@appium/support/node_modules/axios/lib/helpers/composeSignals.js +0 -68
- package/node_modules/@appium/support/node_modules/axios/lib/helpers/cookies.js +0 -64
- package/node_modules/@appium/support/node_modules/axios/lib/helpers/deprecatedMethod.js +0 -31
- package/node_modules/@appium/support/node_modules/axios/lib/helpers/estimateDataURLDecodedBytes.js +0 -166
- package/node_modules/@appium/support/node_modules/axios/lib/helpers/formDataToJSON.js +0 -125
- package/node_modules/@appium/support/node_modules/axios/lib/helpers/formDataToStream.js +0 -119
- package/node_modules/@appium/support/node_modules/axios/lib/helpers/fromDataURI.js +0 -68
- package/node_modules/@appium/support/node_modules/axios/lib/helpers/isAbsoluteURL.js +0 -19
- package/node_modules/@appium/support/node_modules/axios/lib/helpers/isAxiosError.js +0 -14
- package/node_modules/@appium/support/node_modules/axios/lib/helpers/isURLSameOrigin.js +0 -16
- package/node_modules/@appium/support/node_modules/axios/lib/helpers/null.js +0 -2
- package/node_modules/@appium/support/node_modules/axios/lib/helpers/parseHeaders.js +0 -71
- package/node_modules/@appium/support/node_modules/axios/lib/helpers/parseProtocol.js +0 -6
- package/node_modules/@appium/support/node_modules/axios/lib/helpers/progressEventReducer.js +0 -54
- package/node_modules/@appium/support/node_modules/axios/lib/helpers/readBlob.js +0 -15
- package/node_modules/@appium/support/node_modules/axios/lib/helpers/resolveConfig.js +0 -105
- package/node_modules/@appium/support/node_modules/axios/lib/helpers/sanitizeHeaderValue.js +0 -60
- package/node_modules/@appium/support/node_modules/axios/lib/helpers/shouldBypassProxy.js +0 -329
- package/node_modules/@appium/support/node_modules/axios/lib/helpers/speedometer.js +0 -55
- package/node_modules/@appium/support/node_modules/axios/lib/helpers/spread.js +0 -28
- package/node_modules/@appium/support/node_modules/axios/lib/helpers/throttle.js +0 -44
- package/node_modules/@appium/support/node_modules/axios/lib/helpers/toFormData.js +0 -286
- package/node_modules/@appium/support/node_modules/axios/lib/helpers/toURLEncodedForm.js +0 -19
- package/node_modules/@appium/support/node_modules/axios/lib/helpers/trackStream.js +0 -89
- package/node_modules/@appium/support/node_modules/axios/lib/helpers/validator.js +0 -112
- package/node_modules/@appium/support/node_modules/axios/lib/platform/browser/classes/Blob.js +0 -3
- package/node_modules/@appium/support/node_modules/axios/lib/platform/browser/classes/FormData.js +0 -3
- package/node_modules/@appium/support/node_modules/axios/lib/platform/browser/classes/URLSearchParams.js +0 -4
- package/node_modules/@appium/support/node_modules/axios/lib/platform/browser/index.js +0 -13
- package/node_modules/@appium/support/node_modules/axios/lib/platform/common/utils.js +0 -52
- package/node_modules/@appium/support/node_modules/axios/lib/platform/index.js +0 -7
- package/node_modules/@appium/support/node_modules/axios/lib/platform/node/classes/Buffer.js +0 -11
- package/node_modules/@appium/support/node_modules/axios/lib/platform/node/classes/FormData.js +0 -3
- package/node_modules/@appium/support/node_modules/axios/lib/platform/node/classes/URLSearchParams.js +0 -4
- package/node_modules/@appium/support/node_modules/axios/lib/platform/node/index.js +0 -37
- package/node_modules/@appium/support/node_modules/axios/lib/utils.js +0 -1029
- package/node_modules/@appium/support/node_modules/axios/package.json +0 -203
- package/node_modules/appium-uiautomator2-server/apks/appium-uiautomator2-server-v10.6.6.apk.idsig +0 -0
- package/node_modules/asyncbox/build/cjs/lib/asyncbox.d.ts +0 -103
- package/node_modules/asyncbox/build/cjs/lib/asyncbox.d.ts.map +0 -1
- package/node_modules/asyncbox/build/cjs/lib/asyncbox.js +0 -311
- package/node_modules/asyncbox/build/cjs/lib/asyncbox.js.map +0 -1
- package/node_modules/asyncbox/build/esm/lib/asyncbox.d.ts +0 -103
- package/node_modules/asyncbox/build/esm/lib/asyncbox.d.ts.map +0 -1
- package/node_modules/asyncbox/build/esm/lib/asyncbox.js +0 -298
- package/node_modules/asyncbox/build/esm/lib/asyncbox.js.map +0 -1
- package/node_modules/asyncbox/lib/asyncbox.ts +0 -382
- package/node_modules/big-integer/BigInteger.d.ts +0 -2393
- package/node_modules/big-integer/BigInteger.js +0 -1453
- package/node_modules/big-integer/BigInteger.min.js +0 -1
- package/node_modules/big-integer/LICENSE +0 -24
- package/node_modules/big-integer/README.md +0 -589
- package/node_modules/big-integer/bower.json +0 -29
- package/node_modules/big-integer/package.json +0 -48
- package/node_modules/big-integer/tsconfig.json +0 -24
- package/node_modules/bplist-creator/bplistCreator.d.ts +0 -8
- package/node_modules/bplist-creator/bplistCreator.js +0 -460
- package/node_modules/bplist-creator/test/airplay.bplist +0 -0
- package/node_modules/bplist-creator/test/binaryData.bplist +0 -0
- package/node_modules/bplist-creator/test/creatorTest.js +0 -211
- package/node_modules/bplist-creator/test/iTunes-small.bplist +0 -0
- package/node_modules/bplist-creator/test/integers.bplist +0 -0
- package/node_modules/bplist-creator/test/sample1.bplist +0 -0
- package/node_modules/bplist-creator/test/sample2.bplist +0 -0
- package/node_modules/bplist-creator/test/uid.bplist +0 -0
- package/node_modules/bplist-creator/test/utf16.bplist +0 -0
- package/node_modules/bplist-parser/.editorconfig +0 -12
- package/node_modules/bplist-parser/.eslintignore +0 -1
- package/node_modules/bplist-parser/.eslintrc.js +0 -296
- package/node_modules/bplist-parser/bplistParser.d.ts +0 -8
- package/node_modules/io.appium.settings/build/lib/utils.d.ts.map +0 -1
- package/node_modules/io.appium.settings/build/lib/utils.js.map +0 -1
- package/node_modules/on-finished/HISTORY.md +0 -98
- package/node_modules/shell-quote/.nycrc +0 -14
- package/node_modules/shell-quote/eslint.config.mjs +0 -29
- package/node_modules/shell-quote/security.md +0 -11
- package/node_modules/shell-quote/test/comment.js +0 -16
- package/node_modules/shell-quote/test/env.js +0 -52
- package/node_modules/shell-quote/test/env_fn.js +0 -21
- package/node_modules/shell-quote/test/op.js +0 -102
- package/node_modules/shell-quote/test/parse.js +0 -149
- package/node_modules/shell-quote/test/quote.js +0 -145
- package/node_modules/shell-quote/test/set.js +0 -31
- package/node_modules/stream-buffers/.travis.yml +0 -28
- package/node_modules/stream-buffers/coverage/coverage.json +0 -1
- package/node_modules/stream-buffers/coverage/lcov-report/base.css +0 -182
- package/node_modules/stream-buffers/coverage/lcov-report/index.html +0 -73
- package/node_modules/stream-buffers/coverage/lcov-report/lib/constants.js.html +0 -63
- package/node_modules/stream-buffers/coverage/lcov-report/lib/index.html +0 -112
- package/node_modules/stream-buffers/coverage/lcov-report/lib/readable_streambuffer.js.html +0 -453
- package/node_modules/stream-buffers/coverage/lcov-report/lib/streambuffer.js.html +0 -54
- package/node_modules/stream-buffers/coverage/lcov-report/lib/writable_streambuffer.js.html +0 -336
- package/node_modules/stream-buffers/coverage/lcov-report/prettify.css +0 -1
- package/node_modules/stream-buffers/coverage/lcov-report/prettify.js +0 -1
- package/node_modules/stream-buffers/coverage/lcov-report/sort-arrow-sprite.png +0 -0
- package/node_modules/stream-buffers/coverage/lcov-report/sorter.js +0 -156
- package/node_modules/stream-buffers/coverage/lcov.info +0 -305
- /package/node_modules/io.appium.settings/lib/{utils.ts → utils/apk-path.ts} +0 -0
|
@@ -5,6 +5,7 @@ var qs = require('../');
|
|
|
5
5
|
var utils = require('../lib/utils');
|
|
6
6
|
var iconv = require('iconv-lite');
|
|
7
7
|
var SaferBuffer = require('safer-buffer').Buffer;
|
|
8
|
+
var url = require('url');
|
|
8
9
|
var hasSymbols = require('has-symbols');
|
|
9
10
|
var mockProperty = require('mock-property');
|
|
10
11
|
var emptyTestCases = require('./empty-keys-cases').emptyTestCases;
|
|
@@ -24,6 +25,28 @@ test('stringify()', function (t) {
|
|
|
24
25
|
st.end();
|
|
25
26
|
});
|
|
26
27
|
|
|
28
|
+
t.test('stringifies lone surrogates as U+FFFD', function (st) {
|
|
29
|
+
st.equal(qs.stringify({ a: '\uD800x' }), 'a=%EF%BF%BDx', 'lone high surrogate does not swallow the next character');
|
|
30
|
+
st.equal(qs.stringify({ a: '\uDC00x' }), 'a=%EF%BF%BDx', 'lone low surrogate does not swallow the next character');
|
|
31
|
+
st.equal(qs.stringify({ '\uD800': 'b' }), '%EF%BF%BD=b', 'lone surrogate in a key');
|
|
32
|
+
st.deepEqual(qs.parse(qs.stringify({ a: 'x\uD800y' })), { a: 'x\uFFFDy' }, 'parses back with U+FFFD in place of the lone surrogate');
|
|
33
|
+
st.equal(qs.stringify({ '\uDC00': 'b' }), '%EF%BF%BD=b', 'lone low surrogate in a key');
|
|
34
|
+
st.equal(qs.stringify({ a: { 'b\uD800': 'c' } }), 'a%5Bb%EF%BF%BD%5D=c', 'lone surrogate in a nested key does not swallow the closing bracket');
|
|
35
|
+
st.equal(qs.stringify({ a: '\uD800 x' }, { format: 'RFC1738' }), 'a=%EF%BF%BD+x', 'lone surrogate does not swallow a space in RFC1738');
|
|
36
|
+
st.equal(
|
|
37
|
+
qs.stringify({ 'a\uD800': { b: 'c' } }, { allowDots: true, encodeDotInKeys: true }),
|
|
38
|
+
'a%EF%BF%BD.b=c',
|
|
39
|
+
'lone surrogate does not swallow a dot separator'
|
|
40
|
+
);
|
|
41
|
+
st.equal(qs.stringify({ a: ['x\uD800', 'y'] }, { arrayFormat: 'comma' }), 'a=x%EF%BF%BD%2Cy', 'lone surrogate does not swallow a comma');
|
|
42
|
+
st.equal(
|
|
43
|
+
qs.stringify({ a: ['x\uD800', 'y'] }, { arrayFormat: 'comma', encodeValuesOnly: true }),
|
|
44
|
+
'a=x%EF%BF%BD,y',
|
|
45
|
+
'lone surrogate at the end of a comma-joined element encodes as U+FFFD'
|
|
46
|
+
);
|
|
47
|
+
st.end();
|
|
48
|
+
});
|
|
49
|
+
|
|
27
50
|
t.test('stringifies falsy values', function (st) {
|
|
28
51
|
st.equal(qs.stringify(undefined), '');
|
|
29
52
|
st.equal(qs.stringify(null), '');
|
|
@@ -212,63 +235,94 @@ test('stringify()', function (t) {
|
|
|
212
235
|
st.end();
|
|
213
236
|
});
|
|
214
237
|
|
|
215
|
-
|
|
216
|
-
// `stringify` percent-encodes the structural `.` separators that `allowDots` inserts between
|
|
217
|
-
// nested keys, not just the literal dots inside a key, which breaks the stringify -> parse
|
|
218
|
-
// round-trip. These assertions pin that behavior so it cannot change silently: the fix in
|
|
219
|
-
// https://github.com/ljharb/qs/pull/564 changes every output below, so landing that fix MUST
|
|
220
|
-
// update this test (that is the point — it forces the behavior change to be explicit).
|
|
221
|
-
t.test('[characterization] encodeDotInKeys currently over-encodes structural separator dots (pre-#564)', function (st) {
|
|
238
|
+
t.test('does not encode the structural separator dots between nested keys when encodeDotInKeys and allowDots are provided', function (st) {
|
|
222
239
|
st.equal(
|
|
223
|
-
qs.stringify(
|
|
224
|
-
|
|
225
|
-
|
|
240
|
+
qs.stringify(
|
|
241
|
+
{ a: { b: { c: 'd' } } },
|
|
242
|
+
{ allowDots: true, encodeDotInKeys: true }
|
|
243
|
+
),
|
|
244
|
+
'a.b.c=d',
|
|
245
|
+
'no key contains a literal dot, so encodeDotInKeys is a no-op on the separators'
|
|
226
246
|
);
|
|
227
247
|
st.equal(
|
|
228
|
-
qs.stringify(
|
|
229
|
-
|
|
230
|
-
|
|
248
|
+
qs.stringify(
|
|
249
|
+
{ a: { b: { c: { d: 'e' } } } },
|
|
250
|
+
{ allowDots: true, encodeDotInKeys: true }
|
|
251
|
+
),
|
|
252
|
+
'a.b.c.d=e',
|
|
253
|
+
'every nesting separator is preserved, not just the last one'
|
|
231
254
|
);
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
255
|
+
|
|
256
|
+
st.deepEqual(
|
|
257
|
+
qs.parse(
|
|
258
|
+
qs.stringify({ a: { b: { c: 'd' } } }, { allowDots: true, encodeDotInKeys: true }),
|
|
259
|
+
{ allowDots: true, decodeDotInKeys: true }
|
|
260
|
+
),
|
|
261
|
+
{ a: { b: { c: 'd' } } },
|
|
262
|
+
'stringify -> parse round-trips a deeply nested object'
|
|
236
263
|
);
|
|
264
|
+
|
|
265
|
+
st.end();
|
|
266
|
+
});
|
|
267
|
+
|
|
268
|
+
t.test('encodeDotInKeys encodes only literal dots inside nested keys, never the structural separators, at any depth', function (st) {
|
|
237
269
|
st.equal(
|
|
238
270
|
qs.stringify({ a: { 'b.c': { d: 'e' } } }, { allowDots: true, encodeDotInKeys: true }),
|
|
239
|
-
'a%
|
|
240
|
-
'nested
|
|
271
|
+
'a.b%252Ec.d=e',
|
|
272
|
+
'a nested key with a literal dot and an object value encodes only its own dot'
|
|
273
|
+
);
|
|
274
|
+
st.equal(
|
|
275
|
+
qs.stringify({ 'a.b': { c: { d: 'e' } } }, { allowDots: true, encodeDotInKeys: true }),
|
|
276
|
+
'a%252Eb.c.d=e',
|
|
277
|
+
'a top-level dotted key stays encoded while deeper separators stay literal'
|
|
241
278
|
);
|
|
242
279
|
st.equal(
|
|
243
280
|
qs.stringify({ a: { b: { 'c.d': { e: 'f' } } } }, { allowDots: true, encodeDotInKeys: true }),
|
|
244
|
-
'a%
|
|
245
|
-
'deeply nested
|
|
281
|
+
'a.b.c%252Ed.e=f',
|
|
282
|
+
'a literal dot in a deeply nested key is encoded without touching the separators around it'
|
|
246
283
|
);
|
|
247
284
|
|
|
248
285
|
st.equal(
|
|
249
286
|
qs.stringify({ a: { b: [1, 2] } }, { allowDots: true, encodeDotInKeys: true }),
|
|
250
|
-
'a%
|
|
251
|
-
'
|
|
287
|
+
'a.b%5B0%5D=1&a.b%5B1%5D=2',
|
|
288
|
+
'separator dots are preserved for an array value nested under keys'
|
|
252
289
|
);
|
|
253
290
|
st.equal(
|
|
254
291
|
qs.stringify({ a: { 'b.c': [1, 2] } }, { allowDots: true, encodeDotInKeys: true }),
|
|
255
|
-
'a%
|
|
256
|
-
'
|
|
292
|
+
'a.b%252Ec%5B0%5D=1&a.b%252Ec%5B1%5D=2',
|
|
293
|
+
'a nested dotted key with an array value encodes only its own dot'
|
|
257
294
|
);
|
|
258
295
|
|
|
259
|
-
st.
|
|
260
|
-
qs.
|
|
261
|
-
|
|
262
|
-
|
|
296
|
+
st.deepEqual(
|
|
297
|
+
qs.parse(
|
|
298
|
+
qs.stringify({ a: { 'b.c': { d: 'e' } } }, { allowDots: true, encodeDotInKeys: true }),
|
|
299
|
+
{ allowDots: true, decodeDotInKeys: true }
|
|
300
|
+
),
|
|
301
|
+
{ a: { 'b.c': { d: 'e' } } },
|
|
302
|
+
'stringify -> parse round-trips a nested dotted key with an object value'
|
|
263
303
|
);
|
|
264
|
-
|
|
265
304
|
st.deepEqual(
|
|
266
305
|
qs.parse(
|
|
267
|
-
qs.stringify({ a: {
|
|
306
|
+
qs.stringify({ 'a.b': { c: { d: 'e' } } }, { allowDots: true, encodeDotInKeys: true }),
|
|
268
307
|
{ allowDots: true, decodeDotInKeys: true }
|
|
269
308
|
),
|
|
270
|
-
{ 'a.b': { c:
|
|
271
|
-
'
|
|
309
|
+
{ 'a.b': { c: { d: 'e' } } },
|
|
310
|
+
'stringify -> parse round-trips a top-level dotted key with deep nesting'
|
|
311
|
+
);
|
|
312
|
+
|
|
313
|
+
st.end();
|
|
314
|
+
});
|
|
315
|
+
|
|
316
|
+
t.test('with allowDots false, encodeDotInKeys leaves nested-key dots literal, consistently for object and primitive values', function (st) {
|
|
317
|
+
st.equal(
|
|
318
|
+
qs.stringify({ a: { 'b.c': { d: 'e' } } }, { allowDots: false, encodeDotInKeys: true }),
|
|
319
|
+
'a%5Bb.c%5D%5Bd%5D=e',
|
|
320
|
+
'nested dotted key with an object value'
|
|
321
|
+
);
|
|
322
|
+
st.equal(
|
|
323
|
+
qs.stringify({ a: { 'b.c': 'e' } }, { allowDots: false, encodeDotInKeys: true }),
|
|
324
|
+
'a%5Bb.c%5D=e',
|
|
325
|
+
'nested dotted key with a primitive value matches the object-value case'
|
|
272
326
|
);
|
|
273
327
|
|
|
274
328
|
st.end();
|
|
@@ -394,6 +448,41 @@ test('stringify()', function (t) {
|
|
|
394
448
|
st.end();
|
|
395
449
|
});
|
|
396
450
|
|
|
451
|
+
t.test('ignores inherited array format names', function (st) {
|
|
452
|
+
var array = { a: ['b', 'c'] };
|
|
453
|
+
var indices = 'a%5B0%5D=b&a%5B1%5D=c';
|
|
454
|
+
var repeat = 'a=b&a=c';
|
|
455
|
+
|
|
456
|
+
st.equal(qs.stringify(array, { arrayFormat: 'unsupported' }), indices, 'unknown format falls back to `indices`');
|
|
457
|
+
|
|
458
|
+
var names = [
|
|
459
|
+
'constructor',
|
|
460
|
+
'toString',
|
|
461
|
+
'__proto__',
|
|
462
|
+
'valueOf',
|
|
463
|
+
'hasOwnProperty',
|
|
464
|
+
'isPrototypeOf',
|
|
465
|
+
'propertyIsEnumerable',
|
|
466
|
+
'toLocaleString'
|
|
467
|
+
];
|
|
468
|
+
for (var i = 0; i < names.length; i++) {
|
|
469
|
+
var name = names[i];
|
|
470
|
+
st.equal(qs.stringify(array, { arrayFormat: name }), indices, '`' + name + '` falls back to `indices`');
|
|
471
|
+
st.equal(
|
|
472
|
+
qs.stringify(array, { arrayFormat: name, indices: true }),
|
|
473
|
+
indices,
|
|
474
|
+
'`' + name + '` with `indices: true` falls back to `indices`'
|
|
475
|
+
);
|
|
476
|
+
st.equal(
|
|
477
|
+
qs.stringify(array, { arrayFormat: name, indices: false }),
|
|
478
|
+
repeat,
|
|
479
|
+
'`' + name + '` with `indices: false` falls back to `repeat`'
|
|
480
|
+
);
|
|
481
|
+
}
|
|
482
|
+
|
|
483
|
+
st.end();
|
|
484
|
+
});
|
|
485
|
+
|
|
397
486
|
t.test('`skipNulls` option', function (st) {
|
|
398
487
|
st.equal(
|
|
399
488
|
qs.stringify({ a: 'b', c: null }, { skipNulls: true }),
|
|
@@ -454,6 +543,24 @@ test('stringify()', function (t) {
|
|
|
454
543
|
st.end();
|
|
455
544
|
});
|
|
456
545
|
|
|
546
|
+
t.test('allowEmptyArrays keys that need no encoding', function (st) {
|
|
547
|
+
st.equal(qs.stringify({ foo: [] }, { allowEmptyArrays: true, format: 'RFC1738' }), 'foo[]', 'a top-level key in RFC1738');
|
|
548
|
+
st.equal(
|
|
549
|
+
qs.stringify({ a: { b: [] }, c: 'd e' }, { allowEmptyArrays: true, encodeValuesOnly: true }),
|
|
550
|
+
'a[b][]&c=d%20e',
|
|
551
|
+
'a nested key with encodeValuesOnly'
|
|
552
|
+
);
|
|
553
|
+
st.equal(qs.stringify({ a: { b: [] } }, { allowEmptyArrays: true, encode: false }), 'a[b][]', 'a nested key with encode: false');
|
|
554
|
+
st.equal(qs.stringify({ a: { b: [] } }, { allowEmptyArrays: true, allowDots: true }), 'a.b[]', 'a nested key with allowDots');
|
|
555
|
+
st.equal(
|
|
556
|
+
qs.stringify({ a: { b: [] } }, { allowEmptyArrays: true, allowDots: true, format: 'RFC1738' }),
|
|
557
|
+
'a.b[]',
|
|
558
|
+
'a nested key with allowDots in RFC1738'
|
|
559
|
+
);
|
|
560
|
+
|
|
561
|
+
st.end();
|
|
562
|
+
});
|
|
563
|
+
|
|
457
564
|
t.test('allowEmptyArrays + strictNullHandling', function (st) {
|
|
458
565
|
st.equal(
|
|
459
566
|
qs.stringify(
|
|
@@ -499,6 +606,62 @@ test('stringify()', function (t) {
|
|
|
499
606
|
st.end();
|
|
500
607
|
});
|
|
501
608
|
|
|
609
|
+
t.test('should encode the key of an empty array when allowEmptyArrays is set', function (st) {
|
|
610
|
+
st.equal(
|
|
611
|
+
qs.stringify({ 'a b': [] }, { allowEmptyArrays: true }),
|
|
612
|
+
'a%20b[]',
|
|
613
|
+
'default (RFC3986) percent-encodes the space in the key'
|
|
614
|
+
);
|
|
615
|
+
st.equal(
|
|
616
|
+
qs.stringify({ 'a b': [] }, { allowEmptyArrays: true, format: 'RFC1738' }),
|
|
617
|
+
'a+b[]',
|
|
618
|
+
'RFC1738 encodes the space in the key as a plus'
|
|
619
|
+
);
|
|
620
|
+
st.equal(
|
|
621
|
+
qs.stringify({ 'a b': [] }, { allowEmptyArrays: true, encodeValuesOnly: true }),
|
|
622
|
+
'a b[]',
|
|
623
|
+
'encodeValuesOnly leaves the key unencoded'
|
|
624
|
+
);
|
|
625
|
+
st.equal(
|
|
626
|
+
qs.stringify({ 'a b': [] }, { allowEmptyArrays: true, encode: false }),
|
|
627
|
+
'a b[]',
|
|
628
|
+
'encode: false leaves the key unencoded'
|
|
629
|
+
);
|
|
630
|
+
|
|
631
|
+
st.deepEqual(
|
|
632
|
+
qs.parse(qs.stringify({ 'a b': [], 'a&b=c': [] }, { allowEmptyArrays: true }), { allowEmptyArrays: true }),
|
|
633
|
+
{ 'a b': [], 'a&b=c': [] },
|
|
634
|
+
'the encoded keys round-trip back to the original, including `&` and `=`'
|
|
635
|
+
);
|
|
636
|
+
st.equal(
|
|
637
|
+
qs.stringify({ 'a b': ['x'] }, { allowEmptyArrays: true, arrayFormat: 'brackets' }),
|
|
638
|
+
'a%20b%5B%5D=x',
|
|
639
|
+
'the same key with a value encodes the key prefix identically'
|
|
640
|
+
);
|
|
641
|
+
st.equal(
|
|
642
|
+
qs.stringify({ a: { 'b c': [] } }, { allowEmptyArrays: true }),
|
|
643
|
+
'a%5Bb%20c%5D[]',
|
|
644
|
+
'a nested key prefix is encoded like the value path encodes it'
|
|
645
|
+
);
|
|
646
|
+
st.equal(
|
|
647
|
+
qs.stringify({ a: { b: [] } }, { allowEmptyArrays: true }),
|
|
648
|
+
'a%5Bb%5D[]',
|
|
649
|
+
'a nested key that needs no encoding still has its brackets encoded'
|
|
650
|
+
);
|
|
651
|
+
st.equal(
|
|
652
|
+
qs.stringify({ 'a.b': [] }, { allowEmptyArrays: true, allowDots: true, encodeDotInKeys: true }),
|
|
653
|
+
'a%252Eb[]',
|
|
654
|
+
'encodeDotInKeys double-encodes the dot, as on the value path'
|
|
655
|
+
);
|
|
656
|
+
st.deepEqual(
|
|
657
|
+
qs.parse('a%252Eb[]', { allowEmptyArrays: true, allowDots: true, decodeDotInKeys: true }),
|
|
658
|
+
{ 'a.b': [] },
|
|
659
|
+
'the encodeDotInKeys output round-trips'
|
|
660
|
+
);
|
|
661
|
+
|
|
662
|
+
st.end();
|
|
663
|
+
});
|
|
664
|
+
|
|
502
665
|
t.test('stringifies an array value with one item vs multiple items', function (st) {
|
|
503
666
|
st.test('non-array item', function (s2t) {
|
|
504
667
|
s2t.equal(qs.stringify({ a: 'c' }, { encodeValuesOnly: true, arrayFormat: 'indices' }), 'a=c');
|
|
@@ -569,6 +732,53 @@ test('stringify()', function (t) {
|
|
|
569
732
|
st.end();
|
|
570
733
|
});
|
|
571
734
|
|
|
735
|
+
t.test('encodes comma array values with the same encoder arguments as other values, with encodeValuesOnly', function (st) {
|
|
736
|
+
var commaValuesOnly = { arrayFormat: 'comma', encodeValuesOnly: true };
|
|
737
|
+
|
|
738
|
+
st.equal(
|
|
739
|
+
qs.stringify({ a: ['é', 'x'], b: 'é' }, utils.assign({ charset: 'iso-8859-1' }, commaValuesOnly)),
|
|
740
|
+
'a=%E9,x&b=%E9',
|
|
741
|
+
'respects charset iso-8859-1'
|
|
742
|
+
);
|
|
743
|
+
st.deepEqual(
|
|
744
|
+
qs.parse(qs.stringify({ a: ['é', 'x'] }, utils.assign({ charset: 'iso-8859-1' }, commaValuesOnly)), { charset: 'iso-8859-1', comma: true }),
|
|
745
|
+
{ a: ['é', 'x'] },
|
|
746
|
+
'round-trips in iso-8859-1'
|
|
747
|
+
);
|
|
748
|
+
st.equal(
|
|
749
|
+
qs.stringify({ a: ['☺'] }, utils.assign({ charset: 'iso-8859-1' }, commaValuesOnly)),
|
|
750
|
+
'a=%26%239786%3B',
|
|
751
|
+
'encodes unrepresentable chars as numeric entities in iso-8859-1'
|
|
752
|
+
);
|
|
753
|
+
st.equal(
|
|
754
|
+
qs.stringify({ a: ['(x)', 'y z'], b: '(x)' }, utils.assign({ format: qs.formats.RFC1738 }, commaValuesOnly)),
|
|
755
|
+
'a=(x),y+z&b=(x)',
|
|
756
|
+
'respects format RFC1738'
|
|
757
|
+
);
|
|
758
|
+
|
|
759
|
+
var calls = [];
|
|
760
|
+
st.equal(
|
|
761
|
+
qs.stringify({ a: ['b', 'c'] }, utils.assign({
|
|
762
|
+
encoder: function (str, defaultEncoder, charset, kind, format) {
|
|
763
|
+
calls[calls.length] = [str, typeof defaultEncoder, charset, kind, format];
|
|
764
|
+
return defaultEncoder(str, defaultEncoder, charset, kind, format).toUpperCase();
|
|
765
|
+
}
|
|
766
|
+
}, commaValuesOnly)),
|
|
767
|
+
'a=B,C',
|
|
768
|
+
'a custom encoder can call defaultEncoder'
|
|
769
|
+
);
|
|
770
|
+
st.deepEqual(
|
|
771
|
+
calls,
|
|
772
|
+
[
|
|
773
|
+
['b', 'function', 'utf-8', 'value', qs.formats.RFC3986],
|
|
774
|
+
['c', 'function', 'utf-8', 'value', qs.formats.RFC3986]
|
|
775
|
+
],
|
|
776
|
+
'a custom encoder receives defaultEncoder, charset, kind, and format'
|
|
777
|
+
);
|
|
778
|
+
|
|
779
|
+
st.end();
|
|
780
|
+
});
|
|
781
|
+
|
|
572
782
|
t.test('stringifies comma and empty non-array values', function (st) {
|
|
573
783
|
st.equal(qs.stringify({ a: ',', b: '', c: 'c,d%' }, { encode: false, arrayFormat: 'indices' }), 'a=,&b=&c=c,d%');
|
|
574
784
|
st.equal(qs.stringify({ a: ',', b: '', c: 'c,d%' }, { encode: false, arrayFormat: 'brackets' }), 'a=,&b=&c=c,d%');
|
|
@@ -865,6 +1075,112 @@ test('stringify()', function (t) {
|
|
|
865
1075
|
st.end();
|
|
866
1076
|
});
|
|
867
1077
|
|
|
1078
|
+
t.test('arrayFormat=comma: does not crash on entries with no callable `toString`', function (st) {
|
|
1079
|
+
var json = JSON.parse('{ "a": ["b", { "toString": "x" }, "c"] }');
|
|
1080
|
+
st.equal(qs.stringify(json, { arrayFormat: 'comma' }), 'a=b%2C%5Bobject%20Object%5D%2Cc', 'JSON own `toString`');
|
|
1081
|
+
st.equal(qs.stringify(json, { arrayFormat: 'comma', encode: false }), 'a=b,[object Object],c', 'with encode: false');
|
|
1082
|
+
st.equal(
|
|
1083
|
+
qs.stringify(json, { arrayFormat: 'comma', encodeValuesOnly: true }),
|
|
1084
|
+
'a=b,%5Bobject%20Object%5D,c',
|
|
1085
|
+
'with encodeValuesOnly'
|
|
1086
|
+
);
|
|
1087
|
+
st.equal(
|
|
1088
|
+
qs.stringify(JSON.parse('{ "a": [{ "toString": "x" }] }'), { arrayFormat: 'comma', commaRoundTrip: true }),
|
|
1089
|
+
'a%5B%5D=%5Bobject%20Object%5D',
|
|
1090
|
+
'with commaRoundTrip'
|
|
1091
|
+
);
|
|
1092
|
+
st.equal(
|
|
1093
|
+
qs.stringify(JSON.parse('{ "a": [{ "toString": "x" }] }'), { arrayFormat: 'comma' }),
|
|
1094
|
+
qs.stringify({ a: [{ b: 1 }] }, { arrayFormat: 'comma' }),
|
|
1095
|
+
'renders the same as a plain object entry'
|
|
1096
|
+
);
|
|
1097
|
+
|
|
1098
|
+
st.equal(
|
|
1099
|
+
qs.stringify(qs.parse('a[][b]=c', { plainObjects: true }), { arrayFormat: 'comma' }),
|
|
1100
|
+
'a=%5Bobject%20Object%5D',
|
|
1101
|
+
'null-prototype entry from `parse` with plainObjects'
|
|
1102
|
+
);
|
|
1103
|
+
st.equal(
|
|
1104
|
+
qs.stringify(qs.parse('a[][b]=c', { plainObjects: true }), { arrayFormat: 'comma', encodeValuesOnly: true }),
|
|
1105
|
+
'a=%5Bobject%20Object%5D',
|
|
1106
|
+
'null-prototype entry from `parse` with plainObjects, with encodeValuesOnly'
|
|
1107
|
+
);
|
|
1108
|
+
st.equal(
|
|
1109
|
+
qs.stringify(qs.parse('a[0][toString]=x', { allowPrototypes: true }), { arrayFormat: 'comma' }),
|
|
1110
|
+
'a=%5Bobject%20Object%5D',
|
|
1111
|
+
'own `toString` entry from `parse` with allowPrototypes'
|
|
1112
|
+
);
|
|
1113
|
+
|
|
1114
|
+
var nested = JSON.parse('{ "a": [[1, [{ "toString": "x" }]], "y"] }');
|
|
1115
|
+
st.equal(qs.stringify(nested, { arrayFormat: 'comma', encode: false }), 'a=1,[object Object],y', 'nested array');
|
|
1116
|
+
st.equal(
|
|
1117
|
+
qs.stringify(nested, { arrayFormat: 'comma', encodeValuesOnly: true }),
|
|
1118
|
+
'a=1%2C%5Bobject%20Object%5D,y',
|
|
1119
|
+
'nested array, with encodeValuesOnly'
|
|
1120
|
+
);
|
|
1121
|
+
st.equal(qs.stringify({ a: [[1, 2], 3] }, { arrayFormat: 'comma', encode: false }), 'a=1,2,3', 'nested array is still flattened');
|
|
1122
|
+
|
|
1123
|
+
var cyclic = [{ toString: 'x' }];
|
|
1124
|
+
cyclic[cyclic.length] = cyclic;
|
|
1125
|
+
st.equal(
|
|
1126
|
+
qs.stringify({ a: cyclic }, { arrayFormat: 'comma', encode: false }),
|
|
1127
|
+
'a=[object Object],[object Object],',
|
|
1128
|
+
'cyclic nested array joins its cycle as empty'
|
|
1129
|
+
);
|
|
1130
|
+
|
|
1131
|
+
var customJoin = [{ toString: 'x' }];
|
|
1132
|
+
customJoin.join = function () { return 'j'; };
|
|
1133
|
+
st.equal(qs.stringify({ a: [customJoin, 'y'] }, { arrayFormat: 'comma', encode: false }), 'a=j,y', 'own `join` is still used');
|
|
1134
|
+
|
|
1135
|
+
st.equal(
|
|
1136
|
+
qs.stringify({ a: [{ toString: 'x', valueOf: function () { return 7; } }] }, { arrayFormat: 'comma' }),
|
|
1137
|
+
'a=7',
|
|
1138
|
+
'primitive `valueOf` is still used'
|
|
1139
|
+
);
|
|
1140
|
+
st.equal(
|
|
1141
|
+
qs.stringify({ a: [{ toString: 'x', valueOf: function () { return null; } }] }, { arrayFormat: 'comma' }),
|
|
1142
|
+
'a=null',
|
|
1143
|
+
'null `valueOf` is still used'
|
|
1144
|
+
);
|
|
1145
|
+
st.equal(
|
|
1146
|
+
qs.stringify({ a: [{ toString: 'x', valueOf: function () { return {}; } }] }, { arrayFormat: 'comma' }),
|
|
1147
|
+
'a=%5Bobject%20Object%5D',
|
|
1148
|
+
'non-primitive `valueOf` falls back'
|
|
1149
|
+
);
|
|
1150
|
+
|
|
1151
|
+
st.equal(
|
|
1152
|
+
qs.stringify({ a: [{ toString: function () { return 't'; } }, new Date(0)] }, { arrayFormat: 'comma', encode: false }),
|
|
1153
|
+
'a=t,1970-01-01T00:00:00.000Z',
|
|
1154
|
+
'callable `toString` and dates are unaffected'
|
|
1155
|
+
);
|
|
1156
|
+
|
|
1157
|
+
st['throws'](
|
|
1158
|
+
function () {
|
|
1159
|
+
qs.stringify({ a: [{ toString: function () { throw new SyntaxError('mine'); } }] }, { arrayFormat: 'comma' });
|
|
1160
|
+
},
|
|
1161
|
+
SyntaxError,
|
|
1162
|
+
'a throwing `toString` still throws'
|
|
1163
|
+
);
|
|
1164
|
+
st['throws'](
|
|
1165
|
+
function () {
|
|
1166
|
+
qs.stringify({ a: [{ toString: 'x', valueOf: function () { throw new EvalError('mine'); } }] }, { arrayFormat: 'comma' });
|
|
1167
|
+
},
|
|
1168
|
+
EvalError,
|
|
1169
|
+
'a throwing `valueOf` still throws'
|
|
1170
|
+
);
|
|
1171
|
+
|
|
1172
|
+
st.end();
|
|
1173
|
+
});
|
|
1174
|
+
|
|
1175
|
+
t.test('arrayFormat=comma: entries with `Symbol.toPrimitive` are unaffected', { skip: !hasSymbols() || typeof Symbol.toPrimitive !== 'symbol' }, function (st) {
|
|
1176
|
+
var entry = { toString: 'x' };
|
|
1177
|
+
entry[Symbol.toPrimitive] = function () { return 'p'; };
|
|
1178
|
+
st.equal(qs.stringify({ a: [entry] }, { arrayFormat: 'comma' }), 'a=p');
|
|
1179
|
+
st.equal(qs.stringify({ a: [entry] }, { arrayFormat: 'comma', encodeValuesOnly: true }), 'a=p');
|
|
1180
|
+
|
|
1181
|
+
st.end();
|
|
1182
|
+
});
|
|
1183
|
+
|
|
868
1184
|
t.test('stringifies a null object', { skip: !hasProto }, function (st) {
|
|
869
1185
|
st.equal(qs.stringify({ __proto__: null, a: 'b' }), 'a=b');
|
|
870
1186
|
st.end();
|
|
@@ -1095,6 +1411,53 @@ test('stringify()', function (t) {
|
|
|
1095
1411
|
st.end();
|
|
1096
1412
|
});
|
|
1097
1413
|
|
|
1414
|
+
t.test('applies sort to nested keys selected by filter=array', function (st) {
|
|
1415
|
+
var asc = function (a, b) { return a.localeCompare(b); };
|
|
1416
|
+
var desc = function (a, b) { return b.localeCompare(a); };
|
|
1417
|
+
|
|
1418
|
+
st.equal(
|
|
1419
|
+
qs.stringify({ a: { c: 1, b: 2 }, z: 3 }, { filter: ['z', 'a', 'c', 'b'], sort: asc, encode: false }),
|
|
1420
|
+
'a[b]=2&a[c]=1&z=3',
|
|
1421
|
+
'nested keys are sorted, not left in filter order'
|
|
1422
|
+
);
|
|
1423
|
+
st.equal(
|
|
1424
|
+
qs.stringify({ a: { c: 1, b: 2 }, z: 3 }, { filter: ['z', 'b', 'a', 'c'], sort: desc, encode: false }),
|
|
1425
|
+
'z=3&a[c]=1&a[b]=2',
|
|
1426
|
+
'nested keys follow a descending sort'
|
|
1427
|
+
);
|
|
1428
|
+
st.equal(
|
|
1429
|
+
qs.stringify({ a: [{ y: 1, x: 2 }] }, { filter: ['a', '0', 'y', 'x'], sort: asc, encode: false }),
|
|
1430
|
+
'a[0][x]=2&a[0][y]=1',
|
|
1431
|
+
'keys of objects nested in arrays are sorted'
|
|
1432
|
+
);
|
|
1433
|
+
st.equal(
|
|
1434
|
+
qs.stringify({ a: { c: 1, b: 2 }, z: 3 }, { filter: ['z', 'a', 'c', 'b'], encode: false }),
|
|
1435
|
+
'z=3&a[c]=1&a[b]=2',
|
|
1436
|
+
'without sort, keys keep filter order at every level'
|
|
1437
|
+
);
|
|
1438
|
+
|
|
1439
|
+
st.end();
|
|
1440
|
+
});
|
|
1441
|
+
|
|
1442
|
+
t.test('does not reorder the caller\'s filter array when sorting', function (st) {
|
|
1443
|
+
var filter = ['z', 'a', 'c', 'b'];
|
|
1444
|
+
var asc = function (a, b) { return a.localeCompare(b); };
|
|
1445
|
+
|
|
1446
|
+
st.equal(
|
|
1447
|
+
qs.stringify({ a: { c: 1, b: 2 }, z: 3 }, { filter: filter, sort: asc, encode: false }),
|
|
1448
|
+
'a[b]=2&a[c]=1&z=3',
|
|
1449
|
+
'keys are sorted at every level'
|
|
1450
|
+
);
|
|
1451
|
+
st.deepEqual(filter, ['z', 'a', 'c', 'b'], 'filter array is not mutated');
|
|
1452
|
+
st.equal(
|
|
1453
|
+
qs.stringify({ a: { c: 1, b: 2 }, z: 3 }, { filter: filter, encode: false }),
|
|
1454
|
+
'z=3&a[c]=1&a[b]=2',
|
|
1455
|
+
'reusing the filter without sort keeps its own order'
|
|
1456
|
+
);
|
|
1457
|
+
|
|
1458
|
+
st.end();
|
|
1459
|
+
});
|
|
1460
|
+
|
|
1098
1461
|
t.test('supports custom representations when filter=function', function (st) {
|
|
1099
1462
|
var calls = 0;
|
|
1100
1463
|
var obj = { a: 'b', c: 'd', e: { f: new Date(1257894000000) } };
|
|
@@ -1345,6 +1708,7 @@ test('stringify()', function (t) {
|
|
|
1345
1708
|
st.equal(qs.stringify({ 'a b': SaferBuffer.from('a b') }, { format: qs.formats.RFC1738 }), 'a+b=a+b');
|
|
1346
1709
|
|
|
1347
1710
|
st.equal(qs.stringify({ 'foo(ref)': 'bar' }, { format: qs.formats.RFC1738 }), 'foo(ref)=bar');
|
|
1711
|
+
st.equal(qs.stringify({ 'a~*': '~*()' }, { format: qs.formats.RFC1738 }), 'a~%2A=~%2A()', 'leaves `~` unencoded and encodes `*`');
|
|
1348
1712
|
|
|
1349
1713
|
st.end();
|
|
1350
1714
|
});
|
|
@@ -1353,6 +1717,83 @@ test('stringify()', function (t) {
|
|
|
1353
1717
|
st.equal(qs.stringify({ a: 'b c' }, { format: qs.formats.RFC3986 }), 'a=b%20c');
|
|
1354
1718
|
st.equal(qs.stringify({ 'a b': 'c d' }, { format: qs.formats.RFC3986 }), 'a%20b=c%20d');
|
|
1355
1719
|
st.equal(qs.stringify({ 'a b': SaferBuffer.from('a b') }, { format: qs.formats.RFC3986 }), 'a%20b=a%20b');
|
|
1720
|
+
st.equal(qs.stringify({ 'a~*': '~*()' }, { format: qs.formats.RFC3986 }), 'a~%2A=~%2A%28%29', 'leaves `~` unencoded, and encodes `*` and parens');
|
|
1721
|
+
|
|
1722
|
+
st.end();
|
|
1723
|
+
});
|
|
1724
|
+
|
|
1725
|
+
t.test('WHATWG serialization', function (st) {
|
|
1726
|
+
st.equal(qs.formats.WHATWG, 'WHATWG', 'is exported');
|
|
1727
|
+
st.equal(qs.stringify({ a: 'b c' }, { format: qs.formats.WHATWG }), 'a=b+c');
|
|
1728
|
+
st.equal(qs.stringify({ 'a b': 'c d' }, { format: qs.formats.WHATWG }), 'a+b=c+d');
|
|
1729
|
+
st.equal(qs.stringify({ 'a b': SaferBuffer.from('a b') }, { format: qs.formats.WHATWG }), 'a+b=a+b');
|
|
1730
|
+
|
|
1731
|
+
st.equal(qs.stringify({ a: '~' }, { format: qs.formats.WHATWG }), 'a=%7E', 'encodes `~`');
|
|
1732
|
+
st.equal(qs.stringify({ a: '*' }, { format: qs.formats.WHATWG }), 'a=*', 'does not encode `*`');
|
|
1733
|
+
st.equal(qs.stringify({ 'foo(ref)': 'bar' }, { format: qs.formats.WHATWG }), 'foo%28ref%29=bar', 'encodes parentheses');
|
|
1734
|
+
st.equal(qs.stringify({ a: '-._' }, { format: qs.formats.WHATWG }), 'a=-._');
|
|
1735
|
+
st.equal(qs.stringify({ a: '+&=' }, { format: qs.formats.WHATWG }), 'a=%2B%26%3D');
|
|
1736
|
+
st.equal(qs.stringify({ a: { b: 'c d' } }, { format: qs.formats.WHATWG }), 'a%5Bb%5D=c+d');
|
|
1737
|
+
st.equal(qs.stringify({ a: 'b c' }, { format: qs.formats.WHATWG, encode: false }), 'a=b c', 'encode: false leaves the value alone');
|
|
1738
|
+
|
|
1739
|
+
st.equal(
|
|
1740
|
+
qs.stringify({ 'a~b*': { 'c d': '~* ' } }, { format: qs.formats.WHATWG, encodeValuesOnly: true }),
|
|
1741
|
+
'a~b*[c d]=%7E*+',
|
|
1742
|
+
'encodeValuesOnly: leaves keys alone'
|
|
1743
|
+
);
|
|
1744
|
+
st.equal(
|
|
1745
|
+
qs.stringify({ a: '~*\u00e9 ' }, { format: qs.formats.WHATWG, charset: 'iso-8859-1' }),
|
|
1746
|
+
'a=%7E*%E9+',
|
|
1747
|
+
'charset iso-8859-1'
|
|
1748
|
+
);
|
|
1749
|
+
st.equal(
|
|
1750
|
+
qs.stringify({ a: '~* ' }, {
|
|
1751
|
+
format: qs.formats.WHATWG,
|
|
1752
|
+
encoder: function (str, defaultEncoder, charset, type, format) {
|
|
1753
|
+
return defaultEncoder(str, defaultEncoder, charset, type, format);
|
|
1754
|
+
}
|
|
1755
|
+
}),
|
|
1756
|
+
'a=%7E*+',
|
|
1757
|
+
'an encoder wrapping the default encoder'
|
|
1758
|
+
);
|
|
1759
|
+
st.equal(
|
|
1760
|
+
qs.stringify({ a: ['~ x', '*'] }, { format: qs.formats.WHATWG, arrayFormat: 'comma' }),
|
|
1761
|
+
'a=%7E+x%2C*',
|
|
1762
|
+
'arrayFormat comma'
|
|
1763
|
+
);
|
|
1764
|
+
|
|
1765
|
+
st.end();
|
|
1766
|
+
});
|
|
1767
|
+
|
|
1768
|
+
var USP = typeof URLSearchParams === 'function' ? URLSearchParams : url.URLSearchParams;
|
|
1769
|
+
|
|
1770
|
+
t.test('WHATWG serialization matches URLSearchParams', { skip: typeof USP !== 'function' }, function (st) {
|
|
1771
|
+
var chars = [];
|
|
1772
|
+
for (var c = 0; c < 0x80; c++) {
|
|
1773
|
+
chars[chars.length] = String.fromCharCode(c);
|
|
1774
|
+
}
|
|
1775
|
+
chars.push('\u00e9', '\u20ac', '\uFFFF', '\uD83D\uDCA9', 'a b~c*d(e)f', '\uD800', '\uDC00', 'x\uDC00y');
|
|
1776
|
+
|
|
1777
|
+
for (var i = 0; i < chars.length; i++) {
|
|
1778
|
+
var key = {};
|
|
1779
|
+
key[chars[i]] = 'v';
|
|
1780
|
+
st.equal(
|
|
1781
|
+
qs.stringify({ k: chars[i] }, { format: qs.formats.WHATWG }),
|
|
1782
|
+
new USP([['k', chars[i]]]).toString(),
|
|
1783
|
+
'value ' + JSON.stringify(chars[i])
|
|
1784
|
+
);
|
|
1785
|
+
st.equal(
|
|
1786
|
+
qs.stringify(key, { format: qs.formats.WHATWG }),
|
|
1787
|
+
new USP([[chars[i], 'v']]).toString(),
|
|
1788
|
+
'key ' + JSON.stringify(chars[i])
|
|
1789
|
+
);
|
|
1790
|
+
}
|
|
1791
|
+
|
|
1792
|
+
st.equal(
|
|
1793
|
+
qs.stringify({ a: { 'b~': 'c d' } }, { format: qs.formats.WHATWG }),
|
|
1794
|
+
new USP([['a[b~]', 'c d']]).toString(),
|
|
1795
|
+
'nested key'
|
|
1796
|
+
);
|
|
1356
1797
|
|
|
1357
1798
|
st.end();
|
|
1358
1799
|
});
|
|
@@ -1480,6 +1921,17 @@ test('stringify()', function (t) {
|
|
|
1480
1921
|
st.end();
|
|
1481
1922
|
});
|
|
1482
1923
|
|
|
1924
|
+
t.test('encodes a literal `+` as `%2B` in iso-8859-1 mode so it round-trips', function (st) {
|
|
1925
|
+
st.equal(qs.stringify({ a: 'b+c' }, { charset: 'iso-8859-1' }), 'a=b%2Bc', 'a `+` in a value is percent-encoded');
|
|
1926
|
+
st.equal(qs.stringify({ 'a+b': 'c' }, { charset: 'iso-8859-1' }), 'a%2Bb=c', 'a `+` in a key is percent-encoded');
|
|
1927
|
+
st.deepEqual(
|
|
1928
|
+
qs.parse(qs.stringify({ a: 'b+c' }, { charset: 'iso-8859-1' }), { charset: 'iso-8859-1' }),
|
|
1929
|
+
{ a: 'b+c' },
|
|
1930
|
+
'the `+` survives a round-trip instead of decoding to a space'
|
|
1931
|
+
);
|
|
1932
|
+
st.end();
|
|
1933
|
+
});
|
|
1934
|
+
|
|
1483
1935
|
t.test('respects an explicit charset of utf-8 (the default)', function (st) {
|
|
1484
1936
|
st.equal(qs.stringify({ a: 'æ' }, { charset: 'utf-8' }), 'a=%C3%A6');
|
|
1485
1937
|
st.end();
|