@hyperxenonzephyr/kv-code 0.1.1 → 0.1.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/package.json +1 -1
- package/scripts/postinstall.js +5 -4
package/package.json
CHANGED
package/scripts/postinstall.js
CHANGED
|
@@ -140,7 +140,7 @@ async function downloadAndInstall() {
|
|
|
140
140
|
const assets = releaseInfo.assets || [];
|
|
141
141
|
|
|
142
142
|
// Try package archive first
|
|
143
|
-
const packageAssetName = `
|
|
143
|
+
const packageAssetName = `kv-code-package-${targetTriple}.tar.gz`;
|
|
144
144
|
|
|
145
145
|
let assetUrl = null;
|
|
146
146
|
for (const a of assets) {
|
|
@@ -155,7 +155,7 @@ async function downloadAndInstall() {
|
|
|
155
155
|
const versionNum = version.replace(/^rust-v/, "");
|
|
156
156
|
const os = targetTriple.includes("win32") ? "win32" : targetTriple.includes("darwin") ? "darwin" : "linux";
|
|
157
157
|
const cpu = targetTriple.includes("x86_64") ? "x64" : "arm64";
|
|
158
|
-
const npmAssetName = `
|
|
158
|
+
const npmAssetName = `kv-code-npm-${os}-${cpu}-${versionNum}.tgz`;
|
|
159
159
|
for (const a of assets) {
|
|
160
160
|
if (a.name === npmAssetName) {
|
|
161
161
|
assetUrl = a.browser_download_url;
|
|
@@ -199,7 +199,7 @@ async function downloadAndInstall() {
|
|
|
199
199
|
|
|
200
200
|
// Try NPM legacy layout
|
|
201
201
|
if (!srcBinary) {
|
|
202
|
-
const npmVendorBin = path.join(extractDir, "package", "vendor", targetTriple, "
|
|
202
|
+
const npmVendorBin = path.join(extractDir, "package", "vendor", targetTriple, "kv-code", binaryName);
|
|
203
203
|
if (existsSync(npmVendorBin)) {
|
|
204
204
|
srcBinary = npmVendorBin;
|
|
205
205
|
}
|
|
@@ -250,6 +250,7 @@ async function main() {
|
|
|
250
250
|
|
|
251
251
|
console.error("");
|
|
252
252
|
console.error(`[kv-code] Native binary not found for ${platform} (${arch})`);
|
|
253
|
+
console.error(` The kv-code command will not be available until the binary is installed.`);
|
|
253
254
|
console.error("");
|
|
254
255
|
console.error(" To install manually:");
|
|
255
256
|
console.error("");
|
|
@@ -261,7 +262,7 @@ async function main() {
|
|
|
261
262
|
console.error(` Then copy the binary to:`);
|
|
262
263
|
console.error(` ${binaryPath}`);
|
|
263
264
|
console.error("");
|
|
264
|
-
process.exit(
|
|
265
|
+
process.exit(0);
|
|
265
266
|
}
|
|
266
267
|
|
|
267
268
|
main();
|