* 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.
9.5 KiB
OmniRoute CLI Plugin System (ગુજરાતી)
🌐 Languages: 🇺🇸 English · 🇪🇹 am · 🇸🇦 ar · 🇦🇿 az · 🇧🇬 bg · 🇧🇩 bn · 🇨🇿 cs · 🇩🇰 da · 🇩🇪 de · 🇬🇷 el · 🇪🇸 es · 🇪🇪 et · 🇮🇷 fa · 🇫🇮 fi · 🇫🇷 fr · 🇮🇪 ga · 🇳🇬 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
તેના કોરમાં ફેરફાર કર્યા વિના omniroute CLI ને વિસ્તૃત કરો. પ્લગઇન્સ gh extension અથવા kubectl plugin જેવી જ omniroute-cmd-* નામકરણ પરંપરાને અનુસરે છે.
ઝડપી શરૂઆત
# 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 સ્પિનર વડે રૅપ કરે છે |
ctx.baseUrl |
string |
નિર્ધારિત બેઝ URL |
ctx.apiKey |
string | null |
આપવામાં આવી હોય તો API કી |
શોધ
પ્લગઇન્સની શોધ આ સ્થાનોમાંથી થાય છે:
~/.omniroute/plugins/<name>/— વપરાશકર્તા-સ્થાનિક ઇન્સ્ટોલ્સOMNIROUTE_PLUGIN_PATHenv var — કસ્ટમ ડિરેક્ટરી
બંને માત્ર CLI માટે છે. સર્વર-સાઇડ પ્લગઇન રનટાઇમ (પ્રોક્સીની અંદર ચાલતાં marketplace/plugin.json
પ્લગઇન્સ)નું પોતાનું સ્કેનર અને પોતાનું ઓવરરાઇડ,
OMNIROUTE_PLUGINS_DIR છે — જુઓ
PLUGIN_MARKETPLACE.md → પ્લગઇન ડિરેક્ટરી.
એકને સેટ કરવાથી બીજાને અસર થતી નથી.
લોડિંગ ભૂલો પકડવામાં આવે છે અને ચેતવણીઓ તરીકે પ્રિન્ટ થાય છે — ખામીયુક્ત પ્લગઇન ક્યારેય CLI ને ક્રૅશ કરતું નથી.
સુરક્ષા
પ્લગઇન્સ omniroute જેવી જ Node.js પ્રોસેસ પરવાનગીઓ સાથે ચાલે છે. ફક્ત તમે વિશ્વાસ કરતા હો તેવા સ્ત્રોતોમાંથી જ પ્લગઇન્સ ઇન્સ્ટોલ કરો. omniroute plugin install સ્પષ્ટ ચેતવણી બતાવે છે અને --yes અથવા ઇન્ટરેક્ટિવ પુષ્ટિ જરૂરી બનાવે છે.
પ્રકાશન
- ખાતરી કરો કે
package.jsonમાં"keywords": ["omniroute-plugin"]છે - સામાન્ય રીતે
npm publishચલાવો - વપરાશકર્તાઓ
omniroute plugin search <query>દ્વારા શોધે છે (npm registry માં શોધ કરે છે)
ઉદાહરણ પ્લગઇન
meta + register() સાથેના ન્યૂનતમ કાર્યરત ઉદાહરણ માટે examples/omniroute-cmd-hello/ જુઓ.