structify-project 1.1.0 → 1.1.1

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/cli.js +12 -10
  2. package/package.json +1 -1
package/dist/cli.js CHANGED
@@ -1,15 +1,15 @@
1
+ #!/usr/bin/env node
1
2
  "use strict";
2
3
  var __importDefault = (this && this.__importDefault) || function (mod) {
3
4
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
5
  };
5
6
  Object.defineProperty(exports, "__esModule", { value: true });
7
+ console.log("🔥 Structify CLI started");
6
8
  const inquirer_1 = __importDefault(require("inquirer"));
7
9
  const index_1 = require("./index");
8
- // CLI args
9
10
  const args = process.argv.slice(2);
10
11
  const projectPath = args[0] || ".";
11
12
  const outputBase = args[1] || "structure";
12
- // Directories to control
13
13
  const specialDirs = [
14
14
  "node_modules",
15
15
  ".git",
@@ -17,8 +17,7 @@ const specialDirs = [
17
17
  ".vscode",
18
18
  "dist"
19
19
  ];
20
- (async () => {
21
- // Output format
20
+ async function run() {
22
21
  const { format } = await inquirer_1.default.prompt([
23
22
  {
24
23
  type: "list",
@@ -28,18 +27,17 @@ const specialDirs = [
28
27
  default: "txt"
29
28
  }
30
29
  ]);
31
- // Directory handling
32
30
  const config = {};
33
31
  for (const dir of specialDirs) {
34
32
  const { mode } = await inquirer_1.default.prompt([
35
33
  {
36
34
  type: "list",
37
35
  name: "mode",
38
- message: `How should "${dir}" be handled?`,
36
+ message: `How should "${dir}" be handled? (if present)`,
39
37
  choices: [
40
- { name: "Skip (exclude completely)", value: "skip" },
41
- { name: "Name only (show folder name)", value: "name" },
42
- { name: "Full (include everything)", value: "full" }
38
+ { name: "Skip", value: "skip" },
39
+ { name: "Name only", value: "name" },
40
+ { name: "Full", value: "full" }
43
41
  ],
44
42
  default: dir === "node_modules" ? "name" : "skip"
45
43
  }
@@ -47,4 +45,8 @@ const specialDirs = [
47
45
  config[dir] = mode;
48
46
  }
49
47
  (0, index_1.generateStructure)(projectPath, outputBase, format, config);
50
- })();
48
+ }
49
+ run().catch(err => {
50
+ console.error("❌ CLI crashed:", err);
51
+ process.exit(1);
52
+ });
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "structify-project",
3
3
  "author": "Yashwanth Byalla",
4
- "version": "1.1.0",
4
+ "version": "1.1.1",
5
5
  "description": "Interactive CLI to visualize and export project structure as text, JSON, Markdown, or YAML",
6
6
  "main": "index.js",
7
7
  "scripts": {