codexuse-cli 3.6.2 → 3.6.4

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.
package/dist/index.js CHANGED
@@ -3386,10 +3386,12 @@ var LicenseService = class {
3386
3386
  this.verificationPromise = null;
3387
3387
  }
3388
3388
  async getCachedStatus() {
3389
- return this.getStatus();
3389
+ return this.getStatus({ allowStale: true, refreshInBackground: true });
3390
3390
  }
3391
3391
  async getStatus(options = {}) {
3392
3392
  const forceRefresh = Boolean(options.forceRefresh);
3393
+ const allowStale = Boolean(options.allowStale);
3394
+ const refreshInBackground = Boolean(options.refreshInBackground);
3393
3395
  const secret = await getLicenseSecret();
3394
3396
  const stored = await getStoredLicense();
3395
3397
  if (!stored?.licenseKey) {
@@ -3419,7 +3421,10 @@ var LicenseService = class {
3419
3421
  error: "Untrusted license data."
3420
3422
  }) : toLicenseStatus(workingStored);
3421
3423
  const shouldRefresh = forceRefresh || graceStale || tampered || cappedNextCheckTs === null || cappedNextCheckTs <= now;
3422
- if (!shouldRefresh) {
3424
+ if (!shouldRefresh || allowStale) {
3425
+ if (allowStale && shouldRefresh && refreshInBackground) {
3426
+ this.refreshStatusInBackground({ force: forceRefresh });
3427
+ }
3423
3428
  return cached;
3424
3429
  }
3425
3430
  if (this.verificationPromise && !forceRefresh) {
@@ -10226,7 +10231,7 @@ async function ensureCliStorageReady() {
10226
10231
  }
10227
10232
 
10228
10233
  // src/app/main.ts
10229
- var VERSION = true ? "3.6.2" : "0.0.0";
10234
+ var VERSION = true ? "3.6.4" : "0.0.0";
10230
10235
  async function runCli() {
10231
10236
  const args = process.argv.slice(2);
10232
10237
  if (args.length === 0) {