mgexcli 1.0.7 → 1.0.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bin/index.js +1 -1
- package/dist/index.js +1 -1
- package/dist/utils.js +1 -1
- package/package.json +1 -1
package/dist/bin/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
"use strict";function r(
|
|
2
|
+
"use strict";function r(){var n=["1702066RVFBzV","11680pTfgWW","752028fHTJfb","69018Xzqsms","1GKMUkY","847115pBIJvQ","998212wVHmnQ","7049410ZCzhUa","322RcOjAh","5508FCBQpd"];return(r=function(){return n})()}function n(n,t){return n-=294,r()[n]}require("../index.js"),function(){for(var t=n,s=r();;)try{if(549096===parseInt(t(298))/1*(-parseInt(t(294))/2)+parseInt(t(296))/3+parseInt(t(300))/4+-parseInt(t(299))/5+-parseInt(t(297))/6*(parseInt(t(302))/7)+parseInt(t(295))/8*(parseInt(t(303))/9)+parseInt(t(301))/10)break;s.push(s.shift())}catch(r){s.push(s.shift())}}();
|
package/dist/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
"use strict";var e=require("tslib"),n=require("commander"),
|
|
2
|
+
"use strict";var e=require("tslib"),n=require("commander"),t=require("fs-extra"),o=require("node:path"),r=require("./utils.js");const i=s;function s(e,n){e-=326;return a()[e]}function a(){const e=["resolve","authToken","path","190UEFJMn","readJsonSync","deploy","parse","349608UVthGu","action","exit","4ADTmuV","description","cleanupTmpDir","option","40730uSqmaa","1725tzKiGX","1277565TPBnPv","command","--path <path>","117184kYnevm","../package.json","17kJgsUk","version","name","63HVvLNu","getAppList","SIGINT","3756wfarRS","mgexcli","login","1947575ysBPao","download","221056DXljiw"];return(a=function(){return e})()}!function(){const e=s,n=a();for(;;)try{if(232759===parseInt(e(347))/1*(parseInt(e(340))/2)+parseInt(e(342))/3*(-parseInt(e(336))/4)+-parseInt(e(341))/5*(parseInt(e(353))/6)+parseInt(e(356))/7+parseInt(e(345))/8*(-parseInt(e(350))/9)+parseInt(e(329))/10*(parseInt(e(358))/11)+-parseInt(e(333))/12)break;n.push(n.shift())}catch(e){n.push(n.shift())}}();const c=t[i(330)](o[i(326)](__dirname,i(346))),p=new n.Command;p[i(349)](i(354)).description("Manage Words CLI")[i(348)](c.version),p[i(343)](i(355)).description(i(355))[i(334)](n=>e.__awaiter(void 0,void 0,void 0,function*(){const e=i;try{yield r[e(355)](),process[e(335)](0)}catch(n){process[e(335)](1)}})),p[i(343)](i(331)).description(i(331)).option("--authToken <authToken>",i(327)).action(n=>e.__awaiter(void 0,void 0,void 0,function*(){const e=i;yield r[e(351)](n)})),p[i(343)](i(357))[i(337)](i(357))[i(339)](i(344),i(328))[i(334)](n=>e.__awaiter(void 0,void 0,void 0,function*(){const e=i;yield r[e(351)](n,!0)})),p[i(332)](),process.on(i(352),()=>{r[i(338)](),process.exit(0)}),process.on("SIGTERM",()=>{r[i(338)](),process.exit(0)}),process.on("exit",()=>{r[i(338)]()});
|
package/dist/utils.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
"use strict";var n=require("tslib"),e=require("node:os"),t=require("node:path"),o=require("fs-extra"),s=require("ora"),r=require("node:http"),i=require("inquirer"),c=require("execa"),a=require("chalk"),l=require("semver");const u=b;var d;!function(){const n=b,e=x();for(;;)try{if(489844===-parseInt(n(363))/1+-parseInt(n(271))/2+-parseInt(n(345))/3*(-parseInt(n(274))/4)+-parseInt(n(314))/5+-parseInt(n(308))/6*(parseInt(n(307))/7)+parseInt(n(370))/8+parseInt(n(287))/9)break;e.push(e.shift())}catch(n){e.push(e.shift())}}();const p={success:"✔",error:"✖",warning:"⚠",info:"ℹ"},y="1.0.0",f=t[u(296)](e.tmpdir(),u(411)),g=new a.Chalk,h=s(),v=u(407),m=t[u(296)](e[u(365)](),".mgexcli"),w=t[u(296)](m,u(272));function x(){const n=["log","translation","view","export declare const ","/api/punish","POST","searchParams","publish","text/plain; charset=utf-8","utf-8","127.0.0.1","createServer","gray","words","isAbsolute","./index.js","list","正在获取应用列表...","package.json","port",".json","info","2577WlHuSY","//registry.npmjs.org/:_authToken="," option is missing and cannot be empty. please add --","string","listen","version","data","toISOString","stringify","pkg","writeJsonSync","请选择一个应用","bold","token","README.md","join"," i18n language package","request","444379XoSlew","input","homedir","您还没有创建应用,请先创建应用","exit","the ","prompt","5747824FRVsDJ","/token","./index.d.ts","catch","|(string & {});","...","message","end","publish version:","green","authToken","error","writeHead","ignore","next version:","win32","|(string & {}), Record<I18nKey, any>>;","/callback","red","download success.","start","ensureDirSync",'export { default as languages } from "./languages.json";',"Unauthorized","/api/punish/","github","cyan","cookie","status","npm","session","HTTP ","export { default as ","/api/auth/get-session","login fail.","/api/auth/sign-in/social","writeFileSync","https://ex.roxmotor.top","GET","unknown","removeSync",".mgexcli_tmp","index.js","login...",'declare module "vue-i18n" {\n interface DefineLocaleMessage extends Record<I18nKey, any> {}\n interface ComposerTranslation {\n (key: I18nKey, ...args: any[]): any;\n }\n interface VueI18n {\n t(key: I18nKey, ...args: any[]): any;\n }\n}',"toString","map","url","$1 $2","cmd","trim","cwd","index.d.ts","keys","1399612eYQszV","session.json","push","272pMruMq","xdg-open","export type I18nAllLanguageKey = ","./i18n","public","EMPTY","inc",'";\n```\n\n## TypeScript\n\nThis package contains complete TypeScript declarations.\n\n---\n\nGenerated automatically.\n',"return","listening","http://localhost:","pathExistsSync","address","20224422MxIKIM","--access","replace",'\n```\n\n## Usage\n\n```ts\nimport { zh, en, languages } from "',"/api/auth/cli-export","never","*.js","success"," value.","resolve","ensureFileSync","close","i18n","readJsonSync",'";\n```\n\nOr use all languages.\n\n```ts\nimport { languages } from "',"请选择一个应用:","current version: ",'.json";',"name","split","1906702ruDPBF","18MsKslk","*.json","length","export declare const languages: Record<","entries","object","2864305sMPEAF","stop","\n\n> Auto generated i18n language package.\n\n## Installation\n\n```bash\nnpm install ","include","forEach","includes","valid","darwin","open"];return(x=function(){return n})()}const k=null!==(d=process.env.MGEXCLI_COOKIE_NAME)&&void 0!==d?d:"__Secure-ex-lang-auth.session_token";function _(){f&&o[u(285)](f)&&o.removeSync(f)}function S(n){const e=u;return n.replace(/([a-z])([A-Z])/g,e(418))[e(289)](/([A-Z]+)([A-Z][a-z])/g,e(418)).replace(/[-_]/g," ").toLowerCase()[e(289)](/\s+/g," ").trim()}function j(e){return n.__awaiter(this,arguments,void 0,function*({options:n,key:e,defaultValue:t}){const o=b;let s=(null==n?void 0:n[e])||"";if(!s){return s=(yield i[o(369)]([{type:"input",name:e,default:null!=t?t:".",message:p[o(344)]+" "+g.green(S(e))+g[o(379)](":"),validate:n=>{const t=o;return!(!(null==n?void 0:n.trim())||"."===n)||p.error+" "+g.red(t(368)+e+t(347)+e+t(295))}}]))[e],null==s?void 0:s[o(267)]()}return null==s?void 0:s[o(267)]()})}function I(){const n=u;try{if(!o[n(285)](w))return null;const e=o[n(300)](w);return typeof(null==e?void 0:e[n(397)])===n(348)?k+"="+e[n(397)]:null}catch(n){return null}}function b(n,e){n-=267;return x()[n]}function E(){return n.__awaiter(this,void 0,void 0,function*(){const t=b,s=yield function(){return n.__awaiter(this,void 0,void 0,function*(){const n=b;var e;try{const t=I();if(!t)return!1;const o=yield fetch(v+n(403),{headers:{cookie:t},credentials:n(317)});if(!o.ok)return!1;const s=yield o.json();return!!(null===(e=null==s?void 0:s[n(400)])||void 0===e?void 0:e[n(358)])&&t}catch(n){return!1}})}();if(s)return s;const i=r[t(334)](),a=yield new Promise(n=>{const e=t;i[e(349)](0,e(333),()=>{const t=e,o=i[t(286)]();n(typeof o===t(313)&&o?o[t(342)]:0)})}),l=t(284)+a+"/callback";try{h[t(390)](g[t(357)][t(379)](t(413)));const s=yield fetch(v+t(405),{method:t(328),headers:{"Content-Type":"application/json"},body:JSON[t(353)]({provider:t(395),callbackURL:l,disableRedirect:!0})}),r=yield s.json()[t(373)](()=>({}));if(!s.ok||!(null==r?void 0:r[t(417)]))throw new Error((null==r?void 0:r[t(376)])||t(401)+s[t(398)]);yield function(t){return n.__awaiter(this,void 0,void 0,function*(){const n=b,o=e.platform();try{o===n(321)?yield c.execa(n(322),[t],{stdio:n(383)}):o===n(385)?yield c.execa(n(419),["/c","start","",t],{stdio:"ignore"}):yield c.execa(n(275),[t],{stdio:n(383)})}catch(n){}})}(r[t(417)]);const x=yield(d=i,y=a,f=3e5,new Promise(n=>{const e=b;let t,o=!1;const s=e=>{o||(o=!0,t&&clearTimeout(t),n(e))};t=setTimeout(()=>s(null),f),d.on(e(362),(n,t)=>{const o=e;var r;const i=(null!==(r=n[o(417)])&&void 0!==r?r:"/")[o(306)]("?")[0];if(i===o(387)){const n=new URL(o(291),v);return n[o(329)].set(o(282),"http://localhost:"+y+o(371)),t.writeHead(302,{Location:n[o(415)]()}),void t[o(377)]()}if(i===o(371)){h[o(315)]();let e="";return n.on(o(351),n=>e+=n),void n.on(o(377),()=>{const n=o,r=e[n(267)]()||null;t[n(382)](200,{"Content-Type":n(331),"Access-Control-Allow-Origin":"*"}),t[n(377)](r?"OK":n(279)),s(r)})}t.writeHead(404)[o(377)]("not found")})}));if(!x)throw new Error(t(404));const k=function(n){const e=u,t=n;return o[e(391)](m),o[e(355)](w,{cookie:t,createdAt:(new Date)[e(352)]()},{spaces:4}),t}(x);return console[t(323)](p.success,g[t(379)]("login success.")),k}catch(n){throw h.stop(),console[t(323)](p.error,g.red(n[t(376)])),n}finally{i[t(283)]&&i[t(298)]()}var d,y,f})}function T(e){return n.__awaiter(this,void 0,void 0,function*(){const n=b;try{const t=I();if(!t){if(yield E())return T(e)}const o=yield fetch(""+v+e,{method:n(408),headers:{cookie:t}});if(!o.ok)throw new Error(n(401)+o[n(398)]);const s=yield o.json().catch(()=>({}));if(!(null==s?void 0:s[n(398)]))throw new Error((null==s?void 0:s[n(376)])||"请求失败");return null==s?void 0:s[n(351)]}catch(t){if(t[n(376)][n(319)](n(393)))return function(){const n=u;o.pathExistsSync(w)&&o[n(410)](w)}(),T(e);throw t}})}function A(n,e="",t=[]){const o=u;for(const[s,r]of Object[o(312)](n)){const n=e?e+"."+s:s;r&&typeof r===o(313)&&!Array.isArray(r)?A(r,n,t):t[o(273)](n)}return t}exports.chalk=g,exports.cleanupTmpDir=_,exports.defaultBaseUrl=v,exports.defaultPkgVersion=y,exports.getAppList=function(e,s){return n.__awaiter(this,void 0,void 0,function*(){const r=b;h.start(g[r(357)][r(379)](r(340)));try{const a=yield T(r(327));yield function(e,s,r){return n.__awaiter(this,void 0,void 0,function*(){const a=b;if(!e[a(310)])return void console[a(323)](p[a(381)],g.red(a(366)));h[a(315)]();const{id:d}=yield i[a(369)]([{type:a(339),name:"id",message:g[a(357)][a(379)](a(302)),choices:e.map(n=>({name:n[a(305)],value:n.id}))}]);if(!d)return void console.log(p.error,g.red(a(356)));const v=yield function(e){return n.__awaiter(this,void 0,void 0,function*(){const n=b;h[n(390)](g[n(357)][n(379)](n(375)));try{return yield T(n(394)+e)}catch(e){console[n(323)](p[n(381)],g[n(388)](e[n(376)]))}finally{h[n(315)]()}})}(d);if(v){if(_(),r){const n=yield j({options:s,key:"path",defaultValue:a(277)});let e;e=t[a(337)](n)?t[a(296)](n):t[a(296)](process[a(268)](),n),o[a(391)](e);for(const n in v[a(336)]){const s=v[a(336)][n];o[a(355)](t[a(296)](e,n+a(343)),s,{spaces:4})}console[a(323)](p[a(294)]+" "+g[a(379)](a(389)))}else try{const e=yield j({options:s,key:a(380)});!function(n,e){const s=u,r=t[s(296)](n,".npmrc");o[s(297)](r);const i=["registry=https://registry.npmjs.org/",s(346)+e][s(360)]("\n");o[s(406)](r,i,s(332))}(f,(null==e?void 0:e[a(267)]())||"");const r=yield function(e){return n.__awaiter(this,void 0,void 0,function*(){const n=b;var t,o;let s="",r=y;h[n(390)]();try{const{stdout:o}=yield c.execa(n(399),[n(325),e,"version"],{cwd:f});s=o[n(267)](),r=null!==(t=l[n(280)](s,"patch"))&&void 0!==t?t:n(409)}catch(n){}h.stop(),console.log(p[n(344)]+" "+g[n(335)]("package name:")+" "+g[n(396)](e));let a=n(378);s&&(a=n(384),console.log(p[n(344)]+" "+g.green(n(303)+s)));return null===(o=(yield i[n(369)]([{type:n(364),name:n(350),message:p[n(344)]+" "+g[n(379)](a),default:r,validate:e=>{const t=n;return!!l[t(320)](e)||p[t(381)]+" "+g[t(388)]("invalid version number")}}]))[n(350)])||void 0===o?void 0:o[n(267)]()})}(v[a(354)]);(function(n,e,s){const r=u,i=t[r(296)](n,r(341));o.ensureFileSync(i);const c={name:e,version:s,description:e+r(361),license:"MIT",keywords:[e,r(299),r(324),"language"],main:r(338),types:r(372),files:[r(309),r(293),"*.d.ts","README.md"],publishConfig:{access:r(278)}};o.writeJsonSync(i,c,{spaces:4})})(f,v[a(354)],r),function(n,e){const s=u,r=t[s(296)](n,s(359));o[s(297)](r);const i="# "+e+s(316)+e+s(290)+e+'";\n\nconsole.log(zh.hello);\nconsole.log(en.hello);\n\nconsole.log(languages.zh.hello);\nconsole.log(languages.en.hello);\n```\n\n## Export\n\nEach language exports a JSON object.\n\n```ts\nimport { zh } from "'+e+s(301)+e+s(281);o[s(406)](r,i,"utf-8")}(f,v[a(354)]),function(n,e){const s=u;o.writeJsonSync(t[s(296)](n,"languages.json"),e,{spaces:4});let r="never";const i=[],c=[],a=A(e),l=0===a[s(310)]?s(292):a[s(416)](n=>'"'+n+'"').join("|"),d=Object[s(270)](e),p=0===d[s(310)]?s(292):d[s(416)](n=>'"'+n+'"')[s(360)]("|");for(const c in e){const a=e[c];i[s(273)](s(402)+c+' } from "./'+c+s(304)),o.writeJsonSync(t[s(296)](n,c+".json"),a,{spaces:4});const l=A(a);r===s(292)&&(r=0===l[s(310)]?s(292):l.map(n=>'"'+n+'"').join("|"))}i[s(273)](s(392)),c[s(273)]("export type I18nKey = "+r+s(374)),c.push(s(276)+l+s(374)),d[s(318)](n=>{const e=s;c.push(e(326)+n+": Record<I18nKey, any>;")}),c[s(273)](s(311)+p+s(386)),c[s(273)](s(414)),o.writeFileSync(t[s(296)](n,s(412)),i[s(360)]("\n")),o[s(406)](t.resolve(n,s(269)),c[s(360)]("\n"))}(f,v[a(336)]),yield function(){return n.__awaiter(this,void 0,void 0,function*(){const n=b;h[n(390)]();try{yield c.execa("npm",[n(330),n(288),n(278)],{cwd:f,stdio:"inherit"}),console[n(323)](p.success+" "+g[n(379)]("deploy success."))}catch(n){throw h.stop(),n}h.stop()})}()}finally{_()}process[a(367)](0)}})}(a,e,s)}catch(n){console[r(323)](p[r(381)],g[r(388)](n[r(376)]))}finally{h[r(315)]()}})},exports.logSymbols=p,exports.login=E,exports.sessionDir=m,exports.sessionFile=w,exports.spinner=h,exports.tmpDir=f;
|
|
2
|
+
"use strict";var n=require("tslib"),e=require("node:os"),t=require("node:path"),o=require("fs-extra"),s=require("ora"),r=require("node:http"),i=require("inquirer"),a=require("execa"),c=require("chalk"),l=require("semver");const u=p;var d;function p(n,e){n-=179;return E()[n]}!function(){const n=p,e=E();for(;;)try{if(261167===parseInt(n(257))/1*(parseInt(n(262))/2)+parseInt(n(297))/3*(parseInt(n(258))/4)+parseInt(n(283))/5+parseInt(n(203))/6*(parseInt(n(317))/7)+parseInt(n(222))/8*(-parseInt(n(183))/9)+parseInt(n(244))/10+-parseInt(n(245))/11*(parseInt(n(214))/12))break;e.push(e.shift())}catch(n){e.push(e.shift())}}();const y={success:"✔",error:"✖",warning:"⚠",info:"ℹ"},g=u(251),f=t.resolve(e[u(239)](),".mgexcli_tmp"),h=new c.Chalk,v=s(),m=u(269),x=t[u(274)](e.homedir(),u(205)),w=t[u(274)](x,u(310)),k=null!==(d=process.env.MGEXCLI_COOKIE_NAME)&&void 0!==d?d:"__Secure-ex-lang-auth.session_token";function I(){const n=u;f&&o[n(220)](f)&&o[n(313)](f)}function K(n){const e=u;return n[e(190)](/([a-z])([A-Z])/g,e(298))[e(190)](/([A-Z]+)([A-Z][a-z])/g,"$1 $2")[e(190)](/[-_]/g," ")[e(321)]().replace(/\s+/g," ")[e(211)]()}function _(e){return n.__awaiter(this,arguments,void 0,function*({options:n,key:e,defaultValue:t}){const o=p;let s=(null==n?void 0:n[e])||"";if(!s){return s=(yield i[o(324)]([{type:o(188),name:e,default:null!=t?t:".",message:y[o(302)]+" "+h[o(272)](K(e))+h[o(272)](":"),validate:n=>{const t=o;return!(!(null==n?void 0:n[t(211)]())||"."===n)||y[t(268)]+" "+h[t(187)]("the "+e+t(235)+e+" value.")}}]))[e],null==s?void 0:s.trim()}return null==s?void 0:s[o(211)]()})}function b(){const n=u;try{if(!o[n(220)](w))return null;const e=o.readJsonSync(w);return"string"==typeof(null==e?void 0:e[n(279)])?k+"="+e.cookie:null}catch(n){return null}}function S(){return n.__awaiter(this,void 0,void 0,function*(){const t=p,s=yield function(){return n.__awaiter(this,void 0,void 0,function*(){const n=p;var e;try{const t=b();if(!t)return!1;const o=yield fetch(m+n(193),{headers:{cookie:t},credentials:n(266)});if(!o.ok)return!1;const s=yield o[n(306)]();return!!(null===(e=null==s?void 0:s[n(197)])||void 0===e?void 0:e[n(309)])&&t}catch(n){return!1}})}();if(s)return s;const i=r[t(201)](),c=yield new Promise(n=>{const e=t;i.listen(0,e(180),()=>{const t=e,o=i[t(215)]();n(typeof o===t(242)&&o?o[t(280)]:0)})}),l=t(230)+c+t(311);try{v[t(261)](h[t(314)][t(272)](t(184)));const s=yield fetch(m+"/api/auth/sign-in/social",{method:"POST",headers:{"Content-Type":t(221)},body:JSON[t(264)]({provider:t(243),callbackURL:l,disableRedirect:!0})}),r=yield s.json()[t(304)](()=>({}));if(!s.ok||!(null==r?void 0:r.url))throw new Error((null==r?void 0:r[t(294)])||t(194)+s[t(241)]);yield function(t){return n.__awaiter(this,void 0,void 0,function*(){const n=p,o=e[n(318)]();try{o===n(226)?yield a.execa("open",[t],{stdio:n(305)}):o===n(248)?yield a.execa("cmd",["/c",n(261),"",t],{stdio:"ignore"}):yield a.execa("xdg-open",[t],{stdio:n(305)})}catch(n){}})}(r[t(227)]);const k=yield(d=i,g=c,f=3e5,new Promise(n=>{let e,t=!1;const o=o=>{t||(t=!0,e&&clearTimeout(e),n(o))};e=setTimeout(()=>o(null),f),d.on("request",(n,e)=>{const t=p;var s;const r=(null!==(s=n[t(227)])&&void 0!==s?s:"/").split("?")[0];if(r===t(311)){const n=new URL("/api/auth/cli-export",m);return n[t(198)][t(182)]("return","http://localhost:"+g+"/token"),e[t(234)](302,{Location:n[t(186)]()}),void e[t(260)]()}if(r===t(192)){v[t(296)]();let s="";return n.on("data",n=>s+=n),void n.on(t(260),()=>{const n=t,r=s[n(211)]()||null;e[n(234)](200,{"Content-Type":"text/plain; charset=utf-8","Access-Control-Allow-Origin":"*"}),e[n(260)](r?"OK":n(276)),o(r)})}e[t(234)](404).end(t(246))})}));if(!k)throw new Error(t(249));const I=function(n){const e=u,t=n;return o.ensureDirSync(x),o[e(259)](w,{cookie:t,createdAt:(new Date).toISOString()},{spaces:4}),t}(k);return console[t(218)](y[t(291)],h[t(272)]("login success.")),I}catch(n){throw v.stop(),console[t(218)](y[t(268)],h[t(187)](n[t(294)])),n}finally{i[t(323)]&&i.close()}var d,g,f})}function j(e){return n.__awaiter(this,void 0,void 0,function*(){const n=p;try{const t=b();if(!t){if(yield S())return j(e)}const o=yield fetch(""+m+e,{method:n(292),headers:{cookie:t}});if(!o.ok)throw new Error(n(194)+o.status);const s=yield o[n(306)]()[n(304)](()=>({}));if(!(null==s?void 0:s[n(241)]))throw new Error((null==s?void 0:s[n(294)])||"请求失败");return null==s?void 0:s.data}catch(t){if(t[n(294)][n(229)](n(195)))return function(){const n=u;o.pathExistsSync(w)&&o[n(313)](w)}(),j(e);throw t}})}function E(){const n=["2504XjmiQI"," i18n language package","path","publish version:","darwin","url","map","includes","http://localhost:","export type I18nKey = ",'";\n\nconsole.log(zh.hello);\nconsole.log(en.hello);\n\nconsole.log(languages.zh.hello);\nconsole.log(languages.en.hello);\n```\n\n## Export\n\nEach language exports a JSON object.\n\n```ts\nimport { zh } from "',"|(string & {}), string>;","writeHead"," option is missing and cannot be empty. please add --",'.json";',"valid","length","tmpdir","/api/punish","status","object","github","3323970sxCWoU","64361bsQjcf","not found","export type I18nAllLanguageKey = ","win32","login fail.","invalid version number","1.0.0","cwd",'";\n```\n\n## TypeScript\n\nThis package contains complete TypeScript declarations.\n\n---\n\nGenerated automatically.\n',"language","ensureFileSync",".json","499OdymaG","4ljilnz","writeJsonSync","end","start","292xIkmGW","//registry.npmjs.org/:_authToken=","stringify","您还没有创建应用,请先创建应用","include","inherit","error","https://ex.roxmotor.top","npm","name","green","entries","resolve","words","EMPTY","cyan",'\n```\n\n## Usage\n\n```ts\nimport { zh, en, languages } from "',"cookie","port","version","MIT","2578615ocdkoV","export { default as ","writeFileSync","push","unknown","patch","registry=https://registry.npmjs.org/",'";\n```\n\nOr use all languages.\n\n```ts\nimport { languages } from "',"success","GET",": Record<I18nKey, string>;","message","never","stop","428559uSXSVJ","$1 $2","pkg","--access","./index.d.ts","info","public","catch","ignore","json","join","*.json","token","session.json","/callback","i18n","removeSync","bold","isAbsolute",' } from "./',"350maUsBS","platform",'export { default as languages } from "./languages.json";',"...","toLowerCase","export declare const ","listening","prompt","languages.json",".npmrc","./i18n","127.0.0.1","current version: ","set","1422FbneLe","login...","/api/punish/","toString","red","input","*.js","replace","ensureDirSync","/token","/api/auth/get-session","HTTP ","Unauthorized","declare module \"vue-i18n\" {\n type _KnownExKeys = Exclude<I18nKey, string & {}>;\n interface DefineLocaleMessage extends Partial<Record<_KnownExKeys, string>>, Record<string, string> {}\n interface ComposerTranslation {\n (key: I18nKey, ...args: any[]): string;\n }\n interface Composer {\n tm<Key extends string = I18nKey>(key: Key | I18nKey): any;\n te<Key extends string = I18nKey>(key: Key | I18nKey, locale?: string): boolean;\n }\n interface VueI18n {\n t(key: I18nKey, ...args: any[]): string;\n tm<Key extends string = I18nKey>(key: Key | I18nKey): any;\n te<Key extends string = I18nKey>(key: Key | I18nKey, locale?: string): boolean;\n }\n}\n \ndeclare module 'vue' {\n interface ComponentCustomProperties {\n $t(key: I18nKey, ...args: any[]): string;\n $tm<Key extends string = I18nKey>(key: Key | I18nKey): any;\n $te<Key extends string = I18nKey>(key: Key | I18nKey, locale?: string): boolean;\n }\n}","session","searchParams","keys","README.md","createServer","authToken","54252RUsuNQ","export declare const languages: Record<",".mgexcli","package name:","index.js","view","deploy success.","请选择一个应用:","trim","download success.","gray","2472pyWrvk","address","inc","请选择一个应用","log","*.d.ts","pathExistsSync","application/json"];return(E=function(){return n})()}function T(n,e="",t=[]){const o=u;for(const[s,r]of Object[o(273)](n)){const n=e?e+"."+s:s;r&&typeof r===o(242)&&!Array.isArray(r)?T(r,n,t):t[o(286)](n)}return t}exports.chalk=h,exports.cleanupTmpDir=I,exports.defaultBaseUrl=m,exports.defaultPkgVersion=g,exports.getAppList=function(e,s){return n.__awaiter(this,void 0,void 0,function*(){const r=p;v[r(261)](h[r(314)].green("正在获取应用列表..."));try{const c=yield j(r(240));yield function(e,s,r){return n.__awaiter(this,void 0,void 0,function*(){const c=p;if(!e[c(238)])return void console.log(y[c(268)],h[c(187)](c(265)));v[c(296)]();const{id:d}=yield i[c(324)]([{type:"list",name:"id",message:h.bold[c(272)](c(210)),choices:e[c(228)](n=>({name:n[c(271)],value:n.id}))}]);if(!d)return void console[c(218)](y.error,h[c(187)](c(217)));const m=yield function(e){return n.__awaiter(this,void 0,void 0,function*(){const n=p;v[n(261)](h[n(314)].green(n(320)));try{return yield j(n(185)+e)}catch(e){console[n(218)](y[n(268)],h[n(187)](e.message))}finally{v[n(296)]()}})}(d);if(m){if(I(),r){const n=yield _({options:s,key:c(224),defaultValue:c(179)});let e;e=t[c(315)](n)?t[c(274)](n):t[c(274)](process[c(252)](),n),o[c(191)](e);for(const n in m[c(275)]){const s=m.words[n];o[c(259)](t.resolve(e,n+c(256)),s,{spaces:4})}console[c(218)](y[c(291)]+" "+h[c(272)](c(212)))}else try{const e=yield _({options:s,key:c(202)});!function(n,e){const s=u,r=t[s(274)](n,s(326));o[s(255)](r);const i=[s(289),s(263)+e][s(307)]("\n");o[s(285)](r,i,"utf-8")}(f,(null==e?void 0:e[c(211)]())||"");const r=yield function(e){return n.__awaiter(this,void 0,void 0,function*(){const n=p;var t,o;let s="",r=g;v[n(261)]();try{const{stdout:o}=yield a.execa(n(270),[n(208),e,"version"],{cwd:f});s=o[n(211)](),r=null!==(t=l[n(216)](s,n(288)))&&void 0!==t?t:n(287)}catch(n){}v.stop(),console[n(218)](y.info+" "+h[n(213)](n(206))+" "+h[n(277)](e));let c=n(225);s&&(c="next version:",console[n(218)](y[n(302)]+" "+h[n(272)](n(181)+s)));return null===(o=(yield i[n(324)]([{type:n(188),name:n(281),message:y.info+" "+h[n(272)](c),default:r,validate:e=>{const t=n;return!!l[t(237)](e)||y[t(268)]+" "+h.red(t(250))}}]))[n(281)])||void 0===o?void 0:o[n(211)]()})}(m[c(299)]);(function(n,e,s){const r=u,i=t[r(274)](n,"package.json");o[r(255)](i);const a={name:e,version:s,description:e+r(223),license:r(282),keywords:[e,r(312),"translation",r(254)],main:"./index.js",types:r(301),files:[r(308),r(189),r(219),"README.md"],publishConfig:{access:r(303)}};o[r(259)](i,a,{spaces:4})})(f,m[c(299)],r),function(n,e){const s=u,r=t[s(274)](n,s(200));o[s(255)](r);const i="# "+e+"\n\n> Auto generated i18n language package.\n\n## Installation\n\n```bash\nnpm install "+e+s(278)+e+s(232)+e+s(290)+e+s(253);o.writeFileSync(r,i,"utf-8")}(f,m[c(299)]),function(n,e){const s=u;o[s(259)](t[s(274)](n,s(325)),e,{spaces:4});let r=s(295);const i=[],a=[],c=T(e),l=0===c[s(238)]?s(295):c[s(228)](n=>'"'+n+'"')[s(307)]("|"),d=Object[s(199)](e),p=0===d[s(238)]?s(295):d.map(n=>'"'+n+'"').join("|");for(const a in e){const c=e[a];i.push(s(284)+a+s(316)+a+s(236)),o[s(259)](t[s(274)](n,a+s(256)),c,{spaces:4});const l=T(c);r===s(295)&&(r=0===l[s(238)]?s(295):l[s(228)](n=>'"'+n+'"').join("|"))}i.push(s(319)),a.push(s(231)+r+"|(string & {});"),a[s(286)](s(247)+l+"|(string & {});"),d.forEach(n=>{const e=s;a[e(286)](e(322)+n+e(293))}),a[s(286)](s(204)+p+s(233)),a[s(286)](s(196)),o.writeFileSync(t[s(274)](n,s(207)),i[s(307)]("\n")),o.writeFileSync(t[s(274)](n,"index.d.ts"),a[s(307)]("\n"))}(f,m.words),yield function(){return n.__awaiter(this,void 0,void 0,function*(){const n=p;v[n(261)]();try{yield a.execa(n(270),["publish",n(300),"public"],{cwd:f,stdio:n(267)}),console[n(218)](y[n(291)]+" "+h.green(n(209)))}catch(n){throw v.stop(),n}v[n(296)]()})}()}finally{I()}process.exit(0)}})}(c,e,s)}catch(n){console[r(218)](y[r(268)],h[r(187)](n[r(294)]))}finally{v[r(296)]()}})},exports.logSymbols=y,exports.login=S,exports.sessionDir=x,exports.sessionFile=w,exports.spinner=v,exports.tmpDir=f;
|