Skip to content

Interactive interface for browsing global, full-resolution satellite imagery

WV-2544 linkcheck (#4221)

Tom Cariello5ba14f9b38d0
diff --git a/package-lock.json b/package-lock.json
index 52b2652cd..393bb1a0f 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -115,7 +115,7 @@
"jest-environment-jsdom": "^29.5.0",
"mini-css-extract-plugin": "^2.7.5",
"node-dir": "^0.1.17",
- "node-fetch": "^3.3.1",
+ "node-fetch": "2.6.9",
"node-ssh": "^13.1.0",
"npm-run-all": "^4.1.5",
"patch-package": "^6.5.1",
@@ -6079,13 +6079,6 @@
"dev": true,
"license": "BSD-2-Clause"
},
- "node_modules/data-uri-to-buffer": {
- "version": "4.0.1",
- "license": "MIT",
- "engines": {
- "node": ">= 12"
- }
- },
"node_modules/data-urls": {
"version": "3.0.2",
"dev": true,
@@ -7804,27 +7797,6 @@
"bser": "2.1.1"
}
},
- "node_modules/fetch-blob": {
- "version": "3.2.0",
- "funding": [
- {
- "type": "github",
- "url": "https://github.com/sponsors/jimmywarting"
- },
- {
- "type": "paypal",
- "url": "https://paypal.me/jimmywarting"
- }
- ],
- "license": "MIT",
- "dependencies": {
- "node-domexception": "^1.0.0",
- "web-streams-polyfill": "^3.0.3"
- },
- "engines": {
- "node": "^12.20 || >= 14.13"
- }
- },
"node_modules/fetch-mock": {
"version": "9.11.0",
"dev": true,
@@ -8021,16 +7993,6 @@
"node": ">= 6"
}
},
- "node_modules/formdata-polyfill": {
- "version": "4.0.10",
- "license": "MIT",
- "dependencies": {
- "fetch-blob": "^3.1.2"
- },
- "engines": {
- "node": ">=12.20.0"
- }
- },
"node_modules/forwarded": {
"version": "0.2.0",
"dev": true,
@@ -11998,37 +11960,42 @@
"node": ">= 0.10.5"
}
},
- "node_modules/node-domexception": {
- "version": "1.0.0",
- "funding": [
- {
- "type": "github",
- "url": "https://github.com/sponsors/jimmywarting"
- },
- {
- "type": "github",
- "url": "https://paypal.me/jimmywarting"
- }
- ],
- "license": "MIT",
- "engines": {
- "node": ">=10.5.0"
- }
- },
"node_modules/node-fetch": {
- "version": "3.3.1",
- "license": "MIT",
+ "version": "2.6.9",
+ "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.9.tgz",
+ "integrity": "sha512-DJm/CJkZkRjKKj4Zi4BsKVZh3ValV5IR5s7LVZnW+6YMh0W1BfNA8XSs6DLMGYlId5F3KnA70uu2qepcR08Qqg==",
"dependencies": {
- "data-uri-to-buffer": "^4.0.0",
- "fetch-blob": "^3.1.4",
- "formdata-polyfill": "^4.0.10"
+ "whatwg-url": "^5.0.0"
},
"engines": {
- "node": "^12.20.0 || ^14.13.1 || >=16.0.0"
+ "node": "4.x || >=6.0.0"
},
- "funding": {
- "type": "opencollective",
- "url": "https://opencollective.com/node-fetch"
+ "peerDependencies": {
+ "encoding": "^0.1.0"
+ },
+ "peerDependenciesMeta": {
+ "encoding": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/node-fetch/node_modules/tr46": {
+ "version": "0.0.3",
+ "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz",
+ "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw=="
+ },
+ "node_modules/node-fetch/node_modules/webidl-conversions": {
+ "version": "3.0.1",
+ "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz",
+ "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ=="
+ },
+ "node_modules/node-fetch/node_modules/whatwg-url": {
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz",
+ "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==",
+ "dependencies": {
+ "tr46": "~0.0.3",
+ "webidl-conversions": "^3.0.0"
}
},
"node_modules/node-forge": {
@@ -16810,13 +16777,6 @@
"minimalistic-assert": "^1.0.0"
}
},
- "node_modules/web-streams-polyfill": {
- "version": "3.2.1",
- "license": "MIT",
- "engines": {
- "node": ">= 8"
- }
- },
"node_modules/web-worker": {
"version": "1.2.0",
"license": "Apache-2.0"
@@ -21521,9 +21481,6 @@
"version": "1.0.8",
"dev": true
},
- "data-uri-to-buffer": {
- "version": "4.0.1"
- },
"data-urls": {
"version": "3.0.2",
"dev": true,
@@ -22605,13 +22562,6 @@
"bser": "2.1.1"
}
},
- "fetch-blob": {
- "version": "3.2.0",
- "requires": {
- "node-domexception": "^1.0.0",
- "web-streams-polyfill": "^3.0.3"
- }
- },
"fetch-mock": {
"version": "9.11.0",
"dev": true,
@@ -22738,12 +22688,6 @@
"mime-types": "^2.1.12"
}
},
- "formdata-polyfill": {
- "version": "4.0.10",
- "requires": {
- "fetch-blob": "^3.1.2"
- }
- },
"forwarded": {
"version": "0.2.0",
"dev": true
@@ -25222,15 +25166,33 @@
"minimatch": "^3.0.2"
}
},
- "node-domexception": {
- "version": "1.0.0"
- },
"node-fetch": {
- "version": "3.3.1",
+ "version": "2.6.9",
+ "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.9.tgz",
+ "integrity": "sha512-DJm/CJkZkRjKKj4Zi4BsKVZh3ValV5IR5s7LVZnW+6YMh0W1BfNA8XSs6DLMGYlId5F3KnA70uu2qepcR08Qqg==",
"requires": {
- "data-uri-to-buffer": "^4.0.0",
- "fetch-blob": "^3.1.4",
- "formdata-polyfill": "^4.0.10"
+ "whatwg-url": "^5.0.0"
+ },
+ "dependencies": {
+ "tr46": {
+ "version": "0.0.3",
+ "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz",
+ "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw=="
+ },
+ "webidl-conversions": {
+ "version": "3.0.1",
+ "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz",
+ "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ=="
+ },
+ "whatwg-url": {
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz",
+ "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==",
+ "requires": {
+ "tr46": "~0.0.3",
+ "webidl-conversions": "^3.0.0"
+ }
+ }
}
},
"node-forge": {
@@ -28288,9 +28250,6 @@
"minimalistic-assert": "^1.0.0"
}
},
- "web-streams-polyfill": {
- "version": "3.2.1"
- },
"web-worker": {
"version": "1.2.0"
},
diff --git a/package.json b/package.json
index 6976bc854..4ffc471e8 100644
--- a/package.json
+++ b/package.json
@@ -117,7 +117,7 @@
"jest-environment-jsdom": "^29.5.0",
"mini-css-extract-plugin": "^2.7.5",
"node-dir": "^0.1.17",
- "node-fetch": "^3.3.1",
+ "node-fetch": "2.6.9",
"node-ssh": "^13.1.0",
"npm-run-all": "^4.1.5",
"patch-package": "^6.5.1",
diff --git a/tasks/bamboo/linkReport.sh b/tasks/bamboo/linkReport.sh
old mode 100644
new mode 100755
index 47b46236f..7db67e866
--- a/tasks/bamboo/linkReport.sh
+++ b/tasks/bamboo/linkReport.sh
@@ -1,6 +1,17 @@
#!/bin/bash
-# TODO: this is a placeholder for the link-check ci/cd plan (to be built) that
-# will run once a month
-npm ci --production=false --ignore-scripts
-node $BASE/tasks/link-check/index.js
+# This script installs NODE, checks out & builds Worldview, & then runs the linkcheck test
+# This script runs monthly as specified in Bamboo
+# The resulting report is emailed to recipients specified in Bamboo
+set -e -x
+
+# Install node.js
+NODE_VERSION=v18.15.0
+curl -O https://nodejs.org/dist/${NODE_VERSION}/node-${NODE_VERSION}-linux-x64.tar.gz
+tar xf node-${NODE_VERSION}-linux-x64.tar.gz &&
+export PATH=$(pwd)/node-${NODE_VERSION}-linux-x64/bin:${PATH}
+
+# builds project and runs tests
+npm install
+npm run build
+npm run linkcheck
\ No newline at end of file