@atlastodo/sdk 0.1.11-rc.9 → 0.1.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 +4 -2
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -9,6 +9,7 @@ import {
|
|
|
9
9
|
isProjectCreator,
|
|
10
10
|
parseApiToken,
|
|
11
11
|
readKeyTrust,
|
|
12
|
+
trimTrailing,
|
|
12
13
|
reviveLockedValues,
|
|
13
14
|
unwrapApiTokenKeys,
|
|
14
15
|
unwrapSigningKey
|
|
@@ -51,7 +52,7 @@ class AtlasClient {
|
|
|
51
52
|
static async connect(opts) {
|
|
52
53
|
const parts = parseApiToken(opts.token);
|
|
53
54
|
const { auth } = deriveApiTokenKeys(parts);
|
|
54
|
-
const baseUrl = opts.serverUrl
|
|
55
|
+
const baseUrl = trimTrailing(opts.serverUrl, "/");
|
|
55
56
|
const api = new ApiClient({
|
|
56
57
|
baseUrl,
|
|
57
58
|
fetch: opts.fetch,
|
|
@@ -320,6 +321,7 @@ import {
|
|
|
320
321
|
deriveApiTokenKeys as deriveApiTokenKeys2,
|
|
321
322
|
getPublicKey,
|
|
322
323
|
parseApiToken as parseApiToken2,
|
|
324
|
+
trimTrailing as trimTrailing2,
|
|
323
325
|
unwrapApiTokenAppKeys
|
|
324
326
|
} from "@atlastodo/client-core";
|
|
325
327
|
import {
|
|
@@ -367,7 +369,7 @@ class VaultClient {
|
|
|
367
369
|
const parts = parseApiToken2(opts.token);
|
|
368
370
|
const { auth } = deriveApiTokenKeys2(parts);
|
|
369
371
|
const api = new ApiClient2({
|
|
370
|
-
baseUrl: opts.serverUrl
|
|
372
|
+
baseUrl: trimTrailing2(opts.serverUrl, "/"),
|
|
371
373
|
fetch: opts.fetch,
|
|
372
374
|
apps: [VAULT_APP],
|
|
373
375
|
reauthenticate: async () => (await api.openApiTokenSession(parts.id, auth)).access_token
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlastodo/sdk",
|
|
3
|
-
"version": "0.1.11
|
|
3
|
+
"version": "0.1.11",
|
|
4
4
|
"description": "Headless Atlas client for integrations: signs in with a personal API token and syncs an account's tasks into memory",
|
|
5
5
|
"license": "AGPL-3.0-only",
|
|
6
6
|
"homepage": "https://github.com/atlastodo/atlas/tree/main/packages/sdk",
|
|
@@ -47,8 +47,8 @@
|
|
|
47
47
|
"test": "vitest run"
|
|
48
48
|
},
|
|
49
49
|
"dependencies": {
|
|
50
|
-
"@atlastodo/client-core": "0.1.11
|
|
51
|
-
"@atlastodo/shared": "0.1.11
|
|
50
|
+
"@atlastodo/client-core": "0.1.11",
|
|
51
|
+
"@atlastodo/shared": "0.1.11"
|
|
52
52
|
},
|
|
53
53
|
"devDependencies": {
|
|
54
54
|
"@types/node": "^26.6.5",
|