@ethlete/query 5.29.1 → 5.30.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,23 @@
1
1
  # @ethlete/query
2
2
 
3
+ ## 5.30.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [`ca5f51a`](https://github.com/ethlete-io/ethdk/commit/ca5f51a8a04583126bbc946d110137f28f9f2b36) Thanks [@TomTomB](https://github.com/TomTomB)! - Only set error list is list to true if there is more than 1 error inside
8
+
9
+ ## 5.30.0
10
+
11
+ ### Minor Changes
12
+
13
+ - [`c48032f`](https://github.com/ethlete-io/ethdk/commit/c48032f5d7b29708fa6668835a8cc85f97ebdb29) Thanks [@TomTomB](https://github.com/TomTomB)! - Add isCookiePresent to query 3 auth provider
14
+
15
+ ### Patch Changes
16
+
17
+ - [`5713174`](https://github.com/ethlete-io/ethdk/commit/5713174285fa2846d2b908a7627741170802e45a) Thanks [@TomTomB](https://github.com/TomTomB)! - Fix get queries inside bearer auth provider getting executed automatically
18
+
19
+ - [`7180e12`](https://github.com/ethlete-io/ethdk/commit/7180e12cb823910bb7d0fd7db2808402553f1402) Thanks [@TomTomB](https://github.com/TomTomB)! - Fix isSymfonyListError check
20
+
3
21
  ## 5.29.1
4
22
 
5
23
  ### Patch Changes
@@ -81,6 +81,7 @@ const isSymfonyListError = (error) => {
81
81
  typeof error === 'object' &&
82
82
  Array.isArray(error) &&
83
83
  !!error.length &&
84
+ typeof error[0] === 'object' &&
84
85
  'message' in error[0] &&
85
86
  'propertyPath' in error[0] &&
86
87
  'invalidValue' in error[0]);
@@ -2905,7 +2906,7 @@ const defaultResponseTransformer = (response) => {
2905
2906
  };
2906
2907
  const FIVE_MINUTES = 5 * 60 * 1000;
2907
2908
  const createAuthProviderQuery = (config, authProviderConfig) => {
2908
- const query = config.queryCreator();
2909
+ const query = config.queryCreator({ onlyManualExecution: true });
2909
2910
  const triggeredInternally = signal(false);
2910
2911
  const tokens = computed(() => {
2911
2912
  const res = query.response();
@@ -3073,6 +3074,9 @@ const createBearerAuthProvider = (options) => {
3073
3074
  cookieEnabled.set(false);
3074
3075
  deleteCookie$1();
3075
3076
  };
3077
+ const isCookiePresent = () => {
3078
+ return !!getCookie(cookieOptions.name);
3079
+ };
3076
3080
  const tryLoginWithCookie = () => {
3077
3081
  const isCookieEnabled = cookieEnabled();
3078
3082
  if (!isCookieEnabled) {
@@ -3115,6 +3119,7 @@ const createBearerAuthProvider = (options) => {
3115
3119
  logout,
3116
3120
  enableCookie,
3117
3121
  disableCookie,
3122
+ isCookiePresent,
3118
3123
  tryLoginWithCookie,
3119
3124
  latestExecutedQuery: latestNonInternalQuery.asReadonly(),
3120
3125
  tokens,
@@ -3487,7 +3492,7 @@ const createQueryErrorResponse = (error) => {
3487
3492
  errorList.push({ message: error });
3488
3493
  }
3489
3494
  }
3490
- if (errorList.length > 0) {
3495
+ if (errorList.length > 1) {
3491
3496
  return {
3492
3497
  isList: true,
3493
3498
  errors: errorList,