sfc-utils 1.3.32 → 1.3.33
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 +4 -4
- package/package.json +1 -1
package/copy/sheets.js
CHANGED
|
@@ -37,7 +37,7 @@ var cast = function (str, forceStr) {
|
|
|
37
37
|
};
|
|
38
38
|
|
|
39
39
|
let googleAuth = (project, directory = null, forceStr = false) => {
|
|
40
|
-
return new Promise(
|
|
40
|
+
return new Promise(resolveFinal => {
|
|
41
41
|
var auth = null;
|
|
42
42
|
authObj.authenticate({ fallback: false }).then((resp) => {
|
|
43
43
|
auth = resp;
|
|
@@ -45,14 +45,14 @@ let googleAuth = (project, directory = null, forceStr = false) => {
|
|
|
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(() => {console.log("RES 1"); return resolveFinal();});
|
|
49
49
|
});
|
|
50
|
-
}).then(() =>
|
|
50
|
+
}).then(() => {console.log("RES 2"); return resolveFinal();});
|
|
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(() => {console.log("RES 3"); return resolveFinal();});
|
|
56
56
|
});
|
|
57
57
|
})
|
|
58
58
|
};
|