@chatbridge/runtime 0.1.0 → 0.2.1
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/auth-store.d.ts +2 -1
- package/dist/auth-store.js +2 -1
- package/dist/browser-runtime.js +3 -1
- package/package.json +2 -2
package/dist/auth-store.d.ts
CHANGED
|
@@ -7,7 +7,8 @@ export interface AuthStoreOptions {
|
|
|
7
7
|
baseDir?: string;
|
|
8
8
|
}
|
|
9
9
|
/** Persists Playwright storageState JSON with restrictive permissions.
|
|
10
|
-
* The content is sensitive
|
|
10
|
+
* The content is sensitive — it holds cookies, localStorage and IndexedDB
|
|
11
|
+
* contents: never log it. */
|
|
11
12
|
export declare class AuthStore {
|
|
12
13
|
private readonly dir;
|
|
13
14
|
private readonly file;
|
package/dist/auth-store.js
CHANGED
|
@@ -4,7 +4,8 @@ import { homedir } from "node:os";
|
|
|
4
4
|
import { join } from "node:path";
|
|
5
5
|
import { validateProviderName } from "./provider-name.js";
|
|
6
6
|
/** Persists Playwright storageState JSON with restrictive permissions.
|
|
7
|
-
* The content is sensitive
|
|
7
|
+
* The content is sensitive — it holds cookies, localStorage and IndexedDB
|
|
8
|
+
* contents: never log it. */
|
|
8
9
|
export class AuthStore {
|
|
9
10
|
dir;
|
|
10
11
|
file;
|
package/dist/browser-runtime.js
CHANGED
|
@@ -30,7 +30,9 @@ export class BrowserRuntime {
|
|
|
30
30
|
}
|
|
31
31
|
}
|
|
32
32
|
async saveAuthState() {
|
|
33
|
-
|
|
33
|
+
// Services may keep the session in IndexedDB; the default state excludes it.
|
|
34
|
+
// Playwright throws if a service stores values it cannot serialise (e.g. Blobs).
|
|
35
|
+
await this.authStore.save(await this.context.storageState({ indexedDB: true }));
|
|
34
36
|
}
|
|
35
37
|
async close() {
|
|
36
38
|
await this.browser.close();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@chatbridge/runtime",
|
|
3
|
-
"version": "0.1
|
|
3
|
+
"version": "0.2.1",
|
|
4
4
|
"description": "Playwright runtime for chatbridge: browser lifecycle and auth-state persistence",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
27
|
"playwright": "1.63.0",
|
|
28
|
-
"@chatbridge/provider": "0.
|
|
28
|
+
"@chatbridge/provider": "0.2.0"
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
|
31
31
|
"@chatbridge/example-dummy-chat": "0.0.0"
|