GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fix(server): load @napi-rs/keyring through require so the CLI executa… · pingdotgg/t3code@cb6cd65

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • apps/server/src/provider
    • antigravityUsageLimits.ts
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎apps/server/src/provider/antigravityUsageLimits.ts‎

Copy file name to clipboardExpand all lines: apps/server/src/provider/antigravityUsageLimits.ts
+5-5Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ class AntigravityKeyringError extends Schema.TaggedError<AntigravityKeyringError
167167
}
168168

169169
// 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);
171171

172172
/**
173173
* go-keyring's Windows target is `gemini:antigravity`; @napi-rs/keyring reads `antigravity.gemini`,
@@ -180,7 +180,7 @@ export function readWindowsCliCredential(
180180
if (architecture !== "x64" && architecture !== "arm64") {
181181
throw new Error(`no credential access on ${architecture}`);
182182
}
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");
184184
open({ library: "t3-advapi32", path: "advapi32.dll" });
185185
open({ library: "t3-kernel32", path: "kernel32.dll" });
186186
const copy = (into: Buffer, from: bigint) =>
@@ -234,9 +234,9 @@ const readCliKeyringSecret = (platform: NodeJS.Platform, architecture: NodeJS.Ar
234234
const secret =
235235
platform === "win32"
236236
? 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();
240240
return secret ? decodeGoKeyringSecret(secret) : undefined;
241241
},
242242
catch: (cause) => new AntigravityKeyringError({ cause }),

0 commit comments

Comments
0 (0)
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.