@ultrst-armada/kloks 1.22.1 → 1.22.2
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.
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schema": 1,
|
|
3
3
|
"packageName": "@ultrst-armada/kloks",
|
|
4
|
-
"version": "1.22.
|
|
5
|
-
"sourceCommit": "
|
|
4
|
+
"version": "1.22.2",
|
|
5
|
+
"sourceCommit": "27518ba86f7f0a405ec7ce1582b4ba485f71b550",
|
|
6
6
|
"releaseWorkflow": "npm Release",
|
|
7
|
-
"workflowRunId": "
|
|
7
|
+
"workflowRunId": "41128230877"
|
|
8
8
|
}
|
package/package.json
CHANGED
|
@@ -342,6 +342,8 @@ interface SrklAccountClientOptions {
|
|
|
342
342
|
baseUrl: string;
|
|
343
343
|
userId: string;
|
|
344
344
|
appId: string;
|
|
345
|
+
token?: string;
|
|
346
|
+
sessionToken?: string;
|
|
345
347
|
fetchImpl?: typeof fetch;
|
|
346
348
|
}
|
|
347
349
|
interface SrklAccountSyncResult {
|
|
@@ -355,6 +357,8 @@ declare class SrklAccountClient {
|
|
|
355
357
|
private readonly baseUrl;
|
|
356
358
|
private readonly userId;
|
|
357
359
|
private readonly appId;
|
|
360
|
+
private readonly token?;
|
|
361
|
+
private readonly sessionToken?;
|
|
358
362
|
private cachedAccounts;
|
|
359
363
|
constructor(options: SrklAccountClientOptions);
|
|
360
364
|
sync(manifest?: SrklAccountManifest): Promise<SrklAccountSyncResult>;
|
|
@@ -2607,12 +2607,16 @@ var SrklAccountClient = class {
|
|
|
2607
2607
|
baseUrl;
|
|
2608
2608
|
userId;
|
|
2609
2609
|
appId;
|
|
2610
|
+
token;
|
|
2611
|
+
sessionToken;
|
|
2610
2612
|
cachedAccounts = [];
|
|
2611
2613
|
constructor(options) {
|
|
2612
2614
|
this.fetchImpl = options.fetchImpl || fetch;
|
|
2613
2615
|
this.baseUrl = options.baseUrl.replace(/\/+$/, "");
|
|
2614
2616
|
this.userId = options.userId;
|
|
2615
2617
|
this.appId = options.appId;
|
|
2618
|
+
this.token = options.token;
|
|
2619
|
+
this.sessionToken = options.sessionToken;
|
|
2616
2620
|
}
|
|
2617
2621
|
async sync(manifest = {}) {
|
|
2618
2622
|
const payload = {
|
|
@@ -2620,13 +2624,20 @@ var SrklAccountClient = class {
|
|
|
2620
2624
|
appId: manifest.appId || this.appId,
|
|
2621
2625
|
includeCredentials: manifest.includeCredentials ?? true
|
|
2622
2626
|
};
|
|
2627
|
+
const headers = {
|
|
2628
|
+
"content-type": "application/json",
|
|
2629
|
+
"x-user-id": this.userId,
|
|
2630
|
+
"x-app-id": this.appId
|
|
2631
|
+
};
|
|
2632
|
+
if (this.token) {
|
|
2633
|
+
headers.authorization = this.token.startsWith("Bearer ") ? this.token : `Bearer ${this.token}`;
|
|
2634
|
+
}
|
|
2635
|
+
if (this.sessionToken) {
|
|
2636
|
+
headers["x-session-token"] = this.sessionToken;
|
|
2637
|
+
}
|
|
2623
2638
|
const response = await this.fetchImpl(`${this.baseUrl}/api/ecosystem/accounts`, {
|
|
2624
2639
|
method: "POST",
|
|
2625
|
-
headers
|
|
2626
|
-
"content-type": "application/json",
|
|
2627
|
-
"x-user-id": this.userId,
|
|
2628
|
-
"x-app-id": this.appId
|
|
2629
|
-
},
|
|
2640
|
+
headers,
|
|
2630
2641
|
body: JSON.stringify(payload)
|
|
2631
2642
|
});
|
|
2632
2643
|
if (!response.ok) throw new Error(`SRKL account sync failed: ${response.status}`);
|
|
@@ -7,15 +7,6 @@ import {
|
|
|
7
7
|
instantiateSubgraph
|
|
8
8
|
} from "./chunk-S22PMERU.js";
|
|
9
9
|
import "./chunk-RHRXPY2U.js";
|
|
10
|
-
import {
|
|
11
|
-
LifecycleCycleError,
|
|
12
|
-
LifecycleGraph,
|
|
13
|
-
SKIPO_STATE,
|
|
14
|
-
SkipoStateEngine,
|
|
15
|
-
useLifecycleScope,
|
|
16
|
-
useSkipoBind,
|
|
17
|
-
useSkipoState
|
|
18
|
-
} from "./chunk-EW4ACSZB.js";
|
|
19
10
|
import {
|
|
20
11
|
AttractionEngine,
|
|
21
12
|
GhostInferenceEngine,
|
|
@@ -58,6 +49,15 @@ import {
|
|
|
58
49
|
import {
|
|
59
50
|
CompatibilityMatrix
|
|
60
51
|
} from "./chunk-ISFNY7EZ.js";
|
|
52
|
+
import {
|
|
53
|
+
LifecycleCycleError,
|
|
54
|
+
LifecycleGraph,
|
|
55
|
+
SKIPO_STATE,
|
|
56
|
+
SkipoStateEngine,
|
|
57
|
+
useLifecycleScope,
|
|
58
|
+
useSkipoBind,
|
|
59
|
+
useSkipoState
|
|
60
|
+
} from "./chunk-EW4ACSZB.js";
|
|
61
61
|
import "./chunk-QGM4M3NI.js";
|
|
62
62
|
|
|
63
63
|
// ../../node_modules/.pnpm/@ultrst-armada+krnl@1.0.9_@types+node@22.20.5/node_modules/@ultrst-armada/krnl/packages/core/dist/index.js
|