novyr 0.1.0 → 0.1.2
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/bin/cli.js +1 -1
- package/lib/resolve-binary.js +19 -1
- package/package.json +6 -6
package/README.md
CHANGED
package/bin/cli.js
CHANGED
|
@@ -87,7 +87,7 @@ if (sub === "login") {
|
|
|
87
87
|
console.log(
|
|
88
88
|
"novyr: conta linkada.\n" +
|
|
89
89
|
` Dashboard: ${r.dashboardUrl}\n` +
|
|
90
|
-
" Modelo gerenciado (Pro): selecione com `novyr provider
|
|
90
|
+
" Modelo gerenciado (Pro): selecione com `novyr provider managed`."
|
|
91
91
|
);
|
|
92
92
|
process.exit(0);
|
|
93
93
|
})
|
package/lib/resolve-binary.js
CHANGED
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
// (@novyr/nvr-<os>-<cpu>) — the esbuild/biome/turbo pattern. npm installs only
|
|
6
6
|
// the package whose os/cpu match the host, so exactly one is present.
|
|
7
7
|
|
|
8
|
+
const fs = require("node:fs");
|
|
8
9
|
const targets = require("./targets.cjs");
|
|
9
10
|
|
|
10
11
|
const SCOPE = "@novyr";
|
|
@@ -31,9 +32,10 @@ function resolveBinary() {
|
|
|
31
32
|
|
|
32
33
|
const pkg = packageName(key);
|
|
33
34
|
const file = `${BIN}${target.exe}`;
|
|
35
|
+
let resolved;
|
|
34
36
|
try {
|
|
35
37
|
// The platform package ships the binary at its package root.
|
|
36
|
-
|
|
38
|
+
resolved = require.resolve(`${pkg}/${file}`);
|
|
37
39
|
} catch (_e) {
|
|
38
40
|
throw new Error(
|
|
39
41
|
`novyr: binário do nvr não encontrado para ${key} (${pkg}).\n` +
|
|
@@ -41,6 +43,22 @@ function resolveBinary() {
|
|
|
41
43
|
`Se você instalou com --ignore-scripts ou atrás de um proxy, veja NPM_PACKAGING.md.`
|
|
42
44
|
);
|
|
43
45
|
}
|
|
46
|
+
|
|
47
|
+
// Self-heal do bit de execução: o upload-artifact do CI (e alguns tarballs)
|
|
48
|
+
// perdem o +x do binário, causando EACCES no spawn. Em runtime, garante que o
|
|
49
|
+
// arquivo é executável — barato e idempotente. (Em win32 não se aplica.)
|
|
50
|
+
if (process.platform !== "win32") {
|
|
51
|
+
try {
|
|
52
|
+
fs.accessSync(resolved, fs.constants.X_OK);
|
|
53
|
+
} catch {
|
|
54
|
+
try {
|
|
55
|
+
fs.chmodSync(resolved, 0o755);
|
|
56
|
+
} catch {
|
|
57
|
+
/* fs read-only (ex.: instalação imutável): segue e deixa o spawn reportar */
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
return resolved;
|
|
44
62
|
}
|
|
45
63
|
|
|
46
64
|
module.exports = { resolveBinary, packageName, platformKey, targets };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "novyr",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"description": "Novyr — corte 60-90% dos tokens do seu Claude Code. Traz o nvr (engine de compressão) e mostra a economia em tempo real na statusline.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"homepage": "https://novyr.dev",
|
|
@@ -20,11 +20,11 @@
|
|
|
20
20
|
"NOTICE"
|
|
21
21
|
],
|
|
22
22
|
"optionalDependencies": {
|
|
23
|
-
"@novyr/nvr-linux-x64": "0.1.
|
|
24
|
-
"@novyr/nvr-linux-arm64": "0.1.
|
|
25
|
-
"@novyr/nvr-darwin-x64": "0.1.
|
|
26
|
-
"@novyr/nvr-darwin-arm64": "0.1.
|
|
27
|
-
"@novyr/nvr-win32-x64": "0.1.
|
|
23
|
+
"@novyr/nvr-linux-x64": "0.1.2",
|
|
24
|
+
"@novyr/nvr-linux-arm64": "0.1.2",
|
|
25
|
+
"@novyr/nvr-darwin-x64": "0.1.2",
|
|
26
|
+
"@novyr/nvr-darwin-arm64": "0.1.2",
|
|
27
|
+
"@novyr/nvr-win32-x64": "0.1.2"
|
|
28
28
|
},
|
|
29
29
|
"engines": {
|
|
30
30
|
"node": ">=18"
|