mustard-claude 3.1.23 → 3.1.24

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.
package/bin/mustard.js CHANGED
File without changes
package/package.json CHANGED
@@ -1,59 +1,59 @@
1
- {
2
- "name": "mustard-claude",
3
- "version": "3.1.23",
4
- "description": "Framework-agnostic CLI for Claude Code project setup",
5
- "type": "module",
6
- "bin": {
7
- "mustard": "./bin/mustard.js"
8
- },
9
- "main": "dist/cli.js",
10
- "types": "dist/cli.d.ts",
11
- "files": [
12
- "bin/",
13
- "dist/",
14
- "templates/"
15
- ],
16
- "scripts": {
17
- "start": "node bin/mustard.js",
18
- "build": "tsc",
19
- "clean": "rimraf dist",
20
- "typecheck": "tsc --noEmit",
21
- "test": "node --test",
22
- "release": "npm version patch && npm run build && npm publish"
23
- },
24
- "keywords": [
25
- "claude",
26
- "claude-code",
27
- "ai",
28
- "cli",
29
- "scaffold"
30
- ],
31
- "author": "rubensrpj",
32
- "license": "MIT",
33
- "repository": {
34
- "type": "git",
35
- "url": "git+https://github.com/rubensrpj/mustard.git"
36
- },
37
- "homepage": "https://github.com/rubensrpj/mustard#readme",
38
- "bugs": {
39
- "url": "https://github.com/rubensrpj/mustard/issues"
40
- },
41
- "publishConfig": {
42
- "access": "public"
43
- },
44
- "dependencies": {
45
- "chalk": "^5.3.0",
46
- "commander": "^12.1.0",
47
- "inquirer": "^9.2.15",
48
- "ora": "^8.0.1"
49
- },
50
- "engines": {
51
- "node": ">=18.0.0"
52
- },
53
- "devDependencies": {
54
- "@types/inquirer": "^9.0.9",
55
- "@types/node": "^25.2.1",
56
- "rimraf": "^6.1.2",
57
- "typescript": "^5.9.3"
58
- }
59
- }
1
+ {
2
+ "name": "mustard-claude",
3
+ "version": "3.1.24",
4
+ "description": "Framework-agnostic CLI for Claude Code project setup",
5
+ "type": "module",
6
+ "bin": {
7
+ "mustard": "./bin/mustard.js"
8
+ },
9
+ "main": "dist/cli.js",
10
+ "types": "dist/cli.d.ts",
11
+ "files": [
12
+ "bin/",
13
+ "dist/",
14
+ "templates/"
15
+ ],
16
+ "keywords": [
17
+ "claude",
18
+ "claude-code",
19
+ "ai",
20
+ "cli",
21
+ "scaffold"
22
+ ],
23
+ "author": "rubensrpj",
24
+ "license": "MIT",
25
+ "repository": {
26
+ "type": "git",
27
+ "url": "git+https://github.com/rubensrpj/mustard.git"
28
+ },
29
+ "homepage": "https://github.com/rubensrpj/mustard#readme",
30
+ "bugs": {
31
+ "url": "https://github.com/rubensrpj/mustard/issues"
32
+ },
33
+ "publishConfig": {
34
+ "access": "public"
35
+ },
36
+ "dependencies": {
37
+ "chalk": "^5.3.0",
38
+ "commander": "^12.1.0",
39
+ "inquirer": "^9.2.15",
40
+ "ora": "^8.0.1"
41
+ },
42
+ "engines": {
43
+ "node": ">=18.0.0"
44
+ },
45
+ "devDependencies": {
46
+ "@types/inquirer": "^9.0.9",
47
+ "@types/node": "^25.2.1",
48
+ "rimraf": "^6.1.2",
49
+ "typescript": "^5.9.3"
50
+ },
51
+ "scripts": {
52
+ "start": "node bin/mustard.js",
53
+ "build": "tsc",
54
+ "clean": "rimraf dist",
55
+ "typecheck": "tsc --noEmit",
56
+ "test": "node --test",
57
+ "release": "npm version patch && npm run build && npm publish"
58
+ }
59
+ }
@@ -518,26 +518,44 @@ function getSubmodulePaths() {
518
518
  }
519
519
 
520
520
  /**
521
- * Fallback: scan root directory for folders that contain a CLAUDE.md file.
521
+ * Fallback: scan recursively (BFS, max depth 3) for folders that contain a
522
+ * CLAUDE.md file. Stops descending into a branch as soon as a CLAUDE.md is
523
+ * found, so nested workspaces (e.g. subproject/.claude/CLAUDE.md) don't get
524
+ * double-registered.
525
+ *
526
+ * Depth 3 covers common monorepo shapes: apps/X/, services/api/v1/.
527
+ * Fully agnostic — no hardcoded directory names.
522
528
  */
523
529
  function scanForSubprojects() {
524
- const paths = [];
525
- try {
526
- const entries = fs.readdirSync(ROOT, { withFileTypes: true });
530
+ const IGNORE = new Set([
531
+ "node_modules", "bin", "obj", "dist", ".next",
532
+ "_backup", "migrations", ".claude", ".git",
533
+ ]);
534
+ const MAX_DEPTH = 3;
535
+ const results = [];
536
+
537
+ function walk(absDir, relDir, depth) {
538
+ if (depth > MAX_DEPTH) return;
539
+ if (depth > 0 && fs.existsSync(path.join(absDir, "CLAUDE.md"))) {
540
+ results.push(relDir.split(path.sep).join("/"));
541
+ return;
542
+ }
543
+ let entries;
544
+ try {
545
+ entries = fs.readdirSync(absDir, { withFileTypes: true });
546
+ } catch {
547
+ return;
548
+ }
527
549
  for (const entry of entries) {
528
550
  if (!entry.isDirectory()) continue;
529
551
  if (entry.name.startsWith(".")) continue;
530
- if (entry.name === "node_modules") continue;
531
-
532
- const claudePath = path.join(ROOT, entry.name, "CLAUDE.md");
533
- if (fs.existsSync(claudePath)) {
534
- paths.push(entry.name);
535
- }
552
+ if (IGNORE.has(entry.name)) continue;
553
+ walk(path.join(absDir, entry.name), path.join(relDir, entry.name), depth + 1);
536
554
  }
537
- } catch {
538
- // ignore
539
555
  }
540
- return paths;
556
+
557
+ walk(ROOT, "", 0);
558
+ return results;
541
559
  }
542
560
 
543
561
  // ---------------------------------------------------------------------------