Skip to content

Commit e832c5b

Browse files
pranaygpclaude
andcommitted
refactor: standardize method naming and clarify log messages
Improves code consistency by standardizing method naming conventions and clarifying log messages across builders. Changes: - Renamed buildClientLibrary() to createClientLibrary() in BaseBuilder to match the convention where "create" is used for protected/shared methods - Updated all callers in StandaloneBuilder and VercelBuildOutputAPIBuilder - Clarified log messages in StandaloneBuilder by removing "Vercel API" prefix since this builder is framework-agnostic This establishes a clear pattern: - Public/template methods in subclasses: build* (buildStepsFunction, etc.) - Protected/shared methods in BaseBuilder: create* (createStepsBundle, etc.) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 80c6b7d commit e832c5b

File tree

5 files changed

+11
-23
lines changed

5 files changed

+11
-23
lines changed

packages/builders/src/base-builder.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -522,7 +522,7 @@ export const POST = workflowEntrypoint(workflowCode);`;
522522
await interimBundleCtx.dispose();
523523
}
524524

525-
protected async buildClientLibrary(): Promise<void> {
525+
protected async createClientLibrary(): Promise<void> {
526526
if (!this.config.clientBundlePath) {
527527
// Silently exit since no client bundle was requested
528528
return;

packages/builders/src/standalone.ts

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ export class StandaloneBuilder extends BaseBuilder {
1616
await this.buildWorkflowsBundle(options);
1717
await this.buildWebhookFunction();
1818

19-
await this.buildClientLibrary();
19+
await this.createClientLibrary();
2020
}
2121

2222
private async buildStepsBundle({
@@ -28,10 +28,7 @@ export class StandaloneBuilder extends BaseBuilder {
2828
tsBaseUrl?: string;
2929
tsPaths?: Record<string, string[]>;
3030
}): Promise<void> {
31-
console.log(
32-
'Creating Vercel API steps bundle at',
33-
this.config.stepsBundlePath
34-
);
31+
console.log('Creating steps bundle at', this.config.stepsBundlePath);
3532

3633
const stepsBundlePath = resolve(
3734
this.config.workingDir,
@@ -59,7 +56,7 @@ export class StandaloneBuilder extends BaseBuilder {
5956
tsPaths?: Record<string, string[]>;
6057
}): Promise<void> {
6158
console.log(
62-
'Creating vercel API workflows bundle at',
59+
'Creating workflows bundle at',
6360
this.config.workflowsBundlePath
6461
);
6562

@@ -80,10 +77,7 @@ export class StandaloneBuilder extends BaseBuilder {
8077
}
8178

8279
private async buildWebhookFunction(): Promise<void> {
83-
console.log(
84-
'Creating vercel API webhook bundle at',
85-
this.config.webhookBundlePath
86-
);
80+
console.log('Creating webhook bundle at', this.config.webhookBundlePath);
8781

8882
const webhookBundlePath = resolve(
8983
this.config.workingDir,

packages/builders/src/vercel-build-output-api.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ export class VercelBuildOutputAPIBuilder extends BaseBuilder {
2525
await this.buildWebhookFunction(options);
2626
await this.createBuildOutputConfig(outputDir);
2727

28-
await this.buildClientLibrary();
28+
await this.createClientLibrary();
2929
}
3030

3131
private async buildStepsFunction({

packages/cli/src/lib/builders/standalone.ts

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ export class StandaloneBuilder extends BaseBuilder {
1616
await this.buildWorkflowsBundle(options);
1717
await this.buildWebhookFunction();
1818

19-
await this.buildClientLibrary();
19+
await this.createClientLibrary();
2020
}
2121

2222
private async buildStepsBundle({
@@ -28,10 +28,7 @@ export class StandaloneBuilder extends BaseBuilder {
2828
tsBaseUrl?: string;
2929
tsPaths?: Record<string, string[]>;
3030
}): Promise<void> {
31-
console.log(
32-
'Creating Vercel API steps bundle at',
33-
this.config.stepsBundlePath
34-
);
31+
console.log('Creating steps bundle at', this.config.stepsBundlePath);
3532

3633
const stepsBundlePath = resolve(
3734
this.config.workingDir,
@@ -59,7 +56,7 @@ export class StandaloneBuilder extends BaseBuilder {
5956
tsPaths?: Record<string, string[]>;
6057
}): Promise<void> {
6158
console.log(
62-
'Creating vercel API workflows bundle at',
59+
'Creating workflows bundle at',
6360
this.config.workflowsBundlePath
6461
);
6562

@@ -80,10 +77,7 @@ export class StandaloneBuilder extends BaseBuilder {
8077
}
8178

8279
private async buildWebhookFunction(): Promise<void> {
83-
console.log(
84-
'Creating vercel API webhook bundle at',
85-
this.config.webhookBundlePath
86-
);
80+
console.log('Creating webhook bundle at', this.config.webhookBundlePath);
8781

8882
const webhookBundlePath = resolve(
8983
this.config.workingDir,

packages/cli/src/lib/builders/vercel-build-output-api.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ export class VercelBuildOutputAPIBuilder extends BaseBuilder {
2828
await this.buildWebhookFunction(options);
2929
await this.createBuildOutputConfig(outputDir);
3030

31-
await this.buildClientLibrary();
31+
await this.createClientLibrary();
3232
}
3333

3434
private async buildStepsFunction({

0 commit comments

Comments
 (0)