@thunderid/browser 0.0.4 → 0.1.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 (112) hide show
  1. package/README.md +1 -1
  2. package/dist/FetchHttpClient.d.ts +1 -0
  3. package/dist/FetchHttpClient.d.ts.map +1 -1
  4. package/dist/ThunderIDBrowserClient.d.ts +66 -10
  5. package/dist/ThunderIDBrowserClient.d.ts.map +1 -1
  6. package/dist/cjs/index.js +1333 -3001
  7. package/dist/cjs/index.js.map +1 -1
  8. package/dist/{__legacy__/constants/hooks.d.ts → constants/Hooks.d.ts} +5 -1
  9. package/dist/constants/Hooks.d.ts.map +1 -0
  10. package/dist/{__legacy__/constants/session-management.d.ts → constants/SPAConstants.d.ts} +11 -2
  11. package/dist/constants/SPAConstants.d.ts.map +1 -0
  12. package/dist/index.d.ts +23 -18
  13. package/dist/index.d.ts.map +1 -1
  14. package/dist/index.js +1568 -3248
  15. package/dist/index.js.map +1 -1
  16. package/dist/models/BrowserConfig.d.ts +46 -0
  17. package/dist/models/BrowserConfig.d.ts.map +1 -0
  18. package/dist/{__legacy__/models/storage.d.ts → models/BrowserStorage.d.ts} +7 -16
  19. package/dist/models/BrowserStorage.d.ts.map +1 -0
  20. package/dist/{__legacy__/models/sign-in.d.ts → models/SignInConfig.d.ts} +9 -1
  21. package/dist/models/SignInConfig.d.ts.map +1 -0
  22. package/dist/{__legacy__/models/sign-out-error.d.ts → models/SignOutError.d.ts} +7 -1
  23. package/dist/models/SignOutError.d.ts.map +1 -0
  24. package/dist/{__legacy__/models/request-custom-grant.d.ts → models/TokenExchangeConfig.d.ts} +8 -3
  25. package/dist/models/TokenExchangeConfig.d.ts.map +1 -0
  26. package/dist/models/config.d.ts +1 -1
  27. package/dist/models/config.d.ts.map +1 -1
  28. package/dist/{__legacy__/stores/session-store.d.ts → stores/LocalStore.d.ts} +6 -2
  29. package/dist/stores/LocalStore.d.ts.map +1 -0
  30. package/dist/{__legacy__/stores/memory-store.d.ts → stores/MemoryStore.d.ts} +6 -2
  31. package/dist/stores/MemoryStore.d.ts.map +1 -0
  32. package/dist/{__legacy__/stores/local-store.d.ts → stores/SessionStore.d.ts} +6 -2
  33. package/dist/stores/SessionStore.d.ts.map +1 -0
  34. package/dist/utils/AuthenticationHelper.d.ts +192 -0
  35. package/dist/utils/AuthenticationHelper.d.ts.map +1 -0
  36. package/dist/utils/SPACryptoUtils.d.ts +68 -0
  37. package/dist/utils/SPACryptoUtils.d.ts.map +1 -0
  38. package/dist/utils/SPAHelper.d.ts +50 -0
  39. package/dist/utils/SPAHelper.d.ts.map +1 -0
  40. package/dist/utils/SPAUtils.d.ts +145 -0
  41. package/dist/utils/SPAUtils.d.ts.map +1 -0
  42. package/dist/{__legacy__/models/session-management-helper.d.ts → utils/SessionManagementHelper.d.ts} +21 -2
  43. package/dist/utils/SessionManagementHelper.d.ts.map +1 -0
  44. package/dist/utils/http.d.ts +12 -25
  45. package/dist/utils/http.d.ts.map +1 -1
  46. package/package.json +6 -4
  47. package/dist/__legacy__/client.d.ts +0 -767
  48. package/dist/__legacy__/client.d.ts.map +0 -1
  49. package/dist/__legacy__/clients/index.d.ts +0 -20
  50. package/dist/__legacy__/clients/index.d.ts.map +0 -1
  51. package/dist/__legacy__/clients/main-thread-client.d.ts +0 -23
  52. package/dist/__legacy__/clients/main-thread-client.d.ts.map +0 -1
  53. package/dist/__legacy__/clients/web-worker-client.d.ts +0 -22
  54. package/dist/__legacy__/clients/web-worker-client.d.ts.map +0 -1
  55. package/dist/__legacy__/constants/errors.d.ts +0 -19
  56. package/dist/__legacy__/constants/errors.d.ts.map +0 -1
  57. package/dist/__legacy__/constants/hooks.d.ts.map +0 -1
  58. package/dist/__legacy__/constants/index.d.ts +0 -24
  59. package/dist/__legacy__/constants/index.d.ts.map +0 -1
  60. package/dist/__legacy__/constants/messages-types.d.ts +0 -52
  61. package/dist/__legacy__/constants/messages-types.d.ts.map +0 -1
  62. package/dist/__legacy__/constants/parameters.d.ts +0 -22
  63. package/dist/__legacy__/constants/parameters.d.ts.map +0 -1
  64. package/dist/__legacy__/constants/session-management.d.ts.map +0 -1
  65. package/dist/__legacy__/constants/storage.d.ts +0 -19
  66. package/dist/__legacy__/constants/storage.d.ts.map +0 -1
  67. package/dist/__legacy__/helpers/authentication-helper.d.ts +0 -59
  68. package/dist/__legacy__/helpers/authentication-helper.d.ts.map +0 -1
  69. package/dist/__legacy__/helpers/index.d.ts +0 -21
  70. package/dist/__legacy__/helpers/index.d.ts.map +0 -1
  71. package/dist/__legacy__/helpers/session-management-helper.d.ts +0 -21
  72. package/dist/__legacy__/helpers/session-management-helper.d.ts.map +0 -1
  73. package/dist/__legacy__/helpers/spa-helper.d.ts +0 -30
  74. package/dist/__legacy__/helpers/spa-helper.d.ts.map +0 -1
  75. package/dist/__legacy__/models/client-config.d.ts +0 -55
  76. package/dist/__legacy__/models/client-config.d.ts.map +0 -1
  77. package/dist/__legacy__/models/client.d.ts +0 -85
  78. package/dist/__legacy__/models/client.d.ts.map +0 -1
  79. package/dist/__legacy__/models/http-client.d.ts +0 -30
  80. package/dist/__legacy__/models/http-client.d.ts.map +0 -1
  81. package/dist/__legacy__/models/index.d.ts +0 -27
  82. package/dist/__legacy__/models/index.d.ts.map +0 -1
  83. package/dist/__legacy__/models/message.d.ts +0 -47
  84. package/dist/__legacy__/models/message.d.ts.map +0 -1
  85. package/dist/__legacy__/models/request-custom-grant.d.ts.map +0 -1
  86. package/dist/__legacy__/models/session-management-helper.d.ts.map +0 -1
  87. package/dist/__legacy__/models/sign-in.d.ts.map +0 -1
  88. package/dist/__legacy__/models/sign-out-error.d.ts.map +0 -1
  89. package/dist/__legacy__/models/storage.d.ts.map +0 -1
  90. package/dist/__legacy__/models/web-worker.d.ts +0 -57
  91. package/dist/__legacy__/models/web-worker.d.ts.map +0 -1
  92. package/dist/__legacy__/stores/index.d.ts +0 -21
  93. package/dist/__legacy__/stores/index.d.ts.map +0 -1
  94. package/dist/__legacy__/stores/local-store.d.ts.map +0 -1
  95. package/dist/__legacy__/stores/memory-store.d.ts.map +0 -1
  96. package/dist/__legacy__/stores/session-store.d.ts.map +0 -1
  97. package/dist/__legacy__/utils/crypto-utils.d.ts +0 -32
  98. package/dist/__legacy__/utils/crypto-utils.d.ts.map +0 -1
  99. package/dist/__legacy__/utils/index.d.ts +0 -20
  100. package/dist/__legacy__/utils/index.d.ts.map +0 -1
  101. package/dist/__legacy__/utils/message-utils.d.ts +0 -38
  102. package/dist/__legacy__/utils/message-utils.d.ts.map +0 -1
  103. package/dist/__legacy__/utils/spa-utils.d.ts +0 -108
  104. package/dist/__legacy__/utils/spa-utils.d.ts.map +0 -1
  105. package/dist/__legacy__/worker/index.d.ts +0 -20
  106. package/dist/__legacy__/worker/index.d.ts.map +0 -1
  107. package/dist/__legacy__/worker/worker-core.d.ts +0 -22
  108. package/dist/__legacy__/worker/worker-core.d.ts.map +0 -1
  109. package/dist/__legacy__/worker/worker-receiver.d.ts +0 -22
  110. package/dist/__legacy__/worker/worker-receiver.d.ts.map +0 -1
  111. package/dist/web.worker.d.ts +0 -20
  112. package/dist/web.worker.d.ts.map +0 -1
@@ -0,0 +1,145 @@
1
+ /**
2
+ * Copyright (c) 2026, WSO2 LLC. (https://www.wso2.com).
3
+ *
4
+ * WSO2 LLC. licenses this file to you under the Apache License,
5
+ * Version 2.0 (the "License"); you may not use this file except
6
+ * in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing,
12
+ * software distributed under the License is distributed on an
13
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14
+ * KIND, either express or implied. See the License for the
15
+ * specific language governing permissions and limitations
16
+ * under the License.
17
+ */
18
+ import { SignOutError } from '../models/SignOutError';
19
+ /**
20
+ * Static utility methods for SPA authentication flows including PKCE storage,
21
+ * sign-out URL management, and URL-based state detection.
22
+ */
23
+ declare class SPAUtils {
24
+ private constructor();
25
+ /**
26
+ * Removes the `code` search parameter from the current URL without a page reload.
27
+ */
28
+ static removeAuthorizationCode(): void;
29
+ /**
30
+ * Retrieves a PKCE verifier from sessionStorage.
31
+ *
32
+ * @param pkceKey - The storage key for the PKCE verifier.
33
+ * @returns The stored verifier string, or an empty string if not found.
34
+ */
35
+ static getPKCE(pkceKey: string): string;
36
+ /**
37
+ * Persists a PKCE verifier in sessionStorage.
38
+ *
39
+ * @param pkceKey - The storage key.
40
+ * @param pkce - The PKCE verifier value.
41
+ */
42
+ static setPKCE(pkceKey: string, pkce: string): void;
43
+ /**
44
+ * Persists the post-sign-out redirect URL for the given client and instance.
45
+ *
46
+ * @param url - The sign-out redirect URL.
47
+ * @param clientId - The OAuth2 client ID.
48
+ * @param instanceId - The client instance ID.
49
+ */
50
+ static setSignOutURL(url: string, clientId: string, instanceId: number): void;
51
+ /**
52
+ * Retrieves the stored sign-out redirect URL for the given client and instance.
53
+ *
54
+ * @param clientId - The OAuth2 client ID.
55
+ * @param instanceId - The client instance ID.
56
+ * @returns The stored sign-out URL, or an empty string.
57
+ */
58
+ static getSignOutUrl(clientId: string, instanceId: number): string;
59
+ /**
60
+ * Removes a PKCE verifier from sessionStorage.
61
+ *
62
+ * @param pkceKey - The storage key to remove.
63
+ */
64
+ static removePKCE(pkceKey: string): void;
65
+ /**
66
+ * Determines whether the `signIn` method should continue based on the `callOnlyOnRedirect` flag.
67
+ *
68
+ * @param callOnlyOnRedirect - True if the call should only proceed when redirected back from the IdP.
69
+ * @param authorizationCode - Authorization code passed directly (form_post mode).
70
+ * @returns `true` if sign-in should proceed.
71
+ */
72
+ static canContinueSignIn(callOnlyOnRedirect: boolean, authorizationCode?: string): boolean;
73
+ /**
74
+ * Returns `true` if silent sign-in is in progress (silent-state present in the URL).
75
+ */
76
+ static isInitializedSilentSignIn(): boolean;
77
+ /**
78
+ * Returns `true` if the `signIn` method was already called this navigation
79
+ * (auth code or error is present in the URL, but not a silent flow).
80
+ */
81
+ static wasSignInCalled(): boolean;
82
+ /**
83
+ * Returns `true` if a silent sign-in was previously initialized in this session.
84
+ */
85
+ static wasSilentSignInCalled(): boolean;
86
+ /**
87
+ * Checks whether the current URL indicates a successful sign-out redirect.
88
+ * Clears the query string and session data if `true`.
89
+ *
90
+ * @param isSignOutSuccessful - Static method from the JS client for URL inspection.
91
+ * @param clearSession - Callback to clear session data after successful sign-out.
92
+ * @returns `true` if the sign-out completed successfully.
93
+ */
94
+ static isSignOutSuccessful(isSignOutSuccessfulFn: (url: string) => boolean, clearSession: () => Promise<void>): Promise<boolean>;
95
+ /**
96
+ * Checks whether the current URL indicates a sign-out failure.
97
+ * Returns the error details if present, or `false` otherwise.
98
+ *
99
+ * @param didSignOutFailFn - Static method from the JS client for URL inspection.
100
+ * @returns The `SignOutError` if sign-out failed, or `false`.
101
+ */
102
+ static didSignOutFail(didSignOutFailFn: (url: string) => boolean): boolean | SignOutError;
103
+ /**
104
+ * Returns `true` if the URL contains a silent sign-in state parameter.
105
+ */
106
+ static isSilentStatePresentInURL(): boolean;
107
+ /**
108
+ * Returns `true` if the current URL contains an authorization code (`code` parameter).
109
+ *
110
+ * @param params - Search params string (defaults to `window.location.search`).
111
+ */
112
+ static hasAuthSearchParamsInURL(params?: string): boolean;
113
+ /**
114
+ * Returns `true` if the current URL contains an OAuth2 error parameter
115
+ * (but not a sign-out success state).
116
+ *
117
+ * @param url - URL to inspect (defaults to `window.location.href`).
118
+ */
119
+ static hasErrorInURL(url?: string): boolean;
120
+ /**
121
+ * Returns `true` if no prompt-none request has been sent yet this session.
122
+ */
123
+ static canSendPromptNoneRequest(): boolean;
124
+ /**
125
+ * Records whether a prompt-none request has been sent.
126
+ *
127
+ * @param canSend - `true` marks the request as sent.
128
+ */
129
+ static setPromptNoneRequestSent(canSend: boolean): void;
130
+ /**
131
+ * Waits until the browser has redirected (non-blocking delay).
132
+ *
133
+ * @param time - Time to wait in seconds (default: 3).
134
+ */
135
+ static waitTillPageRedirect(time?: number): Promise<void>;
136
+ /**
137
+ * Returns a Promise that resolves when `condition()` returns `true`.
138
+ *
139
+ * @param condition - Predicate to poll.
140
+ * @param timeout - Poll interval in milliseconds (default: 500).
141
+ */
142
+ static until: (condition: () => boolean, timeout?: number) => Promise<void>;
143
+ }
144
+ export default SPAUtils;
145
+ //# sourceMappingURL=SPAUtils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SPAUtils.d.ts","sourceRoot":"","sources":["../../src/utils/SPAUtils.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAWH,OAAO,EAAC,YAAY,EAAC,MAAM,wBAAwB,CAAC;AAEpD;;;GAGG;AACH,cAAM,QAAQ;IAEZ,OAAO;IAEP;;OAEG;WACW,uBAAuB,IAAI,IAAI;IAM7C;;;;;OAKG;WACW,OAAO,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM;IAI9C;;;;;OAKG;WACW,OAAO,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,IAAI;IAI1D;;;;;;OAMG;WACW,aAAa,CAAC,GAAG,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,IAAI;IAOpF;;;;;;OAMG;WACW,aAAa,CAAC,QAAQ,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,MAAM;IAQzE;;;;OAIG;WACW,UAAU,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI;IAI/C;;;;;;OAMG;WACW,iBAAiB,CAAC,kBAAkB,EAAE,OAAO,EAAE,iBAAiB,CAAC,EAAE,MAAM,GAAG,OAAO;IAQjG;;OAEG;WACW,yBAAyB,IAAI,OAAO;IAIlD;;;OAGG;WACW,eAAe,IAAI,OAAO;IAUxC;;OAEG;WACW,qBAAqB,IAAI,OAAO;IAM9C;;;;;;;OAOG;WACiB,mBAAmB,CACrC,qBAAqB,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,EAC/C,YAAY,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,GAChC,OAAO,CAAC,OAAO,CAAC;IAYnB;;;;;;OAMG;WACW,cAAc,CAAC,gBAAgB,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,GAAG,OAAO,GAAG,YAAY;IAiBhG;;OAEG;WACW,yBAAyB,IAAI,OAAO;IAMlD;;;;OAIG;WACW,wBAAwB,CAAC,MAAM,GAAE,MAA+B,GAAG,OAAO;IAMxF;;;;;OAKG;WACW,aAAa,CAAC,GAAG,GAAE,MAA6B,GAAG,OAAO;IASxE;;OAEG;WACW,wBAAwB,IAAI,OAAO;IAMjD;;;;OAIG;WACW,wBAAwB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI;IAI9D;;;;OAIG;WACiB,oBAAoB,CAAC,IAAI,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAMtE;;;;;OAKG;IACH,OAAc,KAAK,GAAI,WAAW,MAAM,OAAO,EAAE,gBAAa,KAAG,OAAO,CAAC,IAAI,CAAC,CAU5E;CACH;AAED,eAAe,QAAQ,CAAC"}
@@ -16,9 +16,28 @@
16
16
  * under the License.
17
17
  */
18
18
  import { ExtendedAuthorizeRequestUrlParams } from '@thunderid/javascript';
19
+ /**
20
+ * Interface for the session management helper returned by {@link createSessionManagementHelper}.
21
+ */
19
22
  export interface SessionManagementHelperInterface {
23
+ /** Starts session polling and sets up the RP iframe. */
20
24
  initialize(clientId: string, checkSessionEndpoint: string, getSessionState: () => Promise<string>, interval: number, sessionRefreshInterval: number, redirectURL: string, getSignInUrl: (params?: ExtendedAuthorizeRequestUrlParams) => Promise<string>): void;
25
+ /**
26
+ * Processes a prompt-none response when the page is loaded inside the prompt-none iframe.
27
+ * Returns `true` if the current page load was a prompt-none response.
28
+ */
21
29
  receivePromptNoneResponse(setSessionState?: (sessionState: string | null) => Promise<void>): Promise<boolean>;
22
- reset(): any;
30
+ /** Clears the session check and refresh intervals. */
31
+ reset(): void;
23
32
  }
24
- //# sourceMappingURL=session-management-helper.d.ts.map
33
+ /**
34
+ * Factory that creates an OIDC Session Management helper using an RP iframe and polling.
35
+ * Appends a hidden RP iframe to the document and returns the helper interface.
36
+ *
37
+ * @param signOut - Returns the sign-out URL for the current session.
38
+ * @param setSessionState - Stores a new session state from a prompt-none response.
39
+ * @returns A `SessionManagementHelperInterface` instance.
40
+ */
41
+ export declare const createSessionManagementHelper: (signOut: () => Promise<string>, setSessionState: (sessionState: string) => void) => Promise<SessionManagementHelperInterface>;
42
+ export default createSessionManagementHelper;
43
+ //# sourceMappingURL=SessionManagementHelper.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SessionManagementHelper.d.ts","sourceRoot":"","sources":["../../src/utils/SessionManagementHelper.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAC,iCAAiC,EAAuB,MAAM,uBAAuB,CAAC;AA0B9F;;GAEG;AACH,MAAM,WAAW,gCAAgC;IAC/C,wDAAwD;IACxD,UAAU,CACR,QAAQ,EAAE,MAAM,EAChB,oBAAoB,EAAE,MAAM,EAC5B,eAAe,EAAE,MAAM,OAAO,CAAC,MAAM,CAAC,EACtC,QAAQ,EAAE,MAAM,EAChB,sBAAsB,EAAE,MAAM,EAC9B,WAAW,EAAE,MAAM,EACnB,YAAY,EAAE,CAAC,MAAM,CAAC,EAAE,iCAAiC,KAAK,OAAO,CAAC,MAAM,CAAC,GAC5E,IAAI,CAAC;IACR;;;OAGG;IACH,yBAAyB,CAAC,eAAe,CAAC,EAAE,CAAC,YAAY,EAAE,MAAM,GAAG,IAAI,KAAK,OAAO,CAAC,IAAI,CAAC,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IAC9G,sDAAsD;IACtD,KAAK,IAAI,IAAI,CAAC;CACf;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,6BAA6B,GACxC,SAAS,MAAM,OAAO,CAAC,MAAM,CAAC,EAC9B,iBAAiB,CAAC,YAAY,EAAE,MAAM,KAAK,IAAI,KAC9C,OAAO,CAAC,gCAAgC,CAuO1C,CAAC;AAEF,eAAe,6BAA6B,CAAC"}
@@ -15,37 +15,24 @@
15
15
  * specific language governing permissions and limitations
16
16
  * under the License.
17
17
  */
18
- import { ThunderIDSPAClient } from '../__legacy__/client';
18
+ import ThunderIDBrowserClient from '../ThunderIDBrowserClient';
19
19
  /**
20
- * Creates an HTTP utility for making requests using a specific ThunderIDSPAClient instance.
20
+ * Creates an HTTP utility for making authenticated requests using a `ThunderIDBrowserClient` instance.
21
21
  *
22
- * @param instanceId - Optional instance ID for multi-instance support. Defaults to 0.
23
- * @returns An object with request and requestAll methods bound to the specified instance.
24
- *
25
- * @remarks
26
- * This utility provides methods to make single or multiple HTTP requests for a specific instance.
22
+ * @param client - The browser client instance to use for requests.
23
+ * @returns An object with `request` and `requestAll` methods bound to the provided client.
27
24
  *
28
25
  * @example
29
26
  * ```typescript
30
- * // Use default instance
31
- * const httpClient = http();
32
- *
33
- * // Use specific instance
34
- * const httpInstance1 = http(1);
35
- * const httpInstance2 = http(2);
27
+ * const auth = new ThunderIDBrowserClient();
28
+ * await auth.initialize(config);
29
+ * const httpClient = http(auth);
30
+ * const response = await httpClient.request({ url: '/api/data', method: 'GET' });
36
31
  * ```
37
32
  */
38
- export declare const http: (instanceId?: number) => {
39
- request: typeof ThunderIDSPAClient.prototype.httpRequest;
40
- requestAll: typeof ThunderIDSPAClient.prototype.httpRequestAll;
41
- };
42
- /**
43
- * Default HTTP utility using instance 0.
44
- * For multi-instance support, use http(instanceId) instead.
45
- */
46
- declare const _default: {
47
- request: typeof ThunderIDSPAClient.prototype.httpRequest;
48
- requestAll: typeof ThunderIDSPAClient.prototype.httpRequestAll;
33
+ declare const http: (client: ThunderIDBrowserClient) => {
34
+ request: typeof ThunderIDBrowserClient.prototype.httpRequest;
35
+ requestAll: typeof ThunderIDBrowserClient.prototype.httpRequestAll;
49
36
  };
50
- export default _default;
37
+ export default http;
51
38
  //# sourceMappingURL=http.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"http.d.ts","sourceRoot":"","sources":["../../src/utils/http.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAGH,OAAO,EAAC,kBAAkB,EAAC,MAAM,sBAAsB,CAAC;AAExD;;;;;;;;;;;;;;;;;;GAkBG;AACH,eAAO,MAAM,IAAI,GACf,mBAAc,KACb;IACD,OAAO,EAAE,OAAO,kBAAkB,CAAC,SAAS,CAAC,WAAW,CAAC;IACzD,UAAU,EAAE,OAAO,kBAAkB,CAAC,SAAS,CAAC,cAAc,CAAC;CAqBhE,CAAC;AAEF;;;GAGG;;aA3BQ,OAAO,kBAAkB,CAAC,SAAS,CAAC,WAAW;gBAC5C,OAAO,kBAAkB,CAAC,SAAS,CAAC,cAAc;;AA2BhE,wBAAsB"}
1
+ {"version":3,"file":"http.d.ts","sourceRoot":"","sources":["../../src/utils/http.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,sBAAsB,MAAM,2BAA2B,CAAC;AAE/D;;;;;;;;;;;;;GAaG;AACH,QAAA,MAAM,IAAI,GACR,QAAQ,sBAAsB,KAC7B;IACD,OAAO,EAAE,OAAO,sBAAsB,CAAC,SAAS,CAAC,WAAW,CAAC;IAC7D,UAAU,EAAE,OAAO,sBAAsB,CAAC,SAAS,CAAC,cAAc,CAAC;CAMpE,CAAC;AAEF,eAAe,IAAI,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thunderid/browser",
3
- "version": "0.0.4",
3
+ "version": "0.1.0",
4
4
  "description": "Browser runtime SDK for ThunderID",
5
5
  "keywords": [
6
6
  "thunderid",
@@ -56,14 +56,16 @@
56
56
  "randombytes": "2.1.0",
57
57
  "stream-browserify": "3.0.0",
58
58
  "tslib": "2.8.1",
59
- "@thunderid/javascript": "^0.0.4"
59
+ "@thunderid/javascript": "^0.1.0"
60
60
  },
61
61
  "publishConfig": {
62
62
  "access": "public"
63
63
  },
64
64
  "scripts": {
65
- "build": "pnpm clean && node rolldown.config.js && tsc -p tsconfig.lib.json --emitDeclarationOnly --outDir dist",
66
- "clean": "rimraf dist",
65
+ "build": "pnpm clean:dist && node rolldown.config.js && tsc -p tsconfig.lib.json --emitDeclarationOnly --outDir dist",
66
+ "clean": "pnpm clean:node_modules && pnpm clean:dist",
67
+ "clean:dist": "rimraf dist",
68
+ "clean:node_modules": "rimraf node_modules",
67
69
  "format:check": "prettier --check --cache .",
68
70
  "format:fix": "prettier --write --cache .",
69
71
  "lint": "eslint . --ext .js,.jsx,.ts,.tsx,.cjs,.mjs",