@lovrabet/lovrabet-cli 2.0.9-beta.1 → 2.0.9-beta.2
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/cli.js +1 -1
- package/lib/commands/app/cache.js +1 -1
- package/lib/commands/app/definitions.js +1 -1
- package/lib/commands/app/mock-loader.js +1 -1
- package/lib/commands/app/remote-source.js +1 -1
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/auth/index.js +1 -1
- package/lib/commands/auth/prompt.js +1 -1
- package/lib/commands/bff/detail.js +1 -1
- package/lib/commands/bff/exec.js +1 -1
- package/lib/commands/bff/index.js +1 -1
- package/lib/commands/common/config-policy.js +1 -1
- package/lib/commands/common/constraints.js +1 -1
- package/lib/commands/common/flags.js +1 -1
- package/lib/commands/config/definitions.js +1 -1
- package/lib/commands/config/shared.js +1 -1
- package/lib/commands/data/index.js +1 -1
- package/lib/commands/dataset/detail.js +1 -1
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/list.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/init.js +1 -1
- package/lib/commands/kb/index.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/schema.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/update.js +1 -1
- package/lib/config/schema.js +1 -1
- package/lib/constant/auth-mode.js +1 -1
- package/lib/constant/cli.js +1 -1
- package/lib/constant/defaults.js +1 -1
- package/lib/constant/distribution.js +1 -1
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.js +1 -1
- package/lib/constant/output.js +1 -1
- package/lib/constant/product.js +1 -1
- package/lib/constant/risk.js +1 -1
- package/lib/constant/url.js +1 -1
- package/lib/context.js +1 -1
- package/lib/core/api-client.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/sdk-client.js +1 -1
- package/lib/errors.js +1 -1
- package/lib/framework/build-all-flags.js +1 -1
- package/lib/framework/dryrun.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/preparse.js +1 -1
- package/lib/framework/response.js +1 -1
- package/lib/framework/runner-confirmation.js +1 -1
- package/lib/framework/runner-error.js +1 -1
- package/lib/framework/runner.js +1 -1
- package/lib/framework/schema-export.js +1 -1
- package/lib/framework/types.js +1 -1
- package/lib/help.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/skills/runtime-skill-sync.js +1 -1
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/params.js +1 -1
- package/lib/utils/platform.js +1 -1
- package/lib/utils/version.js +1 -1
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +1 -1
package/lib/commands/sql/exec.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a28_0x3dd8d3=a28_0x5ae4;(function(_0x13d373,_0x552bd5){const _0x4e42b3=a28_0x5ae4,_0x2ac082=_0x13d373();while(!![]){try{const _0x27422c=parseInt(_0x4e42b3(0x132))/0x1+-parseInt(_0x4e42b3(0x12e))/0x2*(-parseInt(_0x4e42b3(0x130))/0x3)+parseInt(_0x4e42b3(0x129))/0x4*(-parseInt(_0x4e42b3(0x126))/0x5)+-parseInt(_0x4e42b3(0x133))/0x6+-parseInt(_0x4e42b3(0x122))/0x7+-parseInt(_0x4e42b3(0x131))/0x8*(-parseInt(_0x4e42b3(0x12c))/0x9)+parseInt(_0x4e42b3(0x12f))/0xa;if(_0x27422c===_0x552bd5)break;else _0x2ac082['push'](_0x2ac082['shift']());}catch(_0x33a7c5){_0x2ac082['push'](_0x2ac082['shift']());}}}(a28_0x1153,0x49363));function a28_0x1153(){const _0x52730e=['isArray','SQL\x20execution\x20failed','execResult','length','execError','438032cWOWGF','now','\x20row(s)\x20in\x20','Execute\x20a\x20custom\x20SQL\x20query\x20by\x20sqlCode','2842995tKIizL','Returned\x20','execSuccess','4TTmqNQ','params','exec','4086KmgoWa','read','222gKpMwn','755790nthMWF','2997qSMzMV','8224LWqtZT','375946VlQjLP','588456ijejhc','sql','sqlcode'];a28_0x1153=function(){return _0x52730e;};return a28_0x1153();}function a28_0x5ae4(_0x262a39,_0x347c14){_0x262a39=_0x262a39-0x11d;const _0x115322=a28_0x1153();let _0x5ae48c=_0x115322[_0x262a39];return _0x5ae48c;}import{executeSdkSql}from'../../core/sdk-client.js';import{SQLCODE_FLAG,PARAMS_FLAG}from'../../commands/common/flags.js';import{parseJsonParams}from'../../utils/params.js';export const sqlExec={'service':a28_0x3dd8d3(0x134),'command':a28_0x3dd8d3(0x12b),'description':a28_0x3dd8d3(0x125),'risk':a28_0x3dd8d3(0x12d),'flags':[SQLCODE_FLAG,PARAMS_FLAG],async 'execute'(_0x19b69f){const _0x7dfee1=a28_0x3dd8d3,_0x4637fd=parseJsonParams(_0x19b69f['str'](_0x7dfee1(0x12a))),_0x16294a=Date[_0x7dfee1(0x123)](),_0x3d984f=await executeSdkSql(_0x19b69f['str'](_0x7dfee1(0x135)),_0x4637fd),_0x1d678e=Date[_0x7dfee1(0x123)]()-_0x16294a,_0x57e381=_0x3d984f?.[_0x7dfee1(0x11f)]??_0x3d984f,_0x36012e=_0x3d984f?.[_0x7dfee1(0x128)]??!![];if(!_0x36012e)return{'ok':![],'data':{'error':_0x3d984f?.[_0x7dfee1(0x121)]||'SQL\x20execution\x20failed','elapsed':_0x1d678e},'message':_0x7dfee1(0x11e)};const _0x37f2c9=Array[_0x7dfee1(0x11d)](_0x57e381)?_0x57e381:[];return{'ok':!![],'data':{'rows':_0x37f2c9,'rowCount':_0x37f2c9[_0x7dfee1(0x120)],'elapsed':_0x1d678e},'message':_0x7dfee1(0x127)+_0x37f2c9[_0x7dfee1(0x120)]+_0x7dfee1(0x124)+_0x1d678e+'ms'};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x1cbd1b,_0x195a79){const _0x2ec748=a29_0xf43d,_0x3b3e00=_0x1cbd1b();while(!![]){try{const _0x3a8898=-parseInt(_0x2ec748(0xcb))/0x1*(parseInt(_0x2ec748(0xcf))/0x2)+parseInt(_0x2ec748(0xcc))/0x3+parseInt(_0x2ec748(0xd0))/0x4*(parseInt(_0x2ec748(0xca))/0x5)+parseInt(_0x2ec748(0xcd))/0x6*(-parseInt(_0x2ec748(0xc9))/0x7)+-parseInt(_0x2ec748(0xd1))/0x8+parseInt(_0x2ec748(0xc8))/0x9*(-parseInt(_0x2ec748(0xd2))/0xa)+parseInt(_0x2ec748(0xce))/0xb*(parseInt(_0x2ec748(0xc7))/0xc);if(_0x3a8898===_0x195a79)break;else _0x3b3e00['push'](_0x3b3e00['shift']());}catch(_0x33a5a2){_0x3b3e00['push'](_0x3b3e00['shift']());}}}(a29_0x3fab,0x43911));import{sqlDetail}from'../../commands/sql/detail.js';import{sqlExec}from'../../commands/sql/exec.js';export const sqlDefinitions=[sqlDetail,sqlExec];function a29_0xf43d(_0x193f7e,_0x5a2598){_0x193f7e=_0x193f7e-0xc7;const _0x3fabdb=a29_0x3fab();let _0xf43ddc=_0x3fabdb[_0x193f7e];return _0xf43ddc;}function a29_0x3fab(){const _0x3abfb0=['986386UsXWME','53948eNBunD','1826400IXQxjM','1667910RQIMuX','84wbOeMI','18tyRlJL','2451603flAEze','115LNTRVD','1urGMlX','1512891ilxztR','6MnseTA','1363307QYEYGq'];a29_0x3fab=function(){return _0x3abfb0;};return a29_0x3fab();}
|
package/lib/commands/update.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const a30_0x2b58b0=a30_0x5619;(function(_0x56244f,_0x31f1cd){const _0x51209c=a30_0x5619,_0x5ad9b3=_0x56244f();while(!![]){try{const _0x47e7ce=-parseInt(_0x51209c(0xdc))/0x1+parseInt(_0x51209c(0xf4))/0x2*(parseInt(_0x51209c(0xdd))/0x3)+-parseInt(_0x51209c(0xc3))/0x4*(parseInt(_0x51209c(0xb6))/0x5)+parseInt(_0x51209c(0xe9))/0x6+-parseInt(_0x51209c(0xd6))/0x7*(-parseInt(_0x51209c(0xba))/0x8)+-parseInt(_0x51209c(0xc0))/0x9+parseInt(_0x51209c(0xb4))/0xa*(parseInt(_0x51209c(0xe4))/0xb);if(_0x47e7ce===_0x31f1cd)break;else _0x5ad9b3['push'](_0x5ad9b3['shift']());}catch(_0x38f067){_0x5ad9b3['push'](_0x5ad9b3['shift']());}}}(a30_0x2d85,0xa7642));import{spawnSync}from'node:child_process';function a30_0x2d85(){const _0x293051=['Use\x20full\x20semver\x20versions\x20such\x20as\x202.0.6\x20or\x202.0.7-beta.1.','\x20CLI\x20from\x20npm','Choose\x20exactly\x20one\x20target:\x20--latest,\x20--beta,\x20or\x20--version\x20<version>.','9831978HaKJfW','Checking\x20npm\x20dist-tags...','status','36172yUIxYe','Updated\x20to\x20v','Update\x20','Checking\x20official\x20skill\x20package...','json','bool','string','latest','skipped','boolean','version','stdout','/-/package/','map','\x20\x20Skipped\x20skill\x20install\x20(','\x20-g\x20-y','Invalid\x20version:\x20','timeout','major','2359Xdynfb','--latest,\x20--beta,\x20and\x20version\x20cannot\x20be\x20used\x20together.','Install\x20the\x20version\x20from\x20npm\x20beta\x20dist-tag','nonInteractive','message','fromEntries','936926buZiNA','48WNBOTw','toString','flag','args','validation','\x20->\x20','stderr','22AlQtgy','=1).','inherit','object','write','25884KNqORX','install','skills','\x20\x20Restart\x20your\x20terminal\x20to\x20use\x20the\x20new\x20version.','Install\x20the\x20version\x20from\x20npm\x20latest\x20dist-tag','filter','/dist-tags','trim','error','source','Already\x20up\x20to\x20date\x20(v','169714wMwhMi','\x20\x20Run\x20manually:\x20npm\x20install\x20-g\x20','unknown','\x20\x20Run\x20manually:\x20npx\x20skills\x20add\x20','exit\x20','update','no-skills','str','beta','\x20version\x20from\x20npm.','Current\x20version:\x20','\x20\x20Official\x20skill\x20package\x20is\x20up\x20to\x20date.','patch','Refresh\x20official\x20skill\x20package\x20after\x20updating','Unable\x20to\x20resolve\x20','minor','7637450ZsIydZ','cwd','125Nyjzra','Already\x20on\x20requested\x20version\x20(v','Skip\x20official\x20skill\x20package\x20refresh\x20after\x20updating','warn','1224aqlaQu','prerelease','log'];a30_0x2d85=function(){return _0x293051;};return a30_0x2d85();}import{CliErrors}from'../errors.js';import{CLI_BIN_NAME}from'../constant/cli.js';import{LOVRABET_NPM_PACKAGE_NAME,LOVRABET_SKILL_SOURCE,NPM_REGISTRY_BASE_URL}from'../constant/distribution.js';import{resolveNpmBin}from'../utils/platform.js';import{getCliVersion}from'../utils/version.js';import{LOVRABET_SKIP_NPX_SKILLS_ENV,runNpxSkillsAddGlobal}from'../skills/npx-skills-add.js';const updateFlags=[{'name':a30_0x2b58b0(0xca),'type':a30_0x2b58b0(0xcc),'description':a30_0x2b58b0(0xed),'default':![]},{'name':a30_0x2b58b0(0xac),'type':a30_0x2b58b0(0xcc),'description':a30_0x2b58b0(0xd8),'default':![]},{'name':a30_0x2b58b0(0xcd),'type':a30_0x2b58b0(0xc9),'description':'Install\x20a\x20specific\x20CLI\x20version'},{'name':a30_0x2b58b0(0xfa),'type':a30_0x2b58b0(0xcc),'description':a30_0x2b58b0(0xb8),'default':![]},{'name':a30_0x2b58b0(0xeb),'type':a30_0x2b58b0(0xcc),'description':a30_0x2b58b0(0xb1),'default':!![],'hidden':!![]}];function parseSemver(_0xc8d487){const _0x140522=_0xc8d487['trim']()['match'](/^(\d+)\.(\d+)\.(\d+)(?:-([0-9A-Za-z.-]+))?$/);if(!_0x140522)return null;return{'major':Number(_0x140522[0x1]),'minor':Number(_0x140522[0x2]),'patch':Number(_0x140522[0x3]),'prerelease':_0x140522[0x4]};}function compareSemver(_0x3ba0fb,_0x3ee4aa){const _0x414cb0=a30_0x2b58b0,_0x3f3f99=parseSemver(_0x3ba0fb),_0x3f3bd5=parseSemver(_0x3ee4aa);if(!_0x3f3f99||!_0x3f3bd5)throw CliErrors[_0x414cb0(0xe1)]('Version\x20comparison\x20failed.',_0x414cb0(0xbd));for(const _0x3bd580 of[_0x414cb0(0xd5),_0x414cb0(0xb3),_0x414cb0(0xb0)]){if(_0x3f3f99[_0x3bd580]<_0x3f3bd5[_0x3bd580])return-0x1;if(_0x3f3f99[_0x3bd580]>_0x3f3bd5[_0x3bd580])return 0x1;}if(!_0x3f3f99[_0x414cb0(0xbb)]&&!_0x3f3bd5[_0x414cb0(0xbb)])return 0x0;if(!_0x3f3f99['prerelease'])return 0x1;if(!_0x3f3bd5[_0x414cb0(0xbb)])return-0x1;if(_0x3f3f99[_0x414cb0(0xbb)]===_0x3f3bd5[_0x414cb0(0xbb)])return 0x0;return _0x3f3f99['prerelease']<_0x3f3bd5['prerelease']?-0x1:0x1;}function getRequestedVersion(_0x41a8b4){const _0x50cb5e=a30_0x2b58b0,_0x5d23ce=_0x41a8b4[_0x50cb5e(0xfb)]('version')[_0x50cb5e(0xf0)]();if(_0x5d23ce)return _0x5d23ce;return String(_0x41a8b4[_0x50cb5e(0xe0)]?.[0x0]??'')[_0x50cb5e(0xf0)]();}function shouldSkipOfficialSkill(_0x3bf9d4){const _0x4574d6=a30_0x2b58b0;return _0x3bf9d4[_0x4574d6(0xc8)](_0x4574d6(0xfa))||_0x3bf9d4[_0x4574d6(0xdf)](_0x4574d6(0xeb))===![];}async function validateUpdateFlags(_0x2647ba){const _0x217da2=a30_0x2b58b0,_0x25c2fd=getRequestedVersion(_0x2647ba),_0x35982f=[_0x2647ba['bool'](_0x217da2(0xca))?_0x217da2(0xca):'',_0x2647ba[_0x217da2(0xc8)](_0x217da2(0xac))?_0x217da2(0xac):'',_0x25c2fd?'version':''][_0x217da2(0xee)](Boolean);if(_0x35982f['length']>0x1)throw CliErrors['validation'](_0x217da2(0xd7),_0x217da2(0xbf));if(_0x25c2fd&&!parseSemver(_0x25c2fd))throw CliErrors[_0x217da2(0xe1)](_0x217da2(0xd3)+_0x25c2fd,'Use\x20a\x20full\x20semver\x20such\x20as\x202.0.6\x20or\x202.0.7-beta.1.');}async function fetchNpmDistTags(){const _0x10c6a3=a30_0x2b58b0;try{const _0x2aa464=NPM_REGISTRY_BASE_URL+_0x10c6a3(0xcf)+encodeURIComponent(LOVRABET_NPM_PACKAGE_NAME)+_0x10c6a3(0xef),_0xd1b068=await fetch(_0x2aa464,{'signal':AbortSignal[_0x10c6a3(0xd4)](0x2710)});if(!_0xd1b068['ok'])return null;const _0x3b1aa4=await _0xd1b068[_0x10c6a3(0xc7)]();if(!_0x3b1aa4||typeof _0x3b1aa4!==_0x10c6a3(0xe7))return null;return Object[_0x10c6a3(0xdb)](Object['entries'](_0x3b1aa4)[_0x10c6a3(0xee)](([,_0x28d475])=>typeof _0x28d475==='string'&&_0x28d475[_0x10c6a3(0xf0)]())[_0x10c6a3(0xd0)](([_0x5e1d51,_0x517fd4])=>[_0x5e1d51,String(_0x517fd4)[_0x10c6a3(0xf0)]()]));}catch{return null;}}async function resolveTargetVersion(_0x243302){const _0x5c8914=a30_0x2b58b0,_0x458568=getRequestedVersion(_0x243302);if(_0x458568)return{'version':_0x458568,'source':_0x5c8914(0xcd)};const _0x44b1c1=_0x243302[_0x5c8914(0xc8)](_0x5c8914(0xac))?'beta':_0x5c8914(0xca),_0x4a1dec=await fetchNpmDistTags(),_0x123e48=_0x4a1dec?.[_0x44b1c1];if(!_0x123e48)return null;return{'version':_0x123e48,'source':_0x44b1c1};}function a30_0x5619(_0x55c3c8,_0x549312){_0x55c3c8=_0x55c3c8-0xac;const _0x2d85db=a30_0x2d85();let _0x5619fe=_0x2d85db[_0x55c3c8];return _0x5619fe;}function shouldInstallTarget(_0x4f7e78,_0x59b5f0){const _0xf47a99=a30_0x2b58b0,_0x3782f8=compareSemver(_0x4f7e78,_0x59b5f0[_0xf47a99(0xcd)]);if(_0x59b5f0[_0xf47a99(0xf2)]==='version')return _0x3782f8!==0x0;return _0x3782f8<0x0;}function installCliPackage(_0x4c1b8d,_0x2b5060){const _0x10f5b0=a30_0x2b58b0,_0x439ec4=resolveNpmBin('npm'),_0x161135=[_0x10f5b0(0xea),'-g',LOVRABET_NPM_PACKAGE_NAME+'@'+_0x4c1b8d];console['log']('*\x20'+[_0x439ec4,..._0x161135]['join']('\x20'));const _0x3b7714=spawnSync(_0x439ec4,_0x161135,{'cwd':process[_0x10f5b0(0xb5)](),'stdio':_0x2b5060?'pipe':_0x10f5b0(0xe6),'env':process.env,'shell':![]});if(_0x3b7714[_0x10f5b0(0xc2)]===0x0)return{'ok':!![]};let _0x8e01b1=_0x3b7714[_0x10f5b0(0xf1)]?.[_0x10f5b0(0xda)]||_0x10f5b0(0xf8)+(_0x3b7714[_0x10f5b0(0xc2)]??'unknown');if(_0x2b5060){const _0x3fcb6a=_0x3b7714[_0x10f5b0(0xe3)]?_0x3b7714[_0x10f5b0(0xe3)][_0x10f5b0(0xde)]()[_0x10f5b0(0xf0)]():'',_0x1910f0=_0x3b7714[_0x10f5b0(0xce)]?_0x3b7714['stdout']['toString']()['trim']():'';if(_0x3fcb6a)_0x8e01b1=_0x3fcb6a;else{if(_0x1910f0)_0x8e01b1=_0x1910f0;}}return{'ok':![],'error':_0x8e01b1};}async function installOfficialSkill(_0x4441a5){const _0x1fe3a4=a30_0x2b58b0;console['log'](_0x1fe3a4(0xc6));const _0x10d510=runNpxSkillsAddGlobal(process[_0x1fe3a4(0xb5)](),LOVRABET_SKILL_SOURCE,{'stdio':_0x4441a5?'pipe':'inherit'});if(_0x10d510[_0x1fe3a4(0xcb)]){console[_0x1fe3a4(0xbc)](_0x1fe3a4(0xd1)+LOVRABET_SKIP_NPX_SKILLS_ENV+_0x1fe3a4(0xe5));return;}if(_0x10d510['ok']){console[_0x1fe3a4(0xbc)](_0x1fe3a4(0xaf));return;}console['warn']('\x20\x20Official\x20skill\x20update\x20failed:\x20'+(_0x10d510[_0x1fe3a4(0xf1)]||_0x1fe3a4(0xf6))),console[_0x1fe3a4(0xbc)](_0x1fe3a4(0xf7)+LOVRABET_SKILL_SOURCE+_0x1fe3a4(0xd2));}async function execute(_0x2ccdf5){const _0x25fbd1=a30_0x2b58b0;await validateUpdateFlags(_0x2ccdf5);const _0x5e5d84=getCliVersion();console[_0x25fbd1(0xbc)](_0x25fbd1(0xae)+_0x5e5d84),console['log'](_0x25fbd1(0xc1));const _0x3f9535=await resolveTargetVersion(_0x2ccdf5);if(!_0x3f9535){const _0x8658f5=_0x2ccdf5[_0x25fbd1(0xc8)](_0x25fbd1(0xac))?_0x25fbd1(0xac):'latest',_0x15d15b=_0x25fbd1(0xb2)+_0x8658f5+_0x25fbd1(0xad);return console[_0x25fbd1(0xb9)](_0x15d15b),console[_0x25fbd1(0xbc)](_0x25fbd1(0xf5)+LOVRABET_NPM_PACKAGE_NAME+'@'+_0x8658f5),{'ok':![]};}if(!shouldInstallTarget(_0x5e5d84,_0x3f9535)){const _0x215ebe=_0x3f9535['source']===_0x25fbd1(0xcd)?_0x25fbd1(0xb7)+_0x3f9535[_0x25fbd1(0xcd)]+').':_0x25fbd1(0xf3)+_0x3f9535[_0x25fbd1(0xcd)]+').';return console[_0x25fbd1(0xbc)](_0x215ebe),shouldSkipOfficialSkill(_0x2ccdf5)?console[_0x25fbd1(0xbc)]('Skipping\x20official\x20skill\x20package\x20(--no-skills).'):await installOfficialSkill(_0x2ccdf5['nonInteractive']),{'ok':!![]};}console[_0x25fbd1(0xbc)]('Updating\x20'+LOVRABET_NPM_PACKAGE_NAME+':\x20'+_0x5e5d84+_0x25fbd1(0xe2)+_0x3f9535[_0x25fbd1(0xcd)]);const _0x4b02af=installCliPackage(_0x3f9535['version'],_0x2ccdf5[_0x25fbd1(0xd9)]);if(!_0x4b02af['ok']){const _0x54ece5='Update\x20failed:\x20'+(_0x4b02af[_0x25fbd1(0xf1)]||_0x25fbd1(0xf6));return console['error'](_0x54ece5),console[_0x25fbd1(0xbc)]('\x20\x20Try\x20manually:\x20npm\x20install\x20-g\x20'+LOVRABET_NPM_PACKAGE_NAME+'@'+_0x3f9535[_0x25fbd1(0xcd)]),{'ok':![]};}return console[_0x25fbd1(0xbc)](_0x25fbd1(0xc4)+_0x3f9535[_0x25fbd1(0xcd)]+'.'),console[_0x25fbd1(0xbc)](_0x25fbd1(0xec)),shouldSkipOfficialSkill(_0x2ccdf5)?console[_0x25fbd1(0xbc)]('Skipping\x20official\x20skill\x20package\x20(--no-skills).'):await installOfficialSkill(_0x2ccdf5['nonInteractive']),{'ok':!![]};}export const updateDefinition={'service':a30_0x2b58b0(0xf9),'command':'run','description':a30_0x2b58b0(0xc5)+CLI_BIN_NAME+a30_0x2b58b0(0xbe),'risk':a30_0x2b58b0(0xe8),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':updateFlags,'validate':validateUpdateFlags,'execute':execute};
|
|
1
|
+
const a30_0x2b5b1a=a30_0x4592;(function(_0x5610b7,_0x17629e){const _0x19f644=a30_0x4592,_0x2d7e13=_0x5610b7();while(!![]){try{const _0x3d7f2a=-parseInt(_0x19f644(0x9e))/0x1*(parseInt(_0x19f644(0xbb))/0x2)+-parseInt(_0x19f644(0x7d))/0x3+-parseInt(_0x19f644(0x86))/0x4+parseInt(_0x19f644(0x8a))/0x5+parseInt(_0x19f644(0x83))/0x6*(parseInt(_0x19f644(0xa6))/0x7)+parseInt(_0x19f644(0x7a))/0x8+parseInt(_0x19f644(0x85))/0x9;if(_0x3d7f2a===_0x17629e)break;else _0x2d7e13['push'](_0x2d7e13['shift']());}catch(_0x25bbbd){_0x2d7e13['push'](_0x2d7e13['shift']());}}}(a30_0x382b,0xe5969));import{spawnSync}from'node:child_process';import{CliErrors}from'../errors.js';import{CLI_BIN_NAME}from'../constant/cli.js';import{LOVRABET_NPM_PACKAGE_NAME,LOVRABET_SKILL_SOURCE,NPM_REGISTRY_BASE_URL}from'../constant/distribution.js';import{resolveNpmBin}from'../utils/platform.js';import{getCliVersion}from'../utils/version.js';import{LOVRABET_SKIP_NPX_SKILLS_ENV,runNpxSkillsAddGlobal}from'../skills/npx-skills-add.js';const updateFlags=[{'name':a30_0x2b5b1a(0xbc),'type':a30_0x2b5b1a(0x98),'description':a30_0x2b5b1a(0xae),'default':![]},{'name':'beta','type':a30_0x2b5b1a(0x98),'description':a30_0x2b5b1a(0xb4),'default':![]},{'name':a30_0x2b5b1a(0xb9),'type':a30_0x2b5b1a(0xbe),'description':a30_0x2b5b1a(0x7c)},{'name':a30_0x2b5b1a(0x99),'type':a30_0x2b5b1a(0x98),'description':a30_0x2b5b1a(0xb0),'default':![]},{'name':'skills','type':'boolean','description':'Refresh\x20official\x20skill\x20package\x20after\x20updating','default':!![],'hidden':!![]}];function parseSemver(_0x3866ed){const _0x29e537=a30_0x2b5b1a,_0x10d33d=_0x3866ed[_0x29e537(0xb6)]()['match'](/^(\d+)\.(\d+)\.(\d+)(?:-([0-9A-Za-z.-]+))?$/);if(!_0x10d33d)return null;return{'major':Number(_0x10d33d[0x1]),'minor':Number(_0x10d33d[0x2]),'patch':Number(_0x10d33d[0x3]),'prerelease':_0x10d33d[0x4]};}function compareSemver(_0xdf9443,_0x27c732){const _0x1edbbb=a30_0x2b5b1a,_0x3545b9=parseSemver(_0xdf9443),_0x33de4f=parseSemver(_0x27c732);if(!_0x3545b9||!_0x33de4f)throw CliErrors[_0x1edbbb(0xb8)](_0x1edbbb(0x8c),'Use\x20full\x20semver\x20versions\x20such\x20as\x202.0.6\x20or\x202.0.7-beta.1.');for(const _0x4e6208 of[_0x1edbbb(0xb3),_0x1edbbb(0x8d),_0x1edbbb(0xa2)]){if(_0x3545b9[_0x4e6208]<_0x33de4f[_0x4e6208])return-0x1;if(_0x3545b9[_0x4e6208]>_0x33de4f[_0x4e6208])return 0x1;}if(!_0x3545b9[_0x1edbbb(0x9f)]&&!_0x33de4f[_0x1edbbb(0x9f)])return 0x0;if(!_0x3545b9[_0x1edbbb(0x9f)])return 0x1;if(!_0x33de4f['prerelease'])return-0x1;if(_0x3545b9[_0x1edbbb(0x9f)]===_0x33de4f['prerelease'])return 0x0;return _0x3545b9[_0x1edbbb(0x9f)]<_0x33de4f[_0x1edbbb(0x9f)]?-0x1:0x1;}function getRequestedVersion(_0x20001e){const _0x59839f=a30_0x2b5b1a,_0x3ef9ce=_0x20001e[_0x59839f(0x9c)](_0x59839f(0xb9))['trim']();if(_0x3ef9ce)return _0x3ef9ce;return String(_0x20001e[_0x59839f(0x9b)]?.[0x0]??'')[_0x59839f(0xb6)]();}function shouldSkipOfficialSkill(_0x424965){const _0x2f1a33=a30_0x2b5b1a;return _0x424965[_0x2f1a33(0xc0)](_0x2f1a33(0x99))||_0x424965[_0x2f1a33(0x93)](_0x2f1a33(0x76))===![];}async function validateUpdateFlags(_0x2cd50a){const _0x24c93a=a30_0x2b5b1a,_0x4dd466=getRequestedVersion(_0x2cd50a),_0x2c8888=[_0x2cd50a[_0x24c93a(0xc0)](_0x24c93a(0xbc))?_0x24c93a(0xbc):'',_0x2cd50a[_0x24c93a(0xc0)](_0x24c93a(0xac))?'beta':'',_0x4dd466?_0x24c93a(0xb9):'']['filter'](Boolean);if(_0x2c8888[_0x24c93a(0x95)]>0x1)throw CliErrors[_0x24c93a(0xb8)](_0x24c93a(0xad),'Choose\x20exactly\x20one\x20target:\x20--latest,\x20--beta,\x20or\x20--version\x20<version>.');if(_0x4dd466&&!parseSemver(_0x4dd466))throw CliErrors['validation'](_0x24c93a(0xa0)+_0x4dd466,_0x24c93a(0xc1));}async function fetchNpmDistTags(){const _0x10b414=a30_0x2b5b1a;try{const _0xa7993b=NPM_REGISTRY_BASE_URL+'/-/package/'+encodeURIComponent(LOVRABET_NPM_PACKAGE_NAME)+_0x10b414(0x94),_0x3f2df0=await fetch(_0xa7993b,{'signal':AbortSignal[_0x10b414(0x89)](0x2710)});if(!_0x3f2df0['ok'])return null;const _0x53c947=await _0x3f2df0[_0x10b414(0xbd)]();if(!_0x53c947||typeof _0x53c947!==_0x10b414(0xa9))return null;return Object[_0x10b414(0x84)](Object['entries'](_0x53c947)[_0x10b414(0x88)](([,_0x4a60c3])=>typeof _0x4a60c3==='string'&&_0x4a60c3['trim']())['map'](([_0x2a6d59,_0x27866e])=>[_0x2a6d59,String(_0x27866e)[_0x10b414(0xb6)]()]));}catch{return null;}}function a30_0x4592(_0xed76d6,_0x14a286){_0xed76d6=_0xed76d6-0x76;const _0x382b8d=a30_0x382b();let _0x459249=_0x382b8d[_0xed76d6];return _0x459249;}async function resolveTargetVersion(_0x3acd5a){const _0x1bdc8a=a30_0x2b5b1a,_0x5754b5=getRequestedVersion(_0x3acd5a);if(_0x5754b5)return{'version':_0x5754b5,'source':_0x1bdc8a(0xb9)};const _0x27dbe8=_0x3acd5a[_0x1bdc8a(0xc0)]('beta')?'beta':_0x1bdc8a(0xbc),_0x101af9=await fetchNpmDistTags(),_0x580328=_0x101af9?.[_0x27dbe8];if(!_0x580328)return null;return{'version':_0x580328,'source':_0x27dbe8};}function shouldInstallTarget(_0x10c58e,_0x5f508d){const _0x5379c9=a30_0x2b5b1a,_0x2fccee=compareSemver(_0x10c58e,_0x5f508d[_0x5379c9(0xb9)]);if(_0x5f508d[_0x5379c9(0x8e)]===_0x5379c9(0xb9))return _0x2fccee!==0x0;return _0x2fccee<0x0;}function a30_0x382b(){const _0x258d51=['Checking\x20npm\x20dist-tags...','\x20\x20Run\x20manually:\x20npm\x20install\x20-g\x20','194934VBjzOn','fromEntries','7490880rfvnJw','61920EZPbiN','\x20\x20Official\x20skill\x20package\x20is\x20up\x20to\x20date.','filter','timeout','707530EErgdq','warn','Version\x20comparison\x20failed.','minor','source','\x20\x20Try\x20manually:\x20npm\x20install\x20-g\x20','\x20version\x20from\x20npm.','\x20\x20Skipped\x20skill\x20install\x20(','stderr','flag','/dist-tags','length','Current\x20version:\x20','Update\x20','boolean','no-skills','Unable\x20to\x20resolve\x20','args','str','status','2PvERoV','prerelease','Invalid\x20version:\x20','Update\x20failed:\x20','patch','Skipping\x20official\x20skill\x20package\x20(--no-skills).','npm','\x20CLI\x20from\x20npm','259ohLZwb','\x20\x20Restart\x20your\x20terminal\x20to\x20use\x20the\x20new\x20version.','Updated\x20to\x20v','object','\x20\x20Official\x20skill\x20update\x20failed:\x20','toString','beta','--latest,\x20--beta,\x20and\x20version\x20cannot\x20be\x20used\x20together.','Install\x20the\x20version\x20from\x20npm\x20latest\x20dist-tag','pipe','Skip\x20official\x20skill\x20package\x20refresh\x20after\x20updating','inherit','Checking\x20official\x20skill\x20package...','major','Install\x20the\x20version\x20from\x20npm\x20beta\x20dist-tag','join','trim','nonInteractive','validation','version','message','1353328OIfHrz','latest','json','string','Updating\x20','bool','Use\x20a\x20full\x20semver\x20such\x20as\x202.0.6\x20or\x202.0.7-beta.1.','skills','\x20-g\x20-y','cwd','skipped','2709872nkSELK','log','Install\x20a\x20specific\x20CLI\x20version','616356blvAHN','install','exit\x20','error'];a30_0x382b=function(){return _0x258d51;};return a30_0x382b();}function installCliPackage(_0x2139a6,_0x302b6a){const _0x583945=a30_0x2b5b1a,_0x2c4f7b=resolveNpmBin(_0x583945(0xa4)),_0xa4e28a=[_0x583945(0x7e),'-g',LOVRABET_NPM_PACKAGE_NAME+'@'+_0x2139a6];console[_0x583945(0x7b)]('*\x20'+[_0x2c4f7b,..._0xa4e28a][_0x583945(0xb5)]('\x20'));const _0x5f5af6=spawnSync(_0x2c4f7b,_0xa4e28a,{'cwd':process[_0x583945(0x78)](),'stdio':_0x302b6a?_0x583945(0xaf):'inherit','env':process.env,'shell':![]});if(_0x5f5af6[_0x583945(0x9d)]===0x0)return{'ok':!![]};let _0x5a6df5=_0x5f5af6[_0x583945(0x80)]?.[_0x583945(0xba)]||_0x583945(0x7f)+(_0x5f5af6[_0x583945(0x9d)]??'unknown');if(_0x302b6a){const _0x310239=_0x5f5af6[_0x583945(0x92)]?_0x5f5af6[_0x583945(0x92)][_0x583945(0xab)]()['trim']():'',_0x331439=_0x5f5af6['stdout']?_0x5f5af6['stdout'][_0x583945(0xab)]()[_0x583945(0xb6)]():'';if(_0x310239)_0x5a6df5=_0x310239;else{if(_0x331439)_0x5a6df5=_0x331439;}}return{'ok':![],'error':_0x5a6df5};}async function installOfficialSkill(_0x2012f2){const _0x4a0e50=a30_0x2b5b1a;console[_0x4a0e50(0x7b)](_0x4a0e50(0xb2));const _0x31a5ba=runNpxSkillsAddGlobal(process[_0x4a0e50(0x78)](),LOVRABET_SKILL_SOURCE,{'stdio':_0x2012f2?_0x4a0e50(0xaf):_0x4a0e50(0xb1)});if(_0x31a5ba[_0x4a0e50(0x79)]){console[_0x4a0e50(0x7b)](_0x4a0e50(0x91)+LOVRABET_SKIP_NPX_SKILLS_ENV+'=1).');return;}if(_0x31a5ba['ok']){console['log'](_0x4a0e50(0x87));return;}console[_0x4a0e50(0x8b)](_0x4a0e50(0xaa)+(_0x31a5ba[_0x4a0e50(0x80)]||'unknown')),console[_0x4a0e50(0x7b)]('\x20\x20Run\x20manually:\x20npx\x20skills\x20add\x20'+LOVRABET_SKILL_SOURCE+_0x4a0e50(0x77));}async function execute(_0x492ba7){const _0x49ff4e=a30_0x2b5b1a;await validateUpdateFlags(_0x492ba7);const _0x4b83d4=getCliVersion();console[_0x49ff4e(0x7b)](_0x49ff4e(0x96)+_0x4b83d4),console['log'](_0x49ff4e(0x81));const _0x17dbdb=await resolveTargetVersion(_0x492ba7);if(!_0x17dbdb){const _0x4a6832=_0x492ba7['bool'](_0x49ff4e(0xac))?_0x49ff4e(0xac):_0x49ff4e(0xbc),_0x40d50c=_0x49ff4e(0x9a)+_0x4a6832+_0x49ff4e(0x90);return console[_0x49ff4e(0x8b)](_0x40d50c),console[_0x49ff4e(0x7b)](_0x49ff4e(0x82)+LOVRABET_NPM_PACKAGE_NAME+'@'+_0x4a6832),{'ok':![]};}if(!shouldInstallTarget(_0x4b83d4,_0x17dbdb)){const _0x29e813=_0x17dbdb['source']===_0x49ff4e(0xb9)?'Already\x20on\x20requested\x20version\x20(v'+_0x17dbdb['version']+').':'Already\x20up\x20to\x20date\x20(v'+_0x17dbdb['version']+').';return console[_0x49ff4e(0x7b)](_0x29e813),shouldSkipOfficialSkill(_0x492ba7)?console[_0x49ff4e(0x7b)](_0x49ff4e(0xa3)):await installOfficialSkill(_0x492ba7[_0x49ff4e(0xb7)]),{'ok':!![]};}console['log'](_0x49ff4e(0xbf)+LOVRABET_NPM_PACKAGE_NAME+':\x20'+_0x4b83d4+'\x20->\x20'+_0x17dbdb[_0x49ff4e(0xb9)]);const _0x4d6e4d=installCliPackage(_0x17dbdb[_0x49ff4e(0xb9)],_0x492ba7[_0x49ff4e(0xb7)]);if(!_0x4d6e4d['ok']){const _0x23c4c6=_0x49ff4e(0xa1)+(_0x4d6e4d[_0x49ff4e(0x80)]||'unknown');return console['error'](_0x23c4c6),console[_0x49ff4e(0x7b)](_0x49ff4e(0x8f)+LOVRABET_NPM_PACKAGE_NAME+'@'+_0x17dbdb[_0x49ff4e(0xb9)]),{'ok':![]};}return console['log'](_0x49ff4e(0xa8)+_0x17dbdb[_0x49ff4e(0xb9)]+'.'),console[_0x49ff4e(0x7b)](_0x49ff4e(0xa7)),shouldSkipOfficialSkill(_0x492ba7)?console['log'](_0x49ff4e(0xa3)):await installOfficialSkill(_0x492ba7[_0x49ff4e(0xb7)]),{'ok':!![]};}export const updateDefinition={'service':'update','command':'run','description':a30_0x2b5b1a(0x97)+CLI_BIN_NAME+a30_0x2b5b1a(0xa5),'risk':'write','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':updateFlags,'validate':validateUpdateFlags,'execute':execute};
|
package/lib/config/schema.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a31_0x5d3bf5=a31_0x81a8;(function(_0x418076,_0x1a86f3){const _0x37280f=a31_0x81a8,_0x4624db=_0x418076();while(!![]){try{const _0x36da52=parseInt(_0x37280f(0x144))/0x1+parseInt(_0x37280f(0x141))/0x2*(-parseInt(_0x37280f(0x139))/0x3)+parseInt(_0x37280f(0x137))/0x4*(parseInt(_0x37280f(0x13b))/0x5)+-parseInt(_0x37280f(0x130))/0x6+parseInt(_0x37280f(0x133))/0x7*(-parseInt(_0x37280f(0x128))/0x8)+-parseInt(_0x37280f(0x142))/0x9*(parseInt(_0x37280f(0x129))/0xa)+parseInt(_0x37280f(0x12b))/0xb;if(_0x36da52===_0x1a86f3)break;else _0x4624db['push'](_0x4624db['shift']());}catch(_0x15f281){_0x4624db['push'](_0x4624db['shift']());}}}(a31_0x2c15,0xbea33));import{DEFAULT_CONFIG_VALUES}from'../constant/defaults.js';import{RUNTIME_ENV_VALUES}from'../constant/env.js';import{OUTPUT_FORMAT_VALUES}from'../constant/output.js';export const CONFIG_FIELD_SCHEMAS={'env':{'description':a31_0x5d3bf5(0x135),'topLevel':!![],'cliSettableTopLevel':!![],'enumValues':RUNTIME_ENV_VALUES,'defaultValue':DEFAULT_CONFIG_VALUES[a31_0x5d3bf5(0x12f)],'importable':!![]},'format':{'description':a31_0x5d3bf5(0x12a),'topLevel':!![],'cliSettableTopLevel':!![],'enumValues':OUTPUT_FORMAT_VALUES,'defaultValue':DEFAULT_CONFIG_VALUES['format'],'importable':!![]},'pageSize':{'description':'Default\x20page\x20size','topLevel':!![],'cliSettableTopLevel':!![],'importable':!![]},'apiDomain':{'description':a31_0x5d3bf5(0x132),'topLevel':!![],'cliSettableTopLevel':!![],'importable':!![]},'userDomain':{'description':a31_0x5d3bf5(0x12e),'topLevel':!![],'cliSettableTopLevel':!![],'importable':!![]},'runtimeDomain':{'description':a31_0x5d3bf5(0x138),'topLevel':!![],'cliSettableTopLevel':!![],'importable':!![]},'accessKey':{'description':a31_0x5d3bf5(0x134),'topLevel':!![],'cliSettableTopLevel':!![],'importable':!![]},'riskLevel':{'description':a31_0x5d3bf5(0x131),'topLevel':!![],'defaultValue':DEFAULT_CONFIG_VALUES[a31_0x5d3bf5(0x136)],'importable':!![]},'locale':{'description':'Locale','topLevel':!![],'defaultValue':DEFAULT_CONFIG_VALUES[a31_0x5d3bf5(0x140)],'importable':!![],'legacyCompatOnly':!![]}};export const TOP_LEVEL_CONFIG_KEYS=new Set(Object['entries'](CONFIG_FIELD_SCHEMAS)[a31_0x5d3bf5(0x13d)](([,_0x509baa])=>_0x509baa[a31_0x5d3bf5(0x13c)])['map'](([_0x181bd2])=>_0x181bd2));function a31_0x81a8(_0x2ef6af,_0x11f046){_0x2ef6af=_0x2ef6af-0x127;const _0x2c153d=a31_0x2c15();let _0x81a8af=_0x2c153d[_0x2ef6af];return _0x81a8af;}export const CONFIG_ENUM_VALUES=Object[a31_0x5d3bf5(0x13f)](Object[a31_0x5d3bf5(0x12d)](CONFIG_FIELD_SCHEMAS)[a31_0x5d3bf5(0x13d)](([,_0x58ceda])=>_0x58ceda['enumValues'])['map'](([_0x593cdf,_0x401f9e])=>[_0x593cdf,[..._0x401f9e[a31_0x5d3bf5(0x12c)]||[]]]));export const IMPORTABLE_RUNTIME_CONFIG_KEYS=Object[a31_0x5d3bf5(0x12d)](CONFIG_FIELD_SCHEMAS)['filter'](([,_0x3d87b7])=>_0x3d87b7[a31_0x5d3bf5(0x143)])[a31_0x5d3bf5(0x145)](([_0x1b2338])=>_0x1b2338);export function getConfigFieldSchema(_0x5a6dab){return CONFIG_FIELD_SCHEMAS[_0x5a6dab];}export function getConfigEnumValues(_0x293697){const _0x3f2113=a31_0x5d3bf5;return getConfigFieldSchema(_0x293697)?.[_0x3f2113(0x12c)];}export function getConfigDefaultValue(_0x5992f8){return getConfigFieldSchema(_0x5992f8)?.['defaultValue'];}export function isTopLevelConfigKey(_0x148c3a){return TOP_LEVEL_CONFIG_KEYS['has'](_0x148c3a);}export function isLegacyCompatConfigKey(_0x40e07a){const _0x36ac00=a31_0x5d3bf5;return getConfigFieldSchema(_0x40e07a)?.[_0x36ac00(0x13a)]===!![];}function a31_0x2c15(){const _0x94167b=['entries','Override\x20user\x20domain','env','7047024HdXTpH','Risk\x20level','Override\x20API\x20domain','7BeMjwA','Access\x20key\x20(client-ak\x20auth)','Target\x20environment','riskLevel','2988956mEoYVf','Override\x20runtime\x20domain','129EQxnrT','legacyCompatOnly','5EPjAZj','cliSettableTopLevel','filter','join','fromEntries','locale','43526FqKfhf','981Ldtsuv','importable','1044307zLKTUS','map',';\x20local\x20alias:\x20apps.<alias>.appcode','Config\x20key.\x20Top-level:\x20','7261568xOMQzL','35810RipPfs','Default\x20output\x20format','26374073jherbZ','enumValues'];a31_0x2c15=function(){return _0x94167b;};return a31_0x2c15();}export function getTopLevelConfigKeyList(){return[...TOP_LEVEL_CONFIG_KEYS];}export function formatConfigKeyList(_0x4b41fc){const _0x2d140e=a31_0x5d3bf5;return[..._0x4b41fc][_0x2d140e(0x13e)](',\x20');}export function getTopLevelConfigKeySummary(){return formatConfigKeyList(getTopLevelConfigKeyList());}export function getConfigCommandKeyDescription(){const _0x2eb67b=a31_0x5d3bf5;return _0x2eb67b(0x127)+getTopLevelConfigKeySummary()+_0x2eb67b(0x146);}export function buildAppProfileListFields(_0xeb96a){return{'env':_0xeb96a,'hasAccessKey':![],'format':null,'pageSize':null,'riskLevel':null,'locale':null};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a32_0xc0a9(_0x21d715,_0x570bd9){_0x21d715=_0x21d715-0x131;const _0x5e7e9b=a32_0x5e7e();let _0xc0a9d1=_0x5e7e9b[_0x21d715];return _0xc0a9d1;}(function(_0x557322,_0x4e0e5c){const _0x589815=a32_0xc0a9,_0x5bdb58=_0x557322();while(!![]){try{const _0x159127=-parseInt(_0x589815(0x135))/0x1*(-parseInt(_0x589815(0x131))/0x2)+-parseInt(_0x589815(0x134))/0x3+-parseInt(_0x589815(0x132))/0x4+-parseInt(_0x589815(0x13a))/0x5+parseInt(_0x589815(0x139))/0x6+parseInt(_0x589815(0x136))/0x7+-parseInt(_0x589815(0x137))/0x8*(-parseInt(_0x589815(0x133))/0x9);if(_0x159127===_0x4e0e5c)break;else _0x5bdb58['push'](_0x5bdb58['shift']());}catch(_0x3d1d4a){_0x5bdb58['push'](_0x5bdb58['shift']());}}}(a32_0x5e7e,0xc149c));export const AUTH_MODE={'ClientAk':'client-ak'};function a32_0x5e7e(){const _0x51d319=['8921066CmvbwX','1383280oyPnfE','ClientAk','1362984MDwKOs','2696165VdWmed','46iKbzvo','3517156wyEVCB','18WVXTVS','3149142urfaak','61414rGxrML'];a32_0x5e7e=function(){return _0x51d319;};return a32_0x5e7e();}export function isAuthMode(_0x4866a3){const _0x5aa0e6=a32_0xc0a9;return _0x4866a3===AUTH_MODE[_0x5aa0e6(0x138)];}
|
package/lib/constant/cli.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a33_0xd5ca(_0x400939,_0x5dbf6f){_0x400939=_0x400939-0x183;const _0x42a5e6=a33_0x42a5();let _0xd5cad0=_0x42a5e6[_0x400939];return _0xd5cad0;}function a33_0x42a5(){const _0x486e82=['6548868itmYiL','5993670Msowcr','fromEntries','Record\x20ID','cliDisplayName','1QYZoXI','Select\x20app\x20profile\x20by\x20name','8wPvQvq','56uGWbdj','boolean','format','dry-run','appcode','Output\x20format','Filter\x20JSON\x20output\x20(JQ_PATH\x20>\x20bundled\x20jq\x20>\x20PATH;\x20implies\x20--format\x20json\x20when\x20current\x20format\x20is\x20pretty)','map','name','production\x20|\x20development\x20|\x20daily','384268mMurjM','Name\x20filter','params','5686696naABQs','267516JVCjeF','help','env','Verbose\x20output','Alias\x20for\x20--non-interactive','Force\x20non-interactive\x20mode\x20(CI)','dryRun','Show\x20help','string','app','Use\x20global\x20config\x20scope','yes','SQL\x20query\x20code','sqlcode','11974633zaGTUi','5KdBssQ','clear','verbose','cliBinName','non-interactive','<name>','meowKey','Override\x20appcode','nonInteractive','global','2592450qmCPzv'];a33_0x42a5=function(){return _0x486e82;};return a33_0x42a5();}const a33_0x436ffb=a33_0xd5ca;(function(_0x12265f,_0x13f0e5){const _0x1bcc8f=a33_0xd5ca,_0x4f0e33=_0x12265f();while(!![]){try{const _0xacbb31=parseInt(_0x1bcc8f(0x1b1))/0x1*(-parseInt(_0x1bcc8f(0x18e))/0x2)+parseInt(_0x1bcc8f(0x1ab))/0x3+parseInt(_0x1bcc8f(0x191))/0x4*(parseInt(_0x1bcc8f(0x1a1))/0x5)+parseInt(_0x1bcc8f(0x192))/0x6*(-parseInt(_0x1bcc8f(0x184))/0x7)+parseInt(_0x1bcc8f(0x183))/0x8*(parseInt(_0x1bcc8f(0x1ac))/0x9)+-parseInt(_0x1bcc8f(0x1ad))/0xa+-parseInt(_0x1bcc8f(0x1a0))/0xb;if(_0xacbb31===_0x13f0e5)break;else _0x4f0e33['push'](_0x4f0e33['shift']());}catch(_0x3101d7){_0x4f0e33['push'](_0x4f0e33['shift']());}}}(a33_0x42a5,0xbd9ec));import{PRODUCT_CONFIG}from'../constant/product.js';import{LOVRABET_NPM_PACKAGE_NAME}from'../constant/distribution.js';export const CLI_BIN_NAME=PRODUCT_CONFIG[a33_0x436ffb(0x1a4)];export const CLI_DISPLAY_NAME=PRODUCT_CONFIG[a33_0x436ffb(0x1b0)];export const NPM_PACKAGE_NAME=LOVRABET_NPM_PACKAGE_NAME;export const GLOBAL_FLAGS=[{'name':a33_0x436ffb(0x188),'meowKey':'appcode','type':a33_0x436ffb(0x19a),'description':a33_0x436ffb(0x1a8),'hint':'<code>'},{'name':a33_0x436ffb(0x19b),'meowKey':a33_0x436ffb(0x19b),'type':a33_0x436ffb(0x19a),'description':a33_0x436ffb(0x1b2),'hint':a33_0x436ffb(0x1a6)},{'name':'env','meowKey':a33_0x436ffb(0x194),'type':a33_0x436ffb(0x19a),'description':'Environment','hint':a33_0x436ffb(0x18d)},{'name':a33_0x436ffb(0x186),'meowKey':a33_0x436ffb(0x186),'type':'string','description':a33_0x436ffb(0x189),'hint':'json\x20|\x20pretty\x20|\x20compress'},{'name':'jq','meowKey':'jq','type':'string','description':a33_0x436ffb(0x18a),'hint':'<expr>'},{'name':a33_0x436ffb(0x187),'meowKey':a33_0x436ffb(0x198),'type':a33_0x436ffb(0x185),'description':'Preview\x20operation\x20without\x20executing'},{'name':a33_0x436ffb(0x19d),'meowKey':a33_0x436ffb(0x19d),'type':a33_0x436ffb(0x185),'description':'Skip\x20confirmation\x20for\x20high-risk\x20writes'},{'name':a33_0x436ffb(0x1a5),'meowKey':a33_0x436ffb(0x1a9),'type':a33_0x436ffb(0x185),'description':a33_0x436ffb(0x197)},{'name':a33_0x436ffb(0x1aa),'meowKey':'global','type':a33_0x436ffb(0x185),'description':a33_0x436ffb(0x19c)},{'name':'ci','meowKey':'ci','type':a33_0x436ffb(0x185),'description':a33_0x436ffb(0x196),'hidden':!![]},{'name':a33_0x436ffb(0x193),'meowKey':a33_0x436ffb(0x193),'type':a33_0x436ffb(0x185),'description':a33_0x436ffb(0x199)},{'name':'id','meowKey':'id','type':'string','description':a33_0x436ffb(0x1af),'hidden':!![]},{'name':a33_0x436ffb(0x18c),'meowKey':a33_0x436ffb(0x18c),'type':'string','description':a33_0x436ffb(0x18f),'hidden':!![]},{'name':a33_0x436ffb(0x19f),'meowKey':a33_0x436ffb(0x19f),'type':a33_0x436ffb(0x19a),'description':a33_0x436ffb(0x19e),'hidden':!![]},{'name':a33_0x436ffb(0x190),'meowKey':a33_0x436ffb(0x190),'type':a33_0x436ffb(0x19a),'description':'JSON\x20params\x20for\x20execute\x20commands','hidden':!![]},{'name':a33_0x436ffb(0x1a3),'meowKey':'verbose','type':'boolean','description':a33_0x436ffb(0x195),'hidden':!![]},{'name':a33_0x436ffb(0x1a2),'meowKey':a33_0x436ffb(0x1a2),'type':a33_0x436ffb(0x185),'description':'Clear\x20output','hidden':!![]}];export const PIPELINE_FLAG_NAMES=new Set([a33_0x436ffb(0x188),a33_0x436ffb(0x19b),a33_0x436ffb(0x194),a33_0x436ffb(0x186),'jq',a33_0x436ffb(0x187),a33_0x436ffb(0x19d),a33_0x436ffb(0x1a5),'ci']);export function buildMeowFlags(){const _0x365c77=a33_0x436ffb;return Object[_0x365c77(0x1ae)](GLOBAL_FLAGS[_0x365c77(0x18b)](_0x169290=>[_0x169290[_0x365c77(0x1a7)],{'type':_0x169290['type']}]));}
|
package/lib/constant/defaults.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a34_0x32609e=a34_0x4cd6;(function(_0xafe152,_0x1c34b5){const _0x5e606e=a34_0x4cd6,_0x40d60f=_0xafe152();while(!![]){try{const _0x55a2fd=-parseInt(_0x5e606e(0x19f))/0x1*(-parseInt(_0x5e606e(0x196))/0x2)+-parseInt(_0x5e606e(0x199))/0x3*(-parseInt(_0x5e606e(0x19d))/0x4)+parseInt(_0x5e606e(0x1a0))/0x5*(-parseInt(_0x5e606e(0x198))/0x6)+parseInt(_0x5e606e(0x1a2))/0x7+-parseInt(_0x5e606e(0x197))/0x8+-parseInt(_0x5e606e(0x19a))/0x9*(parseInt(_0x5e606e(0x19b))/0xa)+parseInt(_0x5e606e(0x19e))/0xb*(parseInt(_0x5e606e(0x19c))/0xc);if(_0x55a2fd===_0x1c34b5)break;else _0x40d60f['push'](_0x40d60f['shift']());}catch(_0x1ff83d){_0x40d60f['push'](_0x40d60f['shift']());}}}(a34_0xc2df,0x62b38));export const DEFAULT_APP_PROFILE_NAME=a34_0x32609e(0x195);function a34_0x4cd6(_0x4d13a2,_0x386972){_0x4d13a2=_0x4d13a2-0x193;const _0xc2dfba=a34_0xc2df();let _0x4cd617=_0xc2dfba[_0x4d13a2];return _0x4cd617;}export const DEFAULT_CONFIG_VALUES={'env':a34_0x32609e(0x1a1),'format':'compress','locale':a34_0x32609e(0x194),'riskLevel':a34_0x32609e(0x193)};export const DEFAULT_COMMAND_OUTPUT_FORMAT='compress';function a34_0xc2df(){const _0x45e5d2=['11dwlkBK','521uezzyY','5JFHJOU','production','3602340HUKQWZ','write','en-US','main','198XagwMs','3473048ngfZbP','139572oQanTf','405gFTDgC','336087jnvQLC','110zWLpjb','7447884AefssY','2536vLuVzl'];a34_0xc2df=function(){return _0x45e5d2;};return a34_0xc2df();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const a35_0x1842b7=a35_0x1b8f;function a35_0x1b8f(_0xeeb5b6,_0x294770){_0xeeb5b6=_0xeeb5b6-0x1d3;const _0x5aa5d2=a35_0x5aa5();let _0x1b8f56=_0x5aa5d2[_0xeeb5b6];return _0x1b8f56;}(function(_0xc3a912,_0x4f2c98){const _0xef3dcd=a35_0x1b8f,_0x57a1bb=_0xc3a912();while(!![]){try{const _0x56452b=-parseInt(_0xef3dcd(0x1d8))/0x1+-parseInt(_0xef3dcd(0x1de))/0x2+-parseInt(_0xef3dcd(0x1dd))/0x3*(-parseInt(_0xef3dcd(0x1d3))/0x4)+parseInt(_0xef3dcd(0x1d6))/0x5*(-parseInt(_0xef3dcd(0x1d4))/0x6)+parseInt(_0xef3dcd(0x1df))/0x7+-parseInt(_0xef3dcd(0x1d9))/0x8*(-parseInt(_0xef3dcd(0x1db))/0x9)+parseInt(_0xef3dcd(0x1da))/0xa;if(_0x56452b===_0x4f2c98)break;else _0x57a1bb['push'](_0x57a1bb['shift']());}catch(_0x56c889){_0x57a1bb['push'](_0x57a1bb['shift']());}}}(a35_0x5aa5,0x58b05));import{PRODUCT_CONFIG}from'../constant/product.js';function a35_0x5aa5(){const _0x2fdb97=['63579COzEnT','1129030iAelLZ','2631839GxTqID','68greOsY','30fJQSJK','skillSource','539780taHthW','npmPackageName','204685wVLDMt','11312VRsjZt','9176090ZfjBxC','117LCxWmF','npmRegistryBaseUrl'];a35_0x5aa5=function(){return _0x2fdb97;};return a35_0x5aa5();}export const LOVRABET_NPM_PACKAGE_NAME=PRODUCT_CONFIG[a35_0x1842b7(0x1d7)];export const LOVRABET_SKILL_SOURCE=PRODUCT_CONFIG[a35_0x1842b7(0x1d5)];export const NPM_REGISTRY_BASE_URL=PRODUCT_CONFIG[a35_0x1842b7(0x1dc)];
|
package/lib/constant/domain.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a36_0x4e11(_0x36b0f4,_0x5800ee){_0x36b0f4=_0x36b0f4-0x166;const _0x5a2e95=a36_0x5a2e();let _0x4e1118=_0x5a2e95[_0x36b0f4];return _0x4e1118;}const a36_0x594bc1=a36_0x4e11;(function(_0x48e488,_0xd0902a){const _0x3cf4ee=a36_0x4e11,_0x5ed313=_0x48e488();while(!![]){try{const _0x47a88b=-parseInt(_0x3cf4ee(0x175))/0x1+parseInt(_0x3cf4ee(0x173))/0x2+-parseInt(_0x3cf4ee(0x168))/0x3*(-parseInt(_0x3cf4ee(0x16d))/0x4)+parseInt(_0x3cf4ee(0x167))/0x5*(-parseInt(_0x3cf4ee(0x16e))/0x6)+-parseInt(_0x3cf4ee(0x16f))/0x7+parseInt(_0x3cf4ee(0x16b))/0x8+parseInt(_0x3cf4ee(0x172))/0x9;if(_0x47a88b===_0xd0902a)break;else _0x5ed313['push'](_0x5ed313['shift']());}catch(_0x1ac298){_0x5ed313['push'](_0x5ed313['shift']());}}}(a36_0x5a2e,0xa00ed));import{getEnv,isProduction}from'../constant/env.js';import{PRODUCT_CONFIG}from'../constant/product.js';let customApiDomain,customUserDomain,customRuntimeDomain;export function initDomains(_0x18837e){const _0x4142d4=a36_0x4e11;customApiDomain=_0x18837e?.['apiDomain'],customUserDomain=_0x18837e?.['userDomain'],customRuntimeDomain=_0x18837e?.[_0x4142d4(0x171)];}function a36_0x5a2e(){const _0x260314=['runtimeDomain','3158397wAxWIJ','514864TgLvzR','runtime','581781oLLmzH','production','5325ZstDie','30rFYYMQ','user','nonProduction','10017936BOOcqL','api','214468pEPlBj','5004EWhMTC','1898323CpngtV','domains'];a36_0x5a2e=function(){return _0x260314;};return a36_0x5a2e();}export const getUserDomain=()=>customUserDomain||(isProduction(getEnv())?PRODUCT_CONFIG[a36_0x594bc1(0x170)][a36_0x594bc1(0x166)][a36_0x594bc1(0x169)]:PRODUCT_CONFIG[a36_0x594bc1(0x170)][a36_0x594bc1(0x16a)][a36_0x594bc1(0x169)]);export const getApiDomain=()=>customApiDomain||(isProduction(getEnv())?PRODUCT_CONFIG['domains'][a36_0x594bc1(0x166)][a36_0x594bc1(0x16c)]:PRODUCT_CONFIG[a36_0x594bc1(0x170)][a36_0x594bc1(0x16a)][a36_0x594bc1(0x16c)]);export const getRuntimeDomain=()=>customRuntimeDomain||(isProduction(getEnv())?PRODUCT_CONFIG['domains'][a36_0x594bc1(0x166)][a36_0x594bc1(0x174)]:PRODUCT_CONFIG['domains'][a36_0x594bc1(0x16a)]['runtime']);
|
package/lib/constant/env.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a37_0x2ed8(){const _0x38b2b6=['1306870tAbLBB','18blKMse','development','298212uUGhec','6mJqOkp','582200MeZqQo','production','ENV','2385090DmwjdH','143UniRvD','daily','4eeeTGO','1908245VXPeLH','2526713Rzsbus','350134SKCXkT','2tJVagM','11ruZZbH'];a37_0x2ed8=function(){return _0x38b2b6;};return a37_0x2ed8();}const a37_0x43259c=a37_0x597e;(function(_0x4a5cee,_0xc0b22e){const _0x190eb4=a37_0x597e,_0x32dbff=_0x4a5cee();while(!![]){try{const _0x18d1ec=-parseInt(_0x190eb4(0xcf))/0x1*(-parseInt(_0x190eb4(0xce))/0x2)+parseInt(_0x190eb4(0xd9))/0x3*(parseInt(_0x190eb4(0xcb))/0x4)+parseInt(_0x190eb4(0xcc))/0x5*(-parseInt(_0x190eb4(0xd5))/0x6)+-parseInt(_0x190eb4(0xcd))/0x7+parseInt(_0x190eb4(0xd6))/0x8*(-parseInt(_0x190eb4(0xd2))/0x9)+parseInt(_0x190eb4(0xd1))/0xa*(-parseInt(_0x190eb4(0xd0))/0xb)+parseInt(_0x190eb4(0xd4))/0xc*(parseInt(_0x190eb4(0xda))/0xd);if(_0x18d1ec===_0xc0b22e)break;else _0x32dbff['push'](_0x32dbff['shift']());}catch(_0x23ddfb){_0x32dbff['push'](_0x32dbff['shift']());}}}(a37_0x2ed8,0x61940));import{productEnv}from'../constant/product.js';export const RUNTIME_ENV_VALUES=[a37_0x43259c(0xd7),'development',a37_0x43259c(0xdb)];export function normalizeEnv(_0x1bafeb){const _0xd7298f=a37_0x43259c;return _0x1bafeb==='online'?_0xd7298f(0xd7):_0x1bafeb;}export function isProduction(_0x473140){return normalizeEnv(_0x473140)==='production';}function a37_0x597e(_0x3eddcb,_0x4f5fcd){_0x3eddcb=_0x3eddcb-0xcb;const _0x2ed81f=a37_0x2ed8();let _0x597e01=_0x2ed81f[_0x3eddcb];return _0x597e01;}export function isDaily(_0x3b4de6){return normalizeEnv(_0x3b4de6)==='daily';}export function isDev(_0x1d6bb8){const _0x550b6a=a37_0x43259c,_0x248bf1=normalizeEnv(_0x1d6bb8);return _0x248bf1===_0x550b6a(0xd3)||_0x248bf1==='dev';}let env=normalizeEnv(productEnv(a37_0x43259c(0xd8))||a37_0x43259c(0xd7));export function getEnv(){return env;}export function initEnv(_0xbdb96c){env=normalizeEnv(_0xbdb96c);}
|
package/lib/constant/output.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a38_0x555e8c=a38_0x3591;function a38_0x3d1a(){const _0x1df9da=['compress','1372890gsVoqJ','9936ukejFM','11011LZNTzQ','404nERYBQ','49QDsHiy','111516YWeoPd','3vLciKo','61890MRMQvf','json','330080PEOnsa','pretty','1224638MqKpAe','9728iHFldU','1539270BbvGqW','594PLHMXm'];a38_0x3d1a=function(){return _0x1df9da;};return a38_0x3d1a();}(function(_0x22a5ef,_0x2e7889){const _0xb46fda=a38_0x3591,_0xb79d81=_0x22a5ef();while(!![]){try{const _0x144eeb=-parseInt(_0xb46fda(0x7b))/0x1+-parseInt(_0xb46fda(0x79))/0x2*(-parseInt(_0xb46fda(0x84))/0x3)+-parseInt(_0xb46fda(0x81))/0x4*(parseInt(_0xb46fda(0x85))/0x5)+-parseInt(_0xb46fda(0x7e))/0x6*(parseInt(_0xb46fda(0x82))/0x7)+-parseInt(_0xb46fda(0x7a))/0x8*(parseInt(_0xb46fda(0x7f))/0x9)+parseInt(_0xb46fda(0x87))/0xa*(-parseInt(_0xb46fda(0x7c))/0xb)+-parseInt(_0xb46fda(0x83))/0xc*(-parseInt(_0xb46fda(0x80))/0xd);if(_0x144eeb===_0x2e7889)break;else _0xb79d81['push'](_0xb79d81['shift']());}catch(_0x374d16){_0xb79d81['push'](_0xb79d81['shift']());}}}(a38_0x3d1a,0xec311));function a38_0x3591(_0x663217,_0x3db63e){_0x663217=_0x663217-0x79;const _0x3d1ab7=a38_0x3d1a();let _0x359154=_0x3d1ab7[_0x663217];return _0x359154;}export const OUTPUT_FORMAT_VALUES=[a38_0x555e8c(0x86),a38_0x555e8c(0x88),a38_0x555e8c(0x7d)];
|
package/lib/constant/product.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a39_0x20bc83=a39_0x511e;(function(_0x1109a8,_0x155ba5){const _0x4dcb49=a39_0x511e,_0x5116b6=_0x1109a8();while(!![]){try{const _0x27518a=-parseInt(_0x4dcb49(0xf1))/0x1+-parseInt(_0x4dcb49(0xfd))/0x2*(parseInt(_0x4dcb49(0xe1))/0x3)+parseInt(_0x4dcb49(0xf6))/0x4*(-parseInt(_0x4dcb49(0xed))/0x5)+-parseInt(_0x4dcb49(0xee))/0x6+parseInt(_0x4dcb49(0xe0))/0x7+parseInt(_0x4dcb49(0xe8))/0x8+parseInt(_0x4dcb49(0xfc))/0x9;if(_0x27518a===_0x155ba5)break;else _0x5116b6['push'](_0x5116b6['shift']());}catch(_0x18b7ae){_0x5116b6['push'](_0x5116b6['shift']());}}}(a39_0x5bab,0x76228));export const PRODUCT_CONFIG={'cliBinName':a39_0x20bc83(0xf5),'cliDisplayName':a39_0x20bc83(0xe4),'npmPackageName':a39_0x20bc83(0xf4),'skillSource':a39_0x20bc83(0xe9),'npmRegistryBaseUrl':a39_0x20bc83(0xfb),'envPrefix':a39_0x20bc83(0xfa),'legacyEnvPrefixes':[a39_0x20bc83(0xe7)],'configFileNames':[a39_0x20bc83(0xe6),'.lovrabetrc'],'newConfigFileName':a39_0x20bc83(0xe6),'homeDirName':a39_0x20bc83(0xf7),'logFileName':a39_0x20bc83(0xf9),'invokeSource':a39_0x20bc83(0xe2),'userCenterDisplayName':a39_0x20bc83(0xf8),'skipNpxSkillsEnvSuffix':a39_0x20bc83(0xec),'domains':{'production':{'user':a39_0x20bc83(0xef),'api':'https://api.lovrabet.com','runtime':a39_0x20bc83(0xea)},'nonProduction':{'user':a39_0x20bc83(0xe5),'api':'https://daily-api.lovrabet.com','runtime':a39_0x20bc83(0xf3)}},'accessKeyCreatePath':a39_0x20bc83(0xf0)};export function productEnvName(_0x494f30){const _0x5c06e1=a39_0x20bc83;return PRODUCT_CONFIG[_0x5c06e1(0xeb)]+'_'+_0x494f30;}export function productEnvNames(_0x8b4e){const _0x590791=a39_0x20bc83;return[productEnvName(_0x8b4e),...PRODUCT_CONFIG[_0x590791(0xf2)][_0x590791(0xe3)](_0x2d3c4d=>_0x2d3c4d+'_'+_0x8b4e)];}export function productEnv(_0x488fc2){for(const _0x2e5a7d of productEnvNames(_0x488fc2)){const _0xb88ba2=process.env[_0x2e5a7d];if(_0xb88ba2!==undefined)return _0xb88ba2;}return undefined;}function a39_0x511e(_0x2fb2d9,_0x4bb552){_0x2fb2d9=_0x2fb2d9-0xe0;const _0x5bab80=a39_0x5bab();let _0x511eec=_0x5bab80[_0x2fb2d9];return _0x511eec;}function a39_0x5bab(){const _0x422311=['RABETBASE','4943736luMtVd','lovrabet/lovrabet-cli','https://runtime.lovrabet.com','envPrefix','SKIP_NPX_SKILLS','1010005FxVQkt','5081226bJJjfl','https://user.lovrabet.com','/user/ak','605943xwgyLc','legacyEnvPrefixes','https://daily-runtime.lovrabet.com','@lovrabet/lovrabet-cli','lovrabet','8ZbyMXS','.lovrabet','Lovrabet\x20User\x20Center','.lovrabet-runtime.log','LOVRABET','https://registry.npmjs.org','16607655fVYpYr','1806922ZSvJfs','5466265joLnHo','3RRSePp','cli:lovrabet-runtime','map','Lovrabet\x20Runtime\x20CLI','https://user-daily.lovrabet.com','.lovrabet.json'];a39_0x5bab=function(){return _0x422311;};return a39_0x5bab();}
|
package/lib/constant/risk.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a40_0x323c9b=a40_0x2169;(function(_0x35c551,_0x4e2e13){const _0x259147=a40_0x2169,_0x3c726e=_0x35c551();while(!![]){try{const _0x3f3432=-parseInt(_0x259147(0x198))/0x1+-parseInt(_0x259147(0x19a))/0x2+-parseInt(_0x259147(0x1a0))/0x3*(-parseInt(_0x259147(0x19c))/0x4)+-parseInt(_0x259147(0x19d))/0x5*(parseInt(_0x259147(0x195))/0x6)+parseInt(_0x259147(0x19f))/0x7*(-parseInt(_0x259147(0x1a1))/0x8)+parseInt(_0x259147(0x19e))/0x9+parseInt(_0x259147(0x197))/0xa*(parseInt(_0x259147(0x19b))/0xb);if(_0x3f3432===_0x4e2e13)break;else _0x3c726e['push'](_0x3c726e['shift']());}catch(_0x19156a){_0x3c726e['push'](_0x3c726e['shift']());}}}(a40_0xce8a,0xa4297));export const RISK_LEVEL_VALUES=[a40_0x323c9b(0x199),a40_0x323c9b(0x196),a40_0x323c9b(0x194)];function a40_0x2169(_0x5c062d,_0x479f49){_0x5c062d=_0x5c062d-0x194;const _0xce8ab1=a40_0xce8a();let _0x216949=_0xce8ab1[_0x5c062d];return _0x216949;}function a40_0xce8a(){const _0x15e096=['read','1004646adIHUp','19522767aOBBfw','3000752cRQJwf','3930105UonpUG','3007314FqrawO','2833537qkvufj','3UTHqhU','16EwdEKA','high-risk-write','6XAKHVV','write','10PgOway','88798hKmumJ'];a40_0xce8a=function(){return _0x15e096;};return a40_0xce8a();}
|
package/lib/constant/url.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a41_0xad3e(_0x5495b3,_0x2310a9){_0x5495b3=_0x5495b3-0x85;const _0x592835=a41_0x5928();let _0xad3efb=_0x592835[_0x5495b3];return _0xad3efb;}const a41_0x171882=a41_0xad3e;(function(_0x5a9779,_0x55a8e8){const _0x527dee=a41_0xad3e,_0xe9f054=_0x5a9779();while(!![]){try{const _0x4ad39e=parseInt(_0x527dee(0x8c))/0x1*(-parseInt(_0x527dee(0x87))/0x2)+-parseInt(_0x527dee(0x91))/0x3+parseInt(_0x527dee(0x90))/0x4*(parseInt(_0x527dee(0x8d))/0x5)+parseInt(_0x527dee(0x89))/0x6*(-parseInt(_0x527dee(0x93))/0x7)+-parseInt(_0x527dee(0x8f))/0x8*(-parseInt(_0x527dee(0x85))/0x9)+-parseInt(_0x527dee(0x92))/0xa*(-parseInt(_0x527dee(0x86))/0xb)+parseInt(_0x527dee(0x88))/0xc*(parseInt(_0x527dee(0x8e))/0xd);if(_0x4ad39e===_0x55a8e8)break;else _0xe9f054['push'](_0xe9f054['shift']());}catch(_0x82cf4a){_0xe9f054['push'](_0xe9f054['shift']());}}}(a41_0x5928,0xe4e3d));import{PRODUCT_CONFIG}from'../constant/product.js';function a41_0x5928(){const _0x50de6a=['4hqBrpN','1812417XvaZjX','10IEGAOV','308rNcifH','7101DFPdCk','10267917gvDRmc','532MTzTNf','708AipTPc','228708isszUJ','production','accessKeyCreatePath','3986JXERhf','6530955ZllhcR','179049EwGIzW','12440MVZFif'];a41_0x5928=function(){return _0x50de6a;};return a41_0x5928();}export const USER_ACCESS_KEY_CREATE_URL=''+PRODUCT_CONFIG['domains'][a41_0x171882(0x8a)]['user']+PRODUCT_CONFIG[a41_0x171882(0x8b)];
|
package/lib/context.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const a42_0x52fd4b=a42_0x271f;(function(_0x5bf11b,_0x1f4852){const _0x4dcc5f=a42_0x271f,_0x464773=_0x5bf11b();while(!![]){try{const _0x1470b7=-parseInt(_0x4dcc5f(0x16d))/0x1+-parseInt(_0x4dcc5f(0x13b))/0x2*(-parseInt(_0x4dcc5f(0x170))/0x3)+-parseInt(_0x4dcc5f(0x14e))/0x4+-parseInt(_0x4dcc5f(0x145))/0x5*(parseInt(_0x4dcc5f(0x14b))/0x6)+-parseInt(_0x4dcc5f(0x160))/0x7+parseInt(_0x4dcc5f(0x15b))/0x8*(parseInt(_0x4dcc5f(0x15e))/0x9)+parseInt(_0x4dcc5f(0x159))/0xa;if(_0x1470b7===_0x1f4852)break;else _0x464773['push'](_0x464773['shift']());}catch(_0x5a0300){_0x464773['push'](_0x464773['shift']());}}}(a42_0x4b40,0xe61b8));import{readFileSync,existsSync,mkdirSync,renameSync,unlinkSync,writeFileSync}from'node:fs';import{resolve,dirname}from'node:path';import{homedir}from'node:os';function a42_0x271f(_0x1c4c20,_0x17350d){_0x1c4c20=_0x1c4c20-0x131;const _0x4b40fd=a42_0x4b40();let _0x271f12=_0x4b40fd[_0x1c4c20];return _0x271f12;}import{logger}from'./utils/logger.js';import{CliErrors}from'./errors.js';import{CLI_BIN_NAME}from'./constant/cli.js';import{PRODUCT_CONFIG,productEnv,productEnvNames}from'./constant/product.js';import{DEFAULT_CONFIG_VALUES}from'./constant/defaults.js';import{normalizeEnv,isDaily,isDev}from'./constant/env.js';import{normalizeLegacyOutputFormat}from'./framework/types.js';import{resolveCachedAppCode}from'./commands/app/cache.js';export{AUTH_MODE,isAuthMode}from'./constant/auth-mode.js';const CONFIG_NAMES=PRODUCT_CONFIG['configFileNames'];export const NEW_CONFIG_NAME=PRODUCT_CONFIG[a42_0x52fd4b(0x135)];function resolveConfigPath(_0x5d8d1b){for(const _0x15b5fd of CONFIG_NAMES){const _0x4763d5=resolve(_0x5d8d1b,_0x15b5fd);if(existsSync(_0x4763d5))return _0x4763d5;}return undefined;}export function resolveWriteConfigPath(_0x465921){const _0x5a309b=a42_0x52fd4b,_0x55e2ba=_0x465921===_0x5a309b(0x16a)?process[_0x5a309b(0x156)]():homedir(),_0x366867=resolveConfigPath(_0x55e2ba);return _0x366867??resolve(_0x55e2ba,NEW_CONFIG_NAME);}export function readConfigFile(_0x97f427){const _0x25e995=a42_0x52fd4b;try{if(existsSync(_0x97f427)){const _0x3b19e7=readFileSync(_0x97f427,{'encoding':_0x25e995(0x15d)});if(_0x3b19e7){const _0x3952b0=JSON[_0x25e995(0x171)](_0x3b19e7);return migrateOnlineEnv(_0x97f427,_0x3952b0),_0x3952b0;}}}catch{}return{};}function migrateOnlineEnv(_0x24b6fa,_0x50fce1){const _0x2a057c=a42_0x52fd4b;let _0x55c43b=![];_0x50fce1['env']==='online'&&(_0x50fce1[_0x2a057c(0x14d)]=_0x2a057c(0x16f),_0x55c43b=!![]);if(_0x50fce1[_0x2a057c(0x16e)]&&typeof _0x50fce1[_0x2a057c(0x16e)]===_0x2a057c(0x139))for(const _0xa81d53 of Object[_0x2a057c(0x15f)](_0x50fce1[_0x2a057c(0x16e)])){_0xa81d53&&_0xa81d53[_0x2a057c(0x14d)]===_0x2a057c(0x169)&&(_0xa81d53['env']=_0x2a057c(0x16f),_0x55c43b=!![]);}if(_0x55c43b)try{writeConfigFile(_0x24b6fa,_0x50fce1);}catch{}}export function writeConfigFile(_0x48a9ce,_0x425619){const _0x20750c=a42_0x52fd4b,_0x1b8976=dirname(_0x48a9ce);!existsSync(_0x1b8976)&&mkdirSync(_0x1b8976,{'recursive':!![]});const _0x51c0cd=_0x48a9ce+_0x20750c(0x140);try{writeFileSync(_0x51c0cd,JSON[_0x20750c(0x177)](_0x425619,null,0x2)+'\x0a',{'encoding':'utf8','mode':0x180});try{renameSync(_0x51c0cd,_0x48a9ce);}catch(_0x22b46e){if(_0x22b46e['code']===_0x20750c(0x175)||_0x22b46e['code']===_0x20750c(0x137)||_0x22b46e[_0x20750c(0x155)]==='EACCES'){writeFileSync(_0x48a9ce,JSON['stringify'](_0x425619,null,0x2)+'\x0a',{'encoding':_0x20750c(0x15d)});try{unlinkSync(_0x51c0cd);}catch{}}else throw _0x22b46e;}}catch(_0x4c2e74){try{unlinkSync(_0x51c0cd);}catch{}throw _0x4c2e74;}}export function isNonInteractiveMode(_0x2b2557){const _0x495e41=a42_0x52fd4b;return!!(_0x2b2557[_0x495e41(0x134)]||_0x2b2557['ci']||productEnvNames('CI')[_0x495e41(0x168)](_0x15d3e7=>process.env[_0x15d3e7]===_0x495e41(0x15c))||process.env.CI==='true'||!process[_0x495e41(0x143)][_0x495e41(0x15a)]||!isStdinRawModeSupported());}function isStdinRawModeSupported(){const _0x8e1360=a42_0x52fd4b;if(!process['stdin'][_0x8e1360(0x15a)])return![];try{const _0x36f2bc=process[_0x8e1360(0x14c)]['isRaw'];return process[_0x8e1360(0x14c)][_0x8e1360(0x174)](!![]),process[_0x8e1360(0x14c)][_0x8e1360(0x174)](_0x36f2bc??![]),!![];}catch{return![];}}export async function createContext(_0x52214a){const _0x17affd=a42_0x52fd4b,_0x3ea0c7=readRawConfig(),_0x189793=buildConfig(_0x3ea0c7,_0x52214a);await initGlobalEnvironment(_0x189793);const {getUserDomain:_0xdf198d,getApiDomain:_0x2d9085}=await import(_0x17affd(0x164)),_0x535427={'apiDomain':_0x2d9085(),'userDomain':_0xdf198d()},_0x543799=await buildAuth(_0x189793);logger['setLogPath'](process['cwd']());const _0x2afbc0=(CLI_BIN_NAME+'\x20'+process[_0x17affd(0x16b)]['slice'](0x2)[_0x17affd(0x142)]('\x20'))[_0x17affd(0x172)]();logger[_0x17affd(0x150)](_0x2afbc0);const _0x195848=isNonInteractiveMode(_0x52214a);return{'config':_0x189793,'auth':_0x543799,'logger':logger,'env':_0x535427,'nonInteractive':_0x195848};}export function buildConfigFromFlags(_0x4fdda6){return buildConfig(readRawConfig(),_0x4fdda6);}export function getLocalAppAliases(_0x45cb30){const _0x3681e3=a42_0x52fd4b;return _0x45cb30[_0x3681e3(0x16e)]&&typeof _0x45cb30[_0x3681e3(0x16e)]===_0x3681e3(0x139)?_0x45cb30[_0x3681e3(0x16e)]:{};}export function resolveLocalAppAliasCode(_0x1b3bf5,_0x24da5e){const _0x55e91a=a42_0x52fd4b;if(!_0x24da5e)return undefined;const _0x493c65=getLocalAppAliases(_0x1b3bf5)[_0x24da5e],_0x35b3c3=_0x493c65?.[_0x55e91a(0x179)];return typeof _0x35b3c3===_0x55e91a(0x133)&&_0x35b3c3[_0x55e91a(0x172)]()?_0x35b3c3[_0x55e91a(0x172)]():undefined;}export function readAppCodeFromConfig(){const _0x2d228d=a42_0x52fd4b,_0x28019a=readRawConfig(),_0x432000=_0x28019a['appcode']??_0x28019a[_0x2d228d(0x157)];if(typeof _0x432000==='string'&&_0x432000[_0x2d228d(0x172)]())return _0x432000[_0x2d228d(0x172)]();const _0x4956c1=resolveLocalAppAliasCode(_0x28019a,typeof _0x28019a[_0x2d228d(0x16c)]==='string'?_0x28019a['defaultApp']:undefined);if(_0x4956c1)return _0x4956c1;const _0x56c4db=normalizeEnv(String(_0x28019a[_0x2d228d(0x14d)]||'production')),_0x2b1171=isDaily(_0x56c4db)?_0x2d228d(0x149):isDev(_0x56c4db)?_0x2d228d(0x146):'production',_0x3d135a=resolveCachedAppCode(typeof _0x28019a['defaultApp']==='string'?_0x28019a[_0x2d228d(0x16c)]:undefined,_0x2b1171,typeof _0x28019a['accessKey']===_0x2d228d(0x133)?_0x28019a[_0x2d228d(0x147)]:undefined);if(_0x3d135a)return _0x3d135a;const _0x43f29b=Object['values'](getLocalAppAliases(_0x28019a))[_0x2d228d(0x13c)](_0x34d6fd=>_0x34d6fd?.['appcode']);return typeof _0x43f29b?.[_0x2d228d(0x179)]===_0x2d228d(0x133)&&_0x43f29b[_0x2d228d(0x179)][_0x2d228d(0x172)]()?_0x43f29b[_0x2d228d(0x179)][_0x2d228d(0x172)]():undefined;}export function readScopedConfig(_0x3c7262){const _0xb19d3d=a42_0x52fd4b,_0x22162c=_0x3c7262[_0xb19d3d(0x162)]?_0xb19d3d(0x162):'project';return readConfigFile(resolveWriteConfigPath(_0x22162c));}export function writeScopedConfig(_0x344615,_0x13c5ce){const _0x32d091=a42_0x52fd4b,_0x1a8d0c=_0x13c5ce[_0x32d091(0x162)]?_0x32d091(0x162):'project';writeConfigFile(resolveWriteConfigPath(_0x1a8d0c),_0x344615);}export async function initGlobalEnvironment(_0x51b537){const _0x52474c=a42_0x52fd4b,{initEnv:_0x2bc9df}=await import(_0x52474c(0x176));_0x2bc9df(_0x51b537['env']);const {initDomains:_0x252a54}=await import(_0x52474c(0x164));_0x252a54({'apiDomain':_0x51b537[_0x52474c(0x178)][_0x52474c(0x163)]||_0x51b537['raw'][_0x52474c(0x158)]||undefined,'userDomain':_0x51b537[_0x52474c(0x178)][_0x52474c(0x132)]||undefined,'runtimeDomain':_0x51b537[_0x52474c(0x178)]['runtimeDomain']||undefined});}export function getProjectConfigPath(){const _0x50d9a9=a42_0x52fd4b;return resolveConfigPath(process[_0x50d9a9(0x156)]());}export function getGlobalConfigPath(){return resolveConfigPath(homedir());}export function inspectCliConfigJsonFile(_0x520ac1){const _0x287d25=a42_0x52fd4b;if(!existsSync(_0x520ac1))return{'status':'missing'};try{const _0x5398d9=readFileSync(_0x520ac1,{'encoding':_0x287d25(0x15d)});if(!_0x5398d9?.[_0x287d25(0x172)]())return{'status':_0x287d25(0x148)};const _0x41a8df=JSON[_0x287d25(0x171)](_0x5398d9);return{'status':'ok','data':_0x41a8df};}catch(_0x2f1a55){return{'status':_0x287d25(0x13d),'message':_0x2f1a55 instanceof Error?_0x2f1a55[_0x287d25(0x13a)]:String(_0x2f1a55)};}}export function loadRawConfigLayers(_0x223ed0){const _0x29446d=a42_0x52fd4b;let _0x5c2fb8={},_0x2c7eab={},_0x3db3d4,_0x317991;try{_0x3db3d4=resolveConfigPath(homedir());if(_0x3db3d4){const _0x1223de=readFileSync(_0x3db3d4,{'encoding':_0x29446d(0x15d)});if(_0x1223de)_0x5c2fb8=JSON[_0x29446d(0x171)](_0x1223de);}}catch{}try{const _0x513559=_0x223ed0||process[_0x29446d(0x156)]();_0x317991=resolveConfigPath(_0x513559);if(_0x317991){const _0x122681=readFileSync(_0x317991,{'encoding':_0x29446d(0x15d)});if(_0x122681)_0x2c7eab=JSON['parse'](_0x122681);}}catch{}return{'globalPath':_0x3db3d4,'projectPath':_0x317991,'globalConfig':_0x5c2fb8,'projectConfig':_0x2c7eab};}function mergeRawConfigLayers(_0x49b521){const _0x149ceb=a42_0x52fd4b,{globalConfig:_0x38b2c1,projectConfig:_0x577d39}=_0x49b521;if(_0x577d39[_0x149ceb(0x166)]===![]){const _0xb4f18c={..._0x577d39};return delete _0xb4f18c[_0x149ceb(0x166)],_0xb4f18c;}const _0x6c4a13={..._0x38b2c1,..._0x577d39};if(_0x149ceb(0x16c)in _0x577d39)_0x6c4a13[_0x149ceb(0x16c)]=_0x577d39['defaultApp'];else _0x38b2c1['defaultApp']&&(_0x6c4a13[_0x149ceb(0x16c)]=_0x38b2c1[_0x149ceb(0x16c)]);return _0x6c4a13;}export function isInProject(){return!!getProjectConfigPath();}export function readRawConfig(_0x3b9241){return mergeRawConfigLayers(loadRawConfigLayers(_0x3b9241));}export function readRawConfigWithLayers(_0x31a014){const _0x2220ff=loadRawConfigLayers(_0x31a014);return{'config':mergeRawConfigLayers(_0x2220ff),'layers':_0x2220ff};}export function resolveDefaultAppSource(_0x35f677){const _0x187dfd=a42_0x52fd4b;if(_0x187dfd(0x16c)in _0x35f677[_0x187dfd(0x152)])return _0x187dfd(0x16a);if(_0x35f677[_0x187dfd(0x152)][_0x187dfd(0x166)]===![])return null;if(_0x35f677[_0x187dfd(0x173)][_0x187dfd(0x16c)])return'global';return null;}function buildConfig(_0x2174f5,_0x4e6b97){const _0x44f988=a42_0x52fd4b,_0x1b2288=_0x2174f5[_0x44f988(0x16c)]||undefined,_0x4727b7=_0x4e6b97[_0x44f988(0x157)]||env(_0x44f988(0x153))||undefined,_0x3e7d03=_0x4727b7||_0x1b2288||undefined,_0x47c353=env(_0x44f988(0x154))||_0x2174f5[_0x44f988(0x147)]||undefined,_0x43a55a=_0x4e6b97['env']||env('ENV')||_0x2174f5[_0x44f988(0x14d)]||DEFAULT_CONFIG_VALUES[_0x44f988(0x14d)],_0x5b5c31=normalizeEnv(String(_0x43a55a)),_0x27edc2=isDaily(_0x5b5c31)?_0x44f988(0x149):isDev(_0x5b5c31)?_0x44f988(0x146):_0x44f988(0x16f),_0x128d88=resolveLocalAppAliasCode(_0x2174f5,_0x3e7d03),_0x2f63e3=resolveCachedAppCode(_0x3e7d03,_0x27edc2,_0x47c353),_0x522800=typeof _0x4e6b97[_0x44f988(0x179)]===_0x44f988(0x133)?_0x4e6b97[_0x44f988(0x179)]:undefined,_0x5a915c=env(_0x44f988(0x136)),_0x2777f9=_0x4727b7?undefined:_0x2174f5['appcode']||_0x2174f5[_0x44f988(0x157)]||undefined,_0x3c90a8=_0x522800||_0x5a915c||_0x128d88||_0x2f63e3||_0x2777f9||undefined,_0x415b62=_0x522800?_0x44f988(0x167):_0x5a915c?_0x44f988(0x14d):_0x128d88?'local-alias':_0x2f63e3?_0x44f988(0x161):_0x2777f9?_0x44f988(0x14a):undefined,_0x2cbc6f=_0x2174f5['locale']||DEFAULT_CONFIG_VALUES['locale'],_0x2b1301=undefined,_0x504979=_0x4e6b97[_0x44f988(0x165)]||env(_0x44f988(0x144))||_0x2174f5['format'],_0x6d5f4b=normalizeLegacyOutputFormat(_0x504979),_0x111643=env(_0x44f988(0x151))||_0x2174f5['pageSize'],_0x383c21=_0x111643?Number(_0x111643)||undefined:undefined,_0x417cf4=_0x2174f5[_0x44f988(0x13e)]||_0x2174f5[_0x44f988(0x13f)],_0x2de02b=_0x417cf4===_0x44f988(0x14f)||_0x417cf4===_0x44f988(0x138)||_0x417cf4==='high-risk-write'?_0x417cf4:DEFAULT_CONFIG_VALUES[_0x44f988(0x13e)],_0x1a1043=env(_0x44f988(0x131)),_0x2f7fc1=_0x1a1043==='1'||_0x1a1043===_0x44f988(0x15c);return{'appCode':typeof _0x3c90a8==='string'&&_0x3c90a8[_0x44f988(0x172)]()?_0x3c90a8['trim']():undefined,'appCodeSource':_0x415b62,'env':_0x27edc2,'locale':_0x2cbc6f,'cookie':_0x2b1301,'accessKey':_0x47c353,'format':_0x6d5f4b,'pageSize':_0x383c21,'riskLevel':_0x2de02b,'verbose':_0x2f7fc1,'defaultApp':_0x1b2288,'currentApp':typeof _0x3e7d03==='string'?_0x3e7d03:undefined,'raw':_0x2174f5};}function env(_0x21c7bf){return productEnv(_0x21c7bf);}async function buildAuth(_0x57490a){const _0x46d21e=a42_0x52fd4b,_0x261b7b='',_0x204cc2=!!_0x57490a[_0x46d21e(0x147)];return{'cookie':_0x261b7b,'isLoggedIn':_0x204cc2,async 'getOrLogin'(){const _0x2e20c2=_0x46d21e;if(_0x204cc2)return _0x261b7b;throw CliErrors[_0x2e20c2(0x141)]();}};}function a42_0x4b40(){const _0x3e6f1d=['apiDomain','./constant/domain.js','format','inherit','explicit','some','online','project','argv','defaultApp','1118114CiQQiH','apps','production','2733HVnDKc','parse','trim','globalConfig','setRawMode','EPERM','./constant/env.js','stringify','raw','appcode','VERBOSE','userDomain','string','nonInteractive','newConfigFileName','APPCODE','EXDEV','write','object','message','470IEOOrw','find','error','riskLevel','maxRisk','.tmp','authRequired','join','stdout','FORMAT','281955xTNxgE','development','accessKey','empty','daily','top-level','84cEThCh','stdin','env','5189560ccxLQI','read','setRawCommand','PAGE_SIZE','projectConfig','APP','ACCESS_KEY','code','cwd','app','host','42399150KeNdDx','isTTY','35024sgoPnz','true','utf8','3051FptJVn','values','12534508tyBDgW','cache','global'];a42_0x4b40=function(){return _0x3e6f1d;};return a42_0x4b40();}
|
|
1
|
+
const a42_0x19e65d=a42_0x42c0;(function(_0x1775c8,_0x1e9827){const _0x1e6fa3=a42_0x42c0,_0xa4b9a6=_0x1775c8();while(!![]){try{const _0x5b0e20=-parseInt(_0x1e6fa3(0x10a))/0x1+parseInt(_0x1e6fa3(0x12b))/0x2*(parseInt(_0x1e6fa3(0x125))/0x3)+-parseInt(_0x1e6fa3(0x131))/0x4*(parseInt(_0x1e6fa3(0x140))/0x5)+-parseInt(_0x1e6fa3(0x117))/0x6+parseInt(_0x1e6fa3(0x13e))/0x7*(parseInt(_0x1e6fa3(0x127))/0x8)+parseInt(_0x1e6fa3(0x110))/0x9+parseInt(_0x1e6fa3(0x146))/0xa;if(_0x5b0e20===_0x1e9827)break;else _0xa4b9a6['push'](_0xa4b9a6['shift']());}catch(_0x4ebaa9){_0xa4b9a6['push'](_0xa4b9a6['shift']());}}}(a42_0x54c3,0x39e6b));import{readFileSync,existsSync,mkdirSync,renameSync,unlinkSync,writeFileSync}from'node:fs';import{resolve,dirname}from'node:path';import{homedir}from'node:os';import{logger}from'./utils/logger.js';import{CliErrors}from'./errors.js';import{CLI_BIN_NAME}from'./constant/cli.js';import{PRODUCT_CONFIG,productEnv,productEnvNames}from'./constant/product.js';import{DEFAULT_CONFIG_VALUES}from'./constant/defaults.js';import{normalizeEnv,isDaily,isDev}from'./constant/env.js';import{normalizeLegacyOutputFormat}from'./framework/types.js';import{resolveCachedAppCode}from'./commands/app/cache.js';export{AUTH_MODE,isAuthMode}from'./constant/auth-mode.js';const CONFIG_NAMES=PRODUCT_CONFIG[a42_0x19e65d(0x122)];export const NEW_CONFIG_NAME=PRODUCT_CONFIG[a42_0x19e65d(0x12e)];function resolveConfigPath(_0x715f4d){for(const _0x595365 of CONFIG_NAMES){const _0x18204f=resolve(_0x715f4d,_0x595365);if(existsSync(_0x18204f))return _0x18204f;}return undefined;}export function resolveWriteConfigPath(_0x4b580f){const _0x359ccf=a42_0x19e65d,_0x2833c2=_0x4b580f===_0x359ccf(0x113)?process['cwd']():homedir(),_0x37b5de=resolveConfigPath(_0x2833c2);return _0x37b5de??resolve(_0x2833c2,NEW_CONFIG_NAME);}export function readConfigFile(_0x5d474f){const _0x5da863=a42_0x19e65d;try{if(existsSync(_0x5d474f)){const _0xf2de65=readFileSync(_0x5d474f,{'encoding':_0x5da863(0x120)});if(_0xf2de65){const _0x199b0e=JSON[_0x5da863(0x134)](_0xf2de65);return migrateOnlineEnv(_0x5d474f,_0x199b0e),_0x199b0e;}}}catch{}return{};}function migrateOnlineEnv(_0x2b0c38,_0x38a73f){const _0x2b59d2=a42_0x19e65d;let _0x32f9f1=![];_0x38a73f[_0x2b59d2(0x10d)]===_0x2b59d2(0x129)&&(_0x38a73f[_0x2b59d2(0x10d)]=_0x2b59d2(0x128),_0x32f9f1=!![]);if(_0x38a73f[_0x2b59d2(0x115)]&&typeof _0x38a73f[_0x2b59d2(0x115)]===_0x2b59d2(0x135))for(const _0x3467d7 of Object[_0x2b59d2(0x11a)](_0x38a73f[_0x2b59d2(0x115)])){_0x3467d7&&_0x3467d7[_0x2b59d2(0x10d)]===_0x2b59d2(0x129)&&(_0x3467d7[_0x2b59d2(0x10d)]=_0x2b59d2(0x128),_0x32f9f1=!![]);}if(_0x32f9f1)try{writeConfigFile(_0x2b0c38,_0x38a73f);}catch{}}function a42_0x54c3(){const _0x5447ac=['308252lhyscW','APP','raw','env','message','argv','2158821LWmUwn','high-risk-write','APPCODE','project','missing','apps','./constant/domain.js','1916580YMeaRD','stdout','setLogPath','values','true','appcode','explicit','stdin','EACCES','utf8','./constant/env.js','configFileNames','projectConfig','accessKey','409953TnFLVs','format','8qJYJsP','production','online','runtimeDomain','2GlWtqB','EPERM','isRaw','newConfigFileName','stringify','string','4TVYjdp','locale','setRawCommand','parse','object','isTTY','empty','setRawMode','global','PAGE_SIZE','error','host','trim','1073191XYitZk','local-alias','1469690NEXYpj','defaultApp','VERBOSE','EXDEV','code','apiDomain','6289500nqEjpx','some','ACCESS_KEY','daily','cwd','slice','riskLevel','read','top-level','inherit','cache','app','development','authRequired'];a42_0x54c3=function(){return _0x5447ac;};return a42_0x54c3();}export function writeConfigFile(_0x2adf52,_0x530029){const _0x3a6d50=a42_0x19e65d,_0x87cf1e=dirname(_0x2adf52);!existsSync(_0x87cf1e)&&mkdirSync(_0x87cf1e,{'recursive':!![]});const _0x8d1e53=_0x2adf52+'.tmp';try{writeFileSync(_0x8d1e53,JSON[_0x3a6d50(0x12f)](_0x530029,null,0x2)+'\x0a',{'encoding':_0x3a6d50(0x120),'mode':0x180});try{renameSync(_0x8d1e53,_0x2adf52);}catch(_0x219d02){if(_0x219d02[_0x3a6d50(0x144)]===_0x3a6d50(0x12c)||_0x219d02[_0x3a6d50(0x144)]===_0x3a6d50(0x143)||_0x219d02[_0x3a6d50(0x144)]===_0x3a6d50(0x11f)){writeFileSync(_0x2adf52,JSON[_0x3a6d50(0x12f)](_0x530029,null,0x2)+'\x0a',{'encoding':_0x3a6d50(0x120)});try{unlinkSync(_0x8d1e53);}catch{}}else throw _0x219d02;}}catch(_0x2095cb){try{unlinkSync(_0x8d1e53);}catch{}throw _0x2095cb;}}export function isNonInteractiveMode(_0x261bc4){const _0x33018b=a42_0x19e65d;return!!(_0x261bc4['nonInteractive']||_0x261bc4['ci']||productEnvNames('CI')[_0x33018b(0x147)](_0x4221a4=>process.env[_0x4221a4]===_0x33018b(0x11b))||process.env.CI==='true'||!process[_0x33018b(0x118)][_0x33018b(0x136)]||!isStdinRawModeSupported());}function isStdinRawModeSupported(){const _0x54e48a=a42_0x19e65d;if(!process[_0x54e48a(0x11e)][_0x54e48a(0x136)])return![];try{const _0x3250f1=process['stdin'][_0x54e48a(0x12d)];return process[_0x54e48a(0x11e)][_0x54e48a(0x138)](!![]),process['stdin'][_0x54e48a(0x138)](_0x3250f1??![]),!![];}catch{return![];}}export async function createContext(_0x43410d){const _0x7448bb=a42_0x19e65d,_0x297c2d=readRawConfig(),_0x4d8610=buildConfig(_0x297c2d,_0x43410d);await initGlobalEnvironment(_0x4d8610);const {getUserDomain:_0x371e9e,getApiDomain:_0xc76366}=await import(_0x7448bb(0x116)),_0x444ccb={'apiDomain':_0xc76366(),'userDomain':_0x371e9e()},_0x344591=await buildAuth(_0x4d8610);logger[_0x7448bb(0x119)](process[_0x7448bb(0x100)]());const _0x1e55db=(CLI_BIN_NAME+'\x20'+process[_0x7448bb(0x10f)][_0x7448bb(0x101)](0x2)['join']('\x20'))[_0x7448bb(0x13d)]();logger[_0x7448bb(0x133)](_0x1e55db);const _0x17cc5=isNonInteractiveMode(_0x43410d);return{'config':_0x4d8610,'auth':_0x344591,'logger':logger,'env':_0x444ccb,'nonInteractive':_0x17cc5};}export function buildConfigFromFlags(_0x28d0fb){return buildConfig(readRawConfig(),_0x28d0fb);}export function getLocalAppAliases(_0x3190b8){const _0x451c80=a42_0x19e65d;return _0x3190b8['apps']&&typeof _0x3190b8[_0x451c80(0x115)]==='object'?_0x3190b8[_0x451c80(0x115)]:{};}export function resolveLocalAppAliasCode(_0x3f01f4,_0x45a46a){const _0x445655=a42_0x19e65d;if(!_0x45a46a)return undefined;const _0x46f47a=getLocalAppAliases(_0x3f01f4)[_0x45a46a],_0x483dd5=_0x46f47a?.[_0x445655(0x11c)];return typeof _0x483dd5==='string'&&_0x483dd5[_0x445655(0x13d)]()?_0x483dd5[_0x445655(0x13d)]():undefined;}export function readAppCodeFromConfig(){const _0x44324e=a42_0x19e65d,_0x561296=readRawConfig(),_0xbbbf58=_0x561296[_0x44324e(0x11c)]??_0x561296[_0x44324e(0x107)];if(typeof _0xbbbf58===_0x44324e(0x130)&&_0xbbbf58['trim']())return _0xbbbf58['trim']();const _0x4c0164=resolveLocalAppAliasCode(_0x561296,typeof _0x561296[_0x44324e(0x141)]===_0x44324e(0x130)?_0x561296['defaultApp']:undefined);if(_0x4c0164)return _0x4c0164;const _0x310e6f=normalizeEnv(String(_0x561296[_0x44324e(0x10d)]||_0x44324e(0x128))),_0x380a32=isDaily(_0x310e6f)?_0x44324e(0xff):isDev(_0x310e6f)?_0x44324e(0x108):'production',_0x199023=resolveCachedAppCode(typeof _0x561296['defaultApp']===_0x44324e(0x130)?_0x561296[_0x44324e(0x141)]:undefined,_0x380a32,typeof _0x561296[_0x44324e(0x124)]===_0x44324e(0x130)?_0x561296['accessKey']:undefined);if(_0x199023)return _0x199023;const _0x32b3e0=Object[_0x44324e(0x11a)](getLocalAppAliases(_0x561296))['find'](_0x47c67d=>_0x47c67d?.[_0x44324e(0x11c)]);return typeof _0x32b3e0?.[_0x44324e(0x11c)]==='string'&&_0x32b3e0[_0x44324e(0x11c)][_0x44324e(0x13d)]()?_0x32b3e0[_0x44324e(0x11c)][_0x44324e(0x13d)]():undefined;}export function readScopedConfig(_0xdf00af){const _0x2e0ada=a42_0x19e65d,_0x197d56=_0xdf00af[_0x2e0ada(0x139)]?_0x2e0ada(0x139):_0x2e0ada(0x113);return readConfigFile(resolveWriteConfigPath(_0x197d56));}export function writeScopedConfig(_0x588e0a,_0x477bd0){const _0x5c66d1=a42_0x19e65d,_0x55c7cc=_0x477bd0[_0x5c66d1(0x139)]?_0x5c66d1(0x139):_0x5c66d1(0x113);writeConfigFile(resolveWriteConfigPath(_0x55c7cc),_0x588e0a);}export async function initGlobalEnvironment(_0x1d2b30){const _0x5bb055=a42_0x19e65d,{initEnv:_0x4560a}=await import(_0x5bb055(0x121));_0x4560a(_0x1d2b30[_0x5bb055(0x10d)]);const {initDomains:_0x440ec3}=await import('./constant/domain.js');_0x440ec3({'apiDomain':_0x1d2b30[_0x5bb055(0x10c)][_0x5bb055(0x145)]||_0x1d2b30[_0x5bb055(0x10c)][_0x5bb055(0x13c)]||undefined,'userDomain':_0x1d2b30[_0x5bb055(0x10c)]['userDomain']||undefined,'runtimeDomain':_0x1d2b30[_0x5bb055(0x10c)][_0x5bb055(0x12a)]||undefined});}export function getProjectConfigPath(){const _0x26af1a=a42_0x19e65d;return resolveConfigPath(process[_0x26af1a(0x100)]());}export function getGlobalConfigPath(){return resolveConfigPath(homedir());}export function inspectCliConfigJsonFile(_0xb401ea){const _0x2313e2=a42_0x19e65d;if(!existsSync(_0xb401ea))return{'status':_0x2313e2(0x114)};try{const _0x1c771b=readFileSync(_0xb401ea,{'encoding':_0x2313e2(0x120)});if(!_0x1c771b?.[_0x2313e2(0x13d)]())return{'status':_0x2313e2(0x137)};const _0x19e8ef=JSON[_0x2313e2(0x134)](_0x1c771b);return{'status':'ok','data':_0x19e8ef};}catch(_0x45eaa0){return{'status':_0x2313e2(0x13b),'message':_0x45eaa0 instanceof Error?_0x45eaa0[_0x2313e2(0x10e)]:String(_0x45eaa0)};}}export function loadRawConfigLayers(_0x442a56){const _0x590f03=a42_0x19e65d;let _0x53bd22={},_0x515aea={},_0x400de4,_0x841049;try{_0x400de4=resolveConfigPath(homedir());if(_0x400de4){const _0x37b0f1=readFileSync(_0x400de4,{'encoding':_0x590f03(0x120)});if(_0x37b0f1)_0x53bd22=JSON['parse'](_0x37b0f1);}}catch{}try{const _0x56107a=_0x442a56||process[_0x590f03(0x100)]();_0x841049=resolveConfigPath(_0x56107a);if(_0x841049){const _0x2fab5e=readFileSync(_0x841049,{'encoding':'utf8'});if(_0x2fab5e)_0x515aea=JSON[_0x590f03(0x134)](_0x2fab5e);}}catch{}return{'globalPath':_0x400de4,'projectPath':_0x841049,'globalConfig':_0x53bd22,'projectConfig':_0x515aea};}function mergeRawConfigLayers(_0x1545bc){const _0x384a85=a42_0x19e65d,{globalConfig:_0x355579,projectConfig:_0x4e44b6}=_0x1545bc;if(_0x4e44b6[_0x384a85(0x105)]===![]){const _0x3c2ad6={..._0x4e44b6};return delete _0x3c2ad6[_0x384a85(0x105)],_0x3c2ad6;}const _0xbf2285={..._0x355579,..._0x4e44b6};if(_0x384a85(0x141)in _0x4e44b6)_0xbf2285[_0x384a85(0x141)]=_0x4e44b6['defaultApp'];else _0x355579[_0x384a85(0x141)]&&(_0xbf2285[_0x384a85(0x141)]=_0x355579[_0x384a85(0x141)]);return _0xbf2285;}export function isInProject(){return!!getProjectConfigPath();}export function readRawConfig(_0x5e315f){return mergeRawConfigLayers(loadRawConfigLayers(_0x5e315f));}export function readRawConfigWithLayers(_0x139539){const _0x3edcee=loadRawConfigLayers(_0x139539);return{'config':mergeRawConfigLayers(_0x3edcee),'layers':_0x3edcee};}export function resolveDefaultAppSource(_0x401a5e){const _0x40ed02=a42_0x19e65d;if('defaultApp'in _0x401a5e[_0x40ed02(0x123)])return _0x40ed02(0x113);if(_0x401a5e[_0x40ed02(0x123)][_0x40ed02(0x105)]===![])return null;if(_0x401a5e['globalConfig'][_0x40ed02(0x141)])return _0x40ed02(0x139);return null;}function a42_0x42c0(_0x2460d8,_0x30d956){_0x2460d8=_0x2460d8-0xfe;const _0x54c39f=a42_0x54c3();let _0x42c0b1=_0x54c39f[_0x2460d8];return _0x42c0b1;}function buildConfig(_0x121040,_0x24928e){const _0x5811f5=a42_0x19e65d,_0x305c43=_0x121040['defaultApp']||undefined,_0x4eb909=_0x24928e[_0x5811f5(0x107)]||env(_0x5811f5(0x10b))||undefined,_0x9c1328=_0x4eb909||_0x305c43||undefined,_0x190049=env(_0x5811f5(0xfe))||_0x121040['accessKey']||undefined,_0x1e9b6a=_0x24928e['env']||env('ENV')||_0x121040[_0x5811f5(0x10d)]||DEFAULT_CONFIG_VALUES['env'],_0x242d04=normalizeEnv(String(_0x1e9b6a)),_0xabb2af=isDaily(_0x242d04)?'daily':isDev(_0x242d04)?_0x5811f5(0x108):'production',_0x507b30=resolveLocalAppAliasCode(_0x121040,_0x9c1328),_0x3bb7f9=resolveCachedAppCode(_0x9c1328,_0xabb2af,_0x190049),_0x200614=typeof _0x24928e[_0x5811f5(0x11c)]==='string'?_0x24928e[_0x5811f5(0x11c)]:undefined,_0x2818a0=env(_0x5811f5(0x112)),_0x17c82e=_0x4eb909?undefined:_0x121040[_0x5811f5(0x11c)]||_0x121040[_0x5811f5(0x107)]||undefined,_0x18be27=_0x200614||_0x2818a0||_0x507b30||_0x3bb7f9||_0x17c82e||undefined,_0x141c23=_0x200614?_0x5811f5(0x11d):_0x2818a0?'env':_0x507b30?_0x5811f5(0x13f):_0x3bb7f9?_0x5811f5(0x106):_0x17c82e?_0x5811f5(0x104):undefined,_0x4bc94a=_0x121040[_0x5811f5(0x132)]||DEFAULT_CONFIG_VALUES[_0x5811f5(0x132)],_0x2b419c=undefined,_0x2c5e72=_0x24928e[_0x5811f5(0x126)]||env('FORMAT')||_0x121040[_0x5811f5(0x126)],_0x586bf7=normalizeLegacyOutputFormat(_0x2c5e72),_0x39efbc=env(_0x5811f5(0x13a))||_0x121040['pageSize'],_0x58d1b4=_0x39efbc?Number(_0x39efbc)||undefined:undefined,_0x1d309c=_0x121040[_0x5811f5(0x102)]||_0x121040['maxRisk'],_0x53b741=_0x1d309c===_0x5811f5(0x103)||_0x1d309c==='write'||_0x1d309c===_0x5811f5(0x111)?_0x1d309c:DEFAULT_CONFIG_VALUES[_0x5811f5(0x102)],_0x1a1814=env(_0x5811f5(0x142)),_0x275105=_0x1a1814==='1'||_0x1a1814===_0x5811f5(0x11b);return{'appCode':typeof _0x18be27===_0x5811f5(0x130)&&_0x18be27['trim']()?_0x18be27[_0x5811f5(0x13d)]():undefined,'appCodeSource':_0x141c23,'env':_0xabb2af,'locale':_0x4bc94a,'cookie':_0x2b419c,'accessKey':_0x190049,'format':_0x586bf7,'pageSize':_0x58d1b4,'riskLevel':_0x53b741,'verbose':_0x275105,'defaultApp':_0x305c43,'currentApp':typeof _0x9c1328==='string'?_0x9c1328:undefined,'raw':_0x121040};}function env(_0x25264e){return productEnv(_0x25264e);}async function buildAuth(_0xd9853){const _0x16f214='',_0x52b837=!!_0xd9853['accessKey'];return{'cookie':_0x16f214,'isLoggedIn':_0x52b837,async 'getOrLogin'(){const _0x59394c=a42_0x42c0;if(_0x52b837)return _0x16f214;throw CliErrors[_0x59394c(0x109)]();}};}
|
package/lib/core/api-client.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x5574a0,_0x11ed2c){const _0x4b1bf5=a43_0x431b,_0x2f5eb7=_0x5574a0();while(!![]){try{const _0x4fa089=parseInt(_0x4b1bf5(0x104))/0x1+-parseInt(_0x4b1bf5(0x103))/0x2*(-parseInt(_0x4b1bf5(0x128))/0x3)+parseInt(_0x4b1bf5(0x132))/0x4+parseInt(_0x4b1bf5(0x112))/0x5+-parseInt(_0x4b1bf5(0x134))/0x6*(parseInt(_0x4b1bf5(0x105))/0x7)+-parseInt(_0x4b1bf5(0x102))/0x8*(-parseInt(_0x4b1bf5(0x126))/0x9)+-parseInt(_0x4b1bf5(0x133))/0xa;if(_0x4fa089===_0x11ed2c)break;else _0x2f5eb7['push'](_0x2f5eb7['shift']());}catch(_0x147297){_0x2f5eb7['push'](_0x2f5eb7['shift']());}}}(a43_0x70f5,0x43c30));import{getRuntimeDomain}from'../constant/domain.js';import{PRODUCT_CONFIG}from'../constant/product.js';import{CliErrors}from'../errors.js';function a43_0x70f5(){const _0x18e81a=['filter','success','3780603NyYiKl','json','1383876hPzJmu','/client/dataset/list','Check\x20your\x20credentials\x20and\x20try\x20again.','Configure\x20accessKey\x20in\x20','invokeSource','/client/dataset/query?','Request\x20timeout:\x20','/client/skill/personal/create','POST','status','434760YTmsRp','8375880mtRjUr','6WQZepQ','apiError','topK','/client/knowledge-base/personal/create','authRequired','?appCode=','Knowledge-base\x20entry\x20not\x20found:\x20id=','message','data','8hKtbrj','2EwQfgi','14617FVcJGh','78295jiIfNT','errorCode','BFF\x20script\x20not\x20found:\x20id=','/client/knowledge-base/personal/list?appCode=','/client/skill/personal/list?appCode=','object','SQL\x20query\x20not\x20found:\x20','abort','GET','newConfigFileName','sqlCode','query','AbortError','608295LLaJiU','API\x20error\x20code:\x20','/client/skill/personal/','/update','errorMsg','test','isArray','/client/app/my-apps','/client/knowledge-base/search','/client/user/loginUserInfo','/client/bff/query/','code','tableData','name','/client/knowledge-base/personal/','validation','Invalid\x20app\x20list\x20response:\x20missing\x20data.tableData.','string'];a43_0x70f5=function(){return _0x18e81a;};return a43_0x70f5();}import{extractList}from'../framework/response.js';let _activeAK;export function setActiveAK(_0x519092){_activeAK=_0x519092||undefined;}export function clearActiveAK(){_activeAK=undefined;}async function apiRequest(_0xc5c8f6,_0x572706={}){const _0x4b6082=a43_0x431b,{method:method=_0x4b6082(0x10d),body:_0x334b80,headers:headers={},timeout:timeout=0x7530}=_0x572706,_0x4e3252=_activeAK,_0x4fefd8=getRuntimeDomain();if(!_0x4e3252)throw CliErrors[_0x4b6082(0x138)](_0x4b6082(0x12b)+PRODUCT_CONFIG[_0x4b6082(0x10e)]+'.');const _0xbb98ca=''+_0x4fefd8+_0xc5c8f6,_0x55e7a2={'X-User-AK':_0x4e3252},_0x4f00f3=new AbortController(),_0x3ea8ef=setTimeout(()=>_0x4f00f3[_0x4b6082(0x10c)](),timeout);try{const _0x1d0553=await fetch(_0xbb98ca,{'method':method,'headers':{'Content-Type':'application/json','X-Invoke-Source':PRODUCT_CONFIG[_0x4b6082(0x12c)],..._0x55e7a2,...headers},'body':_0x334b80?JSON['stringify'](_0x334b80):undefined,'signal':_0x4f00f3['signal']});let _0x5c0407;try{_0x5c0407=await _0x1d0553[_0x4b6082(0x127)]();}catch{throw CliErrors['apiError']('API\x20returned\x20non-JSON\x20response\x20(HTTP\x20'+_0x1d0553['status']+')',_0x1d0553[_0x4b6082(0x131)]>=0x190?_0x4b6082(0x12a):undefined);}if(!_0x1d0553['ok']||_0x5c0407[_0x4b6082(0x125)]===![])throw CliErrors[_0x4b6082(0x135)](_0x5c0407[_0x4b6082(0x116)]||_0x5c0407[_0x4b6082(0x100)]||'API\x20error:\x20'+_0x1d0553[_0x4b6082(0x131)],_0x5c0407[_0x4b6082(0x106)]?_0x4b6082(0x113)+_0x5c0407['errorCode']:undefined);return _0x5c0407;}catch(_0x1eb8bc){if(_0x1eb8bc instanceof Error&&_0x1eb8bc[_0x4b6082(0x11f)]===_0x4b6082(0x111))throw CliErrors[_0x4b6082(0x135)](_0x4b6082(0x12e)+_0xbb98ca);throw _0x1eb8bc;}finally{clearTimeout(_0x3ea8ef);}}export async function getBffScriptInfo(_0x43cf0f){const _0x3ce226=a43_0x431b,_0xb2412e=await apiRequest(_0x3ce226(0x11c)+_0x43cf0f);if(!_0xb2412e['data'])throw CliErrors['validation'](_0x3ce226(0x107)+_0x43cf0f);return _0xb2412e[_0x3ce226(0x101)];}export async function getSqlQueryInfo(_0x33ea1b,_0x1ccb49){const _0x295cee=a43_0x431b,_0x114474=await apiRequest('/client/sql/query',{'method':'POST','body':{'appCode':_0x33ea1b,'currentPage':0x1,'pageSize':0x1,'sqlCode':_0x1ccb49}}),_0x5166dd=_0x114474['data'],_0x38af55=_0x5166dd&&typeof _0x5166dd===_0x295cee(0x10a)&&'tableData'in _0x5166dd?_0x5166dd[_0x295cee(0x11e)]?.[0x0]:_0x5166dd&&typeof _0x5166dd===_0x295cee(0x10a)&&_0x295cee(0x10f)in _0x5166dd?_0x5166dd:undefined;if(!_0x38af55)throw CliErrors[_0x295cee(0x121)](_0x295cee(0x10b)+_0x1ccb49);return _0x38af55;}function isRemoteAppItem(_0x8aaa12){const _0x4586de=a43_0x431b;return!!_0x8aaa12&&typeof _0x8aaa12==='object'&&typeof _0x8aaa12['appCode']==='string'&&typeof _0x8aaa12['appName']===_0x4586de(0x123);}function extractRemoteAppItems(_0xd605d){const _0x1f756d=a43_0x431b;if(Array['isArray'](_0xd605d))return _0xd605d[_0x1f756d(0x124)](isRemoteAppItem);if(!_0xd605d||typeof _0xd605d!==_0x1f756d(0x10a))throw CliErrors[_0x1f756d(0x135)]('Invalid\x20app\x20list\x20response:\x20expected\x20object\x20or\x20array.');const _0x1cef94=_0xd605d;if(Array[_0x1f756d(0x118)](_0x1cef94[_0x1f756d(0x11e)]))return _0x1cef94[_0x1f756d(0x11e)]['filter'](isRemoteAppItem);if(_0x1cef94[_0x1f756d(0x101)]&&typeof _0x1cef94[_0x1f756d(0x101)]===_0x1f756d(0x10a)){const _0x1c2679=_0x1cef94[_0x1f756d(0x101)];if(Array[_0x1f756d(0x118)](_0x1c2679[_0x1f756d(0x11e)]))return _0x1c2679['tableData']['filter'](isRemoteAppItem);}throw CliErrors[_0x1f756d(0x135)](_0x1f756d(0x122));}export async function getMyApps(){const _0x7b8ca5=a43_0x431b,_0xe51b6f=await apiRequest(_0x7b8ca5(0x119));return extractRemoteAppItems(_0xe51b6f[_0x7b8ca5(0x101)]);}export async function getLoginUserInfo(){const _0x4e09c2=a43_0x431b,_0x69f2fb=await apiRequest(_0x4e09c2(0x11b));if(!_0x69f2fb[_0x4e09c2(0x101)]||typeof _0x69f2fb[_0x4e09c2(0x101)]!==_0x4e09c2(0x10a)||Array[_0x4e09c2(0x118)](_0x69f2fb[_0x4e09c2(0x101)]))throw CliErrors[_0x4e09c2(0x135)]('Invalid\x20login\x20user\x20info\x20response:\x20expected\x20object.');return _0x69f2fb[_0x4e09c2(0x101)];}export async function listDatasets(_0x2a0842,_0x35f4fa){const _0x3ea561=a43_0x431b,_0x4e1f3e=await apiRequest(_0x3ea561(0x129),{'method':_0x3ea561(0x130),'body':{'appCode':_0x2a0842,..._0x35f4fa?.[_0x3ea561(0x11d)]&&{'code':_0x35f4fa[_0x3ea561(0x11d)]},..._0x35f4fa?.[_0x3ea561(0x11f)]&&{'name':_0x35f4fa[_0x3ea561(0x11f)]}}});return extractList(_0x4e1f3e['data']);}export async function getDatasetDetail(_0x3faee4){const _0x318df5=a43_0x431b,_0x42d7f8=/^\d+$/[_0x318df5(0x117)](_0x3faee4)?'id':'code',_0x4b1dcd=await apiRequest(_0x318df5(0x12d)+_0x42d7f8+'='+_0x3faee4);return _0x4b1dcd['data'];}function a43_0x431b(_0x3f5ba2,_0x1c0f3b){_0x3f5ba2=_0x3f5ba2-0xfe;const _0x70f51a=a43_0x70f5();let _0x431bec=_0x70f51a[_0x3f5ba2];return _0x431bec;}export async function listPersonalKnowledgeBaseItems(_0x22ca56){const _0x59b44d=a43_0x431b,_0x2ea132=await apiRequest(_0x59b44d(0x108)+encodeURIComponent(_0x22ca56));return Array['isArray'](_0x2ea132['data'])?_0x2ea132[_0x59b44d(0x101)]:[];}export async function getPersonalKnowledgeBaseItem(_0x52b5f5,_0x3ab710){const _0x4ad5fd=a43_0x431b,_0x15e263=await apiRequest(_0x4ad5fd(0x120)+_0x52b5f5+_0x4ad5fd(0xfe)+encodeURIComponent(_0x3ab710));if(!_0x15e263[_0x4ad5fd(0x101)])throw CliErrors['validation'](_0x4ad5fd(0xff)+_0x52b5f5);return _0x15e263['data'];}export async function createPersonalKnowledgeBaseItem(_0x237d50,_0xf5c2b0){const _0x367f2d=a43_0x431b,_0x1fc4e7=await apiRequest(_0x367f2d(0x137),{'method':_0x367f2d(0x130),'body':{'appCode':_0x237d50,..._0xf5c2b0}});return _0x1fc4e7[_0x367f2d(0x101)];}export async function updatePersonalKnowledgeBaseItem(_0x2be52c,_0x3bb508,_0x28933c){const _0x12a4fb=a43_0x431b,_0x9ab71e=await apiRequest(_0x12a4fb(0x120)+_0x2be52c+_0x12a4fb(0x115),{'method':'POST','body':{'appCode':_0x3bb508,..._0x28933c}});return _0x9ab71e[_0x12a4fb(0x101)];}export async function searchKnowledgeBase(_0x4bbb39,_0x5900fc){const _0x35955c=a43_0x431b,_0x34b3d3=await apiRequest(_0x35955c(0x11a),{'method':_0x35955c(0x130),'body':{'appCode':_0x4bbb39,'query':_0x5900fc[_0x35955c(0x110)],..._0x5900fc['topK']!==undefined?{'topK':_0x5900fc[_0x35955c(0x136)]}:{}}});return Array['isArray'](_0x34b3d3[_0x35955c(0x101)])?_0x34b3d3[_0x35955c(0x101)]:[];}export async function listPersonalRuntimeSkills(_0x378003){const _0x2272f7=a43_0x431b,_0x53d195=await apiRequest(_0x2272f7(0x109)+encodeURIComponent(_0x378003));return Array[_0x2272f7(0x118)](_0x53d195[_0x2272f7(0x101)])?_0x53d195[_0x2272f7(0x101)]:[];}export async function listCompanyRuntimeSkills(_0x2d7933){const _0x5f1f97=a43_0x431b,_0x15fc4a=await apiRequest('/client/skill/company/list?appCode='+encodeURIComponent(_0x2d7933));return Array[_0x5f1f97(0x118)](_0x15fc4a[_0x5f1f97(0x101)])?_0x15fc4a[_0x5f1f97(0x101)]:[];}export async function createPersonalRuntimeSkill(_0x5b3045,_0x4e8b38){const _0x44a32c=a43_0x431b,_0x47f8fb=await apiRequest(_0x44a32c(0x12f),{'method':_0x44a32c(0x130),'body':{'appCode':_0x5b3045,..._0x4e8b38}});return _0x47f8fb[_0x44a32c(0x101)];}export async function updatePersonalRuntimeSkill(_0xfd8d93,_0x3306eb,_0x52dce6){const _0x364dd2=a43_0x431b,_0x31fb1d=await apiRequest(_0x364dd2(0x114)+encodeURIComponent(_0xfd8d93)+_0x364dd2(0x115),{'method':'POST','body':{'appCode':_0x3306eb,..._0x52dce6}});return _0x31fb1d[_0x364dd2(0x101)];}
|
package/lib/core/db-resolver.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x144fc9,_0x14bffb){const _0xd210cf=a44_0x337a,_0x37b323=_0x144fc9();while(!![]){try{const _0x4763f3=parseInt(_0xd210cf(0xa2))/0x1+parseInt(_0xd210cf(0x9e))/0x2+parseInt(_0xd210cf(0xa1))/0x3+parseInt(_0xd210cf(0xa0))/0x4*(-parseInt(_0xd210cf(0xa7))/0x5)+parseInt(_0xd210cf(0xa4))/0x6*(-parseInt(_0xd210cf(0xa5))/0x7)+-parseInt(_0xd210cf(0xa8))/0x8*(-parseInt(_0xd210cf(0xa3))/0x9)+-parseInt(_0xd210cf(0x9c))/0xa*(parseInt(_0xd210cf(0xa9))/0xb);if(_0x4763f3===_0x14bffb)break;else _0x37b323['push'](_0x37b323['shift']());}catch(_0x5c3cde){_0x37b323['push'](_0x37b323['shift']());}}}(a44_0x24c0,0x7b9f8));import{listDatasets}from'../core/api-client.js';function a44_0x337a(_0x29d1e2,_0x30a174){_0x29d1e2=_0x29d1e2-0x9c;const _0x24c07e=a44_0x24c0();let _0x337aa8=_0x24c07e[_0x29d1e2];return _0x337aa8;}function a44_0x24c0(){const _0x2b1c20=['1440494fYXpIt','set','40LRLbum','db-','795824YNBQQy','dbName','44mHBSzQ','2885271EfxRMv','840401UoxpPa','414boTpft','5240604dYMnSd','7DaFfmW','dbId','250110LEVaHB','44136PRdNcS'];a44_0x24c0=function(){return _0x2b1c20;};return a44_0x24c0();}const cache=new Map();export async function listDatabases(_0x574a9d){const _0x28959f=a44_0x337a;if(cache['has'](_0x574a9d))return cache['get'](_0x574a9d);const _0x10a816=await listDatasets(_0x574a9d),_0x7da2fc=new Map();for(const _0x18b53a of _0x10a816){const _0x159168=_0x18b53a['dbtableConfig'];_0x159168?.[_0x28959f(0xa6)]!=null&&_0x7da2fc[_0x28959f(0xaa)](_0x159168[_0x28959f(0xa6)],_0x159168[_0x28959f(0x9f)]??_0x28959f(0x9d)+_0x159168[_0x28959f(0xa6)]);}const _0x40f581=[..._0x7da2fc['entries']()]['map'](([_0x2c0569,_0x158fa2])=>({'dbId':_0x2c0569,'dbName':_0x158fa2}));return cache[_0x28959f(0xaa)](_0x574a9d,_0x40f581),_0x40f581;}export async function getDbName(_0xa7eda3,_0x56cfbf){const _0x187271=a44_0x337a;try{const _0x37490e=await listDatabases(_0xa7eda3);return _0x37490e['find'](_0x3922c9=>_0x3922c9[_0x187271(0xa6)]===_0x56cfbf)?.[_0x187271(0x9f)];}catch{return undefined;}}
|
package/lib/core/sdk-client.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
(function(_0x2d034c,_0x4430b7){const _0x5de31a=a45_0x373c,_0x146878=_0x2d034c();while(!![]){try{const _0x5b0dca=parseInt(_0x5de31a(0x1a2))/0x1+parseInt(_0x5de31a(0x1b3))/0x2*(-parseInt(_0x5de31a(0x1a6))/0x3)+-parseInt(_0x5de31a(0x1b6))/0x4*(-parseInt(_0x5de31a(0x1a8))/0x5)+parseInt(_0x5de31a(0x1b1))/0x6*(parseInt(_0x5de31a(0x1a7))/0x7)+parseInt(_0x5de31a(0x1aa))/0x8*(parseInt(_0x5de31a(0x1ab))/0x9)+parseInt(_0x5de31a(0x1b7))/0xa+-parseInt(_0x5de31a(0x1ae))/0xb;if(_0x5b0dca===_0x4430b7)break;else _0x146878['push'](_0x146878['shift']());}catch(_0x40db74){_0x146878['push'](_0x146878['shift']());}}}(a45_0x3dd6,0xa38e0));function a45_0x3dd6(){const _0x53563f=['449642tOobDc','authMode','accessKey','SDK\x20client\x20not\x20initialized.\x20Call\x20initSdkClient()\x20first.','3BZPDNr','112140AwbhGO','15StxbtW','sql','5785448FwMwCR','9OxGovC','update\x20requires\x20\x22id\x22\x20in\x20--params,\x20e.g.\x20\x27{\x22id\x22:123,\x22name\x22:\x22new\x22}\x27','models','16470718SEWyex','appCode','batchCreate','318xcjQBW','\x22.\x20','1002166nuyhLc','isArray','getOne','623708dxrUmN','1786770hrKcuK','env','function','execute','update','Available:\x20filter,\x20getOne,\x20create,\x20batchCreate,\x20update,\x20delete,\x20aggregate.'];a45_0x3dd6=function(){return _0x53563f;};return a45_0x3dd6();}function a45_0x373c(_0x33cfbf,_0x151b74){_0x33cfbf=_0x33cfbf-0x1a1;const _0x3dd6d7=a45_0x3dd6();let _0x373c9e=_0x3dd6d7[_0x33cfbf];return _0x373c9e;}import{createClient}from'@lovrabet/sdk';import{parseBatchCreateItemsFromParams}from'../utils/params.js';let _client;export function initSdkClient(_0x2a3d77){const _0x38c212=a45_0x373c;_client=createClient({'appCode':_0x2a3d77[_0x38c212(0x1af)],'env':_0x2a3d77[_0x38c212(0x1b8)],'authMode':_0x2a3d77[_0x38c212(0x1a3)],..._0x2a3d77[_0x38c212(0x1a4)]?{'accessKey':_0x2a3d77[_0x38c212(0x1a4)]}:{},'options':{'timeout':0x7530}});}function ensureClient(){const _0x4c2d02=a45_0x373c;if(!_client)throw new Error(_0x4c2d02(0x1a5));return _client;}export async function executeData(_0x1f338d,_0x15bbc5,_0x510f3c){const _0xfc6cad=a45_0x373c,_0x7e4dc0=ensureClient(),_0x283e51='dataset_'+_0x1f338d,_0xc491e3=_0x7e4dc0[_0xfc6cad(0x1ad)][_0x283e51];if(!_0xc491e3||typeof _0xc491e3[_0x15bbc5]!==_0xfc6cad(0x1b9))throw new Error('SDK\x20model\x20does\x20not\x20support\x20operation\x20\x22'+_0x15bbc5+_0xfc6cad(0x1b2)+_0xfc6cad(0x1a1));if(_0x15bbc5===_0xfc6cad(0x1b0))return _0xc491e3[_0xfc6cad(0x1b0)](parseBatchCreateItemsFromParams(_0x510f3c));const _0x230358=_0x510f3c!==undefined&&_0x510f3c!==null&&!Array[_0xfc6cad(0x1b4)](_0x510f3c)?_0x510f3c:{};switch(_0x15bbc5){case _0xfc6cad(0x1b5):{const _0x1145a4=_0x230358['id'];if(_0x1145a4===undefined||_0x1145a4===null)throw new Error('getOne\x20requires\x20\x22id\x22\x20in\x20--params,\x20e.g.\x20\x27{\x22id\x22:123}\x27');return _0xc491e3['getOne'](_0x1145a4);}case _0xfc6cad(0x1bb):{const {id:_0x2996a7,..._0x5a2325}=_0x230358;if(_0x2996a7===undefined||_0x2996a7===null)throw new Error(_0xfc6cad(0x1ac));return _0xc491e3[_0xfc6cad(0x1bb)](_0x2996a7,_0x5a2325);}case'delete':{const _0x1509ed=_0x230358['id'];if(_0x1509ed===undefined||_0x1509ed===null)throw new Error('delete\x20requires\x20\x22id\x22\x20in\x20--params,\x20e.g.\x20\x27{\x22id\x22:123}\x27');return _0xc491e3['delete'](_0x1509ed);}default:return _0xc491e3[_0x15bbc5](_0x230358);}}export async function executeSdkSql(_0x351718,_0x24ece6){const _0x362578=a45_0x373c,_0x322002=ensureClient();return _0x322002[_0x362578(0x1a9)]['execute']({'sqlCode':_0x351718,'params':_0x24ece6});}export async function executeSdkBff(_0x4b6022,_0x1e24a6){const _0x3c557b=a45_0x373c,_0x13c061=ensureClient();return _0x13c061['bff'][_0x3c557b(0x1ba)]({'scriptName':_0x4b6022,'params':_0x1e24a6});}
|
package/lib/errors.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a46_0x170418=a46_0x332e;function a46_0xe0df(){const _0x50cf0b=['22477aIASno','7836666dObFca','18NoGefH','\x20or\x20run\x20`','8734311FDufDg','Set\x20appcode\x20via\x20--appcode\x20or\x20','4755877iBkJTi','newConfigFileName','Run\x20this\x20command\x20inside\x20a\x20directory\x20with\x20a\x20','10131384RKFcEv','3204417yqYhBW','652030KNPiZl','4PHjSCp'];a46_0xe0df=function(){return _0x50cf0b;};return a46_0xe0df();}(function(_0x530212,_0x14a80e){const _0x1657b2=a46_0x332e,_0x430978=_0x530212();while(!![]){try{const _0x25b35a=-parseInt(_0x1657b2(0x138))/0x1*(parseInt(_0x1657b2(0x13a))/0x2)+parseInt(_0x1657b2(0x135))/0x3*(-parseInt(_0x1657b2(0x137))/0x4)+-parseInt(_0x1657b2(0x136))/0x5+parseInt(_0x1657b2(0x139))/0x6+parseInt(_0x1657b2(0x13e))/0x7+parseInt(_0x1657b2(0x134))/0x8+-parseInt(_0x1657b2(0x13c))/0x9;if(_0x25b35a===_0x14a80e)break;else _0x430978['push'](_0x430978['shift']());}catch(_0x3e8ddc){_0x430978['push'](_0x430978['shift']());}}}(a46_0xe0df,0xd6ff4));function a46_0x332e(_0x45270f,_0x15b222){_0x45270f=_0x45270f-0x134;const _0xe0df2d=a46_0xe0df();let _0x332e81=_0xe0df2d[_0x45270f];return _0x332e81;}import{CliError,createCliErrors}from'@lovrabet/cli-framework';import{CLI_BIN_NAME}from'./constant/cli.js';import{PRODUCT_CONFIG}from'./constant/product.js';export{CliError};export const CliErrors=createCliErrors({'cliBinName':CLI_BIN_NAME,'authRequiredHint':'Configure\x20accessKey\x20in\x20'+PRODUCT_CONFIG['newConfigFileName']+a46_0x170418(0x13b)+CLI_BIN_NAME+'\x20auth\x20login`.','configMissingHint':a46_0x170418(0x13d)+PRODUCT_CONFIG[a46_0x170418(0x13f)]+'.','notInProjectHint':a46_0x170418(0x140)+PRODUCT_CONFIG[a46_0x170418(0x13f)]+'\x20file.'});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x1864a1,_0x46d87f){var _0x3ab045=a47_0x385d,_0x31246c=_0x1864a1();while(!![]){try{var _0x808943=parseInt(_0x3ab045(0xb3))/0x1*(-parseInt(_0x3ab045(0xab))/0x2)+parseInt(_0x3ab045(0xac))/0x3*(-parseInt(_0x3ab045(0xaf))/0x4)+parseInt(_0x3ab045(0xb4))/0x5*(parseInt(_0x3ab045(0xae))/0x6)+parseInt(_0x3ab045(0xb6))/0x7+parseInt(_0x3ab045(0xb0))/0x8*(parseInt(_0x3ab045(0xb2))/0x9)+parseInt(_0x3ab045(0xb1))/0xa*(parseInt(_0x3ab045(0xad))/0xb)+parseInt(_0x3ab045(0xb5))/0xc;if(_0x808943===_0x46d87f)break;else _0x31246c['push'](_0x31246c['shift']());}catch(_0x5248a0){_0x31246c['push'](_0x31246c['shift']());}}}(a47_0x100f,0xb362f));function a47_0x385d(_0x1f04cb,_0x1dd26b){_0x1f04cb=_0x1f04cb-0xab;var _0x100f8d=a47_0x100f();var _0x385d5a=_0x100f8d[_0x1f04cb];return _0x385d5a;}function a47_0x100f(){var _0x3ae4c4=['133148zCguET','35049blVSym','673431CXUHdc','519858Hgmhqe','188iYJjyG','16FolpZQ','20VSxkyx','5830794zvOKEe','11IqIeIP','5fSaNnB','5201208WlImpg','545517zXCAPm'];a47_0x100f=function(){return _0x3ae4c4;};return a47_0x100f();}import{DEFAULT_COMMAND_OUTPUT_FORMAT}from'../constant/defaults.js';import{buildAllFlags as a47_0x97a551}from'@lovrabet/cli-framework';export function buildAllFlags(_0x49a42e){return a47_0x97a551(_0x49a42e,{'defaultOutputFormat':DEFAULT_COMMAND_OUTPUT_FORMAT});}
|
package/lib/framework/dryrun.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a48_0x71ad(_0x9f6129,_0x115d4f){_0x9f6129=_0x9f6129-0x1b0;const _0x363a86=a48_0x363a();let _0x71ad5a=_0x363a86[_0x9f6129];return _0x71ad5a;}(function(_0x1697ab,_0x22ef06){const _0x201be5=a48_0x71ad,_0x449f6b=_0x1697ab();while(!![]){try{const _0x571467=-parseInt(_0x201be5(0x1b0))/0x1*(-parseInt(_0x201be5(0x1b2))/0x2)+-parseInt(_0x201be5(0x1b4))/0x3*(parseInt(_0x201be5(0x1b9))/0x4)+parseInt(_0x201be5(0x1b8))/0x5+-parseInt(_0x201be5(0x1b6))/0x6+parseInt(_0x201be5(0x1b1))/0x7*(-parseInt(_0x201be5(0x1b7))/0x8)+-parseInt(_0x201be5(0x1bc))/0x9*(parseInt(_0x201be5(0x1b3))/0xa)+parseInt(_0x201be5(0x1bb))/0xb;if(_0x571467===_0x22ef06)break;else _0x449f6b['push'](_0x449f6b['shift']());}catch(_0x26604d){_0x449f6b['push'](_0x449f6b['shift']());}}}(a48_0x363a,0xccc01));export function dryRun(_0x55feaf,_0x2c88ba){const _0x39d4ab={'method':_0x55feaf,'url':_0x2c88ba},_0x1fabec={'body'(_0x439e1a){const _0x47014f=a48_0x71ad;return _0x39d4ab[_0x47014f(0x1ba)]=_0x439e1a,_0x1fabec;},'description'(_0x59d8d8){const _0x36fac0=a48_0x71ad;return _0x39d4ab[_0x36fac0(0x1b5)]=_0x59d8d8,_0x1fabec;},'build'(){return{..._0x39d4ab};}};return _0x1fabec;}function a48_0x363a(){const _0x46cfc3=['7364260nYlnSq','380hAtBfS','body','15993461fpzsyH','9lZKjEZ','193345rprtzg','7MyZRni','2prYPcL','3733430BKpTuo','6081yXlqbG','description','7650912xVnvVT','3523448bxsLbc'];a48_0x363a=function(){return _0x46cfc3;};return a48_0x363a();}
|