tinfoil 0.2.2 → 0.2.3

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.
@@ -33,13 +33,16 @@ if (!globalThis.crypto) {
33
33
  }
34
34
  };
35
35
  }
36
- // Additional browser polyfills that might be needed
37
- globalThis.window = globalThis;
38
- globalThis.document = {
39
- createElement: () => ({
40
- setAttribute: () => { }
41
- })
42
- };
36
+ // Modified secure-client.ts
37
+ if (typeof window === 'undefined') {
38
+ // Node.js environment
39
+ globalThis.window = globalThis;
40
+ globalThis.document = {
41
+ createElement: () => ({
42
+ setAttribute: () => { }
43
+ })
44
+ };
45
+ }
43
46
  // Force process to stay running (prevent Go from exiting Node process)
44
47
  // This is a common issue with Go WASM in Node - it calls process.exit()
45
48
  const originalExit = process.exit;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tinfoil",
3
- "version": "0.2.2",
3
+ "version": "0.2.3",
4
4
  "description": "Official Tinfoil secure OpenAI client wrapper",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",