Files
OmniRoute/examples/omniroute-cmd-hello/index.mjs
diegosouzapw 3079d6611e fix: more CI failures (Package Artifact + Unit Tests 4/4)
- src/mitm/manager.runtime.ts: add .js extension to relative re-export
  (Next.js standalone build uses node16 module resolution; bare './manager'
  triggers TS2835 in npm-publish CLI build).
- examples/omniroute-cmd-hello/: restore the minimal plugin example
  referenced by tests/unit/cli-plugin-system.test.ts. Restore the docs
  link in docs/dev/plugins.md now that the path exists.
- src/i18n/messages/en.json: translate two leftover Portuguese strings in
  quotaShare.betaConfigSaved{Prefix,Suffix} (regression #2540 — the i18n
  test guards against PT bleeding into the English source-of-truth).
- CI: bump Coverage job timeout 30→60min (concurrency=1 + 1.3k tests
  takes ~45min; previous run was canceled at the 30min ceiling).
2026-05-22 22:20:43 -03:00

23 lines
664 B
JavaScript

// Minimal OmniRoute CLI plugin example.
// Usage:
// 1. Copy this folder to ~/.omniroute/plugins/omniroute-cmd-hello/
// 2. Run `omniroute hello`
// See docs/dev/plugins.md for the full plugin contract.
export const meta = {
name: "omniroute-cmd-hello",
version: "0.1.0",
description: "Hello-world OmniRoute CLI plugin example.",
omnirouteApi: ">=3.0.0",
};
export function register(program, ctx) {
program
.command("hello")
.description(meta.description)
.option("-n, --name <name>", "name to greet", "world")
.action(async (opts, _cmd) => {
ctx.emit({ message: `Hello, ${opts.name}!`, plugin: meta.name }, opts);
});
}