Skip to content

Interactive interface for browsing global, full-resolution satellite imagery

Revert Build Process & Fix GTM (#4509)

Ryan Weilerc7c732232550
diff --git a/tasks/build-options/getCapabilities.js b/tasks/build-options/getCapabilities.js
index b2d31943d..8ff825ab7 100644
--- a/tasks/build-options/getCapabilities.js
+++ b/tasks/build-options/getCapabilities.js
@@ -64,18 +64,13 @@ async function getCapabilities () {
// Download each GC xml using the "from" attribute and put it in the "to" location
if (Object.prototype.hasOwnProperty.call(config, 'wv-options-fetch')) {
const fetchValues = config['wv-options-fetch']
- // Perform fetchConfigs and processGetCapabilities seperately so that each batch can be done in parallel
- await Promise.all(fetchValues.map(async (value) => {
+ for (const value of fetchValues) {
const inputFile = value.from
const outputFile = `${outputDir}/${value.to}`
- return fetchConfigs(inputFile, outputFile)
- }))
- await Promise.all(fetchValues.map(async (value) => {
- const outputFile = `${outputDir}/${value.to}`
-
- return processGetCapabilities(outputFile)
- }))
+ await fetchConfigs(inputFile, outputFile)
+ await processGetCapabilities(outputFile)
+ }
}
}
@@ -178,9 +173,9 @@ async function gatherProcess (type, typeStr, dir, ext) {
if (!fs.existsSync(dir)) {
fs.mkdirSync(dir)
}
- await Promise.all(Object.values(type).map((link) => {
- return processMetadata(link, dir, ext)
- }))
+ Object.values(type).forEach(async (link) => {
+ await processMetadata(link, dir, ext)
+ })
}
main().catch((err) => {
diff --git a/tasks/build-options/getVisMetadata.js b/tasks/build-options/getVisMetadata.js
index 17582bcf2..6c2433138 100644
--- a/tasks/build-options/getVisMetadata.js
+++ b/tasks/build-options/getVisMetadata.js
@@ -85,9 +85,9 @@ async function main (url) {
layerOrder = layerOrder.filter(x => !skipLayers.includes(x))
console.warn(`${prog}: Fetching ${layerOrder.length} layer-metadata files`)
- await Promise.all(layerOrder.map((layerId) => {
- return getMetadata(layerId, url)
- }))
+ for (layerId of layerOrder) {
+ await getMetadata(layerId, url)
+ }
const layers = Object.keys(layerMetadata).sort().reduce(
(obj, key) => {
diff --git a/web/index.html b/web/index.html
index 5c853db13..4f53fce8f 100644
--- a/web/index.html
+++ b/web/index.html
@@ -16,7 +16,7 @@ Licensed under the NASA Open Source Agreement, Version 1.3 (https://opensource.g
(function (w, d, s, l, i) {
w[l] = w[l] || []; w[l].push({
'gtm.start':
- new Date().getTime(), event: '.js'
+ new Date().getTime(), event: 'gtm.js'
}); var f = d.getElementsByTagName(s)[0],
j = d.createElement(s), dl = l != 'dataLayer' ? '&l=' + l : ''; j.async = true; j.src =
'https://www.googletagmanager.com/.js?id=' + i + dl; f.parentNode.insertBefore(j, f);