Skip to content

Commit 4d59481

Browse files
committed
chore(): update docs
1 parent b1eab19 commit 4d59481

File tree

9 files changed

+29
-28
lines changed

9 files changed

+29
-28
lines changed

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ A Model Context Protocol (MCP) server that provides Angular project analysis and
2424

2525
### Prerequisites
2626

27-
- Node.js (version 18 or higher)
27+
- Node.js (version 18 or higher) with ESM support
2828

2929
### Installation & Setup
3030

@@ -96,6 +96,7 @@ const dsComponents = [
9696
}
9797
];
9898

99+
// Note: Use CommonJS export for configuration files
99100
module.exports = dsComponents;
100101
```
101102

docs/architecture-internal-design.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ packages/angular-mcp-server/
8383
| **Prompt** | `prompts/prompt-registry.ts` | 1. Append schema to `PROMPTS`. <br>2. Provide implementation in `PROMPTS_IMPL`. |
8484
| **Resource Provider** | `registerResources()` | Extend logic to aggregate custom docs or design-system assets. |
8585

86-
All tools share the `ToolsConfig` interface (`@push-based/models`) that bundles:
86+
All tools share the `ToolsConfig` interface (`@code-pushup/models`) that bundles:
8787
- `schema` (name, description, arguments, return type)
8888
- `handler(request)` async function.
8989

docs/writing-custom-tools.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ File name **must** end with `.tool.ts` so tests & registries can auto-discover i
2424

2525
```ts
2626
import { z } from 'zod';
27-
import { ToolSchemaOptions, ToolsConfig } from '@push-based/models';
27+
import { ToolSchemaOptions, ToolsConfig } from '@code-pushup/models';
2828
import { createHandler, RESULT_FORMATTERS } from '../shared/utils/handler-helpers.js';
2929

3030
// 1️⃣ Schema

packages/shared/DEPENDENCIES.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ This document provides an AI-friendly overview of the shared libraries in the `/
66

77
### Foundation Layer (No Internal Dependencies)
88

9-
#### `@push-based/models`
9+
#### `@code-pushup/models`
1010

1111
- **Purpose**: Core types, interfaces, and Zod schemas for the entire ecosystem
1212
- **Key Exports**: Issue, AuditOutput, PluginConfig, CategoryConfig, ToolSchemaOptions
@@ -22,7 +22,7 @@ This document provides an AI-friendly overview of the shared libraries in the `/
2222

2323
### Intermediate Layer (Single Foundation Dependency)
2424

25-
#### `@push-based/utils`
25+
#### `@code-pushup/utils`
2626

2727
- **Purpose**: General utility functions and file system operations
2828
- **Key Exports**: findFilesWithPattern, resolveFile
@@ -63,18 +63,18 @@ This document provides an AI-friendly overview of the shared libraries in the `/
6363
## Dependency Graph
6464

6565
```
66-
models (foundation)
67-
├── utils
66+
@code-pushup/models (foundation)
67+
├── @code-pushup/utils
6868
├── styles-ast-utils
6969
└── angular-ast-utils
70-
├── models
71-
├── utils
70+
├── @code-pushup/models
71+
├── @code-pushup/utils
7272
├── typescript-ast-utils
7373
└── styles-ast-utils
7474
7575
ds-component-coverage (most complex)
76-
├── models
77-
├── utils
76+
├── @code-pushup/models
77+
├── @code-pushup/utils
7878
├── styles-ast-utils
7979
└── angular-ast-utils
8080
```
@@ -128,7 +128,7 @@ Based on dependencies, the correct build order is:
128128
import { Issue, AuditOutput } from '@code-pushup/models';
129129

130130
// File operations
131-
import { resolveFile, findFilesWithPattern } from '@push-based/utils';
131+
import { resolveFile, findFilesWithPattern } from '@code-pushup/utils';
132132

133133
// Angular component parsing
134134
import {

packages/shared/LLMS.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ Each library provides three types of AI documentation:
2424

2525
## 🏗️ Foundation Layer <a id="foundation-layer"></a>
2626

27-
### @push-based/models <a id="models"></a>
27+
### @code-pushup/models <a id="models"></a>
2828

2929
Core types, interfaces, and Zod schemas for the entire ecosystem.
3030

@@ -42,7 +42,7 @@ TypeScript AST parsing and manipulation utilities.
4242

4343
## 🔧 Intermediate Layer <a id="intermediate-layer"></a>
4444

45-
### @push-based/utils <a id="utils"></a>
45+
### @code-pushup/utils <a id="utils"></a>
4646

4747
General utility functions and file system operations.
4848

packages/shared/models/ai/API.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Simple **TypeScript types** for Angular MCP toolkit shared interfaces and utilit
55
## Minimal usage
66

77
```ts
8-
import { type CliArgsObject, type ToolsConfig } from '@push-based/models';
8+
import { type CliArgsObject, type ToolsConfig } from '@code-pushup/models';
99

1010
// CLI argument types
1111
const args: CliArgsObject = {

packages/shared/models/ai/EXAMPLES.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
> Type-safe handling of command line arguments.
66
77
```ts
8-
import { type CliArgsObject, type ArgumentValue } from '@push-based/models';
8+
import { type CliArgsObject, type ArgumentValue } from '@code-pushup/models';
99

1010
// Basic CLI arguments
1111
const args: CliArgsObject = {
@@ -45,7 +45,7 @@ console.log(`Analyzing ${typedArgs.componentName} in ${typedArgs.directory}`);
4545
> Build Model Context Protocol tools with proper typing.
4646
4747
```ts
48-
import { type ToolsConfig, type ToolSchemaOptions } from '@push-based/models';
48+
import { type ToolsConfig, type ToolSchemaOptions } from '@code-pushup/models';
4949

5050
// Define a simple MCP tool
5151
const reportViolationsTool: ToolsConfig = {
@@ -106,7 +106,7 @@ console.log(`Tool: ${reportViolationsTool.schema.name}`);
106106
> Create objects that can report issues and diagnostics.
107107
108108
```ts
109-
import { type DiagnosticsAware } from '@push-based/models';
109+
import { type DiagnosticsAware } from '@code-pushup/models';
110110

111111
class ComponentAnalyzer implements DiagnosticsAware {
112112
private issues: Array<{ code?: number; message: string; severity: string }> = [];
@@ -166,7 +166,7 @@ console.log(`Issues after clear: ${analyzer.getIssues().length}`); // → 0
166166
import {
167167
type ToolsConfig,
168168
type ToolHandlerContentResult,
169-
} from '@push-based/models';
169+
} from '@code-pushup/models';
170170

171171
const buildComponentContractTool: ToolsConfig = {
172172
schema: {
@@ -224,4 +224,4 @@ async function generateContract(params: any) {
224224
}
225225
```
226226

227-
These examples demonstrate the practical usage patterns of the `@push-based/models` library for building type-safe CLI tools, MCP integrations, and diagnostic utilities in the Angular MCP toolkit.
227+
These examples demonstrate the practical usage patterns of the `@code-pushup/models` library for building type-safe CLI tools, MCP integrations, and diagnostic utilities in the Angular MCP toolkit.

packages/shared/utils/ai/API.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import {
1111
resolveFileCached,
1212
slugify,
1313
objectToCliArgs,
14-
} from '@push-based/utils';
14+
} from '@code-pushup/utils';
1515

1616
// Execute a process with observer
1717
const result = await executeProcess({

packages/shared/utils/ai/EXAMPLES.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
> Execute commands with live output streaming and error handling.
66
77
```ts
8-
import { executeProcess, ProcessObserver } from '@push-based/utils';
8+
import { executeProcess, ProcessObserver } from '@code-pushup/utils';
99

1010
// Create an observer to handle process events
1111
const observer: ProcessObserver = {
@@ -53,7 +53,7 @@ import {
5353
findFilesWithPattern,
5454
findInFile,
5555
resolveFileCached,
56-
} from '@push-based/utils';
56+
} from '@code-pushup/utils';
5757

5858
// Find all TypeScript files containing 'Component'
5959
const componentFiles = await findFilesWithPattern('./src', 'Component');
@@ -100,7 +100,7 @@ if (componentFiles.length > 0) {
100100
> Format commands with colors and context for better development experience.
101101
102102
```ts
103-
import { formatCommandLog, isVerbose, calcDuration } from '@push-based/utils';
103+
import { formatCommandLog, isVerbose, calcDuration } from '@code-pushup/utils';
104104

105105
// Set verbose mode for demonstration
106106
process.env['NG_MCP_VERBOSE'] = 'true';
@@ -159,7 +159,7 @@ if (isVerbose()) {
159159
> Convert objects to command-line arguments for process execution.
160160
161161
```ts
162-
import { objectToCliArgs, executeProcess } from '@push-based/utils';
162+
import { objectToCliArgs, executeProcess } from '@code-pushup/utils';
163163

164164
// Simple configuration object
165165
const config = {
@@ -226,7 +226,7 @@ complexArgs.forEach((arg) => console.log(` ${arg}`));
226226
> Handle process errors gracefully with comprehensive error information.
227227
228228
```ts
229-
import { executeProcess, ProcessError } from '@push-based/utils';
229+
import { executeProcess, ProcessError } from '@code-pushup/utils';
230230

231231
async function robustProcessExecution() {
232232
const commands = [
@@ -329,7 +329,7 @@ import {
329329
accessContent,
330330
getLineHits,
331331
isExcludedDirectory,
332-
} from '@push-based/utils';
332+
} from '@code-pushup/utils';
333333

334334
// Custom file finder with filtering
335335
async function findLargeTypeScriptFiles(
@@ -435,4 +435,4 @@ if (largeFiles.length > 0) {
435435

436436

437437

438-
These examples demonstrate the comprehensive capabilities of the `@push-based/utils` library for process execution, file operations, string manipulation, and development tooling in Node.js applications.
438+
These examples demonstrate the comprehensive capabilities of the `@code-pushup/utils` library for process execution, file operations, string manipulation, and development tooling in Node.js applications.

0 commit comments

Comments
 (0)