@meshagent/meshagent-react-auth 0.42.2 → 0.43.0
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 +6 -0
- package/dist/cjs/index.d.ts +5 -5
- package/dist/cjs/index.js +5 -5
- package/dist/cjs/mauth-response.js +3 -3
- package/dist/cjs/package.json +1 -0
- package/dist/cjs/use-auth.js +5 -5
- package/dist/cjs/use-ensure-login.js +2 -2
- package/dist/cjs/use-login-scope.js +2 -2
- package/dist/esm/index.d.ts +5 -5
- package/dist/esm/index.js +5 -5
- package/dist/esm/mauth-response.js +1 -1
- package/dist/esm/use-auth.js +2 -2
- package/dist/esm/use-ensure-login.js +1 -1
- package/dist/esm/use-login-scope.js +1 -1
- package/package.json +5 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
## [0.43.0]
|
|
2
|
+
- Split LiveKit helpers into `@meshagent/meshagent-livekit-ts` and added `@meshagent/meshagent-node-ts` for room websocket proxying and room-connect helpers.
|
|
3
|
+
- Updated `meshagent-ts` exports for ESM-aware resolution, moved LiveKit out of the core package, and added `RoomClient.withIAP()` and `WebSocketClientProtocol.withIAP()` for the new room-connect flow.
|
|
4
|
+
- Room websocket auth now uses bearer headers on Node and `meshagent-room.` subprotocol tokens in the browser, and the agents/thread APIs now carry backend metadata and attachment-aware prompts.
|
|
5
|
+
- React/auth/dev/tailwind packages now publish CJS main entries alongside ESM builds, and the new LiveKit package depends on `livekit-client@^2.15.5`.
|
|
6
|
+
|
|
1
7
|
## [0.42.2]
|
|
2
8
|
- Added `ContainerExitStatus`, `RoomContainerStats`, and published build image metadata to the TypeScript container client models.
|
|
3
9
|
- Added `waitForExitStatus` while keeping `waitForExit` as the exit-code convenience wrapper.
|
package/dist/cjs/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export * from "./mauth-response";
|
|
2
|
-
export * from "./use-auth";
|
|
3
|
-
export * from "./use-ensure-login";
|
|
4
|
-
export * from "./use-login-scope";
|
|
5
|
-
export * from "./use-meshagent-auth";
|
|
1
|
+
export * from "./mauth-response.js";
|
|
2
|
+
export * from "./use-auth.js";
|
|
3
|
+
export * from "./use-ensure-login.js";
|
|
4
|
+
export * from "./use-login-scope.js";
|
|
5
|
+
export * from "./use-meshagent-auth.js";
|
package/dist/cjs/index.js
CHANGED
|
@@ -14,8 +14,8 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./mauth-response"), exports);
|
|
18
|
-
__exportStar(require("./use-auth"), exports);
|
|
19
|
-
__exportStar(require("./use-ensure-login"), exports);
|
|
20
|
-
__exportStar(require("./use-login-scope"), exports);
|
|
21
|
-
__exportStar(require("./use-meshagent-auth"), exports);
|
|
17
|
+
__exportStar(require("./mauth-response.js"), exports);
|
|
18
|
+
__exportStar(require("./use-auth.js"), exports);
|
|
19
|
+
__exportStar(require("./use-ensure-login.js"), exports);
|
|
20
|
+
__exportStar(require("./use-login-scope.js"), exports);
|
|
21
|
+
__exportStar(require("./use-meshagent-auth.js"), exports);
|
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.useMAuthResponse = useMAuthResponse;
|
|
4
4
|
const react_1 = require("react");
|
|
5
5
|
const meshagent_ts_auth_1 = require("@meshagent/meshagent-ts-auth");
|
|
6
|
-
const
|
|
6
|
+
const reference_key_js_1 = require("./reference-key.js");
|
|
7
7
|
function toUrl(value) {
|
|
8
8
|
return value instanceof URL ? value : new URL(value);
|
|
9
9
|
}
|
|
@@ -45,8 +45,8 @@ function useMAuthResponse({ serverUrl, callbackUrl, oauthClientId, authorization
|
|
|
45
45
|
callbackUrl: callbackUrlKey,
|
|
46
46
|
oauthClientId,
|
|
47
47
|
code,
|
|
48
|
-
storageKey: (0,
|
|
49
|
-
authKey: (0,
|
|
48
|
+
storageKey: (0, reference_key_js_1.getReferenceKey)(storage, "default-storage"),
|
|
49
|
+
authKey: (0, reference_key_js_1.getReferenceKey)(auth, "default-auth"),
|
|
50
50
|
});
|
|
51
51
|
(0, react_1.useEffect)(() => {
|
|
52
52
|
if (code === undefined || tokenExchangeKey === null) {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"type":"commonjs"}
|
package/dist/cjs/use-auth.js
CHANGED
|
@@ -4,8 +4,8 @@ exports.buildOAuthAuthorizeUrl = buildOAuthAuthorizeUrl;
|
|
|
4
4
|
exports.useAuth = useAuth;
|
|
5
5
|
const react_1 = require("react");
|
|
6
6
|
const meshagent_ts_auth_1 = require("@meshagent/meshagent-ts-auth");
|
|
7
|
-
const
|
|
8
|
-
const
|
|
7
|
+
const use_meshagent_auth_js_1 = require("./use-meshagent-auth.js");
|
|
8
|
+
const reference_key_js_1 = require("./reference-key.js");
|
|
9
9
|
const DEFAULT_SERVER_URL = "https://api.meshagent.com";
|
|
10
10
|
function toUrl(value) {
|
|
11
11
|
return value instanceof URL ? value : new URL(value);
|
|
@@ -199,9 +199,9 @@ function useAuth(props) {
|
|
|
199
199
|
const defaultProvider = props.provider ?? null;
|
|
200
200
|
const storage = props.storage ?? (0, meshagent_ts_auth_1.getDefaultStorage)();
|
|
201
201
|
const auth = props.auth ?? meshagent_ts_auth_1.meshagentAuth;
|
|
202
|
-
const authSnapshot = (0,
|
|
203
|
-
const authKey = (0,
|
|
204
|
-
const storageKey = (0,
|
|
202
|
+
const authSnapshot = (0, use_meshagent_auth_js_1.useMeshagentAuth)(auth);
|
|
203
|
+
const authKey = (0, reference_key_js_1.getReferenceKey)(auth, "default-auth");
|
|
204
|
+
const storageKey = (0, reference_key_js_1.getReferenceKey)(storage, "default-storage");
|
|
205
205
|
const callbackUrlKey = (0, react_1.useMemo)(() => getCallbackUrlKey(props.callbackUrl), [props.callbackUrl]);
|
|
206
206
|
const extraQueryParamsKey = (0, react_1.useMemo)(() => serializeExtraQueryParams(props.extraQueryParams), [props.extraQueryParams]);
|
|
207
207
|
const normalizedExtraQueryParams = (0, react_1.useMemo)(() => normalizeExtraQueryParams(props.extraQueryParams), [extraQueryParamsKey]);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.useEnsureLogin = useEnsureLogin;
|
|
4
|
-
const
|
|
4
|
+
const use_auth_js_1 = require("./use-auth.js");
|
|
5
5
|
function toErrorMessage(error) {
|
|
6
6
|
if (error instanceof Error) {
|
|
7
7
|
return error.message;
|
|
@@ -9,7 +9,7 @@ function toErrorMessage(error) {
|
|
|
9
9
|
return String(error);
|
|
10
10
|
}
|
|
11
11
|
function useEnsureLogin(props) {
|
|
12
|
-
const auth = (0,
|
|
12
|
+
const auth = (0, use_auth_js_1.useAuth)({
|
|
13
13
|
serverUrl: props.serverUrl,
|
|
14
14
|
callbackUrl: props.callbackUrl,
|
|
15
15
|
oauthClientId: props.oauthClientId,
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.useLoginScope = useLoginScope;
|
|
4
|
-
const
|
|
4
|
+
const use_auth_js_1 = require("./use-auth.js");
|
|
5
5
|
function useLoginScope(props) {
|
|
6
|
-
return (0,
|
|
6
|
+
return (0, use_auth_js_1.useAuth)({
|
|
7
7
|
...props,
|
|
8
8
|
scope: props.scope ?? "email",
|
|
9
9
|
});
|
package/dist/esm/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export * from "./mauth-response";
|
|
2
|
-
export * from "./use-auth";
|
|
3
|
-
export * from "./use-ensure-login";
|
|
4
|
-
export * from "./use-login-scope";
|
|
5
|
-
export * from "./use-meshagent-auth";
|
|
1
|
+
export * from "./mauth-response.js";
|
|
2
|
+
export * from "./use-auth.js";
|
|
3
|
+
export * from "./use-ensure-login.js";
|
|
4
|
+
export * from "./use-login-scope.js";
|
|
5
|
+
export * from "./use-meshagent-auth.js";
|
package/dist/esm/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export * from "./mauth-response";
|
|
2
|
-
export * from "./use-auth";
|
|
3
|
-
export * from "./use-ensure-login";
|
|
4
|
-
export * from "./use-login-scope";
|
|
5
|
-
export * from "./use-meshagent-auth";
|
|
1
|
+
export * from "./mauth-response.js";
|
|
2
|
+
export * from "./use-auth.js";
|
|
3
|
+
export * from "./use-ensure-login.js";
|
|
4
|
+
export * from "./use-login-scope.js";
|
|
5
|
+
export * from "./use-meshagent-auth.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useEffect, useState } from "react";
|
|
2
2
|
import { getAuthorizationCode, exchangeToken } from "@meshagent/meshagent-ts-auth";
|
|
3
|
-
import { getReferenceKey } from "./reference-key";
|
|
3
|
+
import { getReferenceKey } from "./reference-key.js";
|
|
4
4
|
function toUrl(value) {
|
|
5
5
|
return value instanceof URL ? value : new URL(value);
|
|
6
6
|
}
|
package/dist/esm/use-auth.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useEffect, useMemo, useRef, useState } from "react";
|
|
2
2
|
import { meshagentAuth, OAuthSessionManager, LocalStoragePkceCache, PkceGenerator, exchangeToken, getAuthorizationCode, getDefaultStorage, } from "@meshagent/meshagent-ts-auth";
|
|
3
|
-
import { useMeshagentAuth } from "./use-meshagent-auth";
|
|
4
|
-
import { getReferenceKey } from "./reference-key";
|
|
3
|
+
import { useMeshagentAuth } from "./use-meshagent-auth.js";
|
|
4
|
+
import { getReferenceKey } from "./reference-key.js";
|
|
5
5
|
const DEFAULT_SERVER_URL = "https://api.meshagent.com";
|
|
6
6
|
function toUrl(value) {
|
|
7
7
|
return value instanceof URL ? value : new URL(value);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@meshagent/meshagent-react-auth",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.43.0",
|
|
4
4
|
"description": "Meshagent React Auth Helpers",
|
|
5
5
|
"homepage": "https://github.com/meshagent/meshagent-react-auth",
|
|
6
6
|
"scripts": {
|
|
@@ -8,11 +8,11 @@
|
|
|
8
8
|
"test": "jest",
|
|
9
9
|
"test:watch": "jest --watch"
|
|
10
10
|
},
|
|
11
|
-
"author": "
|
|
11
|
+
"author": "Timu, LLC",
|
|
12
12
|
"license": "Apache-2.0",
|
|
13
13
|
"type": "module",
|
|
14
14
|
"module": "dist/esm/index.js",
|
|
15
|
-
"main": "./dist/
|
|
15
|
+
"main": "./dist/cjs/index.js",
|
|
16
16
|
"types": "dist/esm/index.d.ts",
|
|
17
17
|
"exports": {
|
|
18
18
|
".": {
|
|
@@ -30,8 +30,8 @@
|
|
|
30
30
|
"CHANGELOG.md"
|
|
31
31
|
],
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"@meshagent/meshagent": "^0.
|
|
34
|
-
"@meshagent/meshagent-ts-auth": "^0.
|
|
33
|
+
"@meshagent/meshagent": "^0.43.0",
|
|
34
|
+
"@meshagent/meshagent-ts-auth": "^0.43.0",
|
|
35
35
|
"@tanstack/react-query": "^5.95.2",
|
|
36
36
|
"@tanstack/react-query-devtools": "^5.95.2",
|
|
37
37
|
"react": "^19.1.8",
|