appium-mac2-driver 4.3.5 → 4.3.6
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 +6 -0
- package/WebDriverAgentMac/WebDriverAgentLib/Utilities/FBXPath.m +48 -2
- package/WebDriverAgentMac/WebDriverAgentMac.xcodeproj/project.pbxproj +4 -0
- package/build/lib/wda-mac.d.ts.map +1 -1
- package/build/lib/wda-mac.js +4 -5
- package/build/lib/wda-mac.js.map +1 -1
- package/lib/wda-mac.ts +4 -5
- package/node_modules/@appium/logger/CHANGELOG.md +8 -0
- package/node_modules/@appium/logger/package.json +3 -3
- package/node_modules/@appium/strongbox/build/lib/index.d.ts.map +1 -1
- package/node_modules/@appium/strongbox/build/lib/index.js +6 -1
- package/node_modules/@appium/strongbox/build/lib/index.js.map +1 -1
- package/node_modules/@appium/strongbox/lib/index.ts +6 -1
- package/node_modules/@appium/strongbox/package.json +2 -2
- 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/util.d.ts.map +1 -1
- package/node_modules/@appium/support/build/lib/util.js +10 -4
- package/node_modules/@appium/support/build/lib/util.js.map +1 -1
- package/node_modules/@appium/support/build/lib/zip.d.ts.map +1 -1
- package/node_modules/@appium/support/build/lib/zip.js +2 -7
- 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/util.ts +9 -3
- package/node_modules/@appium/support/lib/zip.ts +3 -9
- package/node_modules/@appium/support/package.json +9 -9
- package/node_modules/@appium/types/package.json +4 -4
- package/node_modules/@img/sharp-darwin-arm64/index.cjs +1 -1
- package/node_modules/@img/sharp-darwin-arm64/lib/sharp-darwin-arm64-0.35.5.node +0 -0
- package/node_modules/@img/sharp-darwin-arm64/package.json +2 -2
- package/node_modules/@img/sharp-libvips-darwin-arm64/README.md +1 -1
- package/node_modules/@img/sharp-libvips-darwin-arm64/lib/glib-2.0/include/glibconfig.h +2 -2
- package/node_modules/@img/sharp-libvips-darwin-arm64/lib/{libvips-cpp.8.18.6.dylib → libvips-cpp.8.18.7.dylib} +0 -0
- package/node_modules/@img/sharp-libvips-darwin-arm64/package.json +2 -2
- package/node_modules/@img/sharp-libvips-darwin-arm64/versions.json +11 -11
- package/node_modules/appium-xcode/CHANGELOG.md +28 -0
- package/node_modules/appium-xcode/README.md +1 -1
- package/node_modules/appium-xcode/package.json +14 -18
- package/node_modules/b4a/browser.js +5 -0
- package/node_modules/b4a/index.d.ts +144 -0
- package/node_modules/b4a/index.js +5 -0
- package/node_modules/b4a/package.json +4 -1
- package/node_modules/b4a/runtime.d.ts +14 -0
- package/node_modules/bare-fs/binding.c +53 -24
- package/node_modules/bare-fs/index.d.ts +12 -10
- package/node_modules/bare-fs/index.js +13 -4
- package/node_modules/bare-fs/package.json +2 -1
- package/node_modules/bare-fs/prebuilds/android-arm/bare-fs.bare +0 -0
- package/node_modules/bare-fs/prebuilds/android-arm64/bare-fs.bare +0 -0
- package/node_modules/bare-fs/prebuilds/android-ia32/bare-fs.bare +0 -0
- package/node_modules/bare-fs/prebuilds/android-x64/bare-fs.bare +0 -0
- package/node_modules/bare-fs/prebuilds/darwin-arm64/bare-fs.bare +0 -0
- package/node_modules/bare-fs/prebuilds/darwin-x64/bare-fs.bare +0 -0
- package/node_modules/bare-fs/prebuilds/ios-arm64/bare-fs.bare +0 -0
- package/node_modules/bare-fs/prebuilds/ios-arm64-simulator/bare-fs.bare +0 -0
- package/node_modules/bare-fs/prebuilds/ios-x64-simulator/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-arm64/bare-fs.bare +0 -0
- package/node_modules/bare-fs/prebuilds/win32-x64/bare-fs.bare +0 -0
- 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/index.js +10 -1
- package/node_modules/follow-redirects/package.json +1 -1
- 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/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/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/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/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/package.json +3 -3
- 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/@img/sharp-darwin-arm64/lib/sharp-darwin-arm64-0.35.4.node +0 -0
- 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/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
|
@@ -1,97 +1,72 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
var WritableStreamBuffer = module.exports = function(opts) {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
size += data.length;
|
|
74
|
-
}
|
|
75
|
-
else {
|
|
76
|
-
data = data + "";
|
|
77
|
-
increaseBufferIfNecessary(Buffer.byteLength(data));
|
|
78
|
-
buffer.write(data, size, encoding || "utf8");
|
|
79
|
-
size += Buffer.byteLength(data);
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
if(typeof callback === "function") { callback() ;}
|
|
83
|
-
};
|
|
84
|
-
|
|
85
|
-
this.end = function() {
|
|
86
|
-
var args = Array.prototype.slice.apply(arguments);
|
|
87
|
-
if(args.length) that.write.apply(that, args);
|
|
88
|
-
that.emit('finish');
|
|
89
|
-
that.destroy();
|
|
90
|
-
};
|
|
91
|
-
|
|
92
|
-
this.destroySoon = this.destroy = function() {
|
|
93
|
-
that.writable = false;
|
|
94
|
-
that.emit("close");
|
|
95
|
-
};
|
|
96
|
-
};
|
|
97
|
-
util.inherits(WritableStreamBuffer, stream.Stream);
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var util = require('util');
|
|
4
|
+
var stream = require('stream');
|
|
5
|
+
var constants = require('./constants');
|
|
6
|
+
|
|
7
|
+
var WritableStreamBuffer = module.exports = function(opts) {
|
|
8
|
+
opts = opts || {};
|
|
9
|
+
opts.decodeStrings = true;
|
|
10
|
+
|
|
11
|
+
stream.Writable.call(this, opts);
|
|
12
|
+
|
|
13
|
+
var initialSize = opts.initialSize || constants.DEFAULT_INITIAL_SIZE;
|
|
14
|
+
var incrementAmount = opts.incrementAmount || constants.DEFAULT_INCREMENT_AMOUNT;
|
|
15
|
+
|
|
16
|
+
var buffer = new Buffer(initialSize);
|
|
17
|
+
var size = 0;
|
|
18
|
+
|
|
19
|
+
this.size = function() {
|
|
20
|
+
return size;
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
this.maxSize = function() {
|
|
24
|
+
return buffer.length;
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
this.getContents = function(length) {
|
|
28
|
+
if(!size) return false;
|
|
29
|
+
|
|
30
|
+
var data = new Buffer(Math.min(length || size, size));
|
|
31
|
+
buffer.copy(data, 0, 0, data.length);
|
|
32
|
+
|
|
33
|
+
if(data.length < size)
|
|
34
|
+
buffer.copy(buffer, 0, data.length);
|
|
35
|
+
|
|
36
|
+
size -= data.length;
|
|
37
|
+
|
|
38
|
+
return data;
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
this.getContentsAsString = function(encoding, length) {
|
|
42
|
+
if(!size) return false;
|
|
43
|
+
|
|
44
|
+
var data = buffer.toString(encoding || 'utf8', 0, Math.min(length || size, size));
|
|
45
|
+
var dataLength = Buffer.byteLength(data);
|
|
46
|
+
|
|
47
|
+
if(dataLength < size)
|
|
48
|
+
buffer.copy(buffer, 0, dataLength);
|
|
49
|
+
|
|
50
|
+
size -= dataLength;
|
|
51
|
+
return data;
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
var increaseBufferIfNecessary = function(incomingDataSize) {
|
|
55
|
+
if((buffer.length - size) < incomingDataSize) {
|
|
56
|
+
var factor = Math.ceil((incomingDataSize - (buffer.length - size)) / incrementAmount);
|
|
57
|
+
|
|
58
|
+
var newBuffer = new Buffer(buffer.length + (incrementAmount * factor));
|
|
59
|
+
buffer.copy(newBuffer, 0, 0, size);
|
|
60
|
+
buffer = newBuffer;
|
|
61
|
+
}
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
this._write = function(chunk, encoding, callback) {
|
|
65
|
+
increaseBufferIfNecessary(chunk.length);
|
|
66
|
+
chunk.copy(buffer, size, 0);
|
|
67
|
+
size += chunk.length;
|
|
68
|
+
callback();
|
|
69
|
+
};
|
|
70
|
+
};
|
|
71
|
+
|
|
72
|
+
util.inherits(WritableStreamBuffer, stream.Writable);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "stream-buffers",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.3",
|
|
4
4
|
"description": "Buffer-backed Streams for reading and writing.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"memory streams",
|
|
@@ -12,10 +12,11 @@
|
|
|
12
12
|
"engines": {
|
|
13
13
|
"node": ">= 0.10.0"
|
|
14
14
|
},
|
|
15
|
-
"dependencies": {},
|
|
16
15
|
"devDependencies": {
|
|
17
|
-
"
|
|
18
|
-
"
|
|
16
|
+
"chai": "^3.4.1",
|
|
17
|
+
"eslint": "^8.38.0",
|
|
18
|
+
"istanbul": "^0.4.0",
|
|
19
|
+
"mocha": "^9.1.2"
|
|
19
20
|
},
|
|
20
21
|
"license": "Unlicense",
|
|
21
22
|
"repository": {
|
|
@@ -23,6 +24,7 @@
|
|
|
23
24
|
"url": "https://github.com/samcday/node-stream-buffer.git"
|
|
24
25
|
},
|
|
25
26
|
"scripts": {
|
|
26
|
-
"test": "
|
|
27
|
+
"test": "istanbul test _mocha",
|
|
28
|
+
"lint": "eslint ."
|
|
27
29
|
}
|
|
28
30
|
}
|
|
@@ -99,10 +99,12 @@ export type {LessThan} from './source/less-than.d.ts';
|
|
|
99
99
|
export type {LessThanOrEqual} from './source/less-than-or-equal.d.ts';
|
|
100
100
|
export type {Sum} from './source/sum.d.ts';
|
|
101
101
|
export type {Subtract} from './source/subtract.d.ts';
|
|
102
|
+
export type {UnionMax} from './source/union-max.d.ts';
|
|
102
103
|
export type {KeyAsString} from './source/key-as-string.d.ts';
|
|
103
104
|
export type {Exact} from './source/exact.d.ts';
|
|
104
105
|
export type {ReadonlyTuple} from './source/readonly-tuple.d.ts';
|
|
105
106
|
export type {OverrideProperties} from './source/override-properties.d.ts';
|
|
107
|
+
export type {RenameKeys} from './source/rename-keys.d.ts';
|
|
106
108
|
export type {OptionalKeysOf} from './source/optional-keys-of.d.ts';
|
|
107
109
|
export type {IsOptionalKeyOf} from './source/is-optional-key-of.d.ts';
|
|
108
110
|
export type {HasOptionalKeys} from './source/has-optional-keys.d.ts';
|
|
@@ -127,13 +129,11 @@ export type {UnionToTuple} from './source/union-to-tuple.d.ts';
|
|
|
127
129
|
export type {IntRange} from './source/int-range.d.ts';
|
|
128
130
|
export type {IntClosedRange} from './source/int-closed-range.d.ts';
|
|
129
131
|
export type {IsEqual} from './source/is-equal.d.ts';
|
|
130
|
-
export type {
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
IsSymbolLiteral,
|
|
136
|
-
} from './source/is-literal.d.ts';
|
|
132
|
+
export type {IsLiteral} from './source/is-literal.d.ts';
|
|
133
|
+
export type {IsStringLiteral} from './source/is-string-literal.d.ts';
|
|
134
|
+
export type {IsNumericLiteral} from './source/is-numeric-literal.d.ts';
|
|
135
|
+
export type {IsBooleanLiteral} from './source/is-boolean-literal.d.ts';
|
|
136
|
+
export type {IsSymbolLiteral} from './source/is-symbol-literal.d.ts';
|
|
137
137
|
export type {IsAny} from './source/is-any.d.ts';
|
|
138
138
|
export type {IfAny} from './source/if-any.d.ts';
|
|
139
139
|
export type {IsNever} from './source/is-never.d.ts';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "type-fest",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.10.0",
|
|
4
4
|
"description": "A collection of essential TypeScript types",
|
|
5
5
|
"license": "(MIT OR CC0-1.0)",
|
|
6
6
|
"repository": "sindresorhus/type-fest",
|
|
@@ -26,6 +26,7 @@
|
|
|
26
26
|
},
|
|
27
27
|
"scripts": {
|
|
28
28
|
"test:tsc": "node --max-old-space-size=6144 ./node_modules/.bin/tsc",
|
|
29
|
+
"test:minimum-lib": "node --max-old-space-size=6144 ./node_modules/.bin/tsc -p tsconfig.minimum-lib.json",
|
|
29
30
|
"test:tsd": "node --max-old-space-size=6144 ./node_modules/.bin/tsd",
|
|
30
31
|
"test:xo": "node --max-old-space-size=6144 ./node_modules/.bin/xo --ignores=lint-processors/fixtures/**/*.d.ts '**/*.{js,ts,md}'",
|
|
31
32
|
"test:linter": "node --test",
|
|
@@ -29,17 +29,6 @@
|
|
|
29
29
|
<sup>An open-source framework that supports any programming language, cloud provider, or deployment automation tool.</sup>
|
|
30
30
|
</div>
|
|
31
31
|
</a>
|
|
32
|
-
<br>
|
|
33
|
-
<br>
|
|
34
|
-
<a href="https://circleback.ai?utm_source=sindresorhus&utm_medium=sponsorship&utm_campaign=awesome-list&utm_id=type-fest">
|
|
35
|
-
<div>
|
|
36
|
-
<img width="300" src="https://sindresorhus.com/assets/thanks/circleback-logo.png?x" alt="Circleback logo">
|
|
37
|
-
</div>
|
|
38
|
-
<b>Get the most out of every conversation.</b>
|
|
39
|
-
<div>
|
|
40
|
-
<sup>AI-powered meeting notes, automations, and search. Give AI agents the context they need to get things done.</sup>
|
|
41
|
-
</div>
|
|
42
|
-
</a>
|
|
43
32
|
</p>
|
|
44
33
|
</div>
|
|
45
34
|
<br>
|
|
@@ -121,6 +110,7 @@ Click the type names for complete docs.
|
|
|
121
110
|
- [`MergeDeep`](source/merge-deep.d.ts) - Merge two objects or two arrays/tuples recursively into a new type.
|
|
122
111
|
- [`MergeExclusive`](source/merge-exclusive.d.ts) - Create a type that has mutually exclusive keys.
|
|
123
112
|
- [`OverrideProperties`](source/override-properties.d.ts) - Override existing properties of the given type. Similar to `Merge`, but enforces that the original type has the properties you want to override.
|
|
113
|
+
- [`RenameKeys`](source/rename-keys.d.ts) - Rename keys in an object type according to a map of old-to-new names.
|
|
124
114
|
- [`RequireAtLeastOne`](source/require-at-least-one.d.ts) - Create a type that requires at least one of the given keys, while keeping the remaining keys as is.
|
|
125
115
|
- [`RequireExactlyOne`](source/require-exactly-one.d.ts) - Create a type that requires exactly one of the given keys and disallows more, while keeping the remaining keys as is.
|
|
126
116
|
- [`RequireAllOrNone`](source/require-all-or-none.d.ts) - Create a type that requires all of the given keys or none of the given keys, while keeping the remaining keys as is.
|
|
@@ -164,7 +154,7 @@ Click the type names for complete docs.
|
|
|
164
154
|
- [`SetParameterType`](source/set-parameter-type.d.ts) - Create a function that replaces some parameters with the given parameters.
|
|
165
155
|
- [`Simplify`](source/simplify.d.ts) - Useful to flatten the type output to improve type hints shown in editors. And also to transform an interface into a type to aide with assignability.
|
|
166
156
|
- [`SimplifyDeep`](source/simplify-deep.d.ts) - Deeply simplifies an object type.
|
|
167
|
-
- [`Get`](source/get.d.ts) - Get a deeply-nested property from an object using a key path, like [Lodash's `.get()`](https://lodash.com/docs
|
|
157
|
+
- [`Get`](source/get.d.ts) - Get a deeply-nested property from an object using a key path, like [Lodash's `.get()`](https://lodash.com/docs#get) function.
|
|
168
158
|
- [`KeyAsString`](source/key-as-string.d.ts) - Get keys of the given type as strings.
|
|
169
159
|
- [`Schema`](source/schema.d.ts) - Create a deep version of another object type where property values are recursively replaced into a given value type.
|
|
170
160
|
- [`Exact`](source/exact.d.ts) - Create a type that does not allow extra properties, meaning it only allows properties that are explicitly declared.
|
|
@@ -215,10 +205,10 @@ Click the type names for complete docs.
|
|
|
215
205
|
|
|
216
206
|
- [`If`](source/if.d.ts) - An if-else-like type that resolves depending on whether the given `boolean` type is `true` or `false`.
|
|
217
207
|
- [`IsLiteral`](source/is-literal.d.ts) - Returns a boolean for whether the given type is a [literal type](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#literal-types).
|
|
218
|
-
- [`IsStringLiteral`](source/is-literal.d.ts) - Returns a boolean for whether the given type is a `string` [literal type](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#literal-types).
|
|
219
|
-
- [`IsNumericLiteral`](source/is-literal.d.ts) - Returns a boolean for whether the given type is a `number` or `bigint` [literal type](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#literal-types).
|
|
220
|
-
- [`IsBooleanLiteral`](source/is-literal.d.ts) - Returns a boolean for whether the given type is a `true` or `false` [literal type](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#literal-types).
|
|
221
|
-
- [`IsSymbolLiteral`](source/is-literal.d.ts) - Returns a boolean for whether the given type is a `symbol` [literal type](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#literal-types).
|
|
208
|
+
- [`IsStringLiteral`](source/is-string-literal.d.ts) - Returns a boolean for whether the given type is a `string` [literal type](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#literal-types).
|
|
209
|
+
- [`IsNumericLiteral`](source/is-numeric-literal.d.ts) - Returns a boolean for whether the given type is a `number` or `bigint` [literal type](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#literal-types).
|
|
210
|
+
- [`IsBooleanLiteral`](source/is-boolean-literal.d.ts) - Returns a boolean for whether the given type is a `true` or `false` [literal type](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#literal-types).
|
|
211
|
+
- [`IsSymbolLiteral`](source/is-symbol-literal.d.ts) - Returns a boolean for whether the given type is a `symbol` [literal type](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#literal-types).
|
|
222
212
|
- [`IsAny`](source/is-any.d.ts) - Returns a boolean for whether the given type is `any`.
|
|
223
213
|
- [`IsNever`](source/is-never.d.ts) - Returns a boolean for whether the given type is `never`.
|
|
224
214
|
- [`IsUnknown`](source/is-unknown.d.ts) - Returns a boolean for whether the given type is `unknown`.
|
|
@@ -311,6 +301,7 @@ Click the type names for complete docs.
|
|
|
311
301
|
- [`LessThanOrEqual`](source/less-than-or-equal.d.ts) - Returns a boolean for whether a given number is less than or equal to another number.
|
|
312
302
|
- [`Sum`](source/sum.d.ts) - Returns the sum of two numbers.
|
|
313
303
|
- [`Subtract`](source/subtract.d.ts) - Returns the difference between two numbers.
|
|
304
|
+
- [`UnionMax`](source/union-max.d.ts) - Returns the maximum number in a union of numbers.
|
|
314
305
|
- [`Absolute`](source/absolute.d.ts) - Returns the absolute value of the specified number or bigint.
|
|
315
306
|
- [`StringToNumber`](source/string-to-number.d.ts) - Converts a numeric string to a number.
|
|
316
307
|
|
|
@@ -101,10 +101,15 @@ type B = AllExtend<[1?, 2?, 3?], number | undefined>;
|
|
|
101
101
|
@category Array
|
|
102
102
|
*/
|
|
103
103
|
export type AllExtend<TArray extends UnknownArray, Type, Options extends AllExtendOptions = {}> =
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
104
|
+
IfNotAnyOrNever<CollapseRestElement<TArray>, {
|
|
105
|
+
ifNot: _AllExtend<CollapseRestElement<TArray>, Type, ApplyDefaultOptions<AllExtendOptions, DefaultAllExtendOptions, Options>>;
|
|
106
|
+
ifAny: false;
|
|
107
|
+
ifNever: false;
|
|
108
|
+
}>;
|
|
109
|
+
|
|
110
|
+
// Kept free of `IfNotAnyOrNever` so that it stays tail-recursive, which allows it to handle long arrays.
|
|
111
|
+
type _AllExtend<TArray extends UnknownArray, Type, Options extends Required<AllExtendOptions>> =
|
|
112
|
+
TArray extends readonly [infer First, ...infer Rest]
|
|
108
113
|
? IsNever<First> extends true
|
|
109
114
|
? Or<Or<IsNever<Type>, IsAny<Type>>, Not<Options['strictNever']>> extends true
|
|
110
115
|
// If target `Type` is also `never`, or is `any`, or `strictNever` is disabled, recurse further.
|
|
@@ -114,8 +119,5 @@ type _AllExtend<TArray extends UnknownArray, Type, Options extends Required<AllE
|
|
|
114
119
|
? _AllExtend<Rest, Type, Options>
|
|
115
120
|
: false
|
|
116
121
|
: true;
|
|
117
|
-
ifAny: false;
|
|
118
|
-
ifNever: false;
|
|
119
|
-
}>;
|
|
120
122
|
|
|
121
123
|
export {};
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import type {If} from './if.d.ts';
|
|
2
2
|
import type {IsArrayReadonly} from './internal/array.d.ts';
|
|
3
3
|
import type {IfNotAnyOrNever, IsExactOptionalPropertyTypesEnabled} from './internal/type.d.ts';
|
|
4
|
-
import type {IsOptionalKeyOf} from './is-optional-key-of.d.ts';
|
|
5
4
|
import type {UnknownArray} from './unknown-array.d.ts';
|
|
6
5
|
|
|
7
6
|
/**
|
|
@@ -65,21 +64,23 @@ type _ArrayReverse<
|
|
|
65
64
|
AfterRestAcc extends UnknownArray = [],
|
|
66
65
|
Result extends UnknownArray = never,
|
|
67
66
|
> =
|
|
68
|
-
keyof TArray
|
|
69
|
-
// Enters this branch, if `TArray`
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
?
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
? IsOptionalKeyOf<TArray, '0'> extends true
|
|
76
|
-
? _ArrayReverse<
|
|
67
|
+
'0' extends keyof TArray
|
|
68
|
+
// Enters this branch, if `TArray` starts with a non-rest element (e.g., `[string, number]` or `[string, ...number[]]`).
|
|
69
|
+
? TArray extends readonly [(infer First)?, ...infer Rest]
|
|
70
|
+
// A tuple allows fewer than one element only when its first element is optional. Written in exactly this shape because equivalent ones, such as `[] extends TArray`, are several times slower.
|
|
71
|
+
? TArray extends readonly [unknown, ...unknown[]]
|
|
72
|
+
? _ArrayReverse<Rest, [First, ...BeforeRestAcc], AfterRestAcc, Result>
|
|
73
|
+
: _ArrayReverse<
|
|
77
74
|
Rest,
|
|
78
75
|
[First | (If<IsExactOptionalPropertyTypesEnabled, never, undefined>), ...BeforeRestAcc], // Add `| undefined` for optional elements, if `exactOptionalPropertyTypes` is disabled.
|
|
79
76
|
AfterRestAcc,
|
|
80
77
|
Result | BeforeRestAcc
|
|
81
78
|
>
|
|
82
|
-
|
|
83
|
-
|
|
79
|
+
: never // Should never happen, since `readonly [(infer First)?, ...infer Rest]` is a top-type for arrays.
|
|
80
|
+
// Enters this branch, if `TArray` is empty (e.g., `[]`),
|
|
81
|
+
// or `TArray` contains no non-rest elements preceding the rest element (e.g., `[...string[]]` or `[...string[], string]`).
|
|
82
|
+
: TArray extends readonly [...infer Rest, infer Last]
|
|
83
|
+
? _ArrayReverse<Rest, BeforeRestAcc, [...AfterRestAcc, Last], Result> // Accumulate elements that are present after the rest element in reverse order.
|
|
84
|
+
: Result | [...AfterRestAcc, ...TArray, ...BeforeRestAcc]; // Add the rest element between the accumulated elements.
|
|
84
85
|
|
|
85
86
|
export {};
|
|
@@ -60,11 +60,11 @@ export type ArrayTail<TArray extends UnknownArray> = IfNotAnyOrNever<TArray, {
|
|
|
60
60
|
}>;
|
|
61
61
|
|
|
62
62
|
type _ArrayTail<TArray extends UnknownArray> = TArray extends readonly [unknown?, ...infer Tail]
|
|
63
|
-
? keyof TArray
|
|
64
|
-
?
|
|
63
|
+
? '0' extends keyof TArray
|
|
64
|
+
? Tail
|
|
65
|
+
: TArray extends readonly []
|
|
65
66
|
? []
|
|
66
67
|
: TArray // Happens when `TArray` is a non-tuple array (e.g., `string[]`) or has a leading rest element (e.g., `[...string[], number]`)
|
|
67
|
-
: Tail
|
|
68
68
|
: [];
|
|
69
69
|
|
|
70
70
|
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type {ApplyDefaultOptions, AsciiPunctuation, StartsWith} from './internal/index.d.ts';
|
|
2
|
-
import type {IsStringLiteral} from './is-literal.d.ts';
|
|
2
|
+
import type {IsStringLiteral} from './is-string-literal.d.ts';
|
|
3
3
|
import type {Merge} from './merge.d.ts';
|
|
4
4
|
import type {_DefaultWordsOptions, Words, WordsOptions} from './words.d.ts';
|
|
5
5
|
|
|
@@ -161,7 +161,7 @@ type PropertyOf<BaseType, Key extends string, Options extends Required<GetOption
|
|
|
161
161
|
|
|
162
162
|
// This works by first splitting the path based on `.` and `[...]` characters into a tuple of string keys. Then it recursively uses the head key to get the next property of the current object, until there are no keys left. Number keys extract the item type from arrays, or are converted to strings to extract types from tuples and dictionaries with number keys.
|
|
163
163
|
/**
|
|
164
|
-
Get a deeply-nested property from an object using a key path, like [Lodash's `.get()`](https://lodash.com/docs
|
|
164
|
+
Get a deeply-nested property from an object using a key path, like [Lodash's `.get()`](https://lodash.com/docs#get) function.
|
|
165
165
|
|
|
166
166
|
Use-case: Retrieve a property from deep inside an API response or some other complex object.
|
|
167
167
|
|
|
@@ -6,7 +6,7 @@ Generate a union of numbers between a specified start and end (both inclusive),
|
|
|
6
6
|
|
|
7
7
|
You skip over numbers using the `Step` parameter (defaults to `1`). For example, `IntClosedRange<0, 10, 2>` will create a union of `0 | 2 | 4 | 6 | 8 | 10`.
|
|
8
8
|
|
|
9
|
-
Note: `Start`
|
|
9
|
+
Note: `Start` and `End` must each be between `-998` and `998`. The maximum is one less than for `IntRange` because the end is incremented internally to make it inclusive. If `Start` is greater than `End`, the result is `never`.
|
|
10
10
|
|
|
11
11
|
Use-cases:
|
|
12
12
|
1. This can be used to define a set of valid input/output values. for example:
|
|
@@ -23,6 +23,9 @@ type FontSize = IntClosedRange<10, 20>;
|
|
|
23
23
|
|
|
24
24
|
type EvenNumber = IntClosedRange<0, 10, 2>;
|
|
25
25
|
//=> 0 | 2 | 4 | 6 | 8 | 10
|
|
26
|
+
|
|
27
|
+
type Offset = IntClosedRange<-3, 3>;
|
|
28
|
+
//=> -3 | -2 | -1 | 0 | 1 | 2 | 3
|
|
26
29
|
```
|
|
27
30
|
|
|
28
31
|
2. This can be used to define random numbers in a range. For example, `type RandomNumber = IntClosedRange<0, 100>;`
|
|
@@ -1,12 +1,16 @@
|
|
|
1
1
|
import type {TupleOf} from './tuple-of.d.ts';
|
|
2
2
|
import type {Subtract} from './subtract.d.ts';
|
|
3
|
+
import type {Absolute} from './absolute.d.ts';
|
|
4
|
+
import type {IsNegative} from './numeric.d.ts';
|
|
5
|
+
import type {UnknownArray} from './unknown-array.d.ts';
|
|
6
|
+
import type {ReverseSign} from './internal/index.d.ts';
|
|
3
7
|
|
|
4
8
|
/**
|
|
5
9
|
Generate a union of numbers between a specified start (inclusive) and end (exclusive), with an optional step.
|
|
6
10
|
|
|
7
11
|
You skip over numbers using the `Step` parameter (defaults to `1`). For example, `IntRange<0, 10, 2>` will create a union of `0 | 2 | 4 | 6 | 8`.
|
|
8
12
|
|
|
9
|
-
Note: `Start`
|
|
13
|
+
Note: `Start` and `End` must each be between `-998` and `999`. Negative ranges reach TypeScript's instantiation-depth limit one value earlier, so their supported minimum is one smaller in magnitude than the maximum. If `Start` is greater than `End`, the result is `never`.
|
|
10
14
|
|
|
11
15
|
Use-cases:
|
|
12
16
|
1. This can be used to define a set of valid input/output values. for example:
|
|
@@ -23,6 +27,9 @@ type FontSize = IntRange<10, 20>;
|
|
|
23
27
|
|
|
24
28
|
type EvenNumber = IntRange<0, 11, 2>;
|
|
25
29
|
//=> 0 | 2 | 4 | 6 | 8 | 10
|
|
30
|
+
|
|
31
|
+
type Offset = IntRange<-3, 3>;
|
|
32
|
+
//=> -3 | -2 | -1 | 0 | 1 | 2
|
|
26
33
|
```
|
|
27
34
|
|
|
28
35
|
2. This can be used to define random numbers in a range. For example, `type RandomNumber = IntRange<0, 100>;`
|
|
@@ -40,7 +47,41 @@ type Hundreds = IntRange<100, 901, 100>;
|
|
|
40
47
|
|
|
41
48
|
@see {@link IntClosedRange}
|
|
42
49
|
*/
|
|
43
|
-
export type IntRange<Start extends number, End extends number, Step extends number = 1> =
|
|
50
|
+
export type IntRange<Start extends number, End extends number, Step extends number = 1> =
|
|
51
|
+
IsNegative<Start> extends true
|
|
52
|
+
? PrivateNegativeIntRange<Start, End, Step>
|
|
53
|
+
: PrivateIntRange<Start, End, Step>;
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
Removes `StepTuple['length']` elements from the front of `Tuple`, or empties it when it is too short.
|
|
57
|
+
*/
|
|
58
|
+
type DropStep<Tuple extends UnknownArray, StepTuple extends UnknownArray> =
|
|
59
|
+
Tuple extends [...StepTuple, ...infer Rest extends UnknownArray] ? Rest : [];
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
The implementation of `IntRange` for a negative `Start`.
|
|
63
|
+
|
|
64
|
+
A tuple length can never be negative, so instead of counting up to the value, `Magnitude` counts down from `-Start` and the value is `-Magnitude['length']`. Once `Magnitude` is too short to step again, the range has crossed zero and the rest is delegated to `PrivateIntRange`.
|
|
65
|
+
*/
|
|
66
|
+
type PrivateNegativeIntRange<
|
|
67
|
+
Start extends number,
|
|
68
|
+
End extends number,
|
|
69
|
+
Step extends number,
|
|
70
|
+
// A `Step` below `1` cannot advance the range, so fall back to `1` like `PrivateIntRange` does
|
|
71
|
+
StepTuple extends UnknownArray = TupleOf<Step> extends [] ? [unknown] : TupleOf<Step>,
|
|
72
|
+
// How much of the range is left to generate, shortened by `Step` each time, so the range stops at `End`
|
|
73
|
+
Remaining extends UnknownArray = TupleOf<Subtract<End, Start>>,
|
|
74
|
+
// The magnitude of the current value, so the value itself is `-Magnitude['length']`
|
|
75
|
+
Magnitude extends UnknownArray = TupleOf<Absolute<Start>>,
|
|
76
|
+
Result = never,
|
|
77
|
+
> = Remaining extends []
|
|
78
|
+
? Result
|
|
79
|
+
: Magnitude extends [...StepTuple, ...infer NextMagnitude extends UnknownArray]
|
|
80
|
+
? PrivateNegativeIntRange<Start, End, Step, StepTuple, DropStep<Remaining, StepTuple>, NextMagnitude, Result | ReverseSign<Magnitude['length']>>
|
|
81
|
+
// Less than a step is left below zero, so `Crossover` is the amount the next step overshoots it by, and counting up can take over from there
|
|
82
|
+
: StepTuple extends [...Magnitude, ...infer Crossover extends UnknownArray]
|
|
83
|
+
? Result | ReverseSign<Magnitude['length']> | PrivateIntRange<Crossover['length'], End, Step>
|
|
84
|
+
: never;
|
|
44
85
|
|
|
45
86
|
/**
|
|
46
87
|
The actual implementation of `IntRange`. It's private because it has some arguments that don't need to be exposed.
|
|
@@ -54,14 +95,20 @@ type PrivateIntRange<
|
|
|
54
95
|
// The final `List` is `[...StartLengthTuple, ...[number, ...GapLengthTuple], ...[number, ...GapLengthTuple], ... ...]`, so can initialize the `List` with `[...StartLengthTuple]`
|
|
55
96
|
List extends unknown[] = TupleOf<Start, never>,
|
|
56
97
|
EndLengthTuple extends unknown[] = TupleOf<End>,
|
|
57
|
-
|
|
98
|
+
// Avoid `GreaterThan<Start, End>` here because the extra type instantiations would make `IntRange<0, 999>` exceed TypeScript's instantiation-depth limit
|
|
99
|
+
// `TupleOf` represents a negative length as an empty tuple, so a negative `End` must be detected before comparing the tuple lengths
|
|
100
|
+
// Recursive calls pass `false` because reversal only depends on the initial bounds; the termination checks below still handle reaching or overshooting `End` without repeating this tuple comparison
|
|
101
|
+
IsReversed extends boolean = IsNegative<End> extends true ? true : List extends [...EndLengthTuple, unknown, ...unknown[]] ? true : false,
|
|
102
|
+
> = IsReversed extends true
|
|
103
|
+
? never
|
|
104
|
+
: Gap extends 0
|
|
58
105
|
// Handle the case that without `Step`
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
106
|
+
? List['length'] extends End // The result of "List[length] === End"
|
|
107
|
+
? Exclude<List[number], never> // All unused elements are `never`, so exclude them
|
|
108
|
+
: PrivateIntRange<Start, End, Step, Gap, [...List, List['length'] ], EndLengthTuple, false>
|
|
62
109
|
// Handle the case that with `Step`
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
110
|
+
: List extends [...(infer U), ...EndLengthTuple] // The result of "List[length] >= End", because the `...TupleOf<Gap, never>` maybe make `List` too long.
|
|
111
|
+
? Exclude<List[number], never>
|
|
112
|
+
: PrivateIntRange<Start, End, Step, Gap, [...List, List['length'], ...TupleOf<Gap, never>], EndLengthTuple, false>;
|
|
66
113
|
|
|
67
114
|
export {};
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import type {If} from '../if.d.ts';
|
|
2
2
|
import type {IsNever} from '../is-never.d.ts';
|
|
3
|
-
import type {OptionalKeysOf} from '../optional-keys-of.d.ts';
|
|
4
3
|
import type {UnknownArray} from '../unknown-array.d.ts';
|
|
5
4
|
import type {IsExactOptionalPropertyTypesEnabled, IfNotAnyOrNever} from './type.d.ts';
|
|
6
5
|
|
|
@@ -119,26 +118,28 @@ type _CollapseRestElement<
|
|
|
119
118
|
BackwardAccumulator extends UnknownArray = [],
|
|
120
119
|
> =
|
|
121
120
|
TArray extends UnknownArray // For distributing `TArray`
|
|
122
|
-
? keyof TArray
|
|
123
|
-
// Enters this branch, if `TArray`
|
|
124
|
-
|
|
125
|
-
? TArray extends readonly [...infer Rest, infer Last]
|
|
126
|
-
? _CollapseRestElement<Rest, ForwardAccumulator, [Last, ...BackwardAccumulator]> // Accumulate elements that are present after the rest element.
|
|
127
|
-
: TArray extends readonly []
|
|
128
|
-
? [...ForwardAccumulator, ...BackwardAccumulator]
|
|
129
|
-
: [...ForwardAccumulator, TArray[number], ...BackwardAccumulator] // Add the rest element between the accumulated elements.
|
|
130
|
-
: TArray extends readonly [(infer First)?, ...infer Rest]
|
|
121
|
+
? '0' extends keyof TArray
|
|
122
|
+
// Enters this branch, if `TArray` starts with a non-rest element (e.g., `[string, number]` or `[string, ...number[]]`).
|
|
123
|
+
? TArray extends readonly [(infer First)?, ...infer Rest]
|
|
131
124
|
? _CollapseRestElement<
|
|
132
125
|
Rest,
|
|
133
126
|
[
|
|
134
127
|
...ForwardAccumulator,
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
128
|
+
// A tuple allows fewer than one element only when its first element is optional. Written in exactly this shape because equivalent ones, such as `[] extends TArray`, are several times slower.
|
|
129
|
+
TArray extends readonly [unknown, ...unknown[]]
|
|
130
|
+
? First
|
|
131
|
+
: If<IsExactOptionalPropertyTypesEnabled, First, First | undefined>, // Add `| undefined` for optional elements, if `exactOptionalPropertyTypes` is disabled.
|
|
138
132
|
],
|
|
139
133
|
BackwardAccumulator
|
|
140
134
|
>
|
|
141
135
|
: never // Should never happen, since `[(infer First)?, ...infer Rest]` is a top-type for arrays.
|
|
136
|
+
// Enters this branch, if `TArray` is empty (e.g., []),
|
|
137
|
+
// or `TArray` contains no non-rest elements preceding the rest element (e.g., `[...string[]]` or `[...string[], string]`).
|
|
138
|
+
: TArray extends readonly [...infer Rest, infer Last]
|
|
139
|
+
? _CollapseRestElement<Rest, ForwardAccumulator, [Last, ...BackwardAccumulator]> // Accumulate elements that are present after the rest element.
|
|
140
|
+
: TArray extends readonly []
|
|
141
|
+
? [...ForwardAccumulator, ...BackwardAccumulator]
|
|
142
|
+
: [...ForwardAccumulator, TArray[number], ...BackwardAccumulator] // Add the rest element between the accumulated elements.
|
|
142
143
|
: never; // Should never happen
|
|
143
144
|
|
|
144
145
|
export {};
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import type {IsNever} from '../is-never.d.ts';
|
|
2
1
|
import type {Finite, NegativeInfinity, PositiveInfinity} from '../numeric.d.ts';
|
|
3
2
|
import type {UnknownArray} from '../unknown-array.d.ts';
|
|
4
3
|
import type {IfNotAnyOrNever, IsAnyOrNever} from './type.d.ts';
|
|
@@ -69,43 +68,6 @@ type InternalUnionMin<N extends number, T extends UnknownArray = []> =
|
|
|
69
68
|
? T['length']
|
|
70
69
|
: InternalUnionMin<N, [...T, unknown]>;
|
|
71
70
|
|
|
72
|
-
/**
|
|
73
|
-
Returns the maximum number in the given union of numbers.
|
|
74
|
-
|
|
75
|
-
Note: Just supports numbers from 0 to 999.
|
|
76
|
-
|
|
77
|
-
@example
|
|
78
|
-
```
|
|
79
|
-
type A = UnionMax<1 | 3 | 2>;
|
|
80
|
-
//=> 3
|
|
81
|
-
|
|
82
|
-
type B = UnionMax<number>;
|
|
83
|
-
//=> number
|
|
84
|
-
|
|
85
|
-
type C = UnionMax<any>;
|
|
86
|
-
//=> any
|
|
87
|
-
|
|
88
|
-
type D = UnionMax<never>;
|
|
89
|
-
//=> never
|
|
90
|
-
```
|
|
91
|
-
*/
|
|
92
|
-
export type UnionMax<N extends number> =
|
|
93
|
-
IsAnyOrNever<N> extends true ? N
|
|
94
|
-
: number extends N ? number
|
|
95
|
-
: PositiveInfinity extends N ? PositiveInfinity
|
|
96
|
-
: [N] extends [NegativeInfinity] ? NegativeInfinity
|
|
97
|
-
: InternalUnionMax<Finite<N>>;
|
|
98
|
-
|
|
99
|
-
/**
|
|
100
|
-
The actual implementation of `UnionMax`. It's private because it has some arguments that don't need to be exposed.
|
|
101
|
-
*/
|
|
102
|
-
type InternalUnionMax<N extends number, T extends UnknownArray = []> =
|
|
103
|
-
IsNever<N> extends true
|
|
104
|
-
? T['length']
|
|
105
|
-
: T['length'] extends N
|
|
106
|
-
? InternalUnionMax<Exclude<N, T['length']>, T>
|
|
107
|
-
: InternalUnionMax<N, [...T, unknown]>;
|
|
108
|
-
|
|
109
71
|
/**
|
|
110
72
|
Returns the number with reversed sign.
|
|
111
73
|
|