@smapiot/piral-cloud-node 1.13.6 → 1.14.0-pre.20240416.3
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/lib/index.cjs.js +7 -8
- package/lib/index.esm.js +7 -8
- package/package.json +2 -2
package/lib/index.cjs.js
CHANGED
|
@@ -4869,15 +4869,14 @@ function fetchWithoutToken(client, url, init = {}) {
|
|
|
4869
4869
|
}
|
|
4870
4870
|
function fetchWithToken(client, url, init = {}) {
|
|
4871
4871
|
return client.getAuthorizationHeader().then((header) => {
|
|
4872
|
-
if (
|
|
4873
|
-
|
|
4872
|
+
if (header && typeof header === "string") {
|
|
4873
|
+
return fetchWithoutToken(client, url, __spreadProps(__spreadValues({}, init), {
|
|
4874
|
+
headers: __spreadProps(__spreadValues({}, init.headers || {}), {
|
|
4875
|
+
authorization: header
|
|
4876
|
+
})
|
|
4877
|
+
}));
|
|
4874
4878
|
}
|
|
4875
|
-
|
|
4876
|
-
authorization: header
|
|
4877
|
-
});
|
|
4878
|
-
return fetchWithoutToken(client, url, __spreadProps(__spreadValues({}, init), {
|
|
4879
|
-
headers
|
|
4880
|
-
}));
|
|
4879
|
+
return fetchWithoutToken(client, url, init);
|
|
4881
4880
|
});
|
|
4882
4881
|
}
|
|
4883
4882
|
|
package/lib/index.esm.js
CHANGED
|
@@ -4868,15 +4868,14 @@ function fetchWithoutToken(client, url, init = {}) {
|
|
|
4868
4868
|
}
|
|
4869
4869
|
function fetchWithToken(client, url, init = {}) {
|
|
4870
4870
|
return client.getAuthorizationHeader().then((header) => {
|
|
4871
|
-
if (
|
|
4872
|
-
|
|
4871
|
+
if (header && typeof header === "string") {
|
|
4872
|
+
return fetchWithoutToken(client, url, __spreadProps(__spreadValues({}, init), {
|
|
4873
|
+
headers: __spreadProps(__spreadValues({}, init.headers || {}), {
|
|
4874
|
+
authorization: header
|
|
4875
|
+
})
|
|
4876
|
+
}));
|
|
4873
4877
|
}
|
|
4874
|
-
|
|
4875
|
-
authorization: header
|
|
4876
|
-
});
|
|
4877
|
-
return fetchWithoutToken(client, url, __spreadProps(__spreadValues({}, init), {
|
|
4878
|
-
headers
|
|
4879
|
-
}));
|
|
4878
|
+
return fetchWithoutToken(client, url, init);
|
|
4880
4879
|
});
|
|
4881
4880
|
}
|
|
4882
4881
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@smapiot/piral-cloud-node",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.14.0-pre.20240416.3",
|
|
4
4
|
"description": "Piral Cloud: Node-usable API Client for the Piral Feed Service.",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "smapiot",
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
"node"
|
|
52
52
|
],
|
|
53
53
|
"devDependencies": {
|
|
54
|
-
"@piral/feed-client": "^1.
|
|
54
|
+
"@piral/feed-client": "^1.14.0",
|
|
55
55
|
"dets": "^0.14.1",
|
|
56
56
|
"esbuild": "^0.14.27",
|
|
57
57
|
"node-fetch": "^3.3.2"
|