@azure/msal-browser 2.33.0 → 2.35.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.
Files changed (96) hide show
  1. package/README.md +1 -1
  2. package/dist/_virtual/_tslib.js +1 -1
  3. package/dist/app/ClientApplication.d.ts +2 -2
  4. package/dist/app/ClientApplication.d.ts.map +1 -1
  5. package/dist/app/ClientApplication.js +49 -36
  6. package/dist/app/ClientApplication.js.map +1 -1
  7. package/dist/app/IPublicClientApplication.js +1 -1
  8. package/dist/app/PublicClientApplication.d.ts.map +1 -1
  9. package/dist/app/PublicClientApplication.js +1 -6
  10. package/dist/app/PublicClientApplication.js.map +1 -1
  11. package/dist/broker/nativeBroker/NativeMessageHandler.d.ts +10 -7
  12. package/dist/broker/nativeBroker/NativeMessageHandler.d.ts.map +1 -1
  13. package/dist/broker/nativeBroker/NativeMessageHandler.js +18 -8
  14. package/dist/broker/nativeBroker/NativeMessageHandler.js.map +1 -1
  15. package/dist/cache/AsyncMemoryStorage.js +1 -1
  16. package/dist/cache/BrowserCacheManager.d.ts +60 -2
  17. package/dist/cache/BrowserCacheManager.d.ts.map +1 -1
  18. package/dist/cache/BrowserCacheManager.js +310 -9
  19. package/dist/cache/BrowserCacheManager.js.map +1 -1
  20. package/dist/cache/BrowserStorage.js +1 -1
  21. package/dist/cache/CryptoKeyStore.js +1 -1
  22. package/dist/cache/DatabaseStorage.js +1 -1
  23. package/dist/cache/MemoryStorage.js +1 -1
  24. package/dist/cache/TokenCache.js +1 -1
  25. package/dist/config/Configuration.d.ts +4 -0
  26. package/dist/config/Configuration.d.ts.map +1 -1
  27. package/dist/config/Configuration.js +4 -2
  28. package/dist/config/Configuration.js.map +1 -1
  29. package/dist/crypto/BrowserCrypto.js +1 -1
  30. package/dist/crypto/CryptoOps.js +1 -1
  31. package/dist/crypto/GuidGenerator.js +1 -1
  32. package/dist/crypto/ModernBrowserCrypto.js +1 -1
  33. package/dist/crypto/MsBrowserCrypto.js +1 -1
  34. package/dist/crypto/MsrBrowserCrypto.js +1 -1
  35. package/dist/crypto/PkceGenerator.js +1 -1
  36. package/dist/crypto/SignedHttpRequest.js +1 -1
  37. package/dist/encode/Base64Decode.js +1 -1
  38. package/dist/encode/Base64Encode.js +1 -1
  39. package/dist/error/BrowserAuthError.d.ts +8 -0
  40. package/dist/error/BrowserAuthError.d.ts.map +1 -1
  41. package/dist/error/BrowserAuthError.js +11 -1
  42. package/dist/error/BrowserAuthError.js.map +1 -1
  43. package/dist/error/BrowserConfigurationAuthError.js +1 -1
  44. package/dist/error/NativeAuthError.js +1 -1
  45. package/dist/event/EventHandler.js +1 -1
  46. package/dist/event/EventMessage.js +1 -1
  47. package/dist/event/EventType.js +1 -1
  48. package/dist/index.cjs.js +1388 -816
  49. package/dist/index.cjs.js.map +1 -1
  50. package/dist/index.js +1 -1
  51. package/dist/interaction_client/BaseInteractionClient.js +1 -1
  52. package/dist/interaction_client/HybridSpaAuthorizationCodeClient.js +1 -1
  53. package/dist/interaction_client/NativeInteractionClient.d.ts +66 -3
  54. package/dist/interaction_client/NativeInteractionClient.d.ts.map +1 -1
  55. package/dist/interaction_client/NativeInteractionClient.js +177 -72
  56. package/dist/interaction_client/NativeInteractionClient.js.map +1 -1
  57. package/dist/interaction_client/PopupClient.js +1 -1
  58. package/dist/interaction_client/RedirectClient.js +1 -1
  59. package/dist/interaction_client/SilentAuthCodeClient.js +1 -1
  60. package/dist/interaction_client/SilentCacheClient.js +1 -1
  61. package/dist/interaction_client/SilentIframeClient.js +1 -1
  62. package/dist/interaction_client/SilentRefreshClient.js +1 -1
  63. package/dist/interaction_client/StandardInteractionClient.js +1 -1
  64. package/dist/interaction_handler/InteractionHandler.js +1 -1
  65. package/dist/interaction_handler/RedirectHandler.js +1 -1
  66. package/dist/interaction_handler/SilentHandler.js +1 -1
  67. package/dist/internals.d.ts +3 -0
  68. package/dist/internals.d.ts.map +1 -1
  69. package/dist/internals.js +2 -1
  70. package/dist/internals.js.map +1 -1
  71. package/dist/navigation/NavigationClient.js +1 -1
  72. package/dist/network/FetchClient.js +1 -1
  73. package/dist/network/XhrClient.js +1 -1
  74. package/dist/packageMetadata.d.ts +1 -1
  75. package/dist/packageMetadata.js +2 -2
  76. package/dist/packageMetadata.js.map +1 -1
  77. package/dist/telemetry/BrowserPerformanceClient.d.ts +5 -3
  78. package/dist/telemetry/BrowserPerformanceClient.d.ts.map +1 -1
  79. package/dist/telemetry/BrowserPerformanceClient.js +37 -16
  80. package/dist/telemetry/BrowserPerformanceClient.js.map +1 -1
  81. package/dist/telemetry/BrowserPerformanceMeasurement.d.ts +14 -5
  82. package/dist/telemetry/BrowserPerformanceMeasurement.d.ts.map +1 -1
  83. package/dist/telemetry/BrowserPerformanceMeasurement.js +36 -4
  84. package/dist/telemetry/BrowserPerformanceMeasurement.js.map +1 -1
  85. package/dist/utils/BrowserConstants.d.ts +4 -0
  86. package/dist/utils/BrowserConstants.d.ts.map +1 -1
  87. package/dist/utils/BrowserConstants.js +7 -2
  88. package/dist/utils/BrowserConstants.js.map +1 -1
  89. package/dist/utils/BrowserProtocolUtils.js +1 -1
  90. package/dist/utils/BrowserStringUtils.js +1 -1
  91. package/dist/utils/BrowserUtils.js +1 -1
  92. package/dist/utils/MathUtils.js +1 -1
  93. package/lib/msal-browser.js +1388 -816
  94. package/lib/msal-browser.js.map +1 -1
  95. package/lib/msal-browser.min.js +38 -40
  96. package/package.json +2 -2
@@ -1,4 +1,4 @@
1
- /*! @azure/msal-browser v2.33.0 2023-02-06 */
1
+ /*! @azure/msal-browser v2.35.0 2023-04-03 */
2
2
  'use strict';
3
3
  import { __extends, __awaiter, __generator, __assign } from '../_virtual/_tslib.js';
4
4
  import { OIDC_DEFAULT_SCOPES, StringUtils, UrlString, Constants, AuthError, ThrottlingUtils, ProtocolUtils, PerformanceEvents } from '@azure/msal-common';
@@ -1,4 +1,4 @@
1
- /*! @azure/msal-browser v2.33.0 2023-02-06 */
1
+ /*! @azure/msal-browser v2.35.0 2023-04-03 */
2
2
  'use strict';
3
3
  import { __extends, __awaiter, __generator, __assign } from '../_virtual/_tslib.js';
4
4
  import { UrlString, AuthError, PerformanceEvents, Constants, ThrottlingUtils, ProtocolUtils } from '@azure/msal-common';
@@ -1,4 +1,4 @@
1
- /*! @azure/msal-browser v2.33.0 2023-02-06 */
1
+ /*! @azure/msal-browser v2.35.0 2023-04-03 */
2
2
  'use strict';
3
3
  import { __extends, __awaiter, __generator, __assign } from '../_virtual/_tslib.js';
4
4
  import { AuthError, PerformanceEvents, Constants } from '@azure/msal-common';
@@ -1,4 +1,4 @@
1
- /*! @azure/msal-browser v2.33.0 2023-02-06 */
1
+ /*! @azure/msal-browser v2.35.0 2023-04-03 */
2
2
  'use strict';
3
3
  import { __extends, __awaiter, __generator, __assign } from '../_virtual/_tslib.js';
4
4
  import { StandardInteractionClient } from './StandardInteractionClient.js';
@@ -1,4 +1,4 @@
1
- /*! @azure/msal-browser v2.33.0 2023-02-06 */
1
+ /*! @azure/msal-browser v2.35.0 2023-04-03 */
2
2
  'use strict';
3
3
  import { __extends, __awaiter, __generator, __assign } from '../_virtual/_tslib.js';
4
4
  import { AuthError, PerformanceEvents, Constants, StringUtils, PromptValue, UrlString, ProtocolUtils } from '@azure/msal-common';
@@ -1,4 +1,4 @@
1
- /*! @azure/msal-browser v2.33.0 2023-02-06 */
1
+ /*! @azure/msal-browser v2.35.0 2023-04-03 */
2
2
  'use strict';
3
3
  import { __extends, __awaiter, __generator, __assign } from '../_virtual/_tslib.js';
4
4
  import { StandardInteractionClient } from './StandardInteractionClient.js';
@@ -1,4 +1,4 @@
1
- /*! @azure/msal-browser v2.33.0 2023-02-06 */
1
+ /*! @azure/msal-browser v2.35.0 2023-04-03 */
2
2
  'use strict';
3
3
  import { __extends, __awaiter, __generator, __assign } from '../_virtual/_tslib.js';
4
4
  import { UrlString, Constants, PerformanceEvents, AuthorizationCodeClient, Authority, AuthorityFactory, ResponseMode, StringUtils, ProtocolUtils } from '@azure/msal-common';
@@ -1,4 +1,4 @@
1
- /*! @azure/msal-browser v2.33.0 2023-02-06 */
1
+ /*! @azure/msal-browser v2.35.0 2023-04-03 */
2
2
  'use strict';
3
3
  import { __awaiter, __generator } from '../_virtual/_tslib.js';
4
4
  import { PerformanceEvents, StringUtils, ClientAuthError, ServerError, AuthorityFactory } from '@azure/msal-common';
@@ -1,4 +1,4 @@
1
- /*! @azure/msal-browser v2.33.0 2023-02-06 */
1
+ /*! @azure/msal-browser v2.35.0 2023-04-03 */
2
2
  'use strict';
3
3
  import { __extends, __awaiter, __generator } from '../_virtual/_tslib.js';
4
4
  import { StringUtils, ClientAuthError, ServerError } from '@azure/msal-common';
@@ -1,4 +1,4 @@
1
- /*! @azure/msal-browser v2.33.0 2023-02-06 */
1
+ /*! @azure/msal-browser v2.35.0 2023-04-03 */
2
2
  'use strict';
3
3
  import { __extends, __awaiter, __generator } from '../_virtual/_tslib.js';
4
4
  import { PerformanceEvents, StringUtils, Constants, UrlString } from '@azure/msal-common';
@@ -9,6 +9,7 @@ export { PopupClient } from "./interaction_client/PopupClient";
9
9
  export { SilentIframeClient } from "./interaction_client/SilentIframeClient";
10
10
  export { SilentCacheClient } from "./interaction_client/SilentCacheClient";
11
11
  export { SilentRefreshClient } from "./interaction_client/SilentRefreshClient";
12
+ export { NativeInteractionClient } from "./interaction_client/NativeInteractionClient";
12
13
  export { RedirectHandler } from "./interaction_handler/RedirectHandler";
13
14
  export { EventHandler } from "./event/EventHandler";
14
15
  export { NativeMessageHandler } from "./broker/nativeBroker/NativeMessageHandler";
@@ -18,4 +19,6 @@ export { CryptoOps } from "./crypto/CryptoOps";
18
19
  export { NativeAuthError } from "./error/NativeAuthError";
19
20
  export { BrowserPerformanceClient } from "./telemetry/BrowserPerformanceClient";
20
21
  export { BrowserPerformanceMeasurement } from "./telemetry/BrowserPerformanceMeasurement";
22
+ export { NativeTokenRequest } from "./broker/nativeBroker/NativeRequest";
23
+ export { NativeResponse, MATS } from "./broker/nativeBroker/NativeResponse";
21
24
  //# sourceMappingURL=internals.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"internals.d.ts","sourceRoot":"","sources":["../src/internals.ts"],"names":[],"mappings":"AAKA;;;GAGG;AAGH,OAAO,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AAGlE,OAAO,EAAE,yBAAyB,EAAE,MAAM,gDAAgD,CAAC;AAC3F,OAAO,EAAE,cAAc,EAAE,MAAM,qCAAqC,CAAC;AACrE,OAAO,EAAE,WAAW,EAAE,MAAM,kCAAkC,CAAC;AAC/D,OAAO,EAAE,kBAAkB,EAAE,MAAM,yCAAyC,CAAC;AAC7E,OAAO,EAAE,iBAAiB,EAAE,MAAM,wCAAwC,CAAC;AAC3E,OAAO,EAAE,mBAAmB,EAAE,MAAM,0CAA0C,CAAC;AAG/E,OAAO,EAAE,eAAe,EAAE,MAAM,uCAAuC,CAAC;AACxE,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACpD,OAAO,EAAE,oBAAoB,EAAE,MAAM,4CAA4C,CAAC;AAGlF,OAAO,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAC;AAClE,OAAO,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAGhF,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAG/C,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAG1D,OAAO,EAAE,wBAAwB,EAAE,MAAM,sCAAsC,CAAC;AAChF,OAAO,EAAE,6BAA6B,EAAE,MAAM,2CAA2C,CAAC"}
1
+ {"version":3,"file":"internals.d.ts","sourceRoot":"","sources":["../src/internals.ts"],"names":[],"mappings":"AAKA;;;GAGG;AAGH,OAAO,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AAGlE,OAAO,EAAE,yBAAyB,EAAE,MAAM,gDAAgD,CAAC;AAC3F,OAAO,EAAE,cAAc,EAAE,MAAM,qCAAqC,CAAC;AACrE,OAAO,EAAE,WAAW,EAAE,MAAM,kCAAkC,CAAC;AAC/D,OAAO,EAAE,kBAAkB,EAAE,MAAM,yCAAyC,CAAC;AAC7E,OAAO,EAAE,iBAAiB,EAAE,MAAM,wCAAwC,CAAC;AAC3E,OAAO,EAAE,mBAAmB,EAAE,MAAM,0CAA0C,CAAC;AAC/E,OAAO,EAAE,uBAAuB,EAAE,MAAM,8CAA8C,CAAC;AAGvF,OAAO,EAAE,eAAe,EAAE,MAAM,uCAAuC,CAAC;AACxE,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACpD,OAAO,EAAE,oBAAoB,EAAE,MAAM,4CAA4C,CAAC;AAGlF,OAAO,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAC;AAClE,OAAO,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAGhF,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAG/C,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAG1D,OAAO,EAAE,wBAAwB,EAAE,MAAM,sCAAsC,CAAC;AAChF,OAAO,EAAE,6BAA6B,EAAE,MAAM,2CAA2C,CAAC;AAG1F,OAAO,EAAE,kBAAkB,EAAE,MAAM,qCAAqC,CAAC;AACzE,OAAO,EAAE,cAAc,EAAE,IAAI,EAAE,MAAM,sCAAsC,CAAC"}
package/dist/internals.js CHANGED
@@ -1,4 +1,4 @@
1
- /*! @azure/msal-browser v2.33.0 2023-02-06 */
1
+ /*! @azure/msal-browser v2.35.0 2023-04-03 */
2
2
  'use strict';
3
3
  export { BrowserCacheManager } from './cache/BrowserCacheManager.js';
4
4
  export { StandardInteractionClient } from './interaction_client/StandardInteractionClient.js';
@@ -7,6 +7,7 @@ export { PopupClient } from './interaction_client/PopupClient.js';
7
7
  export { SilentIframeClient } from './interaction_client/SilentIframeClient.js';
8
8
  export { SilentCacheClient } from './interaction_client/SilentCacheClient.js';
9
9
  export { SilentRefreshClient } from './interaction_client/SilentRefreshClient.js';
10
+ export { NativeInteractionClient } from './interaction_client/NativeInteractionClient.js';
10
11
  export { RedirectHandler } from './interaction_handler/RedirectHandler.js';
11
12
  export { EventHandler } from './event/EventHandler.js';
12
13
  export { NativeMessageHandler } from './broker/nativeBroker/NativeMessageHandler.js';
@@ -1 +1 @@
1
- {"version":3,"file":"internals.js","sources":["../src/internals.ts"],"sourcesContent":["/*\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License.\n */\n\n/**\n * Warning: This set of exports is purely intended to be used by other MSAL libraries, and should be considered potentially unstable. We strongly discourage using them directly, you do so at your own risk.\n * Breaking changes to these APIs will be shipped under a minor version, instead of a major version.\n */\n\n// Cache Manager\nexport { BrowserCacheManager } from \"./cache/BrowserCacheManager\";\n\n// Clients\nexport { StandardInteractionClient } from \"./interaction_client/StandardInteractionClient\";\nexport { RedirectClient } from \"./interaction_client/RedirectClient\";\nexport { PopupClient } from \"./interaction_client/PopupClient\";\nexport { SilentIframeClient } from \"./interaction_client/SilentIframeClient\";\nexport { SilentCacheClient } from \"./interaction_client/SilentCacheClient\";\nexport { SilentRefreshClient } from \"./interaction_client/SilentRefreshClient\";\n\n// Handlers\nexport { RedirectHandler } from \"./interaction_handler/RedirectHandler\";\nexport { EventHandler } from \"./event/EventHandler\";\nexport { NativeMessageHandler } from \"./broker/nativeBroker/NativeMessageHandler\";\n\n// Utilities\nexport { BrowserStateObject } from \"./utils/BrowserProtocolUtils\";\nexport { BrowserConstants, TemporaryCacheKeys } from \"./utils/BrowserConstants\";\n\n// Crypto\nexport { CryptoOps } from \"./crypto/CryptoOps\";\n\n// Browser Errors\nexport { NativeAuthError } from \"./error/NativeAuthError\";\n\n// Telemetry\nexport { BrowserPerformanceClient } from \"./telemetry/BrowserPerformanceClient\";\nexport { BrowserPerformanceMeasurement } from \"./telemetry/BrowserPerformanceMeasurement\";\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA;;;"}
1
+ {"version":3,"file":"internals.js","sources":["../src/internals.ts"],"sourcesContent":["/*\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License.\n */\n\n/**\n * Warning: This set of exports is purely intended to be used by other MSAL libraries, and should be considered potentially unstable. We strongly discourage using them directly, you do so at your own risk.\n * Breaking changes to these APIs will be shipped under a minor version, instead of a major version.\n */\n\n// Cache Manager\nexport { BrowserCacheManager } from \"./cache/BrowserCacheManager\";\n\n// Clients\nexport { StandardInteractionClient } from \"./interaction_client/StandardInteractionClient\";\nexport { RedirectClient } from \"./interaction_client/RedirectClient\";\nexport { PopupClient } from \"./interaction_client/PopupClient\";\nexport { SilentIframeClient } from \"./interaction_client/SilentIframeClient\";\nexport { SilentCacheClient } from \"./interaction_client/SilentCacheClient\";\nexport { SilentRefreshClient } from \"./interaction_client/SilentRefreshClient\";\nexport { NativeInteractionClient } from \"./interaction_client/NativeInteractionClient\";\n\n// Handlers\nexport { RedirectHandler } from \"./interaction_handler/RedirectHandler\";\nexport { EventHandler } from \"./event/EventHandler\";\nexport { NativeMessageHandler } from \"./broker/nativeBroker/NativeMessageHandler\";\n\n// Utilities\nexport { BrowserStateObject } from \"./utils/BrowserProtocolUtils\";\nexport { BrowserConstants, TemporaryCacheKeys } from \"./utils/BrowserConstants\";\n\n// Crypto\nexport { CryptoOps } from \"./crypto/CryptoOps\";\n\n// Browser Errors\nexport { NativeAuthError } from \"./error/NativeAuthError\";\n\n// Telemetry\nexport { BrowserPerformanceClient } from \"./telemetry/BrowserPerformanceClient\";\nexport { BrowserPerformanceMeasurement } from \"./telemetry/BrowserPerformanceMeasurement\";\n\n// Native request and response\nexport { NativeTokenRequest } from \"./broker/nativeBroker/NativeRequest\";\nexport { NativeResponse, MATS } from \"./broker/nativeBroker/NativeResponse\";\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;AAAA;;;"}
@@ -1,4 +1,4 @@
1
- /*! @azure/msal-browser v2.33.0 2023-02-06 */
1
+ /*! @azure/msal-browser v2.35.0 2023-04-03 */
2
2
  'use strict';
3
3
  /*
4
4
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -1,4 +1,4 @@
1
- /*! @azure/msal-browser v2.33.0 2023-02-06 */
1
+ /*! @azure/msal-browser v2.35.0 2023-04-03 */
2
2
  'use strict';
3
3
  import { __awaiter, __generator } from '../_virtual/_tslib.js';
4
4
  import { Constants } from '@azure/msal-common';
@@ -1,4 +1,4 @@
1
- /*! @azure/msal-browser v2.33.0 2023-02-06 */
1
+ /*! @azure/msal-browser v2.35.0 2023-04-03 */
2
2
  'use strict';
3
3
  import { __awaiter, __generator } from '../_virtual/_tslib.js';
4
4
  import { BrowserAuthError } from '../error/BrowserAuthError.js';
@@ -1,3 +1,3 @@
1
1
  export declare const name = "@azure/msal-browser";
2
- export declare const version = "2.33.0";
2
+ export declare const version = "2.35.0";
3
3
  //# sourceMappingURL=packageMetadata.d.ts.map
@@ -1,8 +1,8 @@
1
- /*! @azure/msal-browser v2.33.0 2023-02-06 */
1
+ /*! @azure/msal-browser v2.35.0 2023-04-03 */
2
2
  'use strict';
3
3
  /* eslint-disable header/header */
4
4
  var name = "@azure/msal-browser";
5
- var version = "2.33.0";
5
+ var version = "2.35.0";
6
6
 
7
7
  export { name, version };
8
8
  //# sourceMappingURL=packageMetadata.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"packageMetadata.js","sources":["../src/packageMetadata.ts"],"sourcesContent":["/* eslint-disable header/header */\nexport const name = \"@azure/msal-browser\";\nexport const version = \"2.33.0\";\n"],"names":[],"mappings":";;AAAA;IACa,IAAI,GAAG,sBAAsB;IAC7B,OAAO,GAAG;;;;"}
1
+ {"version":3,"file":"packageMetadata.js","sources":["../src/packageMetadata.ts"],"sourcesContent":["/* eslint-disable header/header */\nexport const name = \"@azure/msal-browser\";\nexport const version = \"2.35.0\";\n"],"names":[],"mappings":";;AAAA;IACa,IAAI,GAAG,sBAAsB;IAC7B,OAAO,GAAG;;;;"}
@@ -7,6 +7,7 @@ export declare class BrowserPerformanceClient extends PerformanceClient implemen
7
7
  startPerformanceMeasuremeant(measureName: string, correlationId: string): IPerformanceMeasurement;
8
8
  generateId(): string;
9
9
  private getPageVisibility;
10
+ private deleteIncompleteSubMeasurements;
10
11
  supportsBrowserPerformanceNow(): boolean;
11
12
  /**
12
13
  * Starts measuring performance for a given operation. Returns a function that should be used to end the measurement.
@@ -27,11 +28,12 @@ export declare class BrowserPerformanceClient extends PerformanceClient implemen
27
28
  /**
28
29
  * Calculates and adds queue time measurement for given performance event.
29
30
  *
30
- * @param {PerformanceEvents} name
31
+ * @param {PerformanceEvents} eventName
31
32
  * @param {?string} correlationId
32
- * @param {?number} preQueueTime
33
+ * @param {?number} queueTime
34
+ * @param {?boolean} manuallyCompleted - indicator for manually completed queue measurements
33
35
  * @returns
34
36
  */
35
- addQueueMeasurement(eventName: PerformanceEvents, correlationId?: string): void;
37
+ addQueueMeasurement(eventName: PerformanceEvents, correlationId?: string, queueTime?: number, manuallyCompleted?: boolean): void;
36
38
  }
37
39
  //# sourceMappingURL=BrowserPerformanceClient.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"BrowserPerformanceClient.d.ts","sourceRoot":"","sources":["../../src/telemetry/BrowserPerformanceClient.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,MAAM,EAAoB,iBAAiB,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,uBAAuB,EAAE,0BAA0B,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AACnM,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAKxD,qBAAa,wBAAyB,SAAQ,iBAAkB,YAAW,kBAAkB;IACzF,OAAO,CAAC,aAAa,CAAgB;IACrC,OAAO,CAAC,aAAa,CAAgB;gBAEzB,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,EAAE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B;IAIzB,OAAO,CAAC,+BAA+B;IAevC,6BAA6B,IAAI,OAAO;IAMxC;;;;;;;OAOG;IACH,gBAAgB,CAAC,WAAW,EAAE,iBAAiB,EAAE,aAAa,CAAC,EAAE,MAAM,GAAG,0BAA0B;IA0BpG;;;;;OAKG;IACH,eAAe,CAAC,SAAS,EAAE,iBAAiB,EAAE,aAAa,CAAC,EAAE,MAAM,GAAG,IAAI;IAuB3E;;;;;;;;OAQG;IACH,mBAAmB,CAAC,SAAS,EAAE,iBAAiB,EAAE,aAAa,CAAC,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,MAAM,EAAE,iBAAiB,CAAC,EAAE,OAAO,GAAG,IAAI;CAqBnI"}
@@ -1,4 +1,4 @@
1
- /*! @azure/msal-browser v2.33.0 2023-02-06 */
1
+ /*! @azure/msal-browser v2.35.0 2023-04-03 */
2
2
  'use strict';
3
3
  import { __extends, __assign } from '../_virtual/_tslib.js';
4
4
  import { PerformanceClient } from '@azure/msal-common';
@@ -28,6 +28,20 @@ var BrowserPerformanceClient = /** @class */ (function (_super) {
28
28
  var _a;
29
29
  return ((_a = document.visibilityState) === null || _a === void 0 ? void 0 : _a.toString()) || null;
30
30
  };
31
+ BrowserPerformanceClient.prototype.deleteIncompleteSubMeasurements = function (inProgressEvent) {
32
+ var rootEvent = this.eventsByCorrelationId.get(inProgressEvent.event.correlationId);
33
+ var isRootEvent = rootEvent && rootEvent.eventId === inProgressEvent.event.eventId;
34
+ var incompleteMeasurements = [];
35
+ if (isRootEvent && (rootEvent === null || rootEvent === void 0 ? void 0 : rootEvent.incompleteSubMeasurements)) {
36
+ rootEvent.incompleteSubMeasurements.forEach(function (subMeasurement) {
37
+ incompleteMeasurements.push(__assign({}, subMeasurement));
38
+ });
39
+ }
40
+ // Clean up remaining marks for incomplete sub-measurements
41
+ if (incompleteMeasurements.length > 0) {
42
+ BrowserPerformanceMeasurement.flushMeasurements(inProgressEvent.event.correlationId, incompleteMeasurements);
43
+ }
44
+ };
31
45
  BrowserPerformanceClient.prototype.supportsBrowserPerformanceNow = function () {
32
46
  return typeof window !== "undefined" &&
33
47
  typeof window.performance !== "undefined" &&
@@ -47,7 +61,13 @@ var BrowserPerformanceClient = /** @class */ (function (_super) {
47
61
  var startPageVisibility = this.getPageVisibility();
48
62
  var inProgressEvent = _super.prototype.startMeasurement.call(this, measureName, correlationId);
49
63
  return __assign(__assign({}, inProgressEvent), { endMeasurement: function (event) {
50
- return inProgressEvent.endMeasurement(__assign({ startPageVisibility: startPageVisibility, endPageVisibility: _this.getPageVisibility() }, event));
64
+ var res = inProgressEvent.endMeasurement(__assign({ startPageVisibility: startPageVisibility, endPageVisibility: _this.getPageVisibility() }, event));
65
+ _this.deleteIncompleteSubMeasurements(inProgressEvent);
66
+ return res;
67
+ }, discardMeasurement: function () {
68
+ inProgressEvent.discardMeasurement();
69
+ _this.deleteIncompleteSubMeasurements(inProgressEvent);
70
+ inProgressEvent.measurement.flushMeasurement();
51
71
  } });
52
72
  };
53
73
  /**
@@ -65,26 +85,27 @@ var BrowserPerformanceClient = /** @class */ (function (_super) {
65
85
  this.logger.trace("BrowserPerformanceClient: correlationId for " + eventName + " not provided, unable to set telemetry queue time");
66
86
  return;
67
87
  }
68
- var preQueueTimesByEvents = this.preQueueTimeByCorrelationId.get(correlationId);
69
- if (preQueueTimesByEvents) {
70
- preQueueTimesByEvents.set(eventName, window.performance.now());
71
- this.preQueueTimeByCorrelationId.set(correlationId, preQueueTimesByEvents);
72
- }
73
- else {
74
- var preQueueTimes = new Map();
75
- preQueueTimes.set(eventName, window.performance.now());
76
- this.preQueueTimeByCorrelationId.set(correlationId, preQueueTimes);
88
+ var preQueueEvent = this.preQueueTimeByCorrelationId.get(correlationId);
89
+ /**
90
+ * Manually complete queue measurement if there is an incomplete pre-queue event.
91
+ * Incomplete pre-queue events are instrumentation bugs that should be fixed.
92
+ */
93
+ if (preQueueEvent) {
94
+ this.logger.trace("BrowserPerformanceClient: Incomplete pre-queue " + preQueueEvent.name + " found", correlationId);
95
+ this.addQueueMeasurement(preQueueEvent.name, correlationId, undefined, true);
77
96
  }
97
+ this.preQueueTimeByCorrelationId.set(correlationId, { name: eventName, time: window.performance.now() });
78
98
  };
79
99
  /**
80
100
  * Calculates and adds queue time measurement for given performance event.
81
101
  *
82
- * @param {PerformanceEvents} name
102
+ * @param {PerformanceEvents} eventName
83
103
  * @param {?string} correlationId
84
- * @param {?number} preQueueTime
104
+ * @param {?number} queueTime
105
+ * @param {?boolean} manuallyCompleted - indicator for manually completed queue measurements
85
106
  * @returns
86
107
  */
87
- BrowserPerformanceClient.prototype.addQueueMeasurement = function (eventName, correlationId) {
108
+ BrowserPerformanceClient.prototype.addQueueMeasurement = function (eventName, correlationId, queueTime, manuallyCompleted) {
88
109
  if (!this.supportsBrowserPerformanceNow()) {
89
110
  this.logger.trace("BrowserPerformanceClient: window performance API not available, unable to add queue measurement for " + eventName);
90
111
  return;
@@ -98,8 +119,8 @@ var BrowserPerformanceClient = /** @class */ (function (_super) {
98
119
  return;
99
120
  }
100
121
  var currentTime = window.performance.now();
101
- var queueTime = _super.prototype.calculateQueuedTime.call(this, preQueueTime, currentTime);
102
- return _super.prototype.addQueueMeasurement.call(this, eventName, correlationId, queueTime);
122
+ var resQueueTime = queueTime || _super.prototype.calculateQueuedTime.call(this, preQueueTime, currentTime);
123
+ return _super.prototype.addQueueMeasurement.call(this, eventName, correlationId, resQueueTime, manuallyCompleted);
103
124
  };
104
125
  return BrowserPerformanceClient;
105
126
  }(PerformanceClient));
@@ -1 +1 @@
1
- {"version":3,"file":"BrowserPerformanceClient.js","sources":["../../src/telemetry/BrowserPerformanceClient.ts"],"sourcesContent":["/*\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { Logger, PerformanceEvent, PerformanceEvents, IPerformanceClient, PerformanceClient, IPerformanceMeasurement, InProgressPerformanceEvent, ApplicationTelemetry } from \"@azure/msal-common\";\nimport { CryptoOptions } from \"../config/Configuration\";\nimport { BrowserCrypto } from \"../crypto/BrowserCrypto\";\nimport { GuidGenerator } from \"../crypto/GuidGenerator\";\nimport { BrowserPerformanceMeasurement } from \"./BrowserPerformanceMeasurement\";\n\nexport class BrowserPerformanceClient extends PerformanceClient implements IPerformanceClient {\n private browserCrypto: BrowserCrypto;\n private guidGenerator: GuidGenerator;\n \n constructor(clientId: string, authority: string, logger: Logger, libraryName: string, libraryVersion: string, applicationTelemetry: ApplicationTelemetry, cryptoOptions: CryptoOptions) {\n super(clientId, authority, logger, libraryName, libraryVersion, applicationTelemetry);\n this.browserCrypto = new BrowserCrypto(this.logger, cryptoOptions);\n this.guidGenerator = new GuidGenerator(this.browserCrypto);\n }\n \n startPerformanceMeasuremeant(measureName: string, correlationId: string): IPerformanceMeasurement {\n return new BrowserPerformanceMeasurement(measureName, correlationId);\n }\n\n generateId() : string {\n return this.guidGenerator.generateGuid();\n }\n\n private getPageVisibility(): string | null {\n return document.visibilityState?.toString() || null;\n }\n\n supportsBrowserPerformanceNow(): boolean {\n return typeof window !== \"undefined\" &&\n typeof window.performance !== \"undefined\" &&\n typeof window.performance.now === \"function\";\n }\n \n /**\n * Starts measuring performance for a given operation. Returns a function that should be used to end the measurement.\n * Also captures browser page visibilityState.\n *\n * @param {PerformanceEvents} measureName\n * @param {?string} [correlationId]\n * @returns {((event?: Partial<PerformanceEvent>) => PerformanceEvent| null)}\n */\n startMeasurement(measureName: PerformanceEvents, correlationId?: string): InProgressPerformanceEvent {\n // Capture page visibilityState and then invoke start/end measurement\n const startPageVisibility = this.getPageVisibility();\n \n const inProgressEvent = super.startMeasurement(measureName, correlationId);\n\n return {\n ...inProgressEvent,\n endMeasurement: (event?: Partial<PerformanceEvent>): PerformanceEvent | null => {\n return inProgressEvent.endMeasurement({\n startPageVisibility,\n endPageVisibility: this.getPageVisibility(),\n ...event\n });\n }\n };\n }\n\n /**\n * Adds pre-queue time to preQueueTimeByCorrelationId map.\n * @param {PerformanceEvents} eventName \n * @param {?string} correlationId \n * @returns \n */\n setPreQueueTime(eventName: PerformanceEvents, correlationId?: string): void {\n if (!this.supportsBrowserPerformanceNow()) {\n this.logger.trace(`BrowserPerformanceClient: window performance API not available, unable to set telemetry queue time for ${eventName}`);\n return;\n }\n\n if (!correlationId) {\n this.logger.trace(`BrowserPerformanceClient: correlationId for ${eventName} not provided, unable to set telemetry queue time`);\n return;\n }\n\n const preQueueTimesByEvents = this.preQueueTimeByCorrelationId.get(correlationId);\n\n if (preQueueTimesByEvents){\n preQueueTimesByEvents.set(eventName, window.performance.now());\n this.preQueueTimeByCorrelationId.set(correlationId, preQueueTimesByEvents);\n } else {\n const preQueueTimes = new Map();\n preQueueTimes.set(eventName, window.performance.now());\n this.preQueueTimeByCorrelationId.set(correlationId, preQueueTimes);\n }\n }\n\n /**\n * Calculates and adds queue time measurement for given performance event.\n * \n * @param {PerformanceEvents} name \n * @param {?string} correlationId \n * @param {?number} preQueueTime \n * @returns \n */\n addQueueMeasurement(eventName: PerformanceEvents, correlationId?: string): void {\n if (!this.supportsBrowserPerformanceNow()) {\n this.logger.trace(`BrowserPerformanceClient: window performance API not available, unable to add queue measurement for ${eventName}`);\n return;\n }\n\n if (!correlationId) {\n this.logger.trace(`BrowserPerformanceClient: correlationId for ${eventName} not provided, unable to add queue measurement`);\n return;\n }\n\n const preQueueTime = super.getPreQueueTime(eventName, correlationId);\n if (!preQueueTime) {\n return;\n }\n \n const currentTime = window.performance.now();\n const queueTime = super.calculateQueuedTime(preQueueTime, currentTime);\n\n return super.addQueueMeasurement(eventName, correlationId, queueTime);\n }\n}\n"],"names":[],"mappings":";;;;;;;;AAAA;;;;;IAW8C,4CAAiB;IAI3D,kCAAY,QAAgB,EAAE,SAAiB,EAAE,MAAc,EAAE,WAAmB,EAAE,cAAsB,EAAE,oBAA0C,EAAE,aAA4B;QAAtL,YACI,kBAAM,QAAQ,EAAE,SAAS,EAAE,MAAM,EAAE,WAAW,EAAE,cAAc,EAAE,oBAAoB,CAAC,SAGxF;QAFG,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YAAC,SAAS,EAAE,aAAa,EAAE,SAAS,CAAC,CAAC;KACzE;IACL,+BAAC;AAAD,CAhHA,CAA8C,iBAAiB;;;;"}
1
+ {"version":3,"file":"BrowserPerformanceClient.js","sources":["../../src/telemetry/BrowserPerformanceClient.ts"],"sourcesContent":["/*\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport {\n Logger,\n PerformanceEvent,\n PerformanceEvents,\n IPerformanceClient,\n PerformanceClient,\n IPerformanceMeasurement,\n InProgressPerformanceEvent,\n ApplicationTelemetry,\n SubMeasurement,\n PreQueueEvent\n} from \"@azure/msal-common\";\nimport { CryptoOptions } from \"../config/Configuration\";\nimport { BrowserCrypto } from \"../crypto/BrowserCrypto\";\nimport { GuidGenerator } from \"../crypto/GuidGenerator\";\nimport { BrowserPerformanceMeasurement } from \"./BrowserPerformanceMeasurement\";\n\nexport class BrowserPerformanceClient extends PerformanceClient implements IPerformanceClient {\n private browserCrypto: BrowserCrypto;\n private guidGenerator: GuidGenerator;\n\n constructor(clientId: string, authority: string, logger: Logger, libraryName: string, libraryVersion: string, applicationTelemetry: ApplicationTelemetry, cryptoOptions: CryptoOptions) {\n super(clientId, authority, logger, libraryName, libraryVersion, applicationTelemetry);\n this.browserCrypto = new BrowserCrypto(this.logger, cryptoOptions);\n this.guidGenerator = new GuidGenerator(this.browserCrypto);\n }\n\n startPerformanceMeasuremeant(measureName: string, correlationId: string): IPerformanceMeasurement {\n return new BrowserPerformanceMeasurement(measureName, correlationId);\n }\n\n generateId() : string {\n return this.guidGenerator.generateGuid();\n }\n\n private getPageVisibility(): string | null {\n return document.visibilityState?.toString() || null;\n }\n\n private deleteIncompleteSubMeasurements(inProgressEvent: InProgressPerformanceEvent): void {\n const rootEvent = this.eventsByCorrelationId.get(inProgressEvent.event.correlationId);\n const isRootEvent = rootEvent && rootEvent.eventId === inProgressEvent.event.eventId;\n const incompleteMeasurements: SubMeasurement[] = [];\n if (isRootEvent && rootEvent?.incompleteSubMeasurements) {\n rootEvent.incompleteSubMeasurements.forEach((subMeasurement) => {\n incompleteMeasurements.push({...subMeasurement});\n });\n }\n // Clean up remaining marks for incomplete sub-measurements\n if (incompleteMeasurements.length > 0) {\n BrowserPerformanceMeasurement.flushMeasurements(inProgressEvent.event.correlationId, incompleteMeasurements);\n }\n }\n\n supportsBrowserPerformanceNow(): boolean {\n return typeof window !== \"undefined\" &&\n typeof window.performance !== \"undefined\" &&\n typeof window.performance.now === \"function\";\n }\n\n /**\n * Starts measuring performance for a given operation. Returns a function that should be used to end the measurement.\n * Also captures browser page visibilityState.\n *\n * @param {PerformanceEvents} measureName\n * @param {?string} [correlationId]\n * @returns {((event?: Partial<PerformanceEvent>) => PerformanceEvent| null)}\n */\n startMeasurement(measureName: PerformanceEvents, correlationId?: string): InProgressPerformanceEvent {\n // Capture page visibilityState and then invoke start/end measurement\n const startPageVisibility = this.getPageVisibility();\n\n const inProgressEvent = super.startMeasurement(measureName, correlationId);\n\n return {\n ...inProgressEvent,\n endMeasurement: (event?: Partial<PerformanceEvent>): PerformanceEvent | null => {\n const res = inProgressEvent.endMeasurement({\n startPageVisibility,\n endPageVisibility: this.getPageVisibility(),\n ...event\n });\n this.deleteIncompleteSubMeasurements(inProgressEvent);\n\n return res;\n },\n discardMeasurement: () => {\n inProgressEvent.discardMeasurement();\n this.deleteIncompleteSubMeasurements(inProgressEvent);\n inProgressEvent.measurement.flushMeasurement();\n }\n };\n }\n\n /**\n * Adds pre-queue time to preQueueTimeByCorrelationId map.\n * @param {PerformanceEvents} eventName\n * @param {?string} correlationId\n * @returns\n */\n setPreQueueTime(eventName: PerformanceEvents, correlationId?: string): void {\n if (!this.supportsBrowserPerformanceNow()) {\n this.logger.trace(`BrowserPerformanceClient: window performance API not available, unable to set telemetry queue time for ${eventName}`);\n return;\n }\n\n if (!correlationId) {\n this.logger.trace(`BrowserPerformanceClient: correlationId for ${eventName} not provided, unable to set telemetry queue time`);\n return;\n }\n\n const preQueueEvent: PreQueueEvent | undefined = this.preQueueTimeByCorrelationId.get(correlationId);\n /**\n * Manually complete queue measurement if there is an incomplete pre-queue event.\n * Incomplete pre-queue events are instrumentation bugs that should be fixed.\n */\n if (preQueueEvent) {\n this.logger.trace(`BrowserPerformanceClient: Incomplete pre-queue ${preQueueEvent.name} found`, correlationId);\n this.addQueueMeasurement(preQueueEvent.name, correlationId, undefined, true);\n }\n this.preQueueTimeByCorrelationId.set(correlationId, { name: eventName, time: window.performance.now() });\n }\n\n /**\n * Calculates and adds queue time measurement for given performance event.\n *\n * @param {PerformanceEvents} eventName\n * @param {?string} correlationId\n * @param {?number} queueTime\n * @param {?boolean} manuallyCompleted - indicator for manually completed queue measurements\n * @returns\n */\n addQueueMeasurement(eventName: PerformanceEvents, correlationId?: string, queueTime?: number, manuallyCompleted?: boolean): void {\n if (!this.supportsBrowserPerformanceNow()) {\n this.logger.trace(`BrowserPerformanceClient: window performance API not available, unable to add queue measurement for ${eventName}`);\n return;\n }\n\n if (!correlationId) {\n this.logger.trace(`BrowserPerformanceClient: correlationId for ${eventName} not provided, unable to add queue measurement`);\n return;\n }\n\n const preQueueTime = super.getPreQueueTime(eventName, correlationId);\n if (!preQueueTime) {\n return;\n }\n\n const currentTime = window.performance.now();\n const resQueueTime = queueTime || super.calculateQueuedTime(preQueueTime, currentTime);\n\n return super.addQueueMeasurement(eventName, correlationId, resQueueTime, manuallyCompleted);\n }\n}\n"],"names":[],"mappings":";;;;;;;;AAAA;;;;;IAsB8C,4CAAiB;IAI3D,kCAAY,QAAgB,EAAE,SAAiB,EAAE,MAAc,EAAE,WAAmB,EAAE,cAAsB,EAAE,oBAA0C,EAAE,aAA4B;QAAtL,YACI,kBAAM,QAAQ,EAAE,SAAS,EAAE,MAAM,EAAE,WAAW,EAAE,cAAc,EAAE,oBAAoB,CAAC,SAGxF;QAFG,KAAI,CAAC,aAAa,GAAG,IAAI,aAAa,CAAC,KAAI,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC;QACnE,K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ChF;QACD,IAAI,CAAC,2BAA2B,CAAC,GAAG,CAAC,aAAa,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,CAAC,WAAW,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC;KAC5G;;;;;;;;;;IAWD,sDAAmB,GAAnB,UAAoB,SAA4B,EAAE,aAAsB,EAAE,SAAkB,EAAE,iBAA2B;QACrH,IAAI,CAAC,IAAI,CAAC,6BAA6B,EAAE,EAAE;YACvC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,yGAAuG,SAAW,CAAC,CAAC;YACtI,OAAO;SACV;QAED,IAAI,CAAC,aAAa,EAAE;YAChB,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,iDAA+C,SAAS,mDAAgD,CAAC,CAAC;YAC5H,OAAO;SACV;QAED,IAAM,YAAY,GAAG,iBAAM,eAAe,YAAC,SAAS,EAAE,aAAa,CAAC,CAAC;QACrE,IAAI,CAAC,YAAY,EAAE;YACf,OAAO;SACV;QAED,IAAM,WAAW,GAAG,MAAM,CAAC,WAAW,CAAC,GAAG,EAAE,CAAC;QAC7C,IAAM,YAAY,GAAG,SAAS,IAAI,iBAAM,mBAAmB,YAAC,YAAY,EAAE,WAAW,CAAC,CAAC;QAEvF,OAAO,iBAAM,mBAAmB,YAAC,SAAS,EAAE,aAAa,EAAE,YAAY,EAAE,iBAAiB,CAAC,CAAC;KAC/F;IACL,+BAAC;AAAD,CAxIA,CAA8C,iBAAiB;;;;"}
@@ -1,11 +1,20 @@
1
- import { IPerformanceMeasurement } from "@azure/msal-common";
1
+ import { IPerformanceMeasurement, SubMeasurement } from "@azure/msal-common";
2
2
  export declare class BrowserPerformanceMeasurement implements IPerformanceMeasurement {
3
- private measureName;
4
- private correlationId;
5
- private startMark;
6
- private endMark;
3
+ private readonly measureName;
4
+ private readonly correlationId;
5
+ private readonly startMark;
6
+ private readonly endMark;
7
7
  constructor(name: string, correlationId: string);
8
+ private static makeMeasureName;
9
+ private static makeStartMark;
10
+ private static makeEndMark;
8
11
  static supportsBrowserPerformance(): boolean;
12
+ /**
13
+ * Flush browser marks and measurements.
14
+ * @param {string} correlationId
15
+ * @param {SubMeasurement} measurements
16
+ */
17
+ static flushMeasurements(correlationId: string, measurements: SubMeasurement[]): void;
9
18
  startMeasurement(): void;
10
19
  endMeasurement(): void;
11
20
  flushMeasurement(): number | null;
@@ -1 +1 @@
1
- {"version":3,"file":"BrowserPerformanceMeasurement.d.ts","sourceRoot":"","sources":["../../src/telemetry/BrowserPerformanceMeasurement.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,uBAAuB,EAAE,MAAM,oBAAoB,CAAC;AAE7D,qBAAa,6BAA8B,YAAW,uBAAuB;IACzE,OAAO,CAAC,WAAW,CAAS;IAC5B,OAAO,CAAC,aAAa,CAAS;IAC9B,OAAO,CAAC,SAAS,CAAS;IAC1B,OAAO,CAAC,OAAO,CAAS;gBAEZ,IAAI,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM;IAO/C,MAAM,CAAC,0BAA0B,IAAI,OAAO;IAU5C,gBAAgB,IAAI,IAAI;IAUxB,cAAc,IAAG,IAAI;IAWrB,gBAAgB,IAAI,MAAM,GAAG,IAAI;CAiBpC"}
1
+ {"version":3,"file":"BrowserPerformanceMeasurement.d.ts","sourceRoot":"","sources":["../../src/telemetry/BrowserPerformanceMeasurement.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,uBAAuB,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAE7E,qBAAa,6BAA8B,YAAW,uBAAuB;IACzE,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAS;IACrC,OAAO,CAAC,QAAQ,CAAC,aAAa,CAAS;IACvC,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAS;IACnC,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAS;gBAErB,IAAI,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM;IAO/C,OAAO,CAAC,MAAM,CAAC,eAAe;IAI9B,OAAO,CAAC,MAAM,CAAC,aAAa;IAI5B,OAAO,CAAC,MAAM,CAAC,WAAW;IAI1B,MAAM,CAAC,0BAA0B,IAAI,OAAO;IAU5C;;;;OAIG;WACW,iBAAiB,CAAC,aAAa,EAAE,MAAM,EAAE,YAAY,EAAE,cAAc,EAAE,GAAG,IAAI;IAkB5F,gBAAgB,IAAI,IAAI;IAUxB,cAAc,IAAG,IAAI;IAWrB,gBAAgB,IAAI,MAAM,GAAG,IAAI;CAiBpC"}
@@ -1,4 +1,4 @@
1
- /*! @azure/msal-browser v2.33.0 2023-02-06 */
1
+ /*! @azure/msal-browser v2.35.0 2023-04-03 */
2
2
  'use strict';
3
3
  /*
4
4
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -7,10 +7,19 @@
7
7
  var BrowserPerformanceMeasurement = /** @class */ (function () {
8
8
  function BrowserPerformanceMeasurement(name, correlationId) {
9
9
  this.correlationId = correlationId;
10
- this.measureName = "msal.measure." + name + "." + this.correlationId;
11
- this.startMark = "msal.start." + name + "." + this.correlationId;
12
- this.endMark = "msal.end." + name + "." + this.correlationId;
10
+ this.measureName = BrowserPerformanceMeasurement.makeMeasureName(name, correlationId);
11
+ this.startMark = BrowserPerformanceMeasurement.makeStartMark(name, correlationId);
12
+ this.endMark = BrowserPerformanceMeasurement.makeEndMark(name, correlationId);
13
13
  }
14
+ BrowserPerformanceMeasurement.makeMeasureName = function (name, correlationId) {
15
+ return "msal.measure." + name + "." + correlationId;
16
+ };
17
+ BrowserPerformanceMeasurement.makeStartMark = function (name, correlationId) {
18
+ return "msal.start." + name + "." + correlationId;
19
+ };
20
+ BrowserPerformanceMeasurement.makeEndMark = function (name, correlationId) {
21
+ return "msal.end." + name + "." + correlationId;
22
+ };
14
23
  BrowserPerformanceMeasurement.supportsBrowserPerformance = function () {
15
24
  return typeof window !== "undefined" &&
16
25
  typeof window.performance !== "undefined" &&
@@ -20,6 +29,29 @@ var BrowserPerformanceMeasurement = /** @class */ (function () {
20
29
  typeof window.performance.clearMeasures === "function" &&
21
30
  typeof window.performance.getEntriesByName === "function";
22
31
  };
32
+ /**
33
+ * Flush browser marks and measurements.
34
+ * @param {string} correlationId
35
+ * @param {SubMeasurement} measurements
36
+ */
37
+ BrowserPerformanceMeasurement.flushMeasurements = function (correlationId, measurements) {
38
+ if (BrowserPerformanceMeasurement.supportsBrowserPerformance()) {
39
+ try {
40
+ measurements.forEach(function (measurement) {
41
+ var measureName = BrowserPerformanceMeasurement.makeMeasureName(measurement.name, correlationId);
42
+ var entriesForMeasurement = window.performance.getEntriesByName(measureName, "measure");
43
+ if (entriesForMeasurement.length > 0) {
44
+ window.performance.clearMeasures(measureName);
45
+ window.performance.clearMarks(BrowserPerformanceMeasurement.makeStartMark(measureName, correlationId));
46
+ window.performance.clearMarks(BrowserPerformanceMeasurement.makeEndMark(measureName, correlationId));
47
+ }
48
+ });
49
+ }
50
+ catch (e) {
51
+ // Silently catch and return null
52
+ }
53
+ }
54
+ };
23
55
  BrowserPerformanceMeasurement.prototype.startMeasurement = function () {
24
56
  if (BrowserPerformanceMeasurement.supportsBrowserPerformance()) {
25
57
  try {
@@ -1 +1 @@
1
- {"version":3,"file":"BrowserPerformanceMeasurement.js","sources":["../../src/telemetry/BrowserPerformanceMeasurement.ts"],"sourcesContent":["/*\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { IPerformanceMeasurement } from \"@azure/msal-common\";\n\nexport class BrowserPerformanceMeasurement implements IPerformanceMeasurement {\n private measureName: string;\n private correlationId: string;\n private startMark: string;\n private endMark: string;\n\n constructor(name: string, correlationId: string) {\n this.correlationId = correlationId;\n this.measureName = `msal.measure.${name}.${this.correlationId}`;\n this.startMark = `msal.start.${name}.${this.correlationId}`;\n this.endMark = `msal.end.${name}.${this.correlationId}`;\n }\n\n static supportsBrowserPerformance(): boolean {\n return typeof window !== \"undefined\" &&\n typeof window.performance !== \"undefined\" &&\n typeof window.performance.mark === \"function\" && \n typeof window.performance.measure === \"function\" &&\n typeof window.performance.clearMarks === \"function\" &&\n typeof window.performance.clearMeasures === \"function\" &&\n typeof window.performance.getEntriesByName === \"function\";\n }\n\n startMeasurement(): void {\n if (BrowserPerformanceMeasurement.supportsBrowserPerformance()) {\n try {\n window.performance.mark(this.startMark);\n } catch (e) {\n // Silently catch\n }\n }\n }\n\n endMeasurement():void {\n if (BrowserPerformanceMeasurement.supportsBrowserPerformance()) {\n try {\n window.performance.mark(this.endMark);\n window.performance.measure(this.measureName, this.startMark, this.endMark);\n } catch (e) {\n // Silently catch\n }\n }\n }\n\n flushMeasurement(): number | null {\n if (BrowserPerformanceMeasurement.supportsBrowserPerformance()) {\n try {\n const entriesForMeasurement = window.performance.getEntriesByName(this.measureName, \"measure\");\n if (entriesForMeasurement.length > 0) {\n const durationMs = entriesForMeasurement[0].duration;\n window.performance.clearMeasures(this.measureName);\n window.performance.clearMarks(this.startMark);\n window.performance.clearMarks(this.endMark);\n return durationMs;\n }\n } catch (e) {\n // Silently catch and return null\n }\n }\n return null;\n }\n}\n"],"names":[],"mappings":";;AAAA;;;;;IAaI,uCAAY,IAAY,EAAE,aAAqB;QAC3C,IAAI,CAAC,aAAa,GAAG,aAAa,CAAC;QACnC,IAAI,CAAC,WAAW,GAAG,kBAAgB,IAAI,SAAI,IAAI,CAAC,aAAe,CAAC;QAChE,IAAI,CAAC,SAAS,GAAG,gBAAc,IAAI,SAAI,IAAI,CAAC,aAAe,CAAC;QAC5D,IAAI,CAAC,OAAO,GAAG,cAAY,IAAI,SAAI,IAAI,CAAC,aAAe,CAAC;KAC3D;IAEM,wDAA0B,GAAjC;QACI,OAAO,OAAO,MAAM,KAAK,WAAW;YAChC,OAAO,MAAM,CAAC,WAAW,KAAK,WAAW;YACzC,OAAO,MAAM,CAAC,WAAW,CAAC,IAAI,KAAK,UAAU;YAC7C,OAAO,MAAM,CAAC,WAAW,CAAC,OAAO,KAAK,UAAU;YAChD,OAAO,MAAM,CAAC,WAAW,CAAC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ACJ;YAAC,OAAO,CAAC,EAAE;;aAEX;SACJ;QACD,OAAO,IAAI,CAAC;KACf;IACL,oCAAC;AAAD,CAAC;;;;"}
1
+ {"version":3,"file":"BrowserPerformanceMeasurement.js","sources":["../../src/telemetry/BrowserPerformanceMeasurement.ts"],"sourcesContent":["/*\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { IPerformanceMeasurement, SubMeasurement } from \"@azure/msal-common\";\n\nexport class BrowserPerformanceMeasurement implements IPerformanceMeasurement {\n private readonly measureName: string;\n private readonly correlationId: string;\n private readonly startMark: string;\n private readonly endMark: string;\n\n constructor(name: string, correlationId: string) {\n this.correlationId = correlationId;\n this.measureName = BrowserPerformanceMeasurement.makeMeasureName(name, correlationId);\n this.startMark = BrowserPerformanceMeasurement.makeStartMark(name, correlationId);\n this.endMark = BrowserPerformanceMeasurement.makeEndMark(name, correlationId);\n }\n\n private static makeMeasureName(name: string, correlationId: string) {\n return `msal.measure.${name}.${correlationId}`;\n }\n\n private static makeStartMark(name: string, correlationId: string) {\n return `msal.start.${name}.${correlationId}`;\n }\n\n private static makeEndMark(name: string, correlationId: string) {\n return `msal.end.${name}.${correlationId}`;\n }\n\n static supportsBrowserPerformance(): boolean {\n return typeof window !== \"undefined\" &&\n typeof window.performance !== \"undefined\" &&\n typeof window.performance.mark === \"function\" &&\n typeof window.performance.measure === \"function\" &&\n typeof window.performance.clearMarks === \"function\" &&\n typeof window.performance.clearMeasures === \"function\" &&\n typeof window.performance.getEntriesByName === \"function\";\n }\n\n /**\n * Flush browser marks and measurements.\n * @param {string} correlationId\n * @param {SubMeasurement} measurements\n */\n public static flushMeasurements(correlationId: string, measurements: SubMeasurement[]): void {\n if (BrowserPerformanceMeasurement.supportsBrowserPerformance()) {\n try {\n measurements.forEach((measurement) => {\n const measureName = BrowserPerformanceMeasurement.makeMeasureName(measurement.name, correlationId);\n const entriesForMeasurement = window.performance.getEntriesByName(measureName, \"measure\");\n if (entriesForMeasurement.length > 0) {\n window.performance.clearMeasures(measureName);\n window.performance.clearMarks(BrowserPerformanceMeasurement.makeStartMark(measureName, correlationId));\n window.performance.clearMarks(BrowserPerformanceMeasurement.makeEndMark(measureName, correlationId));\n }\n });\n } catch (e) {\n // Silently catch and return null\n }\n }\n }\n\n startMeasurement(): void {\n if (BrowserPerformanceMeasurement.supportsBrowserPerformance()) {\n try {\n window.performance.mark(this.startMark);\n } catch (e) {\n // Silently catch\n }\n }\n }\n\n endMeasurement():void {\n if (BrowserPerformanceMeasurement.supportsBrowserPerformance()) {\n try {\n window.performance.mark(this.endMark);\n window.performance.measure(this.measureName, this.startMark, this.endMark);\n } catch (e) {\n // Silently catch\n }\n }\n }\n\n flushMeasurement(): number | null {\n if (BrowserPerformanceMeasurement.supportsBrowserPerformance()) {\n try {\n const entriesForMeasurement = window.performance.getEntriesByName(this.measureName, \"measure\");\n if (entriesForMeasurement.length > 0) {\n const durationMs = entriesForMeasurement[0].duration;\n window.performance.clearMeasures(this.measureName);\n window.performance.clearMarks(this.startMark);\n window.performance.clearMarks(this.endMark);\n return durationMs;\n }\n } catch (e) {\n // Silently catch and return null\n }\n }\n return null;\n }\n}\n"],"names":[],"mappings":";;AAAA;;;;;IAaI,uCAAY,IAAY,EAAE,aAAqB;QAC3C,IAAI,CAAC,aAAa,GAAG,aAAa,CAAC;QACnC,IAAI,CAAC,WAAW,GAAG,6BAA6B,CAAC,eAAe,CAAC,IAAI,EAAE,aAAa,CAAC,CAAC;QACtF,IAAI,CAAC,SAAS,GAAG,6BAA6B,CAAC,aAAa,CAAC,IAAI,EAAE,aAAa,CAAC,CAAC;QAClF,IAAI,CAAC,OAAO,GAAG,6BAA6B,CAAC,WAAW,CAAC,IAAI,EAAE,aAAa,CAAC,CAAC;KACjF;IAEc,6CAAe,GAA9B,UAA+B,IAAY,EAAE,aAAqB;QAC9D,OAAO,kBAAgB,IAAI,SAAI,aAAe,CAAC;KAClD;IAEc,2CAAa,GAA5B,UAA6B,IAAY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CAAC;AAAD,CAAC;;;;"}
@@ -76,6 +76,10 @@ export declare enum TemporaryCacheKeys {
76
76
  NATIVE_REQUEST = "request.native",
77
77
  REDIRECT_CONTEXT = "request.redirect.context"
78
78
  }
79
+ export declare enum StaticCacheKeys {
80
+ ACCOUNT_KEYS = "msal.account.keys",
81
+ TOKEN_KEYS = "msal.token.keys"
82
+ }
79
83
  /**
80
84
  * Cache keys stored in-memory
81
85
  */
@@ -1 +1 @@
1
- {"version":3,"file":"BrowserConstants.d.ts","sourceRoot":"","sources":["../../src/utils/BrowserConstants.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACvD,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAE7D;;GAEG;AACH,eAAO,MAAM,gBAAgB;IACzB;;OAEG;;IAEH;;OAEG;;IAEH;;OAEG;;IAEH;;OAEG;;IAEH;;OAEG;;IAEH;;OAEG;;IAEH;;OAEG;;CAEN,CAAC;AAEF,eAAO,MAAM,eAAe;;;;CAI3B,CAAC;AAEF,oBAAY,qBAAqB;IAC7B,gBAAgB,cAAc;IAC9B,iBAAiB,sBAAsB;IACvC,QAAQ,aAAa;IACrB,QAAQ,aAAa;CACxB;AAED,oBAAY,oBAAoB;IAC5B,YAAY,iBAAiB;IAC7B,cAAc,mBAAmB;IACjC,aAAa,kBAAkB;CAClC;AAED;;GAEG;AACH,oBAAY,iBAAiB;IACzB,GAAG,QAAQ;IACX,IAAI,SAAS;CAChB;AAED;;GAEG;AACH,oBAAY,kBAAkB;IAC1B,SAAS,cAAc;IACvB,qBAAqB,yBAAyB;IAC9C,aAAa,kBAAkB;IAC/B,aAAa,kBAAkB;IAC/B,aAAa,mBAAmB;IAChC,UAAU,mBAAmB;IAC7B,YAAY,uBAAuB;IACnC,QAAQ,YAAY;IACpB,cAAc,mBAAmB;IACjC,MAAM,WAAW;IACjB,sBAAsB,uBAAuB;IAC7C,cAAc,mBAAmB;IACjC,cAAc,0BAA0B;IACxC,cAAc,mBAAmB;IACjC,gBAAgB,6BAA6B;CAChD;AAED;;GAEG;AACH,oBAAY,iBAAiB;IACzB,WAAW,gBAAgB;IAC3B,WAAW,oBAAoB;CAClC;AAED;;;;;GAKG;AACH,oBAAY,KAAK;IACb,oBAAoB,MAAM;IAC1B,iBAAiB,MAAM;IACvB,SAAS,MAAM;IACf,2BAA2B,MAAM;IACjC,qBAAqB,MAAM;IAC3B,kBAAkB,MAAM;IACxB,6BAA6B,KAAK;IAClC,MAAM,MAAM;IACZ,WAAW,MAAM;CACpB;AAKD,oBAAY,eAAe;IACvB,QAAQ,aAAa;IACrB,KAAK,UAAU;IACf,MAAM,WAAW;IACjB,IAAI,SAAS;CAChB;AAED;;;GAGG;AACH,oBAAY,iBAAiB;IACzB;;OAEG;IACH,OAAO,YAAY;IACnB;;OAEG;IACH,KAAK,UAAU;IACf;;OAEG;IACH,MAAM,WAAW;IACjB;;OAEG;IACH,YAAY,iBAAiB;IAC7B;;OAEG;IACH,SAAS,cAAc;IACvB;;OAEG;IACH,cAAc,mBAAmB;IACjC;;OAEG;IACH,IAAI,SAAS;CAChB;AAED,eAAO,MAAM,eAAe,EAAE,eAAe,GAAC,YAE7C,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,cAAc,QAAQ,CAAC;AAGpC,oBAAY,UAAU;IAClB,KAAK,sBAAsB;IAC3B,OAAO,wBAAwB;CAClC;AAGD,eAAO,MAAM,OAAO,YAAY,CAAC;AACjC,eAAO,MAAM,UAAU,IAAI,CAAC;AAC5B,eAAO,MAAM,aAAa,QAAoB,CAAC;AAE/C,oBAAY,iBAAiB;IAMzB,OAAO,IAAI;IAKX,WAAW,IAAI;IAMf,0BAA0B,IAAI;IAM9B,YAAY,IAAI;IAMhB,sBAAsB,IAAI;IAK1B,IAAI,IAAI;CACX"}
1
+ {"version":3,"file":"BrowserConstants.d.ts","sourceRoot":"","sources":["../../src/utils/BrowserConstants.ts"],"names":[],"mappings":"AAMA,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,KAAK;IAClC,MAAM,MAAM;IACZ,WAAW,MAAM;CACpB;AAKD,oBAAY,eAAe;IACvB,QAAQ,aAAa;IACrB,KAAK,UAAU;IACf,MAAM,WAAW;IACjB,IAAI,SAAS;CAChB;AAED;;;GAGG;AACH,oBAAY,iBAAiB;IACzB;;OAEG;IACH,OAAO,YAAY;IACnB;;OAEG;IACH,KAAK,UAAU;IACf;;OAEG;IACH,MAAM,WAAW;IACjB;;OAEG;IACH,YAAY,iBAAiB;IAC7B;;OAEG;IACH,SAAS,cAAc;IACvB;;OAEG;IACH,cAAc,mBAAmB;IACjC;;OAEG;IACH,IAAI,SAAS;CAChB;AAED,eAAO,MAAM,eAAe,EAAE,eAAe,GAAC,YAE7C,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,cAAc,QAAQ,CAAC;AAGpC,oBAAY,UAAU;IAClB,KAAK,sBAAsB;IAC3B,OAAO,wBAAwB;CAClC;AAGD,eAAO,MAAM,OAAO,YAAY,CAAC;AACjC,eAAO,MAAM,UAAU,IAAI,CAAC;AAC5B,eAAO,MAAM,aAAa,QAAoB,CAAC;AAE/C,oBAAY,iBAAiB;IAMzB,OAAO,IAAI;IAKX,WAAW,IAAI;IAMf,0BAA0B,IAAI;IAM9B,YAAY,IAAI;IAMhB,sBAAsB,IAAI;IAK1B,IAAI,IAAI;CACX"}
@@ -1,4 +1,4 @@
1
- /*! @azure/msal-browser v2.33.0 2023-02-06 */
1
+ /*! @azure/msal-browser v2.35.0 2023-04-03 */
2
2
  'use strict';
3
3
  import { OIDC_DEFAULT_SCOPES } from '@azure/msal-common';
4
4
 
@@ -86,6 +86,11 @@ var TemporaryCacheKeys;
86
86
  TemporaryCacheKeys["NATIVE_REQUEST"] = "request.native";
87
87
  TemporaryCacheKeys["REDIRECT_CONTEXT"] = "request.redirect.context";
88
88
  })(TemporaryCacheKeys || (TemporaryCacheKeys = {}));
89
+ var StaticCacheKeys;
90
+ (function (StaticCacheKeys) {
91
+ StaticCacheKeys["ACCOUNT_KEYS"] = "msal.account.keys";
92
+ StaticCacheKeys["TOKEN_KEYS"] = "msal.token.keys";
93
+ })(StaticCacheKeys || (StaticCacheKeys = {}));
89
94
  /**
90
95
  * Cache keys stored in-memory
91
96
  */
@@ -212,5 +217,5 @@ var CacheLookupPolicy;
212
217
  CacheLookupPolicy[CacheLookupPolicy["Skip"] = 5] = "Skip";
213
218
  })(CacheLookupPolicy || (CacheLookupPolicy = {}));
214
219
 
215
- export { ApiId, BrowserCacheLocation, BrowserConstants, CacheLookupPolicy, DB_NAME, DB_TABLE_NAME, DB_VERSION, DEFAULT_REQUEST, HTTP_REQUEST_TYPE, InMemoryCacheKeys, InteractionStatus, InteractionType, KEY_FORMAT_JWK, NativeConstants, NativeExtensionMethod, TemporaryCacheKeys, WrapperSKU };
220
+ export { ApiId, BrowserCacheLocation, BrowserConstants, CacheLookupPolicy, DB_NAME, DB_TABLE_NAME, DB_VERSION, DEFAULT_REQUEST, HTTP_REQUEST_TYPE, InMemoryCacheKeys, InteractionStatus, InteractionType, KEY_FORMAT_JWK, NativeConstants, NativeExtensionMethod, StaticCacheKeys, TemporaryCacheKeys, WrapperSKU };
216
221
  //# sourceMappingURL=BrowserConstants.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"BrowserConstants.js","sources":["../../src/utils/BrowserConstants.ts"],"sourcesContent":["/*\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { OIDC_DEFAULT_SCOPES } from \"@azure/msal-common\";\nimport { PopupRequest } from \"../request/PopupRequest\";\nimport { RedirectRequest } from \"../request/RedirectRequest\";\n\n/**\n * Constants\n */\nexport const BrowserConstants = {\n /**\n * Interaction in progress cache value\n */\n INTERACTION_IN_PROGRESS_VALUE: \"interaction_in_progress\",\n /**\n * Invalid grant error code\n */\n INVALID_GRANT_ERROR: \"invalid_grant\",\n /**\n * Default popup window width\n */\n POPUP_WIDTH: 483,\n /**\n * Default popup window height\n */\n POPUP_HEIGHT: 600,\n /**\n * Name of the popup window starts with\n */\n POPUP_NAME_PREFIX: \"msal\",\n /**\n * Default popup monitor poll interval in milliseconds\n */\n DEFAULT_POLL_INTERVAL_MS: 30,\n /**\n * Msal-browser SKU\n */\n MSAL_SKU: \"msal.js.browser\",\n};\n\nexport const NativeConstants = {\n CHANNEL_ID: \"53ee284d-920a-4b59-9d30-a60315b26836\",\n PREFERRED_EXTENSION_ID: \"ppnbnpeolgkicgegkbkbjmhlideopiji\",\n MATS_TELEMETRY: \"MATS\"\n};\n\nexport enum NativeExtensionMethod {\n HandshakeRequest = \"Handshake\",\n HandshakeResponse = \"HandshakeResponse\",\n GetToken = \"GetToken\",\n Response = \"Response\"\n}\n\nexport enum BrowserCacheLocation {\n LocalStorage = \"localStorage\",\n SessionStorage = \"sessionStorage\",\n MemoryStorage = \"memoryStorage\"\n}\n\n/**\n * HTTP Request types supported by MSAL.\n */\nexport enum HTTP_REQUEST_TYPE {\n GET = \"GET\",\n POST = \"POST\"\n}\n\n/**\n * Temporary cache keys for MSAL, deleted after any request.\n */\nexport enum TemporaryCacheKeys {\n AUTHORITY = \"authority\",\n ACQUIRE_TOKEN_ACCOUNT = \"acquireToken.account\",\n SESSION_STATE = \"session.state\",\n REQUEST_STATE = \"request.state\",\n NONCE_IDTOKEN = \"nonce.id_token\",\n ORIGIN_URI = \"request.origin\",\n RENEW_STATUS = \"token.renew.status\",\n URL_HASH = \"urlHash\",\n REQUEST_PARAMS = \"request.params\",\n SCOPES = \"scopes\",\n INTERACTION_STATUS_KEY = \"interaction.status\",\n CCS_CREDENTIAL = \"ccs.credential\",\n CORRELATION_ID = \"request.correlationId\",\n NATIVE_REQUEST = \"request.native\",\n REDIRECT_CONTEXT = \"request.redirect.context\"\n}\n\n/**\n * Cache keys stored in-memory\n */\nexport enum InMemoryCacheKeys {\n WRAPPER_SKU = \"wrapper.sku\",\n WRAPPER_VER = \"wrapper.version\"\n}\n\n/**\n * API Codes for Telemetry purposes. \n * Before adding a new code you must claim it in the MSAL Telemetry tracker as these number spaces are shared across all MSALs\n * 0-99 Silent Flow\n * 800-899 Auth Code Flow\n */\nexport enum ApiId {\n acquireTokenRedirect = 861,\n acquireTokenPopup = 862,\n ssoSilent = 863,\n acquireTokenSilent_authCode = 864,\n handleRedirectPromise = 865,\n acquireTokenByCode = 866,\n acquireTokenSilent_silentFlow = 61,\n logout = 961,\n logoutPopup = 962\n}\n\n/*\n * Interaction type of the API - used for state and telemetry\n */\nexport enum InteractionType {\n Redirect = \"redirect\",\n Popup = \"popup\",\n Silent = \"silent\",\n None = \"none\"\n}\n\n/**\n * Types of interaction currently in progress.\n * Used in events in wrapper libraries to invoke functions when certain interaction is in progress or all interactions are complete.\n */\nexport enum InteractionStatus {\n /**\n * Initial status before interaction occurs\n */\n Startup = \"startup\",\n /**\n * Status set when all login calls occuring\n */\n Login = \"login\",\n /**\n * Status set when logout call occuring\n */ \n Logout = \"logout\",\n /**\n * Status set for acquireToken calls\n */\n AcquireToken = \"acquireToken\",\n /**\n * Status set for ssoSilent calls\n */\n SsoSilent = \"ssoSilent\",\n /**\n * Status set when handleRedirect in progress\n */\n HandleRedirect = \"handleRedirect\",\n /**\n * Status set when interaction is complete\n */\n None = \"none\"\n}\n\nexport const DEFAULT_REQUEST: RedirectRequest|PopupRequest = {\n scopes: OIDC_DEFAULT_SCOPES\n};\n\n/**\n * JWK Key Format string (Type MUST be defined for window crypto APIs)\n */\nexport const KEY_FORMAT_JWK = \"jwk\";\n\n// Supported wrapper SKUs\nexport enum WrapperSKU {\n React = \"@azure/msal-react\",\n Angular = \"@azure/msal-angular\"\n}\n\n// DatabaseStorage Constants\nexport const DB_NAME = \"msal.db\";\nexport const DB_VERSION = 1;\nexport const DB_TABLE_NAME = `${DB_NAME}.keys`;\n\nexport enum CacheLookupPolicy {\n /*\n * acquireTokenSilent will attempt to retrieve an access token from the cache. If the access token is expired\n * or cannot be found the refresh token will be used to acquire a new one. Finally, if the refresh token\n * is expired acquireTokenSilent will attempt to acquire new access and refresh tokens.\n */\n Default = 0, // 0 is falsy, is equivalent to not passing in a CacheLookupPolicy\n /*\n * acquireTokenSilent will only look for access tokens in the cache. It will not attempt to renew access or\n * refresh tokens.\n */\n AccessToken = 1,\n /*\n * acquireTokenSilent will attempt to retrieve an access token from the cache. If the access token is expired or\n * cannot be found, the refresh token will be used to acquire a new one. If the refresh token is expired, it\n * will not be renewed and acquireTokenSilent will fail.\n */\n AccessTokenAndRefreshToken = 2,\n /*\n * acquireTokenSilent will not attempt to retrieve access tokens from the cache and will instead attempt to\n * exchange the cached refresh token for a new access token. If the refresh token is expired, it will not be\n * renewed and acquireTokenSilent will fail.\n */\n RefreshToken = 3,\n /*\n * acquireTokenSilent will not look in the cache for the access token. It will go directly to network with the\n * cached refresh token. If the refresh token is expired an attempt will be made to renew it. This is equivalent to\n * setting \"forceRefresh: true\".\n */\n RefreshTokenAndNetwork = 4,\n /*\n * acquireTokenSilent will attempt to renew both access and refresh tokens. It will not look in the cache. This will\n * always fail if 3rd party cookies are blocked by the browser.\n */\n Skip = 5,\n}\n"],"names":[],"mappings":";;;;AAAA;;;;AASA;;;IAGa,gBAAgB,GAAG;;;;IAI5B,6BAA6B,EAAE,yBAAyB;;;;IAIxD,mBAAmB,EAAE,eAAe;;;;IAIpC,WAAW,EAAE,GAAG;;;;IAIhB,YAAY,EAAE,GAAG;;;;IAIjB,iBAAiB,EAAE,MAAM;;;;IAIzB,wBAAwB,EAAE,EAAE;;;;IAI5B,QAAQ,EAAE,iBAAiB;EAC7B;IAEW,eAAe,GAAG;IAC3B,UAAU,EAAE,sCAAsC;IAClD,sBAAsB,EAAE,kCAAkC;IAC1D,cAAc,EAAE,MAAM;EACxB;IAEU;AAAZ,WAAY,qBAAqB;IAC7B,uDAA8B,CAAA;IAC9B,gEAAuC,CAAA;IACvC,8CAAqB,CAAA;IACrB,8CAAqB,CAAA;AACzB,CAAC,EALW,qBAAqB,KAArB,qBAAqB,QAKhC;IAEW;AAAZ,WAAY,oBAAoB;IAC5B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;IAInB,oCAAe,CAAA;;;;IAIf,sCAAiB,CAAA;;;;IAIjB,kDAA6B,CAAA;;;;IAI7B,4CAAuB,CAAA;;;;IAIvB,sDAAiC,CAAA;;;;IAIjC,kCAAa,CAAA;AACjB,CAAC,EA7BW,iBAAiB,KAAjB,iBAAiB,QA6B5B;IAEY,eAAe,GAAiC;IACzD,MAAM,EAAE,mBAAmB;EAC7B;AAEF;;;IAGa,cAAc,GAAG,MAAM;AAEpC;IACY;AAAZ,WAAY,UAAU;IAClB,yCAA2B,CAAA;IAC3B,6CAA+B,CAAA;AACnC,CAAC,EAHW,UAAU,KAAV,UAAU,QAGrB;AAED;IACa,OAAO,GAAG,UAAU;IACpB,UAAU,GAAG,EAAE;IACf,aAAa,GAAM,OAAO,WAAQ;IAEnC;AAAZ,WAAY,iBAAiB;;;;;;IAMzB,+DAAW,CAAA;;;;;IAKX,uEAAe,CAAA;;;;;;IAMf,qGAA8B,CAAA;;;;;;IAM9B,yEAAgB,CAAA;;;;;;IAMhB,6FAA0B,CAAA;;;;;IAK1B,yDAAQ,CAAA;AACZ,CAAC,EAnCW,iBAAiB,KAAjB,iBAAiB;;;;"}
1
+ {"version":3,"file":"BrowserConstants.js","sources":["../../src/utils/BrowserConstants.ts"],"sourcesContent":["/*\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { OIDC_DEFAULT_SCOPES } from \"@azure/msal-common\";\nimport { PopupRequest } from \"../request/PopupRequest\";\nimport { RedirectRequest } from \"../request/RedirectRequest\";\n\n/**\n * Constants\n */\nexport const BrowserConstants = {\n /**\n * Interaction in progress cache value\n */\n INTERACTION_IN_PROGRESS_VALUE: \"interaction_in_progress\",\n /**\n * Invalid grant error code\n */\n INVALID_GRANT_ERROR: \"invalid_grant\",\n /**\n * Default popup window width\n */\n POPUP_WIDTH: 483,\n /**\n * Default popup window height\n */\n POPUP_HEIGHT: 600,\n /**\n * Name of the popup window starts with\n */\n POPUP_NAME_PREFIX: \"msal\",\n /**\n * Default popup monitor poll interval in milliseconds\n */\n DEFAULT_POLL_INTERVAL_MS: 30,\n /**\n * Msal-browser SKU\n */\n MSAL_SKU: \"msal.js.browser\",\n};\n\nexport const NativeConstants = {\n CHANNEL_ID: \"53ee284d-920a-4b59-9d30-a60315b26836\",\n PREFERRED_EXTENSION_ID: \"ppnbnpeolgkicgegkbkbjmhlideopiji\",\n MATS_TELEMETRY: \"MATS\"\n};\n\nexport enum NativeExtensionMethod {\n HandshakeRequest = \"Handshake\",\n HandshakeResponse = \"HandshakeResponse\",\n GetToken = \"GetToken\",\n Response = \"Response\"\n}\n\nexport enum BrowserCacheLocation {\n LocalStorage = \"localStorage\",\n SessionStorage = \"sessionStorage\",\n MemoryStorage = \"memoryStorage\"\n}\n\n/**\n * HTTP Request types supported by MSAL.\n */\nexport enum HTTP_REQUEST_TYPE {\n GET = \"GET\",\n POST = \"POST\"\n}\n\n/**\n * Temporary cache keys for MSAL, deleted after any request.\n */\nexport enum TemporaryCacheKeys {\n AUTHORITY = \"authority\",\n ACQUIRE_TOKEN_ACCOUNT = \"acquireToken.account\",\n SESSION_STATE = \"session.state\",\n REQUEST_STATE = \"request.state\",\n NONCE_IDTOKEN = \"nonce.id_token\",\n ORIGIN_URI = \"request.origin\",\n RENEW_STATUS = \"token.renew.status\",\n URL_HASH = \"urlHash\",\n REQUEST_PARAMS = \"request.params\",\n SCOPES = \"scopes\",\n INTERACTION_STATUS_KEY = \"interaction.status\",\n CCS_CREDENTIAL = \"ccs.credential\",\n CORRELATION_ID = \"request.correlationId\",\n NATIVE_REQUEST = \"request.native\",\n REDIRECT_CONTEXT = \"request.redirect.context\"\n}\n\nexport enum StaticCacheKeys {\n ACCOUNT_KEYS = \"msal.account.keys\",\n TOKEN_KEYS = \"msal.token.keys\"\n}\n\n/**\n * Cache keys stored in-memory\n */\nexport enum InMemoryCacheKeys {\n WRAPPER_SKU = \"wrapper.sku\",\n WRAPPER_VER = \"wrapper.version\"\n}\n\n/**\n * API Codes for Telemetry purposes. \n * Before adding a new code you must claim it in the MSAL Telemetry tracker as these number spaces are shared across all MSALs\n * 0-99 Silent Flow\n * 800-899 Auth Code Flow\n */\nexport enum ApiId {\n acquireTokenRedirect = 861,\n acquireTokenPopup = 862,\n ssoSilent = 863,\n acquireTokenSilent_authCode = 864,\n handleRedirectPromise = 865,\n acquireTokenByCode = 866,\n acquireTokenSilent_silentFlow = 61,\n logout = 961,\n logoutPopup = 962\n}\n\n/*\n * Interaction type of the API - used for state and telemetry\n */\nexport enum InteractionType {\n Redirect = \"redirect\",\n Popup = \"popup\",\n Silent = \"silent\",\n None = \"none\"\n}\n\n/**\n * Types of interaction currently in progress.\n * Used in events in wrapper libraries to invoke functions when certain interaction is in progress or all interactions are complete.\n */\nexport enum InteractionStatus {\n /**\n * Initial status before interaction occurs\n */\n Startup = \"startup\",\n /**\n * Status set when all login calls occuring\n */\n Login = \"login\",\n /**\n * Status set when logout call occuring\n */ \n Logout = \"logout\",\n /**\n * Status set for acquireToken calls\n */\n AcquireToken = \"acquireToken\",\n /**\n * Status set for ssoSilent calls\n */\n SsoSilent = \"ssoSilent\",\n /**\n * Status set when handleRedirect in progress\n */\n HandleRedirect = \"handleRedirect\",\n /**\n * Status set when interaction is complete\n */\n None = \"none\"\n}\n\nexport const DEFAULT_REQUEST: RedirectRequest|PopupRequest = {\n scopes: OIDC_DEFAULT_SCOPES\n};\n\n/**\n * JWK Key Format string (Type MUST be defined for window crypto APIs)\n */\nexport const KEY_FORMAT_JWK = \"jwk\";\n\n// Supported wrapper SKUs\nexport enum WrapperSKU {\n React = \"@azure/msal-react\",\n Angular = \"@azure/msal-angular\"\n}\n\n// DatabaseStorage Constants\nexport const DB_NAME = \"msal.db\";\nexport const DB_VERSION = 1;\nexport const DB_TABLE_NAME = `${DB_NAME}.keys`;\n\nexport enum CacheLookupPolicy {\n /*\n * acquireTokenSilent will attempt to retrieve an access token from the cache. If the access token is expired\n * or cannot be found the refresh token will be used to acquire a new one. Finally, if the refresh token\n * is expired acquireTokenSilent will attempt to acquire new access and refresh tokens.\n */\n Default = 0, // 0 is falsy, is equivalent to not passing in a CacheLookupPolicy\n /*\n * acquireTokenSilent will only look for access tokens in the cache. It will not attempt to renew access or\n * refresh tokens.\n */\n AccessToken = 1,\n /*\n * acquireTokenSilent will attempt to retrieve an access token from the cache. If the access token is expired or\n * cannot be found, the refresh token will be used to acquire a new one. If the refresh token is expired, it\n * will not be renewed and acquireTokenSilent will fail.\n */\n AccessTokenAndRefreshToken = 2,\n /*\n * acquireTokenSilent will not attempt to retrieve access tokens from the cache and will instead attempt to\n * exchange the cached refresh token for a new access token. If the refresh token is expired, it will not be\n * renewed and acquireTokenSilent will fail.\n */\n RefreshToken = 3,\n /*\n * acquireTokenSilent will not look in the cache for the access token. It will go directly to network with the\n * cached refresh token. If the refresh token is expired an attempt will be made to renew it. This is equivalent to\n * setting \"forceRefresh: true\".\n */\n RefreshTokenAndNetwork = 4,\n /*\n * acquireTokenSilent will attempt to renew both access and refresh tokens. It will not look in the cache. This will\n * always fail if 3rd party cookies are blocked by the browser.\n */\n Skip = 5,\n}\n"],"names":[],"mappings":";;;;AAAA;;;;AASA;;;IAGa,gBAAgB,GAAG;;;;IAI5B,6BAA6B,EAAE,yBAAyB;;;;IAIxD,mBAAmB,EAAE,eAAe;;;;IAIpC,WAAW,EAAE,GAAG;;;;IAIhB,YAAY,EAAE,GAAG;;;;IAIjB,iBAAiB,EAAE,MAAM;;;;IAIzB,wBAAwB,EAAE,EAAE;;;;IAI5B,QAAQ,EAAE,iBAAiB;EAC7B;IAEW,eAAe,GAAG;IAC3B,UAAU,EAAE,sCAAsC;IAClD,sBAAsB,EAAE,kCAAkC;IAC1D,cAAc,EAAE,MAAM;EACxB;IAEU;AAAZ,WAAY,qBAAqB;IAC7B,uDAA8B,CAAA;IAC9B,gEAAuC,CAAA;IACvC,8CAAqB,CAAA;IACrB,8CAAqB,CAAA;AACzB,CAAC,EALW,qBAAqB,KAArB,qBAAqB,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CAAA;IACf,oCAAiB,CAAA;IACjB,gCAAa,CAAA;AACjB,CAAC,EALW,eAAe,KAAf,eAAe,QAK1B;AAED;;;;IAIY;AAAZ,WAAY,iBAAiB;;;;IAIzB,wCAAmB,CAAA;;;;IAInB,oCAAe,CAAA;;;;IAIf,sCAAiB,CAAA;;;;IAIjB,kDAA6B,CAAA;;;;IAI7B,4CAAuB,CAAA;;;;IAIvB,sDAAiC,CAAA;;;;IAIjC,kCAAa,CAAA;AACjB,CAAC,EA7BW,iBAAiB,KAAjB,iBAAiB,QA6B5B;IAEY,eAAe,GAAiC;IACzD,MAAM,EAAE,mBAAmB;EAC7B;AAEF;;;IAGa,cAAc,GAAG,MAAM;AAEpC;IACY;AAAZ,WAAY,UAAU;IAClB,yCAA2B,CAAA;IAC3B,6CAA+B,CAAA;AACnC,CAAC,EAHW,UAAU,KAAV,UAAU,QAGrB;AAED;IACa,OAAO,GAAG,UAAU;IACpB,UAAU,GAAG,EAAE;IACf,aAAa,GAAM,OAAO,WAAQ;IAEnC;AAAZ,WAAY,iBAAiB;;;;;;IAMzB,+DAAW,CAAA;;;;;IAKX,uEAAe,CAAA;;;;;;IAMf,qGAA8B,CAAA;;;;;;IAM9B,yEAAgB,CAAA;;;;;;IAMhB,6FAA0B,CAAA;;;;;IAK1B,yDAAQ,CAAA;AACZ,CAAC,EAnCW,iBAAiB,KAAjB,iBAAiB;;;;"}
@@ -1,4 +1,4 @@
1
- /*! @azure/msal-browser v2.33.0 2023-02-06 */
1
+ /*! @azure/msal-browser v2.35.0 2023-04-03 */
2
2
  'use strict';
3
3
  import { StringUtils, ProtocolUtils, ClientAuthError, UrlString } from '@azure/msal-common';
4
4
 
@@ -1,4 +1,4 @@
1
- /*! @azure/msal-browser v2.33.0 2023-02-06 */
1
+ /*! @azure/msal-browser v2.35.0 2023-04-03 */
2
2
  'use strict';
3
3
  import { Constants } from '@azure/msal-common';
4
4
 
@@ -1,4 +1,4 @@
1
- /*! @azure/msal-browser v2.33.0 2023-02-06 */
1
+ /*! @azure/msal-browser v2.35.0 2023-04-03 */
2
2
  'use strict';
3
3
  import { Constants, UrlString } from '@azure/msal-common';
4
4
  import { FetchClient } from '../network/FetchClient.js';
@@ -1,4 +1,4 @@
1
- /*! @azure/msal-browser v2.33.0 2023-02-06 */
1
+ /*! @azure/msal-browser v2.35.0 2023-04-03 */
2
2
  'use strict';
3
3
  /*
4
4
  * Copyright (c) Microsoft Corporation. All rights reserved.