@axa-fr/oidc-client-service-worker 7.29.7 → 7.30.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 (107) hide show
  1. package/README.md +64 -0
  2. package/dist/OidcServiceWorker.d.ts +2 -1
  3. package/dist/OidcServiceWorker.d.ts.map +1 -0
  4. package/dist/OidcServiceWorker.js +995 -765
  5. package/dist/OidcServiceWorker.js.map +1 -1
  6. package/dist/constants.d.ts.map +1 -0
  7. package/dist/crypto.d.ts.map +1 -0
  8. package/dist/dpop.d.ts.map +1 -0
  9. package/dist/jwt.d.ts.map +1 -0
  10. package/dist/oidcConfig.d.ts.map +1 -0
  11. package/dist/protocol.d.ts +140 -2
  12. package/dist/protocol.d.ts.map +1 -0
  13. package/dist/protocol.js +50 -2
  14. package/dist/protocol.js.map +1 -1
  15. package/dist/resource.d.ts +22 -0
  16. package/dist/resource.d.ts.map +1 -0
  17. package/dist/tokenContexts.d.ts +5 -0
  18. package/dist/tokenContexts.d.ts.map +1 -0
  19. package/dist/{src/types.d.ts → types.d.ts} +26 -1
  20. package/dist/types.d.ts.map +1 -0
  21. package/dist/utils/codeVerifier.d.ts.map +1 -0
  22. package/dist/{src/utils → utils}/domains.d.ts +2 -2
  23. package/dist/utils/domains.d.ts.map +1 -0
  24. package/dist/utils/index.d.ts.map +1 -0
  25. package/dist/utils/normalizeUrl.d.ts.map +1 -0
  26. package/dist/utils/serializeHeaders.d.ts.map +1 -0
  27. package/dist/utils/shouldBypassDestination.d.ts.map +1 -0
  28. package/dist/utils/sleep.d.ts.map +1 -0
  29. package/dist/utils/strings.d.ts.map +1 -0
  30. package/dist/{src/utils → utils}/tokens.d.ts +12 -3
  31. package/dist/utils/tokens.d.ts.map +1 -0
  32. package/dist/utils/waitForValidTokens.d.ts.map +1 -0
  33. package/dist/version.d.ts +3 -0
  34. package/dist/version.d.ts.map +1 -0
  35. package/package.json +3 -2
  36. package/src/OidcServiceWorker.ts +290 -34
  37. package/src/__tests__/jwt.spec.ts +17 -0
  38. package/src/__tests__/resource.spec.ts +98 -0
  39. package/src/__tests__/workerResource.spec.ts +919 -0
  40. package/src/jwt.ts +4 -1
  41. package/src/oidcConfig.ts +2 -1
  42. package/src/protocol.ts +16 -1
  43. package/src/resource.ts +104 -0
  44. package/src/tokenContexts.ts +39 -0
  45. package/src/types.ts +27 -1
  46. package/src/utils/domains.ts +20 -2
  47. package/src/utils/tokens.ts +155 -8
  48. package/src/version.ts +1 -1
  49. package/dist/src/OidcServiceWorker.d.ts +0 -2
  50. package/dist/src/OidcServiceWorker.d.ts.map +0 -1
  51. package/dist/src/__tests__/jwt.spec.d.ts +0 -2
  52. package/dist/src/__tests__/jwt.spec.d.ts.map +0 -1
  53. package/dist/src/__tests__/oidcConfig.spec.d.ts +0 -2
  54. package/dist/src/__tests__/oidcConfig.spec.d.ts.map +0 -1
  55. package/dist/src/__tests__/protocol.spec.d.ts +0 -2
  56. package/dist/src/__tests__/protocol.spec.d.ts.map +0 -1
  57. package/dist/src/constants.d.ts.map +0 -1
  58. package/dist/src/crypto.d.ts.map +0 -1
  59. package/dist/src/dpop.d.ts.map +0 -1
  60. package/dist/src/jwt.d.ts.map +0 -1
  61. package/dist/src/oidcConfig.d.ts.map +0 -1
  62. package/dist/src/protocol.d.ts +0 -134
  63. package/dist/src/protocol.d.ts.map +0 -1
  64. package/dist/src/types.d.ts.map +0 -1
  65. package/dist/src/utils/__tests__/codeVerifier.spec.d.ts +0 -2
  66. package/dist/src/utils/__tests__/codeVerifier.spec.d.ts.map +0 -1
  67. package/dist/src/utils/__tests__/domains.spec.d.ts +0 -2
  68. package/dist/src/utils/__tests__/domains.spec.d.ts.map +0 -1
  69. package/dist/src/utils/__tests__/normalizeUrl.spec.d.ts +0 -2
  70. package/dist/src/utils/__tests__/normalizeUrl.spec.d.ts.map +0 -1
  71. package/dist/src/utils/__tests__/serializeHeaders.spec.d.ts +0 -2
  72. package/dist/src/utils/__tests__/serializeHeaders.spec.d.ts.map +0 -1
  73. package/dist/src/utils/__tests__/shouldBypassDestination.spec.d.ts +0 -2
  74. package/dist/src/utils/__tests__/shouldBypassDestination.spec.d.ts.map +0 -1
  75. package/dist/src/utils/__tests__/strings.spec.d.ts +0 -2
  76. package/dist/src/utils/__tests__/strings.spec.d.ts.map +0 -1
  77. package/dist/src/utils/__tests__/testHelper.d.ts +0 -58
  78. package/dist/src/utils/__tests__/testHelper.d.ts.map +0 -1
  79. package/dist/src/utils/__tests__/tokens.spec.d.ts +0 -2
  80. package/dist/src/utils/__tests__/tokens.spec.d.ts.map +0 -1
  81. package/dist/src/utils/__tests__/waitForValidTokens.spec.d.ts +0 -2
  82. package/dist/src/utils/__tests__/waitForValidTokens.spec.d.ts.map +0 -1
  83. package/dist/src/utils/codeVerifier.d.ts.map +0 -1
  84. package/dist/src/utils/domains.d.ts.map +0 -1
  85. package/dist/src/utils/index.d.ts.map +0 -1
  86. package/dist/src/utils/normalizeUrl.d.ts.map +0 -1
  87. package/dist/src/utils/serializeHeaders.d.ts.map +0 -1
  88. package/dist/src/utils/shouldBypassDestination.d.ts.map +0 -1
  89. package/dist/src/utils/sleep.d.ts.map +0 -1
  90. package/dist/src/utils/strings.d.ts.map +0 -1
  91. package/dist/src/utils/tokens.d.ts.map +0 -1
  92. package/dist/src/utils/waitForValidTokens.d.ts.map +0 -1
  93. package/dist/src/version.d.ts +0 -3
  94. package/dist/src/version.d.ts.map +0 -1
  95. /package/dist/{src/constants.d.ts → constants.d.ts} +0 -0
  96. /package/dist/{src/crypto.d.ts → crypto.d.ts} +0 -0
  97. /package/dist/{src/dpop.d.ts → dpop.d.ts} +0 -0
  98. /package/dist/{src/jwt.d.ts → jwt.d.ts} +0 -0
  99. /package/dist/{src/oidcConfig.d.ts → oidcConfig.d.ts} +0 -0
  100. /package/dist/{src/utils → utils}/codeVerifier.d.ts +0 -0
  101. /package/dist/{src/utils → utils}/index.d.ts +0 -0
  102. /package/dist/{src/utils → utils}/normalizeUrl.d.ts +0 -0
  103. /package/dist/{src/utils → utils}/serializeHeaders.d.ts +0 -0
  104. /package/dist/{src/utils → utils}/shouldBypassDestination.d.ts +0 -0
  105. /package/dist/{src/utils → utils}/sleep.d.ts +0 -0
  106. /package/dist/{src/utils → utils}/strings.d.ts +0 -0
  107. /package/dist/{src/utils → utils}/waitForValidTokens.d.ts +0 -0
@@ -1,134 +0,0 @@
1
- import { MessageData, MessageEventData, MessageEventType, Nonce, OidcConfiguration, OidcServerConfiguration, Status } from './types';
2
- export type { MessageData, MessageEventData, MessageEventType, Nonce, OidcConfiguration, OidcServerConfiguration, Status, };
3
- /**
4
- * Semver-protected version of the service worker `postMessage` protocol.
5
- *
6
- * - The `MAJOR` component changes only on a breaking change to any of the
7
- * exports in this module.
8
- * - The `MINOR` component changes when new (additive) message types or
9
- * helpers are introduced.
10
- * - The `PATCH` component changes for documentation or non-behavioural
11
- * tweaks.
12
- */
13
- export declare const PROTOCOL_VERSION: "1.0.0";
14
- /**
15
- * Every supported service worker message type.
16
- *
17
- * The values are also the literal string used on the wire as
18
- * `MessageEventData.type` and must therefore remain stable across patch and
19
- * minor versions of the protocol.
20
- */
21
- export declare const ServiceWorkerMessageType: {
22
- /** Lifecycle: tells the SW to skip the `waiting` state. */
23
- readonly SKIP_WAITING: "SKIP_WAITING";
24
- /** Lifecycle: asks the SW to claim the current page. */
25
- readonly CLAIM: "claim";
26
- /** Resets the session entry kept inside the SW for a configuration. */
27
- readonly CLEAR: "clear";
28
- /** Initialises a configuration entry inside the SW. */
29
- readonly INIT: "init";
30
- readonly SET_STATE: "setState";
31
- readonly GET_STATE: "getState";
32
- readonly SET_CODE_VERIFIER: "setCodeVerifier";
33
- readonly GET_CODE_VERIFIER: "getCodeVerifier";
34
- readonly SET_SESSION_STATE: "setSessionState";
35
- readonly GET_SESSION_STATE: "getSessionState";
36
- readonly SET_NONCE: "setNonce";
37
- readonly GET_NONCE: "getNonce";
38
- readonly SET_DPOP_NONCE: "setDemonstratingProofOfPossessionNonce";
39
- readonly GET_DPOP_NONCE: "getDemonstratingProofOfPossessionNonce";
40
- readonly SET_DPOP_JWK: "setDemonstratingProofOfPossessionJwk";
41
- readonly GET_DPOP_JWK: "getDemonstratingProofOfPossessionJwk";
42
- };
43
- export type ServiceWorkerMessageTypeKey = keyof typeof ServiceWorkerMessageType;
44
- export type ServiceWorkerMessageTypeValue = (typeof ServiceWorkerMessageType)[ServiceWorkerMessageTypeKey];
45
- /**
46
- * Structural shape of a message sent to the service worker. The shape is
47
- * identical to {@link MessageEventData} but typed against the public
48
- * {@link ServiceWorkerMessageTypeValue} union and with optional fields where
49
- * the underlying SW tolerates them.
50
- */
51
- export interface ServiceWorkerMessage<TData extends Partial<MessageData> | null = Partial<MessageData> | null> {
52
- type: ServiceWorkerMessageTypeValue | 'SKIP_WAITING' | 'claim';
53
- configurationName: string;
54
- data: TData;
55
- /**
56
- * Optional tab identifier injected by the high-level helpers. Consumers
57
- * sending raw messages can omit it; the SW falls back to `'default'`.
58
- */
59
- tabId?: string;
60
- }
61
- /**
62
- * Generic envelope used by every response. Each individual message type may
63
- * extend it with additional, well-known fields (see PROTOCOL.md).
64
- */
65
- export interface ServiceWorkerResponse {
66
- configurationName?: string;
67
- /** Set by the SW when it cannot service the request. */
68
- error?: unknown;
69
- [key: string]: unknown;
70
- }
71
- /**
72
- * Stable internal token placeholders. They are returned by the service
73
- * worker in lieu of secret values (access/refresh tokens, nonces and code
74
- * verifier) so consumers never see the cleartext.
75
- */
76
- export declare const TOKEN_PLACEHOLDERS: {
77
- readonly ACCESS_TOKEN: "ACCESS_TOKEN_SECURED_BY_OIDC_SERVICE_WORKER";
78
- readonly REFRESH_TOKEN: "REFRESH_TOKEN_SECURED_BY_OIDC_SERVICE_WORKER";
79
- readonly NONCE_TOKEN: "NONCE_SECURED_BY_OIDC_SERVICE_WORKER";
80
- readonly CODE_VERIFIER: "CODE_VERIFIER_SECURED_BY_OIDC_SERVICE_WORKER";
81
- };
82
- /** Prefix used for every DPoP placeholder returned by the SW. */
83
- export declare const DPOP_TOKEN_PLACEHOLDER_PREFIX: "DPOP_SECURED_BY_OIDC_SERVICE_WORKER";
84
- /**
85
- * Browser storage key conventions used by the OIDC client when no service
86
- * worker is available, or as a fallback alongside the SW. They are exported
87
- * so external integrations can read/clean up the same entries.
88
- */
89
- export declare const STORAGE_KEY_PREFIX: {
90
- /** sessionStorage – per-tab tab identifier (`oidc.tabId.<configurationName>`). */
91
- readonly TAB_ID: "oidc.tabId.";
92
- /** sessionStorage – `oidc.state.<configurationName>`. */
93
- readonly STATE: "oidc.state.";
94
- /** sessionStorage – `oidc.nonce.<configurationName>`. */
95
- readonly NONCE: "oidc.nonce.";
96
- /** sessionStorage – `oidc.code_verifier.<configurationName>`. */
97
- readonly CODE_VERIFIER: "oidc.code_verifier.";
98
- /** localStorage – `oidc.login.<configurationName>`. */
99
- readonly LOGIN_PARAMS: "oidc.login.";
100
- /** sessionStorage – `oidc.sw.version_mismatch_reload.<configurationName>`. */
101
- readonly SW_VERSION_MISMATCH_RELOAD: "oidc.sw.version_mismatch_reload.";
102
- };
103
- /** sessionStorage key tracking the SW controllerchange reload counter. */
104
- export declare const SW_CONTROLLER_CHANGE_RELOAD_COUNT_KEY: "oidc.sw.controllerchange_reload_count";
105
- /**
106
- * Builds a typed sessionStorage / localStorage key from one of the known
107
- * prefixes and a configuration name. The function is intentionally
108
- * single-purpose so we never lose the prefix-based stability guarantee.
109
- */
110
- export declare const buildStorageKey: (prefix: (typeof STORAGE_KEY_PREFIX)[keyof typeof STORAGE_KEY_PREFIX], configurationName: string) => string;
111
- /**
112
- * Builds the stable placeholder string the SW returns instead of an
113
- * access/refresh/nonce/code-verifier secret. Useful for consumers that need
114
- * to detect whether a value comes from the SW.
115
- */
116
- export declare const buildSecuredTokenPlaceholder: (placeholder: (typeof TOKEN_PLACEHOLDERS)[keyof typeof TOKEN_PLACEHOLDERS], configurationName: string, tabId?: string) => string;
117
- /**
118
- * Builds the placeholder returned for DPoP-secured access tokens
119
- * (`DPOP_SECURED_BY_OIDC_SERVICE_WORKER_<config>#tabId=<tabId>`).
120
- */
121
- export declare const buildDpopSecuredPlaceholder: (configurationName: string, tabId?: string) => string;
122
- /**
123
- * Type guard returning `true` when the provided value is one of the
124
- * supported, public service worker message types.
125
- */
126
- export declare const isServiceWorkerMessageType: (value: unknown) => value is ServiceWorkerMessageTypeValue;
127
- /**
128
- * Internal wire-level type, re-exported for legacy parity. New code should
129
- * prefer {@link ServiceWorkerMessageTypeValue}.
130
- *
131
- * @internal
132
- */
133
- export type ServiceWorkerMessageEventType = MessageEventType;
134
- //# sourceMappingURL=protocol.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"protocol.d.ts","sourceRoot":"","sources":["../../src/protocol.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EACV,WAAW,EACX,gBAAgB,EAChB,gBAAgB,EAChB,KAAK,EACL,iBAAiB,EACjB,uBAAuB,EACvB,MAAM,EACP,MAAM,SAAS,CAAC;AAEjB,YAAY,EACV,WAAW,EACX,gBAAgB,EAChB,gBAAgB,EAChB,KAAK,EACL,iBAAiB,EACjB,uBAAuB,EACvB,MAAM,GACP,CAAC;AAEF;;;;;;;;;GASG;AACH,eAAO,MAAM,gBAAgB,EAAG,OAAgB,CAAC;AAEjD;;;;;;GAMG;AACH,eAAO,MAAM,wBAAwB;IACnC,2DAA2D;;IAE3D,wDAAwD;;IAExD,uEAAuE;;IAEvE,uDAAuD;;;;;;;;;;;;;;CAc/C,CAAC;AAEX,MAAM,MAAM,2BAA2B,GAAG,MAAM,OAAO,wBAAwB,CAAC;AAChF,MAAM,MAAM,6BAA6B,GACvC,CAAC,OAAO,wBAAwB,CAAC,CAAC,2BAA2B,CAAC,CAAC;AAEjE;;;;;GAKG;AACH,MAAM,WAAW,oBAAoB,CACnC,KAAK,SAAS,OAAO,CAAC,WAAW,CAAC,GAAG,IAAI,GAAG,OAAO,CAAC,WAAW,CAAC,GAAG,I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AC;IACvB,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,GAAG,MAAM,CAAC;CAC7B,CAAC;AAEF,MAAM,MAAM,QAAQ,GAAG;IACrB,CAAC,GAAG,EAAE,MAAM,GAAG,UAAU,CAAC;CAC3B,CAAC"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=codeVerifier.spec.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"codeVerifier.spec.d.ts","sourceRoot":"","sources":["../../../../src/utils/__tests__/codeVerifier.spec.ts"],"names":[],"mappings":""}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=domains.spec.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"domains.spec.d.ts","sourceRoot":"","sources":["../../../../src/utils/__tests__/domains.spec.ts"],"names":[],"mappings":""}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=normalizeUrl.spec.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"normalizeUrl.spec.d.ts","sourceRoot":"","sources":["../../../../src/utils/__tests__/normalizeUrl.spec.ts"],"names":[],"mappings":""}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=serializeHeaders.spec.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"serializeHeaders.spec.d.ts","sourceRoot":"","sources":["../../../../src/utils/__tests__/serializeHeaders.spec.ts"],"names":[],"mappings":""}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=shouldBypassDestination.spec.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"shouldBypassDestination.spec.d.ts","sourceRoot":"","sources":["../../../../src/utils/__tests__/shouldBypassDestination.spec.ts"],"names":[],"mappings":""}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=strings.spec.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"strings.spec.d.ts","sourceRoot":"","sources":["../../../../src/utils/__tests__/strings.spec.ts"],"names":[],"mappings":""}
@@ -1,58 +0,0 @@
1
- import { AccessTokenPayload, IdTokenPayload, Nonce, OidcConfig, OidcConfiguration, OidcServerConfiguration, Status, Tokens } from '../../types';
2
- declare const currentTimeUnixSeconds: () => number;
3
- declare const createToken: (expires: number, issued_at: number) => Tokens;
4
- declare class TokenBuilder {
5
- private tokens;
6
- withExpiredToken(): TokenBuilder;
7
- withNonExpiredToken(): TokenBuilder;
8
- withExpiresAt(expiresAt: number): TokenBuilder;
9
- withIssuedAt(issued_at: number | string): TokenBuilder;
10
- withExpiresIn(expires_in: number | string): TokenBuilder;
11
- withIdToken(id_token: string): TokenBuilder;
12
- withAccessTokenPayload(accessTokenPayload: AccessTokenPayload): TokenBuilder;
13
- withAccessToken(access_token: string): TokenBuilder;
14
- withIdTokenPayload(idTokenPayload: IdTokenPayload): TokenBuilder;
15
- build(): Tokens;
16
- }
17
- declare class OidcConfigBuilder {
18
- private oidcConfig;
19
- withTestingDefault(): OidcConfigBuilder;
20
- withHideAccessToken(hideAccessToken: boolean): OidcConfigBuilder;
21
- withConfigurationName(configurationName: string): OidcConfigBuilder;
22
- withTokens(tokens: Tokens): OidcConfigBuilder;
23
- withStatus(status: Status): OidcConfigBuilder;
24
- withState(state: string): OidcConfigBuilder;
25
- withCodeVerifier(codeVerifier: string): OidcConfigBuilder;
26
- withNonce(nonce: Nonce): OidcConfigBuilder;
27
- withOidcServerConfiguration(oidcServerConfiguration: OidcServerConfiguration): OidcConfigBuilder;
28
- withOidcConfiguration(oidcConfiguration: OidcConfiguration): OidcConfigBuilder;
29
- build(): OidcConfig;
30
- }
31
- declare class OidcServerConfigBuilder {
32
- private oidcServerConfig;
33
- withTestingDefault(): OidcServerConfigBuilder;
34
- withRevocationEndpoint(revocationEndpoint: string): OidcServerConfigBuilder;
35
- withIssuer(issuer: string): OidcServerConfigBuilder;
36
- withAuthorizationEndpoint(authorizationEndpoint: string): OidcServerConfigBuilder;
37
- withTokenEndpoint(tokenEndpoint: string): OidcServerConfigBuilder;
38
- withUserInfoEndpoint(userInfoEndpoint: string): OidcServerConfigBuilder;
39
- build(): OidcServerConfiguration;
40
- }
41
- interface TestingResponse extends Response {
42
- bodyContent?: any;
43
- }
44
- declare class ResponseBuilder {
45
- private response;
46
- withStatus(status: number): ResponseBuilder;
47
- withBody(body: string): ResponseBuilder;
48
- withHeaders(headers: Headers): ResponseBuilder;
49
- /**
50
- * Custom property for Testing setup
51
- * @param body
52
- * @returns
53
- */
54
- withBodyContent(body: any): ResponseBuilder;
55
- build(): TestingResponse;
56
- }
57
- export { createToken, currentTimeUnixSeconds, OidcConfigBuilder, OidcServerConfigBuilder, ResponseBuilder, TokenBuilder, };
58
- //# sourceMappingURL=testHelper.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"testHelper.d.ts","sourceRoot":"","sources":["../../../../src/utils/__tests__/testHelper.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,kBAAkB,EAClB,cAAc,EACd,KAAK,EACL,UAAU,EACV,iBAAiB,EACjB,uBAAuB,EACvB,MAAM,EACN,MAAM,EACP,MAAM,aAAa,CAAC;AAErB,QAAA,MAAM,sBAAsB,QAAO,MAElC,CAAC;AAEF,QAAA,MAAM,WAAW,GAAI,SAAS,MAAM,EAAE,WAAW,MAAM,KAAG,MAUzD,CAAC;AAEF,cAAM,YAAY;IAChB,OAAO,CAAC,MAAM,CAQZ;IAEK,gBAAgB,IAAI,YAAY;IAMhC,mBAAmB,IAAI,YAAY;IAOnC,aAAa,CAAC,SAAS,EAAE,MAAM,GAAG,YAAY;IAK9C,YAAY,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,GAAG,YAAY;IAKtD,aAAa,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,GAAG,YAAY;IAKxD,WAAW,CAAC,QAAQ,EAAE,MAAM,GAAG,YAAY;IAK3C,sBAAsB,CAAC,kBAAkB,EAAE,kBAAkB,GAAG,YAAY;IAK5E,eAAe,CAAC,YAAY,EAAE,M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M,EAAE,MAAM,GAAG,eAAe;IAK3C,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,eAAe;IAKvC,WAAW,CAAC,OAAO,EAAE,OAAO,GAAG,eAAe;IAKrD;;;;OAIG;IACI,eAAe,CAAC,IAAI,EAAE,GAAG,GAAG,eAAe;IAK3C,KAAK,IAAI,eAAe;CA2ChC;AAED,OAAO,EACL,WAAW,EACX,sBAAsB,EACtB,iBAAiB,EACjB,uBAAuB,EACvB,eAAe,EACf,YAAY,GACb,CAAC"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=tokens.spec.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"tokens.spec.d.ts","sourceRoot":"","sources":["../../../../src/utils/__tests__/tokens.spec.ts"],"names":[],"mappings":""}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=waitForValidTokens.spec.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"waitForValidTokens.spec.d.ts","sourceRoot":"","sources":["../../../../src/utils/__tests__/waitForValidTokens.spec.ts"],"names":[],"mappings":""}
@@ -1 +0,0 @@
1
- {"version":3,"file":"codeVerifier.d.ts","sourceRoot":"","sources":["../../../src/utils/codeVerifier.ts"],"names":[],"mappings":"AAAA,wBAAgB,mBAAmB,CAAC,YAAY,EAAE,MAAM,EAAE,eAAe,EAAE,MAAM,GAAG,MAAM,CAGzF;AAED,eAAO,MAAM,wCAAwC,GAAI,MAAM,MAAM,KAAG,MAKvE,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"domains.d.ts","sourceRoot":"","sources":["../../../src/utils/domains.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,aAAa,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAGvF,wBAAgB,WAAW,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE,QAAQ,EAAE,MAAM,QAqB9D;AAED,eAAO,MAAM,UAAU,GACrB,eAAe,MAAM,EAAE,GAAG,aAAa,EACvC,MAAM,MAAM,GAAG,aAAa,aAO7B,CAAC;AAEF,eAAO,MAAM,wBAAwB,GACnC,UAAU,QAAQ,EAClB,KAAK,MAAM,EACX,gBAAgB,cAAc,wBAyD/B,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,oBAAoB,CAAC;AACnC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,sBAAsB,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"normalizeUrl.d.ts","sourceRoot":"","sources":["../../../src/utils/normalizeUrl.ts"],"names":[],"mappings":"AAAA,wBAAgB,YAAY,CAAC,GAAG,EAAE,MAAM,UAOvC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"serializeHeaders.d.ts","sourceRoot":"","sources":["../../../src/utils/serializeHeaders.ts"],"names":[],"mappings":"AAAA,iBAAS,gBAAgB,CAAC,OAAO,EAAE,OAAO,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CASlE;AACD,OAAO,EAAE,gBAAgB,EAAE,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"shouldBypassDestination.d.ts","sourceRoot":"","sources":["../../../src/utils/shouldBypassDestination.ts"],"names":[],"mappings":"AAEA;;;;GAIG;AACH,eAAO,MAAM,uBAAuB,GAAI,aAAa,MAAM,EAAE,MAAM,MAAM,KAAG,OAE3E,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"sleep.d.ts","sourceRoot":"","sources":["../../../src/utils/sleep.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,KAAK,GAAI,IAAI,MAAM,qBAAoD,CAAC;AAC9E,OAAO,EAAE,KAAK,EAAE,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"strings.d.ts","sourceRoot":"","sources":["../../../src/utils/strings.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,wBAAgB,WAAW,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,UAEpD"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"tokens.d.ts","sourceRoot":"","sources":["../../../src/utils/tokens.ts"],"names":[],"mappings":"AAEA,OAAO,EAEL,cAAc,EACd,UAAU,EAEV,uBAAuB,EACvB,MAAM,EACP,MAAM,UAAU,CAAC;AAElB,eAAO,MAAM,QAAQ,GAAI,SAAS,MAAM,QAEvC,CAAC;AACF,iBAAS,gBAAgB,CAAC,GAAG,EAAE,MAAM,UAMpC;AAED,iBAAS,eAAe,CAAC,yCAAyC,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,UAG5F;AAED,iBAAS,aAAa,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,WAK3C;AAED,QAAA,MAAM,mBAAmB,GAAI,QAAQ,MAAM,QAW1C,CAAC;AAIF,QAAA,MAAM,iBAAiB,GACrB,QAAQ,MAAM,EACd,OAAO,MAAM,GAAG,IAAI,EACpB,yBAAyB,uBAAuB,KAC/C;IAAE,OAAO,EAAE,OAAO,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CA2CpC,CAAC;AAsBF,iBAAS,WAAW,CAClB,MAAM,EAAE,MAAM,EACd,sBAAsB,EAAE,UAAU,EAClC,iBAAiB,EAAE,MAAM;;;;;;;;;EA4F1B;AAGD,iBAAS,UAAU,CAAC,sBAAsB,EAAE,UAAU,IAE5C,UAAU,QAAQ,kCAsB3B;AAED,OAAO,EACL,gBAAgB,EAChB,eAAe,EACf,aAAa,EACb,mBAAmB,EACnB,iBAAiB,EACjB,UAAU,EACV,WAAW,GACZ,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"waitForValidTokens.d.ts","sourceRoot":"","sources":["../../../src/utils/waitForValidTokens.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAItC,eAAO,MAAM,wBAAwB,OAAO,CAAC;AAC7C,eAAO,MAAM,8BAA8B,MAAM,CAAC;AAElD;;;;;GAKG;AACH,wBAAsB,kBAAkB,CACtC,MAAM,EAAE,UAAU,EAClB,SAAS,SAA2B,EACpC,cAAc,SAAiC,GAC9C,OAAO,CAAC,QAAQ,GAAG,IAAI,CAAC,CAoB1B"}
@@ -1,3 +0,0 @@
1
- declare const _default: "7.29.7";
2
- export default _default;
3
- //# sourceMappingURL=version.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../../src/version.ts"],"names":[],"mappings":"wBAAe,QAAQ;AAAvB,wBAAwB"}
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes