From bd056a86522f553ea2fd59362677a3e56d87ca56 Mon Sep 17 00:00:00 2001 From: Peter Kota Date: Thu, 28 May 2026 07:50:14 +0200 Subject: [PATCH] feat: add git lfs support with new flag for applications and static sites --- src/client/endpoints/applications.ts | 2 ++ src/client/endpoints/static-sites.ts | 2 ++ src/commands/apps/update.ts | 6 ++++++ src/commands/static-sites/update.ts | 6 ++++++ 4 files changed, 16 insertions(+) diff --git a/src/client/endpoints/applications.ts b/src/client/endpoints/applications.ts index 034a2ca..24416d8 100644 --- a/src/client/endpoints/applications.ts +++ b/src/client/endpoints/applications.ts @@ -84,6 +84,7 @@ export interface ApplicationDetail extends Application { docker_context: string | null; allow_deploy_paths: string[]; ignore_deploy_paths: string[]; + git_lfs_enabled: boolean; created_by: string | null; } @@ -271,6 +272,7 @@ export interface UpdateApplicationInput { buildpacks?: Array<{ order: number; source: string }>; allow_deploy_paths?: string[]; ignore_deploy_paths?: string[]; + git_lfs_enabled?: boolean; source?: string; git_type?: string; repo_url?: string; diff --git a/src/client/endpoints/static-sites.ts b/src/client/endpoints/static-sites.ts index a9c52d9..510f04b 100644 --- a/src/client/endpoints/static-sites.ts +++ b/src/client/endpoints/static-sites.ts @@ -17,6 +17,7 @@ export interface StaticSite { is_preview_enabled: boolean; allow_deploy_paths: string[]; ignore_deploy_paths: string[]; + git_lfs_enabled: boolean; created_at: string; updated_at: string; } @@ -51,6 +52,7 @@ export interface UpdateStaticSiteBody { is_preview_enabled?: boolean; allow_deploy_paths?: string[]; ignore_deploy_paths?: string[]; + git_lfs_enabled?: boolean; } export interface Deployment { diff --git a/src/commands/apps/update.ts b/src/commands/apps/update.ts index e0cb604..1e82c9e 100644 --- a/src/commands/apps/update.ts +++ b/src/commands/apps/update.ts @@ -9,6 +9,10 @@ export const appsUpdateCommand = makeUpdateCommand({ { flags: '--build-type ', description: 'Build type' }, { flags: '--dockerfile-path ', description: 'Dockerfile path' }, { flags: '--docker-image ', description: 'Docker image' }, + { + flags: '--git-lfs-enabled ', + description: 'Fetch Git LFS objects during source checkout (true/false)', + }, ], displayFields: (item: Record) => ({ ID: item['id'], @@ -23,6 +27,8 @@ export const appsUpdateCommand = makeUpdateCommand({ if (opts['buildType']) body['build_type'] = opts['buildType']; if (opts['dockerfilePath']) body['dockerfile_path'] = opts['dockerfilePath']; if (opts['dockerImage']) body['docker_image'] = opts['dockerImage']; + if (opts['gitLfsEnabled'] !== undefined) + body['git_lfs_enabled'] = opts['gitLfsEnabled'] === 'true'; return client.patch(`/applications/${id}`, body); }, }); diff --git a/src/commands/static-sites/update.ts b/src/commands/static-sites/update.ts index 6a1d04c..cebe860 100644 --- a/src/commands/static-sites/update.ts +++ b/src/commands/static-sites/update.ts @@ -16,6 +16,10 @@ export const staticSitesUpdateCommand = makeUpdateCommand({ flags: '--ignore-deploy-paths ', description: 'Glob patterns for paths to exclude from deploy triggers (comma-separated)', }, + { + flags: '--git-lfs-enabled ', + description: 'Fetch Git LFS objects during source checkout (true/false)', + }, ], displayFields: (item: Record) => ({ ID: item['id'], @@ -36,6 +40,8 @@ export const staticSitesUpdateCommand = makeUpdateCommand({ body['ignore_deploy_paths'] = (opts['ignoreDeployPaths'] as string) .split(',') .map((s: string) => s.trim()); + if (opts['gitLfsEnabled'] !== undefined) + body['git_lfs_enabled'] = opts['gitLfsEnabled'] === 'true'; return client.patch(`/static-sites/${id}`, body); }, });