@vscodium/native-keymap 3.3.7-258423 → 3.3.7-258424
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/checksum.txt +22 -22
- package/install.js +19 -11
- package/package.json +1 -4
package/checksum.txt
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
1
|
+
4870baafce609bd3f723cf1612a98aa42c6c3fe1e4552eabba41307c0a380516 native-keymap-3.3.7-258424-darwin-arm64.tar.gz
|
|
2
|
+
6141338c2c8299dde658e308af67d2662c730298fce80ffd630835266d6dd5ab native-keymap-3.3.7-258424-darwin-x64.tar.gz
|
|
3
|
+
8b71d0e9276e40548d59bd2c3e1c41dd8d8820155f7506c7a3e7413e50986fdc native-keymap-3.3.7-258424-linux-arm64.tar.gz
|
|
4
|
+
aceac6b0cd274121c540de86c2722bc4dfd0c1f587f1837ac10c84f08b0a0b90 native-keymap-3.3.7-258424-linux-armhf.tar.gz
|
|
5
|
+
a4ff394ff8ed08209d8ab884a10fe68c9c370257abf43563c1a61675e4a3e704 native-keymap-3.3.7-258424-linux-loong64.tar.gz
|
|
6
|
+
ca4a4bd104148bec0828171555dbdd4013bc9274b6f2bf922e56748726a9beab native-keymap-3.3.7-258424-linux-ppc64le.tar.gz
|
|
7
|
+
5c3b2b42523813a001603933e00d6e95abd0dbf2bc46600a09de33a1a96e3554 native-keymap-3.3.7-258424-linux-riscv64.tar.gz
|
|
8
|
+
4e14a0e35b75b62139d4fa07640c07c71968ecd07d78a72ec9b0c6cbd792e96d native-keymap-3.3.7-258424-linux-s390x.tar.gz
|
|
9
|
+
ef876465c98f81b443b6eb85d90444401e65ec975a575288015f0bf1a84f12e5 native-keymap-3.3.7-258424-linux-x64.tar.gz
|
|
10
|
+
973c330cfc988726e0c392af39be872de0495c1341598e04dae0e387c993ad75 *native-keymap-3.3.7-258424-win32-arm64.tar.gz
|
|
11
|
+
72e2d173f49e096773b16b9e53c97d6f39598d9fee4072e87dd62f396f4b4697 *native-keymap-3.3.7-258424-win32-x64.tar.gz
|
|
12
|
+
4870baafce609bd3f723cf1612a98aa42c6c3fe1e4552eabba41307c0a380516 native-keymap-3.3.7-258424-darwin-arm64.tar.gz
|
|
13
|
+
6141338c2c8299dde658e308af67d2662c730298fce80ffd630835266d6dd5ab native-keymap-3.3.7-258424-darwin-x64.tar.gz
|
|
14
|
+
8b71d0e9276e40548d59bd2c3e1c41dd8d8820155f7506c7a3e7413e50986fdc native-keymap-3.3.7-258424-linux-arm64.tar.gz
|
|
15
|
+
aceac6b0cd274121c540de86c2722bc4dfd0c1f587f1837ac10c84f08b0a0b90 native-keymap-3.3.7-258424-linux-armhf.tar.gz
|
|
16
|
+
a4ff394ff8ed08209d8ab884a10fe68c9c370257abf43563c1a61675e4a3e704 native-keymap-3.3.7-258424-linux-loong64.tar.gz
|
|
17
|
+
ca4a4bd104148bec0828171555dbdd4013bc9274b6f2bf922e56748726a9beab native-keymap-3.3.7-258424-linux-ppc64le.tar.gz
|
|
18
|
+
5c3b2b42523813a001603933e00d6e95abd0dbf2bc46600a09de33a1a96e3554 native-keymap-3.3.7-258424-linux-riscv64.tar.gz
|
|
19
|
+
4e14a0e35b75b62139d4fa07640c07c71968ecd07d78a72ec9b0c6cbd792e96d native-keymap-3.3.7-258424-linux-s390x.tar.gz
|
|
20
|
+
ef876465c98f81b443b6eb85d90444401e65ec975a575288015f0bf1a84f12e5 native-keymap-3.3.7-258424-linux-x64.tar.gz
|
|
21
|
+
973c330cfc988726e0c392af39be872de0495c1341598e04dae0e387c993ad75 *native-keymap-3.3.7-258424-win32-arm64.tar.gz
|
|
22
|
+
72e2d173f49e096773b16b9e53c97d6f39598d9fee4072e87dd62f396f4b4697 *native-keymap-3.3.7-258424-win32-x64.tar.gz
|
package/install.js
CHANGED
|
@@ -10,8 +10,7 @@ const os = require('node:os');
|
|
|
10
10
|
const path = require('node:path');
|
|
11
11
|
const { pipeline } = require('node:stream');
|
|
12
12
|
const { promisify } = require('node:util');
|
|
13
|
-
const
|
|
14
|
-
const { spawnSync } = require('node:child_process');
|
|
13
|
+
const { spawn, spawnSync } = require('node:child_process');
|
|
15
14
|
|
|
16
15
|
const pipelineAsync = promisify(pipeline);
|
|
17
16
|
const PACKAGE_ROOT = path.resolve(__dirname);
|
|
@@ -137,7 +136,7 @@ async function downloadPrebuilt(platform, arch) {
|
|
|
137
136
|
const checksumRaw = await loadChecksumManifest();
|
|
138
137
|
const expectedHash = parseChecksum(checksumRaw, assetName);
|
|
139
138
|
await verifySha256(archivePath, expectedHash);
|
|
140
|
-
await
|
|
139
|
+
await extractWithSystemTar(archivePath, tmpDir);
|
|
141
140
|
const binaryPath = path.join(tmpDir, 'keymapping.node');
|
|
142
141
|
await fsp.access(binaryPath, fs.constants.R_OK);
|
|
143
142
|
|
|
@@ -157,14 +156,8 @@ async function downloadFile(url, destination) {
|
|
|
157
156
|
}
|
|
158
157
|
|
|
159
158
|
async function loadChecksumManifest() {
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
return content;
|
|
163
|
-
} catch (error) {
|
|
164
|
-
if (error.code && error.code !== 'ENOENT') {
|
|
165
|
-
throw error;
|
|
166
|
-
}
|
|
167
|
-
}
|
|
159
|
+
const content = await fsp.readFile(LOCAL_CHECKSUM_PATH, 'utf8');
|
|
160
|
+
return content;
|
|
168
161
|
}
|
|
169
162
|
|
|
170
163
|
function httpGet(url, redirects = 0) {
|
|
@@ -244,6 +237,21 @@ async function verifySha256(filePath, expectedHash) {
|
|
|
244
237
|
}
|
|
245
238
|
}
|
|
246
239
|
|
|
240
|
+
async function extractWithSystemTar(archivePath, destinationDir) {
|
|
241
|
+
await new Promise((resolve, reject) => {
|
|
242
|
+
const args = ['-xzf', archivePath, '-C', destinationDir];
|
|
243
|
+
const child = spawn('tar', args, { stdio: 'inherit' });
|
|
244
|
+
child.on('error', reject);
|
|
245
|
+
child.on('close', (code) => {
|
|
246
|
+
if (code !== 0) {
|
|
247
|
+
reject(new Error(`tar exited with code ${code}`));
|
|
248
|
+
return;
|
|
249
|
+
}
|
|
250
|
+
resolve();
|
|
251
|
+
});
|
|
252
|
+
});
|
|
253
|
+
}
|
|
254
|
+
|
|
247
255
|
async function cleanup(dirPath) {
|
|
248
256
|
if (!dirPath) {
|
|
249
257
|
return;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vscodium/native-keymap",
|
|
3
|
-
"version": "3.3.7-
|
|
3
|
+
"version": "3.3.7-258424",
|
|
4
4
|
"description": "Get OS key mapping",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"typings": "index.d.ts",
|
|
@@ -22,8 +22,5 @@
|
|
|
22
22
|
"branches": [
|
|
23
23
|
"main"
|
|
24
24
|
]
|
|
25
|
-
},
|
|
26
|
-
"dependencies": {
|
|
27
|
-
"tar": "^7.5.2"
|
|
28
25
|
}
|
|
29
26
|
}
|