@hyperxenonzephyr/kv-code 0.1.2 → 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 +3 -3
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
|
}
|