Skip to content

Commit 13bb61f

Browse files
committed
refactor: clean up debug logging
- Removed unnecessary console.log statements from `detect-npx.mjs` and `download-files.mjs` to streamline output. - Commented out debug logs in `find-folder-up.mjs` to reduce clutter during execution. - Cleaned up debug logging in `validate-dirname.mjs` to enhance clarity and focus on essential functionality.
1 parent ed0a4d5 commit 13bb61f

4 files changed

Lines changed: 3 additions & 9 deletions

File tree

cli/utils/detect-npx.mjs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ export function detectNpxSandbox() {
77
// Check environment variables
88
const npmPrefix = process.env.npm_config_prefix || '';
99
const npmCache = process.env.npm_config_cache || '';
10-
const tempDir = process.env.TMPDIR || process.env.TEMP || process.env.TMP || '';
1110

1211
// Analyze current file path
1312
const currentPath = __dirname;

cli/utils/download-files.mjs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,18 +8,14 @@ import { findPackageRoot } from './find-package-root.mjs';
88
import { validateDirname } from './validate-dirname.mjs';
99

1010
const detection = detectNpxSandbox();
11-
console.log('🔍 NPX Detection Results:', detection);
12-
1311
const __dirname = dirname(fileURLToPath(import.meta.url));
14-
console.log('🔍 __dirname:', __dirname);
12+
1513
/** @type {string} */
1614
let sourceRulesBasePath;
1715

1816
if (detection.isNpxSandbox) {
1917
const packageRoot = findPackageRoot(__dirname, '@usrrname/cursorrules');
20-
console.log('DEBUG: packageRoot (npx branch):', packageRoot);
2118
sourceRulesBasePath = resolve(packageRoot, '.cursor', 'rules');
22-
console.log('DEBUG: sourceRulesBasePath:', sourceRulesBasePath);
2319
}
2420

2521

cli/utils/find-folder-up.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ export const findFolderUp = async (folderName, startPath = process.cwd()) => {
1717
try {
1818
const stats = await stat(candidatePath);
1919
if (stats.isDirectory()) {
20-
console.log(`[findFolderUp]: Found '${folderName}' at: ${candidatePath}`);
20+
/* console.log(`[findFolderUp]: Found '${folderName}' at: ${candidatePath}`); */
2121
return candidatePath;
2222
}
2323
} catch (err) {

cli/utils/validate-dirname.mjs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,7 @@ const hasInvalidSegmentChars = (segment) => {
4343
* @returns {Promise<string>} - the validated and resolved absolute path
4444
*/
4545
export const validateDirname = async (rawPath, projectRoot = process.cwd()) => {
46-
console.log('DEBUG: validateDirname rawPath:', rawPath);
47-
console.log('DEBUG: validateDirname projectRoot:', projectRoot);
46+
4847
const attemptedPath = rawPath;
4948

5049
// Remove = prefix if it exists

0 commit comments

Comments
 (0)