@sunshaobei/dsh-codex-auth 3.0.7 → 3.0.8

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.
Files changed (2) hide show
  1. package/lib/client.js +4 -5
  2. package/package.json +1 -1
package/lib/client.js CHANGED
@@ -349,14 +349,13 @@ window.__ModuleLoader__.load({
349
349
  })();
350
350
  const registerPluginsPageCard = (env) => {
351
351
  const cf = env && env.configForms;
352
- if (!cf || typeof cf.get !== "function" || typeof cf.whileServed !== "function") return;
353
- ctx.effect(() => settingsStore.attach(cf.get(NS)), "dsh-codex-auth: config forms");
354
- ctx.effect(() => cf.whileServed([NS], () => ctx.slots.inject("plugins.bundle.config", () => ctx.slots.register({
352
+ if (cf && typeof cf.get === "function") { try { settingsStore.attach(cf.get(CFG_KEY)); } catch {} }
353
+ ctx.slots.inject("plugins.bundle.config", () => ctx.slots.register({
355
354
  name: "plugins.bundle.config",
356
- key: NS,
355
+ key: CFG_KEY,
357
356
  locale: NS,
358
357
  inject: () => ({ hooks: { codexAuth: settingsStore }, set: (k, v) => settingsStore.set(k, v) })
359
- }, () => React.createElement(StatusCard, { t: t, call: call })))), "dsh-codex-auth: plugins-page card");
358
+ }, () => React.createElement(StatusCard, { t: t, call: call })));
360
359
  };
361
360
  if (typeof ctx.inject === "function") ctx.inject(["configForms"], registerPluginsPageCard);
362
361
  else registerPluginsPageCard(ctx);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@sunshaobei/dsh-codex-auth",
3
3
  "description": "Codex 订阅授权管理 for the dsh web surface: a dedicated settings page (authorization status, validity/expiry, one-click browser OAuth) plus an expired-credential modal when a GPT model is selected. Host half runs the full OpenAI OAuth flow (PKCE S256, localhost:1455 callback) and writes the llm-pi-ai/openai-codex grant record through ctx.credentials.",
4
- "version": "3.0.7",
4
+ "version": "3.0.8",
5
5
  "type": "module",
6
6
  "main": "lib/index.js",
7
7
  "types": "lib/index.d.ts",