@lovrabet/rabetbase-cli 2.0.4-beta.5 → 2.0.5
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/lib/api/api-doc.js +1 -1
- package/lib/api/fetch-model-list.js +1 -1
- package/lib/api/generate-api-file.js +1 -1
- package/lib/auth/auth-server-ui.js +1 -1
- package/lib/auth/auth-server.js +1 -1
- package/lib/auth/constant.js +1 -1
- package/lib/auth/get-cookie.js +1 -1
- package/lib/auth/get-session-user.js +1 -1
- package/lib/auth/is-session-valid.js +1 -1
- package/lib/auth/logout.js +1 -1
- package/lib/cli-flags.js +1 -1
- package/lib/cli.js +1 -1
- package/lib/commands/api/doc.js +1 -1
- package/lib/commands/api/index.js +1 -1
- package/lib/commands/api/list.js +1 -1
- package/lib/commands/api/pull.js +1 -1
- package/lib/commands/api/shared.js +1 -1
- package/lib/commands/app/add.js +1 -1
- package/lib/commands/app/index.js +1 -1
- package/lib/commands/app/list.js +1 -1
- package/lib/commands/app/remote.js +1 -1
- package/lib/commands/app/remove.js +1 -1
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/app/use.js +1 -1
- package/lib/commands/auth/index.js +1 -1
- package/lib/commands/bff/delete.js +1 -1
- package/lib/commands/bff/detail.js +1 -1
- package/lib/commands/bff/index.js +1 -1
- package/lib/commands/bff/list.js +1 -1
- package/lib/commands/bff/new.js +1 -1
- package/lib/commands/bff/pull.js +1 -1
- package/lib/commands/bff/push.js +1 -1
- package/lib/commands/bff/status.js +1 -1
- package/lib/commands/build.js +1 -1
- package/lib/commands/cli-update.js +1 -1
- package/lib/commands/codegen/index.js +1 -1
- package/lib/commands/codegen/sdk.js +1 -1
- package/lib/commands/codegen/sql.js +1 -1
- package/lib/commands/common/app-selector.js +1 -1
- package/lib/commands/common/flags.js +1 -1
- package/lib/commands/common/validate.js +1 -1
- package/lib/commands/config/get.js +1 -1
- package/lib/commands/config/index.js +1 -1
- package/lib/commands/config/list.js +1 -1
- package/lib/commands/config/set.js +1 -1
- package/lib/commands/config/shared.js +1 -1
- package/lib/commands/dataset/detail.js +1 -1
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/links.js +1 -1
- package/lib/commands/dataset/list.js +1 -1
- package/lib/commands/dataset/operations.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/init/index.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/menu/index.js +1 -1
- package/lib/commands/menu/shared/compare-table.js +1 -1
- package/lib/commands/menu/shared/index.js +1 -1
- package/lib/commands/menu/shared/inquirer.js +1 -1
- package/lib/commands/menu/shared/local-pages.js +1 -1
- package/lib/commands/menu/shared/logic.js +1 -1
- package/lib/commands/menu/shared/service.js +1 -1
- package/lib/commands/menu/shared/sync-core.js +1 -1
- package/lib/commands/menu/shared/update-core.js +1 -1
- package/lib/commands/menu/shared/valid-url.js +1 -1
- package/lib/commands/menu/sync.js +1 -1
- package/lib/commands/menu/update.js +1 -1
- package/lib/commands/preview.js +1 -1
- package/lib/commands/project/index.js +1 -1
- package/lib/commands/project-upgrade.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/run/index.js +1 -1
- package/lib/commands/skill/index.js +1 -1
- package/lib/commands/sql/detail.js +1 -1
- package/lib/commands/sql/exec.js +1 -1
- package/lib/commands/sql/index.js +1 -1
- package/lib/commands/sql/list.js +1 -1
- package/lib/commands/sql/save.js +1 -1
- package/lib/commands/sql/validate.js +1 -1
- package/lib/commands/start.js +1 -1
- package/lib/constant/cli.js +1 -1
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.js +1 -1
- package/lib/context.js +1 -1
- package/lib/core/alias-resolver.js +1 -1
- package/lib/core/api-client.js +1 -1
- package/lib/core/bff/config.js +1 -1
- package/lib/core/bff/file-system.js +1 -1
- package/lib/core/bff/hash.js +1 -1
- package/lib/core/bff/lock.js +1 -1
- package/lib/core/bff/utils.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/sql-validator.js +1 -1
- package/lib/create-app/enhanced-guided-create.js +1 -1
- package/lib/create-app/format-elapsed.js +1 -1
- package/lib/create-app/main.js +1 -1
- package/lib/create-app/non-interactive.js +1 -1
- package/lib/create-app/use-copy-project-template.js +1 -1
- package/lib/create-app/use-format-code.js +1 -1
- package/lib/create-app/use-install-dependencies.js +1 -1
- package/lib/errors.js +1 -1
- package/lib/framework/flags.js +1 -1
- package/lib/framework/help.js +1 -1
- package/lib/framework/index.js +1 -1
- package/lib/framework/output.js +1 -1
- package/lib/framework/response.js +1 -1
- package/lib/framework/runner.js +1 -1
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.js +1 -1
- package/lib/help.js +1 -1
- package/lib/init/main.js +1 -1
- package/lib/skills/main.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/telemetry/cli-command-trace.js +1 -1
- package/lib/telemetry/cli-help-trace.js +1 -1
- package/lib/telemetry/ensure-cli-otel-config.js +1 -1
- package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
- package/lib/telemetry/send-cli-trace-log.js +1 -1
- package/lib/utils/ai_config.js +1 -1
- package/lib/utils/cdn-config.js +1 -1
- package/lib/utils/check-sdk-version.js +1 -1
- package/lib/utils/cli-version-check.js +1 -1
- package/lib/utils/config.js +1 -1
- package/lib/utils/copy-directory.js +1 -1
- package/lib/utils/file-utils.js +1 -1
- package/lib/utils/guides-cdn.js +1 -1
- package/lib/utils/http-client.js +1 -1
- package/lib/utils/is-non-interactive.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/platform.js +1 -1
- package/lib/utils/rules-cdn.js +1 -1
- package/lib/utils/sleep.js +1 -1
- package/lib/utils/template-replacer.js +1 -1
- package/lib/utils/version.js +1 -1
- package/lib/utils/with-active-cookie.js +1 -1
- package/package.json +2 -2
package/lib/api/api-doc.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a0_0x210c20=a0_0x5e7a;(function(_0x52b9ca,_0x1714c1){const _0x200fc7=a0_0x5e7a,_0x4c746a=_0x52b9ca();while(!![]){try{const _0x5bd312=parseInt(_0x200fc7(0x99))/0x1*(-parseInt(_0x200fc7(0x85))/0x2)+parseInt(_0x200fc7(0x86))/0x3*(parseInt(_0x200fc7(0x95))/0x4)+-parseInt(_0x200fc7(0x8e))/0x5*(parseInt(_0x200fc7(0x90))/0x6)+-parseInt(_0x200fc7(0x9b))/0x7*(parseInt(_0x200fc7(0x9d))/0x8)+parseInt(_0x200fc7(0x79))/0x9+parseInt(_0x200fc7(0x92))/0xa+-parseInt(_0x200fc7(0x7f))/0xb*(-parseInt(_0x200fc7(0x91))/0xc);if(_0x5bd312===_0x1714c1)break;else _0x4c746a['push'](_0x4c746a['shift']());}catch(_0xd1778e){_0x4c746a['push'](_0x4c746a['shift']());}}}(a0_0x3017,0x6ac4d));function a0_0x5e7a(_0x50ca18,_0x4e42c3){_0x50ca18=_0x50ca18-0x78;const _0x3017d1=a0_0x3017();let _0x5e7ae3=_0x3017d1[_0x50ca18];return _0x5e7ae3;}import{mkdirSync,writeFileSync}from'node:fs';import a0_0x9f9f57 from'node:path';import{getApiDomain}from'../constant/domain.js';import{logger}from'../utils/logger.js';import{platformFetch}from'../core/api-client.js';export async function fetchDatasetDoc(_0x10b73e){const _0x3e80d2=a0_0x5e7a,{appCode:_0x2c313c,cookie:_0xa5fa50,datasetCode:_0x328895,datasetId:_0x273012,extraParams:_0x18b6d5}=_0x10b73e,_0x254646=getApiDomain()+_0x3e80d2(0x81),_0x9150c4=await platformFetch(_0x254646,{'method':_0x3e80d2(0x82),'body':{'appCode':_0x2c313c,'datasetCode':_0x328895,'datasetId':_0x273012,..._0x18b6d5||{}},'cookie':_0xa5fa50,'label':'Fetch\x20doc\x20('+_0x328895+')'});if(!_0x9150c4||typeof _0x9150c4[_0x3e80d2(0x7c)]!==_0x3e80d2(0x94))throw new Error(_0x3e80d2(0x8b)+_0x328895+_0x3e80d2(0x7d));return _0x9150c4[_0x3e80d2(0x7c)];}function a0_0x3017(){const _0x39f3b7=['join','./docs','length','Invalid\x20response\x20format\x20(','success','push','18435yNAqEf','✗\x20Failed:\x20','606qkMFBE','144tgLBkq','8493710SAjMSg','name','string','2141468AqInhI','生成文档失败:\x20','message','log','647VmGJgu','✓\x20Generated:\x20','91ATxbXV','utf8','51144qkCeFS','\x20datasets\x20to\x20generate\x20docs\x20for\x0a','Waiting\x203\x20seconds...\x0a','543636wMMdJj','.md\x20(','api-doc','markdown','):\x20missing\x20data.markdown\x20field','datasetCode','150249cmHtXH','.md','/api/node-toolbox/api-doc-generator','POST','tableName','.md\x20-\x20','2214OAxzWK','3RUULjZ','生成文档成功:\x20'];a0_0x3017=function(){return _0x39f3b7;};return a0_0x3017();}function delay(_0x1af3da){return new Promise(_0x23f418=>setTimeout(_0x23f418,_0x1af3da));}export async function generateDatasetDocs(_0x55c6d1,_0x5721d5,_0xfcbaa7,_0x1d859b=a0_0x210c20(0x89),_0x2e4d86,_0x4f75a){const _0x3c5c71=a0_0x210c20;mkdirSync(_0x1d859b,{'recursive':!![]});const _0x4ad242=[],_0x227d9c=_0x55c6d1[_0x3c5c71(0x8a)];console[_0x3c5c71(0x98)]('\x0a'+_0x227d9c+_0x3c5c71(0x9e));for(let _0x2856c6=0x0;_0x2856c6<_0x55c6d1[_0x3c5c71(0x8a)];_0x2856c6++){const _0x3dc307=_0x55c6d1[_0x2856c6],_0x2455cd=_0x2856c6+0x1,_0x111f9d=_0x3dc307[_0x3c5c71(0x83)];try{console['log']('['+_0x2455cd+'/'+_0x227d9c+']\x20Generating:\x20'+_0x111f9d+_0x3c5c71(0x7a)+_0x3dc307[_0x3c5c71(0x93)]+')');if(_0x2e4d86)_0x2e4d86(_0x2455cd,_0x227d9c,_0x111f9d);const _0x16ba4b=await fetchDatasetDoc({'appCode':_0x5721d5,'cookie':_0xfcbaa7,'datasetCode':_0x3dc307[_0x3c5c71(0x7e)],'datasetId':_0x3dc307['id'],'enableAI':![],'extraParams':_0x4f75a}),_0x4d212e=a0_0x9f9f57[_0x3c5c71(0x88)](_0x1d859b,_0x111f9d+'.md');writeFileSync(_0x4d212e,_0x16ba4b,{'encoding':_0x3c5c71(0x9c)}),console[_0x3c5c71(0x98)](_0x3c5c71(0x9a)+_0x111f9d+_0x3c5c71(0x80)),logger[_0x3c5c71(0x8c)](_0x3c5c71(0x7b),_0x3c5c71(0x87)+_0x111f9d,undefined,{'datasetCode':_0x3dc307[_0x3c5c71(0x7e)],'datasetName':_0x3dc307['name'],'filePath':_0x4d212e,'progress':_0x2455cd+'/'+_0x227d9c}),_0x4ad242[_0x3c5c71(0x8d)]({'datasetCode':_0x3dc307[_0x3c5c71(0x7e)],'datasetName':_0x3dc307[_0x3c5c71(0x93)],'filePath':_0x4d212e,'success':!![]});if(_0x2455cd<_0x227d9c)await delay(0x1388);}catch(_0x53d0ab){const _0x100c45=_0x53d0ab instanceof Error?_0x53d0ab[_0x3c5c71(0x97)]:String(_0x53d0ab);console['log'](_0x3c5c71(0x8f)+_0x111f9d+_0x3c5c71(0x84)+_0x100c45),logger['error'](_0x3c5c71(0x7b),_0x3c5c71(0x96)+_0x3dc307[_0x3c5c71(0x7e)],{'datasetCode':_0x3dc307[_0x3c5c71(0x7e)],'datasetName':_0x3dc307[_0x3c5c71(0x93)],'error':_0x100c45,'progress':_0x2455cd+'/'+_0x227d9c}),_0x4ad242[_0x3c5c71(0x8d)]({'datasetCode':_0x3dc307[_0x3c5c71(0x7e)],'datasetName':_0x3dc307[_0x3c5c71(0x93)],'filePath':'','success':![],'error':_0x100c45}),_0x2455cd<_0x227d9c&&(console['log'](_0x3c5c71(0x78)),await delay(0xbb8));}}return _0x4ad242;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x4cb804,_0x3f44a8){const _0x4dca8f=a1_0x24c6,_0x162a8e=_0x4cb804();while(!![]){try{const _0x3ac34f=-parseInt(_0x4dca8f(0x92))/0x1+-parseInt(_0x4dca8f(0x94))/0x2+-parseInt(_0x4dca8f(0x95))/0x3+parseInt(_0x4dca8f(0x96))/0x4+-parseInt(_0x4dca8f(0x93))/0x5*(-parseInt(_0x4dca8f(0x9e))/0x6)+parseInt(_0x4dca8f(0x9a))/0x7+parseInt(_0x4dca8f(0xa0))/0x8*(parseInt(_0x4dca8f(0x97))/0x9);if(_0x3ac34f===_0x3f44a8)break;else _0x162a8e['push'](_0x162a8e['shift']());}catch(_0x9dd7b){_0x162a8e['push'](_0x162a8e['shift']());}}}(a1_0x26eb,0x59ec4));import{getApiDomain}from'../constant/domain.js';import{logger}from'../utils/logger.js';function a1_0x24c6(_0x13d082,_0x3b38de){_0x13d082=_0x13d082-0x90;const _0x26eb4c=a1_0x26eb();let _0x24c679=_0x26eb4c[_0x13d082];return _0x24c679;}import{getEnv}from'../constant/env.js';import{platformFetch}from'../core/api-client.js';function cleanNewlines(_0x546eed){const _0x940794=a1_0x24c6;return _0x546eed[_0x940794(0x99)](/[\r\n]+/g,'\x20')[_0x940794(0x98)]();}function a1_0x26eb(){const _0x4ed3a6=['name','/api/node-toolbox/dataset/model-list?appcode=','214312lgrRWZ','65885Zkbtwm','1012996IvNINy','1758873WFyYXR','2794680kaaqMv','270HTzQcJ','trim','replace','303548PuOcsr','configArray','&otype=array','Fetch\x20datasets','258LZyYld','fetch-model-list','97808DGxsYq'];a1_0x26eb=function(){return _0x4ed3a6;};return a1_0x26eb();}function cleanDatasetName(_0x436a6c){const _0x4ecc56=a1_0x24c6;if(!_0x436a6c[_0x4ecc56(0x90)])return _0x436a6c;return{..._0x436a6c,'name':cleanNewlines(_0x436a6c['name'])};}export async function fetchModelList(_0x3398c4,_0xb604f7){const _0x2ba1d5=a1_0x24c6,_0x4fe439=getEnv(),_0x2619b4=getApiDomain()+_0x2ba1d5(0x91)+_0x3398c4+_0x2ba1d5(0x9c);logger['info'](_0x2ba1d5(0x9f),'正在从服务器拉取模型列表...\x20(环境:\x20'+_0x4fe439+')',{'apiUrl':_0x2619b4});const _0x34913b=await platformFetch(_0x2619b4,{'cookie':_0xb604f7,'label':_0x2ba1d5(0x9d)}),_0x204fe4=(_0x34913b[_0x2ba1d5(0x9b)]??[])['map'](cleanDatasetName);return{'configArray':_0x204fe4,'count':_0x204fe4['length']};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x119792,_0x227884){const _0x4664d5=a2_0x3247,_0xb85841=_0x119792();while(!![]){try{const _0x4537c2=-parseInt(_0x4664d5(0x181))/0x1*(-parseInt(_0x4664d5(0x167))/0x2)+parseInt(_0x4664d5(0x171))/0x3+parseInt(_0x4664d5(0x177))/0x4+parseInt(_0x4664d5(0x17e))/0x5*(-parseInt(_0x4664d5(0x173))/0x6)+-parseInt(_0x4664d5(0x180))/0x7*(parseInt(_0x4664d5(0x17b))/0x8)+-parseInt(_0x4664d5(0x17f))/0x9+parseInt(_0x4664d5(0x163))/0xa;if(_0x4537c2===_0x227884)break;else _0xb85841['push'](_0xb85841['shift']());}catch(_0x170e33){_0xb85841['push'](_0xb85841['shift']());}}}(a2_0x4861,0x2807b));import a2_0x12ca56 from'prettier';import{mkdirSync,writeFileSync,readFileSync}from'node:fs';function a2_0x4861(){const _0x3aac60=['push','72zuAWYu','../..',',\x20env:\x20\x22','1305025OfDXrF','72900totned','251181OTwisc','1658URAfcb','-api','typescript','init-api','join','alias','api','tableName','resolve','api.ts.tpl','\x20config\x20set\x20app\x20<value>`','3736270UjlZHz','replaceApiContent','success','client.ts.tpl','376thpjIh','LOVRABET','format','name','length','templates/generate-api','API\x20文件生成成功!','replace','-client','toUpperCase','66021BHoLor','key','6uFZIxF','production','utf8','{\x20apiConfigName:\x20','194708JTgNBT','.ts','test'];a2_0x4861=function(){return _0x3aac60;};return a2_0x4861();}function a2_0x3247(_0xaa8db5,_0x47dbe8){_0xaa8db5=_0xaa8db5-0x15d;const _0x486113=a2_0x4861();let _0x3247c4=_0x486113[_0xaa8db5];return _0x3247c4;}import a2_0x5b5b9d from'node:path';import{fileURLToPath}from'node:url';import{TemplateReplacer}from'../utils/template-replacer.js';import{CLI_BIN_NAME}from'../constant/cli.js';import{logger}from'../utils/logger.js';export async function generateApiFile(_0x57b378,_0x340d13,_0x18791c,_0x13c782,_0x51f5f5,_0x126495,_0x1de194){const _0x3f4142=a2_0x3247;if(!_0x18791c)throw new Error('Please\x20configure\x20app\x20code\x20first\x20via\x20`'+CLI_BIN_NAME+_0x3f4142(0x162));const _0x2c9f23=_0x13c782&&!_0x1de194,_0x733a8=_0x1de194||_0x18791c,_0x4c5406=_0x2c9f23?'CONFIG_NAMES.DEFAULT':'\x22'+_0x733a8+'\x22',_0x446b45=_0x51f5f5!==_0x3f4142(0x174);let _0xc94ad6;if(_0x2c9f23)_0x446b45?_0xc94ad6=_0x3f4142(0x176)+_0x4c5406+_0x3f4142(0x17d)+_0x51f5f5+'\x22\x20}':_0xc94ad6='';else{const _0x4383de=_0x446b45?_0x3f4142(0x17d)+_0x51f5f5+'\x22':'';_0xc94ad6='{\x20apiConfigName:\x20\x22'+_0x733a8+'\x22'+_0x4383de+'\x20}';}const _0x14fd3a=_0x340d13?_0x340d13+_0x3f4142(0x182):_0x3f4142(0x15e),_0x357757=_0x340d13?_0x340d13+_0x3f4142(0x16f):'client',_0xf2d6c3=_0x340d13&&!/^app-[a-f0-9]+$/i[_0x3f4142(0x179)](_0x340d13)?_0x340d13[_0x3f4142(0x16e)](/-/g,'_')[_0x3f4142(0x170)]():_0x3f4142(0x168),_0x15fee8=[];_0x57b378['forEach'](_0x404bdd=>{const _0x11b9e0=_0x3f4142;_0x15fee8[_0x11b9e0(0x17a)]({'datasetCode':_0x404bdd['datasetCode'],'tableName':_0x404bdd[_0x11b9e0(0x15f)],'name':_0x404bdd[_0x11b9e0(0x16a)]||'','alias':_0x404bdd[_0x11b9e0(0x15d)]||_0x404bdd[_0x11b9e0(0x172)]});});const _0x346545=fileURLToPath(import.meta.url),_0x1c693d=a2_0x5b5b9d[_0x3f4142(0x160)](a2_0x5b5b9d['dirname'](_0x346545),_0x3f4142(0x17c)),_0x46c31c=a2_0x5b5b9d[_0x3f4142(0x185)](_0x1c693d,_0x3f4142(0x16c)),_0x3745d1=a2_0x5b5b9d[_0x3f4142(0x185)](_0x46c31c,_0x3f4142(0x161)),_0x379050=a2_0x5b5b9d['join'](_0x46c31c,_0x3f4142(0x166)),_0x98663c=_0x126495;mkdirSync(_0x98663c,{'recursive':!![]});const _0x558763=_0x15fee8[0x0]?.[_0x3f4142(0x15d)],_0x30389b=readFileSync(_0x3745d1,_0x3f4142(0x175)),_0x4e2001=TemplateReplacer[_0x3f4142(0x164)](_0x30389b,_0x18791c,_0x15fee8,_0x558763,_0x14fd3a,_0x4c5406,undefined,_0xf2d6c3),_0x463f37=await a2_0x12ca56[_0x3f4142(0x169)](_0x4e2001,{'parser':_0x3f4142(0x183)}),_0x1bd664=a2_0x5b5b9d[_0x3f4142(0x185)](_0x98663c,_0x14fd3a+_0x3f4142(0x178));writeFileSync(_0x1bd664,_0x463f37,{'encoding':_0x3f4142(0x175)});const _0x4ac7fa=readFileSync(_0x379050,'utf8'),_0x2afd06=TemplateReplacer[_0x3f4142(0x164)](_0x4ac7fa,_0x18791c,_0x15fee8,_0x558763,_0x14fd3a,_0x4c5406,_0xc94ad6,_0xf2d6c3),_0x2244c8=await a2_0x12ca56['format'](_0x2afd06,{'parser':_0x3f4142(0x183)}),_0x5eddaa=a2_0x5b5b9d[_0x3f4142(0x185)](_0x98663c,_0x357757+_0x3f4142(0x178));writeFileSync(_0x5eddaa,_0x2244c8,{'encoding':_0x3f4142(0x175)});const _0x2daf4b=_0x15fee8[_0x3f4142(0x16b)];return logger[_0x3f4142(0x165)](_0x3f4142(0x184),_0x3f4142(0x16d),undefined,{'apiFile':_0x1bd664,'clientFile':_0x5eddaa,'modelCount':_0x2daf4b,'configName':_0x4c5406}),{'modelCount':_0x2daf4b,'apiFilePath':_0x1bd664,'clientFilePath':_0x5eddaa,'configName':_0x4c5406};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a3_0x4e19(_0x5dbdf1,_0x281077){_0x5dbdf1=_0x5dbdf1-0x128;const _0x1889fb=a3_0x1889();let _0x4e192c=_0x1889fb[_0x5dbdf1];return _0x4e192c;}(function(_0x409427,_0x10fd53){const _0x5a26e1=a3_0x4e19,_0x290985=_0x409427();while(!![]){try{const _0x538960=parseInt(_0x5a26e1(0x130))/0x1*(parseInt(_0x5a26e1(0x12a))/0x2)+parseInt(_0x5a26e1(0x12c))/0x3+-parseInt(_0x5a26e1(0x136))/0x4+parseInt(_0x5a26e1(0x135))/0x5+-parseInt(_0x5a26e1(0x128))/0x6+-parseInt(_0x5a26e1(0x12e))/0x7*(-parseInt(_0x5a26e1(0x12b))/0x8)+-parseInt(_0x5a26e1(0x131))/0x9;if(_0x538960===_0x10fd53)break;else _0x290985['push'](_0x290985['shift']());}catch(_0x2116a1){_0x290985['push'](_0x290985['shift']());}}}(a3_0x1889,0xcdf1f));import{getIsSessionValid}from'./is-session-valid.js';function a3_0x1889(){const _0x3192b4=['7uCphZu','√\x20Valid\x20session\x20detected,\x20no\x20login\x20required.','31SRGIzT','14584500YYXfsE','!\x20Login\x20failed.','start','log','3380005SWPbHJ','758768taeEKm','Logging\x20in...\x20Please\x20complete\x20login\x20in\x20your\x20browser.','6411654cwYWjU','stop','57976TdBwqe','4113736iSqoPw','4900518XSTNpE','No\x20valid\x20session.\x20Login\x20now?'];a3_0x1889=function(){return _0x3192b4;};return a3_0x1889();}import{authServer}from'./auth-server.js';import{confirm}from'@inquirer/prompts';import a3_0x270cf8 from'ora';export async function runAuthServer(){const _0x2e9bef=a3_0x4e19,_0x24fa65=await getIsSessionValid();if(_0x24fa65){console[_0x2e9bef(0x134)](_0x2e9bef(0x12f));return;}const _0x436bfc=await confirm({'message':_0x2e9bef(0x12d),'default':!![]});if(!_0x436bfc)return;const _0x186445=a3_0x270cf8(_0x2e9bef(0x137))[_0x2e9bef(0x133)](),_0x5ecea7=await authServer({'silent':!![]});_0x186445[_0x2e9bef(0x129)](),_0x5ecea7?console[_0x2e9bef(0x134)]('*\x20Login\x20successful!'):console[_0x2e9bef(0x134)](_0x2e9bef(0x132));}
|
package/lib/auth/auth-server.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a4_0xcd6e54=a4_0x2a70;(function(_0x20d6fb,_0x512dfa){const _0x2c8b85=a4_0x2a70,_0x16df80=_0x20d6fb();while(!![]){try{const _0x2cafff=-parseInt(_0x2c8b85(0x15e))/0x1+-parseInt(_0x2c8b85(0x173))/0x2+parseInt(_0x2c8b85(0x15b))/0x3+-parseInt(_0x2c8b85(0x161))/0x4*(-parseInt(_0x2c8b85(0x16f))/0x5)+parseInt(_0x2c8b85(0x16b))/0x6+parseInt(_0x2c8b85(0x177))/0x7*(parseInt(_0x2c8b85(0x181))/0x8)+-parseInt(_0x2c8b85(0x15c))/0x9;if(_0x2cafff===_0x512dfa)break;else _0x16df80['push'](_0x16df80['shift']());}catch(_0x155abe){_0x16df80['push'](_0x16df80['shift']());}}}(a4_0x5436,0x842f2));import{writeFileSync}from'node:fs';import a4_0x5eace4 from'node:https';import{getUserDomain}from'../constant/domain.js';function a4_0x5436(){const _0xfdf9dd=['then','isAuth','<span\x20id=\x22t\x22>5</span>','open\x20\x22','8rkhgou','/sign-in?redirect=','silent','🔗\x20Please\x20copy\x20the\x20login\x20URL\x20into\x20your\x20browser:','⚠️\x20\x20Failed\x20to\x20open\x20browser\x20automatically','error','📍\x20Login\x20URL:','💡\x20If\x20the\x20browser\x20does\x20not\x20open\x20automatically,\x20copy\x20the\x20login\x20URL\x20above\x20into\x20your\x20browser.','🔐\x20Starting\x20login\x20service...','address','1308858BUipWc','5951691TEPcra','writeHead','52121DXBKST','cmd\x20/c\x20start\x20\x22\x22\x20\x22','log','748XDqRdC','</title></head>\x0a<body>\x0a\x20\x20<div>','close','port','utf-8','text/html;\x20charset=utf-8','\x20seconds.','xdg-open\x20\x22','catch','https://dev.lovrabet.com:','3013938ccQkxo','headers','Login\x20Successful','127.0.0.1','1550TRQGQT','cookie','win32','json','731562tBBosX','✅\x20Browser\x20opened.\x20Please\x20complete\x20login\x20in\x20the\x20browser.','listen','</div>\x0a\x20\x20<div\x20id=\x22manualMsg\x22\x20style=\x22display:none;margin-top:10px;color:#d00;\x22>','4368336BinTiC','Auth\x20server\x20error:','end','Unable\x20to\x20close\x20automatically.\x20Please\x20close\x20this\x20tab\x20or\x20window\x20manually.','platform','object'];a4_0x5436=function(){return _0xfdf9dd;};return a4_0x5436();}function a4_0x2a70(_0x524326,_0x33d733){_0x524326=_0x524326-0x157;const _0x543654=a4_0x5436();let _0x2a706b=_0x543654[_0x524326];return _0x2a706b;}import{exec}from'node:child_process';import{getIsSessionValid}from'./is-session-valid.js';import{cookieFile}from'./constant.js';export async function authServer(_0x293933){const _0x48d1e4=a4_0x2a70,_0x1e0fd5=_0x293933?.[_0x48d1e4(0x183)]||![];if(await getIsSessionValid())return!![];const _0x27a60f=await(await fetch('https://g.yuntooai.com/cert/lovrabet-dev.json'))[_0x48d1e4(0x172)]();return new Promise(async(_0x585c29,_0x76762d)=>{const _0x400ec8=_0x48d1e4;let _0x35d02b=0x0;const _0x568da3=a4_0x5eace4['createServer'](_0x27a60f,async(_0x102ece,_0x194dd1)=>{const _0x5526cb=a4_0x2a70,_0xfa07d1=getUserDomain(),_0xc108bd=_0x102ece[_0x5526cb(0x16c)][_0x5526cb(0x170)]||'',_0x1af2c4=await fetch(_0xfa07d1+'/api/auth/get-session',{'headers':{'cookie':_0xc108bd}})[_0x5526cb(0x17d)](_0xf2a452=>_0xf2a452['json']()),_0x18f1dd=_0x1af2c4&&_0x1af2c4['session']&&_0x1af2c4['user'];if(_0x18f1dd){writeFileSync(cookieFile,_0xc108bd,_0x5526cb(0x165)),_0x585c29(!![]);const _0x3f4357=_0x5526cb(0x16d),_0x4a91e9='Login\x20successful.\x20Please\x20return\x20to\x20the\x20CLI\x20to\x20continue.\x20This\x20window\x20will\x20close\x20in\x20'+_0x5526cb(0x17f)+_0x5526cb(0x167),_0x22eca9=_0x5526cb(0x17a),_0x40f920='<!doctype\x20html>\x0a<html>\x0a<head><meta\x20charset=\x22utf-8\x22><title>'+_0x3f4357+_0x5526cb(0x162)+_0x4a91e9+_0x5526cb(0x176)+_0x22eca9+'</div>\x0a\x20\x20<script>\x0a\x20\x20(function(){\x0a\x20\x20\x20\x20var\x20t\x20=\x205;\x0a\x20\x20\x20\x20var\x20el\x20=\x20document.getElementById(\x27t\x27);\x0a\x20\x20\x20\x20var\x20manual\x20=\x20document.getElementById(\x27manualMsg\x27);\x0a\x20\x20\x20\x20var\x20id\x20=\x20setInterval(function(){\x0a\x20\x20\x20\x20\x20\x20t--;\x0a\x20\x20\x20\x20\x20\x20if\x20(t\x20<=\x200)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20clearInterval(id);\x0a\x20\x20\x20\x20\x20\x20\x20\x20el.textContent\x20=\x20\x270\x27;\x0a\x20\x20\x20\x20\x20\x20\x20\x20try\x20{\x20window.close();\x20}\x20catch(e)\x20{}\x0a\x20\x20\x20\x20\x20\x20\x20\x20//\x20如果自动关闭无效,显示文本提示让用户手动关闭\x0a\x20\x20\x20\x20\x20\x20\x20\x20setTimeout(function(){\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20if\x20(!window.closed)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20manual.style.display\x20=\x20\x27block\x27;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20},\x20300);\x0a\x20\x20\x20\x20\x20\x20}\x20else\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20el.textContent\x20=\x20String(t);\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20},\x201000);\x0a\x20\x20})();\x0a\x20\x20</script>\x0a</body>\x0a</html>';_0x194dd1['writeHead'](0xc8,{'Content-Type':_0x5526cb(0x166)}),_0x194dd1[_0x5526cb(0x179)](_0x40f920),_0x568da3[_0x5526cb(0x163)]();}else{const _0x714603=''+encodeURIComponent(_0x5526cb(0x16a)+_0x35d02b);_0x194dd1[_0x5526cb(0x15d)](0x12e,{'location':_0xfa07d1+_0x5526cb(0x182)+_0x714603}),_0x194dd1[_0x5526cb(0x179)]();return;}});_0x568da3[_0x400ec8(0x175)](0x0,_0x400ec8(0x16e),()=>{const _0x3b34d4=_0x400ec8,_0x57747e=_0x568da3[_0x3b34d4(0x15a)]();_0x35d02b=typeof _0x57747e===_0x3b34d4(0x17c)&&_0x57747e?_0x57747e[_0x3b34d4(0x164)]:Number(_0x57747e);const _0x20c866='https://dev.lovrabet.com:'+_0x35d02b;!_0x1e0fd5&&(console[_0x3b34d4(0x160)](_0x3b34d4(0x159)),console[_0x3b34d4(0x160)](_0x3b34d4(0x157),_0x20c866),console[_0x3b34d4(0x160)]('🌐\x20Attempting\x20to\x20open\x20browser\x20automatically...'),console[_0x3b34d4(0x160)](''),console['log'](_0x3b34d4(0x158)),console[_0x3b34d4(0x160)]('')),openInBrowser(_0x20c866)[_0x3b34d4(0x17d)](_0x559622=>{const _0x59a542=_0x3b34d4;!_0x1e0fd5&&(_0x559622?console[_0x59a542(0x160)](_0x59a542(0x174)):(console['log']('⚠️\x20\x20Failed\x20to\x20open\x20browser\x20automatically'),console[_0x59a542(0x160)](_0x59a542(0x184),_0x20c866)),console['log'](''));})[_0x3b34d4(0x169)](()=>{const _0x34b3d0=_0x3b34d4;!_0x1e0fd5&&(console[_0x34b3d0(0x160)](_0x34b3d0(0x185)),console[_0x34b3d0(0x160)](_0x34b3d0(0x184),_0x20c866),console[_0x34b3d0(0x160)](''));});}),_0x568da3['on']('error',_0x1cd886=>{const _0x1cf8fd=_0x400ec8;!_0x1e0fd5&&console[_0x1cf8fd(0x186)](_0x1cf8fd(0x178),_0x1cd886),_0x76762d(_0x1cd886);});});}function openInBrowser(_0x2e83a4){return new Promise(_0x48571b=>{const _0xcb6b55=a4_0x2a70,_0x57da21=process[_0xcb6b55(0x17b)];let _0x10f607;if(_0x57da21===_0xcb6b55(0x171))_0x10f607=_0xcb6b55(0x15f)+_0x2e83a4+'\x22';else _0x57da21==='darwin'?_0x10f607=_0xcb6b55(0x180)+_0x2e83a4+'\x22':_0x10f607=_0xcb6b55(0x168)+_0x2e83a4+'\x22';exec(_0x10f607,_0x56adc6=>{_0x56adc6?_0x48571b(![]):_0x48571b(!![]);});});}if(import.meta.main){const isAuth=await authServer();console[a4_0xcd6e54(0x160)](a4_0xcd6e54(0x17e),isAuth);}
|
package/lib/auth/constant.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a5_0x5a1da6=a5_0x1c94;function a5_0x1c94(_0x4cba06,_0x13d1bb){_0x4cba06=_0x4cba06-0xdf;const _0x56b437=a5_0x56b4();let _0x1c9487=_0x56b437[_0x4cba06];return _0x1c9487;}(function(_0x14c69a,_0x4bb141){const _0x534df0=a5_0x1c94,_0x392fdd=_0x14c69a();while(!![]){try{const _0x114c9c=-parseInt(_0x534df0(0xe7))/0x1+-parseInt(_0x534df0(0xe1))/0x2+parseInt(_0x534df0(0xe9))/0x3*(parseInt(_0x534df0(0xe5))/0x4)+parseInt(_0x534df0(0xe4))/0x5+parseInt(_0x534df0(0xe8))/0x6*(-parseInt(_0x534df0(0xe3))/0x7)+-parseInt(_0x534df0(0xe2))/0x8+parseInt(_0x534df0(0xe6))/0x9;if(_0x114c9c===_0x4bb141)break;else _0x392fdd['push'](_0x392fdd['shift']());}catch(_0x3bd3c4){_0x392fdd['push'](_0x392fdd['shift']());}}}(a5_0x56b4,0xdf7a9));import{mkdirSync}from'node:fs';import{homedir}from'node:os';import{join}from'node:path';export const configDir=join(homedir(),a5_0x5a1da6(0xe0));export const cookieFile=join(configDir,a5_0x5a1da6(0xdf));mkdirSync(configDir,{'recursive':!![]});function a5_0x56b4(){const _0x24910c=['7asnLBg','6147785YbBTPP','452iyktqV','14544333diLMui','639062KRucBF','1113570WotNPh','32931CMZoRx','cookie','.lovrabet','3282136xFpKCH','5639208SguSvz'];a5_0x56b4=function(){return _0x24910c;};return a5_0x56b4();}
|
package/lib/auth/get-cookie.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x45fcb5,_0x49eb7a){var _0x26318f=a6_0x1aa8,_0x27aaa9=_0x45fcb5();while(!![]){try{var _0x279b1d=parseInt(_0x26318f(0x121))/0x1*(-parseInt(_0x26318f(0x11b))/0x2)+parseInt(_0x26318f(0x123))/0x3+parseInt(_0x26318f(0x11f))/0x4+-parseInt(_0x26318f(0x11d))/0x5*(-parseInt(_0x26318f(0x120))/0x6)+parseInt(_0x26318f(0x119))/0x7*(parseInt(_0x26318f(0x122))/0x8)+parseInt(_0x26318f(0x11a))/0x9*(-parseInt(_0x26318f(0x118))/0xa)+parseInt(_0x26318f(0x11c))/0xb;if(_0x279b1d===_0x49eb7a)break;else _0x27aaa9['push'](_0x27aaa9['shift']());}catch(_0x5dbd50){_0x27aaa9['push'](_0x27aaa9['shift']());}}}(a6_0x36ea,0x673b0));import{readFileSync}from'node:fs';function a6_0x1aa8(_0x39fc42,_0x51867c){_0x39fc42=_0x39fc42-0x118;var _0x36eaa4=a6_0x36ea();var _0x1aa8ae=_0x36eaa4[_0x39fc42];return _0x1aa8ae;}import{cookieFile}from'./constant.js';export function getCookie(){var _0x530880=a6_0x1aa8;try{return readFileSync(cookieFile,_0x530880(0x11e));}catch{}return'';}function a6_0x36ea(){var _0x5d5a54=['129296NccPfe','13227XVFryG','20AICVxh','14dSDzaW','647523cLbWLb','870BblkJE','12026883cddqkU','15805rmzQAY','utf-8','185112TshlYW','102JAgsdT','1525mtaOsH'];a6_0x36ea=function(){return _0x5d5a54;};return a6_0x36ea();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x5e7821,_0x47be75){const _0x581e07=a7_0x41c9,_0x4f51=_0x5e7821();while(!![]){try{const _0x289b0f=parseInt(_0x581e07(0x1ef))/0x1+-parseInt(_0x581e07(0x1f2))/0x2+parseInt(_0x581e07(0x1f5))/0x3+-parseInt(_0x581e07(0x1f6))/0x4*(-parseInt(_0x581e07(0x1f3))/0x5)+-parseInt(_0x581e07(0x1f0))/0x6+-parseInt(_0x581e07(0x1ed))/0x7*(parseInt(_0x581e07(0x1f9))/0x8)+parseInt(_0x581e07(0x1f8))/0x9;if(_0x289b0f===_0x47be75)break;else _0x4f51['push'](_0x4f51['shift']());}catch(_0xcc9bee){_0x4f51['push'](_0x4f51['shift']());}}}(a7_0x2fc4,0x358de));import{existsSync,readFileSync}from'node:fs';import{getUserDomain}from'../constant/domain.js';import{cookieFile}from'./constant.js';function a7_0x41c9(_0x86a6a1,_0x314cda){_0x86a6a1=_0x86a6a1-0x1ed;const _0x2fc408=a7_0x2fc4();let _0x41c912=_0x2fc408[_0x86a6a1];return _0x41c912;}function a7_0x2fc4(){const _0x4f0068=['8tHaCvG','2934246pEokBU','json','222067SZfIoU','1563972gPsUOD','/api/auth/get-session','218482gbEXso','67765OpwWAi','user','343740UsbKFo','76xeBrzO','session','3728565jnzYmg'];a7_0x2fc4=function(){return _0x4f0068;};return a7_0x2fc4();}export async function getSessionUserInfo(){const _0x367f68=a7_0x41c9;try{if(!existsSync(cookieFile))return null;const _0x379355=readFileSync(cookieFile,'utf-8'),_0xf25b64=await fetch(getUserDomain()+_0x367f68(0x1f1),{'headers':{'cookie':_0x379355}});if(!_0xf25b64['ok'])return null;const _0x327f30=await _0xf25b64[_0x367f68(0x1ee)]();if(!_0x327f30[_0x367f68(0x1f7)]||!_0x327f30[_0x367f68(0x1f4)])return null;return _0x327f30;}catch{return null;}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x44e228,_0x23ed40){const _0x3db101=a8_0x43ae,_0x53aa58=_0x44e228();while(!![]){try{const _0x110d99=-parseInt(_0x3db101(0x78))/0x1*(-parseInt(_0x3db101(0x75))/0x2)+parseInt(_0x3db101(0x7b))/0x3*(parseInt(_0x3db101(0x7d))/0x4)+-parseInt(_0x3db101(0x7c))/0x5+-parseInt(_0x3db101(0x73))/0x6*(parseInt(_0x3db101(0x72))/0x7)+-parseInt(_0x3db101(0x7f))/0x8*(-parseInt(_0x3db101(0x76))/0x9)+parseInt(_0x3db101(0x79))/0xa*(parseInt(_0x3db101(0x74))/0xb)+-parseInt(_0x3db101(0x80))/0xc;if(_0x110d99===_0x23ed40)break;else _0x53aa58['push'](_0x53aa58['shift']());}catch(_0x549259){_0x53aa58['push'](_0x53aa58['shift']());}}}(a8_0x3c51,0x9253b));function a8_0x3c51(){const _0x40f9b2=['10LxWPzu','user','2850045irAibr','3358800ahnnYV','4iZhxRf','then','312MzWNXR','18027936UHYujP','json','4928HXKaRb','1842AdBZFf','8632206twyNqt','88026THViux','259101ycYFEh','session','3vlvbSn'];a8_0x3c51=function(){return _0x40f9b2;};return a8_0x3c51();}import{existsSync,readFileSync}from'node:fs';function a8_0x43ae(_0x3f71de,_0x1e3b2b){_0x3f71de=_0x3f71de-0x72;const _0x3c51b2=a8_0x3c51();let _0x43aefb=_0x3c51b2[_0x3f71de];return _0x43aefb;}import{getUserDomain}from'../constant/domain.js';import{cookieFile}from'./constant.js';export async function getIsSessionValid(){const _0x3f21a2=a8_0x43ae;try{if(!existsSync(cookieFile))return![];const _0x540c3d=readFileSync(cookieFile,'utf-8'),_0x204afe=await fetch(getUserDomain()+'/api/auth/get-session',{'headers':{'cookie':_0x540c3d}})[_0x3f21a2(0x7e)](_0xc79fba=>_0xc79fba[_0x3f21a2(0x81)]());return _0x204afe&&_0x204afe[_0x3f21a2(0x77)]&&_0x204afe[_0x3f21a2(0x7a)];}catch{}return![];}
|
package/lib/auth/logout.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x3ad0ee,_0x41b89f){var _0x13f07d=a9_0x35ae,_0x3b227a=_0x3ad0ee();while(!![]){try{var _0x1b8ba2=parseInt(_0x13f07d(0x189))/0x1*(parseInt(_0x13f07d(0x186))/0x2)+-parseInt(_0x13f07d(0x184))/0x3+-parseInt(_0x13f07d(0x18a))/0x4+-parseInt(_0x13f07d(0x18b))/0x5+-parseInt(_0x13f07d(0x187))/0x6+parseInt(_0x13f07d(0x185))/0x7+parseInt(_0x13f07d(0x18d))/0x8;if(_0x1b8ba2===_0x41b89f)break;else _0x3b227a['push'](_0x3b227a['shift']());}catch(_0x1b3062){_0x3b227a['push'](_0x3b227a['shift']());}}}(a9_0x7bed,0x588c6));function a9_0x7bed(){var _0x77c9a3=['2660992XGgPXC','1831210jkmoLH','!\x20Not\x20logged\x20in','2438840QDAwgx','791133dfTIPM','4909499ozzTMr','310wFVKEy','40542kkEjxe','log','4248TAePsh'];a9_0x7bed=function(){return _0x77c9a3;};return a9_0x7bed();}import{unlinkSync,existsSync}from'node:fs';function a9_0x35ae(_0x4a5adc,_0x3a1aeb){_0x4a5adc=_0x4a5adc-0x184;var _0x7beddb=a9_0x7bed();var _0x35aee5=_0x7beddb[_0x4a5adc];return _0x35aee5;}import{cookieFile}from'./constant.js';export function logout(){var _0xdd5d9e=a9_0x35ae;existsSync(cookieFile)?(unlinkSync(cookieFile),console[_0xdd5d9e(0x188)]('✓\x20Logged\x20out')):console[_0xdd5d9e(0x188)](_0xdd5d9e(0x18c));}
|
package/lib/cli-flags.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a10_0x3fe6(_0x4018c3,_0x152b02){_0x4018c3=_0x4018c3-0x1a1;const _0x21512c=a10_0x2151();let _0x3fe695=_0x21512c[_0x4018c3];return _0x3fe695;}const a10_0x1bc82e=a10_0x3fe6;function a10_0x2151(){const _0x169eff=['318764ZXDjbd','boolean','1102328IABcdJ','872UZZssL','6gSvwmI','2334740TZtqPX','6YXzMfn','20128416yUOumS','1247220fHtNVF','4598139JLKnlN','65412qRjSFT','12vTnJqk','2dUERWq'];a10_0x2151=function(){return _0x169eff;};return a10_0x2151();}(function(_0x4e13ff,_0x1ac909){const _0x552fa4=a10_0x3fe6,_0x465899=_0x4e13ff();while(!![]){try{const _0x37bf0f=-parseInt(_0x552fa4(0x1a5))/0x1*(-parseInt(_0x552fa4(0x1a6))/0x2)+-parseInt(_0x552fa4(0x1ac))/0x3*(-parseInt(_0x552fa4(0x1a8))/0x4)+parseInt(_0x552fa4(0x1a1))/0x5+parseInt(_0x552fa4(0x1aa))/0x6*(parseInt(_0x552fa4(0x1a2))/0x7)+-parseInt(_0x552fa4(0x1a9))/0x8*(-parseInt(_0x552fa4(0x1a3))/0x9)+-parseInt(_0x552fa4(0x1ab))/0xa+-parseInt(_0x552fa4(0x1ad))/0xb*(parseInt(_0x552fa4(0x1a4))/0xc);if(_0x37bf0f===_0x1ac909)break;else _0x465899['push'](_0x465899['shift']());}catch(_0x2545d0){_0x465899['push'](_0x465899['shift']());}}}(a10_0x2151,0x7b52b));export const dynamicCliFlags={'enableBffSave':{'type':a10_0x1bc82e(0x1a7)}};
|
package/lib/cli.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
const
|
|
2
|
+
const a11_0x47b576=a11_0x5e28;(function(_0xca085c,_0x3361af){const _0x332da2=a11_0x5e28,_0x2de98e=_0xca085c();while(!![]){try{const _0x466b83=parseInt(_0x332da2(0x1dd))/0x1+parseInt(_0x332da2(0x1f5))/0x2*(-parseInt(_0x332da2(0x200))/0x3)+parseInt(_0x332da2(0x1e0))/0x4+-parseInt(_0x332da2(0x1f3))/0x5+-parseInt(_0x332da2(0x1f8))/0x6*(-parseInt(_0x332da2(0x1ff))/0x7)+parseInt(_0x332da2(0x1e6))/0x8*(parseInt(_0x332da2(0x203))/0x9)+parseInt(_0x332da2(0x1d4))/0xa;if(_0x466b83===_0x3361af)break;else _0x2de98e['push'](_0x2de98e['shift']());}catch(_0x32a43b){_0x2de98e['push'](_0x2de98e['shift']());}}}(a11_0x47da,0xec877));import a11_0x564006 from'meow';import{showHelp}from'./help.js';import{CliError,CliErrors}from'./errors.js';import{isKnownService,getServiceEntry,findDefinition,deprecatedAliases}from'./commands/registry.js';import{runCommand}from'./framework/runner.js';import{generateCommandHelp,generateServiceHelp,generateFullHelp}from'./framework/help.js';import{getCookie}from'./auth/get-cookie.js';import{getApiDomain}from'./constant/domain.js';import{CLI_BIN_NAME,buildMeowFlags}from'./constant/cli.js';import{VERSION,GIT_COMMIT,BUILD_TIME}from'./generated/build-info.js';import{reportCliHelpTrace}from'./telemetry/cli-help-trace.js';import{reportCommandTrace}from'./telemetry/cli-command-trace.js';import{isNonInteractive as a11_0x568cd6}from'./utils/is-non-interactive.js';import{registerOtelShutdownOnExit,exitWithOtelShutdown}from'./telemetry/register-otel-exit-shutdown.js';let dynamicCliFlags=null;function a11_0x47da(){const _0x409d22=['243752geEUDk','apiDomain','hint','name','dynamicCliFlags','unknown_service','code','Unexpected\x20error:','appCode','defaultCommand','string','write','raw','5896250WcPRwC','Error:\x20','15708dJJXgv','message','userDomain','24YxgLuQ','error','cookie','./constant/env.js','riskLevel','cancelled','Hint:\x20','1060178yJDNMo','594ehOimQ','stderr','now','153gCvhAJ','\x20\x20Please\x20update\x20your\x20command\x20and\x20try\x20again.\x0a','slice','12891030wXNJyR','input','log','runtimeDomain','`\x20has\x20been\x20moved\x20to\x20`','ExitPromptError','env','help','appcode','1025886vZiFMY','⚠\x20`','./context.js','1057548ZXUcbd','./constant/domain.js','explicitAppName','wildcardDef','verbose','service'];a11_0x47da=function(){return _0x409d22;};return a11_0x47da();}try{dynamicCliFlags=(await import('./cli-flags.js'))[a11_0x47b576(0x1ea)];}catch{}const helpText=generateFullHelp(),cliVersion=GIT_COMMIT!=='unknown'?VERSION+'\x20('+GIT_COMMIT+',\x20'+BUILD_TIME[a11_0x47b576(0x205)](0x0,0xa)+')':VERSION,cli=a11_0x564006(helpText,{'importMeta':import.meta,'version':cliVersion,'flags':{...buildMeowFlags(),...dynamicCliFlags||{}}});registerOtelShutdownOnExit(),await run();function a11_0x5e28(_0xf82cfd,_0x285fd5){_0xf82cfd=_0xf82cfd-0x1d4;const _0x47dae5=a11_0x47da();let _0x5e282a=_0x47dae5[_0xf82cfd];return _0x5e282a;}async function run(){const _0x5abbc6=a11_0x47b576;let _0x1c2c2f=cli[_0x5abbc6(0x1d5)][0x0],_0x172f8c=cli['input'][0x1];const _0x5c2254=cli['flags'];if(!_0x1c2c2f){await reportCliHelpTrace('global'),showHelp();return;}const _0x39bfb8=deprecatedAliases[_0x1c2c2f];if(_0x39bfb8&&!isKnownService(_0x1c2c2f)){const _0x2a564c=_0x172f8c?CLI_BIN_NAME+'\x20'+_0x1c2c2f+'\x20'+_0x172f8c:CLI_BIN_NAME+'\x20'+_0x1c2c2f,_0x9cb070=CLI_BIN_NAME+'\x20'+_0x39bfb8[_0x5abbc6(0x1e5)]+'\x20'+_0x39bfb8['command'];console[_0x5abbc6(0x1f9)](_0x5abbc6(0x1de)+_0x2a564c+_0x5abbc6(0x1d8)+_0x9cb070+'`\x20in\x20v2.0.\x0a'+_0x5abbc6(0x204)),await exitWithOtelShutdown(0x1);}if(!isKnownService(_0x1c2c2f)){await reportCliHelpTrace(_0x5abbc6(0x1eb),{'service':_0x1c2c2f}),showHelp();return;}const _0x202f8c=getServiceEntry(_0x1c2c2f);if(_0x5c2254[_0x5abbc6(0x1da)]&&typeof _0x5c2254[_0x5abbc6(0x1da)]===_0x5abbc6(0x1f0)){const {initEnv:_0x2c89f5}=await import(_0x5abbc6(0x1fb));_0x2c89f5(_0x5c2254['env']);}const {buildConfigFromFlags:_0x5da3f9}=await import(_0x5abbc6(0x1df)),_0x37c464=_0x5da3f9(_0x5c2254);if(!_0x5c2254['env']&&_0x37c464['env']){const {initEnv:_0x12e493}=await import(_0x5abbc6(0x1fb));_0x12e493(_0x37c464[_0x5abbc6(0x1da)]);}if(_0x37c464['raw']?.[_0x5abbc6(0x1e7)]||_0x37c464[_0x5abbc6(0x1f2)]?.[_0x5abbc6(0x1f7)]||_0x37c464[_0x5abbc6(0x1f2)]?.['runtimeDomain']){const {initDomains:_0x5870d8}=await import(_0x5abbc6(0x1e1));_0x5870d8({'apiDomain':_0x37c464[_0x5abbc6(0x1f2)][_0x5abbc6(0x1e7)]||undefined,'userDomain':_0x37c464[_0x5abbc6(0x1f2)][_0x5abbc6(0x1f7)]||undefined,'runtimeDomain':_0x37c464[_0x5abbc6(0x1f2)][_0x5abbc6(0x1d7)]||undefined});}if(!_0x172f8c){if(_0x202f8c[_0x5abbc6(0x1ef)])_0x172f8c=_0x202f8c['defaultCommand'];else{if(_0x202f8c[_0x5abbc6(0x1e3)]){if(_0x5c2254[_0x5abbc6(0x1db)]){printServiceHelp(_0x1c2c2f);return;}await dispatchDeclarative(_0x202f8c[_0x5abbc6(0x1e3)],_0x1c2c2f,'',[],_0x5c2254,_0x37c464);return;}else{printServiceHelp(_0x1c2c2f);return;}}}if(_0x5c2254['help']&&!findDefinition(_0x1c2c2f,_0x172f8c)){printServiceHelp(_0x1c2c2f);return;}{let _0x5088cc=findDefinition(_0x1c2c2f,_0x172f8c),_0x7f82d3=cli['input'][_0x5abbc6(0x205)](0x2);if(!_0x5088cc){if(_0x202f8c[_0x5abbc6(0x1e3)]){if(_0x5c2254[_0x5abbc6(0x1db)]){printServiceHelp(_0x1c2c2f);return;}_0x5088cc=_0x202f8c[_0x5abbc6(0x1e3)],_0x7f82d3=[_0x172f8c,...cli[_0x5abbc6(0x1d5)][_0x5abbc6(0x205)](0x2)];}else{printServiceHelp(_0x1c2c2f),await handleErrorAsync(CliErrors['unknownCommand'](_0x1c2c2f+'\x20'+_0x172f8c));return;}}if(_0x5c2254['help']){console[_0x5abbc6(0x1d6)](generateCommandHelp(_0x5088cc));return;}await dispatchDeclarative(_0x5088cc,_0x1c2c2f,_0x172f8c,_0x7f82d3,_0x5c2254,_0x37c464);}}async function dispatchDeclarative(_0x4f45c1,_0x1d52f2,_0x3412af,_0x3129be,_0x189efb,_0x445b9e){const _0x2dcec5=a11_0x47b576,_0xe82055=Date[_0x2dcec5(0x202)]();let _0x37e52a;try{await runCommand(_0x4f45c1,{'rawFlags':_0x189efb,'args':_0x3129be,'resolveAppCode':()=>_0x445b9e[_0x2dcec5(0x1ee)]||_0x189efb[_0x2dcec5(0x1dc)]||process.env.RABETBASE_APPCODE||process.env.LOVRABET_APPCODE||undefined,'resolveCookie':()=>_0x445b9e[_0x2dcec5(0x1fa)]||getCookie(),'resolveApiDomain':()=>getApiDomain(),'isNonInteractive':a11_0x568cd6(_0x189efb),'defaultFormat':_0x445b9e['format'],'defaultPageSize':_0x445b9e['pageSize'],'defaultVerbose':_0x445b9e[_0x2dcec5(0x1e4)],'apiDir':_0x445b9e['apiDir'],'riskLevel':_0x445b9e[_0x2dcec5(0x1fc)],'selectedAppName':_0x445b9e[_0x2dcec5(0x1e2)]});}catch(_0x5c3bfb){_0x37e52a=_0x5c3bfb;}await reportCommandTrace({'service':_0x1d52f2,'command':_0x3412af,'flags':_0x189efb,'durationMs':Date[_0x2dcec5(0x202)]()-_0xe82055,'error':_0x37e52a});if(_0x37e52a)await handleErrorAsync(_0x37e52a);}function printServiceHelp(_0x3f6b9a){const _0x50e209=a11_0x47b576;console[_0x50e209(0x1d6)](generateServiceHelp(_0x3f6b9a));}async function handleErrorAsync(_0x4f78cc){const _0x5ce98a=a11_0x47b576;if(_0x4f78cc instanceof Error&&_0x4f78cc[_0x5ce98a(0x1e9)]===_0x5ce98a(0x1d9))return process[_0x5ce98a(0x201)][_0x5ce98a(0x1f1)]('\x0aCancelled.\x0a'),await exitWithOtelShutdown(0x0);if(_0x4f78cc instanceof CliError){if(_0x4f78cc[_0x5ce98a(0x1ec)]===_0x5ce98a(0x1fd))return process['stderr'][_0x5ce98a(0x1f1)]('\x0a'+_0x4f78cc[_0x5ce98a(0x1f6)]+'\x0a'),await exitWithOtelShutdown(0x0);console['error'](_0x5ce98a(0x1f4)+_0x4f78cc['message']);if(_0x4f78cc[_0x5ce98a(0x1e8)])console[_0x5ce98a(0x1f9)](_0x5ce98a(0x1fe)+_0x4f78cc[_0x5ce98a(0x1e8)]);return await exitWithOtelShutdown(_0x4f78cc['exitCode']);}return console[_0x5ce98a(0x1f9)](_0x5ce98a(0x1ed),_0x4f78cc),await exitWithOtelShutdown(0x1);}
|
package/lib/commands/api/doc.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a12_0x1ca02a=a12_0x503e;function a12_0x503e(_0x1d7fca,_0x2d17a0){_0x1d7fca=_0x1d7fca-0x9a;const _0x4f2614=a12_0x4f26();let _0x503e22=_0x4f2614[_0x1d7fca];return _0x503e22;}(function(_0x552ec9,_0x53526f){const _0x9eac64=a12_0x503e,_0x563bfd=_0x552ec9();while(!![]){try{const _0x548fa7=parseInt(_0x9eac64(0xd1))/0x1*(parseInt(_0x9eac64(0xaa))/0x2)+parseInt(_0x9eac64(0xc6))/0x3*(parseInt(_0x9eac64(0xbb))/0x4)+-parseInt(_0x9eac64(0xbe))/0x5+-parseInt(_0x9eac64(0xca))/0x6*(parseInt(_0x9eac64(0xa7))/0x7)+-parseInt(_0x9eac64(0x9e))/0x8+parseInt(_0x9eac64(0xbf))/0x9*(parseInt(_0x9eac64(0xaf))/0xa)+parseInt(_0x9eac64(0xa1))/0xb;if(_0x548fa7===_0x53526f)break;else _0x563bfd['push'](_0x563bfd['shift']());}catch(_0x5e1851){_0x563bfd['push'](_0x563bfd['shift']());}}}(a12_0x4f26,0x50ea6));import a12_0xfe36de from'ora';import{fetchModelList}from'../../api/fetch-model-list.js';import{generateDatasetDocs}from'../../api/api-doc.js';import{CliErrors}from'../../errors.js';function a12_0x4f26(){const _0x215fe3=['--datasetcode\x20cannot\x20be\x20empty.','appCode','!\x20No\x20datasets\x20found.','2770QQKYrx','validation','Provide\x20a\x20valid\x20JSON\x20object,\x20e.g.\x20--params\x20\x27{\x22key\x22:\x22value\x22}\x27','output','):\x20','write','\x20dataset(s)','doc','has','succeed','\x20\x20•\x20','\x1b[90m*\x20Generating\x20docs\x20for:\x20','4bfCfVN','✓\x20Generated\x20','\x20of\x20','1087465QIgrNk','144cTRXBa','join','object','start','.md','length','stdout','1860261KsFGJq','./docs','cookie','params','540MaaaVo','message','error','\x1b[33m!\x20The\x20following\x20dataset\x20codes\x20do\x20not\x20exist:\x20','trim','map','\x20dataset(s)\x1b[0m','248TrecyH','fail','api','success','\x20failed','Doc\x20generation:\x20','\x1b[0m','isArray','\x20doc(s)\x20in\x20','\x20succeeded,\x20','string','str','3599456cYfIjl','datasetcode','None\x20of\x20the\x20specified\x20dataset\x20codes\x20exist:\x20','8268414GlmYRo','Fetching\x20dataset\x20list\x20for\x20','Filter:\x20comma-separated\x20dataset\x20codes\x20to\x20generate\x20docs\x20for','Doc\x20generation\x20complete:\x20','filter','log','33187NOsMSB','\x1b[90m*\x20Filtered\x20','Fetched\x20','398ccSQfJ','datasetCode'];a12_0x4f26=function(){return _0x215fe3;};return a12_0x4f26();}import{APPCODE_FLAG_OPTIONAL}from'../common/flags.js';export const apiDoc={'service':a12_0x1ca02a(0xd3),'command':a12_0x1ca02a(0xb6),'description':'Generate\x20markdown\x20documentation\x20for\x20all\x20datasets','risk':a12_0x1ca02a(0xb4),'requiresAppCode':!![],'hasFormat':![],'flags':[{...APPCODE_FLAG_OPTIONAL,'hidden':!![]},{'name':a12_0x1ca02a(0xb2),'type':a12_0x1ca02a(0x9c),'description':'Output\x20directory\x20(default:\x20./docs)'},{'name':a12_0x1ca02a(0x9f),'type':a12_0x1ca02a(0x9c),'description':a12_0x1ca02a(0xa3)},{'name':a12_0x1ca02a(0xc9),'type':a12_0x1ca02a(0x9c),'description':'Extra\x20params\x20passed\x20to\x20the\x20doc\x20generator\x20(JSON\x20object)'}],async 'execute'(_0x98232d){const _0x5b62af=a12_0x1ca02a,_0x4c474e=_0x98232d[_0x5b62af(0x9d)](_0x5b62af(0xb2))||_0x5b62af(0xc7),_0x53895a=_0x98232d['str'](_0x5b62af(0x9f)),_0x5a4eef=_0x98232d[_0x5b62af(0x9d)](_0x5b62af(0xc9));let _0x3f1f99;if(_0x5a4eef)try{_0x3f1f99=JSON['parse'](_0x5a4eef);if(typeof _0x3f1f99!==_0x5b62af(0xc1)||_0x3f1f99===null||Array[_0x5b62af(0xd8)](_0x3f1f99))throw new Error('must\x20be\x20a\x20JSON\x20object');}catch(_0x4478ab){throw CliErrors['validation']('Invalid\x20--params:\x20'+(_0x4478ab instanceof Error?_0x4478ab[_0x5b62af(0xcb)]:String(_0x4478ab)),_0x5b62af(0xb1));}let _0x370ecc;if(_0x53895a){const _0x44950c=_0x53895a['split'](',')[_0x5b62af(0xcf)](_0x3a96f4=>_0x3a96f4[_0x5b62af(0xce)]())[_0x5b62af(0xa5)](_0x1f99be=>_0x1f99be[_0x5b62af(0xc4)]>0x0);if(_0x44950c[_0x5b62af(0xc4)]===0x0)throw CliErrors['validation'](_0x5b62af(0xac));_0x370ecc=new Set(_0x44950c),console[_0x5b62af(0xa6)](_0x5b62af(0xba)+_0x44950c[_0x5b62af(0xc0)](',\x20')+_0x5b62af(0xd7));}const _0x4a382c=a12_0xfe36de(_0x5b62af(0xa2)+_0x98232d[_0x5b62af(0xad)]+'...')[_0x5b62af(0xc2)]();let _0x43a763;try{({configArray:_0x43a763}=await fetchModelList(_0x98232d[_0x5b62af(0xad)],_0x98232d[_0x5b62af(0xc8)]),_0x4a382c[_0x5b62af(0xb8)](_0x5b62af(0xa9)+_0x43a763['length']+_0x5b62af(0xb5)));}catch(_0x169000){_0x4a382c[_0x5b62af(0xd2)]('Failed\x20to\x20fetch\x20datasets');throw _0x169000;}if(_0x43a763[_0x5b62af(0xc4)]===0x0)return console['log'](_0x5b62af(0xae)),{'ok':!![]};let _0x336c20=_0x43a763;if(_0x370ecc){_0x336c20=_0x43a763[_0x5b62af(0xa5)](_0x16956b=>_0x370ecc[_0x5b62af(0xb7)](_0x16956b[_0x5b62af(0xab)]));const _0x283f28=[..._0x370ecc][_0x5b62af(0xa5)](_0x35bb6d=>!_0x43a763['some'](_0x30f040=>_0x30f040[_0x5b62af(0xab)]===_0x35bb6d));_0x283f28['length']>0x0&&console[_0x5b62af(0xa6)](_0x5b62af(0xcd)+_0x283f28[_0x5b62af(0xc0)](',\x20')+_0x5b62af(0xd7));if(_0x336c20[_0x5b62af(0xc4)]===0x0)throw CliErrors[_0x5b62af(0xb0)](_0x5b62af(0xa0)+[..._0x370ecc]['join'](',\x20'));console[_0x5b62af(0xa6)](_0x5b62af(0xa8)+_0x336c20[_0x5b62af(0xc4)]+_0x5b62af(0xbd)+_0x43a763['length']+_0x5b62af(0xd0));}let _0x146b7b=0x0;const _0x16b532=await generateDatasetDocs(_0x336c20,_0x98232d[_0x5b62af(0xad)],_0x98232d['cookie'],_0x4c474e,(_0x474c8b,_0x554a8e,_0x1150da)=>{const _0xb99a41=_0x5b62af;_0x146b7b=_0x474c8b,process[_0xb99a41(0xc5)][_0xb99a41(0xb4)]('\x0d\x20\x20['+String(_0x474c8b)['padStart'](String(_0x554a8e)['length'])+'/'+_0x554a8e+']\x20'+_0x1150da+_0xb99a41(0xc3));},_0x3f1f99);if(_0x146b7b>0x0)process[_0x5b62af(0xc5)][_0x5b62af(0xb4)]('\x0a');const _0x547c2b=_0x16b532[_0x5b62af(0xa5)](_0x46dbd9=>_0x46dbd9[_0x5b62af(0xd4)])[_0x5b62af(0xc4)],_0x516ae1=_0x16b532['filter'](_0x3a0a3c=>!_0x3a0a3c[_0x5b62af(0xd4)])[_0x5b62af(0xc4)];console[_0x5b62af(0xa6)](),console[_0x5b62af(0xa6)](_0x5b62af(0xbc)+_0x547c2b+_0x5b62af(0x9a)+_0x4c474e);if(_0x516ae1>0x0){console[_0x5b62af(0xcc)]('!\x20'+_0x516ae1+'\x20doc(s)\x20failed');for(const _0x593e81 of _0x16b532[_0x5b62af(0xa5)](_0x1dc8af=>!_0x1dc8af[_0x5b62af(0xd4)])){console['error'](_0x5b62af(0xb9)+_0x593e81['datasetName']+'\x20('+_0x593e81[_0x5b62af(0xab)]+_0x5b62af(0xb3)+_0x593e81[_0x5b62af(0xcc)]);}}return{'ok':_0x516ae1===0x0,'message':_0x516ae1>0x0?_0x5b62af(0xd6)+_0x547c2b+_0x5b62af(0x9b)+_0x516ae1+_0x5b62af(0xd5):_0x5b62af(0xa4)+_0x547c2b+'\x20file(s)'};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a13_0x33b8(_0x1a31cd,_0x1bc6c7){_0x1a31cd=_0x1a31cd-0x158;const _0x4a049f=a13_0x4a04();let _0x33b8ac=_0x4a049f[_0x1a31cd];return _0x33b8ac;}(function(_0x575988,_0x541fbc){const _0xcbe6a9=a13_0x33b8,_0x1d85a1=_0x575988();while(!![]){try{const _0x42a24f=parseInt(_0xcbe6a9(0x15b))/0x1*(parseInt(_0xcbe6a9(0x158))/0x2)+-parseInt(_0xcbe6a9(0x161))/0x3*(-parseInt(_0xcbe6a9(0x162))/0x4)+-parseInt(_0xcbe6a9(0x164))/0x5+parseInt(_0xcbe6a9(0x15c))/0x6*(parseInt(_0xcbe6a9(0x160))/0x7)+-parseInt(_0xcbe6a9(0x15d))/0x8*(parseInt(_0xcbe6a9(0x15e))/0x9)+parseInt(_0xcbe6a9(0x15a))/0xa*(parseInt(_0xcbe6a9(0x159))/0xb)+parseInt(_0xcbe6a9(0x15f))/0xc*(-parseInt(_0xcbe6a9(0x163))/0xd);if(_0x42a24f===_0x541fbc)break;else _0x1d85a1['push'](_0x1d85a1['shift']());}catch(_0x59b127){_0x1d85a1['push'](_0x1d85a1['shift']());}}}(a13_0x4a04,0x5ec31));import{apiList}from'./list.js';import{apiPull}from'./pull.js';function a13_0x4a04(){const _0x439ecf=['1430706UkkDsx','15896ueKNTu','1953hQwSIP','2597052tPiYva','14LcbzfB','2703OgMlDd','1496wfPnVI','13fvjlbK','903230zZVMNK','2ORgVLn','552992IvrmTa','40FmlmSY','201427dKIHzY'];a13_0x4a04=function(){return _0x439ecf;};return a13_0x4a04();}import{apiDoc}from'./doc.js';export const apiDefinitions=[apiList,apiPull,apiDoc];
|
package/lib/commands/api/list.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a14_0x2f3c62=a14_0x2829;(function(_0x125fec,_0x850191){const _0x34f6ed=a14_0x2829,_0x32e5df=_0x125fec();while(!![]){try{const _0x5765be=parseInt(_0x34f6ed(0xd1))/0x1+-parseInt(_0x34f6ed(0xd4))/0x2*(parseInt(_0x34f6ed(0xd7))/0x3)+-parseInt(_0x34f6ed(0xca))/0x4+parseInt(_0x34f6ed(0xd0))/0x5+-parseInt(_0x34f6ed(0xcf))/0x6*(-parseInt(_0x34f6ed(0xcc))/0x7)+-parseInt(_0x34f6ed(0xd3))/0x8+parseInt(_0x34f6ed(0xcb))/0x9*(parseInt(_0x34f6ed(0xd5))/0xa);if(_0x5765be===_0x850191)break;else _0x32e5df['push'](_0x32e5df['shift']());}catch(_0x1be586){_0x32e5df['push'](_0x32e5df['shift']());}}}(a14_0x4820,0x59b63));function a14_0x4820(){const _0x22e803=['1024240kBtbPl','293199MJvEnN','name','3930408ZWepCg','2wvUvVi','830ZNDyqd','List\x20all\x20datasets/models\x20for\x20the\x20configured\x20app(s)','481419KFjraC','appcode','production','isDefault','env','read','2707176ourvlj','98370BlQtzS','67851QknsbU','list','cookie','180kmuFCi'];a14_0x4820=function(){return _0x22e803;};return a14_0x4820();}import{initEnv}from'../../constant/env.js';import{fetchModelList}from'../../api/fetch-model-list.js';function a14_0x2829(_0x2dda50,_0x5e3695){_0x2dda50=_0x2dda50-0xc6;const _0x482027=a14_0x4820();let _0x282916=_0x482027[_0x2dda50];return _0x282916;}import{APPCODE_FLAG_OPTIONAL}from'../common/flags.js';import{resolveTargetApps}from'./shared.js';export const apiList={'service':'api','command':a14_0x2f3c62(0xcd),'description':a14_0x2f3c62(0xd6),'risk':a14_0x2f3c62(0xc9),'requiresAppCode':!![],'flags':[{...APPCODE_FLAG_OPTIONAL,'hidden':!![]}],async 'execute'(_0x258663){const _0x24da94=a14_0x2f3c62,_0x5bdac4=_0x258663['str'](_0x24da94(0xd8)),_0x4a14f8=resolveTargetApps(_0x258663,_0x5bdac4);if(_0x4a14f8){const _0x3d33eb=[];for(const _0x11de77 of _0x4a14f8){const _0x879c17=_0x11de77[_0x24da94(0xce)]||_0x258663[_0x24da94(0xce)],_0x4e0818=_0x11de77[_0x24da94(0xc8)]||_0x24da94(0xc6);initEnv(_0x4e0818);const {configArray:_0x3a4518}=await fetchModelList(_0x11de77[_0x24da94(0xd8)],_0x879c17);_0x3d33eb['push'](..._0x3a4518['map'](_0x26bc1e=>({..._0x26bc1e,'_appName':_0x11de77[_0x24da94(0xd2)],'_appCode':_0x11de77[_0x24da94(0xd8)],'_env':_0x4e0818,'_isDefault':_0x11de77[_0x24da94(0xc7)]})));}return{'ok':!![],'data':_0x3d33eb};}const {configArray:_0x589f88}=await fetchModelList(_0x258663['appCode'],_0x258663[_0x24da94(0xce)]);return{'ok':!![],'data':_0x589f88};}};
|
package/lib/commands/api/pull.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a15_0x363e7f=a15_0x1212;(function(_0x2c38e6,_0x3dd852){const _0x293dfc=a15_0x1212,_0x85b6d0=_0x2c38e6();while(!![]){try{const _0x2769bb=parseInt(_0x293dfc(0x18e))/0x1+-parseInt(_0x293dfc(0x18c))/0x2+parseInt(_0x293dfc(0x1b6))/0x3*(parseInt(_0x293dfc(0x190))/0x4)+-parseInt(_0x293dfc(0x1aa))/0x5*(parseInt(_0x293dfc(0x1af))/0x6)+parseInt(_0x293dfc(0x193))/0x7+-parseInt(_0x293dfc(0x1a9))/0x8*(-parseInt(_0x293dfc(0x1a4))/0x9)+-parseInt(_0x293dfc(0x18a))/0xa*(-parseInt(_0x293dfc(0x1a6))/0xb);if(_0x2769bb===_0x3dd852)break;else _0x85b6d0['push'](_0x85b6d0['shift']());}catch(_0x3bdbfe){_0x85b6d0['push'](_0x85b6d0['shift']());}}}(a15_0x2926,0x4a267));function a15_0x2926(){const _0x3c40e4=['includes','Pulling\x20','cookie','modelCount','pull','env','isDefault','error','28520EVCgXA','write','519514IZXdLd','Pulling\x20API\x20config\x20for\x20','114672pHowQN','split','44cvAapi','output','\x20failed','1001448lJOgCi','\x20model(s)','succeed','api','start','apiFilePath','./src/api/','fail','Failed:\x20','\x20succeeded,\x20','clientFilePath','Pull\x20datasets\x20and\x20generate\x20API\x20config\x20files\x20(./src/api/)','appcode','Output\x20directory\x20(default:\x20./src/api/)','length','\x20\x20•\x20','str','22959ZuPvWf','appCode','2068esBvlN','string','slice','264kdBCKS','1444375BHVDww','\x20dataset(s),\x20generated\x20','log','apiDir','Pulled\x20','12eakBTc','\x20app(s)\x20failed','name','-api','message','client','.ts','71763yJZbnS','join'];a15_0x2926=function(){return _0x3c40e4;};return a15_0x2926();}import a15_0x97f594 from'ora';import a15_0x33b26b from'node:path';import{initEnv,getEnv}from'../../constant/env.js';import{fetchModelList}from'../../api/fetch-model-list.js';function a15_0x1212(_0x5dcec4,_0x35866e){_0x5dcec4=_0x5dcec4-0x186;const _0x2926ed=a15_0x2926();let _0x121248=_0x2926ed[_0x5dcec4];return _0x121248;}import{generateApiFile}from'../../api/generate-api-file.js';import{APPCODE_FLAG_OPTIONAL}from'../common/flags.js';import{resolveTargetApps}from'./shared.js';export const apiPull={'service':a15_0x363e7f(0x196),'command':a15_0x363e7f(0x186),'description':a15_0x363e7f(0x19e),'risk':a15_0x363e7f(0x18b),'requiresAppCode':!![],'hasFormat':![],'flags':[{...APPCODE_FLAG_OPTIONAL,'hidden':!![]},{'name':a15_0x363e7f(0x191),'type':a15_0x363e7f(0x1a7),'description':a15_0x363e7f(0x1a0)}],async 'execute'(_0x34c642){const _0x4343f8=a15_0x363e7f,_0x3c2819=_0x34c642[_0x4343f8(0x1a3)](_0x4343f8(0x19f)),_0x1a1e1b=_0x34c642[_0x4343f8(0x1a3)](_0x4343f8(0x191))||undefined,_0x3f6861=resolveTargetApps(_0x34c642,_0x3c2819);if(_0x3f6861){let _0x4ce068=0x0,_0x525297=0x0;for(const _0x47bb41 of _0x3f6861){const _0x418b06=_0x47bb41[_0x4343f8(0x1ba)]||_0x34c642[_0x4343f8(0x1ba)],_0x774d65=_0x47bb41[_0x4343f8(0x187)]||'production';initEnv(_0x774d65);const _0x538d07=_0x47bb41[_0x4343f8(0x1ad)]||_0x1a1e1b||_0x4343f8(0x199),_0x78498f=_0x47bb41[_0x4343f8(0x188)]?'':_0x47bb41['name']||_0x47bb41['appcode'],_0x2033f7=a15_0x97f594(_0x4343f8(0x1b9)+_0x47bb41[_0x4343f8(0x1b1)]+'\x20('+_0x47bb41[_0x4343f8(0x19f)]+')...')[_0x4343f8(0x197)]();try{const {configArray:_0x53f4c7}=await fetchModelList(_0x47bb41[_0x4343f8(0x19f)],_0x418b06),_0x245666=await generateApiFile(_0x53f4c7,_0x78498f,_0x47bb41[_0x4343f8(0x19f)],_0x47bb41[_0x4343f8(0x188)],_0x774d65,_0x538d07,_0x47bb41['name']);_0x2033f7[_0x4343f8(0x195)](_0x47bb41[_0x4343f8(0x1b1)]+':\x20'+_0x53f4c7['length']+'\x20dataset(s)\x20→\x20'+_0x245666[_0x4343f8(0x1bb)]+_0x4343f8(0x194)),console['log'](_0x4343f8(0x1a2)+_0x245666[_0x4343f8(0x198)]),console[_0x4343f8(0x1ac)](_0x4343f8(0x1a2)+_0x245666[_0x4343f8(0x19d)]),_0x4ce068++;}catch(_0x101aa6){_0x2033f7[_0x4343f8(0x19a)](_0x47bb41['name']+':\x20'+(_0x101aa6 instanceof Error?_0x101aa6[_0x4343f8(0x1b3)]:String(_0x101aa6))),_0x525297++;}}console['log']();if(_0x525297>0x0)console[_0x4343f8(0x189)]('!\x20'+_0x525297+_0x4343f8(0x1b0));return{'ok':_0x525297===0x0,'message':'Done:\x20'+_0x4ce068+_0x4343f8(0x19c)+_0x525297+_0x4343f8(0x192)};}const _0x4d2617=_0x3c2819&&_0x3c2819[_0x4343f8(0x1b8)]('-')?_0x3c2819[_0x4343f8(0x18f)]('-')[_0x4343f8(0x1a8)](0x1)[_0x4343f8(0x1b7)]('-'):'',_0x3d5d8f=_0x1a1e1b||_0x34c642[_0x4343f8(0x1ad)]||_0x4343f8(0x199),_0x500381=!_0x3c2819,_0x5efc99=a15_0x97f594(_0x4343f8(0x18d)+_0x34c642['appCode']+'...')['start']();try{const {configArray:_0x1a0fab}=await fetchModelList(_0x34c642[_0x4343f8(0x1a5)],_0x34c642[_0x4343f8(0x1ba)]),_0x3744ab=await generateApiFile(_0x1a0fab,_0x4d2617,_0x34c642['appCode'],_0x500381,getEnv(),_0x3d5d8f);_0x5efc99[_0x4343f8(0x195)](_0x4343f8(0x1ae)+_0x1a0fab['length']+_0x4343f8(0x1ab)+_0x3744ab[_0x4343f8(0x1bb)]+_0x4343f8(0x194));const _0x8f75d=_0x4d2617?_0x4d2617+_0x4343f8(0x1b2):_0x4343f8(0x196),_0x101851=_0x4d2617?_0x4d2617+'-client':_0x4343f8(0x1b4);return console[_0x4343f8(0x1ac)](_0x4343f8(0x1a2)+a15_0x33b26b['join'](_0x3d5d8f,_0x8f75d+_0x4343f8(0x1b5))),console[_0x4343f8(0x1ac)](_0x4343f8(0x1a2)+a15_0x33b26b[_0x4343f8(0x1b7)](_0x3d5d8f,_0x101851+_0x4343f8(0x1b5))),{'ok':!![],'data':{'datasetCount':_0x1a0fab[_0x4343f8(0x1a1)],'modelCount':_0x3744ab['modelCount']}};}catch(_0x4f8d65){_0x5efc99[_0x4343f8(0x19a)](_0x4343f8(0x19b)+(_0x4f8d65 instanceof Error?_0x4f8d65[_0x4343f8(0x1b3)]:String(_0x4f8d65)));throw _0x4f8d65;}}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x139ecb,_0x1062dd){const _0x33fcaa=a16_0x40c3,_0x38928f=_0x139ecb();while(!![]){try{const _0x5b682e=parseInt(_0x33fcaa(0x19c))/0x1*(parseInt(_0x33fcaa(0x196))/0x2)+-parseInt(_0x33fcaa(0x18c))/0x3*(parseInt(_0x33fcaa(0x190))/0x4)+parseInt(_0x33fcaa(0x195))/0x5*(-parseInt(_0x33fcaa(0x197))/0x6)+-parseInt(_0x33fcaa(0x19d))/0x7*(-parseInt(_0x33fcaa(0x192))/0x8)+parseInt(_0x33fcaa(0x193))/0x9+-parseInt(_0x33fcaa(0x191))/0xa+-parseInt(_0x33fcaa(0x19e))/0xb*(-parseInt(_0x33fcaa(0x19b))/0xc);if(_0x5b682e===_0x1062dd)break;else _0x38928f['push'](_0x38928f['shift']());}catch(_0x50c2a5){_0x38928f['push'](_0x38928f['shift']());}}}(a16_0x160d,0xc264b));import{getMultiAppConfigs}from'../../utils/config.js';function a16_0x160d(){const _0x4fb2c4=['8RCVuGU','4655cntDoQ','44VreJqg','1311IttaRX','map','App\x20\x22','length','9692ULKuBc','5836840XdmNfE','2128oCQQZi','8373546PRHYkW','\x22\x20not\x20found\x20in\x20config.\x20Available:\x20','10iJCCck','285274jxYWAE','3939426HDGRDR','name','join','selectedAppName','4510596nczaLF'];a16_0x160d=function(){return _0x4fb2c4;};return a16_0x160d();}function a16_0x40c3(_0x2b8c44,_0x3be0b3){_0x2b8c44=_0x2b8c44-0x18c;const _0x160d96=a16_0x160d();let _0x40c34a=_0x160d96[_0x2b8c44];return _0x40c34a;}import{CliErrors}from'../../errors.js';export function resolveTargetApps(_0x4edf78,_0x369663){const _0x1e2103=a16_0x40c3;if(_0x369663)return null;let _0x43cd9a=getMultiAppConfigs();if(!_0x43cd9a||_0x43cd9a[_0x1e2103(0x18f)]===0x0)return null;if(_0x4edf78['selectedAppName']){const _0x516f03=_0x43cd9a['filter'](_0x4e01c8=>_0x4e01c8['name']===_0x4edf78['selectedAppName']);if(_0x516f03[_0x1e2103(0x18f)]===0x0){const _0x41b3be=_0x43cd9a[_0x1e2103(0x18d)](_0x2537d5=>_0x2537d5[_0x1e2103(0x198)])[_0x1e2103(0x199)](',\x20');throw CliErrors['validation'](_0x1e2103(0x18e)+_0x4edf78[_0x1e2103(0x19a)]+_0x1e2103(0x194)+_0x41b3be);}_0x43cd9a=_0x516f03;}return _0x43cd9a;}
|
package/lib/commands/app/add.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a17_0x5196d2=a17_0x32a7;(function(_0x322688,_0x216c06){const _0x5f0c32=a17_0x32a7,_0x151736=_0x322688();while(!![]){try{const _0x56bb3f=-parseInt(_0x5f0c32(0x21a))/0x1+-parseInt(_0x5f0c32(0x1fc))/0x2*(parseInt(_0x5f0c32(0x217))/0x3)+-parseInt(_0x5f0c32(0x1fd))/0x4+-parseInt(_0x5f0c32(0x1f4))/0x5+-parseInt(_0x5f0c32(0x20c))/0x6*(-parseInt(_0x5f0c32(0x219))/0x7)+parseInt(_0x5f0c32(0x1f5))/0x8*(parseInt(_0x5f0c32(0x220))/0x9)+parseInt(_0x5f0c32(0x1fe))/0xa;if(_0x56bb3f===_0x216c06)break;else _0x151736['push'](_0x151736['shift']());}catch(_0x2854e6){_0x151736['push'](_0x151736['shift']());}}}(a17_0x538d,0x7dfa5));function a17_0x32a7(_0x51c404,_0x3093af){_0x51c404=_0x51c404-0x1f4;const _0x538dab=a17_0x538d();let _0x32a78a=_0x538dab[_0x51c404];return _0x32a78a;}import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';function a17_0x538d(){const _0x30bbfc=['apps','boolean','\x20app\x20\x22','defaultApp','appcode','flagMissing','number','pageSize','\x20app\x20add\x20--name\x20<name>\x20--appcode\x20<code>','Access\x20key','Missing\x20app\x20name.','Default\x20output\x20format','18CZEoJY','Add\x20or\x20update\x20an\x20app\x20in\x20config','Use\x20global\x20config\x20scope','Risk\x20level','Default\x20page\x20size','format','add','Auth\x20cookie','entries','str','App\x20name','18TxxCfW','length','1580075dxYVsG','702334plvXKl','write','accessKey','env','string','Usage:\x20','118863aJrMcL','riskLevel','API\x20directory\x20path','1660840zEVZmk','160rEUOAn','Target\x20environment','flag','Updated','\x22\x20(appcode:\x20','app','name','95666VPfqbK','580612NAJGdf','10413430cKGyoQ','locale'];a17_0x538d=function(){return _0x30bbfc;};return a17_0x538d();}import{readConfig,writeConfig,scopeLabel,migrateLegacySingleApp}from'./shared.js';const PROFILE_FLAG_KEYS={'env':a17_0x5196d2(0x21d),'apiDir':'apiDir','cookie':'cookie','accessKey':a17_0x5196d2(0x21c),'format':a17_0x5196d2(0x211),'pageSize':'pageSize','riskLevel':a17_0x5196d2(0x221),'locale':a17_0x5196d2(0x1ff)};async function execute(_0xce2fdc){const _0x275ec3=a17_0x5196d2,_0xa8ccf5=_0xce2fdc[_0x275ec3(0x215)](_0x275ec3(0x1fb));if(!_0xa8ccf5)throw CliErrors['validation'](_0x275ec3(0x20a),_0x275ec3(0x21f)+CLI_BIN_NAME+'\x20app\x20add\x20--name\x20<name>\x20--appcode\x20<code>');const _0x2b7ec1=_0xce2fdc[_0x275ec3(0x215)](_0x275ec3(0x204));if(!_0x2b7ec1)throw CliErrors[_0x275ec3(0x205)](_0x275ec3(0x204),_0x275ec3(0x21f)+CLI_BIN_NAME+_0x275ec3(0x208));const _0x595a5a={'global':_0xce2fdc['bool']('global')},_0x57badd=readConfig(_0x595a5a);if(!_0x57badd[_0x275ec3(0x200)])_0x57badd[_0x275ec3(0x200)]={};Object['keys'](_0x57badd[_0x275ec3(0x200)])[_0x275ec3(0x218)]===0x0&&migrateLegacySingleApp(_0x57badd,_0xa8ccf5);const _0x13a861={'appcode':_0x2b7ec1};for(const [_0x548df1,_0x416611]of Object[_0x275ec3(0x214)](PROFILE_FLAG_KEYS)){const _0x5372c8=_0xce2fdc[_0x275ec3(0x1f7)](_0x548df1);_0x5372c8!=null&&_0x5372c8!==''&&_0x5372c8!==![]&&(_0x13a861[_0x416611]=_0x416611===_0x275ec3(0x207)?Number(_0x5372c8):_0x5372c8);}const _0x7ed92e=_0x57badd['apps'],_0x4457c8=!!_0x7ed92e[_0xa8ccf5];_0x7ed92e[_0xa8ccf5]=_0x13a861;if(!_0x57badd[_0x275ec3(0x203)])_0x57badd[_0x275ec3(0x203)]=_0xa8ccf5;writeConfig(_0x57badd,_0x595a5a);const _0x3bed02=!_0x4457c8&&_0x57badd['defaultApp']===_0xa8ccf5?'\x20Set\x20as\x20default\x20app.':'';return{'ok':!![],'message':(_0x4457c8?_0x275ec3(0x1f8):'Added')+_0x275ec3(0x202)+_0xa8ccf5+_0x275ec3(0x1f9)+_0x2b7ec1+')'+scopeLabel(_0x595a5a)+'.'+_0x3bed02};}export const appAddDefinition={'service':a17_0x5196d2(0x1fa),'command':a17_0x5196d2(0x212),'description':a17_0x5196d2(0x20d),'risk':a17_0x5196d2(0x21b),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a17_0x5196d2(0x1fb),'type':a17_0x5196d2(0x21e),'description':a17_0x5196d2(0x216),'required':!![]},{'name':a17_0x5196d2(0x204),'type':a17_0x5196d2(0x21e),'description':'App\x20code','required':!![]},{'name':'global','type':a17_0x5196d2(0x201),'description':a17_0x5196d2(0x20e),'default':![]},{'name':'env','type':a17_0x5196d2(0x21e),'description':a17_0x5196d2(0x1f6)},{'name':'apiDir','type':a17_0x5196d2(0x21e),'description':a17_0x5196d2(0x222)},{'name':'cookie','type':a17_0x5196d2(0x21e),'description':a17_0x5196d2(0x213),'hidden':!![]},{'name':a17_0x5196d2(0x21c),'type':a17_0x5196d2(0x21e),'description':a17_0x5196d2(0x209),'hidden':!![]},{'name':'format','type':a17_0x5196d2(0x21e),'description':a17_0x5196d2(0x20b)},{'name':a17_0x5196d2(0x207),'type':a17_0x5196d2(0x206),'description':a17_0x5196d2(0x210)},{'name':a17_0x5196d2(0x221),'type':a17_0x5196d2(0x21e),'description':a17_0x5196d2(0x20f)},{'name':a17_0x5196d2(0x1ff),'type':a17_0x5196d2(0x21e),'description':'Locale'}],'execute':execute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x1bc723,_0x22e442){const _0x2cb701=a18_0x20c3,_0x4cd479=_0x1bc723();while(!![]){try{const _0x3c9640=-parseInt(_0x2cb701(0x168))/0x1+parseInt(_0x2cb701(0x166))/0x2+parseInt(_0x2cb701(0x16c))/0x3+parseInt(_0x2cb701(0x16b))/0x4+parseInt(_0x2cb701(0x169))/0x5+parseInt(_0x2cb701(0x16d))/0x6*(parseInt(_0x2cb701(0x16a))/0x7)+-parseInt(_0x2cb701(0x167))/0x8;if(_0x3c9640===_0x22e442)break;else _0x4cd479['push'](_0x4cd479['shift']());}catch(_0x564caa){_0x4cd479['push'](_0x4cd479['shift']());}}}(a18_0x254a,0x8fd8a));import{appListDefinition}from'./list.js';import{appRemoteDefinition}from'./remote.js';function a18_0x20c3(_0x28e9d4,_0x4e1938){_0x28e9d4=_0x28e9d4-0x166;const _0x254aa6=a18_0x254a();let _0x20c3a1=_0x254aa6[_0x28e9d4];return _0x20c3a1;}function a18_0x254a(){const _0x48655a=['13654832gBisKd','101115yoKNNp','846430iavcET','7hpoBGQ','4615704XUISYJ','1526157dmMDyh','2837022vIMaYs','184790UxFFNc'];a18_0x254a=function(){return _0x48655a;};return a18_0x254a();}import{appUseDefinition}from'./use.js';import{appAddDefinition}from'./add.js';import{appRemoveDefinition}from'./remove.js';export const appDefinitions=[appListDefinition,appRemoteDefinition,appUseDefinition,appAddDefinition,appRemoveDefinition];
|
package/lib/commands/app/list.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a19_0x5c7f43=a19_0x5595;function a19_0x5595(_0x3efabd,_0x484f07){_0x3efabd=_0x3efabd-0x1a3;const _0x5628dd=a19_0x5628();let _0x55955a=_0x5628dd[_0x3efabd];return _0x55955a;}(function(_0x6e0de0,_0x38cc20){const _0x544b33=a19_0x5595,_0x1ba68b=_0x6e0de0();while(!![]){try{const _0x40ba3e=-parseInt(_0x544b33(0x1b9))/0x1*(-parseInt(_0x544b33(0x1b5))/0x2)+-parseInt(_0x544b33(0x1a8))/0x3*(parseInt(_0x544b33(0x1bc))/0x4)+-parseInt(_0x544b33(0x1aa))/0x5*(-parseInt(_0x544b33(0x1b4))/0x6)+parseInt(_0x544b33(0x1a5))/0x7+parseInt(_0x544b33(0x1b0))/0x8*(-parseInt(_0x544b33(0x1bd))/0x9)+parseInt(_0x544b33(0x1b3))/0xa*(-parseInt(_0x544b33(0x1ab))/0xb)+-parseInt(_0x544b33(0x1a9))/0xc*(-parseInt(_0x544b33(0x1bb))/0xd);if(_0x40ba3e===_0x38cc20)break;else _0x1ba68b['push'](_0x1ba68b['shift']());}catch(_0x3dcba3){_0x1ba68b['push'](_0x1ba68b['shift']());}}}(a19_0x5628,0xe90fa));import{readConfig}from'./shared.js';import{CLI_BIN_NAME}from'../../constant/cli.js';async function execute(_0x46c581){const _0x3a8158=a19_0x5595,_0x1455c0=readConfig(),{apps:apps={},defaultApp:_0x275ad6,currentApp:_0x5b5a02}=_0x1455c0,_0x147227=Object[_0x3a8158(0x1a6)](apps);if(_0x147227[_0x3a8158(0x1a3)]===0x0){const _0x3af21b=_0x1455c0['appcode'];if(_0x3af21b)return{'ok':!![],'data':{'mode':_0x3a8158(0x1b1),'appcode':_0x3af21b,'env':_0x1455c0[_0x3a8158(0x1b8)]},'message':_0x3a8158(0x1b6)+CLI_BIN_NAME+_0x3a8158(0x1b7)};return{'ok':!![],'data':[],'message':_0x3a8158(0x1b2)+CLI_BIN_NAME+_0x3a8158(0x1a7)};}const _0x1399bb=_0x147227[_0x3a8158(0x1ae)](([_0x5192a3,_0x2e6441])=>({'name':_0x5192a3,'appcode':_0x2e6441[_0x3a8158(0x1af)],'isDefault':_0x5192a3===_0x275ad6,'isCurrent':_0x5192a3===(_0x5b5a02??_0x275ad6),'env':_0x2e6441['env']??null,'apiDir':_0x2e6441['apiDir']??null,'hasCookie':!!_0x2e6441[_0x3a8158(0x1ad)],'hasAccessKey':!!_0x2e6441['accessKey'],'format':_0x2e6441[_0x3a8158(0x1ba)]??null,'pageSize':_0x2e6441['pageSize']??null,'riskLevel':_0x2e6441['riskLevel']??null,'locale':_0x2e6441['locale']??null}));return{'ok':!![],'data':_0x1399bb};}function a19_0x5628(){const _0x4775c2=['appcode','971752tBMPlC','single-app','No\x20apps\x20configured.\x20Use\x20`','438790ZgpDvc','116502NwrJSW','1966qiZdGO','Single-app\x20mode.\x20Use\x20`','\x20app\x20add\x20<name>\x20--appcode\x20<code>`\x20to\x20enable\x20multi-app\x20mode.','env','498IcGCaG','format','29489122MqYQQH','75028QvksWK','99vEjKPj','length','app','377062PiQZyk','entries','\x20app\x20add\x20--name\x20<name>\x20--appcode\x20<code>`\x20to\x20add\x20one.','87UholAK','12eDdhgs','85GGgeeY','77uvMXZQ','list','cookie','map'];a19_0x5628=function(){return _0x4775c2;};return a19_0x5628();}export const appListDefinition={'service':a19_0x5c7f43(0x1a4),'command':a19_0x5c7f43(0x1ac),'description':'List\x20all\x20configured\x20apps','risk':'read','requiresAuth':![],'requiresAppCode':![],'flags':[],'execute':execute};
|