@mcpher/gas-fakes 1.1.2 → 1.1.5

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 CHANGED
@@ -52,7 +52,7 @@ DRIVE_TEST_FILE_ID="add the id of some test file you have access to here"
52
52
  # probably dont need to change these
53
53
  AC=default
54
54
  # these are the scopes set by default - take some of these out if you want to minimize access
55
- DEFAULT_SCOPES="https://www.googleapis.com/auth/userinfo.email,openid,https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/sqlservice.login"
55
+ DEFAULT_SCOPES="https://www.googleapis.com/auth/userinfo.email,openid,https://www.googleapis.com/auth/cloud-platform"
56
56
  EXTRA_SCOPES=",https://www.googleapis.com/auth/drive,https://www.googleapis.com/auth/spreadsheets"
57
57
 
58
58
  # optional logging destination
@@ -60,6 +60,26 @@ EXTRA_SCOPES=",https://www.googleapis.com/auth/drive,https://www.googleapis.com/
60
60
  LOG_DESTINATION="BOTH"
61
61
 
62
62
  ```
63
+ #### Applying the .env
64
+
65
+ You can run
66
+ ```bash
67
+ cd shells
68
+ bash setaccounts.sh
69
+ ```
70
+ Which will set up and test the initial application default login with the selected scopes.
71
+
72
+ #### enabling workspace services
73
+
74
+ You can run this shell to enable all the required cloud services
75
+ ```bash
76
+ cd shells
77
+ bash enable.sh
78
+ ```
79
+
80
+ #### Restricted scopes
81
+
82
+ Recent changes in the OAuth security model have made it more difficult for Application Default credentials to work with all the scopes we'll need to fully emulate Live Apps Script locally. However there is a way to work around this by creating an oauth client for internal use in the cloud console, and injecting its credentials into those used by the application default creadentials process. You should now follow the guidance in [restricted scopes](restricted_scopes.md) to enhance your login process to be able access all the supported services in gas-fakes
63
83
 
64
84
  #### Manifest file
65
85
 
@@ -0,0 +1 @@
1
+ import '../../main.js';
@@ -1,4 +1,4 @@
1
- import '../../main.js';
1
+ import '@mcpher/gas-fakes';
2
2
  const res1 = Sheets.Spreadsheets.create({ properties: { title: "sample" } });
3
3
  const res2 = Sheets.Spreadsheets.get(res1.spreadsheetId);
4
4
  console.log(res2);