Skip to content
This repository was archived by the owner on Jan 19, 2026. It is now read-only.

Commit 3ea0281

Browse files
committed
refactor(constants): add new color constants for groups, tags, and presets; update logging to use chalk for better readability
1 parent a8a32ea commit 3ea0281

3 files changed

Lines changed: 10 additions & 6 deletions

File tree

src/commands/components/push/graph-operations/resource-processor.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import { determineProcessingOrder } from './dependency-graph';
44
import { progressDisplay } from '../progress-display';
55
import { pushComponent } from '../actions';
66
import type { SpaceComponent } from '../../constants';
7+
import chalk from 'chalk';
78

89
// =============================================================================
910
// RESOURCE PROCESSING
@@ -109,7 +110,7 @@ async function createStubComponents(
109110
if (result) {
110111
// Update the node's target data so future references can resolve
111112
node.updateTargetData(result);
112-
console.log(` Created stub component: ${node.name}`);
113+
console.log(`${chalk.green('✓')} Created stub component: ${node.name}`);
113114
}
114115
}
115116
catch (error) {
@@ -276,9 +277,9 @@ function getResourceTypeName(type: string): string {
276277
function getResourceTypeColor(type: string): string {
277278
switch (type) {
278279
case 'component': return colorPalette.COMPONENTS;
279-
case 'group': return '#4ade80'; // green
280-
case 'tag': return '#fbbf24'; // yellow
281-
case 'preset': return '#a855f7'; // purple
280+
case 'group': return colorPalette.GROUPS;
281+
case 'tag': return colorPalette.TAGS;
282+
case 'preset': return colorPalette.PRESETS;
282283
default: return colorPalette.COMPONENTS;
283284
}
284285
}

src/commands/components/push/progress-display.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ export class ProgressDisplay {
3535
this.processed++;
3636
this.updated++;
3737
this.clearProgress();
38-
console.log(` ${this.capitalize(event.resourceType)}${chalk.hex(event.color)(event.name)} - Updated`);
38+
console.log(`${chalk.green('✓')} ${this.capitalize(event.resourceType)}${chalk.hex(event.color)(event.name)} - Updated`);
3939
this.updateProgress();
4040
break;
4141

@@ -49,7 +49,7 @@ export class ProgressDisplay {
4949
this.processed++;
5050
this.failed++;
5151
this.clearProgress();
52-
console.log(` ${this.capitalize(event.resourceType)}${chalk.red(event.name)} - Failed`);
52+
console.log(`${chalk.red('✗')} ${this.capitalize(event.resourceType)}${chalk.red(event.name)} - Failed`);
5353
this.updateProgress();
5454
break;
5555

src/constants.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@ export const colorPalette = {
1717
LANGUAGES: '#f5c003',
1818
MIGRATIONS: '#8CE2FF',
1919
TYPES: '#3178C6',
20+
GROUPS: '#4ade80',
21+
TAGS: '#fbbf24',
22+
PRESETS: '#a855f7',
2023
} as const;
2124

2225
export interface ReadonlyArray<T> {

0 commit comments

Comments
 (0)