@quiltt/core 4.4.0 → 4.5.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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,15 @@
1
1
  # @quiltt/core
2
2
 
3
+ ## 4.5.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#386](https://github.com/quiltt/quiltt-js/pull/386) [`0bf706c`](https://github.com/quiltt/quiltt-js/commit/0bf706ce2ad926304d6eac739ee58971736f913e) Thanks [@zubairaziz](https://github.com/zubairaziz)! - Update platform webview props
8
+
9
+ ### Patch Changes
10
+
11
+ - [#380](https://github.com/quiltt/quiltt-js/pull/380) [`31cd190`](https://github.com/quiltt/quiltt-js/commit/31cd1902618ebc2314d42dd7aca81b3ab94068ea) Thanks [@sirwolfgang](https://github.com/sirwolfgang)! - Improve useQuilttResolvable error messaging
12
+
3
13
  ## 4.4.0
4
14
 
5
15
  ### Minor Changes
@@ -5,7 +5,7 @@ import { createConsumer } from '@rails/actioncable';
5
5
  import { print } from 'graphql';
6
6
 
7
7
  var name = "@quiltt/core";
8
- var version$1 = "4.4.0";
8
+ var version$1 = "4.5.0";
9
9
 
10
10
  const QUILTT_API_INSECURE = (()=>{
11
11
  try {
package/dist/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { ApolloLink, ApolloClient } from '@apollo/client/core/index.js';
2
2
  export { gql } from '@apollo/client/core/index.js';
3
- import { G as GlobalStorage, e as endpointGraphQL, v as version, d as debugging, S as SubscriptionLink, a as endpointAuth, b as endpointRest } from './SubscriptionLink-12s-CoOidlX2.js';
4
- export { L as LocalStorage, M as MemoryStorage, O as Observable, g as Storage, c as cdnBase, f as endpointWebsockets } from './SubscriptionLink-12s-CoOidlX2.js';
3
+ import { G as GlobalStorage, e as endpointGraphQL, v as version, d as debugging, S as SubscriptionLink, a as endpointAuth, b as endpointRest } from './SubscriptionLink-12s-2Lc2oaGT.js';
4
+ export { L as LocalStorage, M as MemoryStorage, O as Observable, g as Storage, c as cdnBase, f as endpointWebsockets } from './SubscriptionLink-12s-2Lc2oaGT.js';
5
5
  import { BatchHttpLink as BatchHttpLink$1 } from '@apollo/client/link/batch-http/index.js';
6
6
  import crossfetch from 'cross-fetch';
7
7
  import { onError } from '@apollo/client/link/error/index.js';
@@ -52,16 +52,25 @@ const BatchHttpLink = new BatchHttpLink$1({
52
52
 
53
53
  const ErrorLink = onError(({ graphQLErrors, networkError })=>{
54
54
  if (graphQLErrors) {
55
- graphQLErrors.forEach(({ message, locations, path })=>{
56
- console.log(`[GraphQL error]: Message: ${message}, Location: ${locations}, Path: ${path}`);
55
+ graphQLErrors.forEach(({ message, path, extensions })=>{
56
+ const formattedPath = Array.isArray(path) ? path.join('.') : path ?? 'N/A';
57
+ const parts = [
58
+ `[Quiltt][GraphQL Error]: ${message}`,
59
+ `Path: ${formattedPath}`
60
+ ];
61
+ if (extensions) {
62
+ if (extensions.code) parts.push(`Code: ${extensions.code}`);
63
+ if (extensions.errorId) parts.push(`Error ID: ${extensions.errorId}`);
64
+ }
65
+ console.warn(parts.join(' | '));
57
66
  });
58
67
  }
59
68
  if (networkError) {
60
69
  if (networkError.statusCode === 401) {
61
- console.warn('[Authentication error]:', networkError);
70
+ console.warn('[Quiltt][Authentication Error]:', networkError);
62
71
  GlobalStorage.set('session', null);
63
72
  } else {
64
- console.warn('[Network error]:', networkError);
73
+ console.warn('[Quiltt][Network Error]:', networkError);
65
74
  }
66
75
  }
67
76
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@quiltt/core",
3
- "version": "4.4.0",
3
+ "version": "4.5.0",
4
4
  "description": "Javascript API client and utilities for Quiltt",
5
5
  "keywords": [
6
6
  "quiltt",
@@ -5,17 +5,25 @@ import { GlobalStorage } from '@/storage'
5
5
 
6
6
  export const ErrorLink = onError(({ graphQLErrors, networkError }) => {
7
7
  if (graphQLErrors) {
8
- graphQLErrors.forEach(({ message, locations, path }) => {
9
- console.log(`[GraphQL error]: Message: ${message}, Location: ${locations}, Path: ${path}`)
8
+ graphQLErrors.forEach(({ message, path, extensions }) => {
9
+ const formattedPath = Array.isArray(path) ? path.join('.') : (path ?? 'N/A')
10
+ const parts = [`[Quiltt][GraphQL Error]: ${message}`, `Path: ${formattedPath}`]
11
+
12
+ if (extensions) {
13
+ if (extensions.code) parts.push(`Code: ${extensions.code}`)
14
+ if (extensions.errorId) parts.push(`Error ID: ${extensions.errorId}`)
15
+ }
16
+
17
+ console.warn(parts.join(' | '))
10
18
  })
11
19
  }
12
20
 
13
21
  if (networkError) {
14
22
  if ((networkError as ServerError).statusCode === 401) {
15
- console.warn('[Authentication error]:', networkError)
23
+ console.warn('[Quiltt][Authentication Error]:', networkError)
16
24
  GlobalStorage.set('session', null)
17
25
  } else {
18
- console.warn('[Network error]:', networkError)
26
+ console.warn('[Quiltt][Network Error]:', networkError)
19
27
  }
20
28
  }
21
29
  })
@@ -35,7 +35,7 @@ export class ConnectorsAPI {
35
35
  token: string,
36
36
  connectorId: string,
37
37
  term: string,
38
- signal?: AbortSignal,
38
+ signal?: AbortSignal
39
39
  ) => {
40
40
  const params = new URLSearchParams()
41
41
  params.append('term', term)
@@ -46,7 +46,7 @@ export class ConnectorsAPI {
46
46
  method: 'GET',
47
47
  signal,
48
48
  ...this.config(token),
49
- },
49
+ }
50
50
  )
51
51
  return response
52
52
  }
@@ -63,7 +63,7 @@ export class ConnectorsAPI {
63
63
  token: string,
64
64
  connectorId: string,
65
65
  providerId: { plaid?: string; mock?: string; mx?: string; finicity?: string; akoya?: string },
66
- signal?: AbortSignal,
66
+ signal?: AbortSignal
67
67
  ) => {
68
68
  const params = new URLSearchParams()
69
69
 
@@ -78,7 +78,7 @@ export class ConnectorsAPI {
78
78
  method: 'GET',
79
79
  signal,
80
80
  ...this.config(token),
81
- },
81
+ }
82
82
  )
83
83
  return response
84
84
  }