mirror of
https://github.com/harivansh-afk/deskctl.git
synced 2026-04-20 05:04:46 +00:00
rename (#11)
* align docs and contract * clean * rename from deskctl-cli to deskctl * runtime
This commit is contained in:
parent
88f9ff85a3
commit
eac3a61ceb
18 changed files with 41 additions and 47 deletions
|
|
@ -1,11 +1,11 @@
|
|||
# deskctl-cli
|
||||
# deskctl
|
||||
|
||||
`deskctl-cli` installs the `deskctl` command for Linux X11 systems.
|
||||
`deskctl` installs the command for Linux X11 systems.
|
||||
|
||||
## Install
|
||||
|
||||
```bash
|
||||
npm install -g deskctl-cli
|
||||
npm install -g deskctl
|
||||
```
|
||||
|
||||
After install, run:
|
||||
|
|
@ -17,7 +17,7 @@ deskctl --help
|
|||
One-shot usage is also supported:
|
||||
|
||||
```bash
|
||||
npx deskctl-cli --help
|
||||
npx deskctl --help
|
||||
```
|
||||
|
||||
## Runtime Support
|
||||
|
|
@ -26,7 +26,7 @@ npx deskctl-cli --help
|
|||
- X11 session
|
||||
- currently packaged release asset: `linux-x64`
|
||||
|
||||
`deskctl-cli` downloads the matching GitHub Release binary during install.
|
||||
`deskctl` downloads the matching GitHub Release binary during install.
|
||||
Unsupported targets fail during install with a clear runtime support error instead of installing a broken command.
|
||||
|
||||
If you want the Rust source-install path instead, use:
|
||||
|
|
@ -17,7 +17,7 @@ function main() {
|
|||
`Expected: ${binaryPath}`,
|
||||
`Package version: ${pkg.version}`,
|
||||
`Release tag: ${releaseTag(pkg)}`,
|
||||
"Try reinstalling deskctl-cli or check that your target is supported."
|
||||
"Try reinstalling deskctl or check that your target is supported."
|
||||
].join("\n")
|
||||
);
|
||||
process.exit(1);
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"name": "deskctl-cli",
|
||||
"name": "deskctl",
|
||||
"version": "0.1.6",
|
||||
"description": "Installable deskctl CLI package for Linux X11 agents",
|
||||
"description": "Installable deskctl package for Linux X11 agents",
|
||||
"license": "MIT",
|
||||
"homepage": "https://github.com/harivansh-afk/deskctl",
|
||||
"repository": {
|
||||
|
|
@ -44,6 +44,6 @@ async function main() {
|
|||
}
|
||||
|
||||
main().catch((error) => {
|
||||
console.error(`deskctl-cli install failed: ${error.message}`);
|
||||
console.error(`deskctl install failed: ${error.message}`);
|
||||
process.exit(1);
|
||||
});
|
||||
|
|
@ -26,7 +26,7 @@ function supportedTarget(platform = process.platform, arch = process.arch) {
|
|||
}
|
||||
|
||||
throw new Error(
|
||||
`deskctl-cli currently supports linux-x64 only. Received ${platform}-${arch}.`
|
||||
`deskctl currently supports linux-x64 only. Received ${platform}-${arch}.`
|
||||
);
|
||||
}
|
||||
|
||||
|
|
@ -26,13 +26,13 @@ function main() {
|
|||
}
|
||||
|
||||
if (pkg.bin?.deskctl !== "bin/deskctl.js") {
|
||||
throw new Error("deskctl-cli must expose the deskctl bin entrypoint.");
|
||||
throw new Error("deskctl must expose the deskctl bin entrypoint.");
|
||||
}
|
||||
|
||||
const target = supportedTarget("linux", "x64");
|
||||
const targetPath = vendorBinaryPath(target);
|
||||
const vendorDir = path.dirname(targetPath);
|
||||
if (!vendorDir.endsWith(path.join("deskctl-cli", "vendor"))) {
|
||||
if (!vendorDir.endsWith(path.join("deskctl", "vendor"))) {
|
||||
throw new Error("Vendor binary directory resolved unexpectedly.");
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue