@token-dashboard/codex-usage-uploader 0.1.5 → 0.1.6

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/package.json +1 -1
  2. package/src/cli.js +7 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@token-dashboard/codex-usage-uploader",
3
- "version": "0.1.5",
3
+ "version": "0.1.6",
4
4
  "description": "Codex 用量上报 CLI",
5
5
  "type": "module",
6
6
  "bin": {
package/src/cli.js CHANGED
@@ -352,7 +352,13 @@ async function runInit(options) {
352
352
 
353
353
  const uploader = cliDeps.createUploader(runtime);
354
354
  try {
355
- const identity = await bindIdentity(uploader, options);
355
+ const hasIdentityOverrides = Object.values(identityOverrides(options)).some(v => v !== undefined);
356
+ let identity;
357
+ if (!hasIdentityOverrides && identityIsBound(uploader.identity)) {
358
+ identity = uploader.identity;
359
+ } else {
360
+ identity = await bindIdentity(uploader, options);
361
+ }
356
362
  console.log(`${PRODUCT_NAME} install is ready.`);
357
363
  console.log(`Backend: ${runtime.backendUrl}`);
358
364
  console.log(`Install root: ${runtime.installRoot}`);