repowise 0.1.71 → 0.1.72

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.
@@ -2366,23 +2366,27 @@ async function create() {
2366
2366
  process.exitCode = 1;
2367
2367
  return;
2368
2368
  }
2369
+ let useFreeRescan = false;
2369
2370
  try {
2370
- const pricing = await apiRequest(
2371
- `/v1/repos/${repoId}/rescan-pricing`
2372
- );
2371
+ const pricing = await apiRequest(`/v1/repos/${repoId}/rescan-pricing`);
2373
2372
  if (pricing.lastFullScanAt) {
2374
- spinner.fail(chalk5.red("This repository already has context generated."));
2375
- console.log(
2376
- chalk5.cyan(
2377
- `
2373
+ if (pricing.allowed && pricing.isFree) {
2374
+ spinner.succeed(chalk5.cyan("Free rescan available. Will trigger a full rescan."));
2375
+ useFreeRescan = true;
2376
+ } else {
2377
+ spinner.fail(chalk5.red("This repository already has context generated."));
2378
+ console.log(
2379
+ chalk5.cyan(
2380
+ `
2378
2381
  To trigger a new full scan, visit the dashboard:
2379
2382
  https://app.repowise.ai/repos/${repoId}
2380
2383
  `
2381
- )
2382
- );
2383
- console.log(chalk5.dim(" To sync recent changes, use: repowise sync\n"));
2384
- process.exitCode = 1;
2385
- return;
2384
+ )
2385
+ );
2386
+ console.log(chalk5.dim(" To sync recent changes, use: repowise sync\n"));
2387
+ process.exitCode = 1;
2388
+ return;
2389
+ }
2386
2390
  }
2387
2391
  } catch {
2388
2392
  }
@@ -2405,9 +2409,10 @@ async function create() {
2405
2409
  spinner.start("Starting context generation pipeline...");
2406
2410
  let syncId;
2407
2411
  try {
2408
- const triggerResult = await apiRequest(`/v1/repos/${repoId}/sync`, {
2412
+ const endpoint = useFreeRescan ? `/v1/repos/${repoId}/full-rescan` : `/v1/repos/${repoId}/sync`;
2413
+ const triggerResult = await apiRequest(endpoint, {
2409
2414
  method: "POST",
2410
- body: JSON.stringify({ scanType: "full", contextStorage })
2415
+ body: useFreeRescan ? void 0 : JSON.stringify({ scanType: "full", contextStorage })
2411
2416
  });
2412
2417
  syncId = triggerResult.syncId;
2413
2418
  } catch (triggerErr) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "repowise",
3
- "version": "0.1.71",
3
+ "version": "0.1.72",
4
4
  "type": "module",
5
5
  "description": "AI-optimized codebase context generator",
6
6
  "bin": {