Files
OmniRoute/docs/i18n/ka/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

10 KiB

OmniRoute CLI Plugin System (ქართული)

🌐 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 · 🇰🇭 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


გააფართოეთ omniroute CLI მის ბირთვში ცვლილებების შეტანის გარეშე. პლაგინები იყენებენ omniroute-cmd-* სახელდების წესს, gh extension-ის ან kubectl plugin-ის მსგავსად.

სწრაფი დაწყება

# დააინსტალირეთ პლაგინი npm-დან
omniroute plugin install stripe

# დააინსტალირეთ ლოკალური პლაგინი შემუშავების პროცესში
omniroute plugin install ./my-plugin

# აჩვენეთ დაინსტალირებული პლაგინების სია
omniroute plugin list

# შექმენით ახალი პლაგინის საწყისი სტრუქტურა
omniroute plugin scaffold myplugin
cd omniroute-cmd-myplugin
omniroute plugin install .

პლაგინის სტრუქტურა

პლაგინი არის npm პაკეტი სახელად omniroute-cmd-<name> (ან @scope/omniroute-cmd-<name>).

omniroute-cmd-myplugin/
├── package.json     # უნდა შეიცავდეს "type": "module" და "main": "index.mjs"
├── index.mjs        # ახდენს register(program, ctx)-ისა და არასავალდებულო meta-ს ექსპორტს
└── 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-ისთვის",
  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

ctx ობიექტი, რომელიც გადაეცემა register(program, ctx)-ს:

თვისება ტიპი აღწერა
ctx.apiFetch(path, opts) async function ავთენტიფიცირებული მოთხოვნა OmniRoute სერვერისადმი
ctx.emit(data, opts) function გამოტანა table/json/jsonl/csv ფორმატში --output ალმის მიხედვით
ctx.t(key) async function i18n თარგმანის მოძიება
ctx.withSpinner(label, fn) async function ასინქრონული fn-ის შეფუთვა ora სპინერით
ctx.baseUrl string განსაზღვრული საბაზისო URL
ctx.apiKey string | null API გასაღები, თუ მითითებულია

აღმოჩენა

პლაგინების აღმოჩენა ხდება შემდეგი ადგილებიდან:

  1. ~/.omniroute/plugins/<name>/ — მომხმარებლის ლოკალური ინსტალაციები
  2. OMNIROUTE_PLUGIN_PATH გარემოს ცვლადი — მორგებული დირექტორია

ორივე მხოლოდ CLI-სთვისაა. სერვერის მხარეს მოქმედ პლაგინების შესრულების გარემოს (marketplace/plugin.json პლაგინებს, რომლებიც პროქსის შიგნით სრულდება) აქვს საკუთარი სკანერი და საკუთარი გადამფარავი პარამეტრი, OMNIROUTE_PLUGINS_DIR — იხილეთ PLUGIN_MARKETPLACE.md → პლაგინების დირექტორია. ერთის დაყენება მეორეზე გავლენას არ ახდენს.

ჩატვირთვის შეცდომები მუშავდება და გაფრთხილებების სახით იბეჭდება — გაუმართავი პლაგინი CLI-ის მუშაობას არასოდეს წყვეტს.

უსაფრთხოება

პლაგინები მუშაობს იმავე Node.js პროცესის პრივილეგიებით, რომლითაც omniroute. დააინსტალირეთ პლაგინები მხოლოდ იმ წყაროებიდან, რომლებსაც ენდობით. omniroute plugin install აჩვენებს მკაფიო გაფრთხილებას და მოითხოვს --yes პარამეტრს ან ინტერაქტიულ დადასტურებას.

გამოქვეყნება

  1. დარწმუნდით, რომ package.json შეიცავს "keywords": ["omniroute-plugin"]
  2. ჩვეულებრივად გაუშვით npm publish
  3. მომხმარებლები პოულობენ პლაგინებს omniroute plugin search <query>-ის მეშვეობით (ეძებს npm რეესტრში)

პლაგინის მაგალითი

meta + register()-ის მქონე მინიმალური სამუშაო მაგალითისთვის იხილეთ examples/omniroute-cmd-hello/.