From 6a98ef4bedc0f759eb8c4bc2ebe479a9994b9307 Mon Sep 17 00:00:00 2001 From: Luna Date: Fri, 20 Mar 2026 17:59:41 +0100 Subject: [PATCH] feat: log byte count for push and pull, increment version --- package.json | 2 +- src/commands/remote/pull.ts | 2 ++ src/commands/remote/push.ts | 3 ++- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 4fe6051..4e73dfe 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "shsf-cli", - "version": "2.1.7", + "version": "2.1.8", "description": "", "type": "module", "files": [ diff --git a/src/commands/remote/pull.ts b/src/commands/remote/pull.ts index 855eedb..49a1ff2 100644 --- a/src/commands/remote/pull.ts +++ b/src/commands/remote/pull.ts @@ -26,6 +26,8 @@ export const pullDefinition = { } for (const file of files) { fs.writeFileSync(path.join(options.into, file.name), file.content); + const byteSize = Buffer.byteLength(file.content, 'utf8'); + console.log(chalk.green(`Pulled ${file.name} (${byteSize} bytes)`)); } console.log(chalk.green(`Successfully pulled ${files.length} files into ${options.into}`)); } catch (error: any) { diff --git a/src/commands/remote/push.ts b/src/commands/remote/push.ts index 9f307cd..233eb58 100644 --- a/src/commands/remote/push.ts +++ b/src/commands/remote/push.ts @@ -97,8 +97,9 @@ export const pushDefinition = { code: file.content, }); + const byteSize = Buffer.byteLength(file.content, 'utf8'); console.log( - chalk.green(`Pushed ${file.filename} to function ${options.id}`), + chalk.green(`Pushed ${file.filename} (${byteSize} bytes) to function ${options.id}`), ); pushedFilesCount++; }