sfc-utils 1.3.27 → 1.3.28
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/README.md +4 -2
- package/copy/c2p_sheet.js +7 -7
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -35,16 +35,18 @@ You can still install what's on master by running `npm i git+https://github.com/
|
|
|
35
35
|
|
|
36
36
|
## Updating utils
|
|
37
37
|
|
|
38
|
-
|
|
38
|
+
Create an npm account and ask Evan to add you as a maintainer. You MUST enable two-factor on your account to push updates. Once you are all set, these are the steps:
|
|
39
39
|
|
|
40
40
|
1. Make sure you've incremented the version number in package.json.
|
|
41
41
|
|
|
42
42
|
1. Update the master branch with changes you want to push.
|
|
43
43
|
|
|
44
|
-
1. Log in to npm via the terminal with `npm login
|
|
44
|
+
1. Log in to npm via the terminal with `npm login` (this only needs to be done once).
|
|
45
45
|
|
|
46
46
|
1. Run `npm publish`.
|
|
47
47
|
|
|
48
|
+
If you want to publish a version of utils that should only be `beta`, not the default install version, then run `npm publish --tag beta` instead. Then when installing, you must target the new version directly: `npm i sfc-utils@1.3.24`
|
|
49
|
+
|
|
48
50
|
|
|
49
51
|
## Import the functions
|
|
50
52
|
|
package/copy/c2p_sheet.js
CHANGED
|
@@ -17,24 +17,24 @@ var path = require("path");
|
|
|
17
17
|
// let configData = JSON.parse(config)
|
|
18
18
|
|
|
19
19
|
let googleAuth = (configData) => {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
.authenticate({ fallback: false })
|
|
23
|
-
.then((resp) => {
|
|
20
|
+
return new Promise(resolve => {
|
|
21
|
+
var auth = null;
|
|
22
|
+
authObj.authenticate({ fallback: false }).then((resp) => {
|
|
24
23
|
auth = resp;
|
|
25
|
-
createSheet(auth, false, configData).catch(() => {
|
|
24
|
+
createSheet(auth, false, configData).then(() => {resolve()}).catch(() => {
|
|
26
25
|
// If the first attempt failed, then make another req using the fallback
|
|
27
26
|
authObj.authenticate({ fallback: true }).then((resp) => {
|
|
28
27
|
auth = resp;
|
|
29
|
-
createSheet(auth, true, configData);
|
|
28
|
+
createSheet(auth, true, configData).then(() => {resolve()});
|
|
30
29
|
});
|
|
31
30
|
});
|
|
32
31
|
})
|
|
33
32
|
.catch(() => {
|
|
34
33
|
// Failure if we fall back but there's no token
|
|
35
34
|
auth = authObj.task();
|
|
36
|
-
createSheet(auth, true, configData);
|
|
35
|
+
createSheet(auth, true, configData).then(() => {resolve()});
|
|
37
36
|
});
|
|
37
|
+
})
|
|
38
38
|
};
|
|
39
39
|
|
|
40
40
|
let createSheet = (auth, fallback, configData) => {
|