@tailorkit/app 0.1.0-beta.26 → 0.1.0-beta.27
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/{chunk-S3KZ3Z2U.js → chunk-STTKSRAI.js} +1 -1
- package/dist/{chunk-4PGMCBMJ.js → chunk-SWBQZDWT.js} +1 -3
- package/dist/client/session.d.ts +0 -2
- package/dist/client-connection.js +1 -1
- package/dist/client.js +2 -2
- package/dist/config/config.d.ts +0 -1
- package/dist/index.js +2 -2
- package/package.json +1 -1
|
@@ -28,7 +28,7 @@ function createSessionProvider(options) {
|
|
|
28
28
|
let cached;
|
|
29
29
|
let pending;
|
|
30
30
|
return (input) => {
|
|
31
|
-
if (
|
|
31
|
+
if (!input.refresh && cached && cached.expiresAt > Date.now() + APP_SESSION_RENEWAL_MS) {
|
|
32
32
|
return Promise.resolve(cached);
|
|
33
33
|
}
|
|
34
34
|
pending ??= (async () => {
|
|
@@ -51,8 +51,6 @@ function createSessionProvider(options) {
|
|
|
51
51
|
if (typeof value.token !== "string" || typeof value.expiresAt !== "number" || typeof value.url !== "string") {
|
|
52
52
|
throw new AppError("UNAVAILABLE", "Invalid app session");
|
|
53
53
|
}
|
|
54
|
-
if (options.subjectId !== void 0 && value.subjectId !== options.subjectId)
|
|
55
|
-
throw new AppError("UNAUTHORIZED", "Authenticated principal changed");
|
|
56
54
|
cached = {
|
|
57
55
|
...value.toolUrl !== void 0 ? { toolUrl: value.toolUrl } : {},
|
|
58
56
|
...value.identity !== void 0 ? { identity: freezeIdentity(value.identity) } : {},
|
package/dist/client/session.d.ts
CHANGED
|
@@ -12,8 +12,6 @@ export declare function sessionRenewalDelay(session: Session): number;
|
|
|
12
12
|
export declare function createSessionProvider(options: {
|
|
13
13
|
baseUrl: string | URL;
|
|
14
14
|
appId: string;
|
|
15
|
-
/** Product principal used solely to partition the host credential cache. */
|
|
16
|
-
subjectId?: string;
|
|
17
15
|
fetch?: typeof fetch;
|
|
18
16
|
}): (input: {
|
|
19
17
|
refresh: boolean;
|
package/dist/client.js
CHANGED
|
@@ -9,13 +9,13 @@ import {
|
|
|
9
9
|
useAction,
|
|
10
10
|
useMutation,
|
|
11
11
|
useQuery
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-STTKSRAI.js";
|
|
13
13
|
import {
|
|
14
14
|
createApi,
|
|
15
15
|
createClient,
|
|
16
16
|
createSessionProvider,
|
|
17
17
|
reference
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-SWBQZDWT.js";
|
|
19
19
|
import {
|
|
20
20
|
AppError,
|
|
21
21
|
appError
|
package/dist/config/config.d.ts
CHANGED
|
@@ -22,7 +22,6 @@ export interface TailorKitConfig extends z.input<typeof tailorkitConfigSchema> {
|
|
|
22
22
|
/**
|
|
23
23
|
* ID of the app on the TailorKit host, used for deployment and remote preview.
|
|
24
24
|
* When omitted, the first deployment creates an app and saves its ID here.
|
|
25
|
-
* The agent command prompts to select or create an app and saves its ID here.
|
|
26
25
|
* Remote preview requires an existing app ID.
|
|
27
26
|
* @default undefined
|
|
28
27
|
*/
|
package/dist/index.js
CHANGED
|
@@ -9,13 +9,13 @@ import {
|
|
|
9
9
|
useAction,
|
|
10
10
|
useMutation,
|
|
11
11
|
useQuery
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-STTKSRAI.js";
|
|
13
13
|
import {
|
|
14
14
|
createApi,
|
|
15
15
|
createClient,
|
|
16
16
|
createSessionProvider,
|
|
17
17
|
reference
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-SWBQZDWT.js";
|
|
19
19
|
import {
|
|
20
20
|
action,
|
|
21
21
|
and,
|