Skip to content

Commit ecda024

Browse files
committed
fix(config): make 'agents' optional in ProjectConfig and improve formatting in PresetConfig
1 parent 3c95b70 commit ecda024

File tree

2 files changed

+15
-4
lines changed

2 files changed

+15
-4
lines changed

packages/create-tbk-app/src/types/config.types.ts

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ export interface ProjectConfig {
3030
admin: boolean;
3131
queueDashboard: boolean;
3232
observability: ObservabilityLevel;
33-
agents: AgentId[];
33+
agents?: AgentId[];
3434
packageManager: PackageManager;
3535
skipGit: boolean;
3636
skipInstall: boolean;
@@ -85,5 +85,13 @@ export interface TemplateContext {
8585
export interface PresetConfig {
8686
name: string;
8787
description: string;
88-
config: Omit<ProjectConfig, 'projectName' | 'preset' | 'packageManager' | 'skipGit' | 'skipInstall' | 'googleOAuth'> & { googleOAuth?: boolean };
88+
config: Omit<
89+
ProjectConfig,
90+
| 'projectName'
91+
| 'preset'
92+
| 'packageManager'
93+
| 'skipGit'
94+
| 'skipInstall'
95+
| 'googleOAuth'
96+
> & { googleOAuth?: boolean };
8997
}

packages/create-tbk-app/templates/storage/src/lib/storage.ts.hbs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -285,6 +285,7 @@ export class R2StorageProvider implements StorageProvider {
285285
}
286286
{{/if}}
287287

288+
{{#if STORAGE_LOCAL}}
288289
/**
289290
* Local file system storage provider implementation
290291
* Always included for admin panel file uploads
@@ -388,7 +389,7 @@ export class LocalStorageProvider implements StorageProvider {
388389
}
389390
}
390391
}
391-
392+
{{/if}}
392393
/**
393394
* Factory function to create the appropriate storage provider
394395
* Supports S3, Cloudflare R2, and local file system storage
@@ -412,9 +413,11 @@ const createStorageProvider = (): StorageProvider => {
412413
return new R2StorageProvider();
413414
{{/if}}
414415

416+
{{#if STORAGE_LOCAL}}
415417
case 'local':
416418
return new LocalStorageProvider();
417-
419+
{{/if}}
420+
418421
default:
419422
throw new StorageError(`Unsupported storage provider: ${provider}`);
420423
}

0 commit comments

Comments
 (0)