@adobe/helix-google-support 1.3.2 → 1.4.0

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/CHANGELOG.md CHANGED
@@ -1,3 +1,24 @@
1
+ # [1.4.0](https://github.com/adobe/helix-google-support/compare/v1.3.4...v1.4.0) (2022-05-04)
2
+
3
+
4
+ ### Features
5
+
6
+ * log token cache operations ([#18](https://github.com/adobe/helix-google-support/issues/18)) ([8ceb35d](https://github.com/adobe/helix-google-support/commit/8ceb35db0856da3c28992fb435e6409341775456))
7
+
8
+ ## [1.3.4](https://github.com/adobe/helix-google-support/compare/v1.3.3...v1.3.4) (2022-05-04)
9
+
10
+
11
+ ### Bug Fixes
12
+
13
+ * use latest onedrive support ([6a266ff](https://github.com/adobe/helix-google-support/commit/6a266ff3e692f32a938daf405c475c8d0325773f))
14
+
15
+ ## [1.3.3](https://github.com/adobe/helix-google-support/compare/v1.3.2...v1.3.3) (2022-05-03)
16
+
17
+
18
+ ### Bug Fixes
19
+
20
+ * more fixes ([#17](https://github.com/adobe/helix-google-support/issues/17)) ([87b3ea8](https://github.com/adobe/helix-google-support/commit/87b3ea8a4621a8773d072d20be33e2b5d4ce2e54))
21
+
1
22
  ## [1.3.2](https://github.com/adobe/helix-google-support/compare/v1.3.1...v1.3.2) (2022-04-30)
2
23
 
3
24
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adobe/helix-google-support",
3
- "version": "1.3.2",
3
+ "version": "1.4.0",
4
4
  "description": "Helix Google Support",
5
5
  "main": "src/index.js",
6
6
  "type": "module",
@@ -31,7 +31,7 @@
31
31
  "reporter-options": "configFile=.mocha-multi.json"
32
32
  },
33
33
  "dependencies": {
34
- "@adobe/helix-onedrive-support": "https://github.com/adobe/helix-onedrive-support.git#d279dda0abdc05df14628d45a7c716042d94ec45",
34
+ "@adobe/helix-onedrive-support": "8.0.0",
35
35
  "googleapis": "100.0.0",
36
36
  "lru-cache": "7.9.0"
37
37
  },
@@ -48,7 +48,7 @@
48
48
  "husky": "7.0.4",
49
49
  "junit-report-builder": "3.0.0",
50
50
  "lint-staged": "12.4.1",
51
- "mocha": "9.2.2",
51
+ "mocha": "10.0.0",
52
52
  "mocha-multi-reporters": "1.5.1",
53
53
  "nock": "13.2.4",
54
54
  "semantic-release": "19.0.2"
@@ -40,12 +40,25 @@ export class GoogleTokenCache {
40
40
  this.tokens = JSON.parse(str);
41
41
  }
42
42
 
43
+ logTokens(msg) {
44
+ const {
45
+ access_token: accessToken,
46
+ refresh_token: refreshToken,
47
+ expiry_date: expiryDate,
48
+ } = this.tokens;
49
+ const exp = expiryDate ? new Date(expiryDate).toISOString() : '?';
50
+ this.log.info(`${msg}: access_token=${accessToken ? '***' : '?'} refresh_token=${refreshToken ? '***' : '?'} expires=${exp}`);
51
+ }
52
+
43
53
  async load() {
44
- return this.plugin.beforeCacheAccess(this.context);
54
+ const ret = await this.plugin.beforeCacheAccess(this.context);
55
+ this.logTokens('GoogleTokenCache loaded');
56
+ return ret;
45
57
  }
46
58
 
47
59
  async store(tokens) {
48
60
  this.tokens = tokens;
61
+ this.logTokens('GoogleTokenCache stored');
49
62
  this.context.cacheHasChanged = true;
50
63
  try {
51
64
  await this.plugin.afterCacheAccess(this.context);