@openclaw/feishu 2026.9.3 → 2026.9.5
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/assets/activity.svg +3 -0
- package/assets/icon.png +0 -0
- package/dist/{accounts-cCMNFBKg.js → .setup/accounts-DmU0xYPx.mjs} +1 -1
- package/dist/{app-registration-BI99e_JI.js → .setup/app-registration-Bv4mvauR.mjs} +1 -1
- package/dist/{channel-DrAqd5ED.js → .setup/channel-C1KrXXJa.mjs} +100 -99
- package/dist/{channel.runtime-BZzuDlOS.js → .setup/channel.runtime-Bizuv7WZ.mjs} +32 -18
- package/dist/{chat-BZSnEtgb.js → .setup/chat-dWJYS63b.mjs} +89 -88
- package/dist/{client-DMbIL3UH.js → .setup/client-DCwNVFZg.mjs} +128 -11
- package/dist/{conversation-id-VYgGQ-GX.js → .setup/conversation-id-H-lUayji.mjs} +49 -14
- package/dist/{monitor-DSGtOPio.js → .setup/monitor-C69OLzgO.mjs} +4 -4
- package/dist/{monitor.account-BRDUsS_q.js → .setup/monitor.account-zwHb3HKM.mjs} +76 -52
- package/dist/{probe-D_SatdZl.js → .setup/probe-bdidyhAn.mjs} +2 -2
- package/dist/{reply-delivery-result-BXEmtKpf.js → .setup/reply-delivery-result-DFjxGLgX.mjs} +162 -163
- package/dist/.setup/runtime-setter-api-CG-RC4_r.mjs +3 -0
- package/dist/.setup/secret-contract-api-jmCkqVLc.mjs +3 -0
- package/dist/{security-audit-DKfR4Cv3.js → .setup/security-audit-CmiKKfU-.mjs} +1 -1
- package/dist/{session-conversation-DFCIvQK-.js → .setup/session-conversation-ZC6TC1zk.mjs} +1 -1
- package/dist/.setup/setup-api-CTRwX09n.mjs +3 -0
- package/dist/{subagent-hooks-Buadpie_.js → .setup/subagent-hooks-BBfF1hZk.mjs} +3 -19
- package/dist/api.js +125 -121
- package/dist/channel-plugin-api.js +1 -1
- package/dist/contract-api.js +3 -3
- package/dist/doctor-contract-api.js +1 -1
- package/dist/runtime-api.js +1 -1
- package/dist/runtime-setter-api.js +1 -1
- package/dist/secret-contract-api.js +1 -1
- package/dist/security-contract-api.js +1 -1
- package/dist/session-binding-contract-api.js +1 -1
- package/dist/session-key-api.js +1 -1
- package/dist/setup-api.js +1 -1
- package/dist/setup-entry.js +4 -3
- package/dist/subagent-hooks-api.js +1 -1
- package/node_modules/@larksuiteoapi/node-sdk/es/index.js +199 -35
- package/node_modules/@larksuiteoapi/node-sdk/lib/index.js +199 -35
- package/node_modules/@larksuiteoapi/node-sdk/node_modules/axios/CHANGELOG.md +62 -0
- package/node_modules/@larksuiteoapi/node-sdk/node_modules/axios/README.md +233 -5
- package/node_modules/@larksuiteoapi/node-sdk/node_modules/axios/dist/axios.js +387 -89
- package/node_modules/@larksuiteoapi/node-sdk/node_modules/axios/dist/axios.min.js +3 -3
- package/node_modules/@larksuiteoapi/node-sdk/node_modules/axios/dist/axios.min.js.map +1 -1
- package/node_modules/@larksuiteoapi/node-sdk/node_modules/axios/dist/browser/axios.cjs +458 -98
- package/node_modules/@larksuiteoapi/node-sdk/node_modules/axios/dist/esm/axios.js +458 -98
- package/node_modules/@larksuiteoapi/node-sdk/node_modules/axios/dist/esm/axios.min.js +2 -2
- package/node_modules/@larksuiteoapi/node-sdk/node_modules/axios/dist/esm/axios.min.js.map +1 -1
- package/node_modules/@larksuiteoapi/node-sdk/node_modules/axios/dist/node/axios.cjs +568 -116
- package/node_modules/@larksuiteoapi/node-sdk/node_modules/axios/index.d.cts +4 -0
- package/node_modules/@larksuiteoapi/node-sdk/node_modules/axios/index.d.ts +4 -0
- package/node_modules/@larksuiteoapi/node-sdk/node_modules/axios/lib/adapters/fetch.js +64 -11
- package/node_modules/@larksuiteoapi/node-sdk/node_modules/axios/lib/adapters/http.js +134 -50
- package/node_modules/@larksuiteoapi/node-sdk/node_modules/axios/lib/adapters/xhr.js +52 -3
- package/node_modules/@larksuiteoapi/node-sdk/node_modules/axios/lib/core/Axios.js +19 -14
- package/node_modules/@larksuiteoapi/node-sdk/node_modules/axios/lib/core/InterceptorManager.js +107 -8
- package/node_modules/@larksuiteoapi/node-sdk/node_modules/axios/lib/core/buildFullPath.js +1 -13
- package/node_modules/@larksuiteoapi/node-sdk/node_modules/axios/lib/core/dispatchRequest.js +8 -2
- package/node_modules/@larksuiteoapi/node-sdk/node_modules/axios/lib/core/mergeConfig.js +1 -1
- package/node_modules/@larksuiteoapi/node-sdk/node_modules/axios/lib/core/methodList.js +17 -0
- package/node_modules/@larksuiteoapi/node-sdk/node_modules/axios/lib/defaults/index.js +2 -1
- package/node_modules/@larksuiteoapi/node-sdk/node_modules/axios/lib/env/data.js +1 -1
- package/node_modules/@larksuiteoapi/node-sdk/node_modules/axios/lib/helpers/Http2Sessions.js +2 -0
- package/node_modules/@larksuiteoapi/node-sdk/node_modules/axios/lib/helpers/HttpStatusCode.js +11 -1
- package/node_modules/@larksuiteoapi/node-sdk/node_modules/axios/lib/helpers/fromDataURI.js +5 -4
- package/node_modules/@larksuiteoapi/node-sdk/node_modules/axios/lib/helpers/normalizeURLForProtocolCheck.js +24 -0
- package/node_modules/@larksuiteoapi/node-sdk/node_modules/axios/lib/helpers/progressEventReducer.js +1 -1
- package/node_modules/@larksuiteoapi/node-sdk/node_modules/axios/lib/helpers/resolveConfig.js +4 -2
- package/node_modules/@larksuiteoapi/node-sdk/node_modules/axios/lib/helpers/shouldBypassProxy.js +182 -6
- package/node_modules/@larksuiteoapi/node-sdk/node_modules/axios/lib/helpers/throttle.js +3 -2
- package/node_modules/@larksuiteoapi/node-sdk/node_modules/axios/lib/helpers/toFormData.js +14 -21
- package/node_modules/@larksuiteoapi/node-sdk/node_modules/axios/lib/utils.js +134 -13
- package/node_modules/@larksuiteoapi/node-sdk/node_modules/axios/package.json +1 -1
- package/node_modules/@larksuiteoapi/node-sdk/node_modules/protobufjs/README.md +24 -17
- package/node_modules/@larksuiteoapi/node-sdk/node_modules/protobufjs/dist/light/protobuf.js +124 -14
- package/node_modules/@larksuiteoapi/node-sdk/node_modules/protobufjs/dist/light/protobuf.js.map +1 -1
- package/node_modules/@larksuiteoapi/node-sdk/node_modules/protobufjs/dist/light/protobuf.min.js +3 -3
- package/node_modules/@larksuiteoapi/node-sdk/node_modules/protobufjs/dist/light/protobuf.min.js.map +1 -1
- package/node_modules/@larksuiteoapi/node-sdk/node_modules/protobufjs/dist/minimal/protobuf.js +63 -9
- package/node_modules/@larksuiteoapi/node-sdk/node_modules/protobufjs/dist/minimal/protobuf.js.map +1 -1
- package/node_modules/@larksuiteoapi/node-sdk/node_modules/protobufjs/dist/minimal/protobuf.min.js +3 -3
- package/node_modules/@larksuiteoapi/node-sdk/node_modules/protobufjs/dist/minimal/protobuf.min.js.map +1 -1
- package/node_modules/@larksuiteoapi/node-sdk/node_modules/protobufjs/dist/protobuf.js +133 -18
- package/node_modules/@larksuiteoapi/node-sdk/node_modules/protobufjs/dist/protobuf.js.map +1 -1
- package/node_modules/@larksuiteoapi/node-sdk/node_modules/protobufjs/dist/protobuf.min.js +3 -3
- package/node_modules/@larksuiteoapi/node-sdk/node_modules/protobufjs/dist/protobuf.min.js.map +1 -1
- package/node_modules/@larksuiteoapi/node-sdk/node_modules/protobufjs/ext/descriptor.generated.d.ts +7 -0
- package/node_modules/@larksuiteoapi/node-sdk/node_modules/protobufjs/ext/descriptor.js +24 -0
- package/node_modules/@larksuiteoapi/node-sdk/node_modules/protobufjs/ext/protojson.js +14 -4
- package/node_modules/@larksuiteoapi/node-sdk/node_modules/protobufjs/ext/textformat.js +8 -4
- package/node_modules/@larksuiteoapi/node-sdk/node_modules/protobufjs/google/protobuf/descriptor.json +20 -1
- package/node_modules/@larksuiteoapi/node-sdk/node_modules/protobufjs/google/protobuf/descriptor.proto +14 -1
- package/node_modules/@larksuiteoapi/node-sdk/node_modules/protobufjs/index.d.ts +12 -0
- package/node_modules/@larksuiteoapi/node-sdk/node_modules/protobufjs/package.json +1 -1
- package/node_modules/@larksuiteoapi/node-sdk/node_modules/protobufjs/src/decoder.js +31 -2
- package/node_modules/@larksuiteoapi/node-sdk/node_modules/protobufjs/src/enum.js +10 -0
- package/node_modules/@larksuiteoapi/node-sdk/node_modules/protobufjs/src/object.js +5 -2
- package/node_modules/@larksuiteoapi/node-sdk/node_modules/protobufjs/src/parse.js +9 -4
- package/node_modules/@larksuiteoapi/node-sdk/node_modules/protobufjs/src/reader.js +61 -7
- package/node_modules/@larksuiteoapi/node-sdk/node_modules/protobufjs/src/type.js +10 -0
- package/node_modules/@larksuiteoapi/node-sdk/node_modules/protobufjs/src/wrappers.js +5 -1
- package/node_modules/@larksuiteoapi/node-sdk/node_modules/qs/.github/THREAT_MODEL.md +3 -3
- package/node_modules/@larksuiteoapi/node-sdk/node_modules/qs/CHANGELOG.md +15 -0
- package/node_modules/@larksuiteoapi/node-sdk/node_modules/qs/README.md +19 -1
- package/node_modules/@larksuiteoapi/node-sdk/node_modules/qs/dist/qs.js +21 -21
- package/node_modules/@larksuiteoapi/node-sdk/node_modules/qs/eslint.config.mjs +1 -1
- package/node_modules/@larksuiteoapi/node-sdk/node_modules/qs/lib/parse.js +3 -4
- package/node_modules/@larksuiteoapi/node-sdk/node_modules/qs/lib/stringify.js +23 -8
- package/node_modules/@larksuiteoapi/node-sdk/node_modules/qs/lib/utils.js +10 -3
- package/node_modules/@larksuiteoapi/node-sdk/node_modules/qs/package.json +4 -4
- package/node_modules/@larksuiteoapi/node-sdk/node_modules/qs/test/parse.js +192 -3
- package/node_modules/@larksuiteoapi/node-sdk/node_modules/qs/test/stringify.js +317 -0
- package/node_modules/@larksuiteoapi/node-sdk/node_modules/qs/test/utils.js +12 -0
- package/node_modules/@larksuiteoapi/node-sdk/package.json +1 -1
- package/node_modules/@larksuiteoapi/node-sdk/types/index.d.ts +35 -0
- package/node_modules/typebox/build/compile/validator.d.mts +1 -1
- package/node_modules/typebox/build/compile/validator.mjs +1 -1
- package/node_modules/typebox/build/format/idna/idn-hostname.mjs +7 -5
- package/node_modules/typebox/build/format/iri.mjs +5 -1
- package/node_modules/typebox/build/guard/emit.mjs +2 -4
- package/node_modules/typebox/build/guard/guard.mjs +6 -18
- package/node_modules/typebox/build/guard/string.mjs +16 -24
- package/node_modules/typebox/build/schema/build.mjs +2 -2
- package/node_modules/typebox/build/schema/check.mjs +1 -1
- package/node_modules/typebox/build/schema/compile.d.mts +3 -2
- package/node_modules/typebox/build/schema/compile.mjs +8 -8
- package/node_modules/typebox/build/schema/engine/_context.d.mts +6 -7
- package/node_modules/typebox/build/schema/engine/_context.mjs +23 -15
- package/node_modules/typebox/build/schema/engine/_functions.d.mts +2 -2
- package/node_modules/typebox/build/schema/engine/_functions.mjs +1 -1
- package/node_modules/typebox/build/schema/engine/_reducer.d.mts +3 -3
- package/node_modules/typebox/build/schema/engine/_refine.d.mts +5 -5
- package/node_modules/typebox/build/schema/engine/_refine.mjs +4 -7
- package/node_modules/typebox/build/schema/engine/_stack.d.mts +34 -16
- package/node_modules/typebox/build/schema/engine/_stack.mjs +148 -104
- package/node_modules/typebox/build/schema/engine/additionalItems.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/additionalProperties.d.mts +8 -8
- package/node_modules/typebox/build/schema/engine/additionalProperties.mjs +26 -18
- package/node_modules/typebox/build/schema/engine/allOf.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/allOf.mjs +3 -3
- package/node_modules/typebox/build/schema/engine/anyOf.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/anyOf.mjs +5 -10
- package/node_modules/typebox/build/schema/engine/boolean.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/boolean.mjs +2 -6
- package/node_modules/typebox/build/schema/engine/const.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/const.mjs +2 -6
- package/node_modules/typebox/build/schema/engine/contains.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/contains.mjs +2 -6
- package/node_modules/typebox/build/schema/engine/dependencies.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/dependencies.mjs +3 -6
- package/node_modules/typebox/build/schema/engine/dependentRequired.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/dependentRequired.mjs +2 -6
- package/node_modules/typebox/build/schema/engine/dependentSchemas.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/dynamicRef.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/dynamicRef.mjs +11 -7
- package/node_modules/typebox/build/schema/engine/enum.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/enum.mjs +2 -6
- package/node_modules/typebox/build/schema/engine/exclusiveMaximum.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/exclusiveMaximum.mjs +2 -6
- package/node_modules/typebox/build/schema/engine/exclusiveMinimum.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/exclusiveMinimum.mjs +2 -6
- package/node_modules/typebox/build/schema/engine/format.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/format.mjs +2 -6
- package/node_modules/typebox/build/schema/engine/if.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/if.mjs +7 -15
- package/node_modules/typebox/build/schema/engine/items.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/items.mjs +1 -1
- package/node_modules/typebox/build/schema/engine/maxContains.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/maxContains.mjs +2 -6
- package/node_modules/typebox/build/schema/engine/maxItems.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/maxItems.mjs +2 -6
- package/node_modules/typebox/build/schema/engine/maxLength.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/maxLength.mjs +2 -6
- package/node_modules/typebox/build/schema/engine/maxProperties.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/maxProperties.mjs +2 -6
- package/node_modules/typebox/build/schema/engine/maximum.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/maximum.mjs +2 -6
- package/node_modules/typebox/build/schema/engine/minContains.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/minContains.mjs +2 -6
- package/node_modules/typebox/build/schema/engine/minItems.d.mts +5 -5
- package/node_modules/typebox/build/schema/engine/minItems.mjs +2 -6
- package/node_modules/typebox/build/schema/engine/minLength.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/minLength.mjs +2 -6
- package/node_modules/typebox/build/schema/engine/minProperties.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/minProperties.mjs +2 -6
- package/node_modules/typebox/build/schema/engine/minimum.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/minimum.mjs +2 -6
- package/node_modules/typebox/build/schema/engine/multipleOf.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/multipleOf.mjs +2 -6
- package/node_modules/typebox/build/schema/engine/not.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/not.mjs +4 -8
- package/node_modules/typebox/build/schema/engine/oneOf.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/oneOf.mjs +6 -11
- package/node_modules/typebox/build/schema/engine/pattern.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/pattern.mjs +3 -7
- package/node_modules/typebox/build/schema/engine/patternProperties.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/patternProperties.mjs +1 -1
- package/node_modules/typebox/build/schema/engine/prefixItems.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/prefixItems.mjs +1 -1
- package/node_modules/typebox/build/schema/engine/properties.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/properties.mjs +1 -1
- package/node_modules/typebox/build/schema/engine/propertyNames.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/propertyNames.mjs +4 -10
- package/node_modules/typebox/build/schema/engine/recursiveRef.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/recursiveRef.mjs +11 -7
- package/node_modules/typebox/build/schema/engine/ref.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/ref.mjs +19 -15
- package/node_modules/typebox/build/schema/engine/required.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/required.mjs +2 -6
- package/node_modules/typebox/build/schema/engine/schema.d.mts +7 -7
- package/node_modules/typebox/build/schema/engine/schema.mjs +137 -133
- package/node_modules/typebox/build/schema/engine/type.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/type.mjs +2 -6
- package/node_modules/typebox/build/schema/engine/unevaluatedItems.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/unevaluatedItems.mjs +5 -9
- package/node_modules/typebox/build/schema/engine/unevaluatedProperties.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/unevaluatedProperties.mjs +5 -9
- package/node_modules/typebox/build/schema/engine/uniqueItems.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/uniqueItems.mjs +2 -6
- package/node_modules/typebox/build/schema/errors.d.mts +2 -2
- package/node_modules/typebox/build/schema/errors.mjs +8 -14
- package/node_modules/typebox/build/schema/intern/index.d.mts +1 -0
- package/node_modules/typebox/build/schema/intern/index.mjs +1 -0
- package/node_modules/typebox/build/schema/intern/intern.d.mts +11 -0
- package/node_modules/typebox/build/schema/intern/intern.mjs +293 -0
- package/node_modules/typebox/build/schema/meta/draft_2019_09.d.mts +2 -0
- package/node_modules/typebox/build/schema/meta/draft_2019_09.mjs +288 -0
- package/node_modules/typebox/build/schema/meta/draft_2020_12.d.mts +2 -0
- package/node_modules/typebox/build/schema/meta/draft_2020_12.mjs +300 -0
- package/node_modules/typebox/build/schema/meta/draft_3.d.mts +2 -0
- package/node_modules/typebox/build/schema/meta/draft_3.mjs +143 -0
- package/node_modules/typebox/build/schema/meta/draft_4.d.mts +2 -0
- package/node_modules/typebox/build/schema/meta/draft_4.mjs +149 -0
- package/node_modules/typebox/build/schema/meta/draft_6.d.mts +2 -0
- package/node_modules/typebox/build/schema/meta/draft_6.mjs +155 -0
- package/node_modules/typebox/build/schema/meta/draft_7.d.mts +2 -0
- package/node_modules/typebox/build/schema/meta/draft_7.mjs +172 -0
- package/node_modules/typebox/build/schema/meta/index.d.mts +2 -0
- package/node_modules/typebox/build/schema/meta/index.mjs +2 -0
- package/node_modules/typebox/build/schema/meta/meta.d.mts +9 -0
- package/node_modules/typebox/build/schema/meta/meta.mjs +15 -0
- package/node_modules/typebox/build/schema/meta/schema.d.mts +6 -0
- package/node_modules/typebox/build/schema/meta/schema.mjs +1 -0
- package/node_modules/typebox/build/schema/parse.d.mts +1 -0
- package/node_modules/typebox/build/schema/parse.mjs +10 -5
- package/node_modules/typebox/build/schema/resolve/resolve.d.mts +8 -3
- package/node_modules/typebox/build/schema/resolve/resolve.mjs +268 -139
- package/node_modules/typebox/build/schema/schema.d.mts +2 -0
- package/node_modules/typebox/build/schema/schema.mjs +2 -0
- package/node_modules/typebox/build/value/errors/errors.d.mts +2 -12
- package/node_modules/typebox/build/value/errors/errors.mjs +2 -7
- package/node_modules/typebox/package.json +1 -1
- package/node_modules/typebox/readme.md +59 -89
- package/node_modules/zod/README.md +27 -0
- package/node_modules/zod/compile.cjs +77 -0
- package/node_modules/zod/compile.d.cts +1 -0
- package/node_modules/zod/compile.d.ts +1 -0
- package/node_modules/zod/compile.js +52 -0
- package/node_modules/zod/index.cjs +2 -2
- package/node_modules/zod/index.d.cts +1 -2
- package/node_modules/zod/index.d.ts +1 -2
- package/node_modules/zod/index.js +5 -2
- package/node_modules/zod/package.json +13 -2
- package/node_modules/zod/src/compile.ts +56 -0
- package/node_modules/zod/src/index.ts +5 -2
- package/node_modules/zod/src/v3/ZodError.ts +22 -12
- package/node_modules/zod/src/v3/tests/error.test.ts +35 -0
- package/node_modules/zod/src/v3/tests/intersection.test.ts +18 -0
- package/node_modules/zod/src/v3/tests/language-server.test.ts +1 -2
- package/node_modules/zod/src/v3/tests/object.test.ts +3 -6
- package/node_modules/zod/src/v3/tests/readonly.test.ts +0 -80
- package/node_modules/zod/src/v3/tests/string.test.ts +6 -0
- package/node_modules/zod/src/v3/types.ts +5 -5
- package/node_modules/zod/src/v4/classic/checks.ts +1 -0
- package/node_modules/zod/src/v4/classic/compat.ts +26 -18
- package/node_modules/zod/src/v4/classic/deep-partial.ts +76 -0
- package/node_modules/zod/src/v4/classic/errors.ts +59 -44
- package/node_modules/zod/src/v4/classic/external.ts +12 -9
- package/node_modules/zod/src/v4/classic/from-json-schema.ts +140 -78
- package/node_modules/zod/src/v4/classic/in-out.ts +45 -0
- package/node_modules/zod/src/v4/classic/index.ts +2 -2
- package/node_modules/zod/src/v4/classic/iso.ts +2 -72
- package/node_modules/zod/src/v4/classic/parse.ts +10 -4
- package/node_modules/zod/src/v4/classic/schemas.ts +452 -262
- package/node_modules/zod/src/v4/classic/tests/apply.test.ts +27 -0
- package/node_modules/zod/src/v4/classic/tests/array.test.ts +2 -2
- package/node_modules/zod/src/v4/classic/tests/assignability.test.ts +135 -0
- package/node_modules/zod/src/v4/classic/tests/bigint.test.ts +30 -1
- package/node_modules/zod/src/v4/classic/tests/catch.test.ts +278 -0
- package/node_modules/zod/src/v4/classic/tests/codec-examples.test.ts +1 -2
- package/node_modules/zod/src/v4/classic/tests/codec.test.ts +2 -1
- package/node_modules/zod/src/v4/classic/tests/continuability.test.ts +2 -2
- package/node_modules/zod/src/v4/classic/tests/credit-card.test.ts +76 -0
- package/node_modules/zod/src/v4/classic/tests/cyclic-data.test.ts +720 -0
- package/node_modules/zod/src/v4/classic/tests/date.test.ts +30 -0
- package/node_modules/zod/src/v4/classic/tests/datetime.test.ts +32 -18
- package/node_modules/zod/src/v4/classic/tests/deep-partial.test.ts +380 -0
- package/node_modules/zod/src/v4/classic/tests/default-locale.test.ts +32 -0
- package/node_modules/zod/src/v4/classic/tests/default.test.ts +46 -0
- package/node_modules/zod/src/v4/classic/tests/detached-methods.test.ts +31 -7
- package/node_modules/zod/src/v4/classic/tests/discriminated-unions.test.ts +155 -13
- package/node_modules/zod/src/v4/classic/tests/enum.test.ts +11 -0
- package/node_modules/zod/src/v4/classic/tests/error-utils.test.ts +112 -2
- package/node_modules/zod/src/v4/classic/tests/error.test.ts +274 -6
- package/node_modules/zod/src/v4/classic/tests/from-json-schema.test.ts +425 -10
- package/node_modules/zod/src/v4/classic/tests/function.test.ts +31 -0
- package/node_modules/zod/src/v4/classic/tests/global-config.test.ts +2 -9
- package/node_modules/zod/src/v4/classic/tests/hash.test.ts +1 -2
- package/node_modules/zod/src/v4/classic/tests/in-out.test.ts +159 -0
- package/node_modules/zod/src/v4/classic/tests/index.test.ts +21 -2
- package/node_modules/zod/src/v4/classic/tests/instance-footprint.test.ts +281 -0
- package/node_modules/zod/src/v4/classic/tests/instanceof.test.ts +47 -0
- package/node_modules/zod/src/v4/classic/tests/intersection.test.ts +136 -0
- package/node_modules/zod/src/v4/classic/tests/issue-schema.test.ts +183 -0
- package/node_modules/zod/src/v4/classic/tests/jitless-allows-eval.test.ts +3 -10
- package/node_modules/zod/src/v4/classic/tests/lazy.test.ts +36 -1
- package/node_modules/zod/src/v4/classic/tests/literal.test.ts +12 -1
- package/node_modules/zod/src/v4/classic/tests/map.test.ts +12 -0
- package/node_modules/zod/src/v4/classic/tests/number.test.ts +46 -9
- package/node_modules/zod/src/v4/classic/tests/object.test.ts +245 -12
- package/node_modules/zod/src/v4/classic/tests/optin-ladder.test.ts +234 -0
- package/node_modules/zod/src/v4/classic/tests/optional.test.ts +49 -16
- package/node_modules/zod/src/v4/classic/tests/partial.test.ts +51 -4
- package/node_modules/zod/src/v4/classic/tests/preprocess-types.test.ts +20 -2
- package/node_modules/zod/src/v4/classic/tests/readonly.test.ts +0 -68
- package/node_modules/zod/src/v4/classic/tests/record.test.ts +186 -18
- package/node_modules/zod/src/v4/classic/tests/recursive-types.test.ts +33 -2
- package/node_modules/zod/src/v4/classic/tests/redos.test.ts +68 -0
- package/node_modules/zod/src/v4/classic/tests/refine.test.ts +60 -0
- package/node_modules/zod/src/v4/classic/tests/set.test.ts +9 -0
- package/node_modules/zod/src/v4/classic/tests/string.test.ts +127 -5
- package/node_modules/zod/src/v4/classic/tests/stringbool.test.ts +18 -0
- package/node_modules/zod/src/v4/classic/tests/template-literal.test.ts +11 -2
- package/node_modules/zod/src/v4/classic/tests/to-json-schema.test.ts +1585 -173
- package/node_modules/zod/src/v4/classic/tests/tuple.test.ts +45 -30
- package/node_modules/zod/src/v4/classic/tests/union.test.ts +39 -2
- package/node_modules/zod/src/v4/classic/tests/validate.test.ts +76 -0
- package/node_modules/zod/src/v4/classic/tests/validations.test.ts +2 -2
- package/node_modules/zod/src/v4/core/api.ts +48 -12
- package/node_modules/zod/src/v4/core/checks.ts +57 -44
- package/node_modules/zod/src/v4/core/compile.ts +2188 -0
- package/node_modules/zod/src/v4/core/core.ts +98 -19
- package/node_modules/zod/src/v4/core/doc.ts +11 -7
- package/node_modules/zod/src/v4/core/errors.ts +115 -24
- package/node_modules/zod/src/v4/core/index.ts +3 -0
- package/node_modules/zod/src/v4/core/json-schema-generator.ts +6 -1
- package/node_modules/zod/src/v4/core/json-schema-processors.ts +257 -93
- package/node_modules/zod/src/v4/core/json-schema.ts +2 -1
- package/node_modules/zod/src/v4/core/memoizer.ts +284 -0
- package/node_modules/zod/src/v4/core/parse.ts +131 -38
- package/node_modules/zod/src/v4/core/regexes.ts +30 -13
- package/node_modules/zod/src/v4/core/registries.ts +2 -2
- package/node_modules/zod/src/v4/core/schemas.ts +759 -461
- package/node_modules/zod/src/v4/core/tests/compile-differential.test.ts +969 -0
- package/node_modules/zod/src/v4/core/tests/compile-global.test.ts +89 -0
- package/node_modules/zod/src/v4/core/tests/compile-off-by-default.test.ts +26 -0
- package/node_modules/zod/src/v4/core/tests/compile-stats.test.ts +34 -0
- package/node_modules/zod/src/v4/core/tests/compile.test.ts +1639 -0
- package/node_modules/zod/src/v4/core/tests/locales/el.test.ts +1 -2
- package/node_modules/zod/src/v4/core/tests/locales/es.test.ts +1 -2
- package/node_modules/zod/src/v4/core/tests/locales/fr.test.ts +3 -3
- package/node_modules/zod/src/v4/core/tests/locales/parity.test.ts +42 -0
- package/node_modules/zod/src/v4/core/tests/locales/tk.test.ts +69 -0
- package/node_modules/zod/src/v4/core/tests/treeshake.test.ts +51 -0
- package/node_modules/zod/src/v4/core/tests/url-no-canparse.test.ts +31 -0
- package/node_modules/zod/src/v4/core/to-json-schema.ts +275 -42
- package/node_modules/zod/src/v4/core/util.ts +268 -42
- package/node_modules/zod/src/v4/core/versions.ts +2 -2
- package/node_modules/zod/src/v4/core/visit.ts +193 -0
- package/node_modules/zod/src/v4/index.ts +3 -3
- package/node_modules/zod/src/v4/locales/ar.ts +3 -0
- package/node_modules/zod/src/v4/locales/az.ts +3 -0
- package/node_modules/zod/src/v4/locales/be.ts +10 -0
- package/node_modules/zod/src/v4/locales/bg.ts +3 -0
- package/node_modules/zod/src/v4/locales/bn.ts +121 -0
- package/node_modules/zod/src/v4/locales/ca.ts +3 -0
- package/node_modules/zod/src/v4/locales/ckb.ts +138 -0
- package/node_modules/zod/src/v4/locales/cs.ts +3 -0
- package/node_modules/zod/src/v4/locales/da.ts +5 -2
- package/node_modules/zod/src/v4/locales/de.ts +3 -0
- package/node_modules/zod/src/v4/locales/el.ts +1 -0
- package/node_modules/zod/src/v4/locales/en.ts +15 -4
- package/node_modules/zod/src/v4/locales/eo.ts +3 -0
- package/node_modules/zod/src/v4/locales/es.ts +2 -0
- package/node_modules/zod/src/v4/locales/fa.ts +3 -0
- package/node_modules/zod/src/v4/locales/fi.ts +3 -0
- package/node_modules/zod/src/v4/locales/fr-CA.ts +3 -0
- package/node_modules/zod/src/v4/locales/fr.ts +19 -14
- package/node_modules/zod/src/v4/locales/gu.ts +121 -0
- package/node_modules/zod/src/v4/locales/he.ts +6 -1
- package/node_modules/zod/src/v4/locales/hi.ts +124 -0
- package/node_modules/zod/src/v4/locales/hr.ts +2 -0
- package/node_modules/zod/src/v4/locales/hu.ts +3 -0
- package/node_modules/zod/src/v4/locales/hy.ts +9 -0
- package/node_modules/zod/src/v4/locales/id.ts +3 -0
- package/node_modules/zod/src/v4/locales/index.ts +10 -0
- package/node_modules/zod/src/v4/locales/is.ts +3 -0
- package/node_modules/zod/src/v4/locales/it.ts +3 -0
- package/node_modules/zod/src/v4/locales/ja.ts +3 -0
- package/node_modules/zod/src/v4/locales/ka.ts +3 -0
- package/node_modules/zod/src/v4/locales/km.ts +3 -0
- package/node_modules/zod/src/v4/locales/kn.ts +124 -0
- package/node_modules/zod/src/v4/locales/ko.ts +3 -0
- package/node_modules/zod/src/v4/locales/lt.ts +2 -0
- package/node_modules/zod/src/v4/locales/mk.ts +3 -0
- package/node_modules/zod/src/v4/locales/ms.ts +3 -0
- package/node_modules/zod/src/v4/locales/ne.ts +126 -0
- package/node_modules/zod/src/v4/locales/nl.ts +3 -0
- package/node_modules/zod/src/v4/locales/nn.ts +119 -0
- package/node_modules/zod/src/v4/locales/no.ts +5 -2
- package/node_modules/zod/src/v4/locales/ota.ts +3 -0
- package/node_modules/zod/src/v4/locales/pl.ts +3 -0
- package/node_modules/zod/src/v4/locales/ps.ts +3 -0
- package/node_modules/zod/src/v4/locales/pt-BR.ts +159 -0
- package/node_modules/zod/src/v4/locales/pt.ts +99 -58
- package/node_modules/zod/src/v4/locales/ro.ts +1 -0
- package/node_modules/zod/src/v4/locales/ru.ts +10 -0
- package/node_modules/zod/src/v4/locales/sk.ts +121 -0
- package/node_modules/zod/src/v4/locales/sl.ts +3 -0
- package/node_modules/zod/src/v4/locales/sv.ts +5 -2
- package/node_modules/zod/src/v4/locales/ta.ts +3 -0
- package/node_modules/zod/src/v4/locales/th.ts +3 -0
- package/node_modules/zod/src/v4/locales/tk.ts +111 -0
- package/node_modules/zod/src/v4/locales/tr.ts +3 -0
- package/node_modules/zod/src/v4/locales/uk.ts +3 -0
- package/node_modules/zod/src/v4/locales/ur.ts +3 -0
- package/node_modules/zod/src/v4/locales/uz.ts +1 -0
- package/node_modules/zod/src/v4/locales/vi.ts +3 -0
- package/node_modules/zod/src/v4/locales/yo.ts +3 -0
- package/node_modules/zod/src/v4/locales/zh-CN.ts +3 -0
- package/node_modules/zod/src/v4/locales/zh-TW.ts +3 -0
- package/node_modules/zod/src/v4/mini/checks.ts +1 -0
- package/node_modules/zod/src/v4/mini/deep-partial.ts +73 -0
- package/node_modules/zod/src/v4/mini/external.ts +10 -1
- package/node_modules/zod/src/v4/mini/in-out.ts +45 -0
- package/node_modules/zod/src/v4/mini/parse.ts +2 -0
- package/node_modules/zod/src/v4/mini/schemas.ts +135 -56
- package/node_modules/zod/src/v4/mini/tests/apply.test.ts +33 -0
- package/node_modules/zod/src/v4/mini/tests/assignability.test.ts +62 -1
- package/node_modules/zod/src/v4/mini/tests/checks.test.ts +14 -0
- package/node_modules/zod/src/v4/mini/tests/codec.test.ts +35 -1
- package/node_modules/zod/src/v4/mini/tests/cyclic-data.test.ts +84 -0
- package/node_modules/zod/src/v4/mini/tests/deep-partial.test.ts +54 -0
- package/node_modules/zod/src/v4/mini/tests/error.test.ts +23 -4
- package/node_modules/zod/src/v4/mini/tests/functions.test.ts +9 -0
- package/node_modules/zod/src/v4/mini/tests/index.test.ts +72 -5
- package/node_modules/zod/src/v4/mini/tests/number.test.ts +14 -0
- package/node_modules/zod/src/v4/mini/tests/object.test.ts +65 -0
- package/node_modules/zod/src/v4/mini/tests/string.test.ts +21 -0
- package/node_modules/zod/v3/ZodError.cjs +22 -12
- package/node_modules/zod/v3/ZodError.d.cts +1 -1
- package/node_modules/zod/v3/ZodError.d.ts +1 -1
- package/node_modules/zod/v3/ZodError.js +22 -12
- package/node_modules/zod/v3/types.cjs +7 -5
- package/node_modules/zod/v3/types.js +7 -5
- package/node_modules/zod/v4/classic/checks.cjs +2 -1
- package/node_modules/zod/v4/classic/checks.d.cts +1 -1
- package/node_modules/zod/v4/classic/checks.d.ts +1 -1
- package/node_modules/zod/v4/classic/checks.js +1 -1
- package/node_modules/zod/v4/classic/compat.d.cts +9 -11
- package/node_modules/zod/v4/classic/compat.d.ts +9 -11
- package/node_modules/zod/v4/classic/deep-partial.cjs +39 -0
- package/node_modules/zod/v4/classic/deep-partial.d.cts +14 -0
- package/node_modules/zod/v4/classic/deep-partial.d.ts +14 -0
- package/node_modules/zod/v4/classic/deep-partial.js +13 -0
- package/node_modules/zod/v4/classic/errors.cjs +43 -34
- package/node_modules/zod/v4/classic/errors.d.cts +3 -4
- package/node_modules/zod/v4/classic/errors.d.ts +3 -4
- package/node_modules/zod/v4/classic/errors.js +43 -34
- package/node_modules/zod/v4/classic/external.cjs +30 -27
- package/node_modules/zod/v4/classic/external.d.cts +5 -2
- package/node_modules/zod/v4/classic/external.d.ts +5 -2
- package/node_modules/zod/v4/classic/external.js +5 -8
- package/node_modules/zod/v4/classic/from-json-schema.cjs +136 -75
- package/node_modules/zod/v4/classic/from-json-schema.js +136 -75
- package/node_modules/zod/v4/classic/in-out.cjs +63 -0
- package/node_modules/zod/v4/classic/in-out.d.cts +8 -0
- package/node_modules/zod/v4/classic/in-out.d.ts +8 -0
- package/node_modules/zod/v4/classic/in-out.js +36 -0
- package/node_modules/zod/v4/classic/index.cjs +2 -2
- package/node_modules/zod/v4/classic/index.d.cts +1 -2
- package/node_modules/zod/v4/classic/index.d.ts +1 -2
- package/node_modules/zod/v4/classic/index.js +2 -2
- package/node_modules/zod/v4/classic/iso.cjs +11 -22
- package/node_modules/zod/v4/classic/iso.d.cts +2 -17
- package/node_modules/zod/v4/classic/iso.d.ts +2 -17
- package/node_modules/zod/v4/classic/iso.js +2 -17
- package/node_modules/zod/v4/classic/parse.cjs +4 -1
- package/node_modules/zod/v4/classic/parse.d.cts +17 -4
- package/node_modules/zod/v4/classic/parse.d.ts +17 -4
- package/node_modules/zod/v4/classic/parse.js +1 -0
- package/node_modules/zod/v4/classic/schemas.cjs +498 -398
- package/node_modules/zod/v4/classic/schemas.d.cts +53 -18
- package/node_modules/zod/v4/classic/schemas.d.ts +53 -18
- package/node_modules/zod/v4/classic/schemas.js +492 -396
- package/node_modules/zod/v4/core/api.cjs +23 -4
- package/node_modules/zod/v4/core/api.d.cts +13 -9
- package/node_modules/zod/v4/core/api.d.ts +13 -9
- package/node_modules/zod/v4/core/api.js +21 -4
- package/node_modules/zod/v4/core/checks.cjs +37 -31
- package/node_modules/zod/v4/core/checks.d.cts +13 -13
- package/node_modules/zod/v4/core/checks.d.ts +13 -13
- package/node_modules/zod/v4/core/checks.js +37 -31
- package/node_modules/zod/v4/core/compile.cjs +1813 -0
- package/node_modules/zod/v4/core/compile.d.cts +51 -0
- package/node_modules/zod/v4/core/compile.d.ts +51 -0
- package/node_modules/zod/v4/core/compile.js +1783 -0
- package/node_modules/zod/v4/core/core.cjs +81 -18
- package/node_modules/zod/v4/core/core.d.cts +16 -4
- package/node_modules/zod/v4/core/core.d.ts +16 -4
- package/node_modules/zod/v4/core/core.js +82 -19
- package/node_modules/zod/v4/core/doc.cjs +5 -7
- package/node_modules/zod/v4/core/doc.d.cts +3 -1
- package/node_modules/zod/v4/core/doc.d.ts +3 -1
- package/node_modules/zod/v4/core/doc.js +5 -7
- package/node_modules/zod/v4/core/errors.cjs +110 -25
- package/node_modules/zod/v4/core/errors.d.cts +4 -0
- package/node_modules/zod/v4/core/errors.d.ts +4 -0
- package/node_modules/zod/v4/core/errors.js +110 -25
- package/node_modules/zod/v4/core/index.cjs +5 -1
- package/node_modules/zod/v4/core/index.d.cts +3 -0
- package/node_modules/zod/v4/core/index.d.ts +3 -0
- package/node_modules/zod/v4/core/index.js +3 -0
- package/node_modules/zod/v4/core/json-schema-generator.cjs +4 -0
- package/node_modules/zod/v4/core/json-schema-generator.d.cts +2 -2
- package/node_modules/zod/v4/core/json-schema-generator.d.ts +2 -2
- package/node_modules/zod/v4/core/json-schema-generator.js +4 -0
- package/node_modules/zod/v4/core/json-schema-processors.cjs +264 -95
- package/node_modules/zod/v4/core/json-schema-processors.js +243 -97
- package/node_modules/zod/v4/core/json-schema.d.cts +2 -1
- package/node_modules/zod/v4/core/json-schema.d.ts +2 -1
- package/node_modules/zod/v4/core/memoizer.cjs +272 -0
- package/node_modules/zod/v4/core/memoizer.d.cts +15 -0
- package/node_modules/zod/v4/core/memoizer.d.ts +15 -0
- package/node_modules/zod/v4/core/memoizer.js +265 -0
- package/node_modules/zod/v4/core/parse.cjs +96 -34
- package/node_modules/zod/v4/core/parse.d.cts +14 -11
- package/node_modules/zod/v4/core/parse.d.ts +14 -11
- package/node_modules/zod/v4/core/parse.js +94 -33
- package/node_modules/zod/v4/core/regexes.cjs +27 -15
- package/node_modules/zod/v4/core/regexes.d.cts +2 -0
- package/node_modules/zod/v4/core/regexes.d.ts +2 -0
- package/node_modules/zod/v4/core/regexes.js +24 -13
- package/node_modules/zod/v4/core/registries.js +2 -2
- package/node_modules/zod/v4/core/schemas.cjs +537 -326
- package/node_modules/zod/v4/core/schemas.d.cts +100 -31
- package/node_modules/zod/v4/core/schemas.d.ts +100 -31
- package/node_modules/zod/v4/core/schemas.js +526 -325
- package/node_modules/zod/v4/core/to-json-schema.cjs +242 -39
- package/node_modules/zod/v4/core/to-json-schema.d.cts +42 -3
- package/node_modules/zod/v4/core/to-json-schema.d.ts +42 -3
- package/node_modules/zod/v4/core/to-json-schema.js +241 -39
- package/node_modules/zod/v4/core/util.cjs +212 -31
- package/node_modules/zod/v4/core/util.d.cts +58 -1
- package/node_modules/zod/v4/core/util.d.ts +58 -1
- package/node_modules/zod/v4/core/util.js +202 -30
- package/node_modules/zod/v4/core/versions.cjs +2 -2
- package/node_modules/zod/v4/core/versions.d.cts +1 -1
- package/node_modules/zod/v4/core/versions.d.ts +1 -1
- package/node_modules/zod/v4/core/versions.js +2 -2
- package/node_modules/zod/v4/core/visit.cjs +195 -0
- package/node_modules/zod/v4/core/visit.d.cts +30 -0
- package/node_modules/zod/v4/core/visit.d.ts +30 -0
- package/node_modules/zod/v4/core/visit.js +169 -0
- package/node_modules/zod/v4/index.cjs +15 -5
- package/node_modules/zod/v4/index.d.cts +2 -2
- package/node_modules/zod/v4/index.d.ts +2 -2
- package/node_modules/zod/v4/index.js +3 -2
- package/node_modules/zod/v4/locales/ar.cjs +3 -0
- package/node_modules/zod/v4/locales/ar.js +3 -0
- package/node_modules/zod/v4/locales/az.cjs +3 -0
- package/node_modules/zod/v4/locales/az.js +3 -0
- package/node_modules/zod/v4/locales/be.cjs +10 -0
- package/node_modules/zod/v4/locales/be.js +10 -0
- package/node_modules/zod/v4/locales/bg.cjs +3 -0
- package/node_modules/zod/v4/locales/bg.js +3 -0
- package/node_modules/zod/v4/locales/bn.cjs +138 -0
- package/node_modules/zod/v4/locales/bn.d.cts +5 -0
- package/node_modules/zod/v4/locales/bn.d.ts +4 -0
- package/node_modules/zod/v4/locales/bn.js +111 -0
- package/node_modules/zod/v4/locales/ca.cjs +3 -0
- package/node_modules/zod/v4/locales/ca.js +3 -0
- package/node_modules/zod/v4/locales/ckb.cjs +158 -0
- package/node_modules/zod/v4/locales/ckb.d.cts +5 -0
- package/node_modules/zod/v4/locales/ckb.d.ts +4 -0
- package/node_modules/zod/v4/locales/ckb.js +131 -0
- package/node_modules/zod/v4/locales/cs.cjs +3 -0
- package/node_modules/zod/v4/locales/cs.js +3 -0
- package/node_modules/zod/v4/locales/da.cjs +5 -2
- package/node_modules/zod/v4/locales/da.js +5 -2
- package/node_modules/zod/v4/locales/de.cjs +3 -0
- package/node_modules/zod/v4/locales/de.js +3 -0
- package/node_modules/zod/v4/locales/el.cjs +1 -0
- package/node_modules/zod/v4/locales/el.js +1 -0
- package/node_modules/zod/v4/locales/en.cjs +14 -4
- package/node_modules/zod/v4/locales/en.js +14 -4
- package/node_modules/zod/v4/locales/eo.cjs +3 -0
- package/node_modules/zod/v4/locales/eo.js +3 -0
- package/node_modules/zod/v4/locales/es.cjs +2 -0
- package/node_modules/zod/v4/locales/es.js +2 -0
- package/node_modules/zod/v4/locales/fa.cjs +3 -0
- package/node_modules/zod/v4/locales/fa.js +3 -0
- package/node_modules/zod/v4/locales/fi.cjs +3 -0
- package/node_modules/zod/v4/locales/fi.js +3 -0
- package/node_modules/zod/v4/locales/fr-CA.cjs +3 -0
- package/node_modules/zod/v4/locales/fr-CA.js +3 -0
- package/node_modules/zod/v4/locales/fr.cjs +16 -14
- package/node_modules/zod/v4/locales/fr.js +16 -14
- package/node_modules/zod/v4/locales/gu.cjs +138 -0
- package/node_modules/zod/v4/locales/gu.d.cts +5 -0
- package/node_modules/zod/v4/locales/gu.d.ts +4 -0
- package/node_modules/zod/v4/locales/gu.js +111 -0
- package/node_modules/zod/v4/locales/he.cjs +5 -0
- package/node_modules/zod/v4/locales/he.js +5 -0
- package/node_modules/zod/v4/locales/hi.cjs +136 -0
- package/node_modules/zod/v4/locales/hi.d.cts +5 -0
- package/node_modules/zod/v4/locales/hi.d.ts +4 -0
- package/node_modules/zod/v4/locales/hi.js +109 -0
- package/node_modules/zod/v4/locales/hr.cjs +2 -0
- package/node_modules/zod/v4/locales/hr.js +2 -0
- package/node_modules/zod/v4/locales/hu.cjs +3 -0
- package/node_modules/zod/v4/locales/hu.js +3 -0
- package/node_modules/zod/v4/locales/hy.cjs +9 -0
- package/node_modules/zod/v4/locales/hy.js +9 -0
- package/node_modules/zod/v4/locales/id.cjs +3 -0
- package/node_modules/zod/v4/locales/id.js +3 -0
- package/node_modules/zod/v4/locales/index.cjs +22 -2
- package/node_modules/zod/v4/locales/index.d.cts +10 -0
- package/node_modules/zod/v4/locales/index.d.ts +10 -0
- package/node_modules/zod/v4/locales/index.js +10 -0
- package/node_modules/zod/v4/locales/is.cjs +3 -0
- package/node_modules/zod/v4/locales/is.js +3 -0
- package/node_modules/zod/v4/locales/it.cjs +3 -0
- package/node_modules/zod/v4/locales/it.js +3 -0
- package/node_modules/zod/v4/locales/ja.cjs +3 -0
- package/node_modules/zod/v4/locales/ja.js +3 -0
- package/node_modules/zod/v4/locales/ka.cjs +3 -0
- package/node_modules/zod/v4/locales/ka.js +3 -0
- package/node_modules/zod/v4/locales/km.cjs +3 -0
- package/node_modules/zod/v4/locales/km.js +3 -0
- package/node_modules/zod/v4/locales/kn.cjs +141 -0
- package/node_modules/zod/v4/locales/kn.d.cts +5 -0
- package/node_modules/zod/v4/locales/kn.d.ts +4 -0
- package/node_modules/zod/v4/locales/kn.js +114 -0
- package/node_modules/zod/v4/locales/ko.cjs +3 -0
- package/node_modules/zod/v4/locales/ko.js +3 -0
- package/node_modules/zod/v4/locales/lt.cjs +2 -0
- package/node_modules/zod/v4/locales/lt.js +2 -0
- package/node_modules/zod/v4/locales/mk.cjs +3 -0
- package/node_modules/zod/v4/locales/mk.js +3 -0
- package/node_modules/zod/v4/locales/ms.cjs +3 -0
- package/node_modules/zod/v4/locales/ms.js +3 -0
- package/node_modules/zod/v4/locales/ne.cjs +136 -0
- package/node_modules/zod/v4/locales/ne.d.cts +5 -0
- package/node_modules/zod/v4/locales/ne.d.ts +4 -0
- package/node_modules/zod/v4/locales/ne.js +109 -0
- package/node_modules/zod/v4/locales/nl.cjs +3 -0
- package/node_modules/zod/v4/locales/nl.js +3 -0
- package/node_modules/zod/v4/locales/nn.cjs +138 -0
- package/node_modules/zod/v4/locales/nn.d.cts +5 -0
- package/node_modules/zod/v4/locales/nn.d.ts +4 -0
- package/node_modules/zod/v4/locales/nn.js +111 -0
- package/node_modules/zod/v4/locales/no.cjs +5 -2
- package/node_modules/zod/v4/locales/no.js +5 -2
- package/node_modules/zod/v4/locales/ota.cjs +3 -0
- package/node_modules/zod/v4/locales/ota.js +3 -0
- package/node_modules/zod/v4/locales/pl.cjs +3 -0
- package/node_modules/zod/v4/locales/pl.js +3 -0
- package/node_modules/zod/v4/locales/ps.cjs +3 -0
- package/node_modules/zod/v4/locales/ps.js +3 -0
- package/node_modules/zod/v4/locales/pt-BR.cjs +168 -0
- package/node_modules/zod/v4/locales/pt-BR.d.cts +5 -0
- package/node_modules/zod/v4/locales/pt-BR.d.ts +4 -0
- package/node_modules/zod/v4/locales/pt-BR.js +141 -0
- package/node_modules/zod/v4/locales/pt.cjs +87 -55
- package/node_modules/zod/v4/locales/pt.js +87 -55
- package/node_modules/zod/v4/locales/ro.cjs +1 -0
- package/node_modules/zod/v4/locales/ro.js +1 -0
- package/node_modules/zod/v4/locales/ru.cjs +10 -0
- package/node_modules/zod/v4/locales/ru.js +10 -0
- package/node_modules/zod/v4/locales/sk.cjs +141 -0
- package/node_modules/zod/v4/locales/sk.d.cts +5 -0
- package/node_modules/zod/v4/locales/sk.d.ts +4 -0
- package/node_modules/zod/v4/locales/sk.js +114 -0
- package/node_modules/zod/v4/locales/sl.cjs +3 -0
- package/node_modules/zod/v4/locales/sl.js +3 -0
- package/node_modules/zod/v4/locales/sv.cjs +5 -2
- package/node_modules/zod/v4/locales/sv.js +5 -2
- package/node_modules/zod/v4/locales/ta.cjs +3 -0
- package/node_modules/zod/v4/locales/ta.js +3 -0
- package/node_modules/zod/v4/locales/th.cjs +3 -0
- package/node_modules/zod/v4/locales/th.js +3 -0
- package/node_modules/zod/v4/locales/tk.cjs +132 -0
- package/node_modules/zod/v4/locales/tk.d.cts +5 -0
- package/node_modules/zod/v4/locales/tk.d.ts +4 -0
- package/node_modules/zod/v4/locales/tk.js +105 -0
- package/node_modules/zod/v4/locales/tr.cjs +3 -0
- package/node_modules/zod/v4/locales/tr.js +3 -0
- package/node_modules/zod/v4/locales/uk.cjs +3 -0
- package/node_modules/zod/v4/locales/uk.js +3 -0
- package/node_modules/zod/v4/locales/ur.cjs +3 -0
- package/node_modules/zod/v4/locales/ur.js +3 -0
- package/node_modules/zod/v4/locales/uz.cjs +1 -0
- package/node_modules/zod/v4/locales/uz.js +1 -0
- package/node_modules/zod/v4/locales/vi.cjs +3 -0
- package/node_modules/zod/v4/locales/vi.js +3 -0
- package/node_modules/zod/v4/locales/yo.cjs +3 -0
- package/node_modules/zod/v4/locales/yo.js +3 -0
- package/node_modules/zod/v4/locales/zh-CN.cjs +3 -0
- package/node_modules/zod/v4/locales/zh-CN.js +3 -0
- package/node_modules/zod/v4/locales/zh-TW.cjs +3 -0
- package/node_modules/zod/v4/locales/zh-TW.js +3 -0
- package/node_modules/zod/v4/mini/checks.cjs +2 -1
- package/node_modules/zod/v4/mini/checks.d.cts +1 -1
- package/node_modules/zod/v4/mini/checks.d.ts +1 -1
- package/node_modules/zod/v4/mini/checks.js +1 -1
- package/node_modules/zod/v4/mini/deep-partial.cjs +39 -0
- package/node_modules/zod/v4/mini/deep-partial.d.cts +14 -0
- package/node_modules/zod/v4/mini/deep-partial.d.ts +14 -0
- package/node_modules/zod/v4/mini/deep-partial.js +13 -0
- package/node_modules/zod/v4/mini/external.cjs +12 -1
- package/node_modules/zod/v4/mini/external.d.cts +5 -2
- package/node_modules/zod/v4/mini/external.d.ts +5 -2
- package/node_modules/zod/v4/mini/external.js +3 -1
- package/node_modules/zod/v4/mini/in-out.cjs +63 -0
- package/node_modules/zod/v4/mini/in-out.d.cts +8 -0
- package/node_modules/zod/v4/mini/in-out.d.ts +8 -0
- package/node_modules/zod/v4/mini/in-out.js +36 -0
- package/node_modules/zod/v4/mini/parse.cjs +3 -1
- package/node_modules/zod/v4/mini/parse.d.cts +1 -1
- package/node_modules/zod/v4/mini/parse.d.ts +1 -1
- package/node_modules/zod/v4/mini/parse.js +1 -1
- package/node_modules/zod/v4/mini/schemas.cjs +75 -47
- package/node_modules/zod/v4/mini/schemas.d.cts +43 -13
- package/node_modules/zod/v4/mini/schemas.d.ts +43 -13
- package/node_modules/zod/v4/mini/schemas.js +71 -45
- package/openclaw.plugin.json +27 -56
- package/package.json +10 -7
- package/dist/targets-BTQCYRZQ.js +0 -48
- package/node_modules/zod/src/v4/core/config.ts +0 -15
- /package/dist/{audio-preflight.runtime-BBfC9elv.js → .setup/audio-preflight.runtime-BBfC9elv.mjs} +0 -0
- /package/dist/{doctor-contract-w6FpMypv.js → .setup/doctor-contract-w6FpMypv.mjs} +0 -0
- /package/dist/{json-response-DXajw_FU.js → .setup/json-response-DXajw_FU.mjs} +0 -0
- /package/dist/{rolldown-runtime-8H4AJuhK.js → .setup/rolldown-runtime-8H4AJuhK.mjs} +0 -0
- /package/dist/{runtime-C5JxBWZp.js → .setup/runtime-C5JxBWZp.mjs} +0 -0
- /package/dist/{secret-contract-BCpDLdg9.js → .setup/secret-contract-BCpDLdg9.mjs} +0 -0
- /package/dist/{security-audit-shared-CK5rVR-1.js → .setup/security-audit-shared-CK5rVR-1.mjs} +0 -0
- /package/dist/{thread-bindings-BiL1wGqK.js → .setup/thread-bindings-BiL1wGqK.mjs} +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! Axios v1.
|
|
1
|
+
/*! Axios v1.20.0 Copyright (c) 2026 Matt Zabriskie and contributors */
|
|
2
2
|
'use strict';
|
|
3
3
|
|
|
4
4
|
var FormData$1 = require('form-data');
|
|
@@ -45,13 +45,57 @@ const {
|
|
|
45
45
|
const hasOwnProperty = (({
|
|
46
46
|
hasOwnProperty
|
|
47
47
|
}) => (obj, prop) => hasOwnProperty.call(obj, prop))(Object.prototype);
|
|
48
|
+
const isUnsafeObjectKey = prop => typeof prop === 'string' && (prop === '__proto__' || prop === 'constructor' || prop === 'prototype');
|
|
48
49
|
|
|
49
50
|
/**
|
|
50
|
-
*
|
|
51
|
-
*
|
|
52
|
-
*
|
|
53
|
-
*
|
|
54
|
-
*
|
|
51
|
+
* Determine whether an inherited object must be treated as a shared-prototype
|
|
52
|
+
* boundary. Cross-realm Object.prototype objects cannot be distinguished
|
|
53
|
+
* reliably from application-created null-prototype objects because their
|
|
54
|
+
* properties are mutable, so all inherited terminal prototypes are excluded
|
|
55
|
+
* as a fail-closed boundary. A null-prototype source still keeps its own
|
|
56
|
+
* properties, as produced by mergeConfig and other safe materialization paths.
|
|
57
|
+
*
|
|
58
|
+
* @param {*} obj The object to inspect
|
|
59
|
+
* @param {*} prototype The object's prototype
|
|
60
|
+
* @param {boolean} source Whether obj is the original traversal source
|
|
61
|
+
*
|
|
62
|
+
* @returns {boolean} True when obj is a safe prototype traversal boundary
|
|
63
|
+
*/
|
|
64
|
+
const isPrototypeBoundary = (obj, prototype, source) => obj === Object.prototype || !source && prototype === null;
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* Determine whether an object can retain its identity through code paths that
|
|
68
|
+
* add, replace, and remove config properties without bypassing unsafe-key
|
|
69
|
+
* filtering. Immutable objects, unsafe-key-bearing objects, and objects with
|
|
70
|
+
* accessor or restricted data properties must be materialized instead.
|
|
71
|
+
*
|
|
72
|
+
* @param {*} obj The object to inspect
|
|
73
|
+
*
|
|
74
|
+
* @returns {boolean} True when every own property is safe and fully mutable
|
|
75
|
+
*/
|
|
76
|
+
const isSafeAndFullyMutable = obj => {
|
|
77
|
+
if (!Object.isExtensible(obj)) {
|
|
78
|
+
return false;
|
|
79
|
+
}
|
|
80
|
+
const props = Object.getOwnPropertyNames(obj);
|
|
81
|
+
if (Object.getOwnPropertySymbols) {
|
|
82
|
+
props.push(...Object.getOwnPropertySymbols(obj));
|
|
83
|
+
}
|
|
84
|
+
return props.every(prop => {
|
|
85
|
+
if (isUnsafeObjectKey(prop)) {
|
|
86
|
+
return false;
|
|
87
|
+
}
|
|
88
|
+
const descriptor = Object.getOwnPropertyDescriptor(obj, prop);
|
|
89
|
+
return !!descriptor && descriptor.configurable && descriptor.writable === true;
|
|
90
|
+
});
|
|
91
|
+
};
|
|
92
|
+
|
|
93
|
+
/**
|
|
94
|
+
* Walk the prototype chain (excluding the source realm's Object.prototype)
|
|
95
|
+
* looking for an own `prop`. This distinguishes genuine own/inherited members
|
|
96
|
+
* — including class accessors and template prototypes — from members injected
|
|
97
|
+
* via Object.prototype pollution (e.g. `Object.prototype.username = '...'`),
|
|
98
|
+
* which live on Object.prototype itself and are therefore never matched.
|
|
55
99
|
*
|
|
56
100
|
* @param {*} thing The value whose chain to inspect
|
|
57
101
|
* @param {string|symbol} prop The property key to look for
|
|
@@ -61,15 +105,19 @@ const hasOwnProperty = (({
|
|
|
61
105
|
const hasOwnInPrototypeChain = (thing, prop) => {
|
|
62
106
|
let obj = thing;
|
|
63
107
|
const seen = [];
|
|
64
|
-
while (obj != null
|
|
108
|
+
while (obj != null) {
|
|
65
109
|
if (seen.indexOf(obj) !== -1) {
|
|
66
110
|
return false;
|
|
67
111
|
}
|
|
68
112
|
seen.push(obj);
|
|
113
|
+
const prototype = getPrototypeOf(obj);
|
|
114
|
+
if (isPrototypeBoundary(obj, prototype, obj === thing)) {
|
|
115
|
+
return false;
|
|
116
|
+
}
|
|
69
117
|
if (hasOwnProperty(obj, prop)) {
|
|
70
118
|
return true;
|
|
71
119
|
}
|
|
72
|
-
obj =
|
|
120
|
+
obj = prototype;
|
|
73
121
|
}
|
|
74
122
|
return false;
|
|
75
123
|
};
|
|
@@ -86,6 +134,56 @@ const hasOwnInPrototypeChain = (thing, prop) => {
|
|
|
86
134
|
* @returns {*} The resolved value, or undefined when unsafe/absent
|
|
87
135
|
*/
|
|
88
136
|
const getSafeProp = (obj, prop) => obj != null && hasOwnInPrototypeChain(obj, prop) ? obj[prop] : undefined;
|
|
137
|
+
|
|
138
|
+
/**
|
|
139
|
+
* Flatten an object and its application-defined prototype chain into a
|
|
140
|
+
* null-prototype object. Members inherited only from the source realm's
|
|
141
|
+
* Object.prototype are deliberately excluded, while class/template members
|
|
142
|
+
* below that boundary are preserved.
|
|
143
|
+
*
|
|
144
|
+
* @param {*} thing The value to flatten
|
|
145
|
+
*
|
|
146
|
+
* @returns {*} A null-prototype copy, or the original value when it is already
|
|
147
|
+
* structurally safe or is not an object
|
|
148
|
+
*/
|
|
149
|
+
const toSafeFlatObject = thing => {
|
|
150
|
+
if (thing == null || typeof thing !== 'object' && typeof thing !== 'function') {
|
|
151
|
+
return thing;
|
|
152
|
+
}
|
|
153
|
+
const sourcePrototype = getPrototypeOf(thing);
|
|
154
|
+
if (sourcePrototype === null && isSafeAndFullyMutable(thing)) {
|
|
155
|
+
return thing;
|
|
156
|
+
}
|
|
157
|
+
const result = Object.create(null);
|
|
158
|
+
const merged = Object.create(null);
|
|
159
|
+
const seen = [];
|
|
160
|
+
let current = thing;
|
|
161
|
+
while (current != null) {
|
|
162
|
+
if (seen.indexOf(current) !== -1) {
|
|
163
|
+
break;
|
|
164
|
+
}
|
|
165
|
+
seen.push(current);
|
|
166
|
+
const prototype = current === thing ? sourcePrototype : getPrototypeOf(current);
|
|
167
|
+
if (isPrototypeBoundary(current, prototype, current === thing)) {
|
|
168
|
+
break;
|
|
169
|
+
}
|
|
170
|
+
const props = Object.getOwnPropertyNames(current);
|
|
171
|
+
if (Object.getOwnPropertySymbols) {
|
|
172
|
+
props.push(...Object.getOwnPropertySymbols(current));
|
|
173
|
+
}
|
|
174
|
+
for (const prop of props) {
|
|
175
|
+
if (isUnsafeObjectKey(prop)) {
|
|
176
|
+
continue;
|
|
177
|
+
}
|
|
178
|
+
if (!hasOwnProperty(merged, prop)) {
|
|
179
|
+
result[prop] = thing[prop];
|
|
180
|
+
merged[prop] = true;
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
current = prototype;
|
|
184
|
+
}
|
|
185
|
+
return result;
|
|
186
|
+
};
|
|
89
187
|
const kindOf = (cache => thing => {
|
|
90
188
|
const str = toString.call(thing);
|
|
91
189
|
return cache[str] || (cache[str] = str.slice(8, -1).toLowerCase());
|
|
@@ -209,9 +307,9 @@ const isPlainObject = val => {
|
|
|
209
307
|
}
|
|
210
308
|
const prototype = getPrototypeOf(val);
|
|
211
309
|
return (prototype === null || prototype === Object.prototype || getPrototypeOf(prototype) === null) &&
|
|
212
|
-
// Treat
|
|
213
|
-
//
|
|
214
|
-
//
|
|
310
|
+
// Treat safe own/inherited Symbol.toStringTag or Symbol.iterator members as
|
|
311
|
+
// evidence the value is tagged/iterable, while ignoring members reachable
|
|
312
|
+
// only through shared or terminal prototype boundaries.
|
|
215
313
|
!hasOwnInPrototypeChain(val, toStringTag) && !hasOwnInPrototypeChain(val, iterator);
|
|
216
314
|
};
|
|
217
315
|
|
|
@@ -959,6 +1057,7 @@ var utils$1 = {
|
|
|
959
1057
|
// an alias to avoid ESLint no-prototype-builtins detection
|
|
960
1058
|
hasOwnInPrototypeChain,
|
|
961
1059
|
getSafeProp,
|
|
1060
|
+
toSafeFlatObject,
|
|
962
1061
|
reduceDescriptors,
|
|
963
1062
|
freezeMethods,
|
|
964
1063
|
toObjectSet,
|
|
@@ -1063,7 +1162,7 @@ function toByteStringHeaderObject(headers) {
|
|
|
1063
1162
|
return byteStringHeaders;
|
|
1064
1163
|
}
|
|
1065
1164
|
|
|
1066
|
-
const $internals = Symbol('internals');
|
|
1165
|
+
const $internals$1 = Symbol('internals');
|
|
1067
1166
|
function normalizeHeader(header) {
|
|
1068
1167
|
return header && String(header).trim().toLowerCase();
|
|
1069
1168
|
}
|
|
@@ -1361,7 +1460,7 @@ class AxiosHeaders {
|
|
|
1361
1460
|
return computed;
|
|
1362
1461
|
}
|
|
1363
1462
|
static accessor(header) {
|
|
1364
|
-
const internals = this[$internals] = this[$internals] = {
|
|
1463
|
+
const internals = this[$internals$1] = this[$internals$1] = {
|
|
1365
1464
|
accessors: {}
|
|
1366
1465
|
};
|
|
1367
1466
|
const accessors = internals.accessors;
|
|
@@ -1676,23 +1775,17 @@ function toFormData(obj, formData, options) {
|
|
|
1676
1775
|
|
|
1677
1776
|
// eslint-disable-next-line no-param-reassign
|
|
1678
1777
|
formData = formData || new (FormData$1 || FormData)();
|
|
1679
|
-
|
|
1680
|
-
|
|
1681
|
-
|
|
1682
|
-
|
|
1683
|
-
|
|
1684
|
-
indexes: false
|
|
1685
|
-
}, false, function defined(option, source) {
|
|
1686
|
-
// eslint-disable-next-line no-eq-null,eqeqeq
|
|
1687
|
-
return !utils$1.isUndefined(source[option]);
|
|
1688
|
-
});
|
|
1689
|
-
const metaTokens = options.metaTokens;
|
|
1778
|
+
const option = (name, fallback) => {
|
|
1779
|
+
const value = utils$1.getSafeProp(options, name);
|
|
1780
|
+
return utils$1.isUndefined(value) ? fallback : value;
|
|
1781
|
+
};
|
|
1782
|
+
const metaTokens = option('metaTokens', true);
|
|
1690
1783
|
// eslint-disable-next-line no-use-before-define
|
|
1691
|
-
const visitor =
|
|
1692
|
-
const dots =
|
|
1693
|
-
const indexes =
|
|
1694
|
-
const _Blob =
|
|
1695
|
-
const maxDepth =
|
|
1784
|
+
const visitor = option('visitor') || defaultVisitor;
|
|
1785
|
+
const dots = option('dots', false);
|
|
1786
|
+
const indexes = option('indexes', false);
|
|
1787
|
+
const _Blob = option('Blob') || typeof Blob !== 'undefined' && Blob;
|
|
1788
|
+
const maxDepth = option('maxDepth', DEFAULT_FORM_DATA_MAX_DEPTH);
|
|
1696
1789
|
const useBlob = _Blob && utils$1.isSpecCompliantForm(formData);
|
|
1697
1790
|
const stack = [];
|
|
1698
1791
|
if (!utils$1.isFunction(visitor)) {
|
|
@@ -1905,9 +1998,51 @@ function buildURL(url, params, options) {
|
|
|
1905
1998
|
return url;
|
|
1906
1999
|
}
|
|
1907
2000
|
|
|
2001
|
+
const $internals = Symbol('internals');
|
|
2002
|
+
|
|
2003
|
+
// `handlers` is public and may be replaced with a nullish value by user code;
|
|
2004
|
+
// `clear()` has always tolerated that. Treat it as an empty stack rather than
|
|
2005
|
+
// dereferencing it.
|
|
2006
|
+
function countHandlers(handlers) {
|
|
2007
|
+
return handlers ? handlers.length : 0;
|
|
2008
|
+
}
|
|
2009
|
+
function trimHandlers(handlers) {
|
|
2010
|
+
if (!handlers) {
|
|
2011
|
+
return;
|
|
2012
|
+
}
|
|
2013
|
+
while (handlers.length && handlers[handlers.length - 1] === null) {
|
|
2014
|
+
handlers.pop();
|
|
2015
|
+
}
|
|
2016
|
+
}
|
|
2017
|
+
function syncHandlerEntries(manager, internals) {
|
|
2018
|
+
const handlers = manager.handlers;
|
|
2019
|
+
const length = countHandlers(handlers);
|
|
2020
|
+
if (handlers !== internals.handlersRef) {
|
|
2021
|
+
internals.handlersRef = handlers;
|
|
2022
|
+
internals.handlerEntries.clear();
|
|
2023
|
+
} else if (length !== internals.handlersLength) {
|
|
2024
|
+
if (!length) {
|
|
2025
|
+
internals.handlerEntries.clear();
|
|
2026
|
+
} else {
|
|
2027
|
+
internals.handlerEntries.forEach(function removeStaleEntry(entry, id) {
|
|
2028
|
+
if (handlers[entry.index] !== entry.handler) {
|
|
2029
|
+
internals.handlerEntries.delete(id);
|
|
2030
|
+
}
|
|
2031
|
+
});
|
|
2032
|
+
}
|
|
2033
|
+
}
|
|
2034
|
+
internals.handlersLength = length;
|
|
2035
|
+
}
|
|
1908
2036
|
class InterceptorManager {
|
|
1909
2037
|
constructor() {
|
|
1910
2038
|
this.handlers = [];
|
|
2039
|
+
this[$internals] = {
|
|
2040
|
+
handlersRef: this.handlers,
|
|
2041
|
+
handlersLength: this.handlers.length,
|
|
2042
|
+
handlerEntries: new Map(),
|
|
2043
|
+
iterationDepth: 0,
|
|
2044
|
+
nextId: 0
|
|
2045
|
+
};
|
|
1911
2046
|
}
|
|
1912
2047
|
|
|
1913
2048
|
/**
|
|
@@ -1920,13 +2055,25 @@ class InterceptorManager {
|
|
|
1920
2055
|
* @return {Number} An ID used to remove interceptor later
|
|
1921
2056
|
*/
|
|
1922
2057
|
use(fulfilled, rejected, options) {
|
|
1923
|
-
|
|
2058
|
+
const handler = {
|
|
1924
2059
|
fulfilled,
|
|
1925
2060
|
rejected,
|
|
1926
2061
|
synchronous: options ? options.synchronous : false,
|
|
1927
2062
|
runWhen: options ? options.runWhen : null
|
|
2063
|
+
};
|
|
2064
|
+
const internals = this[$internals];
|
|
2065
|
+
if (this.handlers == null) {
|
|
2066
|
+
this.handlers = [];
|
|
2067
|
+
}
|
|
2068
|
+
syncHandlerEntries(this, internals);
|
|
2069
|
+
const id = internals.nextId++;
|
|
2070
|
+
this.handlers.push(handler);
|
|
2071
|
+
internals.handlerEntries.set(id, {
|
|
2072
|
+
handler,
|
|
2073
|
+
index: this.handlers.length - 1
|
|
1928
2074
|
});
|
|
1929
|
-
|
|
2075
|
+
internals.handlersLength = this.handlers.length;
|
|
2076
|
+
return id;
|
|
1930
2077
|
}
|
|
1931
2078
|
|
|
1932
2079
|
/**
|
|
@@ -1937,8 +2084,23 @@ class InterceptorManager {
|
|
|
1937
2084
|
* @returns {void}
|
|
1938
2085
|
*/
|
|
1939
2086
|
eject(id) {
|
|
1940
|
-
|
|
1941
|
-
|
|
2087
|
+
const internals = this[$internals];
|
|
2088
|
+
syncHandlerEntries(this, internals);
|
|
2089
|
+
const entry = internals.handlerEntries.get(id);
|
|
2090
|
+
if (entry) {
|
|
2091
|
+
internals.handlerEntries.delete(id);
|
|
2092
|
+
|
|
2093
|
+
// Ignore IDs invalidated by clear or direct replacement of handlers.
|
|
2094
|
+
if (this.handlers[entry.index] !== entry.handler) {
|
|
2095
|
+
return;
|
|
2096
|
+
}
|
|
2097
|
+
this.handlers[entry.index] = null;
|
|
2098
|
+
|
|
2099
|
+
// Do not reuse an index while forEach is walking its length snapshot.
|
|
2100
|
+
if (!internals.iterationDepth) {
|
|
2101
|
+
trimHandlers(this.handlers);
|
|
2102
|
+
internals.handlersLength = this.handlers.length;
|
|
2103
|
+
}
|
|
1942
2104
|
}
|
|
1943
2105
|
}
|
|
1944
2106
|
|
|
@@ -1950,6 +2112,7 @@ class InterceptorManager {
|
|
|
1950
2112
|
clear() {
|
|
1951
2113
|
if (this.handlers) {
|
|
1952
2114
|
this.handlers = [];
|
|
2115
|
+
syncHandlerEntries(this, this[$internals]);
|
|
1953
2116
|
}
|
|
1954
2117
|
}
|
|
1955
2118
|
|
|
@@ -1964,11 +2127,22 @@ class InterceptorManager {
|
|
|
1964
2127
|
* @returns {void}
|
|
1965
2128
|
*/
|
|
1966
2129
|
forEach(fn) {
|
|
1967
|
-
|
|
1968
|
-
|
|
1969
|
-
|
|
2130
|
+
const internals = this[$internals];
|
|
2131
|
+
syncHandlerEntries(this, internals);
|
|
2132
|
+
internals.iterationDepth++;
|
|
2133
|
+
try {
|
|
2134
|
+
utils$1.forEach(this.handlers, function forEachHandler(h) {
|
|
2135
|
+
if (h !== null) {
|
|
2136
|
+
fn(h);
|
|
2137
|
+
}
|
|
2138
|
+
});
|
|
2139
|
+
} finally {
|
|
2140
|
+
if (! --internals.iterationDepth) {
|
|
2141
|
+
syncHandlerEntries(this, internals);
|
|
2142
|
+
trimHandlers(this.handlers);
|
|
2143
|
+
internals.handlersLength = countHandlers(this.handlers);
|
|
1970
2144
|
}
|
|
1971
|
-
}
|
|
2145
|
+
}
|
|
1972
2146
|
}
|
|
1973
2147
|
}
|
|
1974
2148
|
|
|
@@ -2176,6 +2350,8 @@ function formDataToJSON(formData) {
|
|
|
2176
2350
|
return null;
|
|
2177
2351
|
}
|
|
2178
2352
|
|
|
2353
|
+
const methodList = Object.freeze(['get', 'delete', 'head', 'options', 'post', 'put', 'patch', 'purge', 'link', 'unlink', 'query']);
|
|
2354
|
+
|
|
2179
2355
|
const own = (obj, key) => obj != null && utils$1.hasOwnProp(obj, key) ? obj[key] : undefined;
|
|
2180
2356
|
|
|
2181
2357
|
/**
|
|
@@ -2292,7 +2468,7 @@ const defaults = {
|
|
|
2292
2468
|
}
|
|
2293
2469
|
}
|
|
2294
2470
|
};
|
|
2295
|
-
utils$1.forEach(
|
|
2471
|
+
utils$1.forEach(methodList, method => {
|
|
2296
2472
|
defaults.headers[method] = {};
|
|
2297
2473
|
});
|
|
2298
2474
|
|
|
@@ -2391,19 +2567,28 @@ function combineURLs(baseURL, relativeURL) {
|
|
|
2391
2567
|
return baseURL.slice(0, end) + '/' + relativeURL.replace(/^\/+/, '');
|
|
2392
2568
|
}
|
|
2393
2569
|
|
|
2394
|
-
const
|
|
2395
|
-
|
|
2396
|
-
|
|
2397
|
-
|
|
2398
|
-
|
|
2399
|
-
|
|
2400
|
-
|
|
2401
|
-
|
|
2402
|
-
|
|
2570
|
+
const urlParserControlCharacters = /[\t\n\r]/g;
|
|
2571
|
+
|
|
2572
|
+
/**
|
|
2573
|
+
* Match WHATWG URL preprocessing before checking a URL's protocol.
|
|
2574
|
+
*
|
|
2575
|
+
* @param {string} url
|
|
2576
|
+
*
|
|
2577
|
+
* @returns {string}
|
|
2578
|
+
*/
|
|
2403
2579
|
function normalizeURLForProtocolCheck(url) {
|
|
2404
|
-
|
|
2580
|
+
if (typeof url !== 'string') {
|
|
2581
|
+
return url;
|
|
2582
|
+
}
|
|
2583
|
+
let start = 0;
|
|
2584
|
+
while (start < url.length && url.charCodeAt(start) <= 0x20) {
|
|
2585
|
+
start++;
|
|
2586
|
+
}
|
|
2587
|
+
return url.slice(start).replace(urlParserControlCharacters, '');
|
|
2405
2588
|
}
|
|
2406
2589
|
|
|
2590
|
+
const malformedHttpProtocol = /^https?:(?!\/\/)/i;
|
|
2591
|
+
|
|
2407
2592
|
// Redact the parts of a URL that can carry secrets before it is embedded in an
|
|
2408
2593
|
// error message. AxiosError.toJSON() serializes `message` verbatim and errors
|
|
2409
2594
|
// are commonly logged, while the opt-in `config.redact` model only cleans
|
|
@@ -2555,7 +2740,7 @@ function getEnv(key) {
|
|
|
2555
2740
|
return process.env[key.toLowerCase()] || process.env[key.toUpperCase()] || '';
|
|
2556
2741
|
}
|
|
2557
2742
|
|
|
2558
|
-
const VERSION = "1.
|
|
2743
|
+
const VERSION = "1.20.0";
|
|
2559
2744
|
|
|
2560
2745
|
function parseProtocol(url) {
|
|
2561
2746
|
const match = /^([-+\w]{1,25}):(?:\/\/)?/.exec(url);
|
|
@@ -2564,7 +2749,7 @@ function parseProtocol(url) {
|
|
|
2564
2749
|
|
|
2565
2750
|
// RFC 2397: data:[<mediatype>][;base64],<data>
|
|
2566
2751
|
// mediatype = type/subtype followed by optional ;name=value parameters
|
|
2567
|
-
const DATA_URL_PATTERN = /^([
|
|
2752
|
+
const DATA_URL_PATTERN = /^([^,;/]+\/[^,;/]+)?((?:;[^,;=]+=[^,;]+)*)(;base64)?,([\s\S]*)$/;
|
|
2568
2753
|
|
|
2569
2754
|
/**
|
|
2570
2755
|
* Parse data uri to a Buffer or Blob
|
|
@@ -2877,7 +3062,7 @@ class Http2Sessions {
|
|
|
2877
3062
|
this.sessions = Object.create(null);
|
|
2878
3063
|
}
|
|
2879
3064
|
getSession(authority, options) {
|
|
2880
|
-
options = Object.assign({
|
|
3065
|
+
options = Object.assign(Object.create(null), {
|
|
2881
3066
|
sessionTimeout: 1000
|
|
2882
3067
|
}, options);
|
|
2883
3068
|
let authoritySessions = this.sessions[authority];
|
|
@@ -2944,6 +3129,7 @@ class Http2Sessions {
|
|
|
2944
3129
|
};
|
|
2945
3130
|
}
|
|
2946
3131
|
session.once('close', removeSession);
|
|
3132
|
+
session.once('error', removeSession);
|
|
2947
3133
|
let entry = [session, options];
|
|
2948
3134
|
authoritySessions ? authoritySessions.push(entry) : authoritySessions = this.sessions[authority] = [entry];
|
|
2949
3135
|
return session;
|
|
@@ -2964,6 +3150,13 @@ const callbackify = (fn, reducer) => {
|
|
|
2964
3150
|
};
|
|
2965
3151
|
|
|
2966
3152
|
const LOOPBACK_HOSTNAMES = new Set(['localhost', '0.0.0.0']);
|
|
3153
|
+
const trimTrailingDots = value => {
|
|
3154
|
+
let end = value.length;
|
|
3155
|
+
while (end && value.charCodeAt(end - 1) === 46) {
|
|
3156
|
+
end--;
|
|
3157
|
+
}
|
|
3158
|
+
return end === value.length ? value : value.slice(0, end);
|
|
3159
|
+
};
|
|
2967
3160
|
const isIPv4Loopback = host => {
|
|
2968
3161
|
const parts = host.split('.');
|
|
2969
3162
|
if (parts.length !== 4) return false;
|
|
@@ -3019,7 +3212,7 @@ const normalizeIPAddress = host => {
|
|
|
3019
3212
|
if (h.charAt(0) === '[' && h.charAt(h.length - 1) === ']') {
|
|
3020
3213
|
h = h.slice(1, -1);
|
|
3021
3214
|
}
|
|
3022
|
-
h = h
|
|
3215
|
+
h = trimTrailingDots(h);
|
|
3023
3216
|
|
|
3024
3217
|
// Allowed characters for any IPv4 shape: digits, dot, 'x', 'X', hex digits.
|
|
3025
3218
|
if (!/^[0-9.xXa-fA-F]+$/.test(h)) return host;
|
|
@@ -3174,6 +3367,40 @@ const unmapIPv4MappedIPv6 = host => {
|
|
|
3174
3367
|
}
|
|
3175
3368
|
return host;
|
|
3176
3369
|
};
|
|
3370
|
+
const IPV4_OCTET_RE = /^(?:0|[1-9]\d{0,2})$/;
|
|
3371
|
+
const ipv4ToBytes = host => {
|
|
3372
|
+
const parts = host.split('.');
|
|
3373
|
+
return parts.length === 4 && parts.every(part => IPV4_OCTET_RE.test(part) && Number(part) <= 255) ? parts.map(Number) : null;
|
|
3374
|
+
};
|
|
3375
|
+
const IPV6_GROUP_RE = /^[0-9a-f]{1,4}$/i;
|
|
3376
|
+
const ipv6ToBytes = host => {
|
|
3377
|
+
const halves = host.split('::');
|
|
3378
|
+
if (halves.length > 2) {
|
|
3379
|
+
return null;
|
|
3380
|
+
}
|
|
3381
|
+
const groups = halves[0] ? halves[0].split(':') : [];
|
|
3382
|
+
if (halves.length === 2) {
|
|
3383
|
+
const rear = halves[1] ? halves[1].split(':') : [];
|
|
3384
|
+
const missing = 8 - groups.length - rear.length;
|
|
3385
|
+
if (missing < 1) {
|
|
3386
|
+
return null;
|
|
3387
|
+
}
|
|
3388
|
+
groups.push(...new Array(missing).fill('0'), ...rear);
|
|
3389
|
+
}
|
|
3390
|
+
if (groups.length !== 8 || groups.some(group => !IPV6_GROUP_RE.test(group))) {
|
|
3391
|
+
return null;
|
|
3392
|
+
}
|
|
3393
|
+
return groups.flatMap(group => {
|
|
3394
|
+
const value = Number.parseInt(group, 16);
|
|
3395
|
+
return [value >> 8 & 0xff, value & 0xff];
|
|
3396
|
+
});
|
|
3397
|
+
};
|
|
3398
|
+
const ipToBytes = host => {
|
|
3399
|
+
if (typeof host !== 'string' || !host) {
|
|
3400
|
+
return null;
|
|
3401
|
+
}
|
|
3402
|
+
return host.indexOf(':') !== -1 ? ipv6ToBytes(host) : ipv4ToBytes(host);
|
|
3403
|
+
};
|
|
3177
3404
|
const normalizeNoProxyHost = hostname => {
|
|
3178
3405
|
if (!hostname) {
|
|
3179
3406
|
return hostname;
|
|
@@ -3181,7 +3408,7 @@ const normalizeNoProxyHost = hostname => {
|
|
|
3181
3408
|
if (hostname.charAt(0) === '[' && hostname.charAt(hostname.length - 1) === ']') {
|
|
3182
3409
|
hostname = hostname.slice(1, -1);
|
|
3183
3410
|
}
|
|
3184
|
-
const trimmed = hostname
|
|
3411
|
+
const trimmed = trimTrailingDots(hostname);
|
|
3185
3412
|
|
|
3186
3413
|
// IPv4 shorthand/octal/hex → dotted-decimal; helper is a no-op for inputs
|
|
3187
3414
|
// containing ':' (IPv6 and IPv4-mapped IPv6) so we fall through to unmap.
|
|
@@ -3191,6 +3418,92 @@ const normalizeNoProxyHost = hostname => {
|
|
|
3191
3418
|
}
|
|
3192
3419
|
return unmapIPv4MappedIPv6(trimmed);
|
|
3193
3420
|
};
|
|
3421
|
+
const normalizeCidrBase = input => {
|
|
3422
|
+
let base = input;
|
|
3423
|
+
const startsBracket = base.charAt(0) === '[';
|
|
3424
|
+
const endsBracket = base.charAt(base.length - 1) === ']';
|
|
3425
|
+
const hasBracket = base.includes('[') || base.includes(']');
|
|
3426
|
+
if (startsBracket || endsBracket) {
|
|
3427
|
+
if (!startsBracket || !endsBracket) {
|
|
3428
|
+
return null;
|
|
3429
|
+
}
|
|
3430
|
+
base = base.slice(1, -1);
|
|
3431
|
+
if (base.indexOf(':') === -1 || base.includes('[') || base.includes(']')) {
|
|
3432
|
+
return null;
|
|
3433
|
+
}
|
|
3434
|
+
} else if (hasBracket) {
|
|
3435
|
+
return null;
|
|
3436
|
+
}
|
|
3437
|
+
if (!base || base.charAt(base.length - 1) === '.') {
|
|
3438
|
+
return null;
|
|
3439
|
+
}
|
|
3440
|
+
const wasIPv6 = base.indexOf(':') !== -1;
|
|
3441
|
+
if (wasIPv6) {
|
|
3442
|
+
try {
|
|
3443
|
+
base = new URL(`http://[${base}]/`).hostname.slice(1, -1);
|
|
3444
|
+
} catch (_err) {
|
|
3445
|
+
return null;
|
|
3446
|
+
}
|
|
3447
|
+
} else {
|
|
3448
|
+
base = normalizeIPAddress(base);
|
|
3449
|
+
if (!ipv4ToBytes(base)) {
|
|
3450
|
+
return null;
|
|
3451
|
+
}
|
|
3452
|
+
}
|
|
3453
|
+
return {
|
|
3454
|
+
normalized: unmapIPv4MappedIPv6(base),
|
|
3455
|
+
wasIPv6
|
|
3456
|
+
};
|
|
3457
|
+
};
|
|
3458
|
+
const CIDR_ENTRY_RE = /^(.+)\/(0|[1-9]\d{0,2})$/;
|
|
3459
|
+
const parseCidrEntry = entry => {
|
|
3460
|
+
if (entry.indexOf('/') === -1) {
|
|
3461
|
+
return undefined;
|
|
3462
|
+
}
|
|
3463
|
+
const match = CIDR_ENTRY_RE.exec(entry);
|
|
3464
|
+
if (!match) {
|
|
3465
|
+
return null;
|
|
3466
|
+
}
|
|
3467
|
+
let prefix = Number(match[2]);
|
|
3468
|
+
const parsedBase = normalizeCidrBase(match[1]);
|
|
3469
|
+
if (!parsedBase) {
|
|
3470
|
+
return null;
|
|
3471
|
+
}
|
|
3472
|
+
const {
|
|
3473
|
+
normalized,
|
|
3474
|
+
wasIPv6
|
|
3475
|
+
} = parsedBase;
|
|
3476
|
+
if (wasIPv6 && normalized.indexOf(':') === -1) {
|
|
3477
|
+
if (prefix < 96) {
|
|
3478
|
+
return null;
|
|
3479
|
+
}
|
|
3480
|
+
prefix -= 96;
|
|
3481
|
+
}
|
|
3482
|
+
const bytes = ipToBytes(normalized);
|
|
3483
|
+
if (!bytes || prefix > bytes.length * 8) {
|
|
3484
|
+
return null;
|
|
3485
|
+
}
|
|
3486
|
+
return {
|
|
3487
|
+
bytes,
|
|
3488
|
+
prefix
|
|
3489
|
+
};
|
|
3490
|
+
};
|
|
3491
|
+
const isInSubnet = (addressBytes, networkBytes, prefix) => {
|
|
3492
|
+
const fullBytes = prefix >> 3;
|
|
3493
|
+
for (let i = 0; i < fullBytes; i++) {
|
|
3494
|
+
if (addressBytes[i] !== networkBytes[i]) {
|
|
3495
|
+
return false;
|
|
3496
|
+
}
|
|
3497
|
+
}
|
|
3498
|
+
const remainingBits = prefix & 7;
|
|
3499
|
+
if (remainingBits) {
|
|
3500
|
+
const mask = 0xff << 8 - remainingBits & 0xff;
|
|
3501
|
+
if ((addressBytes[fullBytes] & mask) !== (networkBytes[fullBytes] & mask)) {
|
|
3502
|
+
return false;
|
|
3503
|
+
}
|
|
3504
|
+
}
|
|
3505
|
+
return true;
|
|
3506
|
+
};
|
|
3194
3507
|
function shouldBypassProxy(location) {
|
|
3195
3508
|
let parsed;
|
|
3196
3509
|
try {
|
|
@@ -3207,6 +3520,7 @@ function shouldBypassProxy(location) {
|
|
|
3207
3520
|
}
|
|
3208
3521
|
const port = Number.parseInt(parsed.port, 10) || DEFAULT_PORTS[parsed.protocol.split(':', 1)[0]] || 0;
|
|
3209
3522
|
const hostname = normalizeNoProxyHost(parsed.hostname.toLowerCase());
|
|
3523
|
+
const hostnameBytes = ipToBytes(hostname);
|
|
3210
3524
|
return noProxy.split(/[\s,]+/).some(entry => {
|
|
3211
3525
|
if (!entry) {
|
|
3212
3526
|
return false;
|
|
@@ -3214,6 +3528,10 @@ function shouldBypassProxy(location) {
|
|
|
3214
3528
|
if (entry === '*') {
|
|
3215
3529
|
return true;
|
|
3216
3530
|
}
|
|
3531
|
+
const cidr = parseCidrEntry(entry);
|
|
3532
|
+
if (cidr !== undefined) {
|
|
3533
|
+
return cidr !== null && !!hostnameBytes && hostnameBytes.length === cidr.bytes.length && isInSubnet(hostnameBytes, cidr.bytes, cidr.prefix);
|
|
3534
|
+
}
|
|
3217
3535
|
let [entryHost, entryPort] = parseNoProxyEntry(entry);
|
|
3218
3536
|
entryHost = normalizeNoProxyHost(entryHost);
|
|
3219
3537
|
if (!entryHost) {
|
|
@@ -3276,7 +3594,7 @@ function speedometer(samplesCount, min) {
|
|
|
3276
3594
|
* Throttle decorator
|
|
3277
3595
|
* @param {Function} fn
|
|
3278
3596
|
* @param {Number} freq
|
|
3279
|
-
* @return {Function}
|
|
3597
|
+
* @return {Array<Function>}
|
|
3280
3598
|
*/
|
|
3281
3599
|
function throttle(fn, freq) {
|
|
3282
3600
|
let timestamp = 0;
|
|
@@ -3308,14 +3626,15 @@ function throttle(fn, freq) {
|
|
|
3308
3626
|
}
|
|
3309
3627
|
};
|
|
3310
3628
|
const flush = () => lastArgs && invoke(lastArgs);
|
|
3311
|
-
|
|
3629
|
+
const flushWith = (...args) => invoke(args);
|
|
3630
|
+
return [throttled, flush, flushWith];
|
|
3312
3631
|
}
|
|
3313
3632
|
|
|
3314
3633
|
const progressEventReducer = (listener, isDownloadStream, freq = 3) => {
|
|
3315
3634
|
let bytesNotified = 0;
|
|
3316
3635
|
const _speedometer = speedometer(50, 250);
|
|
3317
3636
|
return throttle(e => {
|
|
3318
|
-
if (!e ||
|
|
3637
|
+
if (!e || !utils$1.isNumber(e.loaded)) {
|
|
3319
3638
|
return;
|
|
3320
3639
|
}
|
|
3321
3640
|
const rawLoaded = e.loaded;
|
|
@@ -3515,6 +3834,15 @@ const isHttps = /https:?/;
|
|
|
3515
3834
|
const kAxiosSocketListener = Symbol('axios.http.socketListener');
|
|
3516
3835
|
const kAxiosCurrentReq = Symbol('axios.http.currentReq');
|
|
3517
3836
|
|
|
3837
|
+
// A shared listener avoids retaining an adapter context for the lifetime of a
|
|
3838
|
+
// pooled socket. EventEmitter invokes listeners with `this` set to the emitter.
|
|
3839
|
+
function handleSocketError(err) {
|
|
3840
|
+
const current = this[kAxiosCurrentReq];
|
|
3841
|
+
if (current && !current.destroyed) {
|
|
3842
|
+
current.destroy(err);
|
|
3843
|
+
}
|
|
3844
|
+
}
|
|
3845
|
+
|
|
3518
3846
|
// Tags HttpsProxyAgent instances installed by setProxy() so the redirect path
|
|
3519
3847
|
// can strip them without clobbering a user-supplied agent that happens to be
|
|
3520
3848
|
// an HttpsProxyAgent.
|
|
@@ -3660,13 +3988,14 @@ function isSameOriginRedirect(redirectOptions, requestDetails) {
|
|
|
3660
3988
|
* @param {http.ClientRequestArgs} options
|
|
3661
3989
|
* @param {AxiosProxyConfig} configProxy configuration from Axios options object
|
|
3662
3990
|
* @param {string} location
|
|
3991
|
+
* @param {boolean} [allowEnvProxy=true] whether environment proxy configuration can be used
|
|
3663
3992
|
*
|
|
3664
|
-
* @returns {
|
|
3993
|
+
* @returns {boolean} whether a proxy applies to the selected transport
|
|
3665
3994
|
*/
|
|
3666
|
-
function setProxy(options, configProxy, location, isRedirect, configHttpsAgent, configHttpAgent) {
|
|
3995
|
+
function setProxy(options, configProxy, location, isRedirect, configHttpsAgent, configHttpAgent, allowEnvProxy = true) {
|
|
3667
3996
|
let proxy = configProxy;
|
|
3668
3997
|
const proxyEnvAgent = getProxyEnvAgent(options, configHttpAgent, configHttpsAgent);
|
|
3669
|
-
if (!proxy && proxy !== false && !isNodeEnvProxyEnabled(proxyEnvAgent)) {
|
|
3998
|
+
if (!proxy && proxy !== false && allowEnvProxy && !isNodeEnvProxyEnabled(proxyEnvAgent)) {
|
|
3670
3999
|
const proxyUrl = getProxyForUrl(location);
|
|
3671
4000
|
if (proxyUrl) {
|
|
3672
4001
|
if (!shouldBypassProxy(location)) {
|
|
@@ -3801,8 +4130,9 @@ function setProxy(options, configProxy, location, isRedirect, configHttpsAgent,
|
|
|
3801
4130
|
options.beforeRedirects.proxy = function beforeRedirect(redirectOptions) {
|
|
3802
4131
|
// Configure proxy for redirected request, passing the original config proxy to apply
|
|
3803
4132
|
// the exact same logic as if the redirected request was performed by axios directly.
|
|
3804
|
-
setProxy(redirectOptions, configProxy, redirectOptions.href, true, configHttpsAgent, configHttpAgent);
|
|
4133
|
+
setProxy(redirectOptions, configProxy, redirectOptions.href, true, configHttpsAgent, configHttpAgent, allowEnvProxy);
|
|
3805
4134
|
};
|
|
4135
|
+
return Boolean(proxy || configProxy !== false && allowEnvProxy && isNodeEnvProxyEnabled(proxyEnvAgent));
|
|
3806
4136
|
}
|
|
3807
4137
|
const isHttpAdapterSupported = typeof process !== 'undefined' && utils$1.kindOf(process) === 'process';
|
|
3808
4138
|
|
|
@@ -3833,7 +4163,7 @@ const resolveFamily = ({
|
|
|
3833
4163
|
family
|
|
3834
4164
|
}) => {
|
|
3835
4165
|
if (!utils$1.isString(address)) {
|
|
3836
|
-
throw
|
|
4166
|
+
throw new AxiosError('address must be a string', AxiosError.ERR_BAD_OPTION_VALUE);
|
|
3837
4167
|
}
|
|
3838
4168
|
return {
|
|
3839
4169
|
address,
|
|
@@ -3844,6 +4174,32 @@ const buildAddressEntry = (address, family) => resolveFamily(utils$1.isObject(ad
|
|
|
3844
4174
|
address,
|
|
3845
4175
|
family
|
|
3846
4176
|
});
|
|
4177
|
+
const normalizedLookupCache = new WeakMap();
|
|
4178
|
+
const normalizeLookup = lookup => {
|
|
4179
|
+
let normalized = normalizedLookupCache.get(lookup);
|
|
4180
|
+
if (normalized) {
|
|
4181
|
+
return normalized;
|
|
4182
|
+
}
|
|
4183
|
+
const callbackLookup = callbackify(lookup, value => utils$1.isArray(value) ? value : [value]);
|
|
4184
|
+
|
|
4185
|
+
// Support opt.all, which is required by current Node.js releases.
|
|
4186
|
+
normalized = (hostname, opt, cb) => {
|
|
4187
|
+
callbackLookup(hostname, opt, (err, arg0, arg1) => {
|
|
4188
|
+
if (err) {
|
|
4189
|
+
return cb(err);
|
|
4190
|
+
}
|
|
4191
|
+
let addresses;
|
|
4192
|
+
try {
|
|
4193
|
+
addresses = utils$1.isArray(arg0) ? arg0.map(addr => buildAddressEntry(addr)) : [buildAddressEntry(arg0, arg1)];
|
|
4194
|
+
} catch (error) {
|
|
4195
|
+
return cb(error);
|
|
4196
|
+
}
|
|
4197
|
+
opt.all ? cb(err, addresses) : cb(err, addresses[0].address, addresses[0].family);
|
|
4198
|
+
});
|
|
4199
|
+
};
|
|
4200
|
+
normalizedLookupCache.set(lookup, normalized);
|
|
4201
|
+
return normalized;
|
|
4202
|
+
};
|
|
3847
4203
|
const http2Transport = {
|
|
3848
4204
|
request(options, cb) {
|
|
3849
4205
|
const authority = options.protocol + '//' + options.hostname + ':' + (options.port || (options.protocol === 'https:' ? 443 : 80));
|
|
@@ -3896,6 +4252,7 @@ var httpAdapter = isHttpAdapterSupported && function httpAdapter(config) {
|
|
|
3896
4252
|
let family = own('family');
|
|
3897
4253
|
let httpVersion = own('httpVersion');
|
|
3898
4254
|
if (httpVersion === undefined) httpVersion = 1;
|
|
4255
|
+
const rawHttpVersion = httpVersion;
|
|
3899
4256
|
let http2Options = own('http2Options');
|
|
3900
4257
|
const httpAgent = own('httpAgent');
|
|
3901
4258
|
const httpsAgent = own('httpsAgent');
|
|
@@ -3912,26 +4269,20 @@ var httpAdapter = isHttpAdapterSupported && function httpAdapter(config) {
|
|
|
3912
4269
|
let rejected = false;
|
|
3913
4270
|
let req;
|
|
3914
4271
|
let connectPhaseTimer;
|
|
3915
|
-
|
|
4272
|
+
try {
|
|
4273
|
+
httpVersion = +httpVersion;
|
|
4274
|
+
} catch (err) {
|
|
4275
|
+
throw new AxiosError('Invalid protocol version: value is not a number', AxiosError.ERR_BAD_OPTION_VALUE, config);
|
|
4276
|
+
}
|
|
3916
4277
|
if (Number.isNaN(httpVersion)) {
|
|
3917
|
-
throw
|
|
4278
|
+
throw new AxiosError(`Invalid protocol version: '${rawHttpVersion}' is not a number`, AxiosError.ERR_BAD_OPTION_VALUE, config);
|
|
3918
4279
|
}
|
|
3919
4280
|
if (httpVersion !== 1 && httpVersion !== 2) {
|
|
3920
|
-
throw
|
|
4281
|
+
throw new AxiosError(`Unsupported protocol version '${httpVersion}'`, AxiosError.ERR_BAD_OPTION_VALUE, config);
|
|
3921
4282
|
}
|
|
3922
4283
|
const isHttp2 = httpVersion === 2;
|
|
3923
4284
|
if (lookup) {
|
|
3924
|
-
|
|
3925
|
-
// hotfix to support opt.all option which is required for node 20.x
|
|
3926
|
-
lookup = (hostname, opt, cb) => {
|
|
3927
|
-
_lookup(hostname, opt, (err, arg0, arg1) => {
|
|
3928
|
-
if (err) {
|
|
3929
|
-
return cb(err);
|
|
3930
|
-
}
|
|
3931
|
-
const addresses = utils$1.isArray(arg0) ? arg0.map(addr => buildAddressEntry(addr)) : [buildAddressEntry(arg0, arg1)];
|
|
3932
|
-
opt.all ? cb(err, addresses) : cb(err, addresses[0].address, addresses[0].family);
|
|
3933
|
-
});
|
|
3934
|
-
};
|
|
4285
|
+
lookup = normalizeLookup(lookup);
|
|
3935
4286
|
}
|
|
3936
4287
|
const abortEmitter = new events.EventEmitter();
|
|
3937
4288
|
function abort(reason) {
|
|
@@ -4144,6 +4495,11 @@ var httpAdapter = isHttpAdapterSupported && function httpAdapter(config) {
|
|
|
4144
4495
|
}));
|
|
4145
4496
|
}
|
|
4146
4497
|
headers.set('Accept-Encoding', utils$1.hasOwnProp(transitional, 'advertiseZstdAcceptEncoding') && transitional.advertiseZstdAcceptEncoding === true ? ACCEPT_ENCODING_WITH_ZSTD : ACCEPT_ENCODING, false);
|
|
4498
|
+
if (isHttp2 && lookup) {
|
|
4499
|
+
http2Options = Object.assign(Object.create(null), http2Options, {
|
|
4500
|
+
lookup
|
|
4501
|
+
});
|
|
4502
|
+
}
|
|
4147
4503
|
|
|
4148
4504
|
// Null-prototype to block prototype pollution gadgets on properties read
|
|
4149
4505
|
// directly by Node's http.request (e.g. insecureHTTPParser, lookup).
|
|
@@ -4160,11 +4516,13 @@ var httpAdapter = isHttpAdapterSupported && function httpAdapter(config) {
|
|
|
4160
4516
|
family,
|
|
4161
4517
|
beforeRedirect: dispatchBeforeRedirect,
|
|
4162
4518
|
beforeRedirects: Object.create(null),
|
|
4163
|
-
http2Options
|
|
4519
|
+
http2Options,
|
|
4520
|
+
createConnection: undefined
|
|
4164
4521
|
});
|
|
4165
4522
|
|
|
4166
4523
|
// cacheable-lookup integration hotfix
|
|
4167
4524
|
!utils$1.isUndefined(lookup) && (options.lookup = lookup);
|
|
4525
|
+
let proxyApplied = false;
|
|
4168
4526
|
if (socketPath) {
|
|
4169
4527
|
if (typeof socketPath !== 'string') {
|
|
4170
4528
|
return reject(new AxiosError('socketPath must be a string', AxiosError.ERR_BAD_OPTION_VALUE, config));
|
|
@@ -4182,7 +4540,11 @@ var httpAdapter = isHttpAdapterSupported && function httpAdapter(config) {
|
|
|
4182
4540
|
} else {
|
|
4183
4541
|
options.hostname = parsed.hostname.startsWith('[') ? parsed.hostname.slice(1, -1) : parsed.hostname;
|
|
4184
4542
|
options.port = parsed.port;
|
|
4185
|
-
setProxy(options, configProxy, protocol + '//' + parsed.hostname + (parsed.port ? ':' + parsed.port : '') + options.path, false, httpsAgent, httpAgent
|
|
4543
|
+
proxyApplied = setProxy(options, configProxy, protocol + '//' + parsed.hostname + (parsed.port ? ':' + parsed.port : '') + options.path, false, httpsAgent, httpAgent,
|
|
4544
|
+
// The HTTP/2 transport connects independently of HTTP/1 agents, so it
|
|
4545
|
+
// cannot apply either axios-resolved or agent-local environment proxies.
|
|
4546
|
+
// Explicit proxy config is still processed and rejected below.
|
|
4547
|
+
!isHttp2);
|
|
4186
4548
|
}
|
|
4187
4549
|
let transport;
|
|
4188
4550
|
let isNativeTransport = false;
|
|
@@ -4198,6 +4560,9 @@ var httpAdapter = isHttpAdapterSupported && function httpAdapter(config) {
|
|
|
4198
4560
|
options.agent = isHttpsRequest ? httpsAgent : httpAgent;
|
|
4199
4561
|
}
|
|
4200
4562
|
if (isHttp2) {
|
|
4563
|
+
if (proxyApplied) {
|
|
4564
|
+
return reject(new AxiosError('HTTP/2 requests with a proxy are not supported', AxiosError.ERR_NOT_SUPPORT, config));
|
|
4565
|
+
}
|
|
4201
4566
|
transport = http2Transport;
|
|
4202
4567
|
} else {
|
|
4203
4568
|
const configTransport = own('transport');
|
|
@@ -4445,18 +4810,10 @@ var httpAdapter = isHttpAdapterSupported && function httpAdapter(config) {
|
|
|
4445
4810
|
socket.setKeepAlive(true, 1000 * 60);
|
|
4446
4811
|
}
|
|
4447
4812
|
|
|
4448
|
-
// Install
|
|
4449
|
-
//
|
|
4450
|
-
// to new requests before the previous request's 'close' fires (issue #10780).
|
|
4451
|
-
// The listener is bound to the socket's currently-active request via a
|
|
4452
|
-
// symbol, which is swapped as the socket is reassigned.
|
|
4813
|
+
// Install one shared 'error' listener per socket. The symbol follows the
|
|
4814
|
+
// currently-active request as pooled sockets are reassigned (issue #10780).
|
|
4453
4815
|
if (!socket[kAxiosSocketListener]) {
|
|
4454
|
-
socket.on('error',
|
|
4455
|
-
const current = socket[kAxiosCurrentReq];
|
|
4456
|
-
if (current && !current.destroyed) {
|
|
4457
|
-
current.destroy(err);
|
|
4458
|
-
}
|
|
4459
|
-
});
|
|
4816
|
+
socket.on('error', handleSocketError);
|
|
4460
4817
|
socket[kAxiosSocketListener] = true;
|
|
4461
4818
|
}
|
|
4462
4819
|
socket[kAxiosCurrentReq] = req;
|
|
@@ -4718,7 +5075,7 @@ function mergeConfig(config1, config2) {
|
|
|
4718
5075
|
transformResponse: defaultToConfig2,
|
|
4719
5076
|
paramsSerializer: defaultToConfig2,
|
|
4720
5077
|
timeout: defaultToConfig2,
|
|
4721
|
-
|
|
5078
|
+
timeoutErrorMessage: defaultToConfig2,
|
|
4722
5079
|
withCredentials: defaultToConfig2,
|
|
4723
5080
|
withXSRFToken: defaultToConfig2,
|
|
4724
5081
|
adapter: defaultToConfig2,
|
|
@@ -4800,11 +5157,12 @@ function resolveConfig(config) {
|
|
|
4800
5157
|
}
|
|
4801
5158
|
}
|
|
4802
5159
|
if (utils$1.isFormData(data)) {
|
|
5160
|
+
const getHeaders = utils$1.getSafeProp(data, 'getHeaders');
|
|
4803
5161
|
if (platform.hasStandardBrowserEnv || platform.hasStandardBrowserWebWorkerEnv || utils$1.isReactNative(data)) {
|
|
4804
5162
|
headers.setContentType(undefined); // browser/web worker/RN handles it
|
|
4805
|
-
} else if (utils$1.isFunction(
|
|
5163
|
+
} else if (utils$1.isFunction(getHeaders)) {
|
|
4806
5164
|
// Node.js FormData (like form-data package)
|
|
4807
|
-
setFormDataHeaders(headers,
|
|
5165
|
+
setFormDataHeaders(headers, getHeaders.call(data), own('formDataHeaderPolicy'));
|
|
4808
5166
|
}
|
|
4809
5167
|
}
|
|
4810
5168
|
|
|
@@ -4844,7 +5202,7 @@ var xhrAdapter = isXHRAdapterSupported && function (config) {
|
|
|
4844
5202
|
} = _config;
|
|
4845
5203
|
let onCanceled;
|
|
4846
5204
|
let uploadThrottled, downloadThrottled;
|
|
4847
|
-
let flushUpload, flushDownload;
|
|
5205
|
+
let flushUpload, flushDownload, flushDownloadWithEvent;
|
|
4848
5206
|
function done() {
|
|
4849
5207
|
flushUpload && flushUpload(); // flush events
|
|
4850
5208
|
flushDownload && flushDownload(); // flush events
|
|
@@ -4857,10 +5215,50 @@ var xhrAdapter = isXHRAdapterSupported && function (config) {
|
|
|
4857
5215
|
|
|
4858
5216
|
// Set the request timeout in MS
|
|
4859
5217
|
request.timeout = _config.timeout;
|
|
4860
|
-
function onloadend() {
|
|
5218
|
+
function onloadend(event) {
|
|
5219
|
+
if (!request) {
|
|
5220
|
+
return;
|
|
5221
|
+
}
|
|
5222
|
+
|
|
5223
|
+
// Status 0 means no response was received, which onerror and onabort normally
|
|
5224
|
+
// reject before this runs. Firefox 152 fires only readystatechange and loadend for
|
|
5225
|
+
// navigation-canceled requests (https://bugzilla.mozilla.org/show_bug.cgi?id=1505389),
|
|
5226
|
+
// leaving settle() to resolve them as an empty success. ECONNABORTED is the error
|
|
5227
|
+
// onabort raised on Firefox 151. Reads over file:, which some environments report as
|
|
5228
|
+
// status 0 on success, are excluded by the request URL's scheme after browser-style
|
|
5229
|
+
// preprocessing, by the page origin's scheme for relative URLs (which inherit it), or
|
|
5230
|
+
// by responseURL where implemented.
|
|
5231
|
+
if (request.status === 0 && (parseProtocol(normalizeURLForProtocolCheck(_config.url)) || parseProtocol(platform.origin)) !== 'file' && !(request.responseURL && request.responseURL.startsWith('file:'))) {
|
|
5232
|
+
reject(new AxiosError('Request aborted', AxiosError.ECONNABORTED, config, request));
|
|
5233
|
+
done();
|
|
5234
|
+
|
|
5235
|
+
// Clean up request
|
|
5236
|
+
request = null;
|
|
5237
|
+
return;
|
|
5238
|
+
}
|
|
5239
|
+
|
|
5240
|
+
// When loadend is still dispatching, flushing with it gives progress
|
|
5241
|
+
// listeners a final delivery whose event has a live target. The legacy
|
|
5242
|
+
// ready-state fallback has no event, so replay its pending progress.
|
|
5243
|
+
// A throwing listener must not block settlement; rethrow asynchronously,
|
|
5244
|
+
// matching how listener errors surface on the throttle timer path.
|
|
5245
|
+
try {
|
|
5246
|
+
if (event) {
|
|
5247
|
+
flushDownloadWithEvent && flushDownloadWithEvent(event);
|
|
5248
|
+
} else {
|
|
5249
|
+
flushDownload && flushDownload();
|
|
5250
|
+
}
|
|
5251
|
+
} catch (err) {
|
|
5252
|
+
setTimeout(() => {
|
|
5253
|
+
throw err;
|
|
5254
|
+
});
|
|
5255
|
+
}
|
|
5256
|
+
|
|
5257
|
+
// A final progress callback can cancel the request synchronously.
|
|
4861
5258
|
if (!request) {
|
|
4862
5259
|
return;
|
|
4863
5260
|
}
|
|
5261
|
+
|
|
4864
5262
|
// Prepare the response
|
|
4865
5263
|
const responseHeaders = AxiosHeaders.from('getAllResponseHeaders' in request && request.getAllResponseHeaders());
|
|
4866
5264
|
const responseData = !responseType || responseType === 'text' || responseType === 'json' ? request.responseText : request.response;
|
|
@@ -4968,7 +5366,7 @@ var xhrAdapter = isXHRAdapterSupported && function (config) {
|
|
|
4968
5366
|
|
|
4969
5367
|
// Handle progress if needed
|
|
4970
5368
|
if (onDownloadProgress) {
|
|
4971
|
-
[downloadThrottled, flushDownload] = progressEventReducer(onDownloadProgress, true);
|
|
5369
|
+
[downloadThrottled, flushDownload, flushDownloadWithEvent] = progressEventReducer(onDownloadProgress, true);
|
|
4972
5370
|
request.addEventListener('progress', downloadThrottled);
|
|
4973
5371
|
}
|
|
4974
5372
|
|
|
@@ -5139,6 +5537,17 @@ const trackStream = (stream, chunkSize, onProgress, onFinish) => {
|
|
|
5139
5537
|
};
|
|
5140
5538
|
|
|
5141
5539
|
const DEFAULT_CHUNK_SIZE = 64 * 1024;
|
|
5540
|
+
const DEFAULT_REQUEST_OPTIONS = {
|
|
5541
|
+
cache: 'default',
|
|
5542
|
+
redirect: 'follow',
|
|
5543
|
+
referrer: 'about:client',
|
|
5544
|
+
referrerPolicy: '',
|
|
5545
|
+
mode: 'cors',
|
|
5546
|
+
integrity: '',
|
|
5547
|
+
keepalive: false,
|
|
5548
|
+
priority: 'auto',
|
|
5549
|
+
window: null
|
|
5550
|
+
};
|
|
5142
5551
|
const {
|
|
5143
5552
|
isFunction
|
|
5144
5553
|
} = utils$1;
|
|
@@ -5281,7 +5690,8 @@ const factory = env => {
|
|
|
5281
5690
|
withCredentials = 'same-origin',
|
|
5282
5691
|
fetchOptions,
|
|
5283
5692
|
maxContentLength,
|
|
5284
|
-
maxBodyLength
|
|
5693
|
+
maxBodyLength,
|
|
5694
|
+
maxRedirects
|
|
5285
5695
|
} = resolveConfig(config);
|
|
5286
5696
|
const hasMaxContentLength = utils$1.isNumber(maxContentLength) && maxContentLength > -1;
|
|
5287
5697
|
const hasMaxBodyLength = utils$1.isNumber(maxBodyLength) && maxBodyLength > -1;
|
|
@@ -5412,17 +5822,46 @@ const factory = env => {
|
|
|
5412
5822
|
|
|
5413
5823
|
// Set User-Agent header if not already set (fetch defaults to 'node' in Node.js)
|
|
5414
5824
|
headers.set('User-Agent', 'axios/' + VERSION, false);
|
|
5415
|
-
const
|
|
5416
|
-
|
|
5825
|
+
const safeFetchOptions = fetchOptions == null ? fetchOptions : Object.assign(Object.create(null), fetchOptions);
|
|
5826
|
+
if (safeFetchOptions) {
|
|
5827
|
+
// These options are owned by Axios and are already reflected in the
|
|
5828
|
+
// resolved Request passed to fetch.
|
|
5829
|
+
delete safeFetchOptions.body;
|
|
5830
|
+
delete safeFetchOptions.headers;
|
|
5831
|
+
delete safeFetchOptions.method;
|
|
5832
|
+
delete safeFetchOptions.signal;
|
|
5833
|
+
delete safeFetchOptions.duplex;
|
|
5834
|
+
delete safeFetchOptions.credentials;
|
|
5835
|
+
}
|
|
5836
|
+
const resolvedOptions = Object.assign(Object.create(null), safeFetchOptions, {
|
|
5417
5837
|
signal: composedSignal,
|
|
5418
5838
|
method: method.toUpperCase(),
|
|
5419
5839
|
headers: toByteStringHeaderObject(headers.normalize()),
|
|
5420
5840
|
body: data,
|
|
5421
5841
|
duplex: 'half',
|
|
5422
5842
|
credentials: isCredentialsSupported ? withCredentials : undefined
|
|
5423
|
-
};
|
|
5843
|
+
});
|
|
5844
|
+
if (isRequestSupported) {
|
|
5845
|
+
utils$1.forEach(DEFAULT_REQUEST_OPTIONS, (value, key) => {
|
|
5846
|
+
if (resolvedOptions[key] === undefined) {
|
|
5847
|
+
resolvedOptions[key] = value;
|
|
5848
|
+
}
|
|
5849
|
+
});
|
|
5850
|
+
if (resolvedOptions.signal === undefined) {
|
|
5851
|
+
resolvedOptions.signal = null;
|
|
5852
|
+
}
|
|
5853
|
+
if (resolvedOptions.body === undefined) {
|
|
5854
|
+
resolvedOptions.body = null;
|
|
5855
|
+
}
|
|
5856
|
+
}
|
|
5857
|
+
if (maxRedirects === 0) {
|
|
5858
|
+
resolvedOptions.redirect = 'manual';
|
|
5859
|
+
if (safeFetchOptions) {
|
|
5860
|
+
safeFetchOptions.redirect = 'manual';
|
|
5861
|
+
}
|
|
5862
|
+
}
|
|
5424
5863
|
request = isRequestSupported && new Request(url, resolvedOptions);
|
|
5425
|
-
let response = await (isRequestSupported ? _fetch(request,
|
|
5864
|
+
let response = await (isRequestSupported ? _fetch(request, safeFetchOptions) : _fetch(url, resolvedOptions));
|
|
5426
5865
|
const responseHeaders = AxiosHeaders.from(response.headers);
|
|
5427
5866
|
|
|
5428
5867
|
// Cheap pre-check: if the server honestly declares a content-length that
|
|
@@ -5702,9 +6141,13 @@ function throwIfCancellationRequested(config) {
|
|
|
5702
6141
|
*
|
|
5703
6142
|
* @returns {Promise} The Promise to be fulfilled
|
|
5704
6143
|
*/
|
|
5705
|
-
function dispatchRequest(
|
|
6144
|
+
function dispatchRequest(_config) {
|
|
6145
|
+
// Interceptors may replace the merged config with an ordinary object. Flatten
|
|
6146
|
+
// it at the dispatch boundary so shared prototype members cannot become
|
|
6147
|
+
// request behavior, while preserving intentional template/class members.
|
|
6148
|
+
const config = utils$1.toSafeFlatObject(_config);
|
|
5706
6149
|
throwIfCancellationRequested(config);
|
|
5707
|
-
config.headers = AxiosHeaders.from(config
|
|
6150
|
+
config.headers = AxiosHeaders.from(utils$1.getSafeProp(config, 'headers'));
|
|
5708
6151
|
|
|
5709
6152
|
// Transform request data
|
|
5710
6153
|
config.data = transformData.call(config, config.transformRequest);
|
|
@@ -5860,18 +6303,17 @@ class Axios {
|
|
|
5860
6303
|
return await this._request(configOrUrl, config);
|
|
5861
6304
|
} catch (err) {
|
|
5862
6305
|
if (err instanceof Error) {
|
|
5863
|
-
let dummy = {};
|
|
5864
|
-
Error.captureStackTrace ? Error.captureStackTrace(dummy) : dummy = new Error();
|
|
5865
|
-
|
|
5866
|
-
// slice off the Error: ... line
|
|
5867
|
-
const stack = (() => {
|
|
5868
|
-
if (!dummy.stack) {
|
|
5869
|
-
return '';
|
|
5870
|
-
}
|
|
5871
|
-
const firstNewlineIndex = dummy.stack.indexOf('\n');
|
|
5872
|
-
return firstNewlineIndex === -1 ? '' : dummy.stack.slice(firstNewlineIndex + 1);
|
|
5873
|
-
})();
|
|
5874
6306
|
try {
|
|
6307
|
+
let dummy = {};
|
|
6308
|
+
Error.captureStackTrace ? Error.captureStackTrace(dummy) : dummy = new Error();
|
|
6309
|
+
const dummyStack = dummy.stack;
|
|
6310
|
+
let stack = '';
|
|
6311
|
+
|
|
6312
|
+
// slice off the Error: ... line
|
|
6313
|
+
if (typeof dummyStack === 'string') {
|
|
6314
|
+
const firstNewlineIndex = dummyStack.indexOf('\n');
|
|
6315
|
+
stack = firstNewlineIndex === -1 ? '' : dummyStack.slice(firstNewlineIndex + 1);
|
|
6316
|
+
}
|
|
5875
6317
|
if (!err.stack) {
|
|
5876
6318
|
err.stack = stack;
|
|
5877
6319
|
// match without the 2 top stack lines
|
|
@@ -5884,7 +6326,7 @@ class Axios {
|
|
|
5884
6326
|
}
|
|
5885
6327
|
}
|
|
5886
6328
|
} catch (e) {
|
|
5887
|
-
//
|
|
6329
|
+
// Ignore failures from custom stack hooks or un-writable stack properties.
|
|
5888
6330
|
}
|
|
5889
6331
|
}
|
|
5890
6332
|
throw err;
|
|
@@ -5940,11 +6382,11 @@ class Axios {
|
|
|
5940
6382
|
}, true);
|
|
5941
6383
|
|
|
5942
6384
|
// Set config.method
|
|
5943
|
-
config.method = (config
|
|
6385
|
+
config.method = (utils$1.getSafeProp(config, 'method') || utils$1.getSafeProp(this.defaults, 'method') || 'get').toLowerCase();
|
|
5944
6386
|
|
|
5945
6387
|
// Flatten headers
|
|
5946
6388
|
let contextHeaders = headers && utils$1.merge(headers.common, headers[config.method]);
|
|
5947
|
-
headers && utils$1.forEach(
|
|
6389
|
+
headers && utils$1.forEach(methodList.concat('common'), method => {
|
|
5948
6390
|
delete headers[method];
|
|
5949
6391
|
});
|
|
5950
6392
|
config.headers = AxiosHeaders.concat(contextHeaders, headers);
|
|
@@ -6250,14 +6692,22 @@ const HttpStatusCode = {
|
|
|
6250
6692
|
Gone: 410,
|
|
6251
6693
|
LengthRequired: 411,
|
|
6252
6694
|
PreconditionFailed: 412,
|
|
6695
|
+
/**
|
|
6696
|
+
* @deprecated Use `ContentTooLarge` instead.
|
|
6697
|
+
*/
|
|
6253
6698
|
PayloadTooLarge: 413,
|
|
6699
|
+
ContentTooLarge: 413,
|
|
6254
6700
|
UriTooLong: 414,
|
|
6255
6701
|
UnsupportedMediaType: 415,
|
|
6256
6702
|
RangeNotSatisfiable: 416,
|
|
6257
6703
|
ExpectationFailed: 417,
|
|
6258
6704
|
ImATeapot: 418,
|
|
6259
6705
|
MisdirectedRequest: 421,
|
|
6706
|
+
/**
|
|
6707
|
+
* @deprecated Use `UnprocessableContent` instead.
|
|
6708
|
+
*/
|
|
6260
6709
|
UnprocessableEntity: 422,
|
|
6710
|
+
UnprocessableContent: 422,
|
|
6261
6711
|
Locked: 423,
|
|
6262
6712
|
FailedDependency: 424,
|
|
6263
6713
|
TooEarly: 425,
|
|
@@ -6286,7 +6736,9 @@ const HttpStatusCode = {
|
|
|
6286
6736
|
InvalidSslCertificate: 526
|
|
6287
6737
|
};
|
|
6288
6738
|
Object.entries(HttpStatusCode).forEach(([key, value]) => {
|
|
6289
|
-
HttpStatusCode[value]
|
|
6739
|
+
if (HttpStatusCode[value] === undefined) {
|
|
6740
|
+
HttpStatusCode[value] = key;
|
|
6741
|
+
}
|
|
6290
6742
|
});
|
|
6291
6743
|
|
|
6292
6744
|
/**
|