rankmycode 0.1.4 → 0.1.5
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 +18 -3
- package/checksums.json +11 -8
- package/package.json +1 -1
- package/rankme.mjs +22 -8
package/README.md
CHANGED
|
@@ -12,7 +12,11 @@ published.
|
|
|
12
12
|
|
|
13
13
|
This package is a launcher. It downloads the signed collector binary for your platform from the
|
|
14
14
|
release it is pinned to, verifies its SHA-256 before making it executable, caches it under
|
|
15
|
-
`~/.cache/rankme
|
|
15
|
+
`~/.cache/rankme/` (`%LOCALAPPDATA%\rankme\` on Windows), and runs it. It contains no collector
|
|
16
|
+
source.
|
|
17
|
+
|
|
18
|
+
Needs **Node 18.17 or newer**, because that is what `npx` comes with. Builds exist for macOS and
|
|
19
|
+
Linux on arm64 and x64, and for Windows on x64.
|
|
16
20
|
|
|
17
21
|
| | |
|
|
18
22
|
|---|---|
|
|
@@ -24,8 +28,19 @@ release it is pinned to, verifies its SHA-256 before making it executable, cache
|
|
|
24
28
|
The publish confirmation is read from a real terminal and cannot be answered by a flag, a pipe,
|
|
25
29
|
or an agent. In CI, or anywhere without a terminal, it refuses rather than assuming yes.
|
|
26
30
|
|
|
27
|
-
Other ways in
|
|
28
|
-
|
|
31
|
+
## Other ways in, if you have no Node
|
|
32
|
+
|
|
33
|
+
None of these need npx, or Node at all.
|
|
34
|
+
|
|
35
|
+
| | |
|
|
36
|
+
|---|---|
|
|
37
|
+
| macOS, Linux | `curl -fsSL https://poachdev.com/run.sh \| sh` |
|
|
38
|
+
| Windows, in PowerShell | `irm https://poachdev.com/install.ps1 \| iex` |
|
|
39
|
+
| macOS, Linux, with Homebrew | `brew install jatinjain25/tap/rankme` |
|
|
40
|
+
| Inside Claude Code | the [plugin](https://github.com/jatinjain25/rankme) |
|
|
41
|
+
|
|
42
|
+
If PowerShell says `The term 'npx' is not recognized`, that is Node missing rather than anything
|
|
43
|
+
wrong with this package — use the Windows line above, or install Node and try again.
|
|
29
44
|
|
|
30
45
|
## Licence
|
|
31
46
|
|
package/checksums.json
CHANGED
|
@@ -1,20 +1,23 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "0.1.
|
|
3
|
-
"tag": "v0.1.
|
|
4
|
-
"base": "https://github.com/jatinjain25/paxel-dist/releases/download/v0.1.
|
|
5
|
-
"origin": "https://
|
|
2
|
+
"version": "0.1.5",
|
|
3
|
+
"tag": "v0.1.5",
|
|
4
|
+
"base": "https://github.com/jatinjain25/paxel-dist/releases/download/v0.1.5",
|
|
5
|
+
"origin": "https://poachdev.com",
|
|
6
6
|
"assets": {
|
|
7
7
|
"builder-darwin-arm64": {
|
|
8
|
-
"sha256": "
|
|
8
|
+
"sha256": "e8d68f586f758cf5f30bfc977afc08daea0b92d6dd9495b09490968b043165c3"
|
|
9
9
|
},
|
|
10
10
|
"builder-darwin-x64": {
|
|
11
|
-
"sha256": "
|
|
11
|
+
"sha256": "451417d91014b8cf178bd1a1a0d9fb20675f4a0a6f48f20abfe1563a683d80ff"
|
|
12
12
|
},
|
|
13
13
|
"builder-linux-arm64": {
|
|
14
|
-
"sha256": "
|
|
14
|
+
"sha256": "04f91119084dbc6275f8b66eb5a436d400a17f70068b4a41ba659440809af065"
|
|
15
15
|
},
|
|
16
16
|
"builder-linux-x64": {
|
|
17
|
-
"sha256": "
|
|
17
|
+
"sha256": "1e6d367d9bb699dd68cd5c6d06166720442bad51784cbc8fcf03115105d21e56"
|
|
18
|
+
},
|
|
19
|
+
"builder-windows-x64.exe": {
|
|
20
|
+
"sha256": "ebebf2ab6e94721901e5ed7d43c7603bb5171cf75536408a13f56305f3ec3ebe"
|
|
18
21
|
}
|
|
19
22
|
}
|
|
20
23
|
}
|
package/package.json
CHANGED
package/rankme.mjs
CHANGED
|
@@ -11,16 +11,22 @@ import { join } from "node:path";
|
|
|
11
11
|
class UnsupportedPlatformError extends Error {
|
|
12
12
|
name = "UnsupportedPlatformError";
|
|
13
13
|
}
|
|
14
|
+
var BUILDS = {
|
|
15
|
+
"darwin:arm64": "builder-darwin-arm64",
|
|
16
|
+
"darwin:x64": "builder-darwin-x64",
|
|
17
|
+
"linux:arm64": "builder-linux-arm64",
|
|
18
|
+
"linux:x64": "builder-linux-x64",
|
|
19
|
+
"win32:x64": "builder-windows-x64.exe"
|
|
20
|
+
};
|
|
14
21
|
function assetName(platform, arch) {
|
|
15
|
-
const
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
throw new UnsupportedPlatformError(`There is no build for ${platform}/${arch}. macOS and Linux, on arm64 and x64.`);
|
|
22
|
+
const asset = BUILDS[`${platform}:${arch}`];
|
|
23
|
+
if (asset === undefined) {
|
|
24
|
+
throw new UnsupportedPlatformError(`There is no build for ${platform}/${arch}. macOS and Linux on arm64 and x64, ` + `and Windows on x64.`);
|
|
19
25
|
}
|
|
20
|
-
return
|
|
26
|
+
return asset;
|
|
21
27
|
}
|
|
22
28
|
function cacheBin(env, home, version, asset) {
|
|
23
|
-
const root = env["RANKME_CACHE"] ?? env["XDG_CACHE_HOME"] ?? join(home, ".cache");
|
|
29
|
+
const root = env["RANKME_CACHE"] ?? env["XDG_CACHE_HOME"] ?? env["LOCALAPPDATA"] ?? join(home, ".cache");
|
|
24
30
|
return join(root, "rankme", version, asset);
|
|
25
31
|
}
|
|
26
32
|
function childArgs(userArgs, origin) {
|
|
@@ -85,7 +91,15 @@ async function ensureBinary(opts) {
|
|
|
85
91
|
actual ${actual}`);
|
|
86
92
|
}
|
|
87
93
|
await chmod(plain, 493);
|
|
88
|
-
|
|
94
|
+
try {
|
|
95
|
+
await rename(plain, opts.target);
|
|
96
|
+
} catch (err) {
|
|
97
|
+
const code = err.code;
|
|
98
|
+
const busy = code === "EPERM" || code === "EBUSY" || code === "EACCES";
|
|
99
|
+
if (!busy || !await isExecutable(opts.target))
|
|
100
|
+
throw err;
|
|
101
|
+
await rm(plain, { force: true });
|
|
102
|
+
}
|
|
89
103
|
return opts.target;
|
|
90
104
|
} catch (err) {
|
|
91
105
|
await clean();
|
|
@@ -118,7 +132,7 @@ async function main() {
|
|
|
118
132
|
});
|
|
119
133
|
if (res.error !== undefined)
|
|
120
134
|
throw res.error;
|
|
121
|
-
if (res.signal !== null) {
|
|
135
|
+
if (res.signal !== null && process.platform !== "win32") {
|
|
122
136
|
process.kill(process.pid, res.signal);
|
|
123
137
|
}
|
|
124
138
|
return res.status ?? 1;
|