* 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.8 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 · 🇮🇳 mr · 🇲🇾 ms · 🇲🇹 mt · 🇲🇲 my · 🇳🇵 ne · 🇳🇱 nl · 🇳🇴 no · 🇮🇳 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: "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
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 କୀ |
ଆବିଷ୍କାର
ପ୍ଲଗିନ୍ଗୁଡ଼ିକୁ ନିମ୍ନ ସ୍ଥାନଗୁଡ଼ିକରୁ ଖୋଜାଯାଏ:
~/.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/ ଦେଖନ୍ତୁ।