|
5 | 5 | > Execute commands with live output streaming and error handling. |
6 | 6 |
|
7 | 7 | ```ts |
8 | | -import { executeProcess, ProcessObserver } from '@push-based/utils'; |
| 8 | +import { executeProcess, ProcessObserver } from '@code-pushup/utils'; |
9 | 9 |
|
10 | 10 | // Create an observer to handle process events |
11 | 11 | const observer: ProcessObserver = { |
@@ -53,7 +53,7 @@ import { |
53 | 53 | findFilesWithPattern, |
54 | 54 | findInFile, |
55 | 55 | resolveFileCached, |
56 | | -} from '@push-based/utils'; |
| 56 | +} from '@code-pushup/utils'; |
57 | 57 |
|
58 | 58 | // Find all TypeScript files containing 'Component' |
59 | 59 | const componentFiles = await findFilesWithPattern('./src', 'Component'); |
@@ -100,7 +100,7 @@ if (componentFiles.length > 0) { |
100 | 100 | > Format commands with colors and context for better development experience. |
101 | 101 |
|
102 | 102 | ```ts |
103 | | -import { formatCommandLog, isVerbose, calcDuration } from '@push-based/utils'; |
| 103 | +import { formatCommandLog, isVerbose, calcDuration } from '@code-pushup/utils'; |
104 | 104 |
|
105 | 105 | // Set verbose mode for demonstration |
106 | 106 | process.env['NG_MCP_VERBOSE'] = 'true'; |
@@ -159,7 +159,7 @@ if (isVerbose()) { |
159 | 159 | > Convert objects to command-line arguments for process execution. |
160 | 160 |
|
161 | 161 | ```ts |
162 | | -import { objectToCliArgs, executeProcess } from '@push-based/utils'; |
| 162 | +import { objectToCliArgs, executeProcess } from '@code-pushup/utils'; |
163 | 163 |
|
164 | 164 | // Simple configuration object |
165 | 165 | const config = { |
@@ -226,7 +226,7 @@ complexArgs.forEach((arg) => console.log(` ${arg}`)); |
226 | 226 | > Handle process errors gracefully with comprehensive error information. |
227 | 227 |
|
228 | 228 | ```ts |
229 | | -import { executeProcess, ProcessError } from '@push-based/utils'; |
| 229 | +import { executeProcess, ProcessError } from '@code-pushup/utils'; |
230 | 230 |
|
231 | 231 | async function robustProcessExecution() { |
232 | 232 | const commands = [ |
@@ -329,7 +329,7 @@ import { |
329 | 329 | accessContent, |
330 | 330 | getLineHits, |
331 | 331 | isExcludedDirectory, |
332 | | -} from '@push-based/utils'; |
| 332 | +} from '@code-pushup/utils'; |
333 | 333 |
|
334 | 334 | // Custom file finder with filtering |
335 | 335 | async function findLargeTypeScriptFiles( |
@@ -435,4 +435,4 @@ if (largeFiles.length > 0) { |
435 | 435 |
|
436 | 436 |
|
437 | 437 |
|
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