Skip to content

Commit

Permalink
fix: Fetch issue (#1)
Browse files Browse the repository at this point in the history
  • Loading branch information
simenandre committed Dec 11, 2020
1 parent 7b05b96 commit d52d096
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 49 deletions.
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"test:watch": "jest --watch"
},
"dependencies": {
"@adobe/node-fetch-retry": "^1.1.0"
"node-fetch": "^2.6.1"
},
"devDependencies": {
"@types/jest": "~26.0.3",
Expand All @@ -41,7 +41,6 @@
"tsutils": "~3.17.0",
"typedoc": "^0.19.2",
"typedoc-plugin-markdown": "^2.2.16",
"@types/adobe__node-fetch-retry": "^1.0.0",
"typescript": "~3.9.2"
}
}
7 changes: 5 additions & 2 deletions src/generated/runtime.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* tslint:disable */
/* eslint-disable */
import fetch from "@adobe/node-fetch-retry";
import fetch from "node-fetch";

export const BASE_PATH = "https://api.fiken.no/api/v2".replace(/\/+$/, "");

Expand Down Expand Up @@ -137,7 +137,10 @@ export class Configuration {
}

get fetchApi(): FetchAPI {
return this.configuration.fetchApi || fetch || window.fetch.bind(window);
return (
this.configuration.fetchApi ||
(fetch as unknown as WindowOrWorkerGlobalScope['fetch'])
);;
}

get middleware(): Middleware[] {
Expand Down
46 changes: 1 addition & 45 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,6 @@
# yarn lockfile v1


"@adobe/node-fetch-retry@^1.1.0":
version "1.1.0"
resolved "https://registry.yarnpkg.com/@adobe/node-fetch-retry/-/node-fetch-retry-1.1.0.tgz#7a5161932f9d936458af28f62bc6c935d07152e9"
integrity sha512-KD6M2KNLQzuvEmG+f5SbVicLQb952sIsu94ZifFIrEGgAdpeke6RMWqKPg3a99FTF1Clcp80AWThxtrGQ9Yuwg==
dependencies:
abort-controller "^3.0.0"
node-fetch "^2.6.1"

"@babel/code-frame@^7.0.0", "@babel/code-frame@^7.10.4":
version "7.10.4"
resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.10.4.tgz#168da1a36e90da68ae8d49c0f1b48c7c6249213a"
Expand Down Expand Up @@ -503,13 +495,6 @@
dependencies:
type-detect "4.0.8"

"@types/adobe__node-fetch-retry@^1.0.0":
version "1.0.0"
resolved "https://registry.yarnpkg.com/@types/adobe__node-fetch-retry/-/adobe__node-fetch-retry-1.0.0.tgz#0c8b5710086ffa31e7d0820841eb860af051a0a7"
integrity sha512-e9bQInFEBLYRFhvYF6/jbELEXJcGCpvbX1jVlzrGvSia0hzfrlmt7mK++9G/EpMZ6TKOZStprcwlgSgT9yel1w==
dependencies:
"@types/node-fetch" "*"

"@types/babel__core@^7.1.7":
version "7.1.12"
resolved "https://registry.yarnpkg.com/@types/babel__core/-/babel__core-7.1.12.tgz#4d8e9e51eb265552a7e4f1ff2219ab6133bdfb2d"
Expand Down Expand Up @@ -595,14 +580,6 @@
resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.6.tgz#f4c7ec43e81b319a9815115031709f26987891f0"
integrity sha512-3c+yGKvVP5Y9TYBEibGNR+kLtijnj7mYrXRg+WpFb2X9xm04g/DXYkfg4hmzJQosc9snFNUPkbYIhu+KAm6jJw==

"@types/node-fetch@*":
version "2.5.7"
resolved "https://registry.yarnpkg.com/@types/node-fetch/-/node-fetch-2.5.7.tgz#20a2afffa882ab04d44ca786449a276f9f6bbf3c"
integrity sha512-o2WVNf5UhWRkxlf6eq+jMZDu7kjgpgJfl4xVNlvryc95O/6F2ld8ztKX+qu+Rjyet93WAWm5LjeX9H5FGkODvw==
dependencies:
"@types/node" "*"
form-data "^3.0.0"

"@types/node@*":
version "14.14.11"
resolved "https://registry.yarnpkg.com/@types/node/-/node-14.14.11.tgz#fc25a4248a5e8d0837019b1d170146d07334abe0"
Expand Down Expand Up @@ -735,13 +712,6 @@ abab@^2.0.0:
resolved "https://registry.yarnpkg.com/abab/-/abab-2.0.5.tgz#c0b678fb32d60fc1219c784d6a826fe385aeb79a"
integrity sha512-9IK9EadsbHo6jLWIpxpR6pL0sazTXV6+SQv25ZB+F7Bj9mJNaOc4nCRabwd5M/JwmUa8idz6Eci6eKfJryPs6Q==

abort-controller@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/abort-controller/-/abort-controller-3.0.0.tgz#eaf54d53b62bae4138e809ca225c8439a6efb392"
integrity sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg==
dependencies:
event-target-shim "^5.0.0"

acorn-globals@^4.3.2:
version "4.3.4"
resolved "https://registry.yarnpkg.com/acorn-globals/-/acorn-globals-4.3.4.tgz#9fa1926addc11c97308c4e66d7add0d40c3272e7"
Expand Down Expand Up @@ -1202,7 +1172,7 @@ color-name@~1.1.4:
resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2"
integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==

combined-stream@^1.0.6, combined-stream@^1.0.8, combined-stream@~1.0.6:
combined-stream@^1.0.6, combined-stream@~1.0.6:
version "1.0.8"
resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.8.tgz#c3d45a8b34fd730631a110a8a2520682b31d5a7f"
integrity sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==
Expand Down Expand Up @@ -1572,11 +1542,6 @@ esutils@^2.0.2:
resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.3.tgz#74d2eb4de0b8da1293711910d50775b9b710ef64"
integrity sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==

event-target-shim@^5.0.0:
version "5.0.1"
resolved "https://registry.yarnpkg.com/event-target-shim/-/event-target-shim-5.0.1.tgz#5d4d3ebdf9583d63a5333ce2deb7480ab2b05789"
integrity sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ==

exec-sh@^0.3.2:
version "0.3.4"
resolved "https://registry.yarnpkg.com/exec-sh/-/exec-sh-0.3.4.tgz#3a018ceb526cc6f6df2bb504b2bfe8e3a4934ec5"
Expand Down Expand Up @@ -1798,15 +1763,6 @@ forever-agent@~0.6.1:
resolved "https://registry.yarnpkg.com/forever-agent/-/forever-agent-0.6.1.tgz#fbc71f0c41adeb37f96c577ad1ed42d8fdacca91"
integrity sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=

form-data@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/form-data/-/form-data-3.0.0.tgz#31b7e39c85f1355b7139ee0c647cf0de7f83c682"
integrity sha512-CKMFDglpbMi6PyN+brwB9Q/GOw0eAnsrEZDgcsH5Krhz5Od/haKHAX0NmQfha2zPPz0JpWzA7GJHGSnvCRLWsg==
dependencies:
asynckit "^0.4.0"
combined-stream "^1.0.8"
mime-types "^2.1.12"

form-data@~2.3.2:
version "2.3.3"
resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.3.3.tgz#dcce52c05f644f298c6a7ab936bd724ceffbf3a6"
Expand Down

0 comments on commit d52d096

Please sign in to comment.