huoye 0.0.0-stage → 0.1.0
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 +16 -2
- package/bin/huoye.js +39 -0
- package/package.json +30 -4
package/README.md
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
|
-
#
|
|
1
|
+
# huoye
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
The command-line tool for [Huoye](https://huoye.app): publish the pages your coding agent makes.
|
|
4
|
+
|
|
5
|
+
```sh
|
|
6
|
+
npx huoye login # opens Huoye in your browser; click Allow
|
|
7
|
+
npx huoye deploy ./site --slug my-page
|
|
8
|
+
npx huoye pages
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
`huoye login` saves a token in `~/.config/huoye/credentials.json`. In CI, set
|
|
12
|
+
`HUOYE_TOKEN` instead (create one in the Huoye dashboard), or pipe one to
|
|
13
|
+
`huoye login --with-token`.
|
|
14
|
+
|
|
15
|
+
Install it for good with `npm install -g huoye`.
|
|
16
|
+
|
|
17
|
+
Prebuilt for macOS (Apple silicon, Intel), Linux (x64, arm64) and Windows (x64).
|
package/bin/huoye.js
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
// Runs the prebuilt `huoye` binary from the package for this platform
|
|
3
|
+
// (installed through optionalDependencies, the way esbuild does it).
|
|
4
|
+
"use strict";
|
|
5
|
+
const { spawnSync } = require("child_process");
|
|
6
|
+
const fs = require("fs");
|
|
7
|
+
|
|
8
|
+
const pkg = `huoye-${process.platform}-${process.arch}`;
|
|
9
|
+
const exe = process.platform === "win32" ? "huoye.exe" : "huoye";
|
|
10
|
+
|
|
11
|
+
let bin;
|
|
12
|
+
try {
|
|
13
|
+
bin = require.resolve(`${pkg}/bin/${exe}`);
|
|
14
|
+
} catch {
|
|
15
|
+
console.error(
|
|
16
|
+
`huoye: no prebuilt binary for ${process.platform}-${process.arch} (package ${pkg}).\n` +
|
|
17
|
+
"Supported: macOS (Apple silicon, Intel), Linux (x64, arm64), Windows (x64).\n" +
|
|
18
|
+
"If you installed with --no-optional or --omit=optional, reinstall without it."
|
|
19
|
+
);
|
|
20
|
+
process.exit(1);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
if (process.platform !== "win32") {
|
|
24
|
+
try {
|
|
25
|
+
fs.accessSync(bin, fs.constants.X_OK);
|
|
26
|
+
} catch {
|
|
27
|
+
try {
|
|
28
|
+
fs.chmodSync(bin, 0o755);
|
|
29
|
+
} catch {}
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
const r = spawnSync(bin, process.argv.slice(2), { stdio: "inherit" });
|
|
34
|
+
if (r.error) {
|
|
35
|
+
console.error(`huoye: ${r.error.message}`);
|
|
36
|
+
process.exit(1);
|
|
37
|
+
}
|
|
38
|
+
if (r.signal) process.kill(process.pid, r.signal);
|
|
39
|
+
process.exit(r.status ?? 1);
|
package/package.json
CHANGED
|
@@ -1,6 +1,32 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "huoye",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Publish agent-made pages to Huoye: `npx huoye login`, then `huoye deploy`.",
|
|
5
|
+
"homepage": "https://huoye.app",
|
|
6
|
+
"license": "UNLICENSED",
|
|
7
|
+
"author": "HUOYE LLC <admin@huoye.app>",
|
|
8
|
+
"keywords": [
|
|
9
|
+
"huoye",
|
|
10
|
+
"cli",
|
|
11
|
+
"agents",
|
|
12
|
+
"publish",
|
|
13
|
+
"pages"
|
|
14
|
+
],
|
|
15
|
+
"bin": {
|
|
16
|
+
"huoye": "bin/huoye.js"
|
|
17
|
+
},
|
|
18
|
+
"files": [
|
|
19
|
+
"bin/huoye.js",
|
|
20
|
+
"README.md"
|
|
21
|
+
],
|
|
22
|
+
"engines": {
|
|
23
|
+
"node": ">=16"
|
|
24
|
+
},
|
|
25
|
+
"optionalDependencies": {
|
|
26
|
+
"huoye-darwin-arm64": "0.1.0",
|
|
27
|
+
"huoye-darwin-x64": "0.1.0",
|
|
28
|
+
"huoye-linux-x64": "0.1.0",
|
|
29
|
+
"huoye-linux-arm64": "0.1.0",
|
|
30
|
+
"huoye-win32-x64": "0.1.0"
|
|
31
|
+
}
|
|
32
|
+
}
|