Files
OmniRoute/docs/i18n/uz/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.8 KiB
Raw Blame History

OmniRoute CLI Plugin System (Oʻzbekcha)

🌐 Languages: 🇺🇸 English · 🇪🇹 am · 🇸🇦 ar · 🇦🇿 az · 🇧🇬 bg · 🇧🇩 bn · 🇨🇿 cs · 🇩🇰 da · 🇩🇪 de · 🇬🇷 el · 🇪🇸 es · 🇪🇪 et · 🇮🇷 fa · 🇫🇮 fi · 🇫🇷 fr · 🇮🇪 ga · 🇮🇳 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 · 🇻🇳 vi · 🇳🇬 yo · 🇨🇳 zh-CN · 🇹🇼 zh-TW


omniroute CLI vositasini uning yadrosini oʻzgartirmasdan kengaytiring. Plaginlar gh extension yoki kubectl pluginga oʻxshash tarzda omniroute-cmd-* nomlash qoidasiga amal qiladi.

Tezkor boshlash

# npm'dan plaginni oʻrnating
omniroute plugin install stripe

# Ishlab chiqish jarayonidagi lokal plaginni oʻrnating
omniroute plugin install ./my-plugin

# Oʻrnatilgan plaginlarni roʻyxatlang
omniroute plugin list

# Yangi plagin shablonini yarating
omniroute plugin scaffold myplugin
cd omniroute-cmd-myplugin
omniroute plugin install .

Plagin tuzilishi

Plagin omniroute-cmd-<name> (yoki @scope/omniroute-cmd-<name>) nomli npm paketidir.

omniroute-cmd-myplugin/
├── package.json     # "type": "module" va "main": "index.mjs" boʻlishi shart
├── index.mjs        # register(program, ctx) va ixtiyoriy meta'ni eksport qiladi
└── 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: "OmniRoute uchun plaginim",
  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);
    });
}

Plagin konteksti API'si

register(program, ctx)ga uzatiladigan ctx obyekti:

Xususiyat Tur Tavsif
ctx.apiFetch(path, opts) async function OmniRoute serveriga autentifikatsiyalangan soʻrov
ctx.emit(data, opts) function --output bayrogʻiga muvofiq table/json/jsonl/csv formatida chiqarish
ctx.t(key) async function i18n tarjimasini izlash
ctx.withSpinner(label, fn) async function Asinxron fn'ni ora spinneri bilan oʻraydi
ctx.baseUrl string Aniqlangan asosiy URL
ctx.apiKey string | null Taqdim etilgan boʻlsa, API kaliti

Aniqlash

Plaginlar quyidagi joylardan aniqlanadi:

  1. ~/.omniroute/plugins/<name>/ — foydalanuvchining lokal oʻrnatmalari
  2. OMNIROUTE_PLUGIN_PATH muhit oʻzgaruvchisi — maxsus katalog

Ikkalasi ham faqat CLI uchun. Server tomonidagi plaginlar ish muhiti (proksi ichida ishlaydigan marketplace/plugin.json plaginlari) oʻzining alohida skaneri va alohida qayta belgilash sozlamasi — OMNIROUTE_PLUGINS_DIRga ega; qarang: PLUGIN_MARKETPLACE.md → Plagin katalogi. Ulardan birini sozlash boshqasiga taʼsir qilmaydi.

Yuklash xatolari ushlanadi va ogohlantirish sifatida chiqariladi — buzilgan plagin hech qachon CLI ishini toʻxtatmaydi.

Xavfsizlik

Plaginlar omniroute bilan bir xil Node.js jarayoni huquqlari asosida ishlaydi. Faqat ishonchli manbalardagi plaginlarni oʻrnating. omniroute plugin install aniq ogohlantirishni koʻrsatadi va --yes bayrogʻini yoki interaktiv tasdiqlashni talab qiladi.

Nashr qilish

  1. package.json faylida "keywords": ["omniroute-plugin"] mavjudligiga ishonch hosil qiling
  2. Odatdagidek npm publish buyrugʻini bajaring
  3. Foydalanuvchilar omniroute plugin search <query> orqali topadi (npm reyestridan qidiradi)

Namuna plagin

meta + register() bilan ishlaydigan minimal namuna uchun examples/omniroute-cmd-hello/ga qarang.