@stndrds/cli 1.0.0-alpha.265 → 1.0.0-alpha.266

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.
Files changed (2) hide show
  1. package/dist/bin.mjs +2 -9
  2. package/package.json +2 -2
package/dist/bin.mjs CHANGED
@@ -287,20 +287,13 @@ function registerConnectorsCommand(program) {
287
287
  }
288
288
 
289
289
  // src/commands/documents.ts
290
- var BYTE_UNITS = ["B", "KB", "MB", "GB", "TB"];
291
- function formatFileSize(bytes) {
292
- if (bytes <= 0) return "0 B";
293
- const k = 1e3;
294
- const unitIndex = Math.min(BYTE_UNITS.length - 1, Math.floor(Math.log(bytes) / Math.log(k)));
295
- const value = Number.parseFloat((bytes / k ** unitIndex).toFixed(1));
296
- return `${value} ${BYTE_UNITS[unitIndex]}`;
297
- }
290
+ import { formatByteSize } from "@stndrds/schema";
298
291
  function toFileRow(file) {
299
292
  return {
300
293
  id: file.id,
301
294
  position: file.position,
302
295
  type: file.mimeType,
303
- size: formatFileSize(file.size),
296
+ size: formatByteSize(file.size),
304
297
  ocrStatus: file.ocrStatus
305
298
  };
306
299
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stndrds/cli",
3
- "version": "1.0.0-alpha.265",
3
+ "version": "1.0.0-alpha.266",
4
4
  "description": "CLI tool to interact with Standards API",
5
5
  "type": "module",
6
6
  "bin": {
@@ -13,7 +13,7 @@
13
13
  "chalk": "^5.4.1",
14
14
  "cli-table3": "^0.6.5",
15
15
  "commander": "^13.1.0",
16
- "@stndrds/schema": "1.0.0-alpha.265"
16
+ "@stndrds/schema": "1.0.0-alpha.266"
17
17
  },
18
18
  "devDependencies": {
19
19
  "@types/node": "^25.6.0",