@nettee/beacon 0.3.5 → 0.3.6
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 +9 -7
- package/deploy/io.nettee.beacon.plist.example +0 -2
- package/dist/cli-app.js +6 -13
- package/dist/dashboard/ui/assets/index-BP5xd2Iv.js +9 -0
- package/dist/dashboard/ui/assets/index-D3C6sw_J.css +2 -0
- package/dist/dashboard/ui/index.html +2 -2
- package/package.json +1 -1
- package/dist/dashboard/ui/assets/index-BNrf6SEW.css +0 -2
- package/dist/dashboard/ui/assets/index-DNeyL6DY.js +0 -9
package/README.md
CHANGED
|
@@ -36,7 +36,7 @@ deployment names its configuration explicitly:
|
|
|
36
36
|
|
|
37
37
|
```sh
|
|
38
38
|
beacon doctor
|
|
39
|
-
beacon serve
|
|
39
|
+
beacon serve
|
|
40
40
|
```
|
|
41
41
|
|
|
42
42
|
`doctor` validates every Profile and credential, obtains a Feishu tenant token, and runs a real Pi RPC smoke test. It does not create Beacon state records.
|
|
@@ -319,17 +319,19 @@ same host. Expose only the event endpoint, not Beacon's unauthenticated Dashboar
|
|
|
319
319
|
## Commands
|
|
320
320
|
|
|
321
321
|
```text
|
|
322
|
-
beacon serve --config <absolute-path>
|
|
322
|
+
beacon serve [--config <absolute-path>]
|
|
323
323
|
beacon doctor [--config <absolute-path>]
|
|
324
324
|
beacon trigger [--config <absolute-path>] --profile <id> --input -
|
|
325
325
|
beacon schedule trigger [--config <absolute-path>] --profile <id> --schedule <id>
|
|
326
326
|
beacon version
|
|
327
327
|
```
|
|
328
328
|
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
329
|
+
`serve`, `doctor`, `trigger`, and `schedule trigger` use `~/.beacon/config.yaml`
|
|
330
|
+
in the current running user's home directory when `--config` is omitted,
|
|
331
|
+
regardless of the working directory. An explicit override must be an absolute
|
|
332
|
+
path, for example `beacon serve --config /opt/beacon/config.yaml`.
|
|
333
|
+
Missing or invalid configuration and required dependency failures are reported
|
|
334
|
+
as errors with a nonzero exit status; Beacon does not fall back to another config.
|
|
333
335
|
|
|
334
336
|
An operator can run one Profile without Feishu delivery by piping input to `trigger`; the Final Outcome is printed to stdout:
|
|
335
337
|
|
|
@@ -448,7 +450,7 @@ Secrets and ephemeral Run Capability tokens are excluded from persisted records
|
|
|
448
450
|
|
|
449
451
|
## launchd
|
|
450
452
|
|
|
451
|
-
Edit [`deploy/io.nettee.beacon.plist.example`](deploy/io.nettee.beacon.plist.example) so every executable,
|
|
453
|
+
Edit [`deploy/io.nettee.beacon.plist.example`](deploy/io.nettee.beacon.plist.example) so every executable, working-directory, and log path is absolute. The example runs `beacon serve` and loads the running user's `~/.beacon/config.yaml`; add `--config` and an absolute path to `ProgramArguments` to override it. Create the log directory, copy the plist to `~/Library/LaunchAgents/io.nettee.beacon.plist`, then validate and load it:
|
|
452
454
|
|
|
453
455
|
Use `command -v beacon` after the global npm installation to find the absolute
|
|
454
456
|
CLI path for `ProgramArguments`. A Node version-manager upgrade can change that
|
package/dist/cli-app.js
CHANGED
|
@@ -3,18 +3,14 @@ import { isAbsolute, join } from "node:path";
|
|
|
3
3
|
export const defaultConfigPath = join(homedir(), ".beacon", "config.yaml");
|
|
4
4
|
function usage() {
|
|
5
5
|
throw new Error(`Usage:
|
|
6
|
-
beacon serve --config <absolute-path>
|
|
6
|
+
beacon serve [--config <absolute-path>]
|
|
7
7
|
beacon doctor [--config <absolute-path>]
|
|
8
8
|
beacon trigger [--config <absolute-path>] --profile <id> --input -
|
|
9
9
|
beacon schedule trigger [--config <absolute-path>] --profile <id> --schedule <id>
|
|
10
|
-
beacon version
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
usage();
|
|
15
|
-
if (!isAbsolute(args[1]))
|
|
16
|
-
throw new Error("Config path must be absolute");
|
|
17
|
-
return args[1];
|
|
10
|
+
beacon version
|
|
11
|
+
|
|
12
|
+
Config defaults to ~/.beacon/config.yaml in the current user's home directory.
|
|
13
|
+
An explicit --config path must be absolute.`);
|
|
18
14
|
}
|
|
19
15
|
function options(args) {
|
|
20
16
|
if (args.length % 2 !== 0)
|
|
@@ -42,10 +38,7 @@ export function parseCli(args) {
|
|
|
42
38
|
usage();
|
|
43
39
|
return { command: "version" };
|
|
44
40
|
}
|
|
45
|
-
if (command === "serve") {
|
|
46
|
-
return { command, config: requiredConfig(rest) };
|
|
47
|
-
}
|
|
48
|
-
if (command === "doctor") {
|
|
41
|
+
if (command === "serve" || command === "doctor") {
|
|
49
42
|
const values = options(rest);
|
|
50
43
|
if ([...values.keys()].some((key) => key !== "--config"))
|
|
51
44
|
usage();
|