Home / Class/ ProgressView Class — drizzle-orm Architecture

ProgressView Class — drizzle-orm Architecture

Architecture documentation for the ProgressView class in views.ts from the drizzle-orm codebase.

Entity Profile

Dependency Diagram

graph TD
  946a5474_7e86_7977_562a_290de1fdc827["ProgressView"]
  217e2cbd_4fb7_ceab_251c_5733ece08a8f["views.ts"]
  946a5474_7e86_7977_562a_290de1fdc827 -->|defined in| 217e2cbd_4fb7_ceab_251c_5733ece08a8f
  6bb5430c_a355_64ec_9ca1_b8a8d51092e2["constructor()"]
  946a5474_7e86_7977_562a_290de1fdc827 -->|method| 6bb5430c_a355_64ec_9ca1_b8a8d51092e2
  335ca6f3_bc3d_4ab9_d06c_d7f74668faef["render()"]
  946a5474_7e86_7977_562a_290de1fdc827 -->|method| 335ca6f3_bc3d_4ab9_d06c_d7f74668faef

Relationship Graph

Source Code

drizzle-kit/src/cli/views.ts lines 552–576

export class ProgressView extends TaskView {
	private readonly spinner: Spinner = new Spinner('⣷⣯⣟⡿⢿⣻⣽⣾'.split(''));
	private timeout: NodeJS.Timeout | undefined;

	constructor(
		private readonly progressText: string,
		private readonly successText: string,
	) {
		super();
		this.timeout = setInterval(() => {
			this.spinner.tick();
			this.requestLayout();
		}, 128);

		this.on('detach', () => clearInterval(this.timeout));
	}

	render(status: 'pending' | 'done'): string {
		if (status === 'pending') {
			const spin = this.spinner.value();
			return `[${spin}] ${this.progressText}\n`;
		}
		return `[${chalk.green('✓')}] ${this.successText}\n`;
	}
}

Domain

Frequently Asked Questions

What is the ProgressView class?
ProgressView is a class in the drizzle-orm codebase, defined in drizzle-kit/src/cli/views.ts.
Where is ProgressView defined?
ProgressView is defined in drizzle-kit/src/cli/views.ts at line 552.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free