@meshagent/meshagent-ts-auth 0.36.0 → 0.36.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.
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
## [0.36.2]
|
|
2
|
+
- Breaking: Removed share-connect API from the TypeScript client (`connectShare` / RoomShareConnectionInfo).
|
|
3
|
+
- OAuth helpers now default requested scope to `profile` (TS auth + React auth).
|
|
4
|
+
|
|
5
|
+
## [0.36.1]
|
|
6
|
+
- Stability
|
|
7
|
+
|
|
1
8
|
## [0.36.0]
|
|
2
9
|
- Added container config mounts and agent email/heartbeat settings with typed prompt content (text/file) to TypeScript service specs.
|
|
3
10
|
- Breaking: container API key provisioning was removed from container specs.
|
|
@@ -22654,28 +22654,6 @@ ${newlined}
|
|
|
22654
22654
|
settings: settings && typeof settings === "object" ? settings : {}
|
|
22655
22655
|
};
|
|
22656
22656
|
}
|
|
22657
|
-
parseRoomShareConnectionInfo(data) {
|
|
22658
|
-
if (!data || typeof data !== "object") {
|
|
22659
|
-
throw new requirement_1.RoomException("Invalid room share connection payload");
|
|
22660
|
-
}
|
|
22661
|
-
const { jwt, room_name: roomNameRaw, roomName, project_id: projectIdRaw, projectId, settings, room_url: roomUrlRaw, roomUrl } = data;
|
|
22662
|
-
if (typeof jwt !== "string") {
|
|
22663
|
-
throw new requirement_1.RoomException("Invalid room share connection payload: missing jwt");
|
|
22664
|
-
}
|
|
22665
|
-
const roomNameValue = typeof roomName === "string" ? roomName : roomNameRaw;
|
|
22666
|
-
const projectIdValue = typeof projectId === "string" ? projectId : projectIdRaw;
|
|
22667
|
-
const roomUrlValue = typeof roomUrl === "string" ? roomUrl : roomUrlRaw;
|
|
22668
|
-
if (typeof roomNameValue !== "string" || typeof projectIdValue !== "string" || typeof roomUrlValue !== "string") {
|
|
22669
|
-
throw new requirement_1.RoomException("Invalid room share connection payload: missing fields");
|
|
22670
|
-
}
|
|
22671
|
-
return {
|
|
22672
|
-
jwt,
|
|
22673
|
-
roomName: roomNameValue,
|
|
22674
|
-
projectId: projectIdValue,
|
|
22675
|
-
settings: settings && typeof settings === "object" ? settings : {},
|
|
22676
|
-
roomUrl: roomUrlValue
|
|
22677
|
-
};
|
|
22678
|
-
}
|
|
22679
22657
|
parseRoomSession(data) {
|
|
22680
22658
|
if (!data || typeof data !== "object") {
|
|
22681
22659
|
throw new requirement_1.RoomException("Invalid room session payload");
|
|
@@ -23080,14 +23058,6 @@ ${newlined}
|
|
|
23080
23058
|
const shares = Array.isArray(data?.shares) ? data.shares : [];
|
|
23081
23059
|
return shares.map((item) => this.parseRoomShare(item));
|
|
23082
23060
|
}
|
|
23083
|
-
async connectShare(shareId) {
|
|
23084
|
-
const data = await this.request(`/shares/${shareId}/connect`, {
|
|
23085
|
-
method: "POST",
|
|
23086
|
-
json: {},
|
|
23087
|
-
action: "connect share"
|
|
23088
|
-
});
|
|
23089
|
-
return this.parseRoomShareConnectionInfo(data);
|
|
23090
|
-
}
|
|
23091
23061
|
async createProject(name, settings) {
|
|
23092
23062
|
return await this.request(`/accounts/projects`, {
|
|
23093
23063
|
method: "POST",
|
|
@@ -27085,7 +27055,7 @@ ${newlined}
|
|
|
27085
27055
|
const pkce = await generator.generate();
|
|
27086
27056
|
await cache2.saveVerifier(pkce.codeVerifier);
|
|
27087
27057
|
const query = new URLSearchParams({
|
|
27088
|
-
scope: "
|
|
27058
|
+
scope: "profile",
|
|
27089
27059
|
client_id: oauthClientId,
|
|
27090
27060
|
code_challenge: pkce.codeChallenge,
|
|
27091
27061
|
response_type: "code",
|
package/dist/cjs/ensure-login.js
CHANGED
|
@@ -82,7 +82,7 @@ async function ensureLogin({ oauthClientId, serverUrl, callbackUrl, provider, })
|
|
|
82
82
|
const pkce = await generator.generate();
|
|
83
83
|
await cache.saveVerifier(pkce.codeVerifier);
|
|
84
84
|
const query = new URLSearchParams({
|
|
85
|
-
scope: "
|
|
85
|
+
scope: "profile",
|
|
86
86
|
client_id: oauthClientId,
|
|
87
87
|
code_challenge: pkce.codeChallenge,
|
|
88
88
|
response_type: "code",
|
package/dist/esm/ensure-login.js
CHANGED
|
@@ -79,7 +79,7 @@ export async function ensureLogin({ oauthClientId, serverUrl, callbackUrl, provi
|
|
|
79
79
|
const pkce = await generator.generate();
|
|
80
80
|
await cache.saveVerifier(pkce.codeVerifier);
|
|
81
81
|
const query = new URLSearchParams({
|
|
82
|
-
scope: "
|
|
82
|
+
scope: "profile",
|
|
83
83
|
client_id: oauthClientId,
|
|
84
84
|
code_challenge: pkce.codeChallenge,
|
|
85
85
|
response_type: "code",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@meshagent/meshagent-ts-auth",
|
|
3
|
-
"version": "0.36.
|
|
3
|
+
"version": "0.36.2",
|
|
4
4
|
"description": "Meshagent Typescript Auth",
|
|
5
5
|
"homepage": "https://github.com/meshagent/meshagent-ts-auth",
|
|
6
6
|
"scripts": {
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"CHANGELOG.md"
|
|
38
38
|
],
|
|
39
39
|
"dependencies": {
|
|
40
|
-
"@meshagent/meshagent": "^0.36.
|
|
40
|
+
"@meshagent/meshagent": "^0.36.2",
|
|
41
41
|
"typescript": "^5.8.3"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|