@adobe/helix-onedrive-support 10.0.8 → 10.0.10

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,17 @@
1
+ ## [10.0.10](https://github.com/adobe/helix-onedrive-support/compare/v10.0.9...v10.0.10) (2023-05-22)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * refresh base when MemCache is cleared ([#387](https://github.com/adobe/helix-onedrive-support/issues/387)) ([094bdc3](https://github.com/adobe/helix-onedrive-support/commit/094bdc33d4470b3032e049ecb3aa249d95c6ece5))
7
+
8
+ ## [10.0.9](https://github.com/adobe/helix-onedrive-support/compare/v10.0.8...v10.0.9) (2023-05-18)
9
+
10
+
11
+ ### Bug Fixes
12
+
13
+ * **deps:** update dependency @adobe/fetch to v4.0.13 ([a635d60](https://github.com/adobe/helix-onedrive-support/commit/a635d6075e6abcae1386f912ca303e08a6b0efe2))
14
+
1
15
  ## [10.0.8](https://github.com/adobe/helix-onedrive-support/compare/v10.0.7...v10.0.8) (2023-05-14)
2
16
 
3
17
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adobe/helix-onedrive-support",
3
- "version": "10.0.8",
3
+ "version": "10.0.10",
4
4
  "description": "Helix OneDrive Support",
5
5
  "main": "src/index.js",
6
6
  "exports": {
@@ -27,7 +27,7 @@
27
27
  },
28
28
  "homepage": "https://github.com/adobe/helix-onedrive-support#readme",
29
29
  "dependencies": {
30
- "@adobe/fetch": "4.0.12",
30
+ "@adobe/fetch": "4.0.13",
31
31
  "@adobe/helix-shared-tokencache": "1.2.2",
32
32
  "@azure/msal-node": "1.17.2",
33
33
  "jose": "4.14.4"
@@ -36,12 +36,12 @@
36
36
  "@adobe/eslint-config-helix": "2.0.2",
37
37
  "@semantic-release/changelog": "6.0.3",
38
38
  "@semantic-release/git": "10.0.1",
39
- "@aws-sdk/client-s3": "3.332.0",
39
+ "@aws-sdk/client-s3": "3.335.0",
40
40
  "ajv": "8.12.0",
41
41
  "c8": "7.13.0",
42
42
  "codecov": "3.8.3",
43
43
  "dotenv": "16.0.3",
44
- "eslint": "8.40.0",
44
+ "eslint": "8.41.0",
45
45
  "eslint-plugin-header": "3.1.1",
46
46
  "eslint-plugin-import": "2.27.5",
47
47
  "husky": "8.0.3",
@@ -53,7 +53,7 @@
53
53
  "mocha": "10.2.0",
54
54
  "mocha-multi-reporters": "1.5.1",
55
55
  "nock": "13.3.1",
56
- "npm": "9.6.6",
56
+ "npm": "9.6.7",
57
57
  "semantic-release": "21.0.2"
58
58
  },
59
59
  "lint-staged": {
@@ -280,7 +280,7 @@ export class OneDriveAuth {
280
280
  async doAuthenticate(silentOnly) {
281
281
  const { log, app } = this;
282
282
 
283
- const accounts = await app.getTokenCache().getAllAccounts();
283
+ let accounts = await app.getTokenCache().getAllAccounts();
284
284
  if (accounts.length > 0) {
285
285
  const account = accounts[0];
286
286
 
@@ -289,10 +289,15 @@ export class OneDriveAuth {
289
289
  } catch (e) {
290
290
  this.handleAcquireError(account, e);
291
291
  }
292
+ }
293
+
294
+ // try again with fresh mem cache
295
+ if (this.cachePlugin instanceof MemCachePlugin) {
296
+ this.cachePlugin.clear();
292
297
 
293
- // try again with fresh mem cache
294
- if (this.cachePlugin instanceof MemCachePlugin) {
295
- this.cachePlugin.clear();
298
+ accounts = await app.getTokenCache().getAllAccounts();
299
+ if (accounts.length > 0) {
300
+ const account = accounts[0];
296
301
  try {
297
302
  return await app.acquireTokenSilent({
298
303
  forceRefresh: true,
@@ -303,6 +308,7 @@ export class OneDriveAuth {
303
308
  }
304
309
  }
305
310
  }
311
+
306
312
  if (silentOnly) {
307
313
  return null;
308
314
  }