feat: add medusa-react (#913)

This commit is contained in:
Zakaria El Asri authored and GitHub committed 2021-12-14 19:09:36 +01:00
1 parent 40f6e88875
commit d0d8dd7bf6
97 files changed
+22822 -7595

No files matched your search

+1 -1
View File
@@ -16,7 +16,7 @@
"license": "MIT",
"dependencies": {
"@medusajs/medusa": "^1.1.59",
"axios": "^0.21.0",
"axios": "^0.24.0",
"retry-axios": "^2.6.0"
},
"repository": {
+2 -2
View File
@@ -1,4 +1,4 @@
import axios, { AxiosError, AxiosInstance } from "axios"
import axios, { AxiosError, AxiosInstance, AxiosRequestHeaders } from "axios"
import * as rax from "retry-axios"
import { v4 as uuidv4 } from "uuid"
@@ -108,7 +108,7 @@ class Client {
userHeaders: RequestOptions,
method: RequestMethod,
path: string
): object {
): AxiosRequestHeaders {
let defaultHeaders: object = {
Accept: "application/json",
"Content-Type": "application/json",
+10 -2
View File
@@ -1,7 +1,15 @@
import { AxiosResponse } from "axios"
export interface HTTPResponse {
status: number
statusText: string
headers: Record<string, string> & {
"set-cookie"?: string[]
}
config: any
request?: any
}
export type Response<T> = T & {
response: Omit<AxiosResponse<T>, "data">
response: HTTPResponse
}
export type ResponsePromise<T = any> = Promise<Response<T>>
+13 -1
View File
@@ -1186,13 +1186,20 @@ axios-retry@^3.1.9:
"@babel/runtime" "^7.15.4"
is-retry-allowed "^2.2.0"
axios@^0.21.0, axios@^0.21.1:
axios@^0.21.1:
version "0.21.4"
resolved "https://registry.yarnpkg.com/axios/-/axios-0.21.4.tgz#c67b90dc0568e5c1cf2b0b858c43ba28e2eda575"
integrity sha512-ut5vewkiu8jjGBdqpM44XxjuCjq9LAKeHVmoVfHVzy8eHgxxq8SbAVQNovDA8mVi05kP0Ea/n/UzcSHcTJQfNg==
dependencies:
follow-redirects "^1.14.0"
axios@^0.24.0:
version "0.24.0"
resolved "https://registry.yarnpkg.com/axios/-/axios-0.24.0.tgz#804e6fa1e4b9c5288501dd9dff56a7a0940d20d6"
integrity sha512-Q6cWsys88HoPgAaFAVUb0WpPk0O8iTeisR9IMqy9G8AbO4NlpVknrnQS03zzF9PGAWgO3cgletO3VjV/P7VztA==
dependencies:
follow-redirects "^1.14.4"
babel-jest@^26.6.3:
version "26.6.3"
resolved "https://registry.yarnpkg.com/babel-jest/-/babel-jest-26.6.3.tgz#d87d25cb0037577a0c89f82e5755c5d293c01056"
@@ -2741,6 +2748,11 @@ follow-redirects@^1.14.0:
resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.14.5.tgz#f09a5848981d3c772b5392309778523f8d85c381"
integrity sha512-wtphSXy7d4/OR+MvIFbCVBDzZ5520qV8XfPklSN5QtxuMUJZ+b0Wnst1e1lCDocfzuCkHqj8k0FpZqO+UIaKNA==
follow-redirects@^1.14.4:
version "1.14.6"
resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.14.6.tgz#8cfb281bbc035b3c067d6cd975b0f6ade6e855cd"
integrity sha512-fhUl5EwSJbbl8AR+uYL2KQDxLkdSjZGR36xy46AO7cOMTrCMON6Sa28FmAnC2tRTDbd/Uuzz3aJBv7EBN7JH8A==
for-each@^0.3.3:
version "0.3.3"
resolved "https://registry.yarnpkg.com/for-each/-/for-each-0.3.3.tgz#69b447e88a0a5d32c3e7084f3f1710034b21376e"