@wopee-io/wopee.pw 4.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (335) hide show
  1. package/.commit.hbs +71 -0
  2. package/.commitlintrc.json +3 -0
  3. package/.eslintignore +2 -0
  4. package/.eslintrc +21 -0
  5. package/.github/actions/npm_clean_install/action.yaml +35 -0
  6. package/.github/workflows/ci_cd.yaml +146 -0
  7. package/.prettierignore +3 -0
  8. package/.prettierrc +12 -0
  9. package/README.md +3 -0
  10. package/build/core/domain/configuration/config.interface.d.ts +7 -0
  11. package/build/core/domain/configuration/config.interface.js +3 -0
  12. package/build/core/domain/configuration/config.interface.js.map +1 -0
  13. package/build/core/domain/configuration/index.d.ts +2 -0
  14. package/build/core/domain/configuration/index.js +3 -0
  15. package/build/core/domain/configuration/index.js.map +1 -0
  16. package/build/core/domain/index.d.ts +2 -0
  17. package/build/core/domain/index.js +19 -0
  18. package/build/core/domain/index.js.map +1 -0
  19. package/build/core/domain/valueObjects/index.d.ts +2 -0
  20. package/build/core/domain/valueObjects/index.js +3 -0
  21. package/build/core/domain/valueObjects/index.js.map +1 -0
  22. package/build/core/domain/valueObjects/track.interface.d.ts +13 -0
  23. package/build/core/domain/valueObjects/track.interface.js +3 -0
  24. package/build/core/domain/valueObjects/track.interface.js.map +1 -0
  25. package/build/core/index.d.ts +3 -0
  26. package/build/core/index.js +20 -0
  27. package/build/core/index.js.map +1 -0
  28. package/build/core/ports/configPort/configDefaults.d.ts +2 -0
  29. package/build/core/ports/configPort/configDefaults.js +20 -0
  30. package/build/core/ports/configPort/configDefaults.js.map +1 -0
  31. package/build/core/ports/configPort/configPort.d.ts +6 -0
  32. package/build/core/ports/configPort/configPort.js +12 -0
  33. package/build/core/ports/configPort/configPort.js.map +1 -0
  34. package/build/core/ports/configPort/index.d.ts +2 -0
  35. package/build/core/ports/configPort/index.js +6 -0
  36. package/build/core/ports/configPort/index.js.map +1 -0
  37. package/build/core/ports/index.d.ts +1 -0
  38. package/build/core/ports/index.js +18 -0
  39. package/build/core/ports/index.js.map +1 -0
  40. package/build/core/services/index.d.ts +1 -0
  41. package/build/core/services/index.js +18 -0
  42. package/build/core/services/index.js.map +1 -0
  43. package/build/core/services/wopeeService/index.d.ts +2 -0
  44. package/build/core/services/wopeeService/index.js +6 -0
  45. package/build/core/services/wopeeService/index.js.map +1 -0
  46. package/build/core/services/wopeeService/wopee.d.ts +19 -0
  47. package/build/core/services/wopeeService/wopee.js +163 -0
  48. package/build/core/services/wopeeService/wopee.js.map +1 -0
  49. package/build/index.d.ts +3 -0
  50. package/build/index.js +20 -0
  51. package/build/index.js.map +1 -0
  52. package/build/infrastructure/adapters/envConfigAdapter/envConfigAdapter.d.ts +6 -0
  53. package/build/infrastructure/adapters/envConfigAdapter/envConfigAdapter.js +28 -0
  54. package/build/infrastructure/adapters/envConfigAdapter/envConfigAdapter.js.map +1 -0
  55. package/build/infrastructure/adapters/envConfigAdapter/index.d.ts +2 -0
  56. package/build/infrastructure/adapters/envConfigAdapter/index.js +6 -0
  57. package/build/infrastructure/adapters/envConfigAdapter/index.js.map +1 -0
  58. package/build/infrastructure/adapters/index.d.ts +1 -0
  59. package/build/infrastructure/adapters/index.js +18 -0
  60. package/build/infrastructure/adapters/index.js.map +1 -0
  61. package/build/infrastructure/index.d.ts +1 -0
  62. package/build/infrastructure/index.js +18 -0
  63. package/build/infrastructure/index.js.map +1 -0
  64. package/build/shared/index.d.ts +1 -0
  65. package/build/shared/index.js +18 -0
  66. package/build/shared/index.js.map +1 -0
  67. package/build/shared/metadata/index.d.ts +2 -0
  68. package/build/shared/metadata/index.js +6 -0
  69. package/build/shared/metadata/index.js.map +1 -0
  70. package/build/shared/metadata/versionMetadata.d.ts +1 -0
  71. package/build/shared/metadata/versionMetadata.js +21 -0
  72. package/build/shared/metadata/versionMetadata.js.map +1 -0
  73. package/docs/configuration.md +21 -0
  74. package/docs/minimal.md +26 -0
  75. package/jest.config.ts +16 -0
  76. package/node_modules/@autonomous-testing/sdk/.commit.hbs +71 -0
  77. package/node_modules/@autonomous-testing/sdk/.commitlintrc.json +3 -0
  78. package/node_modules/@autonomous-testing/sdk/.eslintignore +2 -0
  79. package/node_modules/@autonomous-testing/sdk/.eslintrc +21 -0
  80. package/node_modules/@autonomous-testing/sdk/.github/actions/npm_clean_install/action.yaml +35 -0
  81. package/node_modules/@autonomous-testing/sdk/.github/workflows/ci_cd.yaml +149 -0
  82. package/node_modules/@autonomous-testing/sdk/.prettierignore +3 -0
  83. package/node_modules/@autonomous-testing/sdk/.prettierrc +12 -0
  84. package/node_modules/@autonomous-testing/sdk/README.md +57 -0
  85. package/node_modules/@autonomous-testing/sdk/build/core/domain/entities/createIntegrationScenarioPayload.interface.d.ts +14 -0
  86. package/node_modules/@autonomous-testing/sdk/build/core/domain/entities/createIntegrationScenarioPayload.interface.js +10 -0
  87. package/node_modules/@autonomous-testing/sdk/build/core/domain/entities/createIntegrationStepPayload.interface.d.ts +32 -0
  88. package/node_modules/@autonomous-testing/sdk/build/core/domain/entities/createIntegrationStepPayload.interface.js +16 -0
  89. package/node_modules/@autonomous-testing/sdk/build/core/domain/entities/createIntegrationSuitePayload.interface.d.ts +11 -0
  90. package/node_modules/@autonomous-testing/sdk/build/core/domain/entities/createIntegrationSuitePayload.interface.js +9 -0
  91. package/node_modules/@autonomous-testing/sdk/build/core/domain/entities/index.d.ts +14 -0
  92. package/node_modules/@autonomous-testing/sdk/build/core/domain/entities/index.js +16 -0
  93. package/node_modules/@autonomous-testing/sdk/build/core/domain/entities/integrationScenario.interface.d.ts +14 -0
  94. package/node_modules/@autonomous-testing/sdk/build/core/domain/entities/integrationScenario.interface.js +10 -0
  95. package/node_modules/@autonomous-testing/sdk/build/core/domain/entities/integrationStep.interface.d.ts +24 -0
  96. package/node_modules/@autonomous-testing/sdk/build/core/domain/entities/integrationStep.interface.js +20 -0
  97. package/node_modules/@autonomous-testing/sdk/build/core/domain/entities/integrationSuite.interface.d.ts +14 -0
  98. package/node_modules/@autonomous-testing/sdk/build/core/domain/entities/integrationSuite.interface.js +10 -0
  99. package/node_modules/@autonomous-testing/sdk/build/core/domain/index.d.ts +2 -0
  100. package/node_modules/@autonomous-testing/sdk/build/core/domain/index.js +18 -0
  101. package/node_modules/@autonomous-testing/sdk/build/core/index.d.ts +3 -0
  102. package/node_modules/@autonomous-testing/sdk/build/core/index.js +19 -0
  103. package/node_modules/@autonomous-testing/sdk/build/core/ports/api.d.ts +16 -0
  104. package/node_modules/@autonomous-testing/sdk/build/core/ports/api.js +7 -0
  105. package/node_modules/@autonomous-testing/sdk/build/core/ports/index.d.ts +4 -0
  106. package/node_modules/@autonomous-testing/sdk/build/core/ports/index.js +8 -0
  107. package/node_modules/@autonomous-testing/sdk/build/core/ports/logger.d.ts +7 -0
  108. package/node_modules/@autonomous-testing/sdk/build/core/ports/logger.js +7 -0
  109. package/node_modules/@autonomous-testing/sdk/build/index.d.ts +5 -0
  110. package/node_modules/@autonomous-testing/sdk/build/index.js +22 -0
  111. package/node_modules/@autonomous-testing/sdk/build/infrastructure/adapters/apolloAdapter/adapter.d.ts +19 -0
  112. package/node_modules/@autonomous-testing/sdk/build/infrastructure/adapters/apolloAdapter/adapter.js +123 -0
  113. package/node_modules/@autonomous-testing/sdk/build/infrastructure/adapters/apolloAdapter/factories.d.ts +9 -0
  114. package/node_modules/@autonomous-testing/sdk/build/infrastructure/adapters/apolloAdapter/factories.js +144 -0
  115. package/node_modules/@autonomous-testing/sdk/build/infrastructure/adapters/apolloAdapter/index.d.ts +4 -0
  116. package/node_modules/@autonomous-testing/sdk/build/infrastructure/adapters/apolloAdapter/index.js +8 -0
  117. package/node_modules/@autonomous-testing/sdk/build/infrastructure/adapters/apolloAdapter/interface.d.ts +235 -0
  118. package/node_modules/@autonomous-testing/sdk/build/infrastructure/adapters/apolloAdapter/interface.js +82 -0
  119. package/node_modules/@autonomous-testing/sdk/build/infrastructure/adapters/apolloAdapter/mutations.d.ts +5 -0
  120. package/node_modules/@autonomous-testing/sdk/build/infrastructure/adapters/apolloAdapter/mutations.js +85 -0
  121. package/node_modules/@autonomous-testing/sdk/build/infrastructure/adapters/consoleLogger/consoleLogger.d.ts +36 -0
  122. package/node_modules/@autonomous-testing/sdk/build/infrastructure/adapters/consoleLogger/consoleLogger.js +49 -0
  123. package/node_modules/@autonomous-testing/sdk/build/infrastructure/adapters/consoleLogger/index.d.ts +3 -0
  124. package/node_modules/@autonomous-testing/sdk/build/infrastructure/adapters/consoleLogger/index.js +6 -0
  125. package/node_modules/@autonomous-testing/sdk/build/infrastructure/adapters/index.d.ts +4 -0
  126. package/node_modules/@autonomous-testing/sdk/build/infrastructure/adapters/index.js +20 -0
  127. package/node_modules/@autonomous-testing/sdk/build/infrastructure/adapters/noLogger/index.d.ts +3 -0
  128. package/node_modules/@autonomous-testing/sdk/build/infrastructure/adapters/noLogger/index.js +6 -0
  129. package/node_modules/@autonomous-testing/sdk/build/infrastructure/adapters/noLogger/noLogger.d.ts +31 -0
  130. package/node_modules/@autonomous-testing/sdk/build/infrastructure/adapters/noLogger/noLogger.js +34 -0
  131. package/node_modules/@autonomous-testing/sdk/build/infrastructure/index.d.ts +3 -0
  132. package/node_modules/@autonomous-testing/sdk/build/infrastructure/index.js +19 -0
  133. package/node_modules/@autonomous-testing/sdk/build/infrastructure/services/apolloAdapterService/apolloAdapterService.d.ts +4 -0
  134. package/node_modules/@autonomous-testing/sdk/build/infrastructure/services/apolloAdapterService/apolloAdapterService.js +12 -0
  135. package/node_modules/@autonomous-testing/sdk/build/infrastructure/services/apolloAdapterService/apolloService.interface.d.ts +7 -0
  136. package/node_modules/@autonomous-testing/sdk/build/infrastructure/services/apolloAdapterService/apolloService.interface.js +3 -0
  137. package/node_modules/@autonomous-testing/sdk/build/infrastructure/services/apolloAdapterService/index.d.ts +4 -0
  138. package/node_modules/@autonomous-testing/sdk/build/infrastructure/services/apolloAdapterService/index.js +6 -0
  139. package/node_modules/@autonomous-testing/sdk/build/infrastructure/services/index.d.ts +3 -0
  140. package/node_modules/@autonomous-testing/sdk/build/infrastructure/services/index.js +19 -0
  141. package/node_modules/@autonomous-testing/sdk/build/infrastructure/services/loggerService/consoleLoggerOptions.interface.d.ts +4 -0
  142. package/node_modules/@autonomous-testing/sdk/build/infrastructure/services/loggerService/consoleLoggerOptions.interface.js +3 -0
  143. package/node_modules/@autonomous-testing/sdk/build/infrastructure/services/loggerService/index.d.ts +4 -0
  144. package/node_modules/@autonomous-testing/sdk/build/infrastructure/services/loggerService/index.js +6 -0
  145. package/node_modules/@autonomous-testing/sdk/build/infrastructure/services/loggerService/loggerOptions.interface.d.ts +22 -0
  146. package/node_modules/@autonomous-testing/sdk/build/infrastructure/services/loggerService/loggerOptions.interface.js +15 -0
  147. package/node_modules/@autonomous-testing/sdk/build/infrastructure/services/loggerService/loggerService.d.ts +4 -0
  148. package/node_modules/@autonomous-testing/sdk/build/infrastructure/services/loggerService/loggerService.js +32 -0
  149. package/node_modules/@autonomous-testing/sdk/build/shared/index.d.ts +3 -0
  150. package/node_modules/@autonomous-testing/sdk/build/shared/index.js +19 -0
  151. package/node_modules/@autonomous-testing/sdk/build/shared/metadata/index.d.ts +3 -0
  152. package/node_modules/@autonomous-testing/sdk/build/shared/metadata/index.js +7 -0
  153. package/node_modules/@autonomous-testing/sdk/build/shared/metadata/versionMetadata.d.ts +3 -0
  154. package/node_modules/@autonomous-testing/sdk/build/shared/metadata/versionMetadata.js +6 -0
  155. package/node_modules/@autonomous-testing/sdk/build/shared/utils/error.interface.d.ts +4 -0
  156. package/node_modules/@autonomous-testing/sdk/build/shared/utils/error.interface.js +12 -0
  157. package/node_modules/@autonomous-testing/sdk/build/shared/utils/index.d.ts +5 -0
  158. package/node_modules/@autonomous-testing/sdk/build/shared/utils/index.js +22 -0
  159. package/node_modules/@autonomous-testing/sdk/build/shared/utils/mergeDicts/index.d.ts +3 -0
  160. package/node_modules/@autonomous-testing/sdk/build/shared/utils/mergeDicts/index.js +7 -0
  161. package/node_modules/@autonomous-testing/sdk/build/shared/utils/mergeDicts/mergeDicts.d.ts +17 -0
  162. package/node_modules/@autonomous-testing/sdk/build/shared/utils/mergeDicts/mergeDicts.js +29 -0
  163. package/node_modules/@autonomous-testing/sdk/build/shared/utils/zodHelper/index.d.ts +3 -0
  164. package/node_modules/@autonomous-testing/sdk/build/shared/utils/zodHelper/index.js +6 -0
  165. package/node_modules/@autonomous-testing/sdk/build/shared/utils/zodHelper/zodHelper.d.ts +14 -0
  166. package/node_modules/@autonomous-testing/sdk/build/shared/utils/zodHelper/zodHelper.js +39 -0
  167. package/node_modules/@autonomous-testing/sdk/package.json +50 -0
  168. package/node_modules/@autonomous-testing/sdk/release.config.mjs +55 -0
  169. package/node_modules/asynckit/LICENSE +21 -0
  170. package/node_modules/asynckit/README.md +233 -0
  171. package/node_modules/asynckit/bench.js +76 -0
  172. package/node_modules/asynckit/index.js +6 -0
  173. package/node_modules/asynckit/lib/abort.js +29 -0
  174. package/node_modules/asynckit/lib/async.js +34 -0
  175. package/node_modules/asynckit/lib/defer.js +26 -0
  176. package/node_modules/asynckit/lib/iterate.js +75 -0
  177. package/node_modules/asynckit/lib/readable_asynckit.js +91 -0
  178. package/node_modules/asynckit/lib/readable_parallel.js +25 -0
  179. package/node_modules/asynckit/lib/readable_serial.js +25 -0
  180. package/node_modules/asynckit/lib/readable_serial_ordered.js +29 -0
  181. package/node_modules/asynckit/lib/state.js +37 -0
  182. package/node_modules/asynckit/lib/streamify.js +141 -0
  183. package/node_modules/asynckit/lib/terminator.js +29 -0
  184. package/node_modules/asynckit/package.json +63 -0
  185. package/node_modules/asynckit/parallel.js +43 -0
  186. package/node_modules/asynckit/serial.js +17 -0
  187. package/node_modules/asynckit/serialOrdered.js +75 -0
  188. package/node_modules/asynckit/stream.js +21 -0
  189. package/node_modules/axios/CHANGELOG.md +943 -0
  190. package/node_modules/axios/LICENSE +19 -0
  191. package/node_modules/axios/README.md +991 -0
  192. package/node_modules/axios/SECURITY.md +5 -0
  193. package/node_modules/axios/UPGRADE_GUIDE.md +168 -0
  194. package/node_modules/axios/dist/axios.js +2595 -0
  195. package/node_modules/axios/dist/axios.map +1 -0
  196. package/node_modules/axios/dist/axios.min.js +3 -0
  197. package/node_modules/axios/dist/axios.min.map +1 -0
  198. package/node_modules/axios/index.d.ts +254 -0
  199. package/node_modules/axios/index.js +1 -0
  200. package/node_modules/axios/lib/adapters/README.md +37 -0
  201. package/node_modules/axios/lib/adapters/http.js +424 -0
  202. package/node_modules/axios/lib/adapters/xhr.js +222 -0
  203. package/node_modules/axios/lib/axios.js +64 -0
  204. package/node_modules/axios/lib/cancel/CancelToken.js +119 -0
  205. package/node_modules/axios/lib/cancel/CanceledError.js +22 -0
  206. package/node_modules/axios/lib/cancel/isCancel.js +5 -0
  207. package/node_modules/axios/lib/core/Axios.js +160 -0
  208. package/node_modules/axios/lib/core/AxiosError.js +86 -0
  209. package/node_modules/axios/lib/core/InterceptorManager.js +54 -0
  210. package/node_modules/axios/lib/core/README.md +8 -0
  211. package/node_modules/axios/lib/core/buildFullPath.js +20 -0
  212. package/node_modules/axios/lib/core/dispatchRequest.js +87 -0
  213. package/node_modules/axios/lib/core/mergeConfig.js +100 -0
  214. package/node_modules/axios/lib/core/settle.js +25 -0
  215. package/node_modules/axios/lib/core/transformData.js +22 -0
  216. package/node_modules/axios/lib/defaults/env/FormData.js +2 -0
  217. package/node_modules/axios/lib/defaults/index.js +146 -0
  218. package/node_modules/axios/lib/defaults/transitional.js +7 -0
  219. package/node_modules/axios/lib/env/README.md +3 -0
  220. package/node_modules/axios/lib/env/data.js +3 -0
  221. package/node_modules/axios/lib/helpers/README.md +7 -0
  222. package/node_modules/axios/lib/helpers/bind.js +11 -0
  223. package/node_modules/axios/lib/helpers/buildURL.js +70 -0
  224. package/node_modules/axios/lib/helpers/combineURLs.js +14 -0
  225. package/node_modules/axios/lib/helpers/cookies.js +53 -0
  226. package/node_modules/axios/lib/helpers/deprecatedMethod.js +24 -0
  227. package/node_modules/axios/lib/helpers/isAbsoluteURL.js +14 -0
  228. package/node_modules/axios/lib/helpers/isAxiosError.js +13 -0
  229. package/node_modules/axios/lib/helpers/isURLSameOrigin.js +68 -0
  230. package/node_modules/axios/lib/helpers/normalizeHeaderName.js +12 -0
  231. package/node_modules/axios/lib/helpers/null.js +2 -0
  232. package/node_modules/axios/lib/helpers/parseHeaders.js +53 -0
  233. package/node_modules/axios/lib/helpers/parseProtocol.js +6 -0
  234. package/node_modules/axios/lib/helpers/spread.js +27 -0
  235. package/node_modules/axios/lib/helpers/toFormData.js +72 -0
  236. package/node_modules/axios/lib/helpers/validator.js +86 -0
  237. package/node_modules/axios/lib/utils.js +470 -0
  238. package/node_modules/axios/package.json +87 -0
  239. package/node_modules/axios/tsconfig.json +14 -0
  240. package/node_modules/axios/tslint.json +6 -0
  241. package/node_modules/combined-stream/License +19 -0
  242. package/node_modules/combined-stream/Readme.md +138 -0
  243. package/node_modules/combined-stream/lib/combined_stream.js +208 -0
  244. package/node_modules/combined-stream/package.json +25 -0
  245. package/node_modules/delayed-stream/.npmignore +1 -0
  246. package/node_modules/delayed-stream/License +19 -0
  247. package/node_modules/delayed-stream/Makefile +7 -0
  248. package/node_modules/delayed-stream/Readme.md +141 -0
  249. package/node_modules/delayed-stream/lib/delayed_stream.js +107 -0
  250. package/node_modules/delayed-stream/package.json +27 -0
  251. package/node_modules/follow-redirects/LICENSE +18 -0
  252. package/node_modules/follow-redirects/README.md +155 -0
  253. package/node_modules/follow-redirects/debug.js +15 -0
  254. package/node_modules/follow-redirects/http.js +1 -0
  255. package/node_modules/follow-redirects/https.js +1 -0
  256. package/node_modules/follow-redirects/index.js +672 -0
  257. package/node_modules/follow-redirects/package.json +58 -0
  258. package/node_modules/form-data/License +19 -0
  259. package/node_modules/form-data/README.md.bak +358 -0
  260. package/node_modules/form-data/Readme.md +358 -0
  261. package/node_modules/form-data/index.d.ts +62 -0
  262. package/node_modules/form-data/lib/browser.js +2 -0
  263. package/node_modules/form-data/lib/form_data.js +501 -0
  264. package/node_modules/form-data/lib/populate.js +10 -0
  265. package/node_modules/form-data/package.json +68 -0
  266. package/node_modules/mime-db/HISTORY.md +507 -0
  267. package/node_modules/mime-db/LICENSE +23 -0
  268. package/node_modules/mime-db/README.md +100 -0
  269. package/node_modules/mime-db/db.json +8519 -0
  270. package/node_modules/mime-db/index.js +12 -0
  271. package/node_modules/mime-db/package.json +60 -0
  272. package/node_modules/mime-types/HISTORY.md +397 -0
  273. package/node_modules/mime-types/LICENSE +23 -0
  274. package/node_modules/mime-types/README.md +113 -0
  275. package/node_modules/mime-types/index.js +188 -0
  276. package/node_modules/mime-types/package.json +44 -0
  277. package/node_modules/process/.eslintrc +21 -0
  278. package/node_modules/process/LICENSE +22 -0
  279. package/node_modules/process/README.md +26 -0
  280. package/node_modules/process/browser.js +184 -0
  281. package/node_modules/process/index.js +2 -0
  282. package/node_modules/process/package.json +27 -0
  283. package/node_modules/process/test.js +199 -0
  284. package/node_modules/zod/LICENSE +21 -0
  285. package/node_modules/zod/README.md +2876 -0
  286. package/node_modules/zod/index.d.ts +2 -0
  287. package/node_modules/zod/lib/ZodError.d.ts +164 -0
  288. package/node_modules/zod/lib/ZodError.js +137 -0
  289. package/node_modules/zod/lib/__tests__/Mocker.d.ts +17 -0
  290. package/node_modules/zod/lib/__tests__/Mocker.js +57 -0
  291. package/node_modules/zod/lib/benchmarks/datetime.d.ts +5 -0
  292. package/node_modules/zod/lib/benchmarks/datetime.js +54 -0
  293. package/node_modules/zod/lib/benchmarks/discriminatedUnion.d.ts +5 -0
  294. package/node_modules/zod/lib/benchmarks/discriminatedUnion.js +79 -0
  295. package/node_modules/zod/lib/benchmarks/index.d.ts +1 -0
  296. package/node_modules/zod/lib/benchmarks/index.js +59 -0
  297. package/node_modules/zod/lib/benchmarks/ipv4.d.ts +5 -0
  298. package/node_modules/zod/lib/benchmarks/ipv4.js +54 -0
  299. package/node_modules/zod/lib/benchmarks/object.d.ts +5 -0
  300. package/node_modules/zod/lib/benchmarks/object.js +70 -0
  301. package/node_modules/zod/lib/benchmarks/primitives.d.ts +5 -0
  302. package/node_modules/zod/lib/benchmarks/primitives.js +170 -0
  303. package/node_modules/zod/lib/benchmarks/realworld.d.ts +5 -0
  304. package/node_modules/zod/lib/benchmarks/realworld.js +56 -0
  305. package/node_modules/zod/lib/benchmarks/string.d.ts +5 -0
  306. package/node_modules/zod/lib/benchmarks/string.js +55 -0
  307. package/node_modules/zod/lib/benchmarks/union.d.ts +5 -0
  308. package/node_modules/zod/lib/benchmarks/union.js +79 -0
  309. package/node_modules/zod/lib/errors.d.ts +5 -0
  310. package/node_modules/zod/lib/errors.js +17 -0
  311. package/node_modules/zod/lib/external.d.ts +6 -0
  312. package/node_modules/zod/lib/external.js +18 -0
  313. package/node_modules/zod/lib/helpers/enumUtil.d.ts +8 -0
  314. package/node_modules/zod/lib/helpers/enumUtil.js +2 -0
  315. package/node_modules/zod/lib/helpers/errorUtil.d.ts +9 -0
  316. package/node_modules/zod/lib/helpers/errorUtil.js +8 -0
  317. package/node_modules/zod/lib/helpers/parseUtil.d.ts +78 -0
  318. package/node_modules/zod/lib/helpers/parseUtil.js +125 -0
  319. package/node_modules/zod/lib/helpers/partialUtil.d.ts +8 -0
  320. package/node_modules/zod/lib/helpers/partialUtil.js +2 -0
  321. package/node_modules/zod/lib/helpers/typeAliases.d.ts +2 -0
  322. package/node_modules/zod/lib/helpers/typeAliases.js +2 -0
  323. package/node_modules/zod/lib/helpers/util.d.ts +82 -0
  324. package/node_modules/zod/lib/helpers/util.js +142 -0
  325. package/node_modules/zod/lib/index.d.ts +4 -0
  326. package/node_modules/zod/lib/index.js +29 -0
  327. package/node_modules/zod/lib/index.mjs +4236 -0
  328. package/node_modules/zod/lib/index.umd.js +4351 -0
  329. package/node_modules/zod/lib/locales/en.d.ts +3 -0
  330. package/node_modules/zod/lib/locales/en.js +129 -0
  331. package/node_modules/zod/lib/types.d.ts +1127 -0
  332. package/node_modules/zod/lib/types.js +3677 -0
  333. package/node_modules/zod/package.json +119 -0
  334. package/package.json +57 -0
  335. package/release.config.mjs +55 -0
@@ -0,0 +1,119 @@
1
+ 'use strict';
2
+
3
+ var CanceledError = require('./CanceledError');
4
+
5
+ /**
6
+ * A `CancelToken` is an object that can be used to request cancellation of an operation.
7
+ *
8
+ * @class
9
+ * @param {Function} executor The executor function.
10
+ */
11
+ function CancelToken(executor) {
12
+ if (typeof executor !== 'function') {
13
+ throw new TypeError('executor must be a function.');
14
+ }
15
+
16
+ var resolvePromise;
17
+
18
+ this.promise = new Promise(function promiseExecutor(resolve) {
19
+ resolvePromise = resolve;
20
+ });
21
+
22
+ var token = this;
23
+
24
+ // eslint-disable-next-line func-names
25
+ this.promise.then(function(cancel) {
26
+ if (!token._listeners) return;
27
+
28
+ var i;
29
+ var l = token._listeners.length;
30
+
31
+ for (i = 0; i < l; i++) {
32
+ token._listeners[i](cancel);
33
+ }
34
+ token._listeners = null;
35
+ });
36
+
37
+ // eslint-disable-next-line func-names
38
+ this.promise.then = function(onfulfilled) {
39
+ var _resolve;
40
+ // eslint-disable-next-line func-names
41
+ var promise = new Promise(function(resolve) {
42
+ token.subscribe(resolve);
43
+ _resolve = resolve;
44
+ }).then(onfulfilled);
45
+
46
+ promise.cancel = function reject() {
47
+ token.unsubscribe(_resolve);
48
+ };
49
+
50
+ return promise;
51
+ };
52
+
53
+ executor(function cancel(message) {
54
+ if (token.reason) {
55
+ // Cancellation has already been requested
56
+ return;
57
+ }
58
+
59
+ token.reason = new CanceledError(message);
60
+ resolvePromise(token.reason);
61
+ });
62
+ }
63
+
64
+ /**
65
+ * Throws a `CanceledError` if cancellation has been requested.
66
+ */
67
+ CancelToken.prototype.throwIfRequested = function throwIfRequested() {
68
+ if (this.reason) {
69
+ throw this.reason;
70
+ }
71
+ };
72
+
73
+ /**
74
+ * Subscribe to the cancel signal
75
+ */
76
+
77
+ CancelToken.prototype.subscribe = function subscribe(listener) {
78
+ if (this.reason) {
79
+ listener(this.reason);
80
+ return;
81
+ }
82
+
83
+ if (this._listeners) {
84
+ this._listeners.push(listener);
85
+ } else {
86
+ this._listeners = [listener];
87
+ }
88
+ };
89
+
90
+ /**
91
+ * Unsubscribe from the cancel signal
92
+ */
93
+
94
+ CancelToken.prototype.unsubscribe = function unsubscribe(listener) {
95
+ if (!this._listeners) {
96
+ return;
97
+ }
98
+ var index = this._listeners.indexOf(listener);
99
+ if (index !== -1) {
100
+ this._listeners.splice(index, 1);
101
+ }
102
+ };
103
+
104
+ /**
105
+ * Returns an object that contains a new `CancelToken` and a function that, when called,
106
+ * cancels the `CancelToken`.
107
+ */
108
+ CancelToken.source = function source() {
109
+ var cancel;
110
+ var token = new CancelToken(function executor(c) {
111
+ cancel = c;
112
+ });
113
+ return {
114
+ token: token,
115
+ cancel: cancel
116
+ };
117
+ };
118
+
119
+ module.exports = CancelToken;
@@ -0,0 +1,22 @@
1
+ 'use strict';
2
+
3
+ var AxiosError = require('../core/AxiosError');
4
+ var utils = require('../utils');
5
+
6
+ /**
7
+ * A `CanceledError` is an object that is thrown when an operation is canceled.
8
+ *
9
+ * @class
10
+ * @param {string=} message The message.
11
+ */
12
+ function CanceledError(message) {
13
+ // eslint-disable-next-line no-eq-null,eqeqeq
14
+ AxiosError.call(this, message == null ? 'canceled' : message, AxiosError.ERR_CANCELED);
15
+ this.name = 'CanceledError';
16
+ }
17
+
18
+ utils.inherits(CanceledError, AxiosError, {
19
+ __CANCEL__: true
20
+ });
21
+
22
+ module.exports = CanceledError;
@@ -0,0 +1,5 @@
1
+ 'use strict';
2
+
3
+ module.exports = function isCancel(value) {
4
+ return !!(value && value.__CANCEL__);
5
+ };
@@ -0,0 +1,160 @@
1
+ 'use strict';
2
+
3
+ var utils = require('./../utils');
4
+ var buildURL = require('../helpers/buildURL');
5
+ var InterceptorManager = require('./InterceptorManager');
6
+ var dispatchRequest = require('./dispatchRequest');
7
+ var mergeConfig = require('./mergeConfig');
8
+ var buildFullPath = require('./buildFullPath');
9
+ var validator = require('../helpers/validator');
10
+
11
+ var validators = validator.validators;
12
+ /**
13
+ * Create a new instance of Axios
14
+ *
15
+ * @param {Object} instanceConfig The default config for the instance
16
+ */
17
+ function Axios(instanceConfig) {
18
+ this.defaults = instanceConfig;
19
+ this.interceptors = {
20
+ request: new InterceptorManager(),
21
+ response: new InterceptorManager()
22
+ };
23
+ }
24
+
25
+ /**
26
+ * Dispatch a request
27
+ *
28
+ * @param {Object} config The config specific for this request (merged with this.defaults)
29
+ */
30
+ Axios.prototype.request = function request(configOrUrl, config) {
31
+ /*eslint no-param-reassign:0*/
32
+ // Allow for axios('example/url'[, config]) a la fetch API
33
+ if (typeof configOrUrl === 'string') {
34
+ config = config || {};
35
+ config.url = configOrUrl;
36
+ } else {
37
+ config = configOrUrl || {};
38
+ }
39
+
40
+ config = mergeConfig(this.defaults, config);
41
+
42
+ // Set config.method
43
+ if (config.method) {
44
+ config.method = config.method.toLowerCase();
45
+ } else if (this.defaults.method) {
46
+ config.method = this.defaults.method.toLowerCase();
47
+ } else {
48
+ config.method = 'get';
49
+ }
50
+
51
+ var transitional = config.transitional;
52
+
53
+ if (transitional !== undefined) {
54
+ validator.assertOptions(transitional, {
55
+ silentJSONParsing: validators.transitional(validators.boolean),
56
+ forcedJSONParsing: validators.transitional(validators.boolean),
57
+ clarifyTimeoutError: validators.transitional(validators.boolean)
58
+ }, false);
59
+ }
60
+
61
+ // filter out skipped interceptors
62
+ var requestInterceptorChain = [];
63
+ var synchronousRequestInterceptors = true;
64
+ this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) {
65
+ if (typeof interceptor.runWhen === 'function' && interceptor.runWhen(config) === false) {
66
+ return;
67
+ }
68
+
69
+ synchronousRequestInterceptors = synchronousRequestInterceptors && interceptor.synchronous;
70
+
71
+ requestInterceptorChain.unshift(interceptor.fulfilled, interceptor.rejected);
72
+ });
73
+
74
+ var responseInterceptorChain = [];
75
+ this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) {
76
+ responseInterceptorChain.push(interceptor.fulfilled, interceptor.rejected);
77
+ });
78
+
79
+ var promise;
80
+
81
+ if (!synchronousRequestInterceptors) {
82
+ var chain = [dispatchRequest, undefined];
83
+
84
+ Array.prototype.unshift.apply(chain, requestInterceptorChain);
85
+ chain = chain.concat(responseInterceptorChain);
86
+
87
+ promise = Promise.resolve(config);
88
+ while (chain.length) {
89
+ promise = promise.then(chain.shift(), chain.shift());
90
+ }
91
+
92
+ return promise;
93
+ }
94
+
95
+
96
+ var newConfig = config;
97
+ while (requestInterceptorChain.length) {
98
+ var onFulfilled = requestInterceptorChain.shift();
99
+ var onRejected = requestInterceptorChain.shift();
100
+ try {
101
+ newConfig = onFulfilled(newConfig);
102
+ } catch (error) {
103
+ onRejected(error);
104
+ break;
105
+ }
106
+ }
107
+
108
+ try {
109
+ promise = dispatchRequest(newConfig);
110
+ } catch (error) {
111
+ return Promise.reject(error);
112
+ }
113
+
114
+ while (responseInterceptorChain.length) {
115
+ promise = promise.then(responseInterceptorChain.shift(), responseInterceptorChain.shift());
116
+ }
117
+
118
+ return promise;
119
+ };
120
+
121
+ Axios.prototype.getUri = function getUri(config) {
122
+ config = mergeConfig(this.defaults, config);
123
+ var fullPath = buildFullPath(config.baseURL, config.url);
124
+ return buildURL(fullPath, config.params, config.paramsSerializer);
125
+ };
126
+
127
+ // Provide aliases for supported request methods
128
+ utils.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) {
129
+ /*eslint func-names:0*/
130
+ Axios.prototype[method] = function(url, config) {
131
+ return this.request(mergeConfig(config || {}, {
132
+ method: method,
133
+ url: url,
134
+ data: (config || {}).data
135
+ }));
136
+ };
137
+ });
138
+
139
+ utils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {
140
+ /*eslint func-names:0*/
141
+
142
+ function generateHTTPMethod(isForm) {
143
+ return function httpMethod(url, data, config) {
144
+ return this.request(mergeConfig(config || {}, {
145
+ method: method,
146
+ headers: isForm ? {
147
+ 'Content-Type': 'multipart/form-data'
148
+ } : {},
149
+ url: url,
150
+ data: data
151
+ }));
152
+ };
153
+ }
154
+
155
+ Axios.prototype[method] = generateHTTPMethod();
156
+
157
+ Axios.prototype[method + 'Form'] = generateHTTPMethod(true);
158
+ });
159
+
160
+ module.exports = Axios;
@@ -0,0 +1,86 @@
1
+ 'use strict';
2
+
3
+ var utils = require('../utils');
4
+
5
+ /**
6
+ * Create an Error with the specified message, config, error code, request and response.
7
+ *
8
+ * @param {string} message The error message.
9
+ * @param {string} [code] The error code (for example, 'ECONNABORTED').
10
+ * @param {Object} [config] The config.
11
+ * @param {Object} [request] The request.
12
+ * @param {Object} [response] The response.
13
+ * @returns {Error} The created error.
14
+ */
15
+ function AxiosError(message, code, config, request, response) {
16
+ Error.call(this);
17
+ this.message = message;
18
+ this.name = 'AxiosError';
19
+ code && (this.code = code);
20
+ config && (this.config = config);
21
+ request && (this.request = request);
22
+ response && (this.response = response);
23
+ }
24
+
25
+ utils.inherits(AxiosError, Error, {
26
+ toJSON: function toJSON() {
27
+ return {
28
+ // Standard
29
+ message: this.message,
30
+ name: this.name,
31
+ // Microsoft
32
+ description: this.description,
33
+ number: this.number,
34
+ // Mozilla
35
+ fileName: this.fileName,
36
+ lineNumber: this.lineNumber,
37
+ columnNumber: this.columnNumber,
38
+ stack: this.stack,
39
+ // Axios
40
+ config: this.config,
41
+ code: this.code,
42
+ status: this.response && this.response.status ? this.response.status : null
43
+ };
44
+ }
45
+ });
46
+
47
+ var prototype = AxiosError.prototype;
48
+ var descriptors = {};
49
+
50
+ [
51
+ 'ERR_BAD_OPTION_VALUE',
52
+ 'ERR_BAD_OPTION',
53
+ 'ECONNABORTED',
54
+ 'ETIMEDOUT',
55
+ 'ERR_NETWORK',
56
+ 'ERR_FR_TOO_MANY_REDIRECTS',
57
+ 'ERR_DEPRECATED',
58
+ 'ERR_BAD_RESPONSE',
59
+ 'ERR_BAD_REQUEST',
60
+ 'ERR_CANCELED'
61
+ // eslint-disable-next-line func-names
62
+ ].forEach(function(code) {
63
+ descriptors[code] = {value: code};
64
+ });
65
+
66
+ Object.defineProperties(AxiosError, descriptors);
67
+ Object.defineProperty(prototype, 'isAxiosError', {value: true});
68
+
69
+ // eslint-disable-next-line func-names
70
+ AxiosError.from = function(error, code, config, request, response, customProps) {
71
+ var axiosError = Object.create(prototype);
72
+
73
+ utils.toFlatObject(error, axiosError, function filter(obj) {
74
+ return obj !== Error.prototype;
75
+ });
76
+
77
+ AxiosError.call(axiosError, error.message, code, config, request, response);
78
+
79
+ axiosError.name = error.name;
80
+
81
+ customProps && Object.assign(axiosError, customProps);
82
+
83
+ return axiosError;
84
+ };
85
+
86
+ module.exports = AxiosError;
@@ -0,0 +1,54 @@
1
+ 'use strict';
2
+
3
+ var utils = require('./../utils');
4
+
5
+ function InterceptorManager() {
6
+ this.handlers = [];
7
+ }
8
+
9
+ /**
10
+ * Add a new interceptor to the stack
11
+ *
12
+ * @param {Function} fulfilled The function to handle `then` for a `Promise`
13
+ * @param {Function} rejected The function to handle `reject` for a `Promise`
14
+ *
15
+ * @return {Number} An ID used to remove interceptor later
16
+ */
17
+ InterceptorManager.prototype.use = function use(fulfilled, rejected, options) {
18
+ this.handlers.push({
19
+ fulfilled: fulfilled,
20
+ rejected: rejected,
21
+ synchronous: options ? options.synchronous : false,
22
+ runWhen: options ? options.runWhen : null
23
+ });
24
+ return this.handlers.length - 1;
25
+ };
26
+
27
+ /**
28
+ * Remove an interceptor from the stack
29
+ *
30
+ * @param {Number} id The ID that was returned by `use`
31
+ */
32
+ InterceptorManager.prototype.eject = function eject(id) {
33
+ if (this.handlers[id]) {
34
+ this.handlers[id] = null;
35
+ }
36
+ };
37
+
38
+ /**
39
+ * Iterate over all the registered interceptors
40
+ *
41
+ * This method is particularly useful for skipping over any
42
+ * interceptors that may have become `null` calling `eject`.
43
+ *
44
+ * @param {Function} fn The function to call for each interceptor
45
+ */
46
+ InterceptorManager.prototype.forEach = function forEach(fn) {
47
+ utils.forEach(this.handlers, function forEachHandler(h) {
48
+ if (h !== null) {
49
+ fn(h);
50
+ }
51
+ });
52
+ };
53
+
54
+ module.exports = InterceptorManager;
@@ -0,0 +1,8 @@
1
+ # axios // core
2
+
3
+ The modules found in `core/` should be modules that are specific to the domain logic of axios. These modules would most likely not make sense to be consumed outside of the axios module, as their logic is too specific. Some examples of core modules are:
4
+
5
+ - Dispatching requests
6
+ - Requests sent via `adapters/` (see lib/adapters/README.md)
7
+ - Managing interceptors
8
+ - Handling config
@@ -0,0 +1,20 @@
1
+ 'use strict';
2
+
3
+ var isAbsoluteURL = require('../helpers/isAbsoluteURL');
4
+ var combineURLs = require('../helpers/combineURLs');
5
+
6
+ /**
7
+ * Creates a new URL by combining the baseURL with the requestedURL,
8
+ * only when the requestedURL is not already an absolute URL.
9
+ * If the requestURL is absolute, this function returns the requestedURL untouched.
10
+ *
11
+ * @param {string} baseURL The base URL
12
+ * @param {string} requestedURL Absolute or relative URL to combine
13
+ * @returns {string} The combined full path
14
+ */
15
+ module.exports = function buildFullPath(baseURL, requestedURL) {
16
+ if (baseURL && !isAbsoluteURL(requestedURL)) {
17
+ return combineURLs(baseURL, requestedURL);
18
+ }
19
+ return requestedURL;
20
+ };
@@ -0,0 +1,87 @@
1
+ 'use strict';
2
+
3
+ var utils = require('./../utils');
4
+ var transformData = require('./transformData');
5
+ var isCancel = require('../cancel/isCancel');
6
+ var defaults = require('../defaults');
7
+ var CanceledError = require('../cancel/CanceledError');
8
+
9
+ /**
10
+ * Throws a `CanceledError` if cancellation has been requested.
11
+ */
12
+ function throwIfCancellationRequested(config) {
13
+ if (config.cancelToken) {
14
+ config.cancelToken.throwIfRequested();
15
+ }
16
+
17
+ if (config.signal && config.signal.aborted) {
18
+ throw new CanceledError();
19
+ }
20
+ }
21
+
22
+ /**
23
+ * Dispatch a request to the server using the configured adapter.
24
+ *
25
+ * @param {object} config The config that is to be used for the request
26
+ * @returns {Promise} The Promise to be fulfilled
27
+ */
28
+ module.exports = function dispatchRequest(config) {
29
+ throwIfCancellationRequested(config);
30
+
31
+ // Ensure headers exist
32
+ config.headers = config.headers || {};
33
+
34
+ // Transform request data
35
+ config.data = transformData.call(
36
+ config,
37
+ config.data,
38
+ config.headers,
39
+ config.transformRequest
40
+ );
41
+
42
+ // Flatten headers
43
+ config.headers = utils.merge(
44
+ config.headers.common || {},
45
+ config.headers[config.method] || {},
46
+ config.headers
47
+ );
48
+
49
+ utils.forEach(
50
+ ['delete', 'get', 'head', 'post', 'put', 'patch', 'common'],
51
+ function cleanHeaderConfig(method) {
52
+ delete config.headers[method];
53
+ }
54
+ );
55
+
56
+ var adapter = config.adapter || defaults.adapter;
57
+
58
+ return adapter(config).then(function onAdapterResolution(response) {
59
+ throwIfCancellationRequested(config);
60
+
61
+ // Transform response data
62
+ response.data = transformData.call(
63
+ config,
64
+ response.data,
65
+ response.headers,
66
+ config.transformResponse
67
+ );
68
+
69
+ return response;
70
+ }, function onAdapterRejection(reason) {
71
+ if (!isCancel(reason)) {
72
+ throwIfCancellationRequested(config);
73
+
74
+ // Transform response data
75
+ if (reason && reason.response) {
76
+ reason.response.data = transformData.call(
77
+ config,
78
+ reason.response.data,
79
+ reason.response.headers,
80
+ config.transformResponse
81
+ );
82
+ }
83
+ }
84
+
85
+ return Promise.reject(reason);
86
+ });
87
+ };
@@ -0,0 +1,100 @@
1
+ 'use strict';
2
+
3
+ var utils = require('../utils');
4
+
5
+ /**
6
+ * Config-specific merge-function which creates a new config-object
7
+ * by merging two configuration objects together.
8
+ *
9
+ * @param {Object} config1
10
+ * @param {Object} config2
11
+ * @returns {Object} New object resulting from merging config2 to config1
12
+ */
13
+ module.exports = function mergeConfig(config1, config2) {
14
+ // eslint-disable-next-line no-param-reassign
15
+ config2 = config2 || {};
16
+ var config = {};
17
+
18
+ function getMergedValue(target, source) {
19
+ if (utils.isPlainObject(target) && utils.isPlainObject(source)) {
20
+ return utils.merge(target, source);
21
+ } else if (utils.isPlainObject(source)) {
22
+ return utils.merge({}, source);
23
+ } else if (utils.isArray(source)) {
24
+ return source.slice();
25
+ }
26
+ return source;
27
+ }
28
+
29
+ // eslint-disable-next-line consistent-return
30
+ function mergeDeepProperties(prop) {
31
+ if (!utils.isUndefined(config2[prop])) {
32
+ return getMergedValue(config1[prop], config2[prop]);
33
+ } else if (!utils.isUndefined(config1[prop])) {
34
+ return getMergedValue(undefined, config1[prop]);
35
+ }
36
+ }
37
+
38
+ // eslint-disable-next-line consistent-return
39
+ function valueFromConfig2(prop) {
40
+ if (!utils.isUndefined(config2[prop])) {
41
+ return getMergedValue(undefined, config2[prop]);
42
+ }
43
+ }
44
+
45
+ // eslint-disable-next-line consistent-return
46
+ function defaultToConfig2(prop) {
47
+ if (!utils.isUndefined(config2[prop])) {
48
+ return getMergedValue(undefined, config2[prop]);
49
+ } else if (!utils.isUndefined(config1[prop])) {
50
+ return getMergedValue(undefined, config1[prop]);
51
+ }
52
+ }
53
+
54
+ // eslint-disable-next-line consistent-return
55
+ function mergeDirectKeys(prop) {
56
+ if (prop in config2) {
57
+ return getMergedValue(config1[prop], config2[prop]);
58
+ } else if (prop in config1) {
59
+ return getMergedValue(undefined, config1[prop]);
60
+ }
61
+ }
62
+
63
+ var mergeMap = {
64
+ 'url': valueFromConfig2,
65
+ 'method': valueFromConfig2,
66
+ 'data': valueFromConfig2,
67
+ 'baseURL': defaultToConfig2,
68
+ 'transformRequest': defaultToConfig2,
69
+ 'transformResponse': defaultToConfig2,
70
+ 'paramsSerializer': defaultToConfig2,
71
+ 'timeout': defaultToConfig2,
72
+ 'timeoutMessage': defaultToConfig2,
73
+ 'withCredentials': defaultToConfig2,
74
+ 'adapter': defaultToConfig2,
75
+ 'responseType': defaultToConfig2,
76
+ 'xsrfCookieName': defaultToConfig2,
77
+ 'xsrfHeaderName': defaultToConfig2,
78
+ 'onUploadProgress': defaultToConfig2,
79
+ 'onDownloadProgress': defaultToConfig2,
80
+ 'decompress': defaultToConfig2,
81
+ 'maxContentLength': defaultToConfig2,
82
+ 'maxBodyLength': defaultToConfig2,
83
+ 'beforeRedirect': defaultToConfig2,
84
+ 'transport': defaultToConfig2,
85
+ 'httpAgent': defaultToConfig2,
86
+ 'httpsAgent': defaultToConfig2,
87
+ 'cancelToken': defaultToConfig2,
88
+ 'socketPath': defaultToConfig2,
89
+ 'responseEncoding': defaultToConfig2,
90
+ 'validateStatus': mergeDirectKeys
91
+ };
92
+
93
+ utils.forEach(Object.keys(config1).concat(Object.keys(config2)), function computeConfigValue(prop) {
94
+ var merge = mergeMap[prop] || mergeDeepProperties;
95
+ var configValue = merge(prop);
96
+ (utils.isUndefined(configValue) && merge !== mergeDirectKeys) || (config[prop] = configValue);
97
+ });
98
+
99
+ return config;
100
+ };
@@ -0,0 +1,25 @@
1
+ 'use strict';
2
+
3
+ var AxiosError = require('./AxiosError');
4
+
5
+ /**
6
+ * Resolve or reject a Promise based on response status.
7
+ *
8
+ * @param {Function} resolve A function that resolves the promise.
9
+ * @param {Function} reject A function that rejects the promise.
10
+ * @param {object} response The response.
11
+ */
12
+ module.exports = function settle(resolve, reject, response) {
13
+ var validateStatus = response.config.validateStatus;
14
+ if (!response.status || !validateStatus || validateStatus(response.status)) {
15
+ resolve(response);
16
+ } else {
17
+ reject(new AxiosError(
18
+ 'Request failed with status code ' + response.status,
19
+ [AxiosError.ERR_BAD_REQUEST, AxiosError.ERR_BAD_RESPONSE][Math.floor(response.status / 100) - 4],
20
+ response.config,
21
+ response.request,
22
+ response
23
+ ));
24
+ }
25
+ };