puter-cli 1.4.2 → 1.4.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -4,8 +4,14 @@ All notable changes to this project will be documented in this file. Dates are d
4
4
 
5
5
  Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
6
6
 
7
+ #### [v1.4.3](https://github.com/bitsnaps/puter-cli/compare/v1.4.2...v1.4.3)
8
+
9
+ - fix: show disk usage [`dfd0ca3`](https://github.com/bitsnaps/puter-cli/commit/dfd0ca302f459b7295593c8d0147df15e488c963)
10
+
7
11
  #### [v1.4.2](https://github.com/bitsnaps/puter-cli/compare/v1.4.1...v1.4.2)
8
12
 
13
+ > 30 January 2025
14
+
9
15
  - license to MIT [`ed0c7ce`](https://github.com/bitsnaps/puter-cli/commit/ed0c7cefba242a5d8fe701cddf5adbe32121bca7)
10
16
  - codecov: setup & badge [`7c4211b`](https://github.com/bitsnaps/puter-cli/commit/7c4211b6ea7b882485e3dfbaa17887a2d1fabccc)
11
17
  - changelog: update license [`dcf8d23`](https://github.com/bitsnaps/puter-cli/commit/dcf8d232160cf74d13267baa07a8f36578df9443)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "puter-cli",
3
- "version": "1.4.2",
3
+ "version": "1.4.3",
4
4
  "description": "Command line interface for Puter cloud platform",
5
5
  "main": "index.js",
6
6
  "bin": {
@@ -452,7 +452,6 @@ export async function getInfo(args = []) {
452
452
  console.log(chalk.cyan(`Writable: `) + chalk.white(data.writable ? 'Yes' : 'No'));
453
453
  console.log(chalk.cyan(`Owner: `) + chalk.white(data.owner.username));
454
454
  console.log(chalk.dim('----------------------------------------'));
455
- console.log(chalk.green('Done.'));
456
455
  } else {
457
456
  console.error(chalk.red('Unable to get stat info. Please check your credentials.'));
458
457
  }
@@ -523,7 +522,6 @@ export async function getDiskUsage(body = null) {
523
522
  });
524
523
 
525
524
  const data = await response.json();
526
- console.log(data);
527
525
  if (response.ok && data) {
528
526
  showDiskSpaceUsage(data);
529
527
  } else {
@@ -784,7 +782,7 @@ export async function uploadFile(args = []) {
784
782
  // Step 2: Check disk space
785
783
  const dfResponse = await fetch(`${API_BASE}/df`, {
786
784
  method: 'POST',
787
- headers: getHeaders(), // Use a dummy boundary for non-multipart requests
785
+ headers: getHeaders(),
788
786
  body: null
789
787
  });
790
788
 
package/src/commons.js CHANGED
@@ -1,5 +1,6 @@
1
1
  import chalk from 'chalk';
2
2
  import { getAuthToken } from './commands/auth.js';
3
+ import { formatSize } from './utils.js';
3
4
  import { readFile } from 'fs/promises';
4
5
  import { fileURLToPath } from 'url';
5
6
  import { dirname, join } from 'path';
@@ -100,7 +101,6 @@ export function showDiskSpaceUsage(data) {
100
101
  // format the usagePercentage with 2 decimal floating point value:
101
102
  console.log(chalk.cyan(`Usage Percentage: `) + chalk.white(`${usagePercentage.toFixed(2)}%`));
102
103
  console.log(chalk.dim('----------------------------------------'));
103
- console.log(chalk.green('Done.'));
104
104
  }
105
105
 
106
106
  /**