Files
OmniRoute/docs/i18n/ga/docs/frameworks/PLUGINS.md
Diego Rodrigues de Sa e Souza 8feea123bb feat(docs): mirror every docs/ page in all 65 locales (#14106)
* feat(docs): mirror every docs/ page in all 65 locales

Extends the documentation mirrors from the 22-page core set (#13940) to
every Markdown page under docs/: 152 sources x 65 locales = 9,880 mirrors
(6,208 new), language bars rewritten for the full locale list, state
adopted so the blocking drift gate now covers all 152 pages.

run-translation.mjs: an oversized block made only of table rows or list
items (PROVIDER_REFERENCE.md 244-row table, FREE_TIERS.md 71-item list) is
cut at item boundaries and rejoined without a blank line — the single
16-40 KB request outlived the backend socket for verbose scripts. 48
older mirrors whose tables had lost rows were retranslated with --force.

* docs(i18n): refresh mirrors for the sources the base changed since the branch cut

Section-level retranslation of the 29 docs (and README.md) whose source
or mirrors moved on release/v3.8.51 during the run, then state adoption;
the drift gate is green again on the merged tree.
2026-09-18 13:16:46 -03:00

7.9 KiB

OmniRoute CLI Plugin System (Gaeilge)

🌐 Languages: 🇺🇸 English · 🇪🇹 am · 🇸🇦 ar · 🇦🇿 az · 🇧🇬 bg · 🇧🇩 bn · 🇨🇿 cs · 🇩🇰 da · 🇩🇪 de · 🇬🇷 el · 🇪🇸 es · 🇪🇪 et · 🇮🇷 fa · 🇫🇮 fi · 🇫🇷 fr · 🇮🇳 gu · 🇳🇬 ha · 🇮🇱 he · 🇮🇳 hi · 🇭🇷 hr · 🇭🇺 hu · 🇦🇲 hy · 🇮🇩 id · 🇳🇬 ig · 🇮🇹 it · 🇯🇵 ja · 🇬🇪 ka · 🇰🇭 km · 🇮🇳 kn · 🇰🇷 ko · 🇱🇹 lt · 🇱🇻 lv · 🇮🇳 ml · 🇮🇳 mr · 🇲🇾 ms · 🇲🇹 mt · 🇲🇲 my · 🇳🇵 ne · 🇳🇱 nl · 🇳🇴 no · 🇮🇳 or · 🇮🇳 pa · 🇵🇭 phi · 🇵🇱 pl · 🇵🇹 pt · 🇧🇷 pt-BR · 🇷🇴 ro · 🇷🇺 ru · 🇱🇰 si · 🇸🇰 sk · 🇸🇮 sl · 🇷🇸 sr · 🇸🇪 sv · 🇰🇪 sw · 🇮🇳 ta · 🇮🇳 te · 🇹🇭 th · 🇹🇷 tr · 🇺🇦 uk-UA · 🇵🇰 ur · 🇺🇿 uz · 🇻🇳 vi · 🇳🇬 yo · 🇨🇳 zh-CN · 🇹🇼 zh-TW


Leathnaigh CLI omniroute gan a chroí a mhodhnú. Leanann breiseáin an coinbhinsiún ainmniúcháin omniroute-cmd-*, cosúil le gh extensionkubectl plugin.

Tús tapa

# Suiteáil breiseán ó npm
omniroute plugin install stripe

# Suiteáil breiseán áitiúil atá á fhorbairt
omniroute plugin install ./my-plugin

# Liostaigh na breiseáin atá suiteáilte
omniroute plugin list

# Cruthaigh creatlach do bhreiseán nua
omniroute plugin scaffold myplugin
cd omniroute-cmd-myplugin
omniroute plugin install .

Struchtúr breiseáin

Is pacáiste npm darb ainm omniroute-cmd-<name> (nó @scope/omniroute-cmd-<name>) é breiseán.

omniroute-cmd-myplugin/
├── package.json     # ní mór "type": "module" agus "main": "index.mjs" a bheith ann
├── index.mjs        # easpórtálann sé register(program, ctx) + meta roghnach
└── README.md

package.json

{
  "name": "omniroute-cmd-myplugin",
  "version": "0.1.0",
  "type": "module",
  "main": "index.mjs",
  "engines": { "omniroute": ">=4.0.0" },
  "keywords": ["omniroute-plugin", "omniroute-cmd"]
}

index.mjs

export const meta = {
  name: "myplugin",
  version: "0.1.0",
  description: "My plugin for OmniRoute",
  omnirouteApi: ">=4.0.0",
};

export function register(program, ctx) {
  program
    .command("myplugin")
    .description(meta.description)
    .option("-n, --name <name>")
    .action(async (opts, cmd) => {
      const gOpts = cmd.optsWithGlobals();
      const res = await ctx.apiFetch("/api/combos", {
        baseUrl: gOpts.baseUrl,
        apiKey: gOpts.apiKey,
      });
      const data = await res.json();
      ctx.emit(data, gOpts);
    });
}

API comhthéacs an bhreiseáin

An réad ctx a chuirtear ar aghaidh chuig register(program, ctx):

Airí Cineál Cur síos
ctx.apiFetch(path, opts) async function Gabháil fhíordheimhnithe chuig an bhfreastalaí OmniRoute
ctx.emit(data, opts) function Aschur i bhformáid table/json/jsonl/csv de réir na brataí --output
ctx.t(key) async function Cuardach aistriúcháin i18n
ctx.withSpinner(label, fn) async function Timfhilleann sé fn aisioncronach le rothlóir ora
ctx.baseUrl string Bun-URL réitithe
ctx.apiKey string | null Eochair API má soláthraíodh í

Fionnachtain

Aimsítear breiseáin sna háiteanna seo a leanas:

  1. ~/.omniroute/plugins/<name>/ — suiteálacha áitiúla an úsáideora
  2. Athróg timpeallachta OMNIROUTE_PLUGIN_PATH — comhadlann shaincheaptha

Baineann an dá cheann leis an CLI amháin. Tá a scanóir féin agus a shárú féin, OMNIROUTE_PLUGINS_DIR, ag am rite na mbreiseán ar thaobh an fhreastalaí (na breiseáin marketplace/plugin.json a ritheann laistigh den seachfhreastalaí) — féach PLUGIN_MARKETPLACE.md → Comhadlann breiseán. Ní dhéanann socrú ceann amháin difear don cheann eile.

Gabhtar earráidí luchtaithe agus priontáiltear mar rabhaidh iad — ní thuairteálann breiseán briste an CLI choíche.

Slándáil

Ritheann breiseáin leis na pribhléidí próisis Node.js céanna agus atá ag omniroute. Ná suiteáil ach breiseáin ó fhoinsí a bhfuil muinín agat astu. Taispeánann omniroute plugin install rabhadh sainráite agus éilíonn sé --yes nó deimhniú idirghníomhach.

Foilsiú

  1. Cinntigh go bhfuil "keywords": ["omniroute-plugin"] in package.json
  2. Úsáid npm publish mar is gnách
  3. Aimsíonn úsáideoirí iad trí omniroute plugin search <query> (déanann sé cuardach i gclárlann npm)

Breiseán samplach

Féach examples/omniroute-cmd-hello/ le haghaidh sampla íosta feidhmiúil ina bhfuil meta + register().