pruny 1.31.0 → 1.32.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 +7 -2
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -16196,6 +16196,7 @@ program2.command("init").description("Create a default pruny.config.json file").
16196
16196
  });
16197
16197
  program2.action(async (options) => {
16198
16198
  const startTime = Date.now();
16199
+ const isNonInteractive = !process.stdin.isTTY || !!process.env.CI;
16199
16200
  try {
16200
16201
  const baseConfig = loadConfig({
16201
16202
  dir: options.dir,
@@ -16256,7 +16257,7 @@ program2.action(async (options) => {
16256
16257
  appsToScan.push(...availableApps.filter((app) => !ignoredApps.includes(app)));
16257
16258
  } else if (options.folder) {
16258
16259
  appsToScan.push(...availableApps);
16259
- } else if (!options.ignoreApps && !options.filter && !options.json) {
16260
+ } else if (!isNonInteractive && !options.ignoreApps && !options.filter && !options.json) {
16260
16261
  const response = await import_prompts.default({
16261
16262
  type: "select",
16262
16263
  name: "selected",
@@ -16349,6 +16350,10 @@ program2.action(async (options) => {
16349
16350
  if (issues > 0) {
16350
16351
  process.exit(1);
16351
16352
  }
16353
+ } else if (isNonInteractive) {
16354
+ if (hasUnusedItems(result)) {
16355
+ printDetailedReport(result);
16356
+ }
16352
16357
  } else if (hasUnusedItems(result)) {
16353
16358
  if (options.verbose) {
16354
16359
  printDetailedReport(result);
@@ -16384,7 +16389,7 @@ program2.action(async (options) => {
16384
16389
  }
16385
16390
  }
16386
16391
  }
16387
- if (!isMonorepo || !requestedBack && appsToScan.length > 0 || options.json || options.filter || options.all) {
16392
+ if (!isMonorepo || !requestedBack && appsToScan.length > 0 || options.json || options.filter || options.all || isNonInteractive) {
16388
16393
  break;
16389
16394
  }
16390
16395
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pruny",
3
- "version": "1.31.0",
3
+ "version": "1.32.0",
4
4
  "description": "Find and remove unused Next.js API routes & Nest.js Controllers",
5
5
  "type": "module",
6
6
  "files": [