solforge 0.2.20 → 0.2.22
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 +24 -24
- package/start.cjs +5 -10
package/package.json
CHANGED
|
@@ -1,26 +1,26 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
2
|
+
"name": "solforge",
|
|
3
|
+
"version": "0.2.22",
|
|
4
|
+
"description": "SolForge CLI installer",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "git+https://github.com/nitishxyz/solforge.git"
|
|
9
|
+
},
|
|
10
|
+
"homepage": "https://github.com/nitishxyz/solforge#readme",
|
|
11
|
+
"bugs": {
|
|
12
|
+
"url": "https://github.com/nitishxyz/solforge/issues"
|
|
13
|
+
},
|
|
14
|
+
"bin": {
|
|
15
|
+
"solforge": "./start.cjs"
|
|
16
|
+
},
|
|
17
|
+
"files": [
|
|
18
|
+
"start.cjs"
|
|
19
|
+
],
|
|
20
|
+
"scripts": {
|
|
21
|
+
"prepublishOnly": "cd ../.. && bun run --filter @solforge/cli build:bin:all"
|
|
22
|
+
},
|
|
23
|
+
"publishConfig": {
|
|
24
|
+
"access": "public"
|
|
25
|
+
}
|
|
26
26
|
}
|
package/start.cjs
CHANGED
|
@@ -30,8 +30,7 @@ function isInWorkspace() {
|
|
|
30
30
|
|
|
31
31
|
function findBinaryInPath() {
|
|
32
32
|
const pathDirs = (process.env.PATH || "").split(path.delimiter);
|
|
33
|
-
const
|
|
34
|
-
const binName = "solforge" + ext;
|
|
33
|
+
const binName = "solforge";
|
|
35
34
|
|
|
36
35
|
for (const dir of pathDirs) {
|
|
37
36
|
const binPath = path.join(dir, binName);
|
|
@@ -44,7 +43,7 @@ function findBinaryInPath() {
|
|
|
44
43
|
return binPath;
|
|
45
44
|
}
|
|
46
45
|
}
|
|
47
|
-
} catch (
|
|
46
|
+
} catch (_err) {}
|
|
48
47
|
}
|
|
49
48
|
}
|
|
50
49
|
return null;
|
|
@@ -57,7 +56,6 @@ function assetName() {
|
|
|
57
56
|
if (p === "darwin" && a === "x64") return "solforge-darwin-x64";
|
|
58
57
|
if (p === "linux" && a === "x64") return "solforge-linux-x64";
|
|
59
58
|
if (p === "linux" && a === "arm64") return "solforge-linux-arm64";
|
|
60
|
-
if (p === "win32" && a === "x64") return "solforge-windows-x64.exe";
|
|
61
59
|
return null;
|
|
62
60
|
}
|
|
63
61
|
|
|
@@ -111,8 +109,6 @@ function downloadWithProgress(url, dest) {
|
|
|
111
109
|
}
|
|
112
110
|
|
|
113
111
|
function updateShellProfile(userBin) {
|
|
114
|
-
if (process.platform === "win32") return;
|
|
115
|
-
|
|
116
112
|
const shell = process.env.SHELL || "";
|
|
117
113
|
let configFile;
|
|
118
114
|
let shellType;
|
|
@@ -144,7 +140,7 @@ function updateShellProfile(userBin) {
|
|
|
144
140
|
fs.appendFileSync(configFile, `\n${pathExport}\n`);
|
|
145
141
|
console.log(`✓ Added ${userBin} to PATH in ${configFile}`);
|
|
146
142
|
console.log(`✓ Restart your ${shellType} or run: source ${configFile}`);
|
|
147
|
-
} catch (
|
|
143
|
+
} catch (_error) {
|
|
148
144
|
console.log(`⚠️ Could not automatically update ${configFile}`);
|
|
149
145
|
}
|
|
150
146
|
}
|
|
@@ -158,7 +154,7 @@ async function install() {
|
|
|
158
154
|
);
|
|
159
155
|
}
|
|
160
156
|
|
|
161
|
-
const {
|
|
157
|
+
const { repository } = pkg();
|
|
162
158
|
const repo =
|
|
163
159
|
process.env.SOLFORGE_REPO ||
|
|
164
160
|
(repository &&
|
|
@@ -174,8 +170,7 @@ async function install() {
|
|
|
174
170
|
|
|
175
171
|
const userBin = path.resolve(os.homedir(), ".local", "bin");
|
|
176
172
|
fs.mkdirSync(userBin, { recursive: true });
|
|
177
|
-
const
|
|
178
|
-
const binPath = path.resolve(userBin, `solforge${ext}`);
|
|
173
|
+
const binPath = path.resolve(userBin, "solforge");
|
|
179
174
|
|
|
180
175
|
await downloadWithProgress(url, binPath);
|
|
181
176
|
|