ng-explorer 0.0.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 (50) hide show
  1. package/.claude-plugin/plugin.json +14 -0
  2. package/LICENSE +674 -0
  3. package/README.md +140 -0
  4. package/bin/ng-explorer.js +6 -0
  5. package/dist/commands/api.d.ts +3 -0
  6. package/dist/commands/api.d.ts.map +1 -0
  7. package/dist/commands/api.js +60 -0
  8. package/dist/commands/api.js.map +1 -0
  9. package/dist/commands/list.d.ts +3 -0
  10. package/dist/commands/list.d.ts.map +1 -0
  11. package/dist/commands/list.js +58 -0
  12. package/dist/commands/list.js.map +1 -0
  13. package/dist/commands/search.d.ts +3 -0
  14. package/dist/commands/search.d.ts.map +1 -0
  15. package/dist/commands/search.js +97 -0
  16. package/dist/commands/search.js.map +1 -0
  17. package/dist/commands/stats.d.ts +3 -0
  18. package/dist/commands/stats.d.ts.map +1 -0
  19. package/dist/commands/stats.js +41 -0
  20. package/dist/commands/stats.js.map +1 -0
  21. package/dist/commands/usage.d.ts +3 -0
  22. package/dist/commands/usage.d.ts.map +1 -0
  23. package/dist/commands/usage.js +110 -0
  24. package/dist/commands/usage.js.map +1 -0
  25. package/dist/index.d.ts +3 -0
  26. package/dist/index.d.ts.map +1 -0
  27. package/dist/index.js +125 -0
  28. package/dist/index.js.map +1 -0
  29. package/dist/services/formatter.d.ts +67 -0
  30. package/dist/services/formatter.d.ts.map +1 -0
  31. package/dist/services/formatter.js +302 -0
  32. package/dist/services/formatter.js.map +1 -0
  33. package/dist/services/loader.d.ts +24 -0
  34. package/dist/services/loader.d.ts.map +1 -0
  35. package/dist/services/loader.js +56 -0
  36. package/dist/services/loader.js.map +1 -0
  37. package/dist/services/searcher.d.ts +48 -0
  38. package/dist/services/searcher.d.ts.map +1 -0
  39. package/dist/services/searcher.js +162 -0
  40. package/dist/services/searcher.js.map +1 -0
  41. package/dist/services/usage-finder.d.ts +33 -0
  42. package/dist/services/usage-finder.d.ts.map +1 -0
  43. package/dist/services/usage-finder.js +156 -0
  44. package/dist/services/usage-finder.js.map +1 -0
  45. package/dist/types/compodoc.d.ts +292 -0
  46. package/dist/types/compodoc.d.ts.map +1 -0
  47. package/dist/types/compodoc.js +40 -0
  48. package/dist/types/compodoc.js.map +1 -0
  49. package/package.json +54 -0
  50. package/skills/ng-explorer/SKILL.md +141 -0
package/README.md ADDED
@@ -0,0 +1,140 @@
1
+ # ng-explorer
2
+
3
+ A CLI tool to efficiently search and explore Angular components, services, directives, and other constructs in Angular projects.
4
+
5
+ ## Installation
6
+
7
+ ```bash
8
+ npm install -g ng-explorer
9
+ ```
10
+
11
+ ### Claude Code Integration
12
+
13
+ For Claude Code users, install the plugin to enable the `/ng-explorer` skill:
14
+
15
+ ```bash
16
+ # Add the marketplace
17
+ /plugin marketplace add willmartian/claude-plugins
18
+
19
+ # Install the plugin
20
+ /plugin install ng-explorer@willmartian
21
+ ```
22
+
23
+ Once installed, you can use `/ng-explorer` directly in your Claude Code sessions to search Angular constructs.
24
+
25
+ ## Prerequisites
26
+
27
+ `ng-explorer` uses Compodoc under the hood. You need to generate the documentation first:
28
+
29
+ ```bash
30
+ # From repository root
31
+ npx compodoc -p tsconfig.json -e json -d . --disablePrivate --disableProtected
32
+ ```
33
+
34
+ This creates a `documentation.json` file in the repository root.
35
+
36
+ ## Usage
37
+
38
+ ### Basic Search
39
+
40
+ Search for Angular constructs by name, or omit the query to list all:
41
+
42
+ ```bash
43
+ # Fuzzy search for anything matching "foo"
44
+ ng-explorer foo
45
+
46
+ # List all components
47
+ ng-explorer --type component
48
+
49
+ # Search only components matching "foo"
50
+ ng-explorer foo --type component
51
+
52
+ # Search directives
53
+ ng-explorer tooltip --type directive
54
+
55
+ # Search in specific subdirectory
56
+ ng-explorer form --path "libs/common/src/components/**"
57
+
58
+ # Exact name match (no fuzzy search)
59
+ ng-explorer FooComponent --exact
60
+
61
+ # Exact match with type filter
62
+ ng-explorer BarService --exact --type injectable
63
+ ```
64
+
65
+ ### Verbose API Details
66
+
67
+ Show full API details using the `--verbose` flag:
68
+
69
+ ```bash
70
+ # View component API (exact match + verbose)
71
+ ng-explorer FooComponent --exact --verbose
72
+ ```
73
+
74
+ The verbose view shows:
75
+ - **For Components**: selector, standalone status, inputs, outputs, properties, methods, constructor dependencies
76
+ - **For Services**: properties, methods, constructor dependencies
77
+ - **For Directives**: selector, inputs, outputs, methods
78
+ - **For Pipes**: pipe name, pure status
79
+
80
+ ### Custom Documentation Path
81
+
82
+ If your documentation.json is in a different location:
83
+
84
+ ```bash
85
+ ng-explorer --doc-path /path/to/documentation.json foo
86
+ ng-explorer -d ./docs/documentation.json FooService --exact --verbose
87
+ ```
88
+
89
+ ## Command Reference
90
+
91
+ ### `ng-explorer [query] [options]`
92
+
93
+ Search for Angular constructs by name or list all constructs.
94
+
95
+ **Arguments:**
96
+ - `[query]` - Search query string (optional - omit to list all)
97
+
98
+ **Options:**
99
+ - `-d, --doc-path <path>` - Path to documentation.json file (default: `./documentation.json`)
100
+ - `-t, --type <type>` - Filter by type: `component`, `injectable`, `directive`, `pipe`, `module`, `class`, `all` (default: `all`)
101
+ - `-p, --path <pattern>` - Filter by file path pattern (supports wildcards like `apps/web/**` or `libs/common/**`)
102
+ - `-l, --limit <number>` - Limit number of results (default: `50`)
103
+ - `-v, --verbose` - Show full API details for each result
104
+ - `-e, --exact` - Use exact name matching instead of fuzzy search
105
+
106
+ **Examples:**
107
+ ```bash
108
+ # Fuzzy search
109
+ ng-explorer foo
110
+ ng-explorer bar --type injectable
111
+
112
+ # Exact match
113
+ ng-explorer FooComponent --exact
114
+
115
+ # Show verbose API details
116
+ ng-explorer FooComponent --exact --verbose
117
+ ng-explorer foo --verbose
118
+
119
+ # Combine filters
120
+ ng-explorer foo --path "apps/web/**" --type component
121
+
122
+ # Custom documentation path
123
+ ng-explorer -d ./docs/documentation.json foo
124
+ ```
125
+
126
+ ## Troubleshooting
127
+
128
+ ### Error: Failed to parse documentation.json
129
+
130
+ The documentation file may be corrupted. Try regenerating it:
131
+
132
+ ```bash
133
+ rm documentation.json
134
+ npx compodoc -p tsconfig.json -e json -d . --disablePrivate --disableProtected
135
+ ```
136
+
137
+
138
+ ## License
139
+
140
+ GPL-3.0
@@ -0,0 +1,6 @@
1
+ #!/usr/bin/env node
2
+
3
+ import('../dist/index.js').catch((err) => {
4
+ console.error('Failed to load ng-explorer:', err.message);
5
+ process.exit(1);
6
+ });
@@ -0,0 +1,3 @@
1
+ import type { Command } from 'commander';
2
+ export declare function registerApiCommand(program: Command): void;
3
+ //# sourceMappingURL=api.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../../src/commands/api.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAKzC,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAiEzD"}
@@ -0,0 +1,60 @@
1
+ import { DocumentationLoader } from '../services/loader.js';
2
+ import { Searcher } from '../services/searcher.js';
3
+ import { Formatter } from '../services/formatter.js';
4
+ export function registerApiCommand(program) {
5
+ program
6
+ .command('api')
7
+ .description('Display API details for a component, service, or other construct')
8
+ .argument('<name>', 'Name of the construct')
9
+ .option('-t, --type <type>', 'Filter by type (component, injectable, directive, pipe, module, class)', 'all')
10
+ .action(async (name, options, command) => {
11
+ const docPath = command.parent?.opts().docPath || './documentation.json';
12
+ try {
13
+ // Validate type option
14
+ const validTypes = [
15
+ 'component',
16
+ 'injectable',
17
+ 'directive',
18
+ 'pipe',
19
+ 'module',
20
+ 'class',
21
+ 'all',
22
+ ];
23
+ if (!validTypes.includes(options.type)) {
24
+ console.error(`Invalid type: ${options.type}. Valid types: ${validTypes.join(', ')}`);
25
+ process.exit(1);
26
+ }
27
+ // Load documentation
28
+ const loader = new DocumentationLoader(docPath);
29
+ const data = await loader.load();
30
+ // Search for exact match
31
+ const searcher = new Searcher(data);
32
+ const construct = searcher.findByName(name, options.type);
33
+ if (!construct) {
34
+ console.error(`No construct found with name: ${name}`);
35
+ // Try fuzzy search to suggest similar names
36
+ const similar = searcher.search(name, options.type);
37
+ if (similar.length > 0) {
38
+ console.error('\nDid you mean one of these?');
39
+ similar.slice(0, 5).forEach((s) => {
40
+ console.error(` • ${s.name} (${s.type})`);
41
+ });
42
+ }
43
+ process.exit(1);
44
+ }
45
+ // Format and display API details
46
+ const formatter = new Formatter();
47
+ console.log(formatter.formatApiDetails(construct));
48
+ }
49
+ catch (error) {
50
+ if (error instanceof Error) {
51
+ console.error(`Error: ${error.message}`);
52
+ }
53
+ else {
54
+ console.error('An unexpected error occurred');
55
+ }
56
+ process.exit(1);
57
+ }
58
+ });
59
+ }
60
+ //# sourceMappingURL=api.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"api.js","sourceRoot":"","sources":["../../src/commands/api.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,QAAQ,EAAiB,MAAM,yBAAyB,CAAC;AAClE,OAAO,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AAErD,MAAM,UAAU,kBAAkB,CAAC,OAAgB;IACjD,OAAO;SACJ,OAAO,CAAC,KAAK,CAAC;SACd,WAAW,CAAC,kEAAkE,CAAC;SAC/E,QAAQ,CAAC,QAAQ,EAAE,uBAAuB,CAAC;SAC3C,MAAM,CACL,mBAAmB,EACnB,wEAAwE,EACxE,KAAK,CACN;SACA,MAAM,CAAC,KAAK,EAAE,IAAY,EAAE,OAAyB,EAAE,OAAgB,EAAE,EAAE;QAC1E,MAAM,OAAO,GAAG,OAAO,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC,OAAO,IAAI,sBAAsB,CAAC;QACzE,IAAI,CAAC;YACH,uBAAuB;YACvB,MAAM,UAAU,GAAG;gBACjB,WAAW;gBACX,YAAY;gBACZ,WAAW;gBACX,MAAM;gBACN,QAAQ;gBACR,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SAAS,GAAG,IAAI,SAAS,EAAE,CAAC;YAClC,OAAO,CAAC,GAAG,CAAC,SAAS,CAAC,gBAAgB,CAAC,SAAS,CAAC,CAAC,CAAC;QACrD,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,IAAI,KAAK,YAAY,KAAK,EAAE,CAAC;gBAC3B,OAAO,CAAC,KAAK,CAAC,UAAU,KAAK,CAAC,OAAO,EAAE,CAAC,CAAC;YAC3C,CAAC;iBAAM,CAAC;gBACN,OAAO,CAAC,KAAK,CAAC,8BAA8B,CAAC,CAAC;YAChD,CAAC;YACD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QAClB,CAAC;IACH,CAAC,CAAC,CAAC;AACP,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { Command } from 'commander';
2
+ export declare function registerListCommand(program: Command): void;
3
+ //# sourceMappingURL=list.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"list.d.ts","sourceRoot":"","sources":["../../src/commands/list.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAKzC,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CA8D1D"}
@@ -0,0 +1,58 @@
1
+ import { DocumentationLoader } from '../services/loader.js';
2
+ import { Searcher } from '../services/searcher.js';
3
+ import { Formatter } from '../services/formatter.js';
4
+ export function registerListCommand(program) {
5
+ program
6
+ .command('list')
7
+ .description('List all constructs of a specific type')
8
+ .argument('<type>', 'Type to list (component, injectable, directive, pipe, module, class, all)')
9
+ .option('-l, --limit <number>', 'Limit number of results', '50')
10
+ .action(async (type, options, command) => {
11
+ const docPath = command.parent?.opts().docPath || './documentation.json';
12
+ try {
13
+ // Validate type argument
14
+ const validTypes = [
15
+ 'component',
16
+ 'injectable',
17
+ 'directive',
18
+ 'pipe',
19
+ 'module',
20
+ 'class',
21
+ 'all',
22
+ ];
23
+ if (!validTypes.includes(type)) {
24
+ console.error(`Invalid type: ${type}. Valid types: ${validTypes.join(', ')}`);
25
+ process.exit(1);
26
+ }
27
+ // Load documentation
28
+ const loader = new DocumentationLoader(docPath);
29
+ const data = await loader.load();
30
+ // List constructs
31
+ const searcher = new Searcher(data);
32
+ const constructs = searcher.listByType(type);
33
+ // Apply limit
34
+ const limit = parseInt(options.limit, 10);
35
+ const limitedResults = constructs.slice(0, limit);
36
+ // Format and display results
37
+ const formatter = new Formatter();
38
+ console.log(formatter.formatSearchResults(limitedResults));
39
+ // Show count
40
+ if (constructs.length > limit) {
41
+ console.log(`\nShowing ${limit} of ${constructs.length} result(s). Use --limit to show more.`);
42
+ }
43
+ else if (constructs.length > 0) {
44
+ console.log(`\nFound ${constructs.length} result(s)`);
45
+ }
46
+ }
47
+ catch (error) {
48
+ if (error instanceof Error) {
49
+ console.error(`Error: ${error.message}`);
50
+ }
51
+ else {
52
+ console.error('An unexpected error occurred');
53
+ }
54
+ process.exit(1);
55
+ }
56
+ });
57
+ }
58
+ //# sourceMappingURL=list.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"list.js","sourceRoot":"","sources":["../../src/commands/list.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,QAAQ,EAAiB,MAAM,yBAAyB,CAAC;AAClE,OAAO,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AAErD,MAAM,UAAU,mBAAmB,CAAC,OAAgB;IAClD,OAAO;SACJ,OAAO,CAAC,MAAM,CAAC;SACf,WAAW,CAAC,wCAAwC,CAAC;SACrD,QAAQ,CACP,QAAQ,EACR,2EAA2E,CAC5E;SACA,MAAM,CAAC,sBAAsB,EAAE,yBAAyB,EAAE,IAAI,CAAC;SAC/D,MAAM,CAAC,KAAK,EAAE,IAAY,EAAE,OAA0B,EAAE,OAAgB,EAAE,EAAE;QAC3E,MAAM,OAAO,GAAG,OAAO,CAAC,MAAM,EAAE,IAAI,EA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,EAAE,CAAC;gBACjC,OAAO,CAAC,GAAG,CAAC,WAAW,UAAU,CAAC,MAAM,YAAY,CAAC,CAAC;YACxD,CAAC;QACH,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,IAAI,KAAK,YAAY,KAAK,EAAE,CAAC;gBAC3B,OAAO,CAAC,KAAK,CAAC,UAAU,KAAK,CAAC,OAAO,EAAE,CAAC,CAAC;YAC3C,CAAC;iBAAM,CAAC;gBACN,OAAO,CAAC,KAAK,CAAC,8BAA8B,CAAC,CAAC;YAChD,CAAC;YACD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QAClB,CAAC;IACH,CAAC,CAAC,CAAC;AACP,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { Command } from 'commander';
2
+ export declare function registerSearchCommand(program: Command): void;
3
+ //# sourceMappingURL=search.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"search.d.ts","sourceRoot":"","sources":["../../src/commands/search.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAKzC,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CA6G5D"}
@@ -0,0 +1,97 @@
1
+ import { DocumentationLoader } from '../services/loader.js';
2
+ import { Searcher } from '../services/searcher.js';
3
+ import { Formatter } from '../services/formatter.js';
4
+ export function registerSearchCommand(program) {
5
+ program
6
+ .command('search')
7
+ .description('Search for Angular components, services, directives, etc. (omit query to list all)')
8
+ .argument('[query]', 'Search query (optional - omit to list all)')
9
+ .option('-t, --type <type>', 'Filter by type (component, injectable, directive, pipe, module, class, all)', 'all')
10
+ .option('-p, --path <pattern>', 'Filter by file path pattern (supports wildcards like apps/web/**)')
11
+ .option('-l, --limit <number>', 'Limit number of results', '50')
12
+ .option('-d, --detailed', 'Show full API details for each result')
13
+ .option('-e, --exact', 'Use exact name matching instead of fuzzy search')
14
+ .action(async (query, options, command) => {
15
+ const docPath = command.parent?.opts().docPath || './documentation.json';
16
+ try {
17
+ // Validate type option
18
+ const validTypes = [
19
+ 'component',
20
+ 'injectable',
21
+ 'directive',
22
+ 'pipe',
23
+ 'module',
24
+ 'class',
25
+ 'all',
26
+ ];
27
+ if (!validTypes.includes(options.type)) {
28
+ console.error(`Invalid type: ${options.type}. Valid types: ${validTypes.join(', ')}`);
29
+ process.exit(1);
30
+ }
31
+ // Load documentation
32
+ const loader = new DocumentationLoader(docPath);
33
+ const data = await loader.load();
34
+ // Search or list
35
+ const searcher = new Searcher(data);
36
+ const limit = parseInt(options.limit, 10);
37
+ let results;
38
+ if (query) {
39
+ // Search with query
40
+ if (options.exact) {
41
+ // Exact name matching
42
+ results = searcher.searchExact(query, options.type, options.path, limit);
43
+ }
44
+ else {
45
+ // Fuzzy search
46
+ results = searcher.search(query, options.type, options.path, limit);
47
+ }
48
+ }
49
+ else {
50
+ // List all (no query)
51
+ results = searcher.listByType(options.type, options.path, limit);
52
+ }
53
+ // Format and display results
54
+ const formatter = new Formatter();
55
+ if (options.detailed) {
56
+ // Show full API details for each result
57
+ results.forEach((result, index) => {
58
+ if (index > 0) {
59
+ console.log('\n' + '─'.repeat(80) + '\n');
60
+ }
61
+ console.log(formatter.formatApiDetails(result));
62
+ });
63
+ }
64
+ else {
65
+ // Show list view
66
+ console.log(formatter.formatSearchResults(results));
67
+ }
68
+ // Show count
69
+ if (results.length > 0) {
70
+ if (!query) {
71
+ // When listing (no query), show total count
72
+ const totalCount = searcher.getCountByType(options.type, options.path);
73
+ if (results.length < totalCount) {
74
+ console.log(`\nShowing ${results.length} of ${totalCount} result(s). Use --limit to show more.`);
75
+ }
76
+ else {
77
+ console.log(`\nFound ${results.length} result(s)`);
78
+ }
79
+ }
80
+ else {
81
+ // When searching with query, just show count
82
+ console.log(`\nFound ${results.length} result(s)`);
83
+ }
84
+ }
85
+ }
86
+ catch (error) {
87
+ if (error instanceof Error) {
88
+ console.error(`Error: ${error.message}`);
89
+ }
90
+ else {
91
+ console.error('An unexpected error occurred');
92
+ }
93
+ process.exit(1);
94
+ }
95
+ });
96
+ }
97
+ //# sourceMappingURL=search.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"search.js","sourceRoot":"","sources":["../../src/commands/search.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,QAAQ,EAAiB,MAAM,yBAAyB,CAAC;AAClE,OAAO,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AAErD,MAAM,UAAU,qBAAqB,CAAC,OAAgB;IACpD,OAAO;SACJ,OAAO,CAAC,QAAQ,CAAC;SACjB,WAAW,CAAC,oFAAoF,CAAC;SACjG,QAAQ,CAAC,SAAS,EAAE,4CAA4C,CAAC;SACjE,MAAM,CACL,mBAAmB,EACnB,6EAA6E,EAC7E,KAAK,CACN;SACA,MAAM,CACL,sBAAsB,EACtB,mEAAmE,CACpE;SACA,MAAM,CACL,sBAAsB,EACtB,yBAAyB,EACzB,IAAI,CACL;SACA,MAAM,CACL,gBAAgB,EAChB,uCAAuC,CACxC;SACA,MAAM,CACL,aAAa,EACb,iDAAiD,CAClD;SACA,MAAM,CAAC,KAAK,EAAE,KAAyB,EAAE,OAA4F,EAAE,OAAgB,EAAE,EAAE;QAC1J,MAAM,OAAO,GAAG,OAAO,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC,OAAO,IAAI,sBAAsB,CAAC;QACzE,IAAI,CAAC;YACH,uBAAuB;YACvB,MAAM,UAAU,GAAG;gBACjB,WAAW;gBACX,YAAY;gBACZ,WAAW;gBACX,MAAM;gBACN,QAAQ;gBACR,OAAO;gBACP,KAAK;aACN,CAAC;YACF,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC;gBACvC,OAAO,CAAC,KAAK,CACX,iBAAiB,OAAO,CAAC,IAAI,kBAAkB,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,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CAAC;IACH,CAAC,CAAC,CAAC;AACP,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { Command } from 'commander';
2
+ export declare function registerStatsCommand(program: Command): void;
3
+ //# sourceMappingURL=stats.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"stats.d.ts","sourceRoot":"","sources":["../../src/commands/stats.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAKzC,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAoC3D"}
@@ -0,0 +1,41 @@
1
+ import chalk from 'chalk';
2
+ import { DocumentationLoader } from '../services/loader.js';
3
+ import { Searcher } from '../services/searcher.js';
4
+ export function registerStatsCommand(program) {
5
+ program
6
+ .command('stats')
7
+ .description('Show statistics about the Angular codebase')
8
+ .action(async function () {
9
+ const docPath = this.parent?.opts().docPath || './documentation.json';
10
+ try {
11
+ // Load documentation
12
+ const loader = new DocumentationLoader(docPath);
13
+ const data = await loader.load();
14
+ // Get stats
15
+ const searcher = new Searcher(data);
16
+ const stats = searcher.getStats();
17
+ // Display stats
18
+ console.log(chalk.bold.cyan('\nAngular Codebase Statistics'));
19
+ console.log(chalk.gray('─'.repeat(40)));
20
+ console.log(`${chalk.blue('Components:')} ${chalk.green(stats.components)}`);
21
+ console.log(`${chalk.magenta('Injectables:')} ${chalk.green(stats.injectables)}`);
22
+ console.log(`${chalk.cyan('Directives:')} ${chalk.green(stats.directives)}`);
23
+ console.log(`${chalk.yellow('Pipes:')} ${chalk.green(stats.pipes)}`);
24
+ console.log(`${chalk.green('Modules:')} ${chalk.green(stats.modules)}`);
25
+ console.log(`${chalk.white('Classes:')} ${chalk.green(stats.classes)}`);
26
+ console.log(chalk.gray('─'.repeat(40)));
27
+ console.log(`${chalk.bold('Total:')} ${chalk.bold.green(stats.total)}`);
28
+ console.log('');
29
+ }
30
+ catch (error) {
31
+ if (error instanceof Error) {
32
+ console.error(`Error: ${error.message}`);
33
+ }
34
+ else {
35
+ console.error('An unexpected error occurred');
36
+ }
37
+ process.exit(1);
38
+ }
39
+ });
40
+ }
41
+ //# sourceMappingURL=stats.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"stats.js","sourceRoot":"","sources":["../../src/commands/stats.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AAEnD,MAAM,UAAU,oBAAoB,CAAC,OAAgB;IACnD,OAAO;SACJ,OAAO,CAAC,OAAO,CAAC;SAChB,WAAW,CAAC,4CAA4C,CAAC;SACzD,MAAM,CAAC,KAAK;QACX,MAAM,OAAO,GAAG,IAAI,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC,OAAO,IAAI,sBAAsB,CAAC;QACtE,IAAI,CAAC;YACH,qBAAqB;YACrB,MAAM,MAAM,GAAG,IAAI,mBAAmB,CAAC,OAAO,CAAC,CAAC;YAChD,MAAM,IAAI,GAAG,MAAM,MAAM,CAAC,IAAI,EAAE,CAAC;YAEjC,YAAY;YACZ,MAAM,QAAQ,GAAG,IAAI,QAAQ,CAAC,IAAI,CAAC,CAAC;YACpC,MAAM,KAAK,GAAG,QAAQ,CAAC,QAAQ,EAAE,CAAC;YAElC,gBAAgB;YAChB,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,+BAA+B,CAAC,CAAC,CAAC;YAC9D,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;YACxC,OAAO,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC,IAAI,CAAC,aAAa,CAAC,QAAQ,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,UAAU,CAAC,EAAE,CAAC,CAAC;YACjF,OAAO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,KAAK,CAAC,8BAA8B,CAAC,CAAC;YAChD,CAAC;YACD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QAClB,CAAC;IACH,CAAC,CAAC,CAAC;AACP,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { Command } from 'commander';
2
+ export declare function registerUsageCommand(program: Command): void;
3
+ //# sourceMappingURL=usage.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"usage.d.ts","sourceRoot":"","sources":["../../src/commands/usage.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAOzC,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAgI3D"}
@@ -0,0 +1,110 @@
1
+ import chalk from 'chalk';
2
+ import { DocumentationLoader } from '../services/loader.js';
3
+ import { Searcher } from '../services/searcher.js';
4
+ import { UsageFinder } from '../services/usage-finder.js';
5
+ import { isComponent, isDirective, isPipe } from '../types/compodoc.js';
6
+ export function registerUsageCommand(program) {
7
+ program
8
+ .command('usage')
9
+ .description('Find where a component, service, or directive is used in the codebase')
10
+ .argument('<name>', 'Name of the construct')
11
+ .option('-t, --type <type>', 'Filter by type (component, injectable, directive, pipe, module, class)', 'all')
12
+ .option('-l, --limit <number>', 'Limit number of results', '50')
13
+ .action(async (name, options, command) => {
14
+ try {
15
+ // Validate type option
16
+ const validTypes = [
17
+ 'component',
18
+ 'injectable',
19
+ 'directive',
20
+ 'pipe',
21
+ 'module',
22
+ 'class',
23
+ 'all',
24
+ ];
25
+ if (!validTypes.includes(options.type)) {
26
+ console.error(`Invalid type: ${options.type}. Valid types: ${validTypes.join(', ')}`);
27
+ process.exit(1);
28
+ }
29
+ const docPath = command.parent?.opts().docPath || './documentation.json';
30
+ // Load documentation
31
+ const loader = new DocumentationLoader(docPath);
32
+ const data = await loader.load();
33
+ // Search for exact match
34
+ const searcher = new Searcher(data);
35
+ const construct = searcher.findByName(name, options.type);
36
+ if (!construct) {
37
+ console.error(chalk.red(`No construct found with name: ${name}`));
38
+ // Try fuzzy search to suggest similar names
39
+ const similar = searcher.search(name, options.type);
40
+ if (similar.length > 0) {
41
+ console.error('\nDid you mean one of these?');
42
+ similar.slice(0, 5).forEach((s) => {
43
+ console.error(` • ${s.name} (${s.type})`);
44
+ });
45
+ }
46
+ process.exit(1);
47
+ }
48
+ // Find usages
49
+ console.log(chalk.bold.white(construct.name));
50
+ // Show what we're searching for
51
+ if (isComponent(construct) || isDirective(construct)) {
52
+ const selector = construct.selector;
53
+ if (selector) {
54
+ console.log(chalk.gray(`Searching for selector: ${selector}`));
55
+ }
56
+ }
57
+ else if (isPipe(construct)) {
58
+ const pipeName = construct.pipeName;
59
+ if (pipeName) {
60
+ console.log(chalk.gray(`Searching for pipe: ${pipeName}`));
61
+ }
62
+ }
63
+ else {
64
+ console.log(chalk.gray(`Searching for: ${construct.name}`));
65
+ }
66
+ console.log('');
67
+ const finder = new UsageFinder();
68
+ const matches = finder.findUsages(construct);
69
+ if (matches.length === 0) {
70
+ console.log(chalk.yellow('No usages found.'));
71
+ return;
72
+ }
73
+ // Apply limit
74
+ const limit = parseInt(options.limit, 10);
75
+ const limitedMatches = matches.slice(0, limit);
76
+ // Group by file
77
+ const grouped = finder.groupByFile(limitedMatches);
78
+ console.log(chalk.cyan(`Found ${matches.length} usage(s) in ${grouped.size} file(s)\n`));
79
+ // Display results grouped by file
80
+ for (const [file, fileMatches] of grouped) {
81
+ console.log(chalk.bold.blue(file));
82
+ for (const match of fileMatches) {
83
+ // Show line number and content
84
+ console.log(chalk.gray(` ${match.line}:`) + ` ${match.content.trim()}`);
85
+ // Show context if available
86
+ if (match.context.length > 0) {
87
+ match.context.forEach(contextLine => {
88
+ console.log(chalk.dim(` ${contextLine.trim()}`));
89
+ });
90
+ }
91
+ console.log(''); // Empty line between matches
92
+ }
93
+ }
94
+ // Show if results were limited
95
+ if (matches.length > limit) {
96
+ console.log(chalk.yellow(`\nShowing ${limit} of ${matches.length} result(s). Use --limit to show more.`));
97
+ }
98
+ }
99
+ catch (error) {
100
+ if (error instanceof Error) {
101
+ console.error(`Error: ${error.message}`);
102
+ }
103
+ else {
104
+ console.error('An unexpected error occurred');
105
+ }
106
+ process.exit(1);
107
+ }
108
+ });
109
+ }
110
+ //# sourceMappingURL=usage.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"usage.js","sourceRoot":"","sources":["../../src/commands/usage.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,QAAQ,EAAiB,MAAM,yBAAyB,CAAC;AAClE,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAC1D,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAExE,MAAM,UAAU,oBAAoB,CAAC,OAAgB;IACnD,OAAO;SACJ,OAAO,CAAC,OAAO,CAAC;SAChB,WAAW,CAAC,uEAAuE,CAAC;SACpF,QAAQ,CAAC,QAAQ,EAAE,uBAAuB,CAAC;SAC3C,MAAM,CACL,mBAAmB,EACnB,wEAAwE,EACxE,KAAK,CACN;SACA,MAAM,CACL,sBAAsB,EACtB,yBAAyB,EACzB,IAAI,CACL;SACA,MAAM,CAAC,KAAK,EAAE,IAAY,EAAE,OAAwC,EAAE,OAAgB,EAAE,EAAE;QACzF,IAAI,CAAC;YACH,uBAAuB;YACvB,MAAM,UAAU,GAAG;gBACjB,WAAW;gBACX,YAAY;gBACZ,WAAW;gBACX,MAAM;gBACN,QAAQ;gBACR,OAAO;gBACP,KAAK;aACN,CAAC;YACF,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC;gBACvC,OAAO,CAAC,KAAK,CACX,iBAAiB,OAAO,CAAC,IAAI,kBAAkB,UAAU,CAAC,IAAI,CAAC,I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