pruny 1.24.0 → 1.25.0

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/dist/index.js +8 -1
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -10291,7 +10291,7 @@ function init(cwd = process.cwd()) {
10291
10291
 
10292
10292
  // src/index.ts
10293
10293
  var program2 = new Command;
10294
- program2.name("pruny").description("Find and remove unused Next.js API routes").version("1.0.0").option("-d, --dir <path>", "Target directory to scan", "./").option("--fix", "Delete unused API routes").option("-c, --config <path>", "Path to config file").option("--json", "Output as JSON").option("--no-public", "Disable public assets scanning").option("-v, --verbose", "Show detailed info").option("-f, --filter <pattern>", "Filter results by file path or app name");
10294
+ program2.name("pruny").description("Find and remove unused Next.js API routes").version("1.0.0").option("-d, --dir <path>", "Target directory to scan", "./").option("--fix", "Delete unused API routes").option("-c, --config <path>", "Path to config file").option("--json", "Output as JSON").option("--no-public", "Disable public assets scanning").option("-v, --verbose", "Show detailed info").option("-f, --filter <pattern>", "Filter results by file path or app name").option("--ignore-apps <apps>", "Comma-separated list of apps to ignore");
10295
10295
  program2.command("init").description("Create a default pruny.config.json file").action(() => {
10296
10296
  init();
10297
10297
  });
@@ -10313,9 +10313,12 @@ program2.action(async (options) => {
10313
10313
  const appsDir = join8(absoluteDir, "apps");
10314
10314
  const isMonorepo = existsSync7(appsDir) && lstatSync(appsDir).isDirectory();
10315
10315
  const appsToScan = [];
10316
+ const ignoredApps = options.ignoreApps ? options.ignoreApps.split(",").map((a) => a.trim()) : [];
10316
10317
  if (isMonorepo) {
10317
10318
  const apps = readdirSync(appsDir);
10318
10319
  for (const app of apps) {
10320
+ if (ignoredApps.includes(app))
10321
+ continue;
10319
10322
  const appPath = join8(appsDir, app);
10320
10323
  if (lstatSync(appPath).isDirectory()) {
10321
10324
  appsToScan.push(app);
@@ -10324,6 +10327,10 @@ program2.action(async (options) => {
10324
10327
  console.log(source_default.bold(`
10325
10328
  \uD83C\uDFE2 Monorepo Detected. Found ${appsToScan.length} apps: ${appsToScan.join(", ")}
10326
10329
  `));
10330
+ if (ignoredApps.length > 0) {
10331
+ console.log(source_default.dim(` (Ignored: ${ignoredApps.join(", ")})
10332
+ `));
10333
+ }
10327
10334
  } else {
10328
10335
  appsToScan.push("root");
10329
10336
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pruny",
3
- "version": "1.24.0",
3
+ "version": "1.25.0",
4
4
  "description": "Find and remove unused Next.js API routes & Nest.js Controllers",
5
5
  "type": "module",
6
6
  "files": [