solforge 0.2.13 → 0.2.14
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/package.json +1 -1
- package/start.cjs +19 -23
package/package.json
CHANGED
package/start.cjs
CHANGED
|
@@ -76,7 +76,7 @@ function downloadWithProgress(url, dest) {
|
|
|
76
76
|
} else if (response.statusCode === 200) {
|
|
77
77
|
totalBytes = Number.parseInt(
|
|
78
78
|
response.headers["content-length"] || "0",
|
|
79
|
-
10
|
|
79
|
+
10,
|
|
80
80
|
);
|
|
81
81
|
|
|
82
82
|
response.on("data", (chunk) => {
|
|
@@ -86,7 +86,7 @@ function downloadWithProgress(url, dest) {
|
|
|
86
86
|
const downloadedMB = (downloadedBytes / 1024 / 1024).toFixed(1);
|
|
87
87
|
const totalMB = (totalBytes / 1024 / 1024).toFixed(1);
|
|
88
88
|
process.stdout.write(
|
|
89
|
-
`\rDownloading: ${percent}% (${downloadedMB}MB / ${totalMB}MB)
|
|
89
|
+
`\rDownloading: ${percent}% (${downloadedMB}MB / ${totalMB}MB)`,
|
|
90
90
|
);
|
|
91
91
|
}
|
|
92
92
|
});
|
|
@@ -152,7 +152,9 @@ async function install() {
|
|
|
152
152
|
try {
|
|
153
153
|
const asset = assetName();
|
|
154
154
|
if (!asset) {
|
|
155
|
-
throw new Error(
|
|
155
|
+
throw new Error(
|
|
156
|
+
`Unsupported platform: ${process.platform}-${process.arch}`,
|
|
157
|
+
);
|
|
156
158
|
}
|
|
157
159
|
|
|
158
160
|
const { version, repository } = pkg();
|
|
@@ -178,27 +180,21 @@ async function install() {
|
|
|
178
180
|
|
|
179
181
|
fs.chmodSync(binPath, 0o755);
|
|
180
182
|
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
console.log(
|
|
195
|
-
` Or for zsh: echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.zshrc`
|
|
196
|
-
);
|
|
197
|
-
} else {
|
|
198
|
-
console.log(`✓ ${userBin} already in PATH`);
|
|
199
|
-
}
|
|
183
|
+
console.log("\n✓ solforge installed successfully!");
|
|
184
|
+
console.log(`Location: ${binPath}`);
|
|
185
|
+
|
|
186
|
+
const pathDirs = (process.env.PATH || "").split(path.delimiter);
|
|
187
|
+
if (!pathDirs.includes(userBin)) {
|
|
188
|
+
updateShellProfile(userBin);
|
|
189
|
+
console.log(`\n⚠️ Add ${userBin} to your PATH:`);
|
|
190
|
+
console.log(
|
|
191
|
+
` echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.bashrc`,
|
|
192
|
+
);
|
|
193
|
+
console.log(
|
|
194
|
+
` Or for zsh: echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.zshrc`,
|
|
195
|
+
);
|
|
200
196
|
} else {
|
|
201
|
-
console.log(
|
|
197
|
+
console.log(`✓ ${userBin} already in PATH`);
|
|
202
198
|
}
|
|
203
199
|
|
|
204
200
|
console.log("\nRun: solforge --help");
|