@opengeoweb/api 9.33.0 → 9.34.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.
Files changed (2) hide show
  1. package/index.esm.js +15 -12
  2. package/package.json +1 -1
package/index.esm.js CHANGED
@@ -19,18 +19,21 @@ import { useQuery } from '@tanstack/react-query';
19
19
  * Copyright 2024 - Finnish Meteorological Institute (FMI)
20
20
  * Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
21
21
  * */
22
- const getHeaders = auth => ({
23
- 'Content-Type': 'application/json',
24
- Authorization: `Bearer ${auth.token}`,
25
- Accept: 'application/json'
26
- });
27
- const useAuthQuery = (queryKey, queryFn) => {
28
- const {
29
- auth
30
- } = useAuthenticationContext();
22
+ var getHeaders = function getHeaders(auth) {
23
+ return {
24
+ 'Content-Type': 'application/json',
25
+ Authorization: "Bearer " + auth.token,
26
+ Accept: 'application/json'
27
+ };
28
+ };
29
+ var useAuthQuery = function useAuthQuery(queryKey, _queryFn) {
30
+ var _useAuthenticationCon = useAuthenticationContext(),
31
+ auth = _useAuthenticationCon.auth;
31
32
  return useQuery({
32
- queryKey,
33
- queryFn: () => queryFn(auth),
33
+ queryKey: queryKey,
34
+ queryFn: function queryFn() {
35
+ return _queryFn(auth);
36
+ },
34
37
  enabled: !!auth
35
38
  });
36
39
  };
@@ -195,7 +198,7 @@ var VisibilityCause;
195
198
  * Copyright 2024 - Finnish Meteorological Institute (FMI)
196
199
  * Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
197
200
  * */
198
- const API_NAMESPACE = 'api';
201
+ var API_NAMESPACE = 'api';
199
202
  // Initialize and create provider if needed
200
203
 
201
204
  export { API_NAMESPACE, AirmetPhenomena, CloudLevelUnits, Direction, LevelUnits, MovementUnit, ProductStatus, SigmetPhenomena, VisibilityCause, WindUnit, getHeaders, useAuthQuery };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opengeoweb/api",
3
- "version": "9.33.0",
3
+ "version": "9.34.0",
4
4
  "description": "GeoWeb API library for the opengeoweb project",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {