@adobe/helix-onedrive-support 10.0.11 → 10.0.13

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.
@@ -5,7 +5,7 @@ executors:
5
5
  - image: cimg/node:18.16
6
6
 
7
7
  orbs:
8
- codecov: codecov/codecov@3.2.4
8
+ codecov: codecov/codecov@3.2.5
9
9
 
10
10
  commands:
11
11
  setup:
package/CHANGELOG.md CHANGED
@@ -1,3 +1,17 @@
1
+ ## [10.0.13](https://github.com/adobe/helix-onedrive-support/compare/v10.0.12...v10.0.13) (2023-05-28)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * **deps:** update dependency @adobe/helix-shared-tokencache to v1.2.4 ([3c758d3](https://github.com/adobe/helix-onedrive-support/commit/3c758d3551670d6bd86a7d2e1cc2aecc2541cc98))
7
+
8
+ ## [10.0.12](https://github.com/adobe/helix-onedrive-support/compare/v10.0.11...v10.0.12) (2023-05-23)
9
+
10
+
11
+ ### Bug Fixes
12
+
13
+ * retry only when some account was found ([#389](https://github.com/adobe/helix-onedrive-support/issues/389)) ([f581ff5](https://github.com/adobe/helix-onedrive-support/commit/f581ff58b9dc2f8029fcd4c778f74d41a048d085))
14
+
1
15
  ## [10.0.11](https://github.com/adobe/helix-onedrive-support/compare/v10.0.10...v10.0.11) (2023-05-22)
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.11",
3
+ "version": "10.0.13",
4
4
  "description": "Helix OneDrive Support",
5
5
  "main": "src/index.js",
6
6
  "exports": {
@@ -28,7 +28,7 @@
28
28
  "homepage": "https://github.com/adobe/helix-onedrive-support#readme",
29
29
  "dependencies": {
30
30
  "@adobe/fetch": "4.0.13",
31
- "@adobe/helix-shared-tokencache": "1.2.3",
31
+ "@adobe/helix-shared-tokencache": "1.2.4",
32
32
  "@azure/msal-node": "1.17.2",
33
33
  "jose": "4.14.4"
34
34
  },
@@ -36,7 +36,7 @@
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.335.0",
39
+ "@aws-sdk/client-s3": "3.341.0",
40
40
  "ajv": "8.12.0",
41
41
  "c8": "7.13.0",
42
42
  "codecov": "3.8.3",
@@ -282,29 +282,30 @@ export class OneDriveAuth {
282
282
 
283
283
  let accounts = await app.getTokenCache().getAllAccounts();
284
284
  if (accounts.length > 0) {
285
- const account = accounts[0];
285
+ let account = accounts[0];
286
286
 
287
287
  try {
288
288
  return await app.acquireTokenSilent({ account });
289
289
  } catch (e) {
290
290
  this.handleAcquireError(account, e);
291
291
  }
292
- }
293
292
 
294
- // try again with fresh mem cache
295
- if (this.cachePlugin instanceof MemCachePlugin) {
296
- this.cachePlugin.clear();
297
-
298
- accounts = await app.getTokenCache().getAllAccounts();
299
- if (accounts.length > 0) {
300
- const account = accounts[0];
301
- try {
302
- return await app.acquireTokenSilent({
303
- forceRefresh: true,
304
- account,
305
- });
306
- } catch (e) {
307
- this.handleAcquireError(account, e, true);
293
+ // try again with fresh mem cache
294
+ if (this.cachePlugin instanceof MemCachePlugin) {
295
+ this.cachePlugin.clear();
296
+
297
+ accounts = await app.getTokenCache().getAllAccounts();
298
+ if (accounts.length > 0) {
299
+ [account] = accounts;
300
+
301
+ try {
302
+ return await app.acquireTokenSilent({
303
+ forceRefresh: true,
304
+ account,
305
+ });
306
+ } catch (e) {
307
+ this.handleAcquireError(account, e, true);
308
+ }
308
309
  }
309
310
  }
310
311
  }