@lovrabet/rabetbase-cli 2.0.6 → 2.0.8
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/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/project/create/enhanced-guided-create.js +1 -0
- package/lib/commands/project/create/format-elapsed.js +1 -0
- package/lib/commands/project/create/main.js +1 -0
- package/lib/commands/project/create/non-interactive.js +1 -0
- package/lib/commands/project/create/project-template-path.js +1 -0
- package/lib/commands/project/create/use-copy-project-template.js +1 -0
- package/lib/commands/project/create/use-format-code.js +1 -0
- package/lib/commands/project/create/use-install-dependencies.js +1 -0
- package/lib/commands/project/index.js +1 -1
- package/lib/commands/project/init.js +1 -0
- package/lib/commands/project/upgrade.js +1 -0
- package/lib/commands/registry.js +1 -1
- package/lib/commands/run/index.js +1 -1
- package/lib/commands/schema.js +1 -0
- 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/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/errors.js +1 -1
- package/lib/framework/build-all-flags.js +1 -0
- 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/schema-export.js +1 -0
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.js +1 -1
- package/lib/help.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/apply-jq-filter.js +1 -0
- 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 +4 -2
- package/lib/commands/build.js +0 -1
- package/lib/commands/preview.js +0 -1
- package/lib/commands/project-upgrade.js +0 -1
- package/lib/commands/start.js +0 -1
- package/lib/create-app/enhanced-guided-create.js +0 -1
- package/lib/create-app/format-elapsed.js +0 -1
- package/lib/create-app/main.js +0 -1
- package/lib/create-app/non-interactive.js +0 -1
- package/lib/create-app/use-copy-project-template.js +0 -1
- package/lib/create-app/use-format-code.js +0 -1
- package/lib/create-app/use-install-dependencies.js +0 -1
- package/lib/init/main.js +0 -1
package/lib/api/api-doc.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a0_0x364d(){const _0x38f8bf=['228GAFtnC','.md\x20(','Waiting\x203\x20seconds...\x0a','110ZiFlLo','.md\x20-\x20','4013930ZDtgHk','message','✓\x20Generated:\x20','Invalid\x20response\x20format\x20(','\x20datasets\x20to\x20generate\x20docs\x20for\x0a','./docs','233263uljjRm','markdown','2kmDeKE','1152173uIUXAb','生成文档失败:\x20','/api/node-toolbox/api-doc-generator','7788654QsFbOS','api-doc','.md','name','error','success','tableName','POST','48rTGUhv','string','datasetCode','push','生成文档成功:\x20',']\x20Generating:\x20','):\x20missing\x20data.markdown\x20field','739221HChDfF','log','12SoXTJx','6QLdquE','Fetch\x20doc\x20(','2019810PjdaQT','710115PakSRz'];a0_0x364d=function(){return _0x38f8bf;};return a0_0x364d();}const a0_0x24c5de=a0_0x406a;(function(_0xf09989,_0x48114b){const _0x413898=a0_0x406a,_0x1d90de=_0xf09989();while(!![]){try{const _0x16af8b=parseInt(_0x413898(0x172))/0x1*(parseInt(_0x413898(0x174))/0x2)+-parseInt(_0x413898(0x18d))/0x3*(parseInt(_0x413898(0x189))/0x4)+-parseInt(_0x413898(0x193))/0x5*(-parseInt(_0x413898(0x18a))/0x6)+-parseInt(_0x413898(0x187))/0x7*(parseInt(_0x413898(0x180))/0x8)+-parseInt(_0x413898(0x178))/0x9+parseInt(_0x413898(0x191))/0xa*(-parseInt(_0x413898(0x175))/0xb)+-parseInt(_0x413898(0x18e))/0xc*(-parseInt(_0x413898(0x18c))/0xd);if(_0x16af8b===_0x48114b)break;else _0x1d90de['push'](_0x1d90de['shift']());}catch(_0x4571cf){_0x1d90de['push'](_0x1d90de['shift']());}}}(a0_0x364d,0x9904f));import{mkdirSync,writeFileSync}from'node:fs';import a0_0x274274 from'node:path';import{getApiDomain}from'../constant/domain.js';function a0_0x406a(_0x44d86b,_0x38213b){_0x44d86b=_0x44d86b-0x170;const _0x364ddb=a0_0x364d();let _0x406ab8=_0x364ddb[_0x44d86b];return _0x406ab8;}import{logger}from'../utils/logger.js';import{platformFetch}from'../core/api-client.js';export async function fetchDatasetDoc(_0x96ade4){const _0x5e26c2=a0_0x406a,{appCode:_0x4d4daa,cookie:_0x29018e,datasetCode:_0x514160,datasetId:_0x46d8f8,extraParams:_0x56595b}=_0x96ade4,_0x6e5f14=getApiDomain()+_0x5e26c2(0x177),_0x37a663=await platformFetch(_0x6e5f14,{'method':_0x5e26c2(0x17f),'body':{'appCode':_0x4d4daa,'datasetCode':_0x514160,'datasetId':_0x46d8f8,..._0x56595b||{}},'cookie':_0x29018e,'label':_0x5e26c2(0x18b)+_0x514160+')'});if(!_0x37a663||typeof _0x37a663[_0x5e26c2(0x173)]!==_0x5e26c2(0x181))throw new Error(_0x5e26c2(0x196)+_0x514160+_0x5e26c2(0x186));return _0x37a663[_0x5e26c2(0x173)];}function delay(_0x20da9c){return new Promise(_0x3eaa4a=>setTimeout(_0x3eaa4a,_0x20da9c));}export async function generateDatasetDocs(_0x51a696,_0x348b78,_0x30dcb9,_0x578fe9=a0_0x24c5de(0x171),_0x4467bf,_0x1bdef9){const _0x3664bb=a0_0x24c5de;mkdirSync(_0x578fe9,{'recursive':!![]});const _0x5dde0c=[],_0x4fe8eb=_0x51a696['length'];console[_0x3664bb(0x188)]('\x0a'+_0x4fe8eb+_0x3664bb(0x170));for(let _0x2449ed=0x0;_0x2449ed<_0x51a696['length'];_0x2449ed++){const _0x3291e1=_0x51a696[_0x2449ed],_0x293d9e=_0x2449ed+0x1,_0x8090b2=_0x3291e1[_0x3664bb(0x17e)];try{console[_0x3664bb(0x188)]('['+_0x293d9e+'/'+_0x4fe8eb+_0x3664bb(0x185)+_0x8090b2+_0x3664bb(0x18f)+_0x3291e1['name']+')');if(_0x4467bf)_0x4467bf(_0x293d9e,_0x4fe8eb,_0x8090b2);const _0x5c4411=await fetchDatasetDoc({'appCode':_0x348b78,'cookie':_0x30dcb9,'datasetCode':_0x3291e1['datasetCode'],'datasetId':_0x3291e1['id'],'enableAI':![],'extraParams':_0x1bdef9}),_0x1ff8b0=a0_0x274274['join'](_0x578fe9,_0x8090b2+_0x3664bb(0x17a));writeFileSync(_0x1ff8b0,_0x5c4411,{'encoding':'utf8'}),console['log'](_0x3664bb(0x195)+_0x8090b2+_0x3664bb(0x17a)),logger[_0x3664bb(0x17d)](_0x3664bb(0x179),_0x3664bb(0x184)+_0x8090b2,undefined,{'datasetCode':_0x3291e1[_0x3664bb(0x182)],'datasetName':_0x3291e1[_0x3664bb(0x17b)],'filePath':_0x1ff8b0,'progress':_0x293d9e+'/'+_0x4fe8eb}),_0x5dde0c['push']({'datasetCode':_0x3291e1[_0x3664bb(0x182)],'datasetName':_0x3291e1[_0x3664bb(0x17b)],'filePath':_0x1ff8b0,'success':!![]});if(_0x293d9e<_0x4fe8eb)await delay(0x1388);}catch(_0x3f7e4d){const _0x44c8e3=_0x3f7e4d instanceof Error?_0x3f7e4d[_0x3664bb(0x194)]:String(_0x3f7e4d);console[_0x3664bb(0x188)]('✗\x20Failed:\x20'+_0x8090b2+_0x3664bb(0x192)+_0x44c8e3),logger[_0x3664bb(0x17c)]('api-doc',_0x3664bb(0x176)+_0x3291e1['datasetCode'],{'datasetCode':_0x3291e1[_0x3664bb(0x182)],'datasetName':_0x3291e1[_0x3664bb(0x17b)],'error':_0x44c8e3,'progress':_0x293d9e+'/'+_0x4fe8eb}),_0x5dde0c[_0x3664bb(0x183)]({'datasetCode':_0x3291e1[_0x3664bb(0x182)],'datasetName':_0x3291e1['name'],'filePath':'','success':![],'error':_0x44c8e3}),_0x293d9e<_0x4fe8eb&&(console['log'](_0x3664bb(0x190)),await delay(0xbb8));}}return _0x5dde0c;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x28c740,_0x374330){const _0x462920=a1_0x2a7d,_0xa874d1=_0x28c740();while(!![]){try{const _0x4f2dbe=-parseInt(_0x462920(0x160))/0x1+-parseInt(_0x462920(0x159))/0x2*(-parseInt(_0x462920(0x15d))/0x3)+-parseInt(_0x462920(0x15e))/0x4+-parseInt(_0x462920(0x156))/0x5*(-parseInt(_0x462920(0x154))/0x6)+parseInt(_0x462920(0x15a))/0x7*(-parseInt(_0x462920(0x15c))/0x8)+-parseInt(_0x462920(0x158))/0x9+-parseInt(_0x462920(0x151))/0xa*(-parseInt(_0x462920(0x15b))/0xb);if(_0x4f2dbe===_0x374330)break;else _0xa874d1['push'](_0xa874d1['shift']());}catch(_0x2b7a11){_0xa874d1['push'](_0xa874d1['shift']());}}}(a1_0x20bb,0x6c315));function a1_0x2a7d(_0x474f9c,_0x342b3d){_0x474f9c=_0x474f9c-0x150;const _0x20bb6a=a1_0x20bb();let _0x2a7df2=_0x20bb6a[_0x474f9c];return _0x2a7df2;}import{getApiDomain}from'../constant/domain.js';import{logger}from'../utils/logger.js';import{getEnv}from'../constant/env.js';import{platformFetch}from'../core/api-client.js';function cleanNewlines(_0x11169c){const _0xdbb156=a1_0x2a7d;return _0x11169c[_0xdbb156(0x15f)](/[\r\n]+/g,'\x20')[_0xdbb156(0x150)]();}function cleanDatasetName(_0x19de23){const _0x114cf5=a1_0x2a7d;if(!_0x19de23[_0x114cf5(0x155)])return _0x19de23;return{..._0x19de23,'name':cleanNewlines(_0x19de23[_0x114cf5(0x155)])};}export async function fetchModelList(_0x164fbc,_0x4b364e){const _0x122264=a1_0x2a7d,_0x2dfe8e=getEnv(),_0x5c63a5=getApiDomain()+_0x122264(0x163)+_0x164fbc+_0x122264(0x157);logger[_0x122264(0x153)]('fetch-model-list','正在从服务器拉取模型列表...\x20(环境:\x20'+_0x2dfe8e+')',{'apiUrl':_0x5c63a5});const _0x5aead0=await platformFetch(_0x5c63a5,{'cookie':_0x4b364e,'label':_0x122264(0x152)}),_0x1963ef=(_0x5aead0[_0x122264(0x161)]??[])['map'](cleanDatasetName);return{'configArray':_0x1963ef,'count':_0x1963ef[_0x122264(0x162)]};}function a1_0x20bb(){const _0x5f10d7=['2303IHojLL','1903GTzuzS','19864FzhzZn','104997lVMLPi','710540XlgvVA','replace','111995VWRXwh','configArray','length','/api/node-toolbox/dataset/model-list?appcode=','trim','57220vNhLBr','Fetch\x20datasets','info','687624PdyAUD','name','35IzAQrI','&otype=array','5016879pxoEFC','18YnOQGy'];a1_0x20bb=function(){return _0x5f10d7;};return a1_0x20bb();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x2c2a0a,_0xc18085){const _0x3fbf68=a2_0x9b63,_0x14e596=_0x2c2a0a();while(!![]){try{const _0x5306df=parseInt(_0x3fbf68(0x188))/0x1+parseInt(_0x3fbf68(0x18f))/0x2+-parseInt(_0x3fbf68(0x198))/0x3+parseInt(_0x3fbf68(0x19d))/0x4*(parseInt(_0x3fbf68(0x195))/0x5)+-parseInt(_0x3fbf68(0x18b))/0x6+parseInt(_0x3fbf68(0x189))/0x7+parseInt(_0x3fbf68(0x196))/0x8;if(_0x5306df===_0xc18085)break;else _0x14e596['push'](_0x14e596['shift']());}catch(_0x46250a){_0x14e596['push'](_0x14e596['shift']());}}}(a2_0x202e,0x591c8));import a2_0x35c3e6 from'prettier';import{mkdirSync,writeFileSync,readFileSync}from'node:fs';import a2_0x470996 from'node:path';function a2_0x202e(){const _0x34f25d=['typescript','4043934sdWIIU','name','resolve','API\x20文件生成成功!','279750mbUPKW','forEach','push','join','\x20config\x20set\x20app\x20<value>`','init-api','425MZTSDa','4837712QajJkm','api','1344924uxBbDC','../..','LOVRABET','{\x20apiConfigName:\x20',',\x20env:\x20\x22','29476opsRDw','toUpperCase','alias','key','\x22\x20}','utf8','-client','{\x20apiConfigName:\x20\x22','.ts','client.ts.tpl','datasetCode','tableName','replaceApiContent','format','CONFIG_NAMES.DEFAULT','Please\x20configure\x20app\x20code\x20first\x20via\x20`','4447aLYNpb','783272chgVrr'];a2_0x202e=function(){return _0x34f25d;};return a2_0x202e();}import{fileURLToPath}from'node:url';import{TemplateReplacer}from'../utils/template-replacer.js';import{CLI_BIN_NAME}from'../constant/cli.js';function a2_0x9b63(_0x411b28,_0x1ea741){_0x411b28=_0x411b28-0x181;const _0x202e1e=a2_0x202e();let _0x9b6317=_0x202e1e[_0x411b28];return _0x9b6317;}import{logger}from'../utils/logger.js';export async function generateApiFile(_0x34b0a0,_0x2ba0b1,_0x123877,_0x1a81fa,_0xcdbfa1,_0x8b5e3d,_0x15eb5a){const _0x261781=a2_0x9b63;if(!_0x123877)throw new Error(_0x261781(0x187)+CLI_BIN_NAME+_0x261781(0x193));const _0x1b1b07=_0x1a81fa&&!_0x15eb5a,_0x46b857=_0x15eb5a||_0x123877,_0x323145=_0x1b1b07?_0x261781(0x186):'\x22'+_0x46b857+'\x22',_0x6a3fb7=_0xcdbfa1!=='production';let _0x47bac1;if(_0x1b1b07)_0x6a3fb7?_0x47bac1=_0x261781(0x19b)+_0x323145+_0x261781(0x19c)+_0xcdbfa1+_0x261781(0x1a1):_0x47bac1='';else{const _0x88a416=_0x6a3fb7?_0x261781(0x19c)+_0xcdbfa1+'\x22':'';_0x47bac1=_0x261781(0x1a4)+_0x46b857+'\x22'+_0x88a416+'\x20}';}const _0x42f354=_0x2ba0b1?_0x2ba0b1+'-api':_0x261781(0x197),_0x527f94=_0x2ba0b1?_0x2ba0b1+_0x261781(0x1a3):'client',_0xcb2f78=_0x2ba0b1&&!/^app-[a-f0-9]+$/i['test'](_0x2ba0b1)?_0x2ba0b1['replace'](/-/g,'_')[_0x261781(0x19e)]():_0x261781(0x19a),_0x499189=[];_0x34b0a0[_0x261781(0x190)](_0x6c8b4f=>{const _0x4d3810=_0x261781;_0x499189[_0x4d3810(0x191)]({'datasetCode':_0x6c8b4f[_0x4d3810(0x182)],'tableName':_0x6c8b4f[_0x4d3810(0x183)],'name':_0x6c8b4f[_0x4d3810(0x18c)]||'','alias':_0x6c8b4f[_0x4d3810(0x19f)]||_0x6c8b4f[_0x4d3810(0x1a0)]});});const _0x47c4c6=fileURLToPath(import.meta.url),_0x1cfca5=a2_0x470996[_0x261781(0x18d)](a2_0x470996['dirname'](_0x47c4c6),_0x261781(0x199)),_0x58133f=a2_0x470996[_0x261781(0x192)](_0x1cfca5,'templates/generate-api'),_0x5cdea0=a2_0x470996[_0x261781(0x192)](_0x58133f,'api.ts.tpl'),_0x128c03=a2_0x470996[_0x261781(0x192)](_0x58133f,_0x261781(0x181)),_0x3617bb=_0x8b5e3d;mkdirSync(_0x3617bb,{'recursive':!![]});const _0x1ba466=_0x499189[0x0]?.[_0x261781(0x19f)],_0x12aed9=readFileSync(_0x5cdea0,_0x261781(0x1a2)),_0x522ea4=TemplateReplacer['replaceApiContent'](_0x12aed9,_0x123877,_0x499189,_0x1ba466,_0x42f354,_0x323145,undefined,_0xcb2f78),_0x28f0ec=await a2_0x35c3e6['format'](_0x522ea4,{'parser':_0x261781(0x18a)}),_0x562110=a2_0x470996['join'](_0x3617bb,_0x42f354+_0x261781(0x1a5));writeFileSync(_0x562110,_0x28f0ec,{'encoding':'utf8'});const _0x46593c=readFileSync(_0x128c03,_0x261781(0x1a2)),_0x28d9d6=TemplateReplacer[_0x261781(0x184)](_0x46593c,_0x123877,_0x499189,_0x1ba466,_0x42f354,_0x323145,_0x47bac1,_0xcb2f78),_0x4c4bbe=await a2_0x35c3e6[_0x261781(0x185)](_0x28d9d6,{'parser':_0x261781(0x18a)}),_0x1d48d2=a2_0x470996[_0x261781(0x192)](_0x3617bb,_0x527f94+_0x261781(0x1a5));writeFileSync(_0x1d48d2,_0x4c4bbe,{'encoding':_0x261781(0x1a2)});const _0x3a3184=_0x499189['length'];return logger['success'](_0x261781(0x194),_0x261781(0x18e),undefined,{'apiFile':_0x562110,'clientFile':_0x1d48d2,'modelCount':_0x3a3184,'configName':_0x323145}),{'modelCount':_0x3a3184,'apiFilePath':_0x562110,'clientFilePath':_0x1d48d2,'configName':_0x323145};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x16ce0c,_0x4bf319){const _0x3ffe74=a3_0x391c,_0x2e238e=_0x16ce0c();while(!![]){try{const _0x333dde=parseInt(_0x3ffe74(0x187))/0x1+-parseInt(_0x3ffe74(0x191))/0x2*(-parseInt(_0x3ffe74(0x18a))/0x3)+-parseInt(_0x3ffe74(0x183))/0x4*(-parseInt(_0x3ffe74(0x185))/0x5)+-parseInt(_0x3ffe74(0x190))/0x6*(-parseInt(_0x3ffe74(0x188))/0x7)+-parseInt(_0x3ffe74(0x186))/0x8+-parseInt(_0x3ffe74(0x18c))/0x9*(-parseInt(_0x3ffe74(0x189))/0xa)+-parseInt(_0x3ffe74(0x184))/0xb*(parseInt(_0x3ffe74(0x18e))/0xc);if(_0x333dde===_0x4bf319)break;else _0x2e238e['push'](_0x2e238e['shift']());}catch(_0x917baf){_0x2e238e['push'](_0x2e238e['shift']());}}}(a3_0x4a03,0x4e22d));import{getIsSessionValid}from'./is-session-valid.js';function a3_0x4a03(){const _0x298b23=['start','Logging\x20in...\x20Please\x20complete\x20login\x20in\x20your\x20browser.','log','1596452pEbdgu','8339474IlFxIS','5ccoPTr','2822296PmyRuB','256010evYdpx','1248590CAroAc','10RxXYUc','54wItqoE','!\x20Login\x20failed.','1356093WIStYO','√\x20Valid\x20session\x20detected,\x20no\x20login\x20required.','12Hdalps','stop','6zyWPIT','49644tqviMf','*\x20Login\x20successful!'];a3_0x4a03=function(){return _0x298b23;};return a3_0x4a03();}function a3_0x391c(_0x289e08,_0x377bf4){_0x289e08=_0x289e08-0x182;const _0x4a034d=a3_0x4a03();let _0x391c89=_0x4a034d[_0x289e08];return _0x391c89;}import{authServer}from'./auth-server.js';import{confirm}from'@inquirer/prompts';import a3_0x494dc5 from'ora';export async function runAuthServer(){const _0x2def01=a3_0x391c,_0x4d4420=await getIsSessionValid();if(_0x4d4420){console[_0x2def01(0x182)](_0x2def01(0x18d));return;}const _0xc13bab=await confirm({'message':'No\x20valid\x20session.\x20Login\x20now?','default':!![]});if(!_0xc13bab)return;const _0x163195=a3_0x494dc5(_0x2def01(0x194))[_0x2def01(0x193)](),_0x348f52=await authServer({'silent':!![]});_0x163195[_0x2def01(0x18f)](),_0x348f52?console['log'](_0x2def01(0x192)):console['log'](_0x2def01(0x18b));}
|
package/lib/auth/auth-server.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a4_0x1f959d=a4_0x4d20;(function(_0x224762,_0x263d3b){const _0x5d0cdb=a4_0x4d20,_0x343af7=_0x224762();while(!![]){try{const _0x201d94=parseInt(_0x5d0cdb(0x118))/0x1+parseInt(_0x5d0cdb(0x11e))/0x2+-parseInt(_0x5d0cdb(0x126))/0x3*(parseInt(_0x5d0cdb(0x110))/0x4)+parseInt(_0x5d0cdb(0x11f))/0x5+-parseInt(_0x5d0cdb(0x12e))/0x6*(parseInt(_0x5d0cdb(0x11c))/0x7)+parseInt(_0x5d0cdb(0x127))/0x8*(-parseInt(_0x5d0cdb(0x12b))/0x9)+parseInt(_0x5d0cdb(0x128))/0xa*(parseInt(_0x5d0cdb(0x115))/0xb);if(_0x201d94===_0x263d3b)break;else _0x343af7['push'](_0x343af7['shift']());}catch(_0x240924){_0x343af7['push'](_0x343af7['shift']());}}}(a4_0x58a0,0x4f6d8));import{writeFileSync}from'node:fs';import a4_0xd11085 from'node:https';import{getUserDomain}from'../constant/domain.js';function a4_0x4d20(_0x543ed4,_0x34a1cc){_0x543ed4=_0x543ed4-0x10a;const _0x58a0bf=a4_0x58a0();let _0x4d2043=_0x58a0bf[_0x543ed4];return _0x4d2043;}function a4_0x58a0(){const _0x104ea4=['<span\x20id=\x22t\x22>5</span>','</div>\x0a\x20\x20<div\x20id=\x22manualMsg\x22\x20style=\x22display:none;margin-top:10px;color:#d00;\x22>','catch','utf-8','darwin','🔗\x20Please\x20copy\x20the\x20login\x20URL\x20into\x20your\x20browser:','</title></head>\x0a<body>\x0a\x20\x20<div>','16jRQnkq','object','listen','🌐\x20Attempting\x20to\x20open\x20browser\x20automatically...','💡\x20If\x20the\x20browser\x20does\x20not\x20open\x20automatically,\x20copy\x20the\x20login\x20URL\x20above\x20into\x20your\x20browser.','583GkOhmx','/api/auth/get-session','⚠️\x20\x20Failed\x20to\x20open\x20browser\x20automatically','84238tqXmnO','https://g.yuntooai.com/cert/lovrabet-dev.json','/sign-in?redirect=','writeHead','1645rhnqZo','xdg-open\x20\x22','622106JLngoA','1331850Izydtn','https://dev.lovrabet.com:','session','<!doctype\x20html>\x0a<html>\x0a<head><meta\x20charset=\x22utf-8\x22><title>','createServer','address','port','191859XnpBTk','24NmUDRk','39110UroXoP','\x20seconds.','isAuth','116793yAeOHo','win32','🔐\x20Starting\x20login\x20service...','6354mhFIWi','cookie','user','silent','json','close','error','then','Login\x20successful.\x20Please\x20return\x20to\x20the\x20CLI\x20to\x20continue.\x20This\x20window\x20will\x20close\x20in\x20','log','</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>'];a4_0x58a0=function(){return _0x104ea4;};return a4_0x58a0();}import{exec}from'node:child_process';import{getIsSessionValid}from'./is-session-valid.js';import{cookieFile}from'./constant.js';export async function authServer(_0x2b9364){const _0x25457c=a4_0x4d20,_0x36c4be=_0x2b9364?.[_0x25457c(0x131)]||![];if(await getIsSessionValid())return!![];const _0x48e9ea=await(await fetch(_0x25457c(0x119)))[_0x25457c(0x132)]();return new Promise(async(_0x10d103,_0x447ce9)=>{const _0x296a0b=_0x25457c;let _0x194957=0x0;const _0x17cddd=a4_0xd11085[_0x296a0b(0x123)](_0x48e9ea,async(_0x16807c,_0x1c9c71)=>{const _0xde218a=_0x296a0b,_0x5c7fe2=getUserDomain(),_0x59f277=_0x16807c['headers'][_0xde218a(0x12f)]||'',_0x41fd52=await fetch(_0x5c7fe2+_0xde218a(0x116),{'headers':{'cookie':_0x59f277}})['then'](_0x4bd1ae=>_0x4bd1ae[_0xde218a(0x132)]()),_0xadb839=_0x41fd52&&_0x41fd52[_0xde218a(0x121)]&&_0x41fd52[_0xde218a(0x130)];if(_0xadb839){writeFileSync(cookieFile,_0x59f277,_0xde218a(0x10c)),_0x10d103(!![]);const _0x521ec2='Login\x20Successful',_0x39d33e=_0xde218a(0x136)+_0xde218a(0x139)+_0xde218a(0x129),_0x5317f3='Unable\x20to\x20close\x20automatically.\x20Please\x20close\x20this\x20tab\x20or\x20window\x20manually.',_0x42eba4=_0xde218a(0x122)+_0x521ec2+_0xde218a(0x10f)+_0x39d33e+_0xde218a(0x10a)+_0x5317f3+_0xde218a(0x138);_0x1c9c71[_0xde218a(0x11b)](0xc8,{'Content-Type':'text/html;\x20charset=utf-8'}),_0x1c9c71['end'](_0x42eba4),_0x17cddd[_0xde218a(0x133)]();}else{const _0x565992=''+encodeURIComponent(_0xde218a(0x120)+_0x194957);_0x1c9c71[_0xde218a(0x11b)](0x12e,{'location':_0x5c7fe2+_0xde218a(0x11a)+_0x565992}),_0x1c9c71['end']();return;}});_0x17cddd[_0x296a0b(0x112)](0x0,'127.0.0.1',()=>{const _0x16f3f4=_0x296a0b,_0x416cd7=_0x17cddd[_0x16f3f4(0x124)]();_0x194957=typeof _0x416cd7===_0x16f3f4(0x111)&&_0x416cd7?_0x416cd7[_0x16f3f4(0x125)]:Number(_0x416cd7);const _0x5a48fc=_0x16f3f4(0x120)+_0x194957;!_0x36c4be&&(console[_0x16f3f4(0x137)](_0x16f3f4(0x12d)),console[_0x16f3f4(0x137)]('📍\x20Login\x20URL:',_0x5a48fc),console[_0x16f3f4(0x137)](_0x16f3f4(0x113)),console['log'](''),console[_0x16f3f4(0x137)](_0x16f3f4(0x114)),console[_0x16f3f4(0x137)]('')),openInBrowser(_0x5a48fc)[_0x16f3f4(0x135)](_0x4c4a4d=>{const _0x12af17=_0x16f3f4;!_0x36c4be&&(_0x4c4a4d?console[_0x12af17(0x137)]('✅\x20Browser\x20opened.\x20Please\x20complete\x20login\x20in\x20the\x20browser.'):(console[_0x12af17(0x137)](_0x12af17(0x117)),console[_0x12af17(0x137)]('🔗\x20Please\x20copy\x20the\x20login\x20URL\x20into\x20your\x20browser:',_0x5a48fc)),console[_0x12af17(0x137)](''));})[_0x16f3f4(0x10b)](()=>{const _0x15c071=_0x16f3f4;!_0x36c4be&&(console[_0x15c071(0x137)](_0x15c071(0x117)),console[_0x15c071(0x137)](_0x15c071(0x10e),_0x5a48fc),console[_0x15c071(0x137)](''));});}),_0x17cddd['on'](_0x296a0b(0x134),_0x518da3=>{!_0x36c4be&&console['error']('Auth\x20server\x20error:',_0x518da3),_0x447ce9(_0x518da3);});});}function openInBrowser(_0x4de68b){return new Promise(_0xc0c757=>{const _0x589ee9=a4_0x4d20,_0x2a0b1f=process['platform'];let _0xc95939;if(_0x2a0b1f===_0x589ee9(0x12c))_0xc95939='cmd\x20/c\x20start\x20\x22\x22\x20\x22'+_0x4de68b+'\x22';else _0x2a0b1f===_0x589ee9(0x10d)?_0xc95939='open\x20\x22'+_0x4de68b+'\x22':_0xc95939=_0x589ee9(0x11d)+_0x4de68b+'\x22';exec(_0xc95939,_0x5029da=>{_0x5029da?_0xc0c757(![]):_0xc0c757(!![]);});});}if(import.meta.main){const isAuth=await authServer();console[a4_0x1f959d(0x137)](a4_0x1f959d(0x12a),isAuth);}
|
package/lib/auth/constant.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a5_0x201f4a=a5_0x1292;(function(_0x4c2c6a,_0x5eb630){const _0xffedbc=a5_0x1292,_0x365ea6=_0x4c2c6a();while(!![]){try{const _0x2d09d3=parseInt(_0xffedbc(0xc8))/0x1+parseInt(_0xffedbc(0xc2))/0x2*(-parseInt(_0xffedbc(0xc5))/0x3)+-parseInt(_0xffedbc(0xc6))/0x4*(-parseInt(_0xffedbc(0xc9))/0x5)+parseInt(_0xffedbc(0xc7))/0x6*(parseInt(_0xffedbc(0xc1))/0x7)+parseInt(_0xffedbc(0xca))/0x8+parseInt(_0xffedbc(0xcb))/0x9*(parseInt(_0xffedbc(0xc3))/0xa)+-parseInt(_0xffedbc(0xcd))/0xb;if(_0x2d09d3===_0x5eb630)break;else _0x365ea6['push'](_0x365ea6['shift']());}catch(_0x3f7c41){_0x365ea6['push'](_0x365ea6['shift']());}}}(a5_0x4f4b,0x31769));import{mkdirSync}from'node:fs';import{homedir}from'node:os';function a5_0x4f4b(){const _0x998c25=['189446jkjaZA','10NsjOcY','2835440mrHnDo','3103227KySNhj','.lovrabet','11124630aFhIEQ','7sdJQJO','238Zqhfhx','10lGlrPu','cookie','5253OtDhLE','489428XIWcBx','1733442KSspXS'];a5_0x4f4b=function(){return _0x998c25;};return a5_0x4f4b();}import{join}from'node:path';export const configDir=join(homedir(),a5_0x201f4a(0xcc));export const cookieFile=join(configDir,a5_0x201f4a(0xc4));function a5_0x1292(_0x44b120,_0x4aafd6){_0x44b120=_0x44b120-0xc1;const _0x4f4b64=a5_0x4f4b();let _0x129224=_0x4f4b64[_0x44b120];return _0x129224;}mkdirSync(configDir,{'recursive':!![]});
|
package/lib/auth/get-cookie.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x190207,_0x4afc1a){var _0x185742=a6_0x59b7,_0x4a1766=_0x190207();while(!![]){try{var _0x5a8a0c=-parseInt(_0x185742(0xae))/0x1*(parseInt(_0x185742(0xad))/0x2)+-parseInt(_0x185742(0xac))/0x3+parseInt(_0x185742(0xa9))/0x4*(parseInt(_0x185742(0xaa))/0x5)+-parseInt(_0x185742(0xa8))/0x6+-parseInt(_0x185742(0xaf))/0x7+-parseInt(_0x185742(0xab))/0x8+parseInt(_0x185742(0xa6))/0x9;if(_0x5a8a0c===_0x4afc1a)break;else _0x4a1766['push'](_0x4a1766['shift']());}catch(_0x304a8d){_0x4a1766['push'](_0x4a1766['shift']());}}}(a6_0x297c,0x78453));function a6_0x297c(){var _0x3a844d=['1759809uCTXcH','2fXfxKd','290846vakXAD','4061666eCmNcn','22400919WhekRp','utf-8','404442LdkuMy','138096PDhyfW','20RNpNKg','4874928UqTQyS'];a6_0x297c=function(){return _0x3a844d;};return a6_0x297c();}function a6_0x59b7(_0xcee13c,_0x533027){_0xcee13c=_0xcee13c-0xa6;var _0x297cd2=a6_0x297c();var _0x59b7c1=_0x297cd2[_0xcee13c];return _0x59b7c1;}import{readFileSync}from'node:fs';import{cookieFile}from'./constant.js';export function getCookie(){var _0x329282=a6_0x59b7;try{return readFileSync(cookieFile,_0x329282(0xa7));}catch{}return'';}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a7_0x1b71(_0x5dba68,_0x1f44ba){_0x5dba68=_0x5dba68-0x18e;const _0x44d461=a7_0x44d4();let _0x1b71fa=_0x44d461[_0x5dba68];return _0x1b71fa;}(function(_0x470473,_0x4fcd94){const _0xd8a40d=a7_0x1b71,_0x108373=_0x470473();while(!![]){try{const _0xb022e6=parseInt(_0xd8a40d(0x19c))/0x1*(-parseInt(_0xd8a40d(0x19d))/0x2)+-parseInt(_0xd8a40d(0x199))/0x3*(parseInt(_0xd8a40d(0x18e))/0x4)+-parseInt(_0xd8a40d(0x19b))/0x5*(parseInt(_0xd8a40d(0x19a))/0x6)+parseInt(_0xd8a40d(0x190))/0x7+-parseInt(_0xd8a40d(0x196))/0x8+parseInt(_0xd8a40d(0x192))/0x9+-parseInt(_0xd8a40d(0x195))/0xa*(-parseInt(_0xd8a40d(0x194))/0xb);if(_0xb022e6===_0x4fcd94)break;else _0x108373['push'](_0x108373['shift']());}catch(_0xf483d8){_0x108373['push'](_0x108373['shift']());}}}(a7_0x44d4,0xe93d6));import{existsSync,readFileSync}from'node:fs';import{getUserDomain}from'../constant/domain.js';import{cookieFile}from'./constant.js';export async function getSessionUserInfo(){const _0x20c944=a7_0x1b71;try{if(!existsSync(cookieFile))return null;const _0x4a3750=readFileSync(cookieFile,_0x20c944(0x193)),_0x40c088=await fetch(getUserDomain()+_0x20c944(0x191),{'headers':{'cookie':_0x4a3750}});if(!_0x40c088['ok'])return null;const _0x257759=await _0x40c088[_0x20c944(0x198)]();if(!_0x257759[_0x20c944(0x18f)]||!_0x257759[_0x20c944(0x197)])return null;return _0x257759;}catch{return null;}}function a7_0x44d4(){const _0x171f40=['json','3BFpolG','18ZhhVnf','600665MaEGUJ','1QgrtFy','3494482HnEbxc','6648344ZlIWBM','session','765254wumjPZ','/api/auth/get-session','4815126PdGvDk','utf-8','23991XiFCeD','19770ZkLVsp','1848776NqOxZO','user'];a7_0x44d4=function(){return _0x171f40;};return a7_0x44d4();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x52e866,_0x5865ee){const _0x431473=a8_0x4afe,_0x226930=_0x52e866();while(!![]){try{const _0x4c274a=-parseInt(_0x431473(0x165))/0x1+-parseInt(_0x431473(0x162))/0x2+-parseInt(_0x431473(0x167))/0x3*(parseInt(_0x431473(0x168))/0x4)+parseInt(_0x431473(0x16f))/0x5*(-parseInt(_0x431473(0x161))/0x6)+-parseInt(_0x431473(0x16c))/0x7*(-parseInt(_0x431473(0x166))/0x8)+parseInt(_0x431473(0x163))/0x9*(parseInt(_0x431473(0x16a))/0xa)+parseInt(_0x431473(0x164))/0xb;if(_0x4c274a===_0x5865ee)break;else _0x226930['push'](_0x226930['shift']());}catch(_0x1536b7){_0x226930['push'](_0x226930['shift']());}}}(a8_0x3b2d,0xcb503));import{existsSync,readFileSync}from'node:fs';import{getUserDomain}from'../constant/domain.js';function a8_0x4afe(_0x4c2411,_0xd27b6a){_0x4c2411=_0x4c2411-0x161;const _0x3b2d27=a8_0x3b2d();let _0x4afec3=_0x3b2d27[_0x4c2411];return _0x4afec3;}import{cookieFile}from'./constant.js';function a8_0x3b2d(){const _0x2b506b=['user','1225IRIZVN','/api/auth/get-session','json','2265iBLPxd','20298ycgGeB','2392492XXfbHm','20421hWyCev','31409554DROmpW','5281gWbuNP','16304CknUtT','564tAzRlR','14708mGWkUl','utf-8','4610yPINRd'];a8_0x3b2d=function(){return _0x2b506b;};return a8_0x3b2d();}export async function getIsSessionValid(){const _0x4ce9e1=a8_0x4afe;try{if(!existsSync(cookieFile))return![];const _0x94b2b5=readFileSync(cookieFile,_0x4ce9e1(0x169)),_0x24ca1e=await fetch(getUserDomain()+_0x4ce9e1(0x16d),{'headers':{'cookie':_0x94b2b5}})['then'](_0x151cf1=>_0x151cf1[_0x4ce9e1(0x16e)]());return _0x24ca1e&&_0x24ca1e['session']&&_0x24ca1e[_0x4ce9e1(0x16b)];}catch{}return![];}
|
package/lib/auth/logout.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x528780,_0x25149b){var _0x45deeb=a9_0x168e,_0x58d715=_0x528780();while(!![]){try{var _0xa71400=-parseInt(_0x45deeb(0x1fa))/0x1*(parseInt(_0x45deeb(0x1f9))/0x2)+-parseInt(_0x45deeb(0x1ec))/0x3*(-parseInt(_0x45deeb(0x1ed))/0x4)+parseInt(_0x45deeb(0x1f1))/0x5*(-parseInt(_0x45deeb(0x1f3))/0x6)+-parseInt(_0x45deeb(0x1f5))/0x7*(parseInt(_0x45deeb(0x1f4))/0x8)+-parseInt(_0x45deeb(0x1fb))/0x9*(parseInt(_0x45deeb(0x1f0))/0xa)+-parseInt(_0x45deeb(0x1f8))/0xb*(parseInt(_0x45deeb(0x1ee))/0xc)+parseInt(_0x45deeb(0x1f6))/0xd;if(_0xa71400===_0x25149b)break;else _0x58d715['push'](_0x58d715['shift']());}catch(_0x4f7a1a){_0x58d715['push'](_0x58d715['shift']());}}}(a9_0x1b0e,0xb9115));function a9_0x1b0e(){var _0x58a275=['log','17193XhdRTD','43612eSRWIm','59ahWIjZ','9441fyrdDU','3fQlsOd','5938748RKiUhr','1704yAOupt','!\x20Not\x20logged\x20in','220aIhaol','10etHfgA','✓\x20Logged\x20out','3706482zzasSf','1504712STVaUO','7YjFWML','28970643MqKgIV'];a9_0x1b0e=function(){return _0x58a275;};return a9_0x1b0e();}function a9_0x168e(_0xdce01,_0x3aa457){_0xdce01=_0xdce01-0x1ec;var _0x1b0eec=a9_0x1b0e();var _0x168e51=_0x1b0eec[_0xdce01];return _0x168e51;}import{unlinkSync,existsSync}from'node:fs';import{cookieFile}from'./constant.js';export function logout(){var _0x4b2bd5=a9_0x168e;existsSync(cookieFile)?(unlinkSync(cookieFile),console[_0x4b2bd5(0x1f7)](_0x4b2bd5(0x1f2))):console['log'](_0x4b2bd5(0x1ef));}
|
package/lib/cli-flags.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0xe4af3b,_0x5806db){const _0x414fb9=a10_0x47c7,_0x38cc4e=_0xe4af3b();while(!![]){try{const _0x302b9c=-parseInt(_0x414fb9(0x1b8))/0x1+-parseInt(_0x414fb9(0x1ba))/0x2*(-parseInt(_0x414fb9(0x1bd))/0x3)+-parseInt(_0x414fb9(0x1b9))/0x4+-parseInt(_0x414fb9(0x1bc))/0x5+parseInt(_0x414fb9(0x1b5))/0x6+parseInt(_0x414fb9(0x1b7))/0x7*(parseInt(_0x414fb9(0x1b6))/0x8)+parseInt(_0x414fb9(0x1b4))/0x9*(parseInt(_0x414fb9(0x1bb))/0xa);if(_0x302b9c===_0x5806db)break;else _0x38cc4e['push'](_0x38cc4e['shift']());}catch(_0xe71eee){_0x38cc4e['push'](_0x38cc4e['shift']());}}}(a10_0x1ded,0xb8848));function a10_0x1ded(){const _0x3196e5=['3086118qHaxte','1035864HfNHIj','8121328OrzpIv','7cPLGFK','101095npqUub','4803816gSsuBW','162YLadgM','50WvbrxM','5075365eJjiMm','6318zKadzw'];a10_0x1ded=function(){return _0x3196e5;};return a10_0x1ded();}function a10_0x47c7(_0x3a6d86,_0x2a4c82){_0x3a6d86=_0x3a6d86-0x1b4;const _0x1ded0f=a10_0x1ded();let _0x47c746=_0x1ded0f[_0x3a6d86];return _0x47c746;}export const dynamicCliFlags={'enableBffSave':{'type':'boolean'}};
|
package/lib/cli.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
const
|
|
2
|
+
const a11_0x2cf8ab=a11_0x39cb;(function(_0x645ece,_0x1114e6){const _0x32e413=a11_0x39cb,_0x834c39=_0x645ece();while(!![]){try{const _0x35c3c7=-parseInt(_0x32e413(0xf6))/0x1*(-parseInt(_0x32e413(0x108))/0x2)+-parseInt(_0x32e413(0xf7))/0x3+-parseInt(_0x32e413(0x116))/0x4+parseInt(_0x32e413(0xf0))/0x5*(-parseInt(_0x32e413(0xf9))/0x6)+parseInt(_0x32e413(0xec))/0x7+parseInt(_0x32e413(0x10b))/0x8*(-parseInt(_0x32e413(0x112))/0x9)+parseInt(_0x32e413(0xf4))/0xa;if(_0x35c3c7===_0x1114e6)break;else _0x834c39['push'](_0x834c39['shift']());}catch(_0x27039a){_0x834c39['push'](_0x834c39['shift']());}}}(a11_0x2f69,0xd748b));import a11_0x423495 from'meow';function a11_0x39cb(_0x2d4862,_0x303181){_0x2d4862=_0x2d4862-0xe6;const _0x2f6908=a11_0x2f69();let _0x39cb84=_0x2f6908[_0x2d4862];return _0x39cb84;}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';function a11_0x2f69(){const _0x2b475e=['1JQGONR','1742190uAYiKd','command','6vdoRpu','env','\x20\x20Please\x20update\x20your\x20command\x20and\x20try\x20again.\x0a','Unexpected\x20error:','\x0aCancelled.\x0a','appCode','./context.js','defaultCommand','apiDir','format','now','Hint:\x20','riskLevel','wildcardDef','pageSize','125966xWPrUN','stderr','error','651272mDClLm','`\x20in\x20v2.0.\x0a','apiDomain','cancelled','explicitAppName','input','global','144iUuWKu','unknownCommand','help','verbose','3700440tvBnRG','service','runtimeDomain','message','hint','dynamicCliFlags','exitCode','log','10036859pCGFDP','raw','userDomain','unknown','1188835bnpSIo','slice','write','./constant/env.js','24311340iBKKbK','ExitPromptError'];a11_0x2f69=function(){return _0x2b475e;};return a11_0x2f69();}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_0xdd886}from'./utils/is-non-interactive.js';import{registerOtelShutdownOnExit,exitWithOtelShutdown}from'./telemetry/register-otel-exit-shutdown.js';let dynamicCliFlags=null;try{dynamicCliFlags=(await import('./cli-flags.js'))[a11_0x2cf8ab(0xe9)];}catch{}const helpText=generateFullHelp(),cliVersion=GIT_COMMIT!==a11_0x2cf8ab(0xef)?VERSION+'\x20('+GIT_COMMIT+',\x20'+BUILD_TIME[a11_0x2cf8ab(0xf1)](0x0,0xa)+')':VERSION,cli=a11_0x423495(helpText,{'importMeta':import.meta,'version':cliVersion,'flags':{...buildMeowFlags(),...dynamicCliFlags||{}}});registerOtelShutdownOnExit(),await run();async function run(){const _0x38ca33=a11_0x2cf8ab;let _0x341f01=cli[_0x38ca33(0x110)][0x0],_0x5073cf=cli['input'][0x1];const _0x325b9a=cli['flags'];if(!_0x341f01){await reportCliHelpTrace(_0x38ca33(0x111)),showHelp();return;}const _0x48dbb4=deprecatedAliases[_0x341f01];if(_0x48dbb4&&!isKnownService(_0x341f01)){const _0x3b45d3=_0x5073cf?CLI_BIN_NAME+'\x20'+_0x341f01+'\x20'+_0x5073cf:CLI_BIN_NAME+'\x20'+_0x341f01,_0x25ccd5=CLI_BIN_NAME+'\x20'+_0x48dbb4[_0x38ca33(0x117)]+'\x20'+_0x48dbb4[_0x38ca33(0xf8)];console[_0x38ca33(0x10a)]('⚠\x20`'+_0x3b45d3+'`\x20has\x20been\x20moved\x20to\x20`'+_0x25ccd5+_0x38ca33(0x10c)+_0x38ca33(0xfb)),await exitWithOtelShutdown(0x1);}if(!isKnownService(_0x341f01)){await reportCliHelpTrace('unknown_service',{'service':_0x341f01}),showHelp();return;}const _0x1c3251=getServiceEntry(_0x341f01);if(_0x325b9a[_0x38ca33(0xfa)]&&typeof _0x325b9a[_0x38ca33(0xfa)]==='string'){const {initEnv:_0x1ff4ae}=await import(_0x38ca33(0xf3));_0x1ff4ae(_0x325b9a['env']);}const {buildConfigFromFlags:_0x322fab}=await import(_0x38ca33(0xff)),_0x497888=_0x322fab(_0x325b9a);if(!_0x325b9a[_0x38ca33(0xfa)]&&_0x497888['env']){const {initEnv:_0x14256e}=await import(_0x38ca33(0xf3));_0x14256e(_0x497888['env']);}if(_0x497888['raw']?.[_0x38ca33(0x10d)]||_0x497888[_0x38ca33(0xed)]?.[_0x38ca33(0xee)]||_0x497888[_0x38ca33(0xed)]?.[_0x38ca33(0xe6)]){const {initDomains:_0x137c34}=await import('./constant/domain.js');_0x137c34({'apiDomain':_0x497888[_0x38ca33(0xed)][_0x38ca33(0x10d)]||undefined,'userDomain':_0x497888['raw'][_0x38ca33(0xee)]||undefined,'runtimeDomain':_0x497888[_0x38ca33(0xed)][_0x38ca33(0xe6)]||undefined});}if(!_0x5073cf){if(_0x1c3251[_0x38ca33(0x100)])_0x5073cf=_0x1c3251[_0x38ca33(0x100)];else{if(_0x1c3251['wildcardDef']){if(_0x325b9a[_0x38ca33(0x114)]){console[_0x38ca33(0xeb)](generateCommandHelp(_0x1c3251[_0x38ca33(0x106)]));return;}await dispatchDeclarative(_0x1c3251[_0x38ca33(0x106)],_0x341f01,'',[],_0x325b9a,_0x497888);return;}else{printServiceHelp(_0x341f01);return;}}}if(_0x325b9a[_0x38ca33(0x114)]&&!findDefinition(_0x341f01,_0x5073cf)){printServiceHelp(_0x341f01);return;}{let _0x3c63cd=findDefinition(_0x341f01,_0x5073cf),_0x1222d8=cli[_0x38ca33(0x110)][_0x38ca33(0xf1)](0x2);if(!_0x3c63cd){if(_0x1c3251['wildcardDef']){if(_0x325b9a[_0x38ca33(0x114)]){console[_0x38ca33(0xeb)](generateCommandHelp(_0x1c3251[_0x38ca33(0x106)]));return;}_0x3c63cd=_0x1c3251['wildcardDef'],_0x1222d8=[_0x5073cf,...cli['input'][_0x38ca33(0xf1)](0x2)];}else{printServiceHelp(_0x341f01),await handleErrorAsync(CliErrors[_0x38ca33(0x113)](_0x341f01+'\x20'+_0x5073cf));return;}}if(_0x325b9a['help']){console[_0x38ca33(0xeb)](generateCommandHelp(_0x3c63cd));return;}await dispatchDeclarative(_0x3c63cd,_0x341f01,_0x5073cf,_0x1222d8,_0x325b9a,_0x497888);}}async function dispatchDeclarative(_0x388d26,_0x18a7fc,_0x5babc8,_0x1ad8de,_0xa05860,_0x5bfe0a){const _0x171e05=a11_0x2cf8ab,_0x557777=Date[_0x171e05(0x103)]();let _0x380729;try{await runCommand(_0x388d26,{'rawFlags':_0xa05860,'args':_0x1ad8de,'resolveAppCode':()=>_0x5bfe0a[_0x171e05(0xfe)]||_0xa05860['appcode']||process.env.RABETBASE_APPCODE||process.env.LOVRABET_APPCODE||undefined,'resolveCookie':()=>_0x5bfe0a['cookie']||getCookie(),'resolveApiDomain':()=>getApiDomain(),'isNonInteractive':a11_0xdd886(_0xa05860),'defaultFormat':_0x5bfe0a[_0x171e05(0x102)],'defaultPageSize':_0x5bfe0a[_0x171e05(0x107)],'defaultVerbose':_0x5bfe0a[_0x171e05(0x115)],'apiDir':_0x5bfe0a[_0x171e05(0x101)],'riskLevel':_0x5bfe0a[_0x171e05(0x105)],'selectedAppName':_0x5bfe0a[_0x171e05(0x10f)]});}catch(_0x5817b3){_0x380729=_0x5817b3;}await reportCommandTrace({'service':_0x18a7fc,'command':_0x5babc8,'flags':_0xa05860,'durationMs':Date['now']()-_0x557777,'error':_0x380729});if(_0x380729)await handleErrorAsync(_0x380729);}function printServiceHelp(_0x429abc){const _0x51a807=a11_0x2cf8ab;console[_0x51a807(0xeb)](generateServiceHelp(_0x429abc));}async function handleErrorAsync(_0x1f38b0){const _0xc7bf6b=a11_0x2cf8ab;if(_0x1f38b0 instanceof Error&&_0x1f38b0['name']===_0xc7bf6b(0xf5))return process[_0xc7bf6b(0x109)][_0xc7bf6b(0xf2)](_0xc7bf6b(0xfd)),await exitWithOtelShutdown(0x0);if(_0x1f38b0 instanceof CliError){if(_0x1f38b0['code']===_0xc7bf6b(0x10e))return process['stderr'][_0xc7bf6b(0xf2)]('\x0a'+_0x1f38b0[_0xc7bf6b(0xe7)]+'\x0a'),await exitWithOtelShutdown(0x0);console['error']('Error:\x20'+_0x1f38b0[_0xc7bf6b(0xe7)]);if(_0x1f38b0[_0xc7bf6b(0xe8)])console[_0xc7bf6b(0x10a)](_0xc7bf6b(0x104)+_0x1f38b0[_0xc7bf6b(0xe8)]);return await exitWithOtelShutdown(_0x1f38b0[_0xc7bf6b(0xea)]);}return console['error'](_0xc7bf6b(0xfc),_0x1f38b0),await exitWithOtelShutdown(0x1);}
|
package/lib/commands/api/doc.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a12_0x14544a=a12_0x29d5;(function(_0x73304c,_0x86b877){const _0x19a10f=a12_0x29d5,_0x130643=_0x73304c();while(!![]){try{const _0xa4b1f0=parseInt(_0x19a10f(0x174))/0x1+-parseInt(_0x19a10f(0x168))/0x2+-parseInt(_0x19a10f(0x19d))/0x3+-parseInt(_0x19a10f(0x16d))/0x4+parseInt(_0x19a10f(0x176))/0x5*(-parseInt(_0x19a10f(0x189))/0x6)+-parseInt(_0x19a10f(0x19a))/0x7*(-parseInt(_0x19a10f(0x178))/0x8)+parseInt(_0x19a10f(0x197))/0x9;if(_0xa4b1f0===_0x86b877)break;else _0x130643['push'](_0x130643['shift']());}catch(_0x5ef0b4){_0x130643['push'](_0x130643['shift']());}}}(a12_0x2d0f,0x5b72e));import a12_0x843199 from'ora';import{fetchModelList}from'../../api/fetch-model-list.js';function a12_0x2d0f(){const _0x49a327=['73895PcJQFD','validation','2092020zldowl','datasetCode','40tneuWS','\x20of\x20','./docs','split','api','str','\x1b[33m!\x20The\x20following\x20dataset\x20codes\x20do\x20not\x20exist:\x20','!\x20No\x20datasets\x20found.','\x20file(s)','log','output','success','trim','Invalid\x20--params:\x20','stdout','\x1b[0m','string','6NJkion','map','filter','\x20dataset(s)\x1b[0m','fail','\x1b[90m*\x20Generating\x20docs\x20for:\x20','succeed','start','Doc\x20generation\x20complete:\x20','object','length','\x20doc(s)\x20in\x20','padStart','has','10435131YHAfMS','\x0d\x20\x20[','some','1040900jKCOgD','Extra\x20params\x20passed\x20to\x20the\x20doc\x20generator\x20(JSON\x20object)','Fetching\x20dataset\x20list\x20for\x20','1821063UyiTzW','Failed\x20to\x20fetch\x20datasets','must\x20be\x20a\x20JSON\x20object','join','appCode','--datasetcode\x20cannot\x20be\x20empty.','...','\x20dataset(s)','249078zJUMtA','write','cookie','params','datasetcode','1809264fbiEKu','Doc\x20generation:\x20','):\x20','None\x20of\x20the\x20specified\x20dataset\x20codes\x20exist:\x20','Output\x20directory\x20(default:\x20./docs)','Fetched\x20','error'];a12_0x2d0f=function(){return _0x49a327;};return a12_0x2d0f();}import{generateDatasetDocs}from'../../api/api-doc.js';import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL}from'../common/flags.js';function a12_0x29d5(_0x2b3e4a,_0x56db83){_0x2b3e4a=_0x2b3e4a-0x163;const _0x2d0f28=a12_0x2d0f();let _0x29d593=_0x2d0f28[_0x2b3e4a];return _0x29d593;}export const apiDoc={'service':a12_0x14544a(0x17c),'command':'doc','description':'Generate\x20markdown\x20documentation\x20for\x20all\x20datasets','risk':a12_0x14544a(0x169),'requiresAppCode':!![],'hasFormat':![],'flags':[{...APPCODE_FLAG_OPTIONAL,'hidden':!![]},{'name':a12_0x14544a(0x182),'type':a12_0x14544a(0x188),'description':a12_0x14544a(0x171)},{'name':a12_0x14544a(0x16c),'type':'string','description':'Filter:\x20comma-separated\x20dataset\x20codes\x20to\x20generate\x20docs\x20for'},{'name':a12_0x14544a(0x16b),'type':a12_0x14544a(0x188),'description':a12_0x14544a(0x19b)}],async 'execute'(_0x29372e){const _0x5640e3=a12_0x14544a,_0x291f44=_0x29372e[_0x5640e3(0x17d)](_0x5640e3(0x182))||_0x5640e3(0x17a),_0x221517=_0x29372e[_0x5640e3(0x17d)](_0x5640e3(0x16c)),_0x588ae7=_0x29372e[_0x5640e3(0x17d)](_0x5640e3(0x16b));let _0x2b10aa;if(_0x588ae7)try{_0x2b10aa=JSON['parse'](_0x588ae7);if(typeof _0x2b10aa!==_0x5640e3(0x192)||_0x2b10aa===null||Array['isArray'](_0x2b10aa))throw new Error(_0x5640e3(0x19f));}catch(_0x3b6bba){throw CliErrors['validation'](_0x5640e3(0x185)+(_0x3b6bba instanceof Error?_0x3b6bba['message']:String(_0x3b6bba)),'Provide\x20a\x20valid\x20JSON\x20object,\x20e.g.\x20--params\x20\x27{\x22key\x22:\x22value\x22}\x27');}let _0x58b1e0;if(_0x221517){const _0x327c2c=_0x221517[_0x5640e3(0x17b)](',')[_0x5640e3(0x18a)](_0x45fcbb=>_0x45fcbb[_0x5640e3(0x184)]())['filter'](_0x423402=>_0x423402[_0x5640e3(0x193)]>0x0);if(_0x327c2c[_0x5640e3(0x193)]===0x0)throw CliErrors['validation'](_0x5640e3(0x165));_0x58b1e0=new Set(_0x327c2c),console[_0x5640e3(0x181)](_0x5640e3(0x18e)+_0x327c2c[_0x5640e3(0x163)](',\x20')+_0x5640e3(0x187));}const _0x162ff7=a12_0x843199(_0x5640e3(0x19c)+_0x29372e['appCode']+_0x5640e3(0x166))[_0x5640e3(0x190)]();let _0x329d0a;try{({configArray:_0x329d0a}=await fetchModelList(_0x29372e[_0x5640e3(0x164)],_0x29372e['cookie']),_0x162ff7[_0x5640e3(0x18f)](_0x5640e3(0x172)+_0x329d0a[_0x5640e3(0x193)]+_0x5640e3(0x167)));}catch(_0x25d4bb){_0x162ff7[_0x5640e3(0x18d)](_0x5640e3(0x19e));throw _0x25d4bb;}if(_0x329d0a[_0x5640e3(0x193)]===0x0)return console[_0x5640e3(0x181)](_0x5640e3(0x17f)),{'ok':!![]};let _0x235c9c=_0x329d0a;if(_0x58b1e0){_0x235c9c=_0x329d0a['filter'](_0x183a23=>_0x58b1e0[_0x5640e3(0x196)](_0x183a23[_0x5640e3(0x177)]));const _0x51edf7=[..._0x58b1e0][_0x5640e3(0x18b)](_0x4f4304=>!_0x329d0a[_0x5640e3(0x199)](_0x15bdca=>_0x15bdca['datasetCode']===_0x4f4304));_0x51edf7[_0x5640e3(0x193)]>0x0&&console[_0x5640e3(0x181)](_0x5640e3(0x17e)+_0x51edf7[_0x5640e3(0x163)](',\x20')+_0x5640e3(0x187));if(_0x235c9c['length']===0x0)throw CliErrors[_0x5640e3(0x175)](_0x5640e3(0x170)+[..._0x58b1e0][_0x5640e3(0x163)](',\x20'));console[_0x5640e3(0x181)]('\x1b[90m*\x20Filtered\x20'+_0x235c9c[_0x5640e3(0x193)]+_0x5640e3(0x179)+_0x329d0a[_0x5640e3(0x193)]+_0x5640e3(0x18c));}let _0x58f09a=0x0;const _0x43a8c6=await generateDatasetDocs(_0x235c9c,_0x29372e[_0x5640e3(0x164)],_0x29372e[_0x5640e3(0x16a)],_0x291f44,(_0x51664c,_0x4b04a6,_0x36679e)=>{const _0x1e2b88=_0x5640e3;_0x58f09a=_0x51664c,process[_0x1e2b88(0x186)][_0x1e2b88(0x169)](_0x1e2b88(0x198)+String(_0x51664c)[_0x1e2b88(0x195)](String(_0x4b04a6)[_0x1e2b88(0x193)])+'/'+_0x4b04a6+']\x20'+_0x36679e+'.md');},_0x2b10aa);if(_0x58f09a>0x0)process[_0x5640e3(0x186)]['write']('\x0a');const _0x2ef0a6=_0x43a8c6['filter'](_0x429169=>_0x429169[_0x5640e3(0x183)])[_0x5640e3(0x193)],_0x52449a=_0x43a8c6[_0x5640e3(0x18b)](_0x2df6c0=>!_0x2df6c0['success'])['length'];console[_0x5640e3(0x181)](),console[_0x5640e3(0x181)]('✓\x20Generated\x20'+_0x2ef0a6+_0x5640e3(0x194)+_0x291f44);if(_0x52449a>0x0){console[_0x5640e3(0x173)]('!\x20'+_0x52449a+'\x20doc(s)\x20failed');for(const _0x4c208e of _0x43a8c6[_0x5640e3(0x18b)](_0x49f748=>!_0x49f748[_0x5640e3(0x183)])){console[_0x5640e3(0x173)]('\x20\x20•\x20'+_0x4c208e['datasetName']+'\x20('+_0x4c208e[_0x5640e3(0x177)]+_0x5640e3(0x16f)+_0x4c208e[_0x5640e3(0x173)]);}}return{'ok':_0x52449a===0x0,'message':_0x52449a>0x0?_0x5640e3(0x16e)+_0x2ef0a6+'\x20succeeded,\x20'+_0x52449a+'\x20failed':_0x5640e3(0x191)+_0x2ef0a6+_0x5640e3(0x180)};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x1dfa7f,_0x1a826e){const _0x3a2f9f=a13_0x56b9,_0x2bf7a2=_0x1dfa7f();while(!![]){try{const _0x18769d=-parseInt(_0x3a2f9f(0x1cb))/0x1+parseInt(_0x3a2f9f(0x1d1))/0x2+-parseInt(_0x3a2f9f(0x1ca))/0x3*(-parseInt(_0x3a2f9f(0x1cf))/0x4)+parseInt(_0x3a2f9f(0x1cc))/0x5+-parseInt(_0x3a2f9f(0x1d0))/0x6+-parseInt(_0x3a2f9f(0x1ce))/0x7*(parseInt(_0x3a2f9f(0x1cd))/0x8)+parseInt(_0x3a2f9f(0x1c9))/0x9;if(_0x18769d===_0x1a826e)break;else _0x2bf7a2['push'](_0x2bf7a2['shift']());}catch(_0x32dd4c){_0x2bf7a2['push'](_0x2bf7a2['shift']());}}}(a13_0x4eb0,0xf22ca));function a13_0x56b9(_0x378916,_0x5a8a18){_0x378916=_0x378916-0x1c9;const _0x4eb023=a13_0x4eb0();let _0x56b973=_0x4eb023[_0x378916];return _0x56b973;}import{apiList}from'./list.js';import{apiPull}from'./pull.js';import{apiDoc}from'./doc.js';function a13_0x4eb0(){const _0x429351=['4775352jXEYhi','491782xYuJFV','12401703SXqcWz','11553JJHgzS','614945epDUEV','2056890puCJDg','216656HvGgLt','336ItIorZ','1732NTqDKD'];a13_0x4eb0=function(){return _0x429351;};return a13_0x4eb0();}export const apiDefinitions=[apiList,apiPull,apiDoc];
|
package/lib/commands/api/list.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a14_0x4f680d=a14_0x41e8;(function(_0x17c923,_0x3695df){const _0xf3b73d=a14_0x41e8,_0x3dd6ee=_0x17c923();while(!![]){try{const _0x2b48f7=-parseInt(_0xf3b73d(0x1ca))/0x1*(parseInt(_0xf3b73d(0x1c2))/0x2)+-parseInt(_0xf3b73d(0x1b8))/0x3*(-parseInt(_0xf3b73d(0x1c7))/0x4)+-parseInt(_0xf3b73d(0x1bd))/0x5*(parseInt(_0xf3b73d(0x1c5))/0x6)+parseInt(_0xf3b73d(0x1bb))/0x7*(parseInt(_0xf3b73d(0x1be))/0x8)+parseInt(_0xf3b73d(0x1b9))/0x9+-parseInt(_0xf3b73d(0x1cb))/0xa+-parseInt(_0xf3b73d(0x1bc))/0xb;if(_0x2b48f7===_0x3695df)break;else _0x3dd6ee['push'](_0x3dd6ee['shift']());}catch(_0x1709c6){_0x3dd6ee['push'](_0x3dd6ee['shift']());}}}(a14_0x111c,0xac23c));import{initEnv}from'../../constant/env.js';function a14_0x111c(){const _0x2025d5=['List\x20all\x20datasets/models\x20for\x20the\x20configured\x20app(s)','130fCHCkj','str','api','18qggHKH','production','4NRWmDj','map','list','907kPKHpO','301840NYVDZs','env','3567291hNLIDp','11343402EyAkOm','push','468643LxSCSY','23689094xmuKsZ','396895pQkxjA','88wijtLh','cookie','appcode'];a14_0x111c=function(){return _0x2025d5;};return a14_0x111c();}import{fetchModelList}from'../../api/fetch-model-list.js';function a14_0x41e8(_0x36cc81,_0x2d4adb){_0x36cc81=_0x36cc81-0x1b7;const _0x111c22=a14_0x111c();let _0x41e86a=_0x111c22[_0x36cc81];return _0x41e86a;}import{APPCODE_FLAG_OPTIONAL}from'../common/flags.js';import{resolveTargetApps}from'./shared.js';export const apiList={'service':a14_0x4f680d(0x1c4),'command':a14_0x4f680d(0x1c9),'description':a14_0x4f680d(0x1c1),'risk':'read','requiresAppCode':!![],'flags':[{...APPCODE_FLAG_OPTIONAL,'hidden':!![]}],async 'execute'(_0x587f65){const _0x5b6f36=a14_0x4f680d,_0xc3ad84=_0x587f65[_0x5b6f36(0x1c3)](_0x5b6f36(0x1c0)),_0x5c390e=resolveTargetApps(_0x587f65,_0xc3ad84);if(_0x5c390e){const _0xdb349a=[];for(const _0x402e84 of _0x5c390e){const _0x5830a0=_0x402e84[_0x5b6f36(0x1bf)]||_0x587f65['cookie'],_0x1dbdea=_0x402e84[_0x5b6f36(0x1b7)]||_0x5b6f36(0x1c6);initEnv(_0x1dbdea);const {configArray:_0x35723a}=await fetchModelList(_0x402e84[_0x5b6f36(0x1c0)],_0x5830a0);_0xdb349a[_0x5b6f36(0x1ba)](..._0x35723a[_0x5b6f36(0x1c8)](_0x136607=>({..._0x136607,'_appName':_0x402e84['name'],'_appCode':_0x402e84[_0x5b6f36(0x1c0)],'_env':_0x1dbdea,'_isDefault':_0x402e84['isDefault']})));}return{'ok':!![],'data':_0xdb349a};}const {configArray:_0x1fc1f7}=await fetchModelList(_0x587f65['appCode'],_0x587f65[_0x5b6f36(0x1bf)]);return{'ok':!![],'data':_0x1fc1f7};}};
|
package/lib/commands/api/pull.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a15_0x50451e=a15_0x2cbd;(function(_0x1ed240,_0xbb2b55){const _0x11df6e=a15_0x2cbd,_0x19623f=_0x1ed240();while(!![]){try{const _0x290763=-parseInt(_0x11df6e(0x1c3))/0x1*(parseInt(_0x11df6e(0x1c5))/0x2)+-parseInt(_0x11df6e(0x1c4))/0x3*(parseInt(_0x11df6e(0x1c1))/0x4)+parseInt(_0x11df6e(0x1b4))/0x5*(parseInt(_0x11df6e(0x1d3))/0x6)+parseInt(_0x11df6e(0x1c2))/0x7*(parseInt(_0x11df6e(0x1ae))/0x8)+-parseInt(_0x11df6e(0x1af))/0x9+-parseInt(_0x11df6e(0x1d8))/0xa+parseInt(_0x11df6e(0x1ca))/0xb;if(_0x290763===_0xbb2b55)break;else _0x19623f['push'](_0x19623f['shift']());}catch(_0x13157a){_0x19623f['push'](_0x19623f['shift']());}}}(a15_0x4cb1,0x9a381));import a15_0x222dd1 from'ora';import a15_0x4de00c from'node:path';import{initEnv,getEnv}from'../../constant/env.js';function a15_0x2cbd(_0x54134b,_0x171d1e){_0x54134b=_0x54134b-0x1ab;const _0x4cb1ab=a15_0x4cb1();let _0x2cbd61=_0x4cb1ab[_0x54134b];return _0x2cbd61;}import{fetchModelList}from'../../api/fetch-model-list.js';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':'api','command':a15_0x50451e(0x1b5),'description':'Pull\x20datasets\x20and\x20generate\x20API\x20config\x20files\x20(./src/api/)','risk':a15_0x50451e(0x1bb),'requiresAppCode':!![],'hasFormat':![],'flags':[{...APPCODE_FLAG_OPTIONAL,'hidden':!![]},{'name':a15_0x50451e(0x1c6),'type':a15_0x50451e(0x1cc),'description':'Output\x20directory\x20(default:\x20./src/api/)'}],async 'execute'(_0x51fb8f){const _0x12fc12=a15_0x50451e,_0x137edc=_0x51fb8f['str'](_0x12fc12(0x1b8)),_0x31045f=_0x51fb8f[_0x12fc12(0x1d7)]('output')||undefined,_0x5da412=resolveTargetApps(_0x51fb8f,_0x137edc);if(_0x5da412){let _0x5ad3b7=0x0,_0x10a0a3=0x0;for(const _0x237e7e of _0x5da412){const _0x54e94f=_0x237e7e[_0x12fc12(0x1b1)]||_0x51fb8f[_0x12fc12(0x1b1)],_0x3f462a=_0x237e7e[_0x12fc12(0x1c8)]||_0x12fc12(0x1ad);initEnv(_0x3f462a);const _0x2d069a=_0x237e7e[_0x12fc12(0x1b7)]||_0x31045f||_0x12fc12(0x1b9),_0x5324ea=_0x237e7e['isDefault']?'':_0x237e7e['name']||_0x237e7e[_0x12fc12(0x1b8)],_0xbb772e=a15_0x222dd1(_0x12fc12(0x1de)+_0x237e7e['name']+'\x20('+_0x237e7e[_0x12fc12(0x1b8)]+_0x12fc12(0x1c7))[_0x12fc12(0x1d6)]();try{const {configArray:_0x3658b8}=await fetchModelList(_0x237e7e['appcode'],_0x54e94f),_0x2f38b2=await generateApiFile(_0x3658b8,_0x5324ea,_0x237e7e[_0x12fc12(0x1b8)],_0x237e7e['isDefault'],_0x3f462a,_0x2d069a,_0x237e7e[_0x12fc12(0x1d4)]);_0xbb772e[_0x12fc12(0x1bd)](_0x237e7e[_0x12fc12(0x1d4)]+':\x20'+_0x3658b8['length']+_0x12fc12(0x1ab)+_0x2f38b2[_0x12fc12(0x1dd)]+_0x12fc12(0x1d2)),console['log'](_0x12fc12(0x1b0)+_0x2f38b2['apiFilePath']),console[_0x12fc12(0x1ce)]('\x20\x20•\x20'+_0x2f38b2['clientFilePath']),_0x5ad3b7++;}catch(_0x2e528e){_0xbb772e[_0x12fc12(0x1cd)](_0x237e7e['name']+':\x20'+(_0x2e528e instanceof Error?_0x2e528e[_0x12fc12(0x1ba)]:String(_0x2e528e))),_0x10a0a3++;}}console[_0x12fc12(0x1ce)]();if(_0x10a0a3>0x0)console[_0x12fc12(0x1bc)]('!\x20'+_0x10a0a3+_0x12fc12(0x1b3));return{'ok':_0x10a0a3===0x0,'message':_0x12fc12(0x1c9)+_0x5ad3b7+'\x20succeeded,\x20'+_0x10a0a3+_0x12fc12(0x1cb)};}const _0x280882=_0x137edc&&_0x137edc[_0x12fc12(0x1d9)]('-')?_0x137edc[_0x12fc12(0x1cf)]('-')[_0x12fc12(0x1b2)](0x1)[_0x12fc12(0x1db)]('-'):'',_0x37fdcd=_0x31045f||_0x51fb8f[_0x12fc12(0x1b7)]||'./src/api/',_0x1c0fdb=!_0x137edc,_0x3ffba2=a15_0x222dd1('Pulling\x20API\x20config\x20for\x20'+_0x51fb8f['appCode']+_0x12fc12(0x1ac))[_0x12fc12(0x1d6)]();try{const {configArray:_0xa0f458}=await fetchModelList(_0x51fb8f[_0x12fc12(0x1d0)],_0x51fb8f[_0x12fc12(0x1b1)]),_0x4493ec=await generateApiFile(_0xa0f458,_0x280882,_0x51fb8f[_0x12fc12(0x1d0)],_0x1c0fdb,getEnv(),_0x37fdcd);_0x3ffba2['succeed'](_0x12fc12(0x1bf)+_0xa0f458[_0x12fc12(0x1d5)]+_0x12fc12(0x1dc)+_0x4493ec['modelCount']+'\x20model(s)');const _0x4b3fe1=_0x280882?_0x280882+_0x12fc12(0x1be):_0x12fc12(0x1c0),_0xcaac39=_0x280882?_0x280882+_0x12fc12(0x1da):'client';return console[_0x12fc12(0x1ce)](_0x12fc12(0x1b0)+a15_0x4de00c[_0x12fc12(0x1db)](_0x37fdcd,_0x4b3fe1+_0x12fc12(0x1b6))),console[_0x12fc12(0x1ce)](_0x12fc12(0x1b0)+a15_0x4de00c[_0x12fc12(0x1db)](_0x37fdcd,_0xcaac39+_0x12fc12(0x1b6))),{'ok':!![],'data':{'datasetCount':_0xa0f458[_0x12fc12(0x1d5)],'modelCount':_0x4493ec[_0x12fc12(0x1dd)]}};}catch(_0x5af0bc){_0x3ffba2[_0x12fc12(0x1cd)](_0x12fc12(0x1d1)+(_0x5af0bc instanceof Error?_0x5af0bc['message']:String(_0x5af0bc)));throw _0x5af0bc;}}};function a15_0x4cb1(){const _0x4bc47b=['split','appCode','Failed:\x20','\x20model(s)','6wmqzMW','name','length','start','str','5875500EHyQLu','includes','-client','join','\x20dataset(s),\x20generated\x20','modelCount','Pulling\x20','\x20dataset(s)\x20→\x20','...','production','827320msvrGU','9037224mnvYho','\x20\x20•\x20','cookie','slice','\x20app(s)\x20failed','173405hdUyQF','pull','.ts','apiDir','appcode','./src/api/','message','write','error','succeed','-api','Pulled\x20','api','14336TcqsOB','35rtuNeq','5Vurxxb','150LtQsXh','213334rASKRr','output',')...','env','Done:\x20','26225606apTzOQ','\x20failed','string','fail','log'];a15_0x4cb1=function(){return _0x4bc47b;};return a15_0x4cb1();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x3b0ed4,_0x523644){const _0x11b22a=a16_0x48dd,_0x26dd31=_0x3b0ed4();while(!![]){try{const _0x4d159a=-parseInt(_0x11b22a(0x105))/0x1+parseInt(_0x11b22a(0x10f))/0x2+-parseInt(_0x11b22a(0x107))/0x3+-parseInt(_0x11b22a(0x103))/0x4*(parseInt(_0x11b22a(0x10e))/0x5)+parseInt(_0x11b22a(0x110))/0x6+-parseInt(_0x11b22a(0x109))/0x7+parseInt(_0x11b22a(0x111))/0x8*(parseInt(_0x11b22a(0x10c))/0x9);if(_0x4d159a===_0x523644)break;else _0x26dd31['push'](_0x26dd31['shift']());}catch(_0x3170d1){_0x26dd31['push'](_0x26dd31['shift']());}}}(a16_0x155d,0x54ef5));import{getMultiAppConfigs}from'../../utils/config.js';function a16_0x48dd(_0x4b77ef,_0x210eaf){_0x4b77ef=_0x4b77ef-0x103;const _0x155dd2=a16_0x155d();let _0x48dd93=_0x155dd2[_0x4b77ef];return _0x48dd93;}function a16_0x155d(){const _0x112ded=['App\x20\x22','103421LxXSPt','selectedAppName','791226pHNLzw','filter','4542139nkCRpt','validation','join','9SPKaht','name','217495gSNcgJ','39452aCDxWl','981276vnuwCA','10489264LiMCfv','\x22\x20not\x20found\x20in\x20config.\x20Available:\x20','12lAGVUV'];a16_0x155d=function(){return _0x112ded;};return a16_0x155d();}import{CliErrors}from'../../errors.js';export function resolveTargetApps(_0x4e3936,_0x2e7609){const _0x1c6f36=a16_0x48dd;if(_0x2e7609)return null;let _0x2bb3ca=getMultiAppConfigs();if(!_0x2bb3ca||_0x2bb3ca['length']===0x0)return null;if(_0x4e3936[_0x1c6f36(0x106)]){const _0x229aab=_0x2bb3ca[_0x1c6f36(0x108)](_0x2c4c9e=>_0x2c4c9e['name']===_0x4e3936[_0x1c6f36(0x106)]);if(_0x229aab['length']===0x0){const _0x44ed54=_0x2bb3ca['map'](_0x259598=>_0x259598[_0x1c6f36(0x10d)])[_0x1c6f36(0x10b)](',\x20');throw CliErrors[_0x1c6f36(0x10a)](_0x1c6f36(0x104)+_0x4e3936['selectedAppName']+_0x1c6f36(0x112)+_0x44ed54);}_0x2bb3ca=_0x229aab;}return _0x2bb3ca;}
|
package/lib/commands/app/add.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a17_0x1e9b47=a17_0x3f02;function a17_0x3f02(_0x20987f,_0x5922ef){_0x20987f=_0x20987f-0x18d;const _0x504a9a=a17_0x504a();let _0x3f027c=_0x504a9a[_0x20987f];return _0x3f027c;}(function(_0x4b1718,_0x2313be){const _0x419363=a17_0x3f02,_0xddee13=_0x4b1718();while(!![]){try{const _0x5f161a=-parseInt(_0x419363(0x197))/0x1*(parseInt(_0x419363(0x1a7))/0x2)+-parseInt(_0x419363(0x1b0))/0x3+parseInt(_0x419363(0x1b6))/0x4+parseInt(_0x419363(0x1a8))/0x5*(-parseInt(_0x419363(0x1aa))/0x6)+-parseInt(_0x419363(0x1a9))/0x7+parseInt(_0x419363(0x1b3))/0x8*(parseInt(_0x419363(0x1b8))/0x9)+parseInt(_0x419363(0x192))/0xa*(parseInt(_0x419363(0x1a1))/0xb);if(_0x5f161a===_0x2313be)break;else _0xddee13['push'](_0xddee13['shift']());}catch(_0x175895){_0xddee13['push'](_0xddee13['shift']());}}}(a17_0x504a,0x892c0));import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{readConfig,writeConfig,scopeLabel,migrateLegacySingleApp}from'./shared.js';function a17_0x504a(){const _0x39a46f=['API\x20directory\x20path','Missing\x20app\x20name.','entries','Add\x20or\x20update\x20an\x20app\x20in\x20config','App\x20code','app','209cFxzPt','env','pageSize','args','\x22\x20(appcode:\x20','length','12754WnBoyN','105QNbwxl','736708dPCboX','156606vHgbXG','Access\x20key','Usage:\x20','Default\x20page\x20size','Default\x20output\x20format\x20for\x20this\x20app\x20(profile)','apiDir','1635360QJMUYB','trim','Locale','32VamhvW','Added','validation','4334240vJZPsJ','\x20Set\x20as\x20default\x20app.','1588311KglSXh','defaultApp','Risk\x20level','\x20app\x20add\x20<name>\x20--appcode\x20<code>','add','name','locale','App\x20profile\x20name','appcode','global','str','Target\x20environment','263240rhtMGZ','cookie','Auth\x20cookie','keys','bool','83xzSBZC','apps','string','riskLevel'];a17_0x504a=function(){return _0x39a46f;};return a17_0x504a();}const PROFILE_FLAG_KEYS={'env':a17_0x1e9b47(0x1a2),'apiDir':a17_0x1e9b47(0x1af),'cookie':'cookie','accessKey':'accessKey','defaultFormat':'format','pageSize':a17_0x1e9b47(0x1a3),'riskLevel':a17_0x1e9b47(0x19a),'locale':a17_0x1e9b47(0x1be)};async function validateArgs(_0x175ff8){const _0x1ed4b9=a17_0x1e9b47,_0x298f14=_0x175ff8[_0x1ed4b9(0x1a4)][0x0]?.['trim']();if(!_0x298f14)throw CliErrors[_0x1ed4b9(0x1b5)](_0x1ed4b9(0x19c),_0x1ed4b9(0x1ac)+CLI_BIN_NAME+_0x1ed4b9(0x1bb));}async function execute(_0x44089d){const _0x4f2326=a17_0x1e9b47,_0x4dd24b=_0x44089d[_0x4f2326(0x1a4)][0x0]?.[_0x4f2326(0x1b1)]();if(!_0x4dd24b)throw CliErrors['validation'](_0x4f2326(0x19c),_0x4f2326(0x1ac)+CLI_BIN_NAME+_0x4f2326(0x1bb));const _0x586254=_0x44089d[_0x4f2326(0x190)](_0x4f2326(0x18e));if(!_0x586254)throw CliErrors['flagMissing']('appcode',_0x4f2326(0x1ac)+CLI_BIN_NAME+'\x20app\x20add\x20<name>\x20--appcode\x20<code>');const _0x1153e5={'global':_0x44089d[_0x4f2326(0x196)](_0x4f2326(0x18f))},_0x53e714=readConfig(_0x1153e5);if(!_0x53e714['apps'])_0x53e714[_0x4f2326(0x198)]={};Object[_0x4f2326(0x195)](_0x53e714['apps'])[_0x4f2326(0x1a6)]===0x0&&migrateLegacySingleApp(_0x53e714,_0x4dd24b);const _0x2b1b62={'appcode':_0x586254};for(const [_0x3ebaae,_0x491ec5]of Object[_0x4f2326(0x19d)](PROFILE_FLAG_KEYS)){const _0x52db60=_0x44089d['str'](_0x3ebaae);_0x52db60&&(_0x2b1b62[_0x491ec5]=_0x491ec5===_0x4f2326(0x1a3)?Number(_0x52db60):_0x52db60);}const _0x14d42c=_0x53e714[_0x4f2326(0x198)],_0x1fbbd8=!!_0x14d42c[_0x4dd24b];_0x14d42c[_0x4dd24b]=_0x2b1b62;if(!_0x53e714[_0x4f2326(0x1b9)])_0x53e714['defaultApp']=_0x4dd24b;writeConfig(_0x53e714,_0x1153e5);const _0xda9c12=!_0x1fbbd8&&_0x53e714[_0x4f2326(0x1b9)]===_0x4dd24b?_0x4f2326(0x1b7):'';return{'ok':!![],'message':(_0x1fbbd8?'Updated':_0x4f2326(0x1b4))+'\x20app\x20\x22'+_0x4dd24b+_0x4f2326(0x1a5)+_0x586254+')'+scopeLabel(_0x1153e5)+'.'+_0xda9c12};}export const appAddDefinition={'service':a17_0x1e9b47(0x1a0),'command':a17_0x1e9b47(0x1bc),'description':a17_0x1e9b47(0x19e),'risk':'write','requiresAuth':![],'requiresAppCode':![],'args':[{'name':a17_0x1e9b47(0x1bd),'description':a17_0x1e9b47(0x18d),'required':!![]}],'flags':[{'name':'appcode','type':a17_0x1e9b47(0x199),'description':a17_0x1e9b47(0x19f),'required':!![]},{'name':a17_0x1e9b47(0x18f),'type':'boolean','description':'Use\x20global\x20config\x20scope','default':![]},{'name':'env','type':'string','description':a17_0x1e9b47(0x191)},{'name':a17_0x1e9b47(0x1af),'type':'string','description':a17_0x1e9b47(0x19b)},{'name':a17_0x1e9b47(0x193),'type':a17_0x1e9b47(0x199),'description':a17_0x1e9b47(0x194),'hidden':!![]},{'name':'accessKey','type':'string','description':a17_0x1e9b47(0x1ab),'hidden':!![]},{'name':'defaultFormat','type':'string','description':a17_0x1e9b47(0x1ae)},{'name':a17_0x1e9b47(0x1a3),'type':'number','description':a17_0x1e9b47(0x1ad)},{'name':a17_0x1e9b47(0x19a),'type':a17_0x1e9b47(0x199),'description':a17_0x1e9b47(0x1ba)},{'name':a17_0x1e9b47(0x1be),'type':a17_0x1e9b47(0x199),'description':a17_0x1e9b47(0x1b2)}],'validate':validateArgs,'execute':execute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a18_0x1d2a(_0xa9177b,_0x3105e0){_0xa9177b=_0xa9177b-0x11b;const _0x23c7b6=a18_0x23c7();let _0x1d2ab7=_0x23c7b6[_0xa9177b];return _0x1d2ab7;}(function(_0x3efb80,_0x508444){const _0x4d8219=a18_0x1d2a,_0x706c04=_0x3efb80();while(!![]){try{const _0x550729=-parseInt(_0x4d8219(0x11c))/0x1+parseInt(_0x4d8219(0x11f))/0x2*(-parseInt(_0x4d8219(0x11b))/0x3)+parseInt(_0x4d8219(0x125))/0x4*(-parseInt(_0x4d8219(0x122))/0x5)+-parseInt(_0x4d8219(0x11d))/0x6+-parseInt(_0x4d8219(0x123))/0x7+parseInt(_0x4d8219(0x11e))/0x8*(parseInt(_0x4d8219(0x121))/0x9)+parseInt(_0x4d8219(0x124))/0xa*(parseInt(_0x4d8219(0x120))/0xb);if(_0x550729===_0x508444)break;else _0x706c04['push'](_0x706c04['shift']());}catch(_0x275746){_0x706c04['push'](_0x706c04['shift']());}}}(a18_0x23c7,0x1b768));function a18_0x23c7(){const _0x17e461=['600IpvzLA','4txRdip','10377qUuCJC','158458peSmHG','260598RJicLv','1832mxokWf','70BmsKMK','123827CuWLMo','3771EuIPzr','1065925sURYPj','859194AQKkSK'];a18_0x23c7=function(){return _0x17e461;};return a18_0x23c7();}import{appListDefinition}from'./list.js';import{appRemoteDefinition}from'./remote.js';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
|
-
|
|
1
|
+
function a19_0x32f0(_0x378473,_0x2544e8){_0x378473=_0x378473-0x9c;const _0x221b23=a19_0x221b();let _0x32f0d9=_0x221b23[_0x378473];return _0x32f0d9;}const a19_0x4c676d=a19_0x32f0;function a19_0x221b(){const _0xc38fe6=['1189506jBDdWx','apps','1YSiISk','read','app','projectConfig','list','appcode','globalPath','No\x20apps\x20configured.\x20Use\x20`','locale','object','8971193zSUDnT','accessKey','env','Single-app\x20mode.\x20Use\x20`','\x20app\x20add\x20<name>\x20--appcode\x20<code>`\x20to\x20add\x20one.','39659460xYYzYs','\x20app\x20add\x20<name>\x20--appcode\x20<code>`\x20to\x20enable\x20multi-app\x20mode.','5TGLDDZ','1739546xZAqyG','613197OKROCk','globalConfig','7096zTaMGf','format','apiDir','single-app','map','120QfBClq','32hsTHWN','5425iTFxds','riskLevel','386931cYlybu'];a19_0x221b=function(){return _0xc38fe6;};return a19_0x221b();}(function(_0x1d94ed,_0x529e75){const _0x17752c=a19_0x32f0,_0x4319b5=_0x1d94ed();while(!![]){try{const _0x5bd448=parseInt(_0x17752c(0xa4))/0x1*(parseInt(_0x17752c(0xb6))/0x2)+-parseInt(_0x17752c(0xa1))/0x3*(-parseInt(_0x17752c(0x9e))/0x4)+-parseInt(_0x17752c(0xb5))/0x5*(parseInt(_0x17752c(0xa2))/0x6)+-parseInt(_0x17752c(0x9f))/0x7*(-parseInt(_0x17752c(0xb9))/0x8)+-parseInt(_0x17752c(0xb7))/0x9*(-parseInt(_0x17752c(0x9d))/0xa)+parseInt(_0x17752c(0xae))/0xb+-parseInt(_0x17752c(0xb3))/0xc;if(_0x5bd448===_0x529e75)break;else _0x4319b5['push'](_0x4319b5['shift']());}catch(_0x46cd94){_0x4319b5['push'](_0x4319b5['shift']());}}}(a19_0x221b,0xaf877));import{readRawConfigWithLayers}from'../../context.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{appDefinedIn,resolveDefaultAppSource}from'./shared.js';async function execute(_0x44e55e){const _0x1809b7=a19_0x32f0,{config:_0x44cb2a,layers:_0x105cad}=readRawConfigWithLayers(),{apps:apps={},defaultApp:_0x415088,currentApp:_0x189254}=_0x44cb2a,_0x38153d=Object['entries'](apps),_0x2a8457=_0x105cad['globalConfig']['apps']&&typeof _0x105cad[_0x1809b7(0xb8)][_0x1809b7(0xa3)]===_0x1809b7(0xad)?_0x105cad['globalConfig'][_0x1809b7(0xa3)]:{},_0x40e5fe=_0x105cad[_0x1809b7(0xa7)][_0x1809b7(0xa3)]&&typeof _0x105cad['projectConfig'][_0x1809b7(0xa3)]==='object'?_0x105cad[_0x1809b7(0xa7)]['apps']:{};if(_0x38153d['length']===0x0){const _0x56e501=_0x44cb2a[_0x1809b7(0xa9)];if(_0x56e501)return{'ok':!![],'data':{'mode':_0x1809b7(0xbc),'appcode':_0x56e501,'env':_0x44cb2a[_0x1809b7(0xb0)]},'message':_0x1809b7(0xb1)+CLI_BIN_NAME+_0x1809b7(0xb4)};return{'ok':!![],'data':[],'message':_0x1809b7(0xab)+CLI_BIN_NAME+_0x1809b7(0xb2)};}const _0x5f02f7=resolveDefaultAppSource(_0x105cad),_0x4992d9=_0x38153d[_0x1809b7(0x9c)](([_0x5eb6d8,_0x7dc2fe])=>({'name':_0x5eb6d8,'appcode':_0x7dc2fe[_0x1809b7(0xa9)],'definedIn':appDefinedIn(_0x5eb6d8,_0x2a8457,_0x40e5fe),'isDefault':_0x5eb6d8===_0x415088,'isCurrent':_0x5eb6d8===(_0x189254??_0x415088),'env':_0x7dc2fe[_0x1809b7(0xb0)]??null,'apiDir':_0x7dc2fe[_0x1809b7(0xbb)]??null,'hasCookie':!!_0x7dc2fe['cookie'],'hasAccessKey':!!_0x7dc2fe[_0x1809b7(0xaf)],'format':_0x7dc2fe[_0x1809b7(0xba)]??null,'pageSize':_0x7dc2fe['pageSize']??null,'riskLevel':_0x7dc2fe[_0x1809b7(0xa0)]??null,'locale':_0x7dc2fe[_0x1809b7(0xac)]??null}));return{'ok':!![],'data':{'items':_0x4992d9,'meta':{'globalPath':_0x105cad[_0x1809b7(0xaa)]??null,'projectPath':_0x105cad['projectPath']??null,'defaultApp':_0x415088??null,'defaultAppSource':_0x415088!=null?_0x5f02f7:null}}};}export const appListDefinition={'service':a19_0x4c676d(0xa6),'command':a19_0x4c676d(0xa8),'description':'List\x20all\x20configured\x20apps','risk':a19_0x4c676d(0xa5),'requiresAuth':![],'requiresAppCode':![],'flags':[],'execute':execute};
|