mgexcli 1.0.9 → 1.0.10
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(){var
|
|
2
|
+
"use strict";function t(t,n){return t-=363,r()[t]}function r(){var t=["1WwNtGe","4266060EvwLvF","1456479XcSyMg","19329ktiURo","1600182EQxtxC","13280mGDJSD","871214YLfwCo","608GFcrpl","644312vVmIdB","21oeoRcC"];return(r=function(){return t})()}require("../index.js"),function(){for(var n=t,e=r();;)try{if(281877===-parseInt(n(369))/1*(-parseInt(n(365))/2)+parseInt(n(372))/3+parseInt(n(366))/4*(-parseInt(n(364))/5)+parseInt(n(363))/6+parseInt(n(368))/7*(parseInt(n(367))/8)+parseInt(n(371))/9+-parseInt(n(370))/10)break;e.push(e.shift())}catch(t){e.push(e.shift())}}();
|
package/dist/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
"use strict";var
|
|
2
|
+
"use strict";var n=require("tslib"),e=require("commander"),o=require("fs-extra"),t=require("node:path"),r=require("./utils.js");const s=i;function i(n,e){n-=280;return a()[n]}function a(){const n=["path","227907AncjGV","cleanupTmpDir","139016RtkyGU","66pPfYTf","resolve","801930qdpuyD","10iFrKmt","29279xBjMbo","command","exit","1499884iPuvtU","108jNcAiP","description","--authToken <authToken>","--path <path>","SIGINT","option","deploy","login","action","Manage Words CLI","authToken","version","name","download","2796199EMsSxJ","1824020dQdCDu","getAppList","readJsonSync","6uXOFVD"];return(a=function(){return n})()}!function(){const n=i,e=a();for(;;)try{if(201420===parseInt(n(286))/1*(-parseInt(n(285))/2)+parseInt(n(310))/3+-parseInt(n(289))/4+parseInt(n(284))/5+parseInt(n(308))/6*(-parseInt(n(304))/7)+-parseInt(n(281))/8*(parseInt(n(290))/9)+parseInt(n(305))/10*(parseInt(n(282))/11))break;e.push(e.shift())}catch(n){e.push(e.shift())}}();const c=o[s(307)](t[s(283)](__dirname,"../package.json")),p=new e.Command;p[s(302)]("mgexcli").description(s(299))[s(301)](c.version),p[s(287)](s(297))[s(291)]("login")[s(298)](e=>n.__awaiter(void 0,void 0,void 0,function*(){const n=s;try{yield r[n(297)](),process.exit(0)}catch(e){process[n(288)](1)}})),p[s(287)]("deploy").description(s(296))[s(295)](s(292),s(300))[s(298)](e=>n.__awaiter(void 0,void 0,void 0,function*(){const n=s;yield r[n(306)](e)})),p.command("download")[s(291)](s(303))[s(295)](s(293),s(309))[s(298)](e=>n.__awaiter(void 0,void 0,void 0,function*(){const n=s;yield r[n(306)](e,!0)})),p.parse(),process.on(s(294),()=>{const n=s;r.cleanupTmpDir(),process[n(288)](0)}),process.on("SIGTERM",()=>{const n=s;r[n(280)](),process[n(288)](0)}),process.on(s(288),()=>{r[s(280)]()});
|
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"),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;
|
|
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=j;var d;!function(){const n=j,e=T();for(;;)try{if(320162===-parseInt(n(373))/1+-parseInt(n(362))/2+-parseInt(n(457))/3*(parseInt(n(427))/4)+parseInt(n(385))/5+parseInt(n(443))/6+parseInt(n(413))/7*(parseInt(n(465))/8)+-parseInt(n(381))/9)break;e.push(e.shift())}catch(n){e.push(e.shift())}}();const p={success:"✔",error:"✖",warning:"⚠",info:"ℹ"},y="1.0.0",g=t[u(450)](e.tmpdir(),u(456)),f=new a.Chalk,h=s(),v="https://ex.roxmotor.top",m=t[u(450)](e.homedir(),u(394)),x=t[u(450)](m,"session.json"),w=null!==(d=process.env.MGEXCLI_COOKIE_NAME)&&void 0!==d?d:u(464);function k(){const n=u;g&&o.pathExistsSync(g)&&o[n(438)](g)}function K(n){const e=u;return n[e(369)](/([a-z])([A-Z])/g,e(446))[e(369)](/([A-Z]+)([A-Z][a-z])/g,"$1 $2")[e(369)](/[-_]/g," ")[e(392)]()[e(369)](/\s+/g," ").trim()}function I(e){return n.__awaiter(this,arguments,void 0,function*({options:n,key:e,defaultValue:t}){const o=j;let s=(null==n?void 0:n[e])||"";if(!s){return s=(yield i[o(395)]([{type:o(409),name:e,default:null!=t?t:".",message:p[o(426)]+" "+f.green(K(e))+f[o(474)](":"),validate:n=>{const t=o;return!(!(null==n?void 0:n.trim())||"."===n)||p.error+" "+f[t(451)](t(364)+e+t(359)+e+t(384))}}]))[e],null==s?void 0:s[o(442)]()}return null==s?void 0:s[o(442)]()})}function _(){const n=u;try{if(!o[n(433)](x))return null;const e=o[n(347)](x);return"string"==typeof(null==e?void 0:e[n(402)])?w+"="+e[n(402)]:null}catch(n){return null}}function b(){return n.__awaiter(this,void 0,void 0,function*(){const t=j,s=yield function(){return n.__awaiter(this,void 0,void 0,function*(){const n=j;var e;try{const t=_();if(!t)return!1;const o=yield fetch(v+n(407),{headers:{cookie:t},credentials:"include"});if(!o.ok)return!1;const s=yield o[n(406)]();return!!(null===(e=null==s?void 0:s.session)||void 0===e?void 0:e[n(452)])&&t}catch(n){return!1}})}();if(s)return s;const i=r[t(400)](),a=yield new Promise(n=>{const e=t;i.listen(0,e(471),()=>{const t=e,o=i[t(441)]();n(typeof o===t(372)&&o?o[t(361)]:0)})}),l=t(404)+a+t(422);try{h[t(360)](f[t(382)][t(474)]("login..."));const s=yield fetch(v+t(434),{method:t(345),headers:{"Content-Type":"application/json"},body:JSON[t(353)]({provider:"github",callbackURL:l,disableRedirect:!0})}),r=yield s.json()[t(475)](()=>({}));if(!s.ok||!(null==r?void 0:r.url))throw new Error((null==r?void 0:r[t(336)])||"HTTP "+s[t(387)]);yield function(t){return n.__awaiter(this,void 0,void 0,function*(){const n=j,o=e[n(431)]();try{o===n(454)?yield c.execa(n(343),[t],{stdio:n(411)}):o===n(351)?yield c.execa("cmd",["/c",n(360),"",t],{stdio:n(411)}):yield c.execa(n(349),[t],{stdio:n(411)})}catch(n){}})}(r.url);const w=yield(d=i,y=a,g=3e5,new Promise(n=>{const e=j;let t,o=!1;const s=e=>{o||(o=!0,t&&clearTimeout(t),n(e))};t=setTimeout(()=>s(null),g),d.on(e(401),(n,t)=>{const o=e;var r;const i=(null!==(r=n[o(473)])&&void 0!==r?r:"/")[o(344)]("?")[0];if(i===o(422)){const n=new URL(o(375),v);return n.searchParams[o(449)]("return","http://localhost:"+y+o(379)),t[o(352)](302,{Location:n.toString()}),void t[o(429)]()}if(i===o(379)){h[o(389)]();let e="";return n.on(o(374),n=>e+=n),void n.on(o(429),()=>{const n=o,r=e[n(442)]()||null;t[n(352)](200,{"Content-Type":"text/plain; charset=utf-8","Access-Control-Allow-Origin":"*"}),t[n(429)](r?"OK":n(412)),s(r)})}t[o(352)](404)[o(429)]("not found")})}));if(!w)throw new Error(t(338));const k=function(n){const e=u,t=n;return o[e(380)](m),o[e(466)](x,{cookie:t,createdAt:(new Date).toISOString()},{spaces:4}),t}(w);return console.log(p[t(421)],f[t(474)](t(435))),k}catch(n){throw h[t(389)](),console[t(472)](p[t(447)],f[t(451)](n[t(336)])),n}finally{i[t(342)]&&i.close()}var d,y,g})}function S(e){return n.__awaiter(this,void 0,void 0,function*(){const n=j;try{const t=_();if(!t){if(yield b())return S(e)}const o=yield fetch(""+v+e,{method:n(332),headers:{cookie:t}});if(!o.ok)throw new Error(n(346)+o[n(387)]);const s=yield o[n(406)]()[n(475)](()=>({}));if(!(null==s?void 0:s.status))throw new Error((null==s?void 0:s[n(336)])||n(419));return null==s?void 0:s[n(374)]}catch(t){if(t[n(336)].includes("Unauthorized"))return function(){const n=u;o[n(433)](x)&&o[n(438)](x)}(),S(e);throw t}})}function j(n,e){n-=330;return T()[n]}function T(){const n=["message","push","login fail.","\n\n> Auto generated i18n language package.\n\n## Installation\n\n```bash\nnpm install ","cwd","path","listening","open","split","POST","HTTP ","readJsonSync","publish version:","xdg-open","version","win32","writeHead","stringify","您还没有创建应用,请先创建应用","MIT","*.json","请选择一个应用","cyan"," option is missing and cannot be empty. please add --","start","port","61562LuSIhH","export { default as ","the ","package name:","publish","./i18n"," i18n language package","replace","package.json","export declare const ","object","242287qVfQaL","data","/api/auth/cli-export","writeFileSync","words","languages.json","/token","ensureDirSync","4023306TnqpMG","bold","*.js"," value.","1289020Orxdch","entries","status","请选择一个应用:","stop","|(string & {});","registry=https://registry.npmjs.org/","toLowerCase","list",".mgexcli","prompt","translation","exit","valid","pkg","createServer","request","cookie","join","http://localhost:",'";\n```\n\nOr use all languages.\n\n```ts\nimport { languages } from "',"json","/api/auth/get-session","name","input","public","ignore","EMPTY","7QDQjCo","never","length","map","inc","|(string & {}), string>;","请求失败",'";\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 "',"success","/callback",'.json";',".json","invalid version number","info","12viXAoo","README.md","end","declare module \"vue-i18n\" {\n type _KnownExKeys = Exclude<I18nKey, string & {}>;\n interface DefineLocaleMessage extends Partial<Record<_KnownExKeys, string>>, Record<string, Record<I18nKey, 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}","platform","export declare const languages: Record<","pathExistsSync","/api/auth/sign-in/social","login success.","next version:",' } from "./',"removeSync","view",": Record<I18nKey, string>;","address","trim","3533088GXoZQQ","./index.js","正在获取应用列表...","$1 $2","error","ensureFileSync","set","resolve","red","token",'\n```\n\n## Usage\n\n```ts\nimport { zh, en, languages } from "',"darwin","...",".mgexcli_tmp","218463BQYVHM","npm","index.js","index.d.ts","--access","./index.d.ts","utf-8","__Secure-ex-lang-auth.session_token","3296600CRzOho","writeJsonSync","export type I18nAllLanguageKey = ",'";\n```\n\n## TypeScript\n\nThis package contains complete TypeScript declarations.\n\n---\n\nGenerated automatically.\n',"language","deploy success.","127.0.0.1","log","url","green","catch","export type I18nKey = ","gray","isArray","forEach","GET",".npmrc","inherit","authToken"];return(T=function(){return n})()}function E(n,e="",t=[]){const o=u;for(const[s,r]of Object[o(386)](n)){const n=e?e+"."+s:s;r&&typeof r===o(372)&&!Array[o(330)](r)?E(r,n,t):t.push(n)}return t}exports.chalk=f,exports.cleanupTmpDir=k,exports.defaultBaseUrl=v,exports.defaultPkgVersion=y,exports.getAppList=function(e,s){return n.__awaiter(this,void 0,void 0,function*(){const r=j;h[r(360)](f[r(382)][r(474)](r(445)));try{const r=yield S("/api/punish");yield function(e,s,r){return n.__awaiter(this,void 0,void 0,function*(){const a=j;if(!e[a(415)])return void console.log(p[a(447)],f[a(451)](a(354)));h.stop();const{id:d}=yield i[a(395)]([{type:a(393),name:"id",message:f[a(382)][a(474)](a(388)),choices:e.map(n=>({name:n[a(408)],value:n.id}))}]);if(!d)return void console[a(472)](p[a(447)],f[a(451)](a(357)));const v=yield function(e){return n.__awaiter(this,void 0,void 0,function*(){const n=j;h[n(360)](f[n(382)][n(474)](n(455)));try{return yield S("/api/punish/"+e)}catch(e){console.log(p[n(447)],f[n(451)](e[n(336)]))}finally{h[n(389)]()}})}(d);if(v){if(k(),r){const n=yield I({options:s,key:a(341),defaultValue:a(367)});let e;e=t.isAbsolute(n)?t[a(450)](n):t[a(450)](process[a(340)](),n),o.ensureDirSync(e);for(const n in v[a(377)]){const s=v.words[n];o.writeJsonSync(t[a(450)](e,n+a(424)),s,{spaces:4})}console[a(472)](p[a(421)]+" "+f[a(474)]("download success."))}else try{const e=yield I({options:s,key:a(335)});!function(n,e){const s=u,r=t[s(450)](n,s(333));o[s(448)](r);const i=[s(391),"//registry.npmjs.org/:_authToken="+e].join("\n");o[s(376)](r,i,"utf-8")}(g,(null==e?void 0:e.trim())||"");const r=yield function(e){return n.__awaiter(this,void 0,void 0,function*(){const n=j;var t,o;let s="",r=y;h.start();try{const{stdout:o}=yield c.execa("npm",[n(439),e,"version"],{cwd:g});s=o[n(442)](),r=null!==(t=l[n(417)](s,"patch"))&&void 0!==t?t:"unknown"}catch(n){}h[n(389)](),console[n(472)](p[n(426)]+" "+f[n(477)](n(365))+" "+f[n(358)](e));let a=n(348);s&&(a=n(436),console.log(p[n(426)]+" "+f[n(474)]("current version: "+s)));return null===(o=(yield i[n(395)]([{type:n(409),name:n(350),message:p[n(426)]+" "+f[n(474)](a),default:r,validate:e=>{const t=n;return!!l[t(398)](e)||p[t(447)]+" "+f.red(t(425))}}]))[n(350)])||void 0===o?void 0:o[n(442)]()})}(v[a(399)]);(function(n,e,s){const r=u,i=t[r(450)](n,r(370));o[r(448)](i);const c={name:e,version:s,description:e+r(368),license:r(355),keywords:[e,"i18n",r(396),r(469)],main:r(444),types:r(462),files:[r(356),r(383),"*.d.ts",r(428)],publishConfig:{access:r(410)}};o[r(466)](i,c,{spaces:4})})(g,v[a(399)],r),function(n,e){const s=u,r=t.resolve(n,s(428));o[s(448)](r);const i="# "+e+s(339)+e+s(453)+e+s(420)+e+s(405)+e+s(468);o.writeFileSync(r,i,s(463))}(g,v[a(399)]),function(n,e){const s=u;o.writeJsonSync(t[s(450)](n,s(378)),e,{spaces:4});let r=s(414);const i=[],c=[],a=E(e),l=0===a[s(415)]?s(414):a[s(416)](n=>'"'+n+'"')[s(403)]("|"),d=Object.keys(e),p=0===d[s(415)]?s(414):d[s(416)](n=>'"'+n+'"')[s(403)]("|");for(const c in e){const a=e[c];i[s(337)](s(363)+c+s(437)+c+s(423)),o[s(466)](t[s(450)](n,c+s(424)),a,{spaces:4});const l=E(a);r===s(414)&&(r=0===l[s(415)]?s(414):l.map(n=>'"'+n+'"')[s(403)]("|"))}i[s(337)]('export { default as languages } from "./languages.json";'),c[s(337)](s(476)+r+s(390)),c[s(337)](s(467)+l+"|(string & {});"),d[s(331)](n=>{const e=s;c[e(337)](e(371)+n+e(440))}),c[s(337)](s(432)+p+s(418)),c.push(s(430)),o[s(376)](t[s(450)](n,s(459)),i[s(403)]("\n")),o[s(376)](t[s(450)](n,s(460)),c.join("\n"))}(g,v.words),yield function(){return n.__awaiter(this,void 0,void 0,function*(){const n=j;h[n(360)]();try{yield c.execa(n(458),[n(366),n(461),n(410)],{cwd:g,stdio:n(334)}),console[n(472)](p.success+" "+f[n(474)](n(470)))}catch(e){throw h[n(389)](),e}h[n(389)]()})}()}finally{k()}process[a(397)](0)}})}(r,e,s)}catch(n){console[r(472)](p.error,f[r(451)](n.message))}finally{h.stop()}})},exports.logSymbols=p,exports.login=b,exports.sessionDir=m,exports.sessionFile=x,exports.spinner=h,exports.tmpDir=g;
|