rotur-sdk 1.0.9 → 1.0.11
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/dist/index.js +2 -8
- package/dist/index.mjs +2 -8
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -66,14 +66,8 @@ var Http = class {
|
|
|
66
66
|
throw new ApiError(401, {
|
|
67
67
|
error: "Not authenticated \u2014 call rotur.login() first"
|
|
68
68
|
});
|
|
69
|
-
const allParams = params;
|
|
70
|
-
const
|
|
71
|
-
method: "GET",
|
|
72
|
-
headers: {
|
|
73
|
-
...token ? { Authorization: `Bearer ${token}` } : {}
|
|
74
|
-
}
|
|
75
|
-
};
|
|
76
|
-
const res = await fetch(this.buildUrl(path, allParams), opts);
|
|
69
|
+
const allParams = auth && token ? { ...params, auth: token } : params;
|
|
70
|
+
const res = await fetch(this.buildUrl(path, allParams));
|
|
77
71
|
return this.handle(res);
|
|
78
72
|
}
|
|
79
73
|
async post(path, body, auth = true) {
|
package/dist/index.mjs
CHANGED
|
@@ -36,14 +36,8 @@ var Http = class {
|
|
|
36
36
|
throw new ApiError(401, {
|
|
37
37
|
error: "Not authenticated \u2014 call rotur.login() first"
|
|
38
38
|
});
|
|
39
|
-
const allParams = params;
|
|
40
|
-
const
|
|
41
|
-
method: "GET",
|
|
42
|
-
headers: {
|
|
43
|
-
...token ? { Authorization: `Bearer ${token}` } : {}
|
|
44
|
-
}
|
|
45
|
-
};
|
|
46
|
-
const res = await fetch(this.buildUrl(path, allParams), opts);
|
|
39
|
+
const allParams = auth && token ? { ...params, auth: token } : params;
|
|
40
|
+
const res = await fetch(this.buildUrl(path, allParams));
|
|
47
41
|
return this.handle(res);
|
|
48
42
|
}
|
|
49
43
|
async post(path, body, auth = true) {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "rotur-sdk",
|
|
3
|
-
"version": "1.0.
|
|
4
|
-
"description": "The official SDK for the Rotur platform
|
|
3
|
+
"version": "1.0.11",
|
|
4
|
+
"description": "The official SDK for the Rotur platform",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.mjs",
|
|
7
7
|
"types": "dist/index.d.ts",
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"test": "vitest",
|
|
23
23
|
"typecheck": "tsc --noEmit",
|
|
24
24
|
"fmt": "prettier --write .",
|
|
25
|
-
"publish": "npm run build
|
|
25
|
+
"publish": "npm run build"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
28
|
"tsup": "^8.5.1",
|