complexity-cli 1.0.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 (56) hide show
  1. package/Complexity.template.md +38 -0
  2. package/LICENSE +21 -0
  3. package/README.md +173 -0
  4. package/dist/commands/add.d.ts +4 -0
  5. package/dist/commands/add.d.ts.map +1 -0
  6. package/dist/commands/add.js +109 -0
  7. package/dist/commands/add.js.map +1 -0
  8. package/dist/commands/init.d.ts +5 -0
  9. package/dist/commands/init.d.ts.map +1 -0
  10. package/dist/commands/init.js +85 -0
  11. package/dist/commands/init.js.map +1 -0
  12. package/dist/commands/list.d.ts +2 -0
  13. package/dist/commands/list.d.ts.map +1 -0
  14. package/dist/commands/list.js +58 -0
  15. package/dist/commands/list.js.map +1 -0
  16. package/dist/commands/prompt.d.ts +2 -0
  17. package/dist/commands/prompt.d.ts.map +1 -0
  18. package/dist/commands/prompt.js +38 -0
  19. package/dist/commands/prompt.js.map +1 -0
  20. package/dist/commands/remove.d.ts +4 -0
  21. package/dist/commands/remove.d.ts.map +1 -0
  22. package/dist/commands/remove.js +86 -0
  23. package/dist/commands/remove.js.map +1 -0
  24. package/dist/commands/update.d.ts +6 -0
  25. package/dist/commands/update.d.ts.map +1 -0
  26. package/dist/commands/update.js +125 -0
  27. package/dist/commands/update.js.map +1 -0
  28. package/dist/core/generator.d.ts +5 -0
  29. package/dist/core/generator.d.ts.map +1 -0
  30. package/dist/core/generator.js +96 -0
  31. package/dist/core/generator.js.map +1 -0
  32. package/dist/core/parser.d.ts +4 -0
  33. package/dist/core/parser.d.ts.map +1 -0
  34. package/dist/core/parser.js +144 -0
  35. package/dist/core/parser.js.map +1 -0
  36. package/dist/core/validator.d.ts +6 -0
  37. package/dist/core/validator.d.ts.map +1 -0
  38. package/dist/core/validator.js +22 -0
  39. package/dist/core/validator.js.map +1 -0
  40. package/dist/index.d.ts +3 -0
  41. package/dist/index.d.ts.map +1 -0
  42. package/dist/index.js +48 -0
  43. package/dist/index.js.map +1 -0
  44. package/dist/utils/error-helpers.d.ts +4 -0
  45. package/dist/utils/error-helpers.d.ts.map +1 -0
  46. package/dist/utils/error-helpers.js +26 -0
  47. package/dist/utils/error-helpers.js.map +1 -0
  48. package/dist/utils/prompts.d.ts +3 -0
  49. package/dist/utils/prompts.d.ts.map +1 -0
  50. package/dist/utils/prompts.js +37 -0
  51. package/dist/utils/prompts.js.map +1 -0
  52. package/dist/utils/types.d.ts +17 -0
  53. package/dist/utils/types.d.ts.map +1 -0
  54. package/dist/utils/types.js +3 -0
  55. package/dist/utils/types.js.map +1 -0
  56. package/package.json +52 -0
@@ -0,0 +1,26 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.exitWithError = exitWithError;
7
+ exports.exitWithUsageError = exitWithUsageError;
8
+ exports.exitCancelled = exitCancelled;
9
+ const chalk_1 = __importDefault(require("chalk"));
10
+ function exitWithError(message, hint) {
11
+ console.error(chalk_1.default.red(`Error: ${message}`));
12
+ if (hint) {
13
+ console.error(chalk_1.default.yellow(hint));
14
+ }
15
+ process.exit(1);
16
+ }
17
+ function exitWithUsageError(message, usageExample) {
18
+ console.error(chalk_1.default.red(`Error: ${message}`));
19
+ console.error(chalk_1.default.yellow(`Usage: ${usageExample}`));
20
+ process.exit(1);
21
+ }
22
+ function exitCancelled() {
23
+ console.log(chalk_1.default.yellow('Cancelled.'));
24
+ process.exit(0);
25
+ }
26
+ //# sourceMappingURL=error-helpers.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"error-helpers.js","sourceRoot":"","sources":["../../src/utils/error-helpers.ts"],"names":[],"mappings":";;;;;AAEA,sCAMC;AAED,gDAIC;AAED,sCAGC;AAnBD,kDAA0B;AAE1B,SAAgB,aAAa,CAAC,OAAe,EAAE,IAAa;IAC1D,OAAO,CAAC,KAAK,CAAC,eAAK,CAAC,GAAG,CAAC,UAAU,OAAO,EAAE,CAAC,CAAC,CAAC;IAC9C,IAAI,IAAI,EAAE,CAAC;QACT,OAAO,CAAC,KAAK,CAAC,eAAK,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC;IACpC,CAAC;IACD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC;AAED,SAAgB,kBAAkB,CAAC,OAAe,EAAE,YAAoB;IACtE,OAAO,CAAC,KAAK,CAAC,eAAK,CAAC,GAAG,CAAC,UAAU,OAAO,EAAE,CAAC,CAAC,CAAC;IAC9C,OAAO,CAAC,KAAK,CAAC,eAAK,CAAC,MAAM,CAAC,UAAU,YAAY,EAAE,CAAC,CAAC,CAAC;IACtD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC;AAED,SAAgB,aAAa;IAC3B,OAAO,CAAC,GAAG,CAAC,eAAK,CAAC,MAAM,CAAC,YAAY,CAAC,CAAC,CAAC;IACxC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC"}
@@ -0,0 +1,3 @@
1
+ export declare function confirmAction(message: string): Promise<boolean>;
2
+ export declare function promptForInput(message: string, defaultValue?: string): Promise<string>;
3
+ //# sourceMappingURL=prompts.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"prompts.d.ts","sourceRoot":"","sources":["../../src/utils/prompts.ts"],"names":[],"mappings":"AAEA,wBAAsB,aAAa,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAUrE;AAED,wBAAsB,cAAc,CAAC,OAAO,EAAE,MAAM,EAAE,YAAY,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAgB5F"}
@@ -0,0 +1,37 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.confirmAction = confirmAction;
7
+ exports.promptForInput = promptForInput;
8
+ const inquirer_1 = __importDefault(require("inquirer"));
9
+ async function confirmAction(message) {
10
+ const { confirmed } = await inquirer_1.default.prompt([
11
+ {
12
+ type: 'confirm',
13
+ name: 'confirmed',
14
+ message,
15
+ default: false,
16
+ },
17
+ ]);
18
+ return confirmed;
19
+ }
20
+ async function promptForInput(message, defaultValue) {
21
+ const { value } = await inquirer_1.default.prompt([
22
+ {
23
+ type: 'input',
24
+ name: 'value',
25
+ message,
26
+ default: defaultValue,
27
+ validate: (input) => {
28
+ if (!input || input.trim() === '') {
29
+ return 'This field is required';
30
+ }
31
+ return true;
32
+ },
33
+ },
34
+ ]);
35
+ return value;
36
+ }
37
+ //# sourceMappingURL=prompts.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"prompts.js","sourceRoot":"","sources":["../../src/utils/prompts.ts"],"names":[],"mappings":";;;;;AAEA,sCAUC;AAED,wCAgBC;AA9BD,wDAAgC;AAEzB,KAAK,UAAU,aAAa,CAAC,OAAe;IACjD,MAAM,EAAE,SAAS,EAAE,GAAG,MAAM,kBAAQ,CAAC,MAAM,CAAC;QAC1C;YACE,IAAI,EAAE,SAAS;YACf,IAAI,EAAE,WAAW;YACjB,OAAO;YACP,OAAO,EAAE,KAAK;SACf;KACF,CAAC,CAAC;IACH,OAAO,SAAS,CAAC;AACnB,CAAC;AAEM,KAAK,UAAU,cAAc,CAAC,OAAe,EAAE,YAAqB;IACzE,MAAM,EAAE,KAAK,EAAE,GAAG,MAAM,kBAAQ,CAAC,MAAM,CAAC;QACtC;YACE,IAAI,EAAE,OAAO;YACb,IAAI,EAAE,OAAO;YACb,OAAO;YACP,OAAO,EAAE,YAAY;YACrB,QAAQ,EAAE,CAAC,KAAa,EAAE,EAAE;gBAC1B,IAAI,CAAC,KAAK,IAAI,KAAK,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC;oBAClC,OAAO,wBAAwB,CAAC;gBAClC,CAAC;gBACD,OAAO,IAAI,CAAC;YACd,CAAC;SACF;KACF,CAAC,CAAC;IACH,OAAO,KAAK,CAAC;AACf,CAAC"}
@@ -0,0 +1,17 @@
1
+ export interface Concept {
2
+ topic: string;
3
+ area: string;
4
+ criticality: 1 | 2 | 3;
5
+ }
6
+ export interface ComplexityDocument {
7
+ projectName: string;
8
+ concepts: Concept[];
9
+ }
10
+ export interface Stats {
11
+ totalConcepts: number;
12
+ totalAreas: number;
13
+ criticalCount: number;
14
+ importantCount: number;
15
+ situationalCount: number;
16
+ }
17
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/utils/types.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,OAAO;IACtB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;CACxB;AAED,MAAM,WAAW,kBAAkB;IACjC,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,OAAO,EAAE,CAAC;CACrB;AAED,MAAM,WAAW,KAAK;IACpB,aAAa,EAAE,MAAM,CAAC;IACtB,UAAU,EAAE,MAAM,CAAC;IACnB,aAAa,EAAE,MAAM,CAAC;IACtB,cAAc,EAAE,MAAM,CAAC;IACvB,gBAAgB,EAAE,MAAM,CAAC;CAC1B"}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/utils/types.ts"],"names":[],"mappings":""}
package/package.json ADDED
@@ -0,0 +1,52 @@
1
+ {
2
+ "name": "complexity-cli",
3
+ "version": "1.0.0",
4
+ "description": "A CLI tool for managing project complexity and knowledge maps",
5
+ "main": "dist/index.js",
6
+ "bin": {
7
+ "complexity": "dist/index.js"
8
+ },
9
+ "scripts": {
10
+ "build": "tsc",
11
+ "dev": "tsc --watch",
12
+ "prepublishOnly": "npm run build"
13
+ },
14
+ "keywords": [
15
+ "complexity",
16
+ "documentation",
17
+ "knowledge-map",
18
+ "cli",
19
+ "project-management",
20
+ "onboarding",
21
+ "ai-tools"
22
+ ],
23
+ "author": "Sam Wagner <SamBWagner@users.noreply.github.com>",
24
+ "license": "MIT",
25
+ "repository": {
26
+ "type": "git",
27
+ "url": "git+https://github.com/SamBWagner/complexity-cli.git"
28
+ },
29
+ "bugs": {
30
+ "url": "https://github.com/SamBWagner/complexity-cli/issues"
31
+ },
32
+ "homepage": "https://github.com/SamBWagner/complexity-cli#readme",
33
+ "files": [
34
+ "dist",
35
+ "Complexity.template.md",
36
+ "README.md",
37
+ "LICENSE"
38
+ ],
39
+ "dependencies": {
40
+ "commander": "^12.0.0",
41
+ "inquirer": "^9.2.0",
42
+ "chalk": "^4.1.2"
43
+ },
44
+ "devDependencies": {
45
+ "@types/node": "^20.0.0",
46
+ "@types/inquirer": "^9.0.0",
47
+ "typescript": "^5.3.0"
48
+ },
49
+ "engines": {
50
+ "node": ">=16.0.0"
51
+ }
52
+ }