@airmoney-degn/airmoney-cli 0.19.7 → 0.20.0

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.
@@ -66,6 +66,21 @@ async function loadAndValidateMetadata(locationFolder) {
66
66
  }
67
67
  return meta;
68
68
  }
69
+ /**
70
+ * Formats file size in human-readable format
71
+ */
72
+ function formatFileSize(bytes) {
73
+ if (bytes < 1024) {
74
+ return `${bytes} B`;
75
+ }
76
+ if (bytes < 1024 * 1024) {
77
+ return `${(bytes / 1024).toFixed(2)} KB`;
78
+ }
79
+ if (bytes < 1024 * 1024 * 1024) {
80
+ return `${(bytes / (1024 * 1024)).toFixed(2)} MB`;
81
+ }
82
+ return `${(bytes / (1024 * 1024 * 1024)).toFixed(2)} GB`;
83
+ }
69
84
  /**
70
85
  * Prepares the package by packing and reading it
71
86
  */
@@ -79,7 +94,9 @@ async function preparePackage(meta, projectPath) {
79
94
  }
80
95
  const fileBuffer = fs.readFileSync(pkgPath);
81
96
  const fileHash = (0, md5_1.default)(fileBuffer);
97
+ const fileSize = fileBuffer.length;
82
98
  (0, LogService_1.log)(`Package Hash: ${fileHash}`).white();
99
+ (0, LogService_1.log)(`Package Size: ${formatFileSize(fileSize)}`).white();
83
100
  return { fileBuffer, fileHash, pkgPath };
84
101
  }
85
102
  /**
package/dist/config.json CHANGED
@@ -1,3 +1,3 @@
1
1
  {
2
- "version": "0.19.7"
2
+ "version": "0.20.0"
3
3
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@airmoney-degn/airmoney-cli",
3
- "version": "0.19.7",
3
+ "version": "0.20.0",
4
4
  "description": "airmoney-cli is a command-line interface tool designed to facilitate the development and management of decentralized applications (DApps) for Airmoney.",
5
5
  "publishConfig": {
6
6
  "access": "public"