@lovrabet/rabetbase-cli 2.0.5 → 2.0.7
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/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/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/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 +1 -1
- 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
|
+
const a0_0x40e6ea=a0_0x31e0;(function(_0xa604b1,_0x4a9147){const _0x1a08c6=a0_0x31e0,_0x5022b5=_0xa604b1();while(!![]){try{const _0x296e1c=parseInt(_0x1a08c6(0x91))/0x1+parseInt(_0x1a08c6(0x94))/0x2*(-parseInt(_0x1a08c6(0xa9))/0x3)+-parseInt(_0x1a08c6(0x96))/0x4+parseInt(_0x1a08c6(0x9f))/0x5+parseInt(_0x1a08c6(0xa2))/0x6*(parseInt(_0x1a08c6(0x95))/0x7)+parseInt(_0x1a08c6(0x9d))/0x8*(parseInt(_0x1a08c6(0xae))/0x9)+-parseInt(_0x1a08c6(0x92))/0xa*(parseInt(_0x1a08c6(0x9e))/0xb);if(_0x296e1c===_0x4a9147)break;else _0x5022b5['push'](_0x5022b5['shift']());}catch(_0x576673){_0x5022b5['push'](_0x5022b5['shift']());}}}(a0_0x3752,0x3377d));import{mkdirSync,writeFileSync}from'node:fs';import a0_0x49611e from'node:path';function a0_0x31e0(_0x469bae,_0x590c16){_0x469bae=_0x469bae-0x90;const _0x3752a5=a0_0x3752();let _0x31e03c=_0x3752a5[_0x469bae];return _0x31e03c;}import{getApiDomain}from'../constant/domain.js';function a0_0x3752(){const _0x30d45a=['✗\x20Failed:\x20','576ybKOIy','join','生成文档成功:\x20','log','.md\x20-\x20','18qSSLbw','string','.md','./docs','\x20datasets\x20to\x20generate\x20docs\x20for\x0a','push','生成文档失败:\x20','116551ZoTizL','2540mHAPeh','Waiting\x203\x20seconds...\x0a','2680PoaBbI','723156rCAIhU','913384IFNvPX','name','length','Fetch\x20doc\x20(','markdown','✓\x20Generated:\x20','/api/node-toolbox/api-doc-generator','360696OqDwed','1034rqbudi','501790cCNXLW','message','POST','24BWpYhO','utf8','error','datasetCode','tableName','Invalid\x20response\x20format\x20('];a0_0x3752=function(){return _0x30d45a;};return a0_0x3752();}import{logger}from'../utils/logger.js';import{platformFetch}from'../core/api-client.js';export async function fetchDatasetDoc(_0x1f8d36){const _0x45fcb7=a0_0x31e0,{appCode:_0x35dee1,cookie:_0x275339,datasetCode:_0x553b99,datasetId:_0x3f4b23,extraParams:_0x5035c5}=_0x1f8d36,_0x2dec7d=getApiDomain()+_0x45fcb7(0x9c),_0x3593c8=await platformFetch(_0x2dec7d,{'method':_0x45fcb7(0xa1),'body':{'appCode':_0x35dee1,'datasetCode':_0x553b99,'datasetId':_0x3f4b23,..._0x5035c5||{}},'cookie':_0x275339,'label':_0x45fcb7(0x99)+_0x553b99+')'});if(!_0x3593c8||typeof _0x3593c8[_0x45fcb7(0x9a)]!==_0x45fcb7(0xaf))throw new Error(_0x45fcb7(0xa7)+_0x553b99+'):\x20missing\x20data.markdown\x20field');return _0x3593c8[_0x45fcb7(0x9a)];}function delay(_0x173c0d){return new Promise(_0x5fd39b=>setTimeout(_0x5fd39b,_0x173c0d));}export async function generateDatasetDocs(_0x5ce96b,_0x40b4cb,_0x2d077e,_0x2aa892=a0_0x40e6ea(0xb1),_0x3144eb,_0x21c79e){const _0x4e9a82=a0_0x40e6ea;mkdirSync(_0x2aa892,{'recursive':!![]});const _0x4ab52b=[],_0x44ab22=_0x5ce96b['length'];console[_0x4e9a82(0xac)]('\x0a'+_0x44ab22+_0x4e9a82(0xb2));for(let _0x35fd5e=0x0;_0x35fd5e<_0x5ce96b[_0x4e9a82(0x98)];_0x35fd5e++){const _0x59efe7=_0x5ce96b[_0x35fd5e],_0x170be4=_0x35fd5e+0x1,_0x5beba7=_0x59efe7[_0x4e9a82(0xa6)];try{console[_0x4e9a82(0xac)]('['+_0x170be4+'/'+_0x44ab22+']\x20Generating:\x20'+_0x5beba7+'.md\x20('+_0x59efe7['name']+')');if(_0x3144eb)_0x3144eb(_0x170be4,_0x44ab22,_0x5beba7);const _0x501dd7=await fetchDatasetDoc({'appCode':_0x40b4cb,'cookie':_0x2d077e,'datasetCode':_0x59efe7[_0x4e9a82(0xa5)],'datasetId':_0x59efe7['id'],'enableAI':![],'extraParams':_0x21c79e}),_0x5d8edb=a0_0x49611e[_0x4e9a82(0xaa)](_0x2aa892,_0x5beba7+_0x4e9a82(0xb0));writeFileSync(_0x5d8edb,_0x501dd7,{'encoding':_0x4e9a82(0xa3)}),console[_0x4e9a82(0xac)](_0x4e9a82(0x9b)+_0x5beba7+_0x4e9a82(0xb0)),logger['success']('api-doc',_0x4e9a82(0xab)+_0x5beba7,undefined,{'datasetCode':_0x59efe7['datasetCode'],'datasetName':_0x59efe7['name'],'filePath':_0x5d8edb,'progress':_0x170be4+'/'+_0x44ab22}),_0x4ab52b[_0x4e9a82(0xb3)]({'datasetCode':_0x59efe7[_0x4e9a82(0xa5)],'datasetName':_0x59efe7[_0x4e9a82(0x97)],'filePath':_0x5d8edb,'success':!![]});if(_0x170be4<_0x44ab22)await delay(0x1388);}catch(_0x5f3722){const _0x4ab4bd=_0x5f3722 instanceof Error?_0x5f3722[_0x4e9a82(0xa0)]:String(_0x5f3722);console[_0x4e9a82(0xac)](_0x4e9a82(0xa8)+_0x5beba7+_0x4e9a82(0xad)+_0x4ab4bd),logger[_0x4e9a82(0xa4)]('api-doc',_0x4e9a82(0x90)+_0x59efe7[_0x4e9a82(0xa5)],{'datasetCode':_0x59efe7[_0x4e9a82(0xa5)],'datasetName':_0x59efe7[_0x4e9a82(0x97)],'error':_0x4ab4bd,'progress':_0x170be4+'/'+_0x44ab22}),_0x4ab52b[_0x4e9a82(0xb3)]({'datasetCode':_0x59efe7[_0x4e9a82(0xa5)],'datasetName':_0x59efe7[_0x4e9a82(0x97)],'filePath':'','success':![],'error':_0x4ab4bd}),_0x170be4<_0x44ab22&&(console[_0x4e9a82(0xac)](_0x4e9a82(0x93)),await delay(0xbb8));}}return _0x4ab52b;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0xf437ea,_0x46f00f){const _0x32075f=a1_0x3352,_0x105758=_0xf437ea();while(!![]){try{const _0x4b32d1=-parseInt(_0x32075f(0xfa))/0x1*(parseInt(_0x32075f(0xf0))/0x2)+parseInt(_0x32075f(0xee))/0x3+-parseInt(_0x32075f(0xf4))/0x4+-parseInt(_0x32075f(0xf9))/0x5*(parseInt(_0x32075f(0xf5))/0x6)+-parseInt(_0x32075f(0xf7))/0x7*(parseInt(_0x32075f(0xfc))/0x8)+-parseInt(_0x32075f(0xef))/0x9+parseInt(_0x32075f(0xf8))/0xa*(parseInt(_0x32075f(0xf6))/0xb);if(_0x4b32d1===_0x46f00f)break;else _0x105758['push'](_0x105758['shift']());}catch(_0x5928e4){_0x105758['push'](_0x105758['shift']());}}}(a1_0x4ec2,0xb28e4));import{getApiDomain}from'../constant/domain.js';import{logger}from'../utils/logger.js';function a1_0x3352(_0x46f5d1,_0x4e3679){_0x46f5d1=_0x46f5d1-0xec;const _0x4ec212=a1_0x4ec2();let _0x33523b=_0x4ec212[_0x46f5d1];return _0x33523b;}import{getEnv}from'../constant/env.js';import{platformFetch}from'../core/api-client.js';function a1_0x4ec2(){const _0x342d54=['33ohOKpy','28KDfWWR','9239170qkjwRc','65ZPrWfy','2Stmfxz','length','648736qhXNiR','正在从服务器拉取模型列表...\x20(环境:\x20','&otype=array','2112699ofXetd','8516043oPruUb','270994ayhYmc','/api/node-toolbox/dataset/model-list?appcode=','name','replace','4591800vAfCYb','25422vPqqNt'];a1_0x4ec2=function(){return _0x342d54;};return a1_0x4ec2();}function cleanNewlines(_0x4b62bd){const _0x5dc8e5=a1_0x3352;return _0x4b62bd[_0x5dc8e5(0xf3)](/[\r\n]+/g,'\x20')['trim']();}function cleanDatasetName(_0xca3c7e){const _0x1ab349=a1_0x3352;if(!_0xca3c7e[_0x1ab349(0xf2)])return _0xca3c7e;return{..._0xca3c7e,'name':cleanNewlines(_0xca3c7e[_0x1ab349(0xf2)])};}export async function fetchModelList(_0x1236f3,_0x54cb04){const _0x1dd0ba=a1_0x3352,_0x594e98=getEnv(),_0x1c7488=getApiDomain()+_0x1dd0ba(0xf1)+_0x1236f3+_0x1dd0ba(0xed);logger['info']('fetch-model-list',_0x1dd0ba(0xec)+_0x594e98+')',{'apiUrl':_0x1c7488});const _0x38c0f5=await platformFetch(_0x1c7488,{'cookie':_0x54cb04,'label':'Fetch\x20datasets'}),_0x868ad9=(_0x38c0f5['configArray']??[])['map'](cleanDatasetName);return{'configArray':_0x868ad9,'count':_0x868ad9[_0x1dd0ba(0xfb)]};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x516d9b,_0x4ce52e){const _0x431059=a2_0x4b27,_0x2835a3=_0x516d9b();while(!![]){try{const _0x5e047e=parseInt(_0x431059(0x1d1))/0x1+parseInt(_0x431059(0x1da))/0x2+-parseInt(_0x431059(0x1c6))/0x3*(parseInt(_0x431059(0x1c3))/0x4)+parseInt(_0x431059(0x1e0))/0x5+parseInt(_0x431059(0x1df))/0x6+parseInt(_0x431059(0x1d8))/0x7+parseInt(_0x431059(0x1ce))/0x8*(-parseInt(_0x431059(0x1d9))/0x9);if(_0x5e047e===_0x4ce52e)break;else _0x2835a3['push'](_0x2835a3['shift']());}catch(_0x1985ee){_0x2835a3['push'](_0x2835a3['shift']());}}}(a2_0x40a7,0xd9313));import a2_0x478bc3 from'prettier';function a2_0x4b27(_0x5b6d1f,_0x442787){_0x5b6d1f=_0x5b6d1f-0x1bb;const _0x40a7a2=a2_0x40a7();let _0x4b275e=_0x40a7a2[_0x5b6d1f];return _0x4b275e;}function a2_0x40a7(){const _0x1a9619=['templates/generate-api','-client','4700142skpCdZ','4329035jQxiGf','api.ts.tpl','forEach','replace','api',',\x20env:\x20\x22','\x20config\x20set\x20app\x20<value>`','LOVRABET','alias','679636PMGaLx','{\x20apiConfigName:\x20','dirname','12XbqyFL','init-api','name','{\x20apiConfigName:\x20\x22','join','client.ts.tpl','success','Please\x20configure\x20app\x20code\x20first\x20via\x20`','704PUbeDS','typescript','datasetCode','809527edoFeK','replaceApiContent','../..','key','production','toUpperCase','-api','1640471KKKdkj','291276dPnCRe','3448486OeDkIh','format','utf8'];a2_0x40a7=function(){return _0x1a9619;};return a2_0x40a7();}import{mkdirSync,writeFileSync,readFileSync}from'node:fs';import a2_0x43f231 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(_0x229503,_0x17cf12,_0x2527dd,_0x359dd4,_0x75f9b6,_0xd0ed51,_0x269fe9){const _0x31e4b5=a2_0x4b27;if(!_0x2527dd)throw new Error(_0x31e4b5(0x1cd)+CLI_BIN_NAME+_0x31e4b5(0x1c0));const _0x10fb4c=_0x359dd4&&!_0x269fe9,_0x267a6c=_0x269fe9||_0x2527dd,_0x256ecc=_0x10fb4c?'CONFIG_NAMES.DEFAULT':'\x22'+_0x267a6c+'\x22',_0x342602=_0x75f9b6!==_0x31e4b5(0x1d5);let _0x540ea4;if(_0x10fb4c)_0x342602?_0x540ea4=_0x31e4b5(0x1c4)+_0x256ecc+_0x31e4b5(0x1bf)+_0x75f9b6+'\x22\x20}':_0x540ea4='';else{const _0x26bef2=_0x342602?_0x31e4b5(0x1bf)+_0x75f9b6+'\x22':'';_0x540ea4=_0x31e4b5(0x1c9)+_0x267a6c+'\x22'+_0x26bef2+'\x20}';}const _0x1d11ff=_0x17cf12?_0x17cf12+_0x31e4b5(0x1d7):_0x31e4b5(0x1be),_0xd9d6e8=_0x17cf12?_0x17cf12+_0x31e4b5(0x1de):'client',_0x24f41f=_0x17cf12&&!/^app-[a-f0-9]+$/i['test'](_0x17cf12)?_0x17cf12[_0x31e4b5(0x1bd)](/-/g,'_')[_0x31e4b5(0x1d6)]():_0x31e4b5(0x1c1),_0x52b53d=[];_0x229503[_0x31e4b5(0x1bc)](_0x2621bf=>{const _0x135581=_0x31e4b5;_0x52b53d['push']({'datasetCode':_0x2621bf[_0x135581(0x1d0)],'tableName':_0x2621bf['tableName'],'name':_0x2621bf[_0x135581(0x1c8)]||'','alias':_0x2621bf[_0x135581(0x1c2)]||_0x2621bf[_0x135581(0x1d4)]});});const _0x1184cb=fileURLToPath(import.meta.url),_0x2805e2=a2_0x43f231['resolve'](a2_0x43f231[_0x31e4b5(0x1c5)](_0x1184cb),_0x31e4b5(0x1d3)),_0x32088d=a2_0x43f231[_0x31e4b5(0x1ca)](_0x2805e2,_0x31e4b5(0x1dd)),_0xd3ae51=a2_0x43f231[_0x31e4b5(0x1ca)](_0x32088d,_0x31e4b5(0x1bb)),_0x79b0d7=a2_0x43f231[_0x31e4b5(0x1ca)](_0x32088d,_0x31e4b5(0x1cb)),_0x2ced51=_0xd0ed51;mkdirSync(_0x2ced51,{'recursive':!![]});const _0x35834b=_0x52b53d[0x0]?.['alias'],_0x220e16=readFileSync(_0xd3ae51,'utf8'),_0x319781=TemplateReplacer['replaceApiContent'](_0x220e16,_0x2527dd,_0x52b53d,_0x35834b,_0x1d11ff,_0x256ecc,undefined,_0x24f41f),_0x44217d=await a2_0x478bc3[_0x31e4b5(0x1db)](_0x319781,{'parser':_0x31e4b5(0x1cf)}),_0x23b927=a2_0x43f231[_0x31e4b5(0x1ca)](_0x2ced51,_0x1d11ff+'.ts');writeFileSync(_0x23b927,_0x44217d,{'encoding':_0x31e4b5(0x1dc)});const _0x5b3240=readFileSync(_0x79b0d7,_0x31e4b5(0x1dc)),_0x1b2eba=TemplateReplacer[_0x31e4b5(0x1d2)](_0x5b3240,_0x2527dd,_0x52b53d,_0x35834b,_0x1d11ff,_0x256ecc,_0x540ea4,_0x24f41f),_0xf0c6b9=await a2_0x478bc3[_0x31e4b5(0x1db)](_0x1b2eba,{'parser':_0x31e4b5(0x1cf)}),_0x113e5d=a2_0x43f231[_0x31e4b5(0x1ca)](_0x2ced51,_0xd9d6e8+'.ts');writeFileSync(_0x113e5d,_0xf0c6b9,{'encoding':_0x31e4b5(0x1dc)});const _0x63a7da=_0x52b53d['length'];return logger[_0x31e4b5(0x1cc)](_0x31e4b5(0x1c7),'API\x20文件生成成功!',undefined,{'apiFile':_0x23b927,'clientFile':_0x113e5d,'modelCount':_0x63a7da,'configName':_0x256ecc}),{'modelCount':_0x63a7da,'apiFilePath':_0x23b927,'clientFilePath':_0x113e5d,'configName':_0x256ecc};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a3_0xeb20(){const _0x123e12=['197303MHMGMP','18140SKjlXd','999IcBaGF','*\x20Login\x20successful!','792wautlJ','679bQlbfa','log','!\x20Login\x20failed.','Logging\x20in...\x20Please\x20complete\x20login\x20in\x20your\x20browser.','√\x20Valid\x20session\x20detected,\x20no\x20login\x20required.','start','60jSGZbO','29166UfHONA','339284ikbNSB','42285TxfRcD','12brbvuu','7010938gqGnOS','65orkAzY','stop'];a3_0xeb20=function(){return _0x123e12;};return a3_0xeb20();}(function(_0x52f520,_0x3777ae){const _0x266154=a3_0x1b86,_0x390741=_0x52f520();while(!![]){try{const _0x9d2742=-parseInt(_0x266154(0xd3))/0x1+parseInt(_0x266154(0xcd))/0x2+-parseInt(_0x266154(0xce))/0x3*(parseInt(_0x266154(0xcb))/0x4)+-parseInt(_0x266154(0xd1))/0x5*(parseInt(_0x266154(0xcc))/0x6)+-parseInt(_0x266154(0xc5))/0x7*(parseInt(_0x266154(0xc4))/0x8)+parseInt(_0x266154(0xd5))/0x9*(-parseInt(_0x266154(0xd4))/0xa)+parseInt(_0x266154(0xd0))/0xb*(parseInt(_0x266154(0xcf))/0xc);if(_0x9d2742===_0x3777ae)break;else _0x390741['push'](_0x390741['shift']());}catch(_0x27b225){_0x390741['push'](_0x390741['shift']());}}}(a3_0xeb20,0x1e4da));function a3_0x1b86(_0x29a381,_0x55e6e7){_0x29a381=_0x29a381-0xc3;const _0xeb2028=a3_0xeb20();let _0x1b861a=_0xeb2028[_0x29a381];return _0x1b861a;}import{getIsSessionValid}from'./is-session-valid.js';import{authServer}from'./auth-server.js';import{confirm}from'@inquirer/prompts';import a3_0x389ea6 from'ora';export async function runAuthServer(){const _0x57d478=a3_0x1b86,_0xce12cc=await getIsSessionValid();if(_0xce12cc){console[_0x57d478(0xc6)](_0x57d478(0xc9));return;}const _0x380536=await confirm({'message':'No\x20valid\x20session.\x20Login\x20now?','default':!![]});if(!_0x380536)return;const _0x54b9a7=a3_0x389ea6(_0x57d478(0xc8))[_0x57d478(0xca)](),_0x4be2bb=await authServer({'silent':!![]});_0x54b9a7[_0x57d478(0xd2)](),_0x4be2bb?console[_0x57d478(0xc6)](_0x57d478(0xc3)):console[_0x57d478(0xc6)](_0x57d478(0xc7));}
|
package/lib/auth/auth-server.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a4_0x39d48c=a4_0x46d2;(function(_0x445996,_0x866492){const _0x3d019e=a4_0x46d2,_0x1b6206=_0x445996();while(!![]){try{const _0x3576bb=parseInt(_0x3d019e(0x1b4))/0x1+-parseInt(_0x3d019e(0x187))/0x2*(parseInt(_0x3d019e(0x1a8))/0x3)+parseInt(_0x3d019e(0x18b))/0x4+-parseInt(_0x3d019e(0x1af))/0x5*(parseInt(_0x3d019e(0x197))/0x6)+parseInt(_0x3d019e(0x199))/0x7*(-parseInt(_0x3d019e(0x195))/0x8)+parseInt(_0x3d019e(0x1ab))/0x9*(-parseInt(_0x3d019e(0x1a4))/0xa)+-parseInt(_0x3d019e(0x193))/0xb*(-parseInt(_0x3d019e(0x196))/0xc);if(_0x3576bb===_0x866492)break;else _0x1b6206['push'](_0x1b6206['shift']());}catch(_0x3f3567){_0x1b6206['push'](_0x1b6206['shift']());}}}(a4_0x3455,0x8b397));import{writeFileSync}from'node:fs';import a4_0x2ae49e from'node:https';import{getUserDomain}from'../constant/domain.js';import{exec}from'node:child_process';import{getIsSessionValid}from'./is-session-valid.js';import{cookieFile}from'./constant.js';export async function authServer(_0x81b842){const _0x389ea2=a4_0x46d2,_0x4231eb=_0x81b842?.['silent']||![];if(await getIsSessionValid())return!![];const _0x181566=await(await fetch(_0x389ea2(0x1a7)))[_0x389ea2(0x1ae)]();return new Promise(async(_0x1dfc74,_0x24cbfd)=>{const _0x477669=_0x389ea2;let _0x20b548=0x0;const _0x2cfbff=a4_0x2ae49e['createServer'](_0x181566,async(_0x574669,_0x5b3c10)=>{const _0x421b8f=a4_0x46d2,_0x2d5d42=getUserDomain(),_0x55b53b=_0x574669['headers'][_0x421b8f(0x1a2)]||'',_0x791717=await fetch(_0x2d5d42+_0x421b8f(0x192),{'headers':{'cookie':_0x55b53b}})[_0x421b8f(0x18e)](_0x10f2cc=>_0x10f2cc[_0x421b8f(0x1ae)]()),_0x92f845=_0x791717&&_0x791717['session']&&_0x791717[_0x421b8f(0x18f)];if(_0x92f845){writeFileSync(cookieFile,_0x55b53b,_0x421b8f(0x1a3)),_0x1dfc74(!![]);const _0x2e9ada=_0x421b8f(0x1b3),_0x2bc3f9=_0x421b8f(0x19d)+'<span\x20id=\x22t\x22>5</span>'+_0x421b8f(0x1b2),_0x53f95e=_0x421b8f(0x18a),_0x3decc7=_0x421b8f(0x1a1)+_0x2e9ada+'</title></head>\x0a<body>\x0a\x20\x20<div>'+_0x2bc3f9+_0x421b8f(0x18d)+_0x53f95e+_0x421b8f(0x1aa);_0x5b3c10[_0x421b8f(0x1ad)](0xc8,{'Content-Type':_0x421b8f(0x1a9)}),_0x5b3c10[_0x421b8f(0x1a0)](_0x3decc7),_0x2cfbff[_0x421b8f(0x1ac)]();}else{const _0x2475e0=''+encodeURIComponent(_0x421b8f(0x1b1)+_0x20b548);_0x5b3c10[_0x421b8f(0x1ad)](0x12e,{'location':_0x2d5d42+_0x421b8f(0x198)+_0x2475e0}),_0x5b3c10[_0x421b8f(0x1a0)]();return;}});_0x2cfbff[_0x477669(0x19a)](0x0,'127.0.0.1',()=>{const _0x1efe7e=_0x477669,_0x2a8233=_0x2cfbff[_0x1efe7e(0x189)]();_0x20b548=typeof _0x2a8233===_0x1efe7e(0x19f)&&_0x2a8233?_0x2a8233['port']:Number(_0x2a8233);const _0x39f592=_0x1efe7e(0x1b1)+_0x20b548;!_0x4231eb&&(console[_0x1efe7e(0x1a5)](_0x1efe7e(0x190)),console[_0x1efe7e(0x1a5)](_0x1efe7e(0x191),_0x39f592),console[_0x1efe7e(0x1a5)]('🌐\x20Attempting\x20to\x20open\x20browser\x20automatically...'),console[_0x1efe7e(0x1a5)](''),console['log'](_0x1efe7e(0x188)),console['log']('')),openInBrowser(_0x39f592)['then'](_0x43cb7f=>{const _0x1fefdc=_0x1efe7e;!_0x4231eb&&(_0x43cb7f?console[_0x1fefdc(0x1a5)]('✅\x20Browser\x20opened.\x20Please\x20complete\x20login\x20in\x20the\x20browser.'):(console[_0x1fefdc(0x1a5)](_0x1fefdc(0x194)),console[_0x1fefdc(0x1a5)](_0x1fefdc(0x19c),_0x39f592)),console[_0x1fefdc(0x1a5)](''));})[_0x1efe7e(0x18c)](()=>{const _0x4fbe76=_0x1efe7e;!_0x4231eb&&(console[_0x4fbe76(0x1a5)]('⚠️\x20\x20Failed\x20to\x20open\x20browser\x20automatically'),console[_0x4fbe76(0x1a5)]('🔗\x20Please\x20copy\x20the\x20login\x20URL\x20into\x20your\x20browser:',_0x39f592),console[_0x4fbe76(0x1a5)](''));});}),_0x2cfbff['on'](_0x477669(0x1b6),_0x5657f1=>{!_0x4231eb&&console['error']('Auth\x20server\x20error:',_0x5657f1),_0x24cbfd(_0x5657f1);});});}function openInBrowser(_0x52f7ee){return new Promise(_0x2cc602=>{const _0x177b5e=a4_0x46d2,_0x12e444=process[_0x177b5e(0x1b7)];let _0x2dbb79;if(_0x12e444===_0x177b5e(0x1b5))_0x2dbb79=_0x177b5e(0x1b0)+_0x52f7ee+'\x22';else _0x12e444==='darwin'?_0x2dbb79=_0x177b5e(0x1a6)+_0x52f7ee+'\x22':_0x2dbb79=_0x177b5e(0x19e)+_0x52f7ee+'\x22';exec(_0x2dbb79,_0x148381=>{_0x148381?_0x2cc602(![]):_0x2cc602(!![]);});});}function a4_0x3455(){const _0x51f662=['5rEzqWA','cmd\x20/c\x20start\x20\x22\x22\x20\x22','https://dev.lovrabet.com:','\x20seconds.','Login\x20Successful','197520QCYvQT','win32','error','platform','4518ScWdAP','💡\x20If\x20the\x20browser\x20does\x20not\x20open\x20automatically,\x20copy\x20the\x20login\x20URL\x20above\x20into\x20your\x20browser.','address','Unable\x20to\x20close\x20automatically.\x20Please\x20close\x20this\x20tab\x20or\x20window\x20manually.','4146548lGeMHP','catch','</div>\x0a\x20\x20<div\x20id=\x22manualMsg\x22\x20style=\x22display:none;margin-top:10px;color:#d00;\x22>','then','user','🔐\x20Starting\x20login\x20service...','📍\x20Login\x20URL:','/api/auth/get-session','6982096LFHZpa','⚠️\x20\x20Failed\x20to\x20open\x20browser\x20automatically','19600otTPXO','24uTCQvw','5125662LpSNJd','/sign-in?redirect=','294WEirAD','listen','isAuth','🔗\x20Please\x20copy\x20the\x20login\x20URL\x20into\x20your\x20browser:','Login\x20successful.\x20Please\x20return\x20to\x20the\x20CLI\x20to\x20continue.\x20This\x20window\x20will\x20close\x20in\x20','xdg-open\x20\x22','object','end','<!doctype\x20html>\x0a<html>\x0a<head><meta\x20charset=\x22utf-8\x22><title>','cookie','utf-8','590540yJfxOO','log','open\x20\x22','https://g.yuntooai.com/cert/lovrabet-dev.json','669WbruOf','text/html;\x20charset=utf-8','</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>','72EXMotX','close','writeHead','json'];a4_0x3455=function(){return _0x51f662;};return a4_0x3455();}function a4_0x46d2(_0x3233e7,_0x566473){_0x3233e7=_0x3233e7-0x187;const _0x345596=a4_0x3455();let _0x46d248=_0x345596[_0x3233e7];return _0x46d248;}if(import.meta.main){const isAuth=await authServer();console[a4_0x39d48c(0x1a5)](a4_0x39d48c(0x19b),isAuth);}
|
package/lib/auth/constant.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a5_0x5518ac=a5_0x31ab;(function(_0x190301,_0x59680d){const _0x57a766=a5_0x31ab,_0x284d91=_0x190301();while(!![]){try{const _0x481ea3=parseInt(_0x57a766(0xcd))/0x1*(-parseInt(_0x57a766(0xce))/0x2)+-parseInt(_0x57a766(0xcc))/0x3+parseInt(_0x57a766(0xcb))/0x4*(-parseInt(_0x57a766(0xc9))/0x5)+parseInt(_0x57a766(0xd1))/0x6+parseInt(_0x57a766(0xd2))/0x7*(-parseInt(_0x57a766(0xd3))/0x8)+parseInt(_0x57a766(0xd0))/0x9*(parseInt(_0x57a766(0xd4))/0xa)+parseInt(_0x57a766(0xd5))/0xb;if(_0x481ea3===_0x59680d)break;else _0x284d91['push'](_0x284d91['shift']());}catch(_0x146bf9){_0x284d91['push'](_0x284d91['shift']());}}}(a5_0x4613,0xe4537));import{mkdirSync}from'node:fs';import{homedir}from'node:os';import{join}from'node:path';export const configDir=join(homedir(),a5_0x5518ac(0xca));export const cookieFile=join(configDir,a5_0x5518ac(0xcf));function a5_0x4613(){const _0xcee914=['47604546XwiNaQ','3035Vnieas','.lovrabet','6452ReYQoz','2488746HeWmbV','183WvanSQ','16560CaxauA','cookie','9JCzZIB','6784500qrCsuz','91eEYhoO','821968rAGhKj','1363980RQTPPe'];a5_0x4613=function(){return _0xcee914;};return a5_0x4613();}function a5_0x31ab(_0x31ceb8,_0x42c9c0){_0x31ceb8=_0x31ceb8-0xc9;const _0x4613da=a5_0x4613();let _0x31ab3e=_0x4613da[_0x31ceb8];return _0x31ab3e;}mkdirSync(configDir,{'recursive':!![]});
|
package/lib/auth/get-cookie.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a6_0x3589(){var _0x49e36e=['645DlTfSy','1177spQWpe','4FJVSlB','2595345bkZHfN','1ZKrikp','50712JYEsss','6649632jLayBI','1705230xWGJVG','49huQxai','40564aAVqpj','1087072lxjelE','30594NSnKhl'];a6_0x3589=function(){return _0x49e36e;};return a6_0x3589();}(function(_0x587376,_0x35629f){var _0x2716e5=a6_0x1bee,_0x5e9beb=_0x587376();while(!![]){try{var _0xc4efd4=parseInt(_0x2716e5(0x90))/0x1*(parseInt(_0x2716e5(0x95))/0x2)+-parseInt(_0x2716e5(0x8f))/0x3*(-parseInt(_0x2716e5(0x8e))/0x4)+-parseInt(_0x2716e5(0x8c))/0x5*(-parseInt(_0x2716e5(0x97))/0x6)+-parseInt(_0x2716e5(0x94))/0x7*(parseInt(_0x2716e5(0x96))/0x8)+-parseInt(_0x2716e5(0x92))/0x9+parseInt(_0x2716e5(0x93))/0xa+-parseInt(_0x2716e5(0x8d))/0xb*(-parseInt(_0x2716e5(0x91))/0xc);if(_0xc4efd4===_0x35629f)break;else _0x5e9beb['push'](_0x5e9beb['shift']());}catch(_0x55a543){_0x5e9beb['push'](_0x5e9beb['shift']());}}}(a6_0x3589,0x742bd));import{readFileSync}from'node:fs';function a6_0x1bee(_0xb383e9,_0xf24def){_0xb383e9=_0xb383e9-0x8c;var _0x3589d0=a6_0x3589();var _0x1beef3=_0x3589d0[_0xb383e9];return _0x1beef3;}import{cookieFile}from'./constant.js';export function getCookie(){try{return readFileSync(cookieFile,'utf-8');}catch{}return'';}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x1cae2b,_0x2fe2b1){const _0x515937=a7_0x3b03,_0x4e9a54=_0x1cae2b();while(!![]){try{const _0x2f9fb6=-parseInt(_0x515937(0xd3))/0x1+parseInt(_0x515937(0xd4))/0x2*(-parseInt(_0x515937(0xcc))/0x3)+parseInt(_0x515937(0xca))/0x4*(-parseInt(_0x515937(0xcf))/0x5)+parseInt(_0x515937(0xcd))/0x6+parseInt(_0x515937(0xd1))/0x7*(parseInt(_0x515937(0xce))/0x8)+parseInt(_0x515937(0xd0))/0x9+parseInt(_0x515937(0xd2))/0xa;if(_0x2f9fb6===_0x2fe2b1)break;else _0x4e9a54['push'](_0x4e9a54['shift']());}catch(_0x3974eb){_0x4e9a54['push'](_0x4e9a54['shift']());}}}(a7_0x1413,0xd3e20));import{existsSync,readFileSync}from'node:fs';import{getUserDomain}from'../constant/domain.js';function a7_0x1413(){const _0x13de26=['4YUVnVB','json','66966WoucsA','1437708jnhAHD','27128rqPpBh','4246255FyUzEI','4906476tXhZiE','2961jOuBuB','11092560BoCgDf','1231834OkRXhr','34cSQbFE'];a7_0x1413=function(){return _0x13de26;};return a7_0x1413();}import{cookieFile}from'./constant.js';function a7_0x3b03(_0x46b43f,_0x59f6c2){_0x46b43f=_0x46b43f-0xca;const _0x141302=a7_0x1413();let _0x3b031d=_0x141302[_0x46b43f];return _0x3b031d;}export async function getSessionUserInfo(){const _0x182d9c=a7_0x3b03;try{if(!existsSync(cookieFile))return null;const _0x2d8202=readFileSync(cookieFile,'utf-8'),_0x4d2846=await fetch(getUserDomain()+'/api/auth/get-session',{'headers':{'cookie':_0x2d8202}});if(!_0x4d2846['ok'])return null;const _0x28ce96=await _0x4d2846[_0x182d9c(0xcb)]();if(!_0x28ce96['session']||!_0x28ce96['user'])return null;return _0x28ce96;}catch{return null;}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x5a400a,_0x557f06){const _0x532d04=a8_0x1328,_0x2720b2=_0x5a400a();while(!![]){try{const _0x58e69c=-parseInt(_0x532d04(0x10a))/0x1*(parseInt(_0x532d04(0x112))/0x2)+parseInt(_0x532d04(0x10e))/0x3*(parseInt(_0x532d04(0x108))/0x4)+-parseInt(_0x532d04(0x10f))/0x5+-parseInt(_0x532d04(0x105))/0x6+-parseInt(_0x532d04(0x10c))/0x7+-parseInt(_0x532d04(0x10d))/0x8*(-parseInt(_0x532d04(0x111))/0x9)+parseInt(_0x532d04(0x106))/0xa;if(_0x58e69c===_0x557f06)break;else _0x2720b2['push'](_0x2720b2['shift']());}catch(_0x7060c){_0x2720b2['push'](_0x2720b2['shift']());}}}(a8_0xe963,0xa1805));function a8_0x1328(_0x23ffe2,_0x513b1f){_0x23ffe2=_0x23ffe2-0x105;const _0xe963cf=a8_0xe963();let _0x132827=_0xe963cf[_0x23ffe2];return _0x132827;}import{existsSync,readFileSync}from'node:fs';import{getUserDomain}from'../constant/domain.js';import{cookieFile}from'./constant.js';export async function getIsSessionValid(){const _0x38b5ff=a8_0x1328;try{if(!existsSync(cookieFile))return![];const _0x3e6e24=readFileSync(cookieFile,_0x38b5ff(0x109)),_0x5e2cfe=await fetch(getUserDomain()+_0x38b5ff(0x113),{'headers':{'cookie':_0x3e6e24}})[_0x38b5ff(0x110)](_0x2c0da1=>_0x2c0da1[_0x38b5ff(0x10b)]());return _0x5e2cfe&&_0x5e2cfe['session']&&_0x5e2cfe[_0x38b5ff(0x107)];}catch{}return![];}function a8_0xe963(){const _0x316312=['/api/auth/get-session','769356UpIkRF','21164100qnwlAk','user','4zyKIEF','utf-8','2ZygIow','json','6240367gtgtBd','8OgRAeU','3620301nTcDUm','5815180knkdyX','then','7499007DpPgOM','1312148dALCYb'];a8_0xe963=function(){return _0x316312;};return a8_0xe963();}
|
package/lib/auth/logout.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x5de8d7,_0x562138){var _0x3eef27=a9_0x2783,_0x39a9b4=_0x5de8d7();while(!![]){try{var _0x53f236=parseInt(_0x3eef27(0x135))/0x1+parseInt(_0x3eef27(0x12e))/0x2+parseInt(_0x3eef27(0x132))/0x3*(parseInt(_0x3eef27(0x12d))/0x4)+-parseInt(_0x3eef27(0x136))/0x5+parseInt(_0x3eef27(0x130))/0x6+parseInt(_0x3eef27(0x133))/0x7*(-parseInt(_0x3eef27(0x12f))/0x8)+-parseInt(_0x3eef27(0x131))/0x9;if(_0x53f236===_0x562138)break;else _0x39a9b4['push'](_0x39a9b4['shift']());}catch(_0x4aa789){_0x39a9b4['push'](_0x39a9b4['shift']());}}}(a9_0x33f2,0x89574));import{unlinkSync,existsSync}from'node:fs';import{cookieFile}from'./constant.js';function a9_0x33f2(){var _0x125720=['1519122txlqgP','3596056mJFesj','6441246piPxFD','8777232LBMFdp','32415bssmxR','14IIwUgO','log','312470YMXFFN','110535zZJSxg','!\x20Not\x20logged\x20in','✓\x20Logged\x20out','116pahyFt'];a9_0x33f2=function(){return _0x125720;};return a9_0x33f2();}function a9_0x2783(_0x128b82,_0x10ccd1){_0x128b82=_0x128b82-0x12b;var _0x33f235=a9_0x33f2();var _0x278354=_0x33f235[_0x128b82];return _0x278354;}export function logout(){var _0x3478b8=a9_0x2783;existsSync(cookieFile)?(unlinkSync(cookieFile),console[_0x3478b8(0x134)](_0x3478b8(0x12c))):console[_0x3478b8(0x134)](_0x3478b8(0x12b));}
|
package/lib/cli-flags.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x4fadd7,_0x152d06){const _0x27a65f=a10_0xa68b,_0x2c9f56=_0x4fadd7();while(!![]){try{const _0x5791fc=parseInt(_0x27a65f(0x132))/0x1*(parseInt(_0x27a65f(0x137))/0x2)+-parseInt(_0x27a65f(0x12e))/0x3+parseInt(_0x27a65f(0x12d))/0x4+parseInt(_0x27a65f(0x134))/0x5*(parseInt(_0x27a65f(0x133))/0x6)+parseInt(_0x27a65f(0x135))/0x7*(parseInt(_0x27a65f(0x12f))/0x8)+parseInt(_0x27a65f(0x131))/0x9+parseInt(_0x27a65f(0x130))/0xa*(-parseInt(_0x27a65f(0x136))/0xb);if(_0x5791fc===_0x152d06)break;else _0x2c9f56['push'](_0x2c9f56['shift']());}catch(_0x582cd8){_0x2c9f56['push'](_0x2c9f56['shift']());}}}(a10_0xc3b2,0x3a72b));function a10_0xc3b2(){const _0x1b1302=['83938yiQNXy','769152jSLPuR','707964iraUQS','8LvbREa','790OHhJcm','4123440ucVode','11jTAlsw','487608TtPvrz','5IZhJGg','2979893aVqoDL','159247qJOHhL'];a10_0xc3b2=function(){return _0x1b1302;};return a10_0xc3b2();}function a10_0xa68b(_0x598f70,_0x3ab23f){_0x598f70=_0x598f70-0x12d;const _0xc3b25d=a10_0xc3b2();let _0xa68b64=_0xc3b25d[_0x598f70];return _0xa68b64;}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_0x8ae1e5=a11_0x378d;(function(_0x27e335,_0x5bb503){const _0x4008ba=a11_0x378d,_0x215577=_0x27e335();while(!![]){try{const _0x16e876=-parseInt(_0x4008ba(0x11f))/0x1+-parseInt(_0x4008ba(0x12b))/0x2+parseInt(_0x4008ba(0x12a))/0x3*(parseInt(_0x4008ba(0x111))/0x4)+parseInt(_0x4008ba(0x110))/0x5+parseInt(_0x4008ba(0x107))/0x6+parseInt(_0x4008ba(0x123))/0x7*(parseInt(_0x4008ba(0x133))/0x8)+parseInt(_0x4008ba(0x118))/0x9*(-parseInt(_0x4008ba(0x127))/0xa);if(_0x16e876===_0x5bb503)break;else _0x215577['push'](_0x215577['shift']());}catch(_0x4bc2c2){_0x215577['push'](_0x215577['shift']());}}}(a11_0x34b1,0xe5e9a));import a11_0x333ecb from'meow';import{showHelp}from'./help.js';import{CliError,CliErrors}from'./errors.js';import{isKnownService,getServiceEntry,findDefinition,deprecatedAliases}from'./commands/registry.js';function a11_0x378d(_0x9c8e14,_0x136832){_0x9c8e14=_0x9c8e14-0x103;const _0x34b1b4=a11_0x34b1();let _0x378d46=_0x34b1b4[_0x9c8e14];return _0x378d46;}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_0x21da11}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'))['dynamicCliFlags'];}catch{}function a11_0x34b1(){const _0x503cee=['stderr','21zxfWXh','name','unknown','explicitAppName','1700zPRrkA','error','code','159QHcYEr','3327526IEqyjx','riskLevel','./constant/env.js','unknown_service','Unexpected\x20error:','defaultCommand','write','Hint:\x20','2320208dfCLxi','wildcardDef','input','slice','apiDir','env','1326876pxiZDv','message','command','⚠\x20`','Error:\x20','hint','apiDomain','ExitPromptError','userDomain','4138385JrZAja','119132HufNau','unknownCommand','raw','log','./context.js','runtimeDomain','./constant/domain.js','36648mZOaum','\x20\x20Please\x20update\x20your\x20command\x20and\x20try\x20again.\x0a','verbose','appCode','global','cancelled','cookie','199675QkOMCi','help','pageSize'];a11_0x34b1=function(){return _0x503cee;};return a11_0x34b1();}const helpText=generateFullHelp(),cliVersion=GIT_COMMIT!==a11_0x8ae1e5(0x125)?VERSION+'\x20('+GIT_COMMIT+',\x20'+BUILD_TIME['slice'](0x0,0xa)+')':VERSION,cli=a11_0x333ecb(helpText,{'importMeta':import.meta,'version':cliVersion,'flags':{...buildMeowFlags(),...dynamicCliFlags||{}}});registerOtelShutdownOnExit(),await run();async function run(){const _0x2ee05b=a11_0x8ae1e5;let _0x1dc036=cli[_0x2ee05b(0x103)][0x0],_0x4872f5=cli[_0x2ee05b(0x103)][0x1];const _0x28ad73=cli['flags'];if(!_0x1dc036){await reportCliHelpTrace(_0x2ee05b(0x11c)),showHelp();return;}const _0x429eec=deprecatedAliases[_0x1dc036];if(_0x429eec&&!isKnownService(_0x1dc036)){const _0x559129=_0x4872f5?CLI_BIN_NAME+'\x20'+_0x1dc036+'\x20'+_0x4872f5:CLI_BIN_NAME+'\x20'+_0x1dc036,_0x4a33c9=CLI_BIN_NAME+'\x20'+_0x429eec['service']+'\x20'+_0x429eec[_0x2ee05b(0x109)];console[_0x2ee05b(0x128)](_0x2ee05b(0x10a)+_0x559129+'`\x20has\x20been\x20moved\x20to\x20`'+_0x4a33c9+'`\x20in\x20v2.0.\x0a'+_0x2ee05b(0x119)),await exitWithOtelShutdown(0x1);}if(!isKnownService(_0x1dc036)){await reportCliHelpTrace(_0x2ee05b(0x12e),{'service':_0x1dc036}),showHelp();return;}const _0x14148d=getServiceEntry(_0x1dc036);if(_0x28ad73['env']&&typeof _0x28ad73[_0x2ee05b(0x106)]==='string'){const {initEnv:_0x9fc255}=await import(_0x2ee05b(0x12d));_0x9fc255(_0x28ad73[_0x2ee05b(0x106)]);}const {buildConfigFromFlags:_0x5b19c6}=await import(_0x2ee05b(0x115)),_0x2f0493=_0x5b19c6(_0x28ad73);if(!_0x28ad73[_0x2ee05b(0x106)]&&_0x2f0493[_0x2ee05b(0x106)]){const {initEnv:_0x2f7fb8}=await import(_0x2ee05b(0x12d));_0x2f7fb8(_0x2f0493['env']);}if(_0x2f0493[_0x2ee05b(0x113)]?.[_0x2ee05b(0x10d)]||_0x2f0493[_0x2ee05b(0x113)]?.[_0x2ee05b(0x10f)]||_0x2f0493['raw']?.[_0x2ee05b(0x116)]){const {initDomains:_0x4ae0f7}=await import(_0x2ee05b(0x117));_0x4ae0f7({'apiDomain':_0x2f0493['raw']['apiDomain']||undefined,'userDomain':_0x2f0493[_0x2ee05b(0x113)]['userDomain']||undefined,'runtimeDomain':_0x2f0493[_0x2ee05b(0x113)]['runtimeDomain']||undefined});}if(!_0x4872f5){if(_0x14148d[_0x2ee05b(0x130)])_0x4872f5=_0x14148d['defaultCommand'];else{if(_0x14148d['wildcardDef']){if(_0x28ad73[_0x2ee05b(0x120)]){console[_0x2ee05b(0x114)](generateCommandHelp(_0x14148d['wildcardDef']));return;}await dispatchDeclarative(_0x14148d[_0x2ee05b(0x134)],_0x1dc036,'',[],_0x28ad73,_0x2f0493);return;}else{printServiceHelp(_0x1dc036);return;}}}if(_0x28ad73['help']&&!findDefinition(_0x1dc036,_0x4872f5)){printServiceHelp(_0x1dc036);return;}{let _0x2e16aa=findDefinition(_0x1dc036,_0x4872f5),_0x117b64=cli[_0x2ee05b(0x103)][_0x2ee05b(0x104)](0x2);if(!_0x2e16aa){if(_0x14148d[_0x2ee05b(0x134)]){if(_0x28ad73[_0x2ee05b(0x120)]){console[_0x2ee05b(0x114)](generateCommandHelp(_0x14148d[_0x2ee05b(0x134)]));return;}_0x2e16aa=_0x14148d[_0x2ee05b(0x134)],_0x117b64=[_0x4872f5,...cli[_0x2ee05b(0x103)]['slice'](0x2)];}else{printServiceHelp(_0x1dc036),await handleErrorAsync(CliErrors[_0x2ee05b(0x112)](_0x1dc036+'\x20'+_0x4872f5));return;}}if(_0x28ad73[_0x2ee05b(0x120)]){console['log'](generateCommandHelp(_0x2e16aa));return;}await dispatchDeclarative(_0x2e16aa,_0x1dc036,_0x4872f5,_0x117b64,_0x28ad73,_0x2f0493);}}async function dispatchDeclarative(_0x5b311f,_0x23110e,_0x272cba,_0x399ad5,_0x4054b6,_0xb65a55){const _0x10e4f3=a11_0x8ae1e5,_0x545bd5=Date['now']();let _0x171b66;try{await runCommand(_0x5b311f,{'rawFlags':_0x4054b6,'args':_0x399ad5,'resolveAppCode':()=>_0xb65a55[_0x10e4f3(0x11b)]||_0x4054b6['appcode']||process.env.RABETBASE_APPCODE||process.env.LOVRABET_APPCODE||undefined,'resolveCookie':()=>_0xb65a55[_0x10e4f3(0x11e)]||getCookie(),'resolveApiDomain':()=>getApiDomain(),'isNonInteractive':a11_0x21da11(_0x4054b6),'defaultFormat':_0xb65a55['format'],'defaultPageSize':_0xb65a55[_0x10e4f3(0x121)],'defaultVerbose':_0xb65a55[_0x10e4f3(0x11a)],'apiDir':_0xb65a55[_0x10e4f3(0x105)],'riskLevel':_0xb65a55[_0x10e4f3(0x12c)],'selectedAppName':_0xb65a55[_0x10e4f3(0x126)]});}catch(_0x5508b2){_0x171b66=_0x5508b2;}await reportCommandTrace({'service':_0x23110e,'command':_0x272cba,'flags':_0x4054b6,'durationMs':Date['now']()-_0x545bd5,'error':_0x171b66});if(_0x171b66)await handleErrorAsync(_0x171b66);}function printServiceHelp(_0x46d161){const _0x511f9b=a11_0x8ae1e5;console[_0x511f9b(0x114)](generateServiceHelp(_0x46d161));}async function handleErrorAsync(_0x3c0b89){const _0x1b0176=a11_0x8ae1e5;if(_0x3c0b89 instanceof Error&&_0x3c0b89[_0x1b0176(0x124)]===_0x1b0176(0x10e))return process[_0x1b0176(0x122)][_0x1b0176(0x131)]('\x0aCancelled.\x0a'),await exitWithOtelShutdown(0x0);if(_0x3c0b89 instanceof CliError){if(_0x3c0b89[_0x1b0176(0x129)]===_0x1b0176(0x11d))return process[_0x1b0176(0x122)][_0x1b0176(0x131)]('\x0a'+_0x3c0b89[_0x1b0176(0x108)]+'\x0a'),await exitWithOtelShutdown(0x0);console['error'](_0x1b0176(0x10b)+_0x3c0b89[_0x1b0176(0x108)]);if(_0x3c0b89[_0x1b0176(0x10c)])console['error'](_0x1b0176(0x132)+_0x3c0b89[_0x1b0176(0x10c)]);return await exitWithOtelShutdown(_0x3c0b89['exitCode']);}return console[_0x1b0176(0x128)](_0x1b0176(0x12f),_0x3c0b89),await exitWithOtelShutdown(0x1);}
|
package/lib/commands/api/doc.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a12_0x5575d6=a12_0x1bb6;(function(_0x5b307b,_0x2f8bb3){const _0x360742=a12_0x1bb6,_0x76d9a4=_0x5b307b();while(!![]){try{const _0x57a53d=-parseInt(_0x360742(0xa3))/0x1*(-parseInt(_0x360742(0xcc))/0x2)+-parseInt(_0x360742(0xd0))/0x3*(parseInt(_0x360742(0xd2))/0x4)+-parseInt(_0x360742(0xba))/0x5+-parseInt(_0x360742(0xbb))/0x6+parseInt(_0x360742(0xc2))/0x7*(-parseInt(_0x360742(0xc8))/0x8)+-parseInt(_0x360742(0xb1))/0x9*(-parseInt(_0x360742(0xd7))/0xa)+parseInt(_0x360742(0x9c))/0xb*(parseInt(_0x360742(0xd1))/0xc);if(_0x57a53d===_0x2f8bb3)break;else _0x76d9a4['push'](_0x76d9a4['shift']());}catch(_0x38fc6f){_0x76d9a4['push'](_0x76d9a4['shift']());}}}(a12_0x1109,0x62222));import a12_0x29e374 from'ora';import{fetchModelList}from'../../api/fetch-model-list.js';import{generateDatasetDocs}from'../../api/api-doc.js';import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL}from'../common/flags.js';function a12_0x1109(){const _0x5dd382=['304220fVjVbR','datasetName','split','succeed','6tNPXaV','1466412ncDVgE','1316496EQZeEX','\x1b[90m*\x20Filtered\x20','str','appCode','Invalid\x20--params:\x20','230Wmnyjh','\x20of\x20','length','stdout','success','55MCvRXH','padStart','Doc\x20generation\x20complete:\x20','Fetched\x20','):\x20','✓\x20Generated\x20','error','4kmndZI','isArray','\x1b[90m*\x20Generating\x20docs\x20for:\x20','object','parse','string','\x1b[33m!\x20The\x20following\x20dataset\x20codes\x20do\x20not\x20exist:\x20','datasetCode','\x20doc(s)\x20failed','join','map','trim','output','--datasetcode\x20cannot\x20be\x20empty.','109314QwhhWw','message','\x20succeeded,\x20','\x20file(s)','None\x20of\x20the\x20specified\x20dataset\x20codes\x20exist:\x20','validation','./docs','params','filter','1760600cZdzTx','365886EbdHeh','\x0d\x20\x20[','start','log','datasetcode','...','must\x20be\x20a\x20JSON\x20object','714axSDSa','Filter:\x20comma-separated\x20dataset\x20codes\x20to\x20generate\x20docs\x20for','write','\x1b[0m','Generate\x20markdown\x20documentation\x20for\x20all\x20datasets','has','2000ApSvCL','Provide\x20a\x20valid\x20JSON\x20object,\x20e.g.\x20--params\x20\x27{\x22key\x22:\x22value\x22}\x27','cookie','doc'];a12_0x1109=function(){return _0x5dd382;};return a12_0x1109();}function a12_0x1bb6(_0x47cff6,_0x64000f){_0x47cff6=_0x47cff6-0x9c;const _0x1109f7=a12_0x1109();let _0x1bb61e=_0x1109f7[_0x47cff6];return _0x1bb61e;}export const apiDoc={'service':'api','command':a12_0x5575d6(0xcb),'description':a12_0x5575d6(0xc6),'risk':a12_0x5575d6(0xc4),'requiresAppCode':!![],'hasFormat':![],'flags':[{...APPCODE_FLAG_OPTIONAL,'hidden':!![]},{'name':a12_0x5575d6(0xaf),'type':'string','description':'Output\x20directory\x20(default:\x20./docs)'},{'name':a12_0x5575d6(0xbf),'type':a12_0x5575d6(0xa8),'description':a12_0x5575d6(0xc3)},{'name':a12_0x5575d6(0xb8),'type':'string','description':'Extra\x20params\x20passed\x20to\x20the\x20doc\x20generator\x20(JSON\x20object)'}],async 'execute'(_0x48d0a8){const _0xb63799=a12_0x5575d6,_0x281341=_0x48d0a8[_0xb63799(0xd4)](_0xb63799(0xaf))||_0xb63799(0xb7),_0x139826=_0x48d0a8[_0xb63799(0xd4)]('datasetcode'),_0x42803a=_0x48d0a8[_0xb63799(0xd4)]('params');let _0x1971bc;if(_0x42803a)try{_0x1971bc=JSON[_0xb63799(0xa7)](_0x42803a);if(typeof _0x1971bc!==_0xb63799(0xa6)||_0x1971bc===null||Array[_0xb63799(0xa4)](_0x1971bc))throw new Error(_0xb63799(0xc1));}catch(_0x46df63){throw CliErrors['validation'](_0xb63799(0xd6)+(_0x46df63 instanceof Error?_0x46df63[_0xb63799(0xb2)]:String(_0x46df63)),_0xb63799(0xc9));}let _0x2aff03;if(_0x139826){const _0x348e91=_0x139826[_0xb63799(0xce)](',')[_0xb63799(0xad)](_0x415372=>_0x415372[_0xb63799(0xae)]())[_0xb63799(0xb9)](_0x3e7531=>_0x3e7531[_0xb63799(0xd9)]>0x0);if(_0x348e91[_0xb63799(0xd9)]===0x0)throw CliErrors['validation'](_0xb63799(0xb0));_0x2aff03=new Set(_0x348e91),console[_0xb63799(0xbe)](_0xb63799(0xa5)+_0x348e91[_0xb63799(0xac)](',\x20')+'\x1b[0m');}const _0xaabfa0=a12_0x29e374('Fetching\x20dataset\x20list\x20for\x20'+_0x48d0a8[_0xb63799(0xd5)]+_0xb63799(0xc0))[_0xb63799(0xbd)]();let _0x2ade98;try{({configArray:_0x2ade98}=await fetchModelList(_0x48d0a8[_0xb63799(0xd5)],_0x48d0a8[_0xb63799(0xca)]),_0xaabfa0[_0xb63799(0xcf)](_0xb63799(0x9f)+_0x2ade98[_0xb63799(0xd9)]+'\x20dataset(s)'));}catch(_0x564e13){_0xaabfa0['fail']('Failed\x20to\x20fetch\x20datasets');throw _0x564e13;}if(_0x2ade98['length']===0x0)return console['log']('!\x20No\x20datasets\x20found.'),{'ok':!![]};let _0x188c96=_0x2ade98;if(_0x2aff03){_0x188c96=_0x2ade98[_0xb63799(0xb9)](_0xa6603f=>_0x2aff03[_0xb63799(0xc7)](_0xa6603f[_0xb63799(0xaa)]));const _0x5a32da=[..._0x2aff03][_0xb63799(0xb9)](_0x54783c=>!_0x2ade98['some'](_0x1f8c97=>_0x1f8c97['datasetCode']===_0x54783c));_0x5a32da[_0xb63799(0xd9)]>0x0&&console[_0xb63799(0xbe)](_0xb63799(0xa9)+_0x5a32da[_0xb63799(0xac)](',\x20')+_0xb63799(0xc5));if(_0x188c96['length']===0x0)throw CliErrors[_0xb63799(0xb6)](_0xb63799(0xb5)+[..._0x2aff03][_0xb63799(0xac)](',\x20'));console[_0xb63799(0xbe)](_0xb63799(0xd3)+_0x188c96[_0xb63799(0xd9)]+_0xb63799(0xd8)+_0x2ade98[_0xb63799(0xd9)]+'\x20dataset(s)\x1b[0m');}let _0x169b39=0x0;const _0x6527c2=await generateDatasetDocs(_0x188c96,_0x48d0a8[_0xb63799(0xd5)],_0x48d0a8[_0xb63799(0xca)],_0x281341,(_0x263322,_0x564eee,_0x15dedd)=>{const _0x4db18e=_0xb63799;_0x169b39=_0x263322,process[_0x4db18e(0xda)][_0x4db18e(0xc4)](_0x4db18e(0xbc)+String(_0x263322)[_0x4db18e(0x9d)](String(_0x564eee)['length'])+'/'+_0x564eee+']\x20'+_0x15dedd+'.md');},_0x1971bc);if(_0x169b39>0x0)process[_0xb63799(0xda)][_0xb63799(0xc4)]('\x0a');const _0x279f54=_0x6527c2['filter'](_0x3a0c42=>_0x3a0c42[_0xb63799(0xdb)])['length'],_0x47676d=_0x6527c2[_0xb63799(0xb9)](_0x333ec7=>!_0x333ec7[_0xb63799(0xdb)])[_0xb63799(0xd9)];console[_0xb63799(0xbe)](),console[_0xb63799(0xbe)](_0xb63799(0xa1)+_0x279f54+'\x20doc(s)\x20in\x20'+_0x281341);if(_0x47676d>0x0){console[_0xb63799(0xa2)]('!\x20'+_0x47676d+_0xb63799(0xab));for(const _0x26828e of _0x6527c2[_0xb63799(0xb9)](_0xdaa1dd=>!_0xdaa1dd['success'])){console[_0xb63799(0xa2)]('\x20\x20•\x20'+_0x26828e[_0xb63799(0xcd)]+'\x20('+_0x26828e[_0xb63799(0xaa)]+_0xb63799(0xa0)+_0x26828e['error']);}}return{'ok':_0x47676d===0x0,'message':_0x47676d>0x0?'Doc\x20generation:\x20'+_0x279f54+_0xb63799(0xb3)+_0x47676d+'\x20failed':_0xb63799(0x9e)+_0x279f54+_0xb63799(0xb4)};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x5a7dd5,_0x2a4c5c){const _0x50b7ba=a13_0x477f,_0x5508e6=_0x5a7dd5();while(!![]){try{const _0x457b4b=-parseInt(_0x50b7ba(0x1d6))/0x1+parseInt(_0x50b7ba(0x1da))/0x2+-parseInt(_0x50b7ba(0x1dc))/0x3*(parseInt(_0x50b7ba(0x1d9))/0x4)+-parseInt(_0x50b7ba(0x1d7))/0x5+parseInt(_0x50b7ba(0x1d8))/0x6*(-parseInt(_0x50b7ba(0x1dd))/0x7)+parseInt(_0x50b7ba(0x1de))/0x8+parseInt(_0x50b7ba(0x1db))/0x9;if(_0x457b4b===_0x2a4c5c)break;else _0x5508e6['push'](_0x5508e6['shift']());}catch(_0xdef3fd){_0x5508e6['push'](_0x5508e6['shift']());}}}(a13_0x3ded,0xcfe09));function a13_0x477f(_0x45a8c4,_0x2f5398){_0x45a8c4=_0x45a8c4-0x1d6;const _0x3ded93=a13_0x3ded();let _0x477f69=_0x3ded93[_0x45a8c4];return _0x477f69;}function a13_0x3ded(){const _0x1c8541=['28887246VABBaw','6dIuYol','574Tffuzq','11464568xCjSCW','1040263IxbPQJ','7079705duaLTo','124284NIfHNU','1614444eKrKHP','2341348lYWWOY'];a13_0x3ded=function(){return _0x1c8541;};return a13_0x3ded();}import{apiList}from'./list.js';import{apiPull}from'./pull.js';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_0x15f40f=a14_0x942f;(function(_0x272eea,_0x165909){const _0x1bf64a=a14_0x942f,_0x4f00aa=_0x272eea();while(!![]){try{const _0x5c3c45=-parseInt(_0x1bf64a(0x16d))/0x1*(parseInt(_0x1bf64a(0x177))/0x2)+-parseInt(_0x1bf64a(0x168))/0x3*(parseInt(_0x1bf64a(0x16f))/0x4)+parseInt(_0x1bf64a(0x169))/0x5*(-parseInt(_0x1bf64a(0x16e))/0x6)+-parseInt(_0x1bf64a(0x178))/0x7+-parseInt(_0x1bf64a(0x174))/0x8*(-parseInt(_0x1bf64a(0x176))/0x9)+-parseInt(_0x1bf64a(0x170))/0xa*(-parseInt(_0x1bf64a(0x16a))/0xb)+parseInt(_0x1bf64a(0x16c))/0xc;if(_0x5c3c45===_0x165909)break;else _0x4f00aa['push'](_0x4f00aa['shift']());}catch(_0x598d41){_0x4f00aa['push'](_0x4f00aa['shift']());}}}(a14_0x3146,0x831ef));import{initEnv}from'../../constant/env.js';import{fetchModelList}from'../../api/fetch-model-list.js';function a14_0x942f(_0x47e0cf,_0x445f64){_0x47e0cf=_0x47e0cf-0x168;const _0x31464f=a14_0x3146();let _0x942f8a=_0x31464f[_0x47e0cf];return _0x942f8a;}import{APPCODE_FLAG_OPTIONAL}from'../common/flags.js';function a14_0x3146(){const _0x2345b6=['201220myIJgd','209TKuPtx','str','33690696oUdugw','129LXhZjU','114AcuMdl','955984oNwWqR','51360OVmUhc','isDefault','production','cookie','2288TPVXCN','push','3051xktyBB','3392qtUuRe','7025291xUjIAI','appcode','api','6YdYScd'];a14_0x3146=function(){return _0x2345b6;};return a14_0x3146();}import{resolveTargetApps}from'./shared.js';export const apiList={'service':a14_0x15f40f(0x17a),'command':'list','description':'List\x20all\x20datasets/models\x20for\x20the\x20configured\x20app(s)','risk':'read','requiresAppCode':!![],'flags':[{...APPCODE_FLAG_OPTIONAL,'hidden':!![]}],async 'execute'(_0x34d4a5){const _0x285e6c=a14_0x15f40f,_0xa25587=_0x34d4a5[_0x285e6c(0x16b)](_0x285e6c(0x179)),_0x2c5a24=resolveTargetApps(_0x34d4a5,_0xa25587);if(_0x2c5a24){const _0x34bb18=[];for(const _0x241135 of _0x2c5a24){const _0x5a18ed=_0x241135[_0x285e6c(0x173)]||_0x34d4a5[_0x285e6c(0x173)],_0x47649b=_0x241135['env']||_0x285e6c(0x172);initEnv(_0x47649b);const {configArray:_0x1f6c14}=await fetchModelList(_0x241135['appcode'],_0x5a18ed);_0x34bb18[_0x285e6c(0x175)](..._0x1f6c14['map'](_0x545f42=>({..._0x545f42,'_appName':_0x241135['name'],'_appCode':_0x241135[_0x285e6c(0x179)],'_env':_0x47649b,'_isDefault':_0x241135[_0x285e6c(0x171)]})));}return{'ok':!![],'data':_0x34bb18};}const {configArray:_0xcfd3c7}=await fetchModelList(_0x34d4a5['appCode'],_0x34d4a5[_0x285e6c(0x173)]);return{'ok':!![],'data':_0xcfd3c7};}};
|
package/lib/commands/api/pull.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a15_0x19a1ef=a15_0x3405;function a15_0x5189(){const _0x2a9cae=['975508vKcYRg','Pull\x20datasets\x20and\x20generate\x20API\x20config\x20files\x20(./src/api/)','output','\x20succeeded,\x20','\x20model(s)','apiDir','appcode','write','1561365xSUujf','Output\x20directory\x20(default:\x20./src/api/)','105AygQWH','./src/api/','\x20failed','production','length','modelCount','clientFilePath','.ts','split','48SzfejC','client','log','Pulled\x20','58kqMfIE','56937NanIsW','...','isDefault',')...','start','Failed:\x20','970963lXGfHu','succeed','-client','Pulling\x20API\x20config\x20for\x20','join','api','str','794715siCCfG','\x20dataset(s)\x20→\x20','\x20\x20•\x20','94038hXOInS','6282342aMGfLm','pull','appCode','30KipxWI','error','Pulling\x20','name','cookie','env','fail','message','slice'];a15_0x5189=function(){return _0x2a9cae;};return a15_0x5189();}(function(_0x482d6a,_0x5582c9){const _0x2bcc1e=a15_0x3405,_0x3ba9cc=_0x482d6a();while(!![]){try{const _0x555892=parseInt(_0x2bcc1e(0x193))/0x1+parseInt(_0x2bcc1e(0x1ba))/0x2*(-parseInt(_0x2bcc1e(0x1bb))/0x3)+parseInt(_0x2bcc1e(0x1a3))/0x4+parseInt(_0x2bcc1e(0x1ad))/0x5*(parseInt(_0x2bcc1e(0x196))/0x6)+-parseInt(_0x2bcc1e(0x1c1))/0x7*(-parseInt(_0x2bcc1e(0x1b6))/0x8)+parseInt(_0x2bcc1e(0x1ab))/0x9*(-parseInt(_0x2bcc1e(0x19a))/0xa)+-parseInt(_0x2bcc1e(0x197))/0xb;if(_0x555892===_0x5582c9)break;else _0x3ba9cc['push'](_0x3ba9cc['shift']());}catch(_0x23e8ef){_0x3ba9cc['push'](_0x3ba9cc['shift']());}}}(a15_0x5189,0x883bb));import a15_0x46e17b from'ora';function a15_0x3405(_0x51d2b4,_0x598569){_0x51d2b4=_0x51d2b4-0x18f;const _0x518927=a15_0x5189();let _0x340512=_0x518927[_0x51d2b4];return _0x340512;}import a15_0x291640 from'node:path';import{initEnv,getEnv}from'../../constant/env.js';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':a15_0x19a1ef(0x191),'command':a15_0x19a1ef(0x198),'description':a15_0x19a1ef(0x1a4),'risk':a15_0x19a1ef(0x1aa),'requiresAppCode':!![],'hasFormat':![],'flags':[{...APPCODE_FLAG_OPTIONAL,'hidden':!![]},{'name':'output','type':'string','description':a15_0x19a1ef(0x1ac)}],async 'execute'(_0x2a6164){const _0x949471=a15_0x19a1ef,_0x5468a0=_0x2a6164[_0x949471(0x192)](_0x949471(0x1a9)),_0x43d2e9=_0x2a6164[_0x949471(0x192)](_0x949471(0x1a5))||undefined,_0x185363=resolveTargetApps(_0x2a6164,_0x5468a0);if(_0x185363){let _0x285da0=0x0,_0x4829ed=0x0;for(const _0x547462 of _0x185363){const _0x249cfc=_0x547462['cookie']||_0x2a6164[_0x949471(0x19e)],_0x4a7bed=_0x547462[_0x949471(0x19f)]||_0x949471(0x1b0);initEnv(_0x4a7bed);const _0x9b61a5=_0x547462[_0x949471(0x1a8)]||_0x43d2e9||_0x949471(0x1ae),_0x29a510=_0x547462[_0x949471(0x1bd)]?'':_0x547462['name']||_0x547462['appcode'],_0x13b337=a15_0x46e17b(_0x949471(0x19c)+_0x547462['name']+'\x20('+_0x547462[_0x949471(0x1a9)]+_0x949471(0x1be))[_0x949471(0x1bf)]();try{const {configArray:_0x4df56f}=await fetchModelList(_0x547462[_0x949471(0x1a9)],_0x249cfc),_0x61d351=await generateApiFile(_0x4df56f,_0x29a510,_0x547462['appcode'],_0x547462[_0x949471(0x1bd)],_0x4a7bed,_0x9b61a5,_0x547462[_0x949471(0x19d)]);_0x13b337[_0x949471(0x1c2)](_0x547462[_0x949471(0x19d)]+':\x20'+_0x4df56f[_0x949471(0x1b1)]+_0x949471(0x194)+_0x61d351[_0x949471(0x1b2)]+_0x949471(0x1a7)),console['log'](_0x949471(0x195)+_0x61d351['apiFilePath']),console[_0x949471(0x1b8)](_0x949471(0x195)+_0x61d351[_0x949471(0x1b3)]),_0x285da0++;}catch(_0x32e33e){_0x13b337[_0x949471(0x1a0)](_0x547462[_0x949471(0x19d)]+':\x20'+(_0x32e33e instanceof Error?_0x32e33e['message']:String(_0x32e33e))),_0x4829ed++;}}console[_0x949471(0x1b8)]();if(_0x4829ed>0x0)console[_0x949471(0x19b)]('!\x20'+_0x4829ed+'\x20app(s)\x20failed');return{'ok':_0x4829ed===0x0,'message':'Done:\x20'+_0x285da0+_0x949471(0x1a6)+_0x4829ed+_0x949471(0x1af)};}const _0x1dba7a=_0x5468a0&&_0x5468a0['includes']('-')?_0x5468a0[_0x949471(0x1b5)]('-')[_0x949471(0x1a2)](0x1)[_0x949471(0x190)]('-'):'',_0x10cd48=_0x43d2e9||_0x2a6164[_0x949471(0x1a8)]||_0x949471(0x1ae),_0x4aafb1=!_0x5468a0,_0x4d135a=a15_0x46e17b(_0x949471(0x18f)+_0x2a6164[_0x949471(0x199)]+_0x949471(0x1bc))[_0x949471(0x1bf)]();try{const {configArray:_0x45c336}=await fetchModelList(_0x2a6164[_0x949471(0x199)],_0x2a6164[_0x949471(0x19e)]),_0x510e21=await generateApiFile(_0x45c336,_0x1dba7a,_0x2a6164[_0x949471(0x199)],_0x4aafb1,getEnv(),_0x10cd48);_0x4d135a[_0x949471(0x1c2)](_0x949471(0x1b9)+_0x45c336[_0x949471(0x1b1)]+'\x20dataset(s),\x20generated\x20'+_0x510e21[_0x949471(0x1b2)]+_0x949471(0x1a7));const _0x2d05b4=_0x1dba7a?_0x1dba7a+'-api':_0x949471(0x191),_0x398ac1=_0x1dba7a?_0x1dba7a+_0x949471(0x1c3):_0x949471(0x1b7);return console[_0x949471(0x1b8)](_0x949471(0x195)+a15_0x291640[_0x949471(0x190)](_0x10cd48,_0x2d05b4+_0x949471(0x1b4))),console[_0x949471(0x1b8)]('\x20\x20•\x20'+a15_0x291640[_0x949471(0x190)](_0x10cd48,_0x398ac1+_0x949471(0x1b4))),{'ok':!![],'data':{'datasetCount':_0x45c336[_0x949471(0x1b1)],'modelCount':_0x510e21['modelCount']}};}catch(_0x312b71){_0x4d135a[_0x949471(0x1a0)](_0x949471(0x1c0)+(_0x312b71 instanceof Error?_0x312b71[_0x949471(0x1a1)]:String(_0x312b71)));throw _0x312b71;}}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x23e80c,_0x16cf57){const _0x1bda83=a16_0x59c1,_0x4cc3f8=_0x23e80c();while(!![]){try{const _0x26641d=-parseInt(_0x1bda83(0x1d8))/0x1*(-parseInt(_0x1bda83(0x1de))/0x2)+-parseInt(_0x1bda83(0x1df))/0x3+parseInt(_0x1bda83(0x1d6))/0x4+parseInt(_0x1bda83(0x1db))/0x5+-parseInt(_0x1bda83(0x1d5))/0x6+parseInt(_0x1bda83(0x1dd))/0x7+-parseInt(_0x1bda83(0x1d0))/0x8;if(_0x26641d===_0x16cf57)break;else _0x4cc3f8['push'](_0x4cc3f8['shift']());}catch(_0x24dde7){_0x4cc3f8['push'](_0x4cc3f8['shift']());}}}(a16_0x10a8,0xd4cd0));function a16_0x59c1(_0x3f75a3,_0x8bed1f){_0x3f75a3=_0x3f75a3-0x1d0;const _0x10a844=a16_0x10a8();let _0x59c102=_0x10a844[_0x3f75a3];return _0x59c102;}import{getMultiAppConfigs}from'../../utils/config.js';import{CliErrors}from'../../errors.js';function a16_0x10a8(){const _0x5492d7=['join','App\x20\x22','1466394QUapCI','4938120gfouYo','name','20rJfzXz','validation','length','1549335vZFVqL','filter','169666pxkxlg','61986EVLgFY','2288172pzRLKQ','2477920CXXWmB','selectedAppName','\x22\x20not\x20found\x20in\x20config.\x20Available:\x20'];a16_0x10a8=function(){return _0x5492d7;};return a16_0x10a8();}export function resolveTargetApps(_0x215acd,_0x141194){const _0x2631ab=a16_0x59c1;if(_0x141194)return null;let _0x502b43=getMultiAppConfigs();if(!_0x502b43||_0x502b43[_0x2631ab(0x1da)]===0x0)return null;if(_0x215acd[_0x2631ab(0x1d1)]){const _0x59410a=_0x502b43[_0x2631ab(0x1dc)](_0x17c65e=>_0x17c65e[_0x2631ab(0x1d7)]===_0x215acd[_0x2631ab(0x1d1)]);if(_0x59410a[_0x2631ab(0x1da)]===0x0){const _0x3c21e5=_0x502b43['map'](_0x59b0f8=>_0x59b0f8[_0x2631ab(0x1d7)])[_0x2631ab(0x1d3)](',\x20');throw CliErrors[_0x2631ab(0x1d9)](_0x2631ab(0x1d4)+_0x215acd['selectedAppName']+_0x2631ab(0x1d2)+_0x3c21e5);}_0x502b43=_0x59410a;}return _0x502b43;}
|
package/lib/commands/app/add.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a17_0x431fb5=a17_0x5cb7;(function(_0x3b9ce1,_0xafcfab){const _0x36f22f=a17_0x5cb7,_0x25dbc1=_0x3b9ce1();while(!![]){try{const _0x217da2=parseInt(_0x36f22f(0x141))/0x1*(parseInt(_0x36f22f(0x159))/0x2)+-parseInt(_0x36f22f(0x137))/0x3+parseInt(_0x36f22f(0x143))/0x4*(parseInt(_0x36f22f(0x15a))/0x5)+parseInt(_0x36f22f(0x13e))/0x6+parseInt(_0x36f22f(0x13d))/0x7+-parseInt(_0x36f22f(0x13f))/0x8+-parseInt(_0x36f22f(0x139))/0x9;if(_0x217da2===_0xafcfab)break;else _0x25dbc1['push'](_0x25dbc1['shift']());}catch(_0x125983){_0x25dbc1['push'](_0x25dbc1['shift']());}}}(a17_0x2bd0,0xca081));import{CliErrors}from'../../errors.js';function a17_0x5cb7(_0x3f3f0d,_0x3f0355){_0x3f3f0d=_0x3f3f0d-0x12e;const _0x2bd0d5=a17_0x2bd0();let _0x5cb769=_0x2bd0d5[_0x3f3f0d];return _0x5cb769;}import{CLI_BIN_NAME}from'../../constant/cli.js';import{readConfig,writeConfig,scopeLabel,migrateLegacySingleApp}from'./shared.js';const PROFILE_FLAG_KEYS={'env':a17_0x431fb5(0x14f),'apiDir':a17_0x431fb5(0x154),'cookie':a17_0x431fb5(0x156),'accessKey':'accessKey','format':a17_0x431fb5(0x14a),'pageSize':a17_0x431fb5(0x138),'riskLevel':'riskLevel','locale':'locale'};async function execute(_0x35f2ee){const _0x4c9789=a17_0x431fb5,_0x4cd2f1=_0x35f2ee[_0x4c9789(0x147)](_0x4c9789(0x153));if(!_0x4cd2f1)throw CliErrors[_0x4c9789(0x157)](_0x4c9789(0x148),_0x4c9789(0x134)+CLI_BIN_NAME+_0x4c9789(0x150));const _0x4e0de1=_0x35f2ee[_0x4c9789(0x147)](_0x4c9789(0x12f));if(!_0x4e0de1)throw CliErrors['flagMissing'](_0x4c9789(0x12f),'Usage:\x20'+CLI_BIN_NAME+_0x4c9789(0x150));const _0x144e1d={'global':_0x35f2ee[_0x4c9789(0x145)](_0x4c9789(0x158))},_0x3f0dbb=readConfig(_0x144e1d);if(!_0x3f0dbb[_0x4c9789(0x12e)])_0x3f0dbb[_0x4c9789(0x12e)]={};Object[_0x4c9789(0x151)](_0x3f0dbb[_0x4c9789(0x12e)])['length']===0x0&&migrateLegacySingleApp(_0x3f0dbb,_0x4cd2f1);const _0x3ba766={'appcode':_0x4e0de1};for(const [_0x64521f,_0x4b038b]of Object[_0x4c9789(0x152)](PROFILE_FLAG_KEYS)){const _0x211aa8=_0x35f2ee[_0x4c9789(0x155)](_0x64521f);_0x211aa8!=null&&_0x211aa8!==''&&_0x211aa8!==![]&&(_0x3ba766[_0x4b038b]=_0x4b038b===_0x4c9789(0x138)?Number(_0x211aa8):_0x211aa8);}const _0x339fb0=_0x3f0dbb[_0x4c9789(0x12e)],_0x2d32db=!!_0x339fb0[_0x4cd2f1];_0x339fb0[_0x4cd2f1]=_0x3ba766;if(!_0x3f0dbb[_0x4c9789(0x14c)])_0x3f0dbb[_0x4c9789(0x14c)]=_0x4cd2f1;writeConfig(_0x3f0dbb,_0x144e1d);const _0x2f1e27=!_0x2d32db&&_0x3f0dbb[_0x4c9789(0x14c)]===_0x4cd2f1?_0x4c9789(0x15c):'';return{'ok':!![],'message':(_0x2d32db?_0x4c9789(0x136):_0x4c9789(0x132))+_0x4c9789(0x13c)+_0x4cd2f1+'\x22\x20(appcode:\x20'+_0x4e0de1+')'+scopeLabel(_0x144e1d)+'.'+_0x2f1e27};}function a17_0x2bd0(){const _0x3e67cb=['bool','accessKey','str','Missing\x20app\x20name.','locale','format','API\x20directory\x20path','defaultApp','write','string','env','\x20app\x20add\x20--name\x20<name>\x20--appcode\x20<code>','keys','entries','name','apiDir','flag','cookie','validation','global','130562VcMjTC','75irGlKW','App\x20name','\x20Set\x20as\x20default\x20app.','apps','appcode','App\x20code','Target\x20environment','Added','app','Usage:\x20','Access\x20key','Updated','3972396xEqQQP','pageSize','9017577pLRudI','Auth\x20cookie','add','\x20app\x20\x22','10307192PWUnCd','7265874MCgUlR','1324848FSiBvo','Add\x20or\x20update\x20an\x20app\x20in\x20config','2WUUqXb','Default\x20page\x20size','134724GmkBZp','Risk\x20level'];a17_0x2bd0=function(){return _0x3e67cb;};return a17_0x2bd0();}export const appAddDefinition={'service':a17_0x431fb5(0x133),'command':a17_0x431fb5(0x13b),'description':a17_0x431fb5(0x140),'risk':a17_0x431fb5(0x14d),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a17_0x431fb5(0x153),'type':a17_0x431fb5(0x14e),'description':a17_0x431fb5(0x15b),'required':!![]},{'name':'appcode','type':a17_0x431fb5(0x14e),'description':a17_0x431fb5(0x130),'required':!![]},{'name':a17_0x431fb5(0x158),'type':'boolean','description':'Use\x20global\x20config\x20scope','default':![]},{'name':a17_0x431fb5(0x14f),'type':a17_0x431fb5(0x14e),'description':a17_0x431fb5(0x131)},{'name':a17_0x431fb5(0x154),'type':a17_0x431fb5(0x14e),'description':a17_0x431fb5(0x14b)},{'name':a17_0x431fb5(0x156),'type':a17_0x431fb5(0x14e),'description':a17_0x431fb5(0x13a),'hidden':!![]},{'name':a17_0x431fb5(0x146),'type':a17_0x431fb5(0x14e),'description':a17_0x431fb5(0x135),'hidden':!![]},{'name':'format','type':a17_0x431fb5(0x14e),'description':'Default\x20output\x20format'},{'name':a17_0x431fb5(0x138),'type':'number','description':a17_0x431fb5(0x142)},{'name':'riskLevel','type':a17_0x431fb5(0x14e),'description':a17_0x431fb5(0x144)},{'name':a17_0x431fb5(0x149),'type':a17_0x431fb5(0x14e),'description':'Locale'}],'execute':execute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x4f7b9c,_0x4d09a5){const _0x33249e=a18_0x5358,_0x2548ed=_0x4f7b9c();while(!![]){try{const _0xe81c66=-parseInt(_0x33249e(0x1a9))/0x1+-parseInt(_0x33249e(0x1a5))/0x2+-parseInt(_0x33249e(0x1ac))/0x3+-parseInt(_0x33249e(0x1a8))/0x4*(parseInt(_0x33249e(0x1ab))/0x5)+-parseInt(_0x33249e(0x1a4))/0x6*(parseInt(_0x33249e(0x1aa))/0x7)+parseInt(_0x33249e(0x1a7))/0x8+parseInt(_0x33249e(0x1a6))/0x9;if(_0xe81c66===_0x4d09a5)break;else _0x2548ed['push'](_0x2548ed['shift']());}catch(_0x35204e){_0x2548ed['push'](_0x2548ed['shift']());}}}(a18_0x4521,0xdcb60));import{appListDefinition}from'./list.js';function a18_0x5358(_0x11e802,_0x4da14e){_0x11e802=_0x11e802-0x1a4;const _0x45211d=a18_0x4521();let _0x535849=_0x45211d[_0x11e802];return _0x535849;}function a18_0x4521(){const _0x2f9a2d=['3793368XhWeQh','1008063nHQqJY','3515659wqOfID','5oiPQTh','2915172AZgObl','18maPoLc','76850mwBfle','48180087DffjtS','191632wywdZR'];a18_0x4521=function(){return _0x2f9a2d;};return a18_0x4521();}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
|
-
const
|
|
1
|
+
const a19_0x2295fb=a19_0x25c3;(function(_0x5bfb53,_0x4bc6f3){const _0x3095d6=a19_0x25c3,_0x8ed94c=_0x5bfb53();while(!![]){try{const _0x5fa66c=parseInt(_0x3095d6(0x152))/0x1*(parseInt(_0x3095d6(0x151))/0x2)+parseInt(_0x3095d6(0x14d))/0x3*(-parseInt(_0x3095d6(0x150))/0x4)+parseInt(_0x3095d6(0x148))/0x5*(parseInt(_0x3095d6(0x157))/0x6)+parseInt(_0x3095d6(0x143))/0x7+-parseInt(_0x3095d6(0x155))/0x8*(parseInt(_0x3095d6(0x142))/0x9)+parseInt(_0x3095d6(0x158))/0xa+parseInt(_0x3095d6(0x15a))/0xb*(-parseInt(_0x3095d6(0x145))/0xc);if(_0x5fa66c===_0x4bc6f3)break;else _0x8ed94c['push'](_0x8ed94c['shift']());}catch(_0x893c62){_0x8ed94c['push'](_0x8ed94c['shift']());}}}(a19_0x537c,0x4f7c8));function a19_0x537c(){const _0x30a782=['1985ajubNs','env','List\x20all\x20configured\x20apps','entries','appcode','285FDwKna','accessKey','\x20app\x20add\x20<name>\x20--appcode\x20<code>`\x20to\x20enable\x20multi-app\x20mode.','26420QLmIWC','52olAuIw','16463xSHJOC','single-app','length','1036232XtyHFr','list','894vPBYyD','5806760nkjpit','cookie','44tVRBwi','No\x20apps\x20configured.\x20Use\x20`','pageSize','read','Single-app\x20mode.\x20Use\x20`','map','\x20app\x20add\x20--name\x20<name>\x20--appcode\x20<code>`\x20to\x20add\x20one.','9GtowmB','831215HJVxpp','locale','312096qcbvTL','apiDir','riskLevel'];a19_0x537c=function(){return _0x30a782;};return a19_0x537c();}import{readConfig}from'./shared.js';function a19_0x25c3(_0x443b86,_0x2feeee){_0x443b86=_0x443b86-0x140;const _0x537c44=a19_0x537c();let _0x25c3f5=_0x537c44[_0x443b86];return _0x25c3f5;}import{CLI_BIN_NAME}from'../../constant/cli.js';async function execute(_0x18e9bb){const _0x114b2c=a19_0x25c3,_0xbae167=readConfig(),{apps:apps={},defaultApp:_0x48b3d2,currentApp:_0x2d1ffc}=_0xbae167,_0x529042=Object[_0x114b2c(0x14b)](apps);if(_0x529042[_0x114b2c(0x154)]===0x0){const _0x4327fd=_0xbae167[_0x114b2c(0x14c)];if(_0x4327fd)return{'ok':!![],'data':{'mode':_0x114b2c(0x153),'appcode':_0x4327fd,'env':_0xbae167[_0x114b2c(0x149)]},'message':_0x114b2c(0x15e)+CLI_BIN_NAME+_0x114b2c(0x14f)};return{'ok':!![],'data':[],'message':_0x114b2c(0x15b)+CLI_BIN_NAME+_0x114b2c(0x141)};}const _0x1ceffd=_0x529042[_0x114b2c(0x140)](([_0x5a5cb8,_0xa03d0a])=>({'name':_0x5a5cb8,'appcode':_0xa03d0a[_0x114b2c(0x14c)],'isDefault':_0x5a5cb8===_0x48b3d2,'isCurrent':_0x5a5cb8===(_0x2d1ffc??_0x48b3d2),'env':_0xa03d0a['env']??null,'apiDir':_0xa03d0a[_0x114b2c(0x146)]??null,'hasCookie':!!_0xa03d0a[_0x114b2c(0x159)],'hasAccessKey':!!_0xa03d0a[_0x114b2c(0x14e)],'format':_0xa03d0a['format']??null,'pageSize':_0xa03d0a[_0x114b2c(0x15c)]??null,'riskLevel':_0xa03d0a[_0x114b2c(0x147)]??null,'locale':_0xa03d0a[_0x114b2c(0x144)]??null}));return{'ok':!![],'data':_0x1ceffd};}export const appListDefinition={'service':'app','command':a19_0x2295fb(0x156),'description':a19_0x2295fb(0x14a),'risk':a19_0x2295fb(0x15d),'requiresAuth':![],'requiresAppCode':![],'flags':[],'execute':execute};
|