cloudflare-next-intl 0.6.21 → 0.6.23
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.
|
@@ -2,9 +2,8 @@
|
|
|
2
2
|
* Safely converts an `unknown` value (typically `ErrorHandlingParams.error`)
|
|
3
3
|
* into a string, for logging/dedup-keying/display — never throws.
|
|
4
4
|
*
|
|
5
|
-
* @param isClient
|
|
6
|
-
*
|
|
7
|
-
* caught functions client-side isn't safe the way it is on the server.
|
|
5
|
+
* @param isClient Matches `ErrorHandlingParams.isClient`; forwarded to nested
|
|
6
|
+
* `stringifyUnknown` calls when resolving a function-wrapped error.
|
|
8
7
|
* @param isNested Set when stringifying a value nested inside another
|
|
9
8
|
* object/array — falls back to a plain `JSON.stringify` (no pretty-print)
|
|
10
9
|
* so a single unserializable nested value can't crash the whole report.
|
|
@@ -21,9 +21,8 @@ function resolveFunctionError(value) {
|
|
|
21
21
|
* Safely converts an `unknown` value (typically `ErrorHandlingParams.error`)
|
|
22
22
|
* into a string, for logging/dedup-keying/display — never throws.
|
|
23
23
|
*
|
|
24
|
-
* @param isClient
|
|
25
|
-
*
|
|
26
|
-
* caught functions client-side isn't safe the way it is on the server.
|
|
24
|
+
* @param isClient Matches `ErrorHandlingParams.isClient`; forwarded to nested
|
|
25
|
+
* `stringifyUnknown` calls when resolving a function-wrapped error.
|
|
27
26
|
* @param isNested Set when stringifying a value nested inside another
|
|
28
27
|
* object/array — falls back to a plain `JSON.stringify` (no pretty-print)
|
|
29
28
|
* so a single unserializable nested value can't crash the whole report.
|
|
@@ -34,8 +33,6 @@ export default function stringifyUnknown(value, isClient, isNested = false) {
|
|
|
34
33
|
if (value instanceof Error)
|
|
35
34
|
return stripAnsiCodes(`${value.name}: ${value.message}\n\n${value.stack ?? ''}`);
|
|
36
35
|
if (typeof value === 'function') {
|
|
37
|
-
if (isClient)
|
|
38
|
-
return '[Function]';
|
|
39
36
|
const resolved = resolveFunctionError(value);
|
|
40
37
|
return typeof resolved !== 'function' ? stringifyUnknown(resolved, isClient) : '[Function]';
|
|
41
38
|
}
|
|
@@ -4,7 +4,8 @@ import requireFirebaseAuthConfig from '../require_config';
|
|
|
4
4
|
async function initializeFirebaseAppCheck(app, appCheckConfig) {
|
|
5
5
|
const { initializeAppCheck, ReCaptchaV3Provider, ReCaptchaEnterpriseProvider } = await import('firebase/app-check');
|
|
6
6
|
if (appCheckConfig.debugToken) {
|
|
7
|
-
globalThis.FIREBASE_APPCHECK_DEBUG_TOKEN =
|
|
7
|
+
globalThis.FIREBASE_APPCHECK_DEBUG_TOKEN =
|
|
8
|
+
appCheckConfig.debugToken;
|
|
8
9
|
}
|
|
9
10
|
const provider = appCheckConfig.recaptchaEnterpriseSiteKey
|
|
10
11
|
? new ReCaptchaEnterpriseProvider(appCheckConfig.recaptchaEnterpriseSiteKey)
|
|
@@ -544,12 +544,15 @@ export interface FirebaseAppCheckConfig {
|
|
|
544
544
|
/** reCAPTCHA Enterprise site key. Mutually exclusive with `recaptchaV3SiteKey`. */
|
|
545
545
|
recaptchaEnterpriseSiteKey?: string;
|
|
546
546
|
/**
|
|
547
|
-
* Enables App Check's debug token on this client
|
|
548
|
-
*
|
|
549
|
-
*
|
|
550
|
-
*
|
|
551
|
-
|
|
552
|
-
|
|
547
|
+
* Enables App Check's debug token on this client. Pass `true` to have
|
|
548
|
+
* the Firebase SDK generate a new random token each run (logged to the
|
|
549
|
+
* console — register it in the Firebase console every time it changes).
|
|
550
|
+
* Pass a fixed UUID string instead to reuse the same token across
|
|
551
|
+
* restarts/builds — set `self.FIREBASE_APPCHECK_DEBUG_TOKEN` to it
|
|
552
|
+
* before init, register that one UUID once, and it never changes.
|
|
553
|
+
* Use only for local development — never set this in production.
|
|
554
|
+
*/
|
|
555
|
+
debugToken?: boolean | string;
|
|
553
556
|
/** Forwarded to `initializeAppCheck`'s `isTokenAutoRefreshEnabled`. Defaults to `true`. */
|
|
554
557
|
isTokenAutoRefreshEnabled?: boolean;
|
|
555
558
|
}
|