@quiltt/react-native 4.0.0 → 4.0.1
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.
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
# @quiltt/react-native
|
|
2
2
|
|
|
3
|
+
## 4.0.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#343](https://github.com/quiltt/quiltt-js/pull/343) [`da152b7`](https://github.com/quiltt/quiltt-js/commit/da152b7f42606defde5f55488632bcdc095be592) Thanks [@sirwolfgang](https://github.com/sirwolfgang)! - Add the ability to set nonce for the Quiltt SDK Script
|
|
8
|
+
|
|
9
|
+
- Updated dependencies [[`da152b7`](https://github.com/quiltt/quiltt-js/commit/da152b7f42606defde5f55488632bcdc095be592)]:
|
|
10
|
+
- @quiltt/react@4.0.1
|
|
11
|
+
- @quiltt/core@4.0.1
|
|
12
|
+
|
|
3
13
|
## 4.0.0
|
|
4
14
|
|
|
5
15
|
### Major Changes
|
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -4,34 +4,30 @@ import { useQuilttSession, ConnectorSDKEventType } from '@quiltt/react';
|
|
|
4
4
|
export { QuilttAuthProvider, QuilttProvider, QuilttSettingsProvider, useQuilttClient, useQuilttConnector, useQuilttSession, useQuilttSettings, useSession, useStorage } from '@quiltt/react';
|
|
5
5
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
6
6
|
import { useRef, useState, useCallback, useMemo, useEffect } from 'react';
|
|
7
|
-
import { StyleSheet,
|
|
7
|
+
import { StyleSheet, StatusBar, Platform, SafeAreaView, View, Text, Pressable, ActivityIndicator, Linking } from 'react-native';
|
|
8
8
|
import { URL } from 'react-native-url-polyfill';
|
|
9
9
|
import { WebView } from 'react-native-webview';
|
|
10
10
|
import { generateStackTrace, makeBacktrace, getCauses } from '@honeybadger-io/core/build/src/util';
|
|
11
11
|
|
|
12
|
-
var version = "4.0.
|
|
12
|
+
var version = "4.0.1";
|
|
13
13
|
|
|
14
|
-
|
|
15
|
-
honeybadger_api_key: 'undefined'
|
|
16
|
-
};
|
|
17
|
-
|
|
18
|
-
// Quick hack to send error to Honeybadger to debug why the connector is not routable
|
|
14
|
+
// Custom Error Reporter to avoid hooking into or colliding with a client's Honeybadger singleton
|
|
19
15
|
const notifier = {
|
|
20
16
|
name: 'Quiltt React Native SDK Reporter',
|
|
21
|
-
url: 'https://www.quiltt.dev/
|
|
17
|
+
url: 'https://www.quiltt.dev/connector/sdk/react-native',
|
|
22
18
|
version: version
|
|
23
19
|
};
|
|
24
20
|
class ErrorReporter {
|
|
25
21
|
constructor(platform){
|
|
26
22
|
this.noticeUrl = 'https://api.honeybadger.io/v1/notices';
|
|
27
|
-
this.apiKey =
|
|
23
|
+
this.apiKey = process.env.HONEYBADGER_API_KEY_REACT_NATIVE || '';
|
|
28
24
|
this.clientName = 'react-native-sdk';
|
|
29
25
|
this.clientVersion = version;
|
|
30
26
|
this.platform = platform;
|
|
31
27
|
this.logger = console;
|
|
32
28
|
this.userAgent = `${this.clientName} ${this.clientVersion}; ${this.platform}`;
|
|
33
29
|
}
|
|
34
|
-
async
|
|
30
|
+
async notify(error, context) {
|
|
35
31
|
const headers = {
|
|
36
32
|
'X-API-Key': this.apiKey,
|
|
37
33
|
'Content-Type': 'application/json',
|
|
@@ -287,7 +283,7 @@ const checkConnectorUrl = async (connectorUrl, retryCount = 0)=>{
|
|
|
287
283
|
connectorUrl,
|
|
288
284
|
responseStatus
|
|
289
285
|
};
|
|
290
|
-
if (responseStatus !== 404) await errorReporter.
|
|
286
|
+
if (responseStatus !== 404) await errorReporter.notify(errorToSend, context);
|
|
291
287
|
return {
|
|
292
288
|
checked: true,
|
|
293
289
|
error: errorMessage
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@quiltt/react-native",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.1",
|
|
4
4
|
"description": "React Native Components for Quiltt Connector",
|
|
5
5
|
"homepage": "https://github.com/quiltt/quiltt-js/tree/main/packages/react-native#readme",
|
|
6
6
|
"repository": {
|
|
@@ -30,15 +30,15 @@
|
|
|
30
30
|
"dependencies": {
|
|
31
31
|
"@honeybadger-io/core": "6.6.0",
|
|
32
32
|
"lodash.debounce": "4.0.8",
|
|
33
|
-
"@quiltt/
|
|
34
|
-
"@quiltt/
|
|
33
|
+
"@quiltt/core": "4.0.1",
|
|
34
|
+
"@quiltt/react": "4.0.1"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
37
|
"@biomejs/biome": "1.9.4",
|
|
38
38
|
"@types/base-64": "1.0.2",
|
|
39
39
|
"@types/lodash.debounce": "4.0.9",
|
|
40
|
-
"@types/node": "22.
|
|
41
|
-
"@types/react": "18.3.
|
|
40
|
+
"@types/node": "22.14.1",
|
|
41
|
+
"@types/react": "18.3.20",
|
|
42
42
|
"base-64": "1.0.0",
|
|
43
43
|
"bunchee": "6.3.4",
|
|
44
44
|
"react": "18.3.1",
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
"react-native-url-polyfill": "2.0.0",
|
|
47
47
|
"react-native-webview": "13.12.5",
|
|
48
48
|
"rimraf": "6.0.1",
|
|
49
|
-
"typescript": "5.
|
|
49
|
+
"typescript": "5.8.2"
|
|
50
50
|
},
|
|
51
51
|
"peerDependencies": {
|
|
52
52
|
"base-64": "^1.0.0",
|
|
@@ -63,8 +63,7 @@
|
|
|
63
63
|
"access": "public"
|
|
64
64
|
},
|
|
65
65
|
"scripts": {
|
|
66
|
-
"
|
|
67
|
-
"build": "pnpm run addApiKey && bunchee",
|
|
66
|
+
"build": "bunchee",
|
|
68
67
|
"clean": "rimraf .turbo dist",
|
|
69
68
|
"dev": "bunchee --watch",
|
|
70
69
|
"lint": "TIMING=1 biome check src/ tests/ --fix",
|
|
@@ -54,7 +54,7 @@ export const checkConnectorUrl = async (
|
|
|
54
54
|
const errorMessage = getErrorMessage(responseStatus, error as Error)
|
|
55
55
|
const errorToSend = (error as Error) || new Error(errorMessage)
|
|
56
56
|
const context = { connectorUrl, responseStatus }
|
|
57
|
-
if (responseStatus !== 404) await errorReporter.
|
|
57
|
+
if (responseStatus !== 404) await errorReporter.notify(errorToSend, context)
|
|
58
58
|
return { checked: true, error: errorMessage }
|
|
59
59
|
}
|
|
60
60
|
}
|
|
@@ -1,13 +1,12 @@
|
|
|
1
|
-
//
|
|
1
|
+
// Custom Error Reporter to avoid hooking into or colliding with a client's Honeybadger singleton
|
|
2
2
|
import type { Notice, NoticeTransportPayload } from '@honeybadger-io/core/build/src/types'
|
|
3
3
|
import { generateStackTrace, getCauses, makeBacktrace } from '@honeybadger-io/core/build/src/util'
|
|
4
4
|
|
|
5
5
|
import { version } from '@/version'
|
|
6
|
-
import { ErrorReporterConfig } from './ErrorReporterConfig'
|
|
7
6
|
|
|
8
7
|
const notifier = {
|
|
9
8
|
name: 'Quiltt React Native SDK Reporter',
|
|
10
|
-
url: 'https://www.quiltt.dev/
|
|
9
|
+
url: 'https://www.quiltt.dev/connector/sdk/react-native',
|
|
11
10
|
version: version,
|
|
12
11
|
}
|
|
13
12
|
|
|
@@ -26,7 +25,7 @@ class ErrorReporter {
|
|
|
26
25
|
|
|
27
26
|
constructor(platform: string) {
|
|
28
27
|
this.noticeUrl = 'https://api.honeybadger.io/v1/notices'
|
|
29
|
-
this.apiKey =
|
|
28
|
+
this.apiKey = process.env.HONEYBADGER_API_KEY_REACT_NATIVE || ''
|
|
30
29
|
this.clientName = 'react-native-sdk'
|
|
31
30
|
this.clientVersion = version
|
|
32
31
|
this.platform = platform
|
|
@@ -34,7 +33,7 @@ class ErrorReporter {
|
|
|
34
33
|
this.userAgent = `${this.clientName} ${this.clientVersion}; ${this.platform}`
|
|
35
34
|
}
|
|
36
35
|
|
|
37
|
-
async
|
|
36
|
+
async notify(error: Error, context?: any): Promise<void> {
|
|
38
37
|
const headers = {
|
|
39
38
|
'X-API-Key': this.apiKey,
|
|
40
39
|
'Content-Type': 'application/json',
|