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

9.6 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 · 🇬🇪 ka · 🇰🇭 km · 🇮🇳 kn · 🇰🇷 ko · 🇱🇹 lt · 🇱🇻 lv · 🇮🇳 ml · 🇲🇾 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 .

प्लगइनची रचना

प्लगइन हे omniroute-cmd-<name> (किंवा @scope/omniroute-cmd-<name>) नावाचे npm पॅकेज असते.

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

register(program, ctx) ला दिले जाणारे ctx ऑब्जेक्ट:

गुणधर्म प्रकार वर्णन
ctx.apiFetch(path, opts) async function OmniRoute सर्व्हरकडे प्रमाणीकरण केलेली fetch विनंती
ctx.emit(data, opts) function --output फ्लॅगनुसार table/json/jsonl/csv मध्ये आउटपुट
ctx.t(key) async function i18n भाषांतर शोध
ctx.withSpinner(label, fn) async function async fn ला ora spinner मध्ये गुंडाळते
ctx.baseUrl string निर्धारित केलेला मूळ URL
ctx.apiKey string | null दिली असल्यास API की

शोध

प्लगइन पुढील ठिकाणांमधून शोधले जातात:

  1. ~/.omniroute/plugins/<name>/ — वापरकर्त्याच्या स्थानिक स्थापना
  2. OMNIROUTE_PLUGIN_PATH env var — सानुकूल निर्देशिका

दोन्ही केवळ CLI साठी आहेत. सर्व्हर-साइड प्लगइन रनटाइमला (प्रॉक्सीमध्ये चालणारे marketplace/plugin.json प्लगइन) स्वतःचा स्कॅनर आणि स्वतःचे ओव्हरराइड, OMNIROUTE_PLUGINS_DIR आहे — पाहा PLUGIN_MARKETPLACE.md → प्लगइन निर्देशिका. एक सेट केल्याने दुसऱ्यावर परिणाम होत नाही.

लोडिंगमधील त्रुटी पकडल्या जातात आणि इशाऱ्यांच्या स्वरूपात दाखवल्या जातात — बिघडलेले प्लगइन कधीही CLI क्रॅश करत नाही.

सुरक्षा

प्लगइन omniroute प्रमाणेच Node.js प्रक्रियेच्या विशेषाधिकारांसह चालतात. फक्त तुमचा विश्वास असलेल्या स्रोतांमधूनच प्लगइन स्थापित करा. omniroute plugin install स्पष्ट इशारा दाखवते आणि --yes किंवा परस्परसंवादी पुष्टीकरण आवश्यक करते.

प्रकाशित करणे

  1. package.json मध्ये "keywords": ["omniroute-plugin"] असल्याची खात्री करा
  2. नेहमीप्रमाणे npm publish चालवा
  3. वापरकर्ते omniroute plugin search <query> द्वारे शोधतात (npm registry मध्ये शोधते)

उदाहरण प्लगइन

meta + register() असलेल्या किमान कार्यरत उदाहरणासाठी examples/omniroute-cmd-hello/ पाहा.