@tedbrain/vlink 0.1.60 → 0.1.62
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/README.md +4 -0
- package/binaries.json +8 -8
- package/installer.js +22 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -15,6 +15,10 @@ PATH,并启动 `vlink setup tedbrain`。安装完成后可直接运行:
|
|
|
15
15
|
vlink --version
|
|
16
16
|
```
|
|
17
17
|
|
|
18
|
+
安装、更新或执行 `vlink setup tedbrain` 时,vlink 会根据当前 shell 自动配置
|
|
19
|
+
命令与子命令补全,不需要额外执行或 source 补全脚本。自动配置支持 Bash、Zsh、
|
|
20
|
+
Fish 和 PowerShell;可用 `vlink completion -h` 查看手动生成或重新安装选项。
|
|
21
|
+
|
|
18
22
|
Windows 会在 `vlink.exe` 旁同时生成 `vlink.cmd`。安装目录加入用户 PATH 后,
|
|
19
23
|
可在 PowerShell 或 cmd 中直接运行 `vlink ...`,也可显式使用 `vlink.cmd ...`。
|
|
20
24
|
|
package/binaries.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "0.1.
|
|
2
|
+
"version": "0.1.62",
|
|
3
3
|
"binaries": {
|
|
4
|
-
"linux-x86_64": "
|
|
5
|
-
"linux-x86_64-glibc2.17": "
|
|
6
|
-
"linux-aarch64": "
|
|
7
|
-
"macos-x86_64": "
|
|
8
|
-
"macos-aarch64": "
|
|
9
|
-
"windows-x86_64.exe": "
|
|
10
|
-
"windows-aarch64.exe": "
|
|
4
|
+
"linux-x86_64": "367f723806e56bf5e5b882093aa3963045f743038e94a03163a1472912e24f63",
|
|
5
|
+
"linux-x86_64-glibc2.17": "6e72ba9f87e7f28d8ff7316be91b611ab3b9213503626623aaaa67458b6b5804",
|
|
6
|
+
"linux-aarch64": "a949d6df1361d2387a86cdf9849552020a3a2158e9a010da244cf4344fb86141",
|
|
7
|
+
"macos-x86_64": "e26767ec171771221b8421a02e1c349dc3633bfc8ae1fc7b921e0f502d4fab0a",
|
|
8
|
+
"macos-aarch64": "d59088bfd940376fa7fcea054e31ccf632ea2553a043da5d417d463deaf6429c",
|
|
9
|
+
"windows-x86_64.exe": "01482e74fa89c6536ab75278636d2dfab861c69f4e8e2060dc5a3977a2f9b8b6",
|
|
10
|
+
"windows-aarch64.exe": "572b403ac1ee1dcfd6dbcf8135c28f23fa7dfeca92fe1e958f7560ebc661cad0"
|
|
11
11
|
}
|
|
12
12
|
}
|
package/installer.js
CHANGED
|
@@ -357,6 +357,26 @@ function installWindowsCommandShim(vlinkPath, options = {}) {
|
|
|
357
357
|
return commandPath;
|
|
358
358
|
}
|
|
359
359
|
|
|
360
|
+
function installShellCompletion(vlinkPath, options = {}) {
|
|
361
|
+
const spawnSyncImpl = options.spawnSync || spawnSync;
|
|
362
|
+
const output = options.output || process.stderr;
|
|
363
|
+
const result = spawnSyncImpl(
|
|
364
|
+
vlinkPath,
|
|
365
|
+
['completion', '--install', '--quiet'],
|
|
366
|
+
{
|
|
367
|
+
encoding: 'utf8',
|
|
368
|
+
stdio: ['ignore', 'pipe', 'pipe']
|
|
369
|
+
}
|
|
370
|
+
);
|
|
371
|
+
const failure = commandFailure(result, 'vlink completion --install');
|
|
372
|
+
if (failure) {
|
|
373
|
+
log(`warning: ${failure}; shell completion was not installed`, output);
|
|
374
|
+
return false;
|
|
375
|
+
}
|
|
376
|
+
log('configured vlink shell completion', output);
|
|
377
|
+
return true;
|
|
378
|
+
}
|
|
379
|
+
|
|
360
380
|
function binaryIsStaticElf(binaryPath, options = {}) {
|
|
361
381
|
if ((options.platform || process.platform) !== 'linux') return false;
|
|
362
382
|
const spawnSyncImpl = options.spawnSync || spawnSync;
|
|
@@ -456,6 +476,7 @@ async function runInstaller(options = {}) {
|
|
|
456
476
|
ensureBinary
|
|
457
477
|
});
|
|
458
478
|
const commandShimPath = installWindowsCommandShim(vlinkPath, sharedOptions);
|
|
479
|
+
installShellCompletion(vlinkPath, sharedOptions);
|
|
459
480
|
|
|
460
481
|
if (skipSetup) {
|
|
461
482
|
log('skipping TedBrain Agent setup', output);
|
|
@@ -513,6 +534,7 @@ module.exports = {
|
|
|
513
534
|
installBinary,
|
|
514
535
|
windowsCommandShimPath,
|
|
515
536
|
installWindowsCommandShim,
|
|
537
|
+
installShellCompletion,
|
|
516
538
|
binaryIsStaticElf,
|
|
517
539
|
runInstaller,
|
|
518
540
|
runInstallerFromArgs,
|
package/package.json
CHANGED