@@ -167,7 +167,7 @@ class AntigravityKeyringError extends Schema.TaggedError<AntigravityKeyringError |
167 | 167 | } |
168 | 168 |
|
169 | 169 | // A single-executable server resolves packages on disk only through `require`. |
170 | | -const requireForFfi = NodeModule.createRequire(import.meta.url); |
| 170 | +const requireExternal = NodeModule.createRequire(import.meta.url); |
171 | 171 |
|
172 | 172 | /** |
173 | 173 | * go-keyring's Windows target is `gemini:antigravity`; @napi-rs/keyring reads `antigravity.gemini`, |
@@ -180,7 +180,7 @@ export function readWindowsCliCredential( |
180 | 180 | if (architecture !== "x64" && architecture !== "arm64") { |
181 | 181 | throw new Error(`no credential access on ${architecture}`); |
182 | 182 | } |
183 | | - const { DataType, load, open } = requireForFfi("ffi-rs") as typeof import("ffi-rs"); |
| 183 | + const { DataType, load, open } = requireExternal("ffi-rs") as typeof import("ffi-rs"); |
184 | 184 | open({ library: "t3-advapi32", path: "advapi32.dll" }); |
185 | 185 | open({ library: "t3-kernel32", path: "kernel32.dll" }); |
186 | 186 | const copy = (into: Buffer, from: bigint) => |
@@ -234,9 +234,9 @@ const readCliKeyringSecret = (platform: NodeJS.Platform, architecture: NodeJS.Ar |
234 | 234 | const secret = |
235 | 235 | platform === "win32" |
236 | 236 | ? readWindowsCliCredential(architecture) |
237 | | - : await import("@napi-rs/keyring").then(({ AsyncEntry }) => |
238 | | - new AsyncEntry("gemini", "antigravity").getSecret(), |
239 | | - ); |
| 237 | + : await new ( |
| 238 | + requireExternal("@napi-rs/keyring") as typeof import("@napi-rs/keyring") |
| 239 | + ).AsyncEntry("gemini", "antigravity").getSecret(); |
240 | 240 | return secret ? decodeGoKeyringSecret(secret) : undefined; |
241 | 241 | }, |
242 | 242 | catch: (cause) => new AntigravityKeyringError({ cause }), |
|