tinfoil 1.0.0 → 1.0.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.
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Browser stub for pinned-tls-fetch.
|
|
3
|
+
* TLS certificate pinning is not supported in browsers as they don't expose low-level TLS APIs.
|
|
4
|
+
* This module should never be called in browser environments - the runtime check in
|
|
5
|
+
* secure-fetch.ts throws before reaching this code. This stub exists to satisfy bundlers.
|
|
6
|
+
*/
|
|
7
|
+
export declare function createPinnedTlsFetch(baseURL: string, expectedFingerprintHex: string): Promise<typeof fetch>;
|
|
8
|
+
//# sourceMappingURL=pinned-tls-fetch.browser.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pinned-tls-fetch.browser.d.ts","sourceRoot":"","sources":["../src/pinned-tls-fetch.browser.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,wBAAsB,oBAAoB,CAAC,OAAO,EAAE,MAAM,EAAE,sBAAsB,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,KAAK,CAAC,CAKjH"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Browser stub for pinned-tls-fetch.
|
|
3
|
+
* TLS certificate pinning is not supported in browsers as they don't expose low-level TLS APIs.
|
|
4
|
+
* This module should never be called in browser environments - the runtime check in
|
|
5
|
+
* secure-fetch.ts throws before reaching this code. This stub exists to satisfy bundlers.
|
|
6
|
+
*/
|
|
7
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
8
|
+
export async function createPinnedTlsFetch(baseURL, expectedFingerprintHex) {
|
|
9
|
+
throw new Error("TLS certificate pinning is not supported in browser environments. " +
|
|
10
|
+
"This should not have been called - please report this as a bug.");
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=pinned-tls-fetch.browser.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pinned-tls-fetch.browser.js","sourceRoot":"","sources":["../src/pinned-tls-fetch.browser.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,6DAA6D;AAC7D,MAAM,CAAC,KAAK,UAAU,oBAAoB,CAAC,OAAe,EAAE,sBAA8B;IACxF,MAAM,IAAI,KAAK,CACb,oEAAoE;QACpE,iEAAiE,CAClE,CAAC;AACJ,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tinfoil",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.1",
|
|
4
4
|
"description": "Tinfoil secure OpenAI client wrapper",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"types": "dist/index.d.ts",
|
|
8
8
|
"sideEffects": false,
|
|
9
9
|
"browser": {
|
|
10
|
-
"./dist/index.js": "./dist/index.browser.js"
|
|
10
|
+
"./dist/index.js": "./dist/index.browser.js",
|
|
11
|
+
"./dist/pinned-tls-fetch.js": "./dist/pinned-tls-fetch.browser.js"
|
|
11
12
|
},
|
|
12
13
|
"exports": {
|
|
13
14
|
".": {
|
|
@@ -52,7 +53,7 @@
|
|
|
52
53
|
"dependencies": {
|
|
53
54
|
"@ai-sdk/openai-compatible": "^1.0.10",
|
|
54
55
|
"@freedomofpress/sigstore-browser": "^0.1.11",
|
|
55
|
-
"@tinfoilsh/verifier": "1.0.
|
|
56
|
+
"@tinfoilsh/verifier": "1.0.1",
|
|
56
57
|
"ehbp": "^0.1.2",
|
|
57
58
|
"openai": "^5.13.1"
|
|
58
59
|
},
|