sfc-utils 1.3.33 → 1.3.34
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.
- package/copy/sheets.js +5 -6
- package/example/project-config.json +1 -1
- package/package.json +1 -1
package/copy/sheets.js
CHANGED
|
@@ -41,18 +41,18 @@ let googleAuth = (project, directory = null, forceStr = false) => {
|
|
|
41
41
|
var auth = null;
|
|
42
42
|
authObj.authenticate({ fallback: false }).then((resp) => {
|
|
43
43
|
auth = resp;
|
|
44
|
-
grabSheets(auth, project, directory, forceStr).catch(() => {
|
|
44
|
+
grabSheets(auth, project, directory, forceStr).then(() => resolveFinal()).catch(() => {
|
|
45
45
|
// If the first attempt failed, then make another req using the fallback
|
|
46
46
|
authObj.authenticate({ fallback: true }).then((resp) => {
|
|
47
47
|
auth = resp;
|
|
48
|
-
grabSheets(auth, project, directory, forceStr).then(() =>
|
|
48
|
+
grabSheets(auth, project, directory, forceStr).then(() => resolveFinal());
|
|
49
49
|
});
|
|
50
|
-
})
|
|
50
|
+
});
|
|
51
51
|
})
|
|
52
52
|
.catch(() => {
|
|
53
53
|
// Failure if we fall back but there's no token
|
|
54
54
|
auth = authObj.task();
|
|
55
|
-
grabSheets(auth, project, directory, forceStr).then(() =>
|
|
55
|
+
grabSheets(auth, project, directory, forceStr).then(() => resolveFinal());
|
|
56
56
|
});
|
|
57
57
|
})
|
|
58
58
|
};
|
|
@@ -79,7 +79,6 @@ let grabSheets = (auth, project, directory, forceStr) => {
|
|
|
79
79
|
});
|
|
80
80
|
promiseStack.push(promiseItem);
|
|
81
81
|
}
|
|
82
|
-
|
|
83
82
|
Promise.all(promiseStack)
|
|
84
83
|
.then(() => {
|
|
85
84
|
// Resolve the whole thing
|
|
@@ -144,8 +143,8 @@ let getSheet = async (resolve, reject, auth, spreadsheetId, directory, forceStr)
|
|
|
144
143
|
console.log(`Saving sheet to ${file_path}`);
|
|
145
144
|
// grunt.file.write(filename, JSON.stringify(out, null, 2));
|
|
146
145
|
writeFile(file_path, JSON.stringify(out, null, 2));
|
|
147
|
-
resolve(file_path);
|
|
148
146
|
}
|
|
147
|
+
resolve("Complete");
|
|
149
148
|
};
|
|
150
149
|
|
|
151
150
|
module.exports = { googleAuth };
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"_comment": "The possible paywall values are 'meter' (hit the paywall after a certain number of free stories), 'paywall' (paywall immediately), 'free' (no wall), or 'meter-no-paywall' (count this against the reader's meter, but never show the paywall on this page)",
|
|
3
3
|
"PAYWALL_SETTING": "meter",
|
|
4
4
|
"EMBEDDED": false,
|
|
5
|
-
"GOOGLE_SHEETS": [],
|
|
5
|
+
"GOOGLE_SHEETS": ["1v2U2iG7lEZHaKRgGTeg6xKlyTjZnu_C5uQ1CLSD5iEw"],
|
|
6
6
|
"GOOGLE_DOCS": [],
|
|
7
7
|
|
|
8
8
|
"_domain_explainer": "NOTE: MAIN_DOMAIN will get swapped out based on the MARKEY_KEY when deployed on the server. If you are building it locally for a repo push, you need to set the domain manually here.",
|