Skip to content

Commit 2950e39

Browse files
committed
fix(): address import documentation feedback
1 parent 1f4a181 commit 2950e39

File tree

7 files changed

+25
-24
lines changed

7 files changed

+25
-24
lines changed

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 (`@code-pushup/models`) that bundles:
86+
All tools share the `ToolsConfig` interface (`@push-based/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 '@code-pushup/models';
27+
import { ToolSchemaOptions, ToolsConfig } from '@push-based/models';
2828
import { createHandler, RESULT_FORMATTERS } from '../shared/utils/handler-helpers.js';
2929

3030
// 1️⃣ Schema

packages/shared/DEPENDENCIES.md

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

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

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

11-
- **Purpose**: Core types, interfaces, and Zod schemas for the entire ecosystem
12-
- **Key Exports**: Issue, AuditOutput, PluginConfig, CategoryConfig, ToolSchemaOptions
11+
- **Purpose**: Core types and interfaces for CLI and MCP tooling
12+
- **Key Exports**: CliArgsObject, ArgumentValue, ToolSchemaOptions, ToolsConfig, ToolHandlerContentResult, DiagnosticsAware
1313
- **Dependencies**: None (foundation library)
1414
- **Used By**: All other shared libraries
1515

@@ -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-
#### `@code-pushup/utils`
25+
#### `@push-based/utils`
2626

2727
- **Purpose**: General utility functions and file system operations
2828
- **Key Exports**: findFilesWithPattern, resolveFile
@@ -114,7 +114,7 @@ Based on dependencies, the correct build order is:
114114

115115
### When to Use Each Library
116116

117-
- **models**: When you need type definitions, schemas, or interfaces
117+
- **models**: When you need CLI argument types or MCP tooling interfaces
118118
- **utils**: For file operations, string manipulation, or general utilities
119119
- **typescript-ast-utils**: For TypeScript code analysis and manipulation
120120
- **styles-ast-utils**: For CSS/SCSS parsing and analysis
@@ -125,7 +125,7 @@ Based on dependencies, the correct build order is:
125125

126126
```typescript
127127
// Foundation types
128-
import { Issue, AuditOutput } from '@code-pushup/models';
128+
import { CliArgsObject, ToolSchemaOptions, DiagnosticsAware } from '@push-based/models';
129129

130130
// File operations
131131
import { resolveFile, findFilesWithPattern } from '@code-pushup/utils';
@@ -148,7 +148,7 @@ import {
148148

149149
### Integration Points
150150

151-
- All libraries use `models` for consistent type definitions
151+
- All libraries use `models` for CLI and MCP tooling type definitions
152152
- File operations flow through `utils`
153153
- AST operations are specialized by language (TS, CSS, Angular)
154154
- Complex analysis combines multiple AST utilities through `angular-ast-utils`

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 '@code-pushup/models';
8+
import { type CliArgsObject, type ToolsConfig } from '@push-based/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 '@code-pushup/models';
8+
import { type CliArgsObject, type ArgumentValue } from '@push-based/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 '@code-pushup/models';
48+
import { type ToolsConfig, type ToolSchemaOptions } from '@push-based/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 '@code-pushup/models';
109+
import { type DiagnosticsAware } from '@push-based/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 '@code-pushup/models';
169+
} from '@push-based/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 `@code-pushup/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 `@push-based/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: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,10 @@ import {
99
executeProcess,
1010
findFilesWithPattern,
1111
resolveFileCached,
12-
slugify,
1312
objectToCliArgs,
14-
} from '@code-pushup/utils';
13+
} from '@push-based/utils';
14+
15+
import { slugify } from '@code-pushup/utils';
1516

1617
// Execute a process with observer
1718
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 '@code-pushup/utils';
8+
import { executeProcess, ProcessObserver } from '@push-based/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 '@code-pushup/utils';
56+
} from '@push-based/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 '@code-pushup/utils';
103+
import { formatCommandLog, isVerbose, calcDuration } from '@push-based/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 '@code-pushup/utils';
162+
import { objectToCliArgs, executeProcess } from '@push-based/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 '@code-pushup/utils';
229+
import { executeProcess, ProcessError } from '@push-based/utils';
230230

231231
async function robustProcessExecution() {
232232
const commands = [
@@ -329,7 +329,7 @@ import {
329329
accessContent,
330330
getLineHits,
331331
isExcludedDirectory,
332-
} from '@code-pushup/utils';
332+
} from '@push-based/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 `@code-pushup/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 `@push-based/utils` library for process execution, file operations, string manipulation, and development tooling in Node.js applications.

0 commit comments

Comments
 (0)