@yume-chan/adb-credential-web 0.0.0-20240714132542
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 +113 -0
- package/LICENSE +21 -0
- package/README.md +49 -0
- package/esm/index.d.ts +20 -0
- package/esm/index.d.ts.map +1 -0
- package/esm/index.js +99 -0
- package/esm/index.js.map +1 -0
- package/package.json +41 -0
- package/src/index.ts +117 -0
- package/tsconfig.build.json +14 -0
- package/tsconfig.build.tsbuildinfo +1 -0
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
# Change Log - @yume-chan/adb-credential-web
|
|
2
|
+
|
|
3
|
+
## 0.0.0-20240714132542
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Switch to PNPM workspace and changesets
|
|
8
|
+
- Updated dependencies
|
|
9
|
+
- @yume-chan/adb@0.0.0-20240714132542
|
|
10
|
+
|
|
11
|
+
This log was last generated on Tue, 18 Jun 2024 02:49:43 GMT and should not be manually modified.
|
|
12
|
+
|
|
13
|
+
## 0.0.24
|
|
14
|
+
|
|
15
|
+
Tue, 18 Jun 2024 02:49:43 GMT
|
|
16
|
+
|
|
17
|
+
_Version update only_
|
|
18
|
+
|
|
19
|
+
## 0.0.23
|
|
20
|
+
|
|
21
|
+
Thu, 21 Mar 2024 03:15:10 GMT
|
|
22
|
+
|
|
23
|
+
_Version update only_
|
|
24
|
+
|
|
25
|
+
## 0.0.22
|
|
26
|
+
|
|
27
|
+
Wed, 13 Dec 2023 05:57:27 GMT
|
|
28
|
+
|
|
29
|
+
_Version update only_
|
|
30
|
+
|
|
31
|
+
## 0.0.21
|
|
32
|
+
|
|
33
|
+
Fri, 25 Aug 2023 14:05:18 GMT
|
|
34
|
+
|
|
35
|
+
### Updates
|
|
36
|
+
|
|
37
|
+
- Add name for public keys
|
|
38
|
+
- Change to save private keys in IndexedDB, allow usage from Web Workers
|
|
39
|
+
|
|
40
|
+
## 0.0.20
|
|
41
|
+
|
|
42
|
+
Mon, 05 Jun 2023 02:51:41 GMT
|
|
43
|
+
|
|
44
|
+
### Updates
|
|
45
|
+
|
|
46
|
+
- Change `AdbWebCredentialStore` to save private keys in IndexedDB, so it can be used in Web Workers. Previously saved keys in `localStorage` will be ignored and a new key will be generated.
|
|
47
|
+
|
|
48
|
+
## 0.0.19
|
|
49
|
+
|
|
50
|
+
Sun, 09 Apr 2023 05:55:33 GMT
|
|
51
|
+
|
|
52
|
+
_Version update only_
|
|
53
|
+
|
|
54
|
+
## 0.0.18
|
|
55
|
+
|
|
56
|
+
Wed, 25 Jan 2023 21:33:49 GMT
|
|
57
|
+
|
|
58
|
+
_Version update only_
|
|
59
|
+
|
|
60
|
+
## 0.0.17
|
|
61
|
+
|
|
62
|
+
Tue, 18 Oct 2022 09:32:30 GMT
|
|
63
|
+
|
|
64
|
+
### Updates
|
|
65
|
+
|
|
66
|
+
- Update to use new stream util package
|
|
67
|
+
|
|
68
|
+
## 0.0.16
|
|
69
|
+
|
|
70
|
+
Sat, 28 May 2022 03:56:37 GMT
|
|
71
|
+
|
|
72
|
+
### Updates
|
|
73
|
+
|
|
74
|
+
- Upgrade TypeScript to 4.7.2 to enable Node.js ESM
|
|
75
|
+
|
|
76
|
+
## 0.0.15
|
|
77
|
+
|
|
78
|
+
Mon, 02 May 2022 04:18:01 GMT
|
|
79
|
+
|
|
80
|
+
_Version update only_
|
|
81
|
+
|
|
82
|
+
## 0.0.14
|
|
83
|
+
|
|
84
|
+
Sat, 30 Apr 2022 14:05:48 GMT
|
|
85
|
+
|
|
86
|
+
_Version update only_
|
|
87
|
+
|
|
88
|
+
## 0.0.13
|
|
89
|
+
|
|
90
|
+
Thu, 28 Apr 2022 01:23:53 GMT
|
|
91
|
+
|
|
92
|
+
_Version update only_
|
|
93
|
+
|
|
94
|
+
## 0.0.12
|
|
95
|
+
|
|
96
|
+
Sun, 03 Apr 2022 11:18:47 GMT
|
|
97
|
+
|
|
98
|
+
_Version update only_
|
|
99
|
+
|
|
100
|
+
## 0.0.11
|
|
101
|
+
|
|
102
|
+
Sun, 03 Apr 2022 10:54:15 GMT
|
|
103
|
+
|
|
104
|
+
### Updates
|
|
105
|
+
|
|
106
|
+
- Update to use Web Streams API
|
|
107
|
+
- Improve compatibility with Node.js 12 ESM format
|
|
108
|
+
|
|
109
|
+
## 0.0.10
|
|
110
|
+
|
|
111
|
+
Sun, 09 Jan 2022 15:52:20 GMT
|
|
112
|
+
|
|
113
|
+
_Initial release_
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2020-2024 Simon Chan
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
<p align="center">
|
|
2
|
+
<img alt="Tango" src="https://raw.githubusercontent.com/yume-chan/ya-webadb/main/.github/logo.svg" width="200">
|
|
3
|
+
</p>
|
|
4
|
+
|
|
5
|
+
<h1 align="center">@yume-chan/adb-credential-web</h1>
|
|
6
|
+
|
|
7
|
+
<p align="center">
|
|
8
|
+
Credential Store for `@yume-chan/adb` using WebCrypto and IndexedDB APIs.
|
|
9
|
+
</p>
|
|
10
|
+
|
|
11
|
+
<p align="center">
|
|
12
|
+
<a href="https://github.com/yume-chan/ya-webadb/blob/main/LICENSE">
|
|
13
|
+
<img alt="MIT License" src="https://img.shields.io/github/license/yume-chan/ya-webadb">
|
|
14
|
+
</a>
|
|
15
|
+
<a href="https://github.com/yume-chan/ya-webadb/releases">
|
|
16
|
+
<img alt="GitHub release" src="https://img.shields.io/github/v/release/yume-chan/ya-webadb?logo=github">
|
|
17
|
+
</a>
|
|
18
|
+
<a href="https://bundlephobia.com/package/@yume-chan/adb-credential-web">
|
|
19
|
+
<img alt="Package Size" src="https://img.shields.io/bundlephobia/minzip/%40yume-chan%2Fadb-credential-web">
|
|
20
|
+
</a>
|
|
21
|
+
<a href="https://www.npmjs.com/package/@yume-chan/adb">
|
|
22
|
+
<img alt="npm" src="https://img.shields.io/npm/dm/%40yume-chan/adb-credential-web?logo=npm">
|
|
23
|
+
</a>
|
|
24
|
+
<a href="https://discord.gg/26k3ttC2PN">
|
|
25
|
+
<img alt="Discord" src="https://img.shields.io/discord/1120215514732564502?logo=discord&logoColor=%23ffffff&label=Discord">
|
|
26
|
+
</a>
|
|
27
|
+
</p>
|
|
28
|
+
|
|
29
|
+
This package is part of [Tango ADB](https://github.com/yume-chan/ya-webadb). Generally you need multiple packages to build a complete ADB client that can run on Web browsers and Node.js. Read the documentation for more information.
|
|
30
|
+
|
|
31
|
+
## Documentation
|
|
32
|
+
|
|
33
|
+
Check the latest documentation at https://docs.tangoapp.dev/tango/daemon/credential-store/
|
|
34
|
+
|
|
35
|
+
## Sponsors
|
|
36
|
+
|
|
37
|
+
[Become a backer](https://opencollective.com/ya-webadb) and get your image on our README on Github with a link to your site.
|
|
38
|
+
|
|
39
|
+
<a href="https://opencollective.com/ya-webadb/backer/0/website?requireActive=false" target="_blank"><img src="https://opencollective.com/ya-webadb/backer/0/avatar.svg?requireActive=false"></a>
|
|
40
|
+
<a href="https://opencollective.com/ya-webadb/backer/1/website?requireActive=false" target="_blank"><img src="https://opencollective.com/ya-webadb/backer/1/avatar.svg?requireActive=false"></a>
|
|
41
|
+
<a href="https://opencollective.com/ya-webadb/backer/2/website?requireActive=false" target="_blank"><img src="https://opencollective.com/ya-webadb/backer/2/avatar.svg?requireActive=false"></a>
|
|
42
|
+
<a href="https://opencollective.com/ya-webadb/backer/3/website?requireActive=false" target="_blank"><img src="https://opencollective.com/ya-webadb/backer/3/avatar.svg?requireActive=false"></a>
|
|
43
|
+
<a href="https://opencollective.com/ya-webadb/backer/4/website?requireActive=false" target="_blank"><img src="https://opencollective.com/ya-webadb/backer/4/avatar.svg?requireActive=false"></a>
|
|
44
|
+
<a href="https://opencollective.com/ya-webadb/backer/5/website?requireActive=false" target="_blank"><img src="https://opencollective.com/ya-webadb/backer/5/avatar.svg?requireActive=false"></a>
|
|
45
|
+
<a href="https://opencollective.com/ya-webadb/backer/6/website?requireActive=false" target="_blank"><img src="https://opencollective.com/ya-webadb/backer/6/avatar.svg?requireActive=false"></a>
|
|
46
|
+
<a href="https://opencollective.com/ya-webadb/backer/7/website?requireActive=false" target="_blank"><img src="https://opencollective.com/ya-webadb/backer/7/avatar.svg?requireActive=false"></a>
|
|
47
|
+
<a href="https://opencollective.com/ya-webadb/backer/8/website?requireActive=false" target="_blank"><img src="https://opencollective.com/ya-webadb/backer/8/avatar.svg?requireActive=false"></a>
|
|
48
|
+
<a href="https://opencollective.com/ya-webadb/backer/9/website?requireActive=false" target="_blank"><img src="https://opencollective.com/ya-webadb/backer/9/avatar.svg?requireActive=false"></a>
|
|
49
|
+
<a href="https://opencollective.com/ya-webadb/backer/10/website?requireActive=false" target="_blank"><img src="https://opencollective.com/ya-webadb/backer/10/avatar.svg?requireActive=false"></a>
|
package/esm/index.d.ts
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { AdbCredentialStore, AdbPrivateKey } from "@yume-chan/adb";
|
|
2
|
+
export default class AdbWebCredentialStore implements AdbCredentialStore {
|
|
3
|
+
#private;
|
|
4
|
+
constructor(appName?: string);
|
|
5
|
+
/**
|
|
6
|
+
* Generates a RSA private key and store it into LocalStorage.
|
|
7
|
+
*
|
|
8
|
+
* Calling this method multiple times will overwrite the previous key.
|
|
9
|
+
*
|
|
10
|
+
* @returns The private key in PKCS #8 format.
|
|
11
|
+
*/
|
|
12
|
+
generateKey(): Promise<AdbPrivateKey>;
|
|
13
|
+
/**
|
|
14
|
+
* Yields the stored RSA private key.
|
|
15
|
+
*
|
|
16
|
+
* This method returns a generator, so `for await...of...` loop should be used to read the key.
|
|
17
|
+
*/
|
|
18
|
+
iterateKeys(): AsyncGenerator<AdbPrivateKey, void, void>;
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,kBAAkB,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AA+DxE,MAAM,CAAC,OAAO,OAAO,qBAAsB,YAAW,kBAAkB;;gBAGxD,OAAO,SAAU;IAI7B;;;;;;OAMG;IACG,WAAW,IAAI,OAAO,CAAC,aAAa,CAAC;IAwB3C;;;;OAIG;IACI,WAAW,IAAI,cAAc,CAAC,aAAa,EAAE,IAAI,EAAE,IAAI,CAAC;CAQlE"}
|
package/esm/index.js
ADDED
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
// cspell: ignore RSASSA
|
|
2
|
+
function openDatabase() {
|
|
3
|
+
return new Promise((resolve, reject) => {
|
|
4
|
+
const request = indexedDB.open("Tango", 1);
|
|
5
|
+
request.onerror = () => {
|
|
6
|
+
reject(request.error);
|
|
7
|
+
};
|
|
8
|
+
request.onupgradeneeded = () => {
|
|
9
|
+
const db = request.result;
|
|
10
|
+
db.createObjectStore("Authentication", { autoIncrement: true });
|
|
11
|
+
};
|
|
12
|
+
request.onsuccess = () => {
|
|
13
|
+
const db = request.result;
|
|
14
|
+
resolve(db);
|
|
15
|
+
};
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
async function saveKey(key) {
|
|
19
|
+
const db = await openDatabase();
|
|
20
|
+
return new Promise((resolve, reject) => {
|
|
21
|
+
const transaction = db.transaction("Authentication", "readwrite");
|
|
22
|
+
const store = transaction.objectStore("Authentication");
|
|
23
|
+
const putRequest = store.add(key);
|
|
24
|
+
putRequest.onerror = () => {
|
|
25
|
+
reject(putRequest.error);
|
|
26
|
+
};
|
|
27
|
+
putRequest.onsuccess = () => {
|
|
28
|
+
resolve();
|
|
29
|
+
};
|
|
30
|
+
transaction.onerror = () => {
|
|
31
|
+
reject(transaction.error);
|
|
32
|
+
};
|
|
33
|
+
transaction.oncomplete = () => {
|
|
34
|
+
db.close();
|
|
35
|
+
};
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
async function getAllKeys() {
|
|
39
|
+
const db = await openDatabase();
|
|
40
|
+
return new Promise((resolve, reject) => {
|
|
41
|
+
const transaction = db.transaction("Authentication", "readonly");
|
|
42
|
+
const store = transaction.objectStore("Authentication");
|
|
43
|
+
const getRequest = store.getAll();
|
|
44
|
+
getRequest.onerror = () => {
|
|
45
|
+
reject(getRequest.error);
|
|
46
|
+
};
|
|
47
|
+
getRequest.onsuccess = () => {
|
|
48
|
+
resolve(getRequest.result);
|
|
49
|
+
};
|
|
50
|
+
transaction.onerror = () => {
|
|
51
|
+
reject(transaction.error);
|
|
52
|
+
};
|
|
53
|
+
transaction.oncomplete = () => {
|
|
54
|
+
db.close();
|
|
55
|
+
};
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
export default class AdbWebCredentialStore {
|
|
59
|
+
#appName;
|
|
60
|
+
constructor(appName = "Tango") {
|
|
61
|
+
this.#appName = appName;
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* Generates a RSA private key and store it into LocalStorage.
|
|
65
|
+
*
|
|
66
|
+
* Calling this method multiple times will overwrite the previous key.
|
|
67
|
+
*
|
|
68
|
+
* @returns The private key in PKCS #8 format.
|
|
69
|
+
*/
|
|
70
|
+
async generateKey() {
|
|
71
|
+
const { privateKey: cryptoKey } = await crypto.subtle.generateKey({
|
|
72
|
+
name: "RSASSA-PKCS1-v1_5",
|
|
73
|
+
modulusLength: 2048,
|
|
74
|
+
// 65537
|
|
75
|
+
publicExponent: new Uint8Array([0x01, 0x00, 0x01]),
|
|
76
|
+
hash: "SHA-1",
|
|
77
|
+
}, true, ["sign", "verify"]);
|
|
78
|
+
const privateKey = new Uint8Array(await crypto.subtle.exportKey("pkcs8", cryptoKey));
|
|
79
|
+
await saveKey(privateKey);
|
|
80
|
+
return {
|
|
81
|
+
buffer: privateKey,
|
|
82
|
+
name: `${this.#appName}@${globalThis.location.hostname}`,
|
|
83
|
+
};
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* Yields the stored RSA private key.
|
|
87
|
+
*
|
|
88
|
+
* This method returns a generator, so `for await...of...` loop should be used to read the key.
|
|
89
|
+
*/
|
|
90
|
+
async *iterateKeys() {
|
|
91
|
+
for (const key of await getAllKeys()) {
|
|
92
|
+
yield {
|
|
93
|
+
buffer: key,
|
|
94
|
+
name: `${this.#appName}@${globalThis.location.hostname}`,
|
|
95
|
+
};
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
//# sourceMappingURL=index.js.map
|
package/esm/index.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"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"}
|
package/package.json
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@yume-chan/adb-credential-web",
|
|
3
|
+
"version": "0.0.0-20240714132542",
|
|
4
|
+
"description": "Credential Store for `@yume-chan/adb` using WebCrypto and IndexedDB APIs.",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"adb"
|
|
7
|
+
],
|
|
8
|
+
"license": "MIT",
|
|
9
|
+
"author": {
|
|
10
|
+
"name": "Simon Chan",
|
|
11
|
+
"email": "cnsimonchan@live.com",
|
|
12
|
+
"url": "https://chensi.moe/blog"
|
|
13
|
+
},
|
|
14
|
+
"homepage": "https://github.com/yume-chan/ya-webadb/tree/main/libraries/adb-credential-web#readme",
|
|
15
|
+
"repository": {
|
|
16
|
+
"type": "git",
|
|
17
|
+
"url": "git+https://github.com/yume-chan/ya-webadb.git",
|
|
18
|
+
"directory": "libraries/adb-credential-web"
|
|
19
|
+
},
|
|
20
|
+
"bugs": {
|
|
21
|
+
"url": "https://github.com/yume-chan/ya-webadb/issues"
|
|
22
|
+
},
|
|
23
|
+
"type": "module",
|
|
24
|
+
"main": "esm/index.js",
|
|
25
|
+
"types": "esm/index.d.ts",
|
|
26
|
+
"sideEffects": false,
|
|
27
|
+
"dependencies": {
|
|
28
|
+
"@yume-chan/adb": "0.0.0-20240714132542"
|
|
29
|
+
},
|
|
30
|
+
"devDependencies": {
|
|
31
|
+
"@yume-chan/eslint-config": "^1.0.0",
|
|
32
|
+
"@yume-chan/tsconfig": "^1.0.0",
|
|
33
|
+
"prettier": "^3.3.3",
|
|
34
|
+
"typescript": "^5.5.3"
|
|
35
|
+
},
|
|
36
|
+
"scripts": {
|
|
37
|
+
"build": "tsc -b tsconfig.build.json",
|
|
38
|
+
"build:watch": "tsc -b tsconfig.build.json",
|
|
39
|
+
"lint": "run-eslint && prettier src/**/*.ts --write --tab-width 4"
|
|
40
|
+
}
|
|
41
|
+
}
|
package/src/index.ts
ADDED
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
// cspell: ignore RSASSA
|
|
2
|
+
|
|
3
|
+
import type { AdbCredentialStore, AdbPrivateKey } from "@yume-chan/adb";
|
|
4
|
+
|
|
5
|
+
function openDatabase() {
|
|
6
|
+
return new Promise<IDBDatabase>((resolve, reject) => {
|
|
7
|
+
const request = indexedDB.open("Tango", 1);
|
|
8
|
+
request.onerror = () => {
|
|
9
|
+
reject(request.error);
|
|
10
|
+
};
|
|
11
|
+
request.onupgradeneeded = () => {
|
|
12
|
+
const db = request.result;
|
|
13
|
+
db.createObjectStore("Authentication", { autoIncrement: true });
|
|
14
|
+
};
|
|
15
|
+
request.onsuccess = () => {
|
|
16
|
+
const db = request.result;
|
|
17
|
+
resolve(db);
|
|
18
|
+
};
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
async function saveKey(key: Uint8Array): Promise<void> {
|
|
23
|
+
const db = await openDatabase();
|
|
24
|
+
|
|
25
|
+
return new Promise((resolve, reject) => {
|
|
26
|
+
const transaction = db.transaction("Authentication", "readwrite");
|
|
27
|
+
const store = transaction.objectStore("Authentication");
|
|
28
|
+
const putRequest = store.add(key);
|
|
29
|
+
putRequest.onerror = () => {
|
|
30
|
+
reject(putRequest.error);
|
|
31
|
+
};
|
|
32
|
+
putRequest.onsuccess = () => {
|
|
33
|
+
resolve();
|
|
34
|
+
};
|
|
35
|
+
transaction.onerror = () => {
|
|
36
|
+
reject(transaction.error);
|
|
37
|
+
};
|
|
38
|
+
transaction.oncomplete = () => {
|
|
39
|
+
db.close();
|
|
40
|
+
};
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
async function getAllKeys() {
|
|
45
|
+
const db = await openDatabase();
|
|
46
|
+
|
|
47
|
+
return new Promise<Uint8Array[]>((resolve, reject) => {
|
|
48
|
+
const transaction = db.transaction("Authentication", "readonly");
|
|
49
|
+
const store = transaction.objectStore("Authentication");
|
|
50
|
+
const getRequest = store.getAll();
|
|
51
|
+
getRequest.onerror = () => {
|
|
52
|
+
reject(getRequest.error);
|
|
53
|
+
};
|
|
54
|
+
getRequest.onsuccess = () => {
|
|
55
|
+
resolve(getRequest.result as Uint8Array[]);
|
|
56
|
+
};
|
|
57
|
+
transaction.onerror = () => {
|
|
58
|
+
reject(transaction.error);
|
|
59
|
+
};
|
|
60
|
+
transaction.oncomplete = () => {
|
|
61
|
+
db.close();
|
|
62
|
+
};
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
export default class AdbWebCredentialStore implements AdbCredentialStore {
|
|
67
|
+
#appName: string;
|
|
68
|
+
|
|
69
|
+
constructor(appName = "Tango") {
|
|
70
|
+
this.#appName = appName;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* Generates a RSA private key and store it into LocalStorage.
|
|
75
|
+
*
|
|
76
|
+
* Calling this method multiple times will overwrite the previous key.
|
|
77
|
+
*
|
|
78
|
+
* @returns The private key in PKCS #8 format.
|
|
79
|
+
*/
|
|
80
|
+
async generateKey(): Promise<AdbPrivateKey> {
|
|
81
|
+
const { privateKey: cryptoKey } = await crypto.subtle.generateKey(
|
|
82
|
+
{
|
|
83
|
+
name: "RSASSA-PKCS1-v1_5",
|
|
84
|
+
modulusLength: 2048,
|
|
85
|
+
// 65537
|
|
86
|
+
publicExponent: new Uint8Array([0x01, 0x00, 0x01]),
|
|
87
|
+
hash: "SHA-1",
|
|
88
|
+
},
|
|
89
|
+
true,
|
|
90
|
+
["sign", "verify"],
|
|
91
|
+
);
|
|
92
|
+
|
|
93
|
+
const privateKey = new Uint8Array(
|
|
94
|
+
await crypto.subtle.exportKey("pkcs8", cryptoKey),
|
|
95
|
+
);
|
|
96
|
+
await saveKey(privateKey);
|
|
97
|
+
|
|
98
|
+
return {
|
|
99
|
+
buffer: privateKey,
|
|
100
|
+
name: `${this.#appName}@${globalThis.location.hostname}`,
|
|
101
|
+
};
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
/**
|
|
105
|
+
* Yields the stored RSA private key.
|
|
106
|
+
*
|
|
107
|
+
* This method returns a generator, so `for await...of...` loop should be used to read the key.
|
|
108
|
+
*/
|
|
109
|
+
async *iterateKeys(): AsyncGenerator<AdbPrivateKey, void, void> {
|
|
110
|
+
for (const key of await getAllKeys()) {
|
|
111
|
+
yield {
|
|
112
|
+
buffer: key,
|
|
113
|
+
name: `${this.#appName}@${globalThis.location.hostname}`,
|
|
114
|
+
};
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"program":{"fileNames":["../../node_modules/.pnpm/typescript@5.5.3/node_modules/typescript/lib/lib.es5.d.ts","../../node_modules/.pnpm/typescript@5.5.3/node_modules/typescript/lib/lib.es2015.d.ts","../../node_modules/.pnpm/typescript@5.5.3/node_modules/typescript/lib/lib.es2016.d.ts","../../node_modules/.pnpm/typescript@5.5.3/node_modules/typescript/lib/lib.es2017.d.ts","../../node_modules/.pnpm/typescript@5.5.3/node_modules/typescript/lib/lib.es2018.d.ts","../../node_modules/.pnpm/typescript@5.5.3/node_modules/typescript/lib/lib.es2019.d.ts","../../node_modules/.pnpm/typescript@5.5.3/node_modules/typescript/lib/lib.es2020.d.ts","../../node_modules/.pnpm/typescript@5.5.3/node_modules/typescript/lib/lib.es2021.d.ts","../../node_modules/.pnpm/typescript@5.5.3/node_modules/typescript/lib/lib.es2022.d.ts","../../node_modules/.pnpm/typescript@5.5.3/node_modules/typescript/lib/lib.es2023.d.ts","../../node_modules/.pnpm/typescript@5.5.3/node_modules/typescript/lib/lib.esnext.d.ts","../../node_modules/.pnpm/typescript@5.5.3/node_modules/typescript/lib/lib.dom.d.ts","../../node_modules/.pnpm/typescript@5.5.3/node_modules/typescript/lib/lib.es2015.core.d.ts","../../node_modules/.pnpm/typescript@5.5.3/node_modules/typescript/lib/lib.es2015.collection.d.ts","../../node_modules/.pnpm/typescript@5.5.3/node_modules/typescript/lib/lib.es2015.generator.d.ts","../../node_modules/.pnpm/typescript@5.5.3/node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../node_modules/.pnpm/typescript@5.5.3/node_modules/typescript/lib/lib.es2015.promise.d.ts","../../node_modules/.pnpm/typescript@5.5.3/node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../node_modules/.pnpm/typescript@5.5.3/node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../node_modules/.pnpm/typescript@5.5.3/node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../node_modules/.pnpm/typescript@5.5.3/node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../node_modules/.pnpm/typescript@5.5.3/node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../node_modules/.pnpm/typescript@5.5.3/node_modules/typescript/lib/lib.es2016.intl.d.ts","../../node_modules/.pnpm/typescript@5.5.3/node_modules/typescript/lib/lib.es2017.date.d.ts","../../node_modules/.pnpm/typescript@5.5.3/node_modules/typescript/lib/lib.es2017.object.d.ts","../../node_modules/.pnpm/typescript@5.5.3/node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../node_modules/.pnpm/typescript@5.5.3/node_modules/typescript/lib/lib.es2017.string.d.ts","../../node_modules/.pnpm/typescript@5.5.3/node_modules/typescript/lib/lib.es2017.intl.d.ts","../../node_modules/.pnpm/typescript@5.5.3/node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../node_modules/.pnpm/typescript@5.5.3/node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../node_modules/.pnpm/typescript@5.5.3/node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../node_modules/.pnpm/typescript@5.5.3/node_modules/typescript/lib/lib.es2018.intl.d.ts","../../node_modules/.pnpm/typescript@5.5.3/node_modules/typescript/lib/lib.es2018.promise.d.ts","../../node_modules/.pnpm/typescript@5.5.3/node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../node_modules/.pnpm/typescript@5.5.3/node_modules/typescript/lib/lib.es2019.array.d.ts","../../node_modules/.pnpm/typescript@5.5.3/node_modules/typescript/lib/lib.es2019.object.d.ts","../../node_modules/.pnpm/typescript@5.5.3/node_modules/typescript/lib/lib.es2019.string.d.ts","../../node_modules/.pnpm/typescript@5.5.3/node_modules/typescript/lib/lib.es2019.symbol.d.ts","../../node_modules/.pnpm/typescript@5.5.3/node_modules/typescript/lib/lib.es2019.intl.d.ts","../../node_modules/.pnpm/typescript@5.5.3/node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../node_modules/.pnpm/typescript@5.5.3/node_modules/typescript/lib/lib.es2020.date.d.ts","../../node_modules/.pnpm/typescript@5.5.3/node_modules/typescript/lib/lib.es2020.promise.d.ts","../../node_modules/.pnpm/typescript@5.5.3/node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../../node_modules/.pnpm/typescript@5.5.3/node_modules/typescript/lib/lib.es2020.string.d.ts","../../node_modules/.pnpm/typescript@5.5.3/node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../../node_modules/.pnpm/typescript@5.5.3/node_modules/typescript/lib/lib.es2020.intl.d.ts","../../node_modules/.pnpm/typescript@5.5.3/node_modules/typescript/lib/lib.es2020.number.d.ts","../../node_modules/.pnpm/typescript@5.5.3/node_modules/typescript/lib/lib.es2021.promise.d.ts","../../node_modules/.pnpm/typescript@5.5.3/node_modules/typescript/lib/lib.es2021.string.d.ts","../../node_modules/.pnpm/typescript@5.5.3/node_modules/typescript/lib/lib.es2021.weakref.d.ts","../../node_modules/.pnpm/typescript@5.5.3/node_modules/typescript/lib/lib.es2021.intl.d.ts","../../node_modules/.pnpm/typescript@5.5.3/node_modules/typescript/lib/lib.es2022.array.d.ts","../../node_modules/.pnpm/typescript@5.5.3/node_modules/typescript/lib/lib.es2022.error.d.ts","../../node_modules/.pnpm/typescript@5.5.3/node_modules/typescript/lib/lib.es2022.intl.d.ts","../../node_modules/.pnpm/typescript@5.5.3/node_modules/typescript/lib/lib.es2022.object.d.ts","../../node_modules/.pnpm/typescript@5.5.3/node_modules/typescript/lib/lib.es2022.sharedmemory.d.ts","../../node_modules/.pnpm/typescript@5.5.3/node_modules/typescript/lib/lib.es2022.string.d.ts","../../node_modules/.pnpm/typescript@5.5.3/node_modules/typescript/lib/lib.es2022.regexp.d.ts","../../node_modules/.pnpm/typescript@5.5.3/node_modules/typescript/lib/lib.es2023.array.d.ts","../../node_modules/.pnpm/typescript@5.5.3/node_modules/typescript/lib/lib.es2023.collection.d.ts","../../node_modules/.pnpm/typescript@5.5.3/node_modules/typescript/lib/lib.es2023.intl.d.ts","../../node_modules/.pnpm/typescript@5.5.3/node_modules/typescript/lib/lib.esnext.array.d.ts","../../node_modules/.pnpm/typescript@5.5.3/node_modules/typescript/lib/lib.esnext.collection.d.ts","../../node_modules/.pnpm/typescript@5.5.3/node_modules/typescript/lib/lib.esnext.intl.d.ts","../../node_modules/.pnpm/typescript@5.5.3/node_modules/typescript/lib/lib.esnext.disposable.d.ts","../../node_modules/.pnpm/typescript@5.5.3/node_modules/typescript/lib/lib.esnext.string.d.ts","../../node_modules/.pnpm/typescript@5.5.3/node_modules/typescript/lib/lib.esnext.promise.d.ts","../../node_modules/.pnpm/typescript@5.5.3/node_modules/typescript/lib/lib.esnext.decorators.d.ts","../../node_modules/.pnpm/typescript@5.5.3/node_modules/typescript/lib/lib.esnext.object.d.ts","../../node_modules/.pnpm/typescript@5.5.3/node_modules/typescript/lib/lib.esnext.regexp.d.ts","../../node_modules/.pnpm/typescript@5.5.3/node_modules/typescript/lib/lib.decorators.d.ts","../../node_modules/.pnpm/typescript@5.5.3/node_modules/typescript/lib/lib.decorators.legacy.d.ts","../struct/esm/basic/options.d.ts","../struct/esm/basic/struct-value.d.ts","../struct/esm/basic/field-value.d.ts","../struct/esm/utils.d.ts","../struct/esm/basic/stream.d.ts","../struct/esm/basic/definition.d.ts","../struct/esm/basic/index.d.ts","../struct/esm/types/bigint.d.ts","../struct/esm/types/buffer/base.d.ts","../struct/esm/types/buffer/fixed-length.d.ts","../struct/esm/types/buffer/variable-length.d.ts","../struct/esm/types/buffer/index.d.ts","../struct/esm/types/number.d.ts","../struct/esm/types/index.d.ts","../struct/esm/struct.d.ts","../struct/esm/sync-promise.d.ts","../struct/esm/index.d.ts","../stream-extra/esm/types.d.ts","../stream-extra/esm/stream.d.ts","../stream-extra/esm/buffered.d.ts","../stream-extra/esm/buffered-transform.d.ts","../stream-extra/esm/concat.d.ts","../stream-extra/esm/consumable.d.ts","../stream-extra/esm/maybe-consumable.d.ts","../stream-extra/esm/distribution.d.ts","../stream-extra/esm/wrap-readable.d.ts","../stream-extra/esm/duplex.d.ts","../stream-extra/esm/encoding.d.ts","../stream-extra/esm/inspect.d.ts","../stream-extra/esm/pipe-from.d.ts","../stream-extra/esm/push-readable.d.ts","../stream-extra/esm/split-string.d.ts","../stream-extra/esm/struct-deserialize.d.ts","../stream-extra/esm/struct-serialize.d.ts","../stream-extra/esm/task.d.ts","../stream-extra/esm/wrap-writable.d.ts","../stream-extra/esm/index.d.ts","../adb/esm/features.d.ts","../adb/esm/banner.d.ts","../event/esm/disposable.d.ts","../event/esm/event.d.ts","../event/esm/event-emitter.d.ts","../event/esm/utils.d.ts","../event/esm/index.d.ts","../adb/esm/commands/base.d.ts","../adb/esm/commands/framebuffer.d.ts","../adb/esm/commands/power.d.ts","../adb/esm/commands/reverse.d.ts","../adb/esm/commands/subprocess/protocols/types.d.ts","../adb/esm/commands/subprocess/protocols/none.d.ts","../adb/esm/commands/subprocess/protocols/shell.d.ts","../adb/esm/commands/subprocess/protocols/index.d.ts","../adb/esm/commands/subprocess/command.d.ts","../adb/esm/commands/subprocess/utils.d.ts","../adb/esm/commands/subprocess/index.d.ts","../adb/esm/utils/auto-reset-event.d.ts","../adb/esm/utils/base64.d.ts","../adb/esm/utils/hex.d.ts","../adb/esm/utils/no-op.d.ts","../adb/esm/utils/sequence-equal.d.ts","../adb/esm/utils/index.d.ts","../adb/esm/commands/sync/socket.d.ts","../adb/esm/commands/sync/stat.d.ts","../adb/esm/commands/sync/list.d.ts","../adb/esm/commands/sync/pull.d.ts","../adb/esm/commands/sync/push.d.ts","../adb/esm/commands/sync/request.d.ts","../adb/esm/commands/sync/response.d.ts","../adb/esm/commands/sync/sync.d.ts","../adb/esm/commands/sync/index.d.ts","../adb/esm/commands/tcpip.d.ts","../adb/esm/commands/index.d.ts","../adb/esm/adb.d.ts","../adb/esm/daemon/packet.d.ts","../adb/esm/daemon/auth.d.ts","../adb/esm/daemon/crypto.d.ts","../adb/esm/daemon/device.d.ts","../adb/esm/daemon/dispatcher.d.ts","../adb/esm/daemon/socket.d.ts","../adb/esm/daemon/transport.d.ts","../adb/esm/daemon/index.d.ts","../adb/esm/server/transport.d.ts","../adb/esm/server/client.d.ts","../adb/esm/server/index.d.ts","../adb/esm/index.d.ts","./src/index.ts"],"fileInfos":[{"version":"44e584d4f6444f58791784f1d530875970993129442a847597db702a073ca68c","affectsGlobalScope":true,"impliedFormat":1},{"version":"45b7ab580deca34ae9729e97c13cfd999df04416a79116c3bfb483804f85ded4","impliedFormat":1},{"version":"3facaf05f0c5fc569c5649dd359892c98a85557e3e0c847964caeb67076f4d75","impliedFormat":1},{"version":"9a68c0c07ae2fa71b44384a839b7b8d81662a236d4b9ac30916718f7510b1b2d","impliedFormat":1},{"version":"5e1c4c362065a6b95ff952c0eab010f04dcd2c3494e813b493ecfd4fcb9fc0d8","impliedFormat":1},{"version":"68d73b4a11549f9c0b7d352d10e91e5dca8faa3322bfb77b661839c42b1ddec7","impliedFormat":1},{"version":"5efce4fc3c29ea84e8928f97adec086e3dc876365e0982cc8479a07954a3efd4","impliedFormat":1},{"version":"feecb1be483ed332fad555aff858affd90a48ab19ba7272ee084704eb7167569","impliedFormat":1},{"version":"5514e54f17d6d74ecefedc73c504eadffdeda79c7ea205cf9febead32d45c4bc","impliedFormat":1},{"version":"27bdc30a0e32783366a5abeda841bc22757c1797de8681bbe81fbc735eeb1c10","impliedFormat":1},{"version":"17edc026abf73c5c2dd508652d63f68ec4efd9d4856e3469890d27598209feb5","impliedFormat":1},{"version":"4af6b0c727b7a2896463d512fafd23634229adf69ac7c00e2ae15a09cb084fad","affectsGlobalScope":true,"impliedFormat":1},{"version":"6920e1448680767498a0b77c6a00a8e77d14d62c3da8967b171f1ddffa3c18e4","affectsGlobalScope":true,"impliedFormat":1},{"version":"dc2df20b1bcdc8c2d34af4926e2c3ab15ffe1160a63e58b7e09833f616efff44","affectsGlobalScope":true,"impliedFormat":1},{"version":"4443e68b35f3332f753eacc66a04ac1d2053b8b035a0e0ac1d455392b5e243b3","affectsGlobalScope":true,"impliedFormat":1},{"version":"bc47685641087c015972a3f072480889f0d6c65515f12bd85222f49a98952ed7","affectsGlobalScope":true,"impliedFormat":1},{"version":"0dc1e7ceda9b8b9b455c3a2d67b0412feab00bd2f66656cd8850e8831b08b537","affectsGlobalScope":true,"impliedFormat":1},{"version":"ce691fb9e5c64efb9547083e4a34091bcbe5bdb41027e310ebba8f7d96a98671","affectsGlobalScope":true,"impliedFormat":1},{"version":"8d697a2a929a5fcb38b7a65594020fcef05ec1630804a33748829c5ff53640d0","affectsGlobalScope":true,"impliedFormat":1},{"version":"4ff2a353abf8a80ee399af572debb8faab2d33ad38c4b4474cff7f26e7653b8d","affectsGlobalScope":true,"impliedFormat":1},{"version":"93495ff27b8746f55d19fcbcdbaccc99fd95f19d057aed1bd2c0cafe1335fbf0","affectsGlobalScope":true,"impliedFormat":1},{"version":"6fc23bb8c3965964be8c597310a2878b53a0306edb71d4b5a4dfe760186bcc01","affectsGlobalScope":true,"impliedFormat":1},{"version":"ea011c76963fb15ef1cdd7ce6a6808b46322c527de2077b6cfdf23ae6f5f9ec7","affectsGlobalScope":true,"impliedFormat":1},{"version":"38f0219c9e23c915ef9790ab1d680440d95419ad264816fa15009a8851e79119","affectsGlobalScope":true,"impliedFormat":1},{"version":"bb42a7797d996412ecdc5b2787720de477103a0b2e53058569069a0e2bae6c7e","affectsGlobalScope":true,"impliedFormat":1},{"version":"4738f2420687fd85629c9efb470793bb753709c2379e5f85bc1815d875ceadcd","affectsGlobalScope":true,"impliedFormat":1},{"version":"2f11ff796926e0832f9ae148008138ad583bd181899ab7dd768a2666700b1893","affectsGlobalScope":true,"impliedFormat":1},{"version":"4de680d5bb41c17f7f68e0419412ca23c98d5749dcaaea1896172f06435891fc","affectsGlobalScope":true,"impliedFormat":1},{"version":"9fc46429fbe091ac5ad2608c657201eb68b6f1b8341bd6d670047d32ed0a88fa","affectsGlobalScope":true,"impliedFormat":1},{"version":"61c37c1de663cf4171e1192466e52c7a382afa58da01b1dc75058f032ddf0839","affectsGlobalScope":true,"impliedFormat":1},{"version":"b541a838a13f9234aba650a825393ffc2292dc0fc87681a5d81ef0c96d281e7a","affectsGlobalScope":true,"impliedFormat":1},{"version":"9e9fbd7030c440b33d021da145d3232984c8bb7916f277e8ffd3dc2e3eae2bdb","affectsGlobalScope":true,"impliedFormat":1},{"version":"811ec78f7fefcabbda4bfa93b3eb67d9ae166ef95f9bff989d964061cbf81a0c","affectsGlobalScope":true,"impliedFormat":1},{"version":"717937616a17072082152a2ef351cb51f98802fb4b2fdabd32399843875974ca","affectsGlobalScope":true,"impliedFormat":1},{"version":"d7e7d9b7b50e5f22c915b525acc5a49a7a6584cf8f62d0569e557c5cfc4b2ac2","affectsGlobalScope":true,"impliedFormat":1},{"version":"71c37f4c9543f31dfced6c7840e068c5a5aacb7b89111a4364b1d5276b852557","affectsGlobalScope":true,"impliedFormat":1},{"version":"576711e016cf4f1804676043e6a0a5414252560eb57de9faceee34d79798c850","affectsGlobalScope":true,"impliedFormat":1},{"version":"89c1b1281ba7b8a96efc676b11b264de7a8374c5ea1e6617f11880a13fc56dc6","affectsGlobalScope":true,"impliedFormat":1},{"version":"74f7fa2d027d5b33eb0471c8e82a6c87216223181ec31247c357a3e8e2fddc5b","affectsGlobalScope":true,"impliedFormat":1},{"version":"ae37d6ccd1560b0203ab88d46987393adaaa78c919e51acf32fb82c86502e98c","affectsGlobalScope":true,"impliedFormat":1},{"version":"063600664504610fe3e99b717a1223f8b1900087fab0b4cad1496a114744f8df","affectsGlobalScope":true,"impliedFormat":1},{"version":"934019d7e3c81950f9a8426d093458b65d5aff2c7c1511233c0fd5b941e608ab","affectsGlobalScope":true,"impliedFormat":1},{"version":"bf14a426dbbf1022d11bd08d6b8e709a2e9d246f0c6c1032f3b2edb9a902adbe","affectsGlobalScope":true,"impliedFormat":1},{"version":"5e07ed3809d48205d5b985642a59f2eba47c402374a7cf8006b686f79efadcbd","affectsGlobalScope":true,"impliedFormat":1},{"version":"2b72d528b2e2fe3c57889ca7baef5e13a56c957b946906d03767c642f386bbc3","affectsGlobalScope":true,"impliedFormat":1},{"version":"479553e3779be7d4f68e9f40cdb82d038e5ef7592010100410723ceced22a0f7","affectsGlobalScope":true,"impliedFormat":1},{"version":"368af93f74c9c932edd84c58883e736c9e3d53cec1fe24c0b0ff451f529ceab1","affectsGlobalScope":true,"impliedFormat":1},{"version":"af3dd424cf267428f30ccfc376f47a2c0114546b55c44d8c0f1d57d841e28d74","affectsGlobalScope":true,"impliedFormat":1},{"version":"995c005ab91a498455ea8dfb63aa9f83fa2ea793c3d8aa344be4a1678d06d399","affectsGlobalScope":true,"impliedFormat":1},{"version":"d3d7b04b45033f57351c8434f60b6be1ea71a2dfec2d0a0c3c83badbb0e3e693","affectsGlobalScope":true,"impliedFormat":1},{"version":"956d27abdea9652e8368ce029bb1e0b9174e9678a273529f426df4b3d90abd60","affectsGlobalScope":true,"impliedFormat":1},{"version":"4fa6ed14e98aa80b91f61b9805c653ee82af3502dc21c9da5268d3857772ca05","affectsGlobalScope":true,"impliedFormat":1},{"version":"e6633e05da3ff36e6da2ec170d0d03ccf33de50ca4dc6f5aeecb572cedd162fb","affectsGlobalScope":true,"impliedFormat":1},{"version":"d8670852241d4c6e03f2b89d67497a4bbefe29ecaa5a444e2c11a9b05e6fccc6","affectsGlobalScope":true,"impliedFormat":1},{"version":"8444af78980e3b20b49324f4a16ba35024fef3ee069a0eb67616ea6ca821c47a","affectsGlobalScope":true,"impliedFormat":1},{"version":"caccc56c72713969e1cfe5c3d44e5bab151544d9d2b373d7dbe5a1e4166652be","affectsGlobalScope":true,"impliedFormat":1},{"version":"3287d9d085fbd618c3971944b65b4be57859f5415f495b33a6adc994edd2f004","affectsGlobalScope":true,"impliedFormat":1},{"version":"b4b67b1a91182421f5df999988c690f14d813b9850b40acd06ed44691f6727ad","affectsGlobalScope":true,"impliedFormat":1},{"version":"08a58483392df5fcc1db57d782e87734f77ae9eab42516028acbfe46f29a3ef7","affectsGlobalScope":true,"impliedFormat":1},{"version":"436aaf437562f276ec2ddbee2f2cdedac7664c1e4c1d2c36839ddd582eeb3d0a","affectsGlobalScope":true,"impliedFormat":1},{"version":"8e3c06ea092138bf9fa5e874a1fdbc9d54805d074bee1de31b99a11e2fec239d","affectsGlobalScope":true,"impliedFormat":1},{"version":"0b11f3ca66aa33124202c80b70cd203219c3d4460cfc165e0707aa9ec710fc53","affectsGlobalScope":true,"impliedFormat":1},{"version":"6a3f5a0129cc80cf439ab71164334d649b47059a4f5afca90282362407d0c87f","affectsGlobalScope":true,"impliedFormat":1},{"version":"811c71eee4aa0ac5f7adf713323a5c41b0cf6c4e17367a34fbce379e12bbf0a4","affectsGlobalScope":true,"impliedFormat":1},{"version":"15b98a533864d324e5f57cd3cfc0579b231df58c1c0f6063ea0fcb13c3c74ff9","affectsGlobalScope":true,"impliedFormat":1},{"version":"0a6282c8827e4b9a95f4bf4f5c205673ada31b982f50572d27103df8ceb8013c","affectsGlobalScope":true,"impliedFormat":1},{"version":"ac77cb3e8c6d3565793eb90a8373ee8033146315a3dbead3bde8db5eaf5e5ec6","affectsGlobalScope":true,"impliedFormat":1},{"version":"d4b1d2c51d058fc21ec2629fff7a76249dec2e36e12960ea056e3ef89174080f","affectsGlobalScope":true,"impliedFormat":1},{"version":"2fef54945a13095fdb9b84f705f2b5994597640c46afeb2ce78352fab4cb3279","affectsGlobalScope":true,"impliedFormat":1},{"version":"56e4ed5aab5f5920980066a9409bfaf53e6d21d3f8d020c17e4de584d29600ad","affectsGlobalScope":true,"impliedFormat":1},{"version":"33358442698bb565130f52ba79bfd3d4d484ac85fe33f3cb1759c54d18201393","affectsGlobalScope":true,"impliedFormat":1},{"version":"782dec38049b92d4e85c1585fbea5474a219c6984a35b004963b00beb1aab538","affectsGlobalScope":true,"impliedFormat":1},{"version":"7ceac7d7800ef7065908464aba0a009e9a03ff95f177a44f999687bdf10d039f","impliedFormat":99},{"version":"6ed3421533e611f8542c17c128c32a26031cbedcd9b1e7c6c42c3a143982a99d","impliedFormat":99},{"version":"bd9cdd3ad0e61ff8a31bcbc38997fa68ec3f5f816727e299328bb3c99ef1304a","impliedFormat":99},{"version":"a740a1e2d889fc4344fbb49a7f8b02ee664850be5cdcf029ace8ceb4316623db","impliedFormat":99},{"version":"ffe3c0472cf0ad60edbf5037319135c645bd92e7acbf403d72101df3598258e0","impliedFormat":99},{"version":"64ebe41006e87ea8b5e9b3acf048018b5226c4b08c6575526a76f6801143bf90","impliedFormat":99},{"version":"5af3b8b1a9063e033fc1e32a3e95956f5f5e22548d5ccca628b1ab87e42087d1","impliedFormat":99},{"version":"3ac6ab1e74d8e16fc4ff4e0e6e6f04704f437a63a4604bc4179995d62f0bd764","impliedFormat":99},{"version":"01f77e142f3658666e7854140b20378d371762ea3272f19178c4e09c333d369f","impliedFormat":99},{"version":"e826cfae98dca09c23ae2a696a46c5e4382e0e610aae292d0b5e2283f049e90e","impliedFormat":99},{"version":"b83be4742f1a4ad499c55c23728723cf2d3f300daf0aa55159b1a0c578a80b36","impliedFormat":99},{"version":"5ea1325a998e722fffc89ff8c2d00eaf35e491f3fada16fb56c6360f63d16d79","impliedFormat":99},{"version":"10562a4947e441650dab502f7d4185b19a4fff5de6d75968060027efcc461372","impliedFormat":99},{"version":"e24d67437856c921a9a40f7fbac38ac576439e6616eb698fb769279ecbc7802a","impliedFormat":99},{"version":"d4fc56eec997d208dc6ed364a5640ac789a655c090322c00e8bb934d4863ef6b","impliedFormat":99},{"version":"1efeb47776a2e05521198493d35496d8034543ac1721d4881a5588f9c8346668","impliedFormat":99},{"version":"01056fd3092681e2f1c0cb0e1fec91ac081b5bb758551494fca1c1d27f06c2b4","affectsGlobalScope":true,"impliedFormat":99},{"version":"1745b892ed69e2698009450f90986116c0f806c15aa63ea0a2fbea61106f9ed0","impliedFormat":99},{"version":"61c1f41743dbb7959987a16d8a1a00e57b90065dba0b84635abe5580e9e44e6d","impliedFormat":99},{"version":"d189c9a6203dd8c814cbabb78ee77ec7f806a8c4f92c4029e8c84cf4d3b69013","impliedFormat":99},{"version":"7e9aecc83330a5c15b10f8995dfce2e1004f9bbdd0c4a9df18e8483facd76703","impliedFormat":99},{"version":"256ac5c01fbbd7f17ec5d916b2cf1c4639cef6d5ac2161c82849db6cdc8d0c42","impliedFormat":99},{"version":"0ba77fc8dd62280956264b9baefdf4ceacca3bcebca2becc8bc4ac41c18c7c90","impliedFormat":99},{"version":"b6d2bfb90337bf55e847179e55a7fb6d398c42df992aa43dfb5020a4c4651fa5","impliedFormat":99},{"version":"afe4250b9645928151991fd60790a92571d9251b60be91032152b472d6830ebf","impliedFormat":99},{"version":"17044e5e7e129f8374daa67588cfb05367a511523f62d55ac215f86ed31b7bd5","impliedFormat":99},{"version":"2089a59a5359a6e33ab03808a1f2eb66169a8854d31c165e5586a0c9e83a008c","impliedFormat":99},{"version":"d24fed323d65a8d753ff2d0ea105f5d0788a50b585c1a1334d9bd336b2f378c7","impliedFormat":99},{"version":"4ebc57d20caf062019a2b8c9ce1e54602a411022eb4f7fa325888b9bcf63693a","impliedFormat":99},{"version":"52279f70738da349b60a09be1294e3295c7e37189c10deb083ed6b5eb1c86744","impliedFormat":99},{"version":"6fa6950e14d6ca719a29c3ad2fb79d2b03a175af9e3441b3e762cf3b22c92d2b","impliedFormat":99},{"version":"98678d6ac29dfa3f80452de2a87f464dee4908476f817d6f5e0677802ad43f7b","impliedFormat":99},{"version":"be2556062b9bb578c9596037387d3ebbd738009f0b092031caad3c5a54c920af","impliedFormat":99},{"version":"29be431938e3fba1faf2c6a9d0bd0d44a11c62fc4961f56bd476f19afda75ab9","impliedFormat":99},{"version":"560a9f24b6bcfc74fc2a18f6e8355aff169d15541c6ebd0ff7e05bdaad2f8949","impliedFormat":99},{"version":"f36862ddf4c1d6dc6c2638baa6fa84ba196b0642b765e6af0163a4d688b6676d","impliedFormat":99},{"version":"8c203173f8b0e941c5957ee8b77ee3a3cafbf82051cb086a9c2b002236d27c8b","impliedFormat":99},{"version":"bee00cb700692ea3f9c1b08e2c8377b71f76c4d9f35f8a403ccde46104d02913","impliedFormat":99},{"version":"48b65aae077c0a25bef9982871b488aebd4161768ee8bb88b9cc0d4736e15644","impliedFormat":99},{"version":"207ecf493b69ddca525bbbd8f1d120d99d00be1448ae8c0e690526f24dc182ca","impliedFormat":99},{"version":"af6ac8a19dbd05c34feff97d0eae81194fd0be1358bd2366478e9a574492d332","impliedFormat":99},{"version":"a21c587d34edbe9808b8f4fac207d190f802687b477ef55ee0f494d79a427f31","impliedFormat":99},{"version":"f00b8fc0c970cfd54d4df6047aae216bce4d7a2ceb6610655541a678ac54c57a","impliedFormat":99},{"version":"11fd6a023d60896a902933f64a2c8363102e5276838dbe29aa02a24c2e69fbd1","impliedFormat":99},{"version":"d5664fad55c16b09f4fbda92412a3c0d99c5e143434a5a82dc0f86d0823014ae","impliedFormat":99},{"version":"70bbf11b35b311b2d94d5138807a91cfc88cd18f9502cc1ae5267ee86372d332","impliedFormat":99},{"version":"18d3ba92c8cd5b0dc0413aa76efde4892c1095c865a6590560f4e30679a31afb","impliedFormat":99},{"version":"22a65c300fb8989d8c282e949c1219ba70ec4a7542136629d75072b0c191539f","impliedFormat":99},{"version":"400acc3e74ac10017e089417f65884c2e14980d847b774a6de333b9b28ad84f9","impliedFormat":99},{"version":"b0d0bcb161a05bbd651ce24cee5bb80967c1006b3fb1f6f6ef884b4adf4487be","impliedFormat":99},{"version":"59f9c661750d4b1b8ccea89fa207628ab8dced2be0e5859ed9354c03dc955fcf","impliedFormat":99},{"version":"721313e1405531faa6e144e78ad3561023150692fbbcc23a4db9c2bda7e2b292","impliedFormat":99},{"version":"aa47cec7289f9c0181d51f2d867f4d5b230715b2433eea83d40e9865b8576de3","impliedFormat":99},{"version":"3651947da5192aa0655f8a24ca016b3fb0a65bf24950cf52176d8972c7c32785","impliedFormat":99},{"version":"98da7969aa8079a6625791fdb0806f2cb125ae398bccd84e8cb8a76c454aac93","impliedFormat":99},{"version":"40471ac4c2b6056bdc7ee09f1f279345d8fcc40b8b326eac38cff2df37ece97a","impliedFormat":99},{"version":"c82303f9ddeb0df5c2853ba02e9f1603ad0f01200225e6ee4cb2da53757243c0","impliedFormat":99},{"version":"6ca4db25e7bb76bda633a36d700bf10a07535a80df1870c375c8469c820448fc","impliedFormat":99},{"version":"6bfed074c652e8043dfc926842ebc05f81db6c0c45b521e4bedc9dd8998df736","impliedFormat":99},{"version":"21f936f4e0645998eb943a0b51ae386fb8c30dc5c2ec3af0202783eb6bc454ff","impliedFormat":99},{"version":"d755a4f3ee9d11af759ccadccaf157449507a2856ffd8640925bea2c2894c207","impliedFormat":99},{"version":"a16fa6176715ba43447fc8cff926248461ae7f018d7507271052bf5030289f7f","impliedFormat":99},{"version":"fc9650510dec68d7fb32f468c5953b952cf4dfbaa9281aefd6b43329d92ffe8d","impliedFormat":99},{"version":"0a193bd47c3bdc3c089e5f6f159d4c55456d691cf4d33852e090dfa45ba16829","impliedFormat":99},{"version":"19ccc6afee78f2ba2af419f518608ffc37d47ba393815e9508f27447ee0ee838","impliedFormat":99},{"version":"2d8b2cdd6607bd3bcc5e1d4337a43f9e1f3e4624e7f4d9946ba42be84b139660","impliedFormat":99},{"version":"0695fc7eafd3a931405bd0d019c0fa32a134486b267d69ded53df751bf86a9ba","impliedFormat":99},{"version":"76e6020b2dba4c90a83cc01dd056b34ecbccf6951f9d94c7067a14e1057f60f0","impliedFormat":99},{"version":"c44c86c7907cdb11e3b0ec306b4a82197c5d557117da9a4c1a3a33b0c854092b","impliedFormat":99},{"version":"eb90fe18be0b3b5b759ff8f055e9ccb19c6a4287c9061c7a4bb9805968e46498","impliedFormat":99},{"version":"728ffea3a09d231637503933e84d6be8c0b437b735c6ade9e971054129ca9a57","impliedFormat":99},{"version":"055d5c58abf9c069d88cd9f62a426008adc38258390ceba978fa527fffa54441","impliedFormat":99},{"version":"d4fb090b92210bf0feedd3a8559755f56651a2c91178f123943f02778f0858c8","impliedFormat":99},{"version":"57de9bbb0ea8d7518f511214b877243d61203453fac837809442eaec865c0667","impliedFormat":99},{"version":"c5a0d25aae8e65ee55e8bf5e1210e38d902a3eec76d6ef6c7c613a7541f940d1","impliedFormat":99},{"version":"b0e539aa701cfd93893b4ec2e5d8ff738fe8ef4af210b1ae1f4ec0e36a561f89","impliedFormat":99},{"version":"2943c4190d96fc3a3ec84acbd89b8467572facc49459a9727cbd48acb5581c0e","impliedFormat":99},{"version":"d3f2d733b25bb7dbc29a22679abb5e8bd7235f491aec7c919272b9a824818bfa","impliedFormat":99},{"version":"dfb9008057f2e08c24be096b660ace398275d3c92fbd99664cf24fe8d134e777","impliedFormat":99},{"version":"bbe887d041ff16549b695592b27b11c36073afa66c64ed41054f9d4964791fac","impliedFormat":99},{"version":"6651e0e8d0a95ccab2cd3b24df4ea6c33da06499f588938f8758d2d3e822090a","impliedFormat":99},{"version":"efd2ee2db9571aaabc3c3e7b6b074986146b9bb0c3489afb0f605c7461e5c897","impliedFormat":99},{"version":"02e6313e30f157acc257c7447246591e89f3840e0ead54451847529f457c1fb1","impliedFormat":99},{"version":"25cbd0baaecc32efabbed23767498e3cd2ebfc8f7a222866efe1e580f08f526b","impliedFormat":99},{"version":"af7d6189331b10c030322f3dc7e600466126bad616f098bda0fce116c7dd09c2","impliedFormat":99},{"version":"c26ba76f3a7e5a8ac2d6763be7c62f4181b9130e283378a3c8d3815b9d121037","signature":"cfb41cd9cf5e4eeeb89d3365c14518cd0313f17f88c537aaf684bb348f4fd591","impliedFormat":99}],"root":[158],"options":{"composite":true,"declaration":true,"declarationDir":"./esm","declarationMap":true,"esModuleInterop":true,"exactOptionalPropertyTypes":true,"module":199,"noFallthroughCasesInSwitch":true,"noImplicitAny":true,"noImplicitOverride":true,"noImplicitReturns":true,"noImplicitThis":true,"noUncheckedIndexedAccess":true,"noUnusedLocals":true,"noUnusedParameters":true,"outDir":"./esm","rootDir":"./src","skipLibCheck":true,"sourceMap":true,"strict":true,"stripInternal":true,"target":99,"verbatimModuleSyntax":true},"fileIdsList":[[157],[89,109,110,111,144],[110],[116,145],[89,145],[117,118,119,120,127,142,143],[117],[109,116,145],[117,124],[124,125,126],[121,122,123],[109,121,145],[89,109,121,145],[89,109,145],[134,135,136,137,138,139,140,141],[89,134,135],[89,109,134],[89,109,134,135],[89],[89,109,133,145],[89,134],[109,116,134,135,136,145],[89,116,146],[89,109,146],[109,145,146],[146,147,148,149,150,151,152],[89,109],[109,116,145,150],[89,109,110,111,145,146,147],[110,111,133,144,145,153,156],[89,90,109,110,145,154],[154,155],[89,110,111,145,155],[116],[89,128,129,130,131,132],[112,113],[112],[112,113,114,115],[113],[89,91,92],[89,91],[91],[91,96],[89,91,98],[91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108],[91,95],[90,91],[90],[89,93],[73,74,75,77],[73,74,78],[73,74,75,77,78],[76],[75,78],[76,79,86,87,88],[76,79,86],[79],[81],[81,82,83],[76,79,81],[80,84,85]],"referencedMap":[[158,1],[145,2],[111,3],[117,4],[118,5],[144,6],[119,7],[120,8],[125,9],[127,10],[124,11],[122,12],[123,13],[121,14],[142,15],[136,16],[137,17],[138,18],[139,19],[140,19],[134,20],[135,21],[141,22],[143,7],[147,23],[149,24],[150,25],[153,26],[146,27],[151,28],[152,29],[157,30],[155,31],[156,32],[154,33],[128,34],[133,35],[114,36],[113,37],[116,38],[115,39],[93,40],[92,41],[94,42],[95,42],[97,43],[99,44],[100,42],[109,45],[101,42],[96,46],[102,47],[103,42],[104,42],[91,48],[105,49],[106,41],[98,41],[108,41],[78,50],[75,51],[79,52],[77,53],[74,54],[89,55],[87,56],[80,57],[81,57],[82,58],[84,59],[83,60],[86,61],[85,57]],"latestChangedDtsFile":"./esm/index.d.ts"},"version":"5.5.3"}
|