@multiplatform.one/keycloak 8.2.2 → 8.4.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.
@@ -460,8 +460,7 @@ async function fetchTokenOnce() {
460
460
  }
461
461
  async function fetchToken() {
462
462
  let last = "transient";
463
- for (let i = 0; i < ACCESS_TOKEN_RETRY_DELAYS_MS.length; i++) {
464
- const wait = ACCESS_TOKEN_RETRY_DELAYS_MS[i];
463
+ for (const wait of ACCESS_TOKEN_RETRY_DELAYS_MS) {
465
464
  if (wait) await sleep(wait);
466
465
  const result = await fetchTokenOnce();
467
466
  if (result.ok) {
@@ -244,7 +244,15 @@ var defaultLoaders = {
244
244
  // crash). Lazy so a genuinely missing native module throws HERE — inside
245
245
  // the try/catch — instead of at bundle evaluation.
246
246
  loadMMKV: () => require("react-native-mmkv"),
247
- loadAsyncStorage: () => require("@react-native-async-storage/async-storage")
247
+ loadAsyncStorage: () => {
248
+ try {
249
+ return require("@react-native-async-storage/async-storage");
250
+ } catch (error2) {
251
+ throw new Error("@react-native-async-storage/async-storage is not installed", {
252
+ cause: error2
253
+ });
254
+ }
255
+ }
248
256
  };
249
257
  function resolveNativeStorage(loaders = defaultLoaders) {
250
258
  const errors = {};
@@ -406,8 +406,7 @@ async function fetchTokenOnce() {
406
406
  }
407
407
  async function fetchToken() {
408
408
  let last = "transient";
409
- for (let i = 0; i < ACCESS_TOKEN_RETRY_DELAYS_MS.length; i++) {
410
- const wait = ACCESS_TOKEN_RETRY_DELAYS_MS[i];
409
+ for (const wait of ACCESS_TOKEN_RETRY_DELAYS_MS) {
411
410
  if (wait) await sleep(wait);
412
411
  const result = await fetchTokenOnce();
413
412
  if (result.ok) {
@@ -195,7 +195,15 @@ var defaultLoaders = {
195
195
  // crash). Lazy so a genuinely missing native module throws HERE — inside
196
196
  // the try/catch — instead of at bundle evaluation.
197
197
  loadMMKV: () => __require("react-native-mmkv"),
198
- loadAsyncStorage: () => __require("@react-native-async-storage/async-storage")
198
+ loadAsyncStorage: () => {
199
+ try {
200
+ return __require("@react-native-async-storage/async-storage");
201
+ } catch (error2) {
202
+ throw new Error("@react-native-async-storage/async-storage is not installed", {
203
+ cause: error2
204
+ });
205
+ }
206
+ }
199
207
  };
200
208
  function resolveNativeStorage(loaders = defaultLoaders) {
201
209
  const errors = {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@multiplatform.one/keycloak",
3
- "version": "8.2.2",
3
+ "version": "8.4.0",
4
4
  "description": "keycloak client for multiplatform.one ecosystem",
5
5
  "keywords": [
6
6
  "auth",
@@ -55,17 +55,17 @@
55
55
  },
56
56
  "dependencies": {
57
57
  "@better-auth/expo": "~1.6.33",
58
- "@multiplatform.one/auth": "^8.2.2",
59
- "@multiplatform.one/keycloak-js": "^8.2.2",
60
- "@multiplatform.one/store": "^8.2.2",
58
+ "@multiplatform.one/auth": "^8.4.0",
59
+ "@multiplatform.one/keycloak-js": "^8.4.0",
60
+ "@multiplatform.one/store": "^8.4.0",
61
61
  "better-auth": "~1.6.33",
62
62
  "jwt-decode": "^4.0.0"
63
63
  },
64
64
  "devDependencies": {
65
- "@multiplatform.one/config": "8.2.2",
66
- "@multiplatform.one/logger": "8.2.2",
67
- "@multiplatform.one/platform": "8.2.2",
68
- "@multiplatform.one/test-utils": "8.2.2",
65
+ "@multiplatform.one/config": "8.4.0",
66
+ "@multiplatform.one/logger": "8.4.0",
67
+ "@multiplatform.one/platform": "8.4.0",
68
+ "@multiplatform.one/test-utils": "8.4.0",
69
69
  "@tamagui/build": "2.7.6",
70
70
  "@testing-library/jest-dom": "^7.0.1",
71
71
  "@testing-library/react": "^16.3.3",
@@ -79,8 +79,8 @@
79
79
  "vitest": "^4.1.12"
80
80
  },
81
81
  "peerDependencies": {
82
- "@multiplatform.one/logger": "^8.2.2",
83
- "@multiplatform.one/platform": "^8.2.2",
82
+ "@multiplatform.one/logger": "^8.4.0",
83
+ "@multiplatform.one/platform": "^8.4.0",
84
84
  "react": "^19.1.0",
85
85
  "react-native": ">=0.83.0"
86
86
  },
@@ -123,8 +123,7 @@ async function fetchTokenOnce(): Promise<
123
123
 
124
124
  async function fetchToken(): Promise<string | undefined> {
125
125
  let last: AccessTokenFailureKind = "transient";
126
- for (let i = 0; i < ACCESS_TOKEN_RETRY_DELAYS_MS.length; i++) {
127
- const wait = ACCESS_TOKEN_RETRY_DELAYS_MS[i];
126
+ for (const wait of ACCESS_TOKEN_RETRY_DELAYS_MS) {
128
127
  if (wait) await sleep(wait);
129
128
  const result = await fetchTokenOnce();
130
129
  if (result.ok) {
@@ -1 +1 @@
1
- {"version":3,"file":"frappeToken.d.ts","sourceRoot":"","sources":["../src/frappeToken.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AA4CH;;;;;;;;;GASG;AACH,wBAAsB,sBAAsB,IAAI,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAW1E;AAgED,wDAAwD;AACxD,wBAAgB,wBAAwB,SAKvC;AAED;;;;GAIG;AACH,wBAAgB,kCAAkC,IAAI,MAAM,IAAI,CAiB/D"}
1
+ {"version":3,"file":"frappeToken.d.ts","sourceRoot":"","sources":["../src/frappeToken.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AA4CH;;;;;;;;;GASG;AACH,wBAAsB,sBAAsB,IAAI,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAW1E;AA+DD,wDAAwD;AACxD,wBAAgB,wBAAwB,SAKvC;AAED;;;;GAIG;AACH,wBAAgB,kCAAkC,IAAI,MAAM,IAAI,CAiB/D"}