Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

print-project

Package Overview
Dependencies
Maintainers
0
Versions
33
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

print-project - npm Package Compare versions

Comparing version 1.0.23 to 1.0.24

7

dist/index.js

@@ -35,3 +35,3 @@ #!/usr/bin/env node

const program = new commander_1.Command();
program.argument("<startPath>", "Starting directory path").option("--ignore <patterns>", "Comma-separated list of patterns to ignore").option("--include <patterns>", "Comma-separated list of patterns to include").option("--ignore-default", "Disable default ignore patterns").parse(process.argv);
program.argument("<startPath>", "Starting directory path").option("--ignore <patterns>", "Comma-separated list of patterns to ignore").option("--include <patterns>", "Comma-separated list of patterns to include").option("--remove-default", "Remove default ignore patterns").parse(process.argv);
const startPath = program.args[0] && path.resolve(program.args[0]);

@@ -41,6 +41,7 @@ const options = program.opts();

const includePatterns = options.include ? options.include.split(",").filter(Boolean).map((pattern) => pattern.trim()) : [];
const shouldAddDefaultIgnorePatterns = !options.removeDefault;
// Build the final ignore patterns list
let ignorePatterns = ["project-print.txt"]; // Always ignore the output file
// If NOT using --ignore-default, add default patterns FIRST
if (!options.ignoreDefault) {
if (shouldAddDefaultIgnorePatterns) {
ignorePatterns = [...constants_1.defaultIgnorePatterns, ...ignorePatterns];

@@ -132,3 +133,3 @@ }

console.log("Ignore patterns:", ignorePatterns.join(", "));
console.log("Using default ignore:", !options.ignoreDefault);
console.log("Remove default:", !shouldAddDefaultIgnorePatterns);
console.log();

@@ -135,0 +136,0 @@ readDirectory(startPath, treeStructure);

{
"name": "print-project",
"version": "1.0.23",
"version": "1.0.24",
"description": "A simple CLI tool to print the project tree structure and file contents",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

@@ -12,3 +12,3 @@ #!/usr/bin/env node

const program = new Command();
program.argument("<startPath>", "Starting directory path").option("--ignore <patterns>", "Comma-separated list of patterns to ignore").option("--include <patterns>", "Comma-separated list of patterns to include").option("--ignore-default", "Disable default ignore patterns").parse(process.argv);
program.argument("<startPath>", "Starting directory path").option("--ignore <patterns>", "Comma-separated list of patterns to ignore").option("--include <patterns>", "Comma-separated list of patterns to include").option("--remove-default", "Remove default ignore patterns").parse(process.argv);

@@ -19,2 +19,3 @@ const startPath: string | undefined = program.args[0] && path.resolve(program.args[0]);

const includePatterns: string[] = options.include ? options.include.split(",").filter(Boolean).map((pattern: string) => pattern.trim()) : [];
const shouldAddDefaultIgnorePatterns: boolean = !options.removeDefault;

@@ -25,3 +26,3 @@ // Build the final ignore patterns list

// If NOT using --ignore-default, add default patterns FIRST
if (!options.ignoreDefault) {
if (shouldAddDefaultIgnorePatterns) {
ignorePatterns = [...defaultIgnorePatterns, ...ignorePatterns];

@@ -124,3 +125,3 @@ }

console.log("Ignore patterns:", ignorePatterns.join(", "));
console.log("Using default ignore:", !options.ignoreDefault);
console.log("Remove default:", !shouldAddDefaultIgnorePatterns);
console.log();

@@ -127,0 +128,0 @@

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc