@lovrabet/lovrabet-cli 2.0.9-beta.2 → 2.0.9-beta.3
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 -2
package/lib/commands/sql/exec.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a28_0x1e83ad=a28_0x32ae;(function(_0x109fc6,_0x3f33f6){const _0x2fdd67=a28_0x32ae,_0xb5579e=_0x109fc6();while(!![]){try{const _0x172d5e=parseInt(_0x2fdd67(0xad))/0x1*(parseInt(_0x2fdd67(0xa1))/0x2)+parseInt(_0x2fdd67(0xa7))/0x3+-parseInt(_0x2fdd67(0x98))/0x4+parseInt(_0x2fdd67(0x9d))/0x5*(-parseInt(_0x2fdd67(0xa0))/0x6)+-parseInt(_0x2fdd67(0x9e))/0x7+-parseInt(_0x2fdd67(0xaa))/0x8+parseInt(_0x2fdd67(0x9b))/0x9*(parseInt(_0x2fdd67(0x9c))/0xa);if(_0x172d5e===_0x3f33f6)break;else _0xb5579e['push'](_0xb5579e['shift']());}catch(_0x5e33ad){_0xb5579e['push'](_0xb5579e['shift']());}}}(a28_0x4f28,0x93ace));import{executeSdkSql}from'../../core/sdk-client.js';function a28_0x4f28(){const _0x27caf4=['SQL\x20execution\x20failed','execResult','18tOrxBE','10807360UirhNC','3621955jAFruM','978012wGhMKV','\x20row(s)\x20in\x20','6mRcVgB','420794BahGOl','str','Returned\x20','read','exec','isArray','1201749XgFeMj','now','length','5873512wMAysc','sql','execError','2tfQXFn','3118700Ukfmtx'];a28_0x4f28=function(){return _0x27caf4;};return a28_0x4f28();}import{SQLCODE_FLAG,PARAMS_FLAG}from'../../commands/common/flags.js';function a28_0x32ae(_0x4edd6d,_0x3d9c7e){_0x4edd6d=_0x4edd6d-0x98;const _0x4f2849=a28_0x4f28();let _0x32ae7f=_0x4f2849[_0x4edd6d];return _0x32ae7f;}import{parseJsonParams}from'../../utils/params.js';export const sqlExec={'service':a28_0x1e83ad(0xab),'command':a28_0x1e83ad(0xa5),'description':'Execute\x20a\x20custom\x20SQL\x20query\x20by\x20sqlCode','risk':a28_0x1e83ad(0xa4),'flags':[SQLCODE_FLAG,PARAMS_FLAG],async 'execute'(_0x5b684c){const _0xdd1e6d=a28_0x1e83ad,_0x544821=parseJsonParams(_0x5b684c[_0xdd1e6d(0xa2)]('params')),_0x579f96=Date['now'](),_0x51348f=await executeSdkSql(_0x5b684c[_0xdd1e6d(0xa2)]('sqlcode'),_0x544821),_0x5d15c3=Date[_0xdd1e6d(0xa8)]()-_0x579f96,_0x700b84=_0x51348f?.[_0xdd1e6d(0x9a)]??_0x51348f,_0x213e4c=_0x51348f?.['execSuccess']??!![];if(!_0x213e4c)return{'ok':![],'data':{'error':_0x51348f?.[_0xdd1e6d(0xac)]||_0xdd1e6d(0x99),'elapsed':_0x5d15c3},'message':_0xdd1e6d(0x99)};const _0x4ab601=Array[_0xdd1e6d(0xa6)](_0x700b84)?_0x700b84:[];return{'ok':!![],'data':{'rows':_0x4ab601,'rowCount':_0x4ab601[_0xdd1e6d(0xa9)],'elapsed':_0x5d15c3},'message':_0xdd1e6d(0xa3)+_0x4ab601[_0xdd1e6d(0xa9)]+_0xdd1e6d(0x9f)+_0x5d15c3+'ms'};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0xc60023,_0x5cd2c9){const _0x265582=a29_0x16df,_0x3004d9=_0xc60023();while(!![]){try{const _0x19eb67=parseInt(_0x265582(0xba))/0x1+parseInt(_0x265582(0xb8))/0x2*(parseInt(_0x265582(0xb7))/0x3)+-parseInt(_0x265582(0xbf))/0x4*(parseInt(_0x265582(0xbd))/0x5)+parseInt(_0x265582(0xbc))/0x6*(parseInt(_0x265582(0xb9))/0x7)+-parseInt(_0x265582(0xbe))/0x8+-parseInt(_0x265582(0xb6))/0x9+parseInt(_0x265582(0xbb))/0xa;if(_0x19eb67===_0x5cd2c9)break;else _0x3004d9['push'](_0x3004d9['shift']());}catch(_0x5a949b){_0x3004d9['push'](_0x3004d9['shift']());}}}(a29_0x3de4,0x3a73c));import{sqlDetail}from'../../commands/sql/detail.js';function a29_0x3de4(){const _0x493818=['15lvEbUz','159080FLxLyj','518008wFRcxY','3384027DQUkpV','10671DDDios','194jZVhyH','12306jdShGW','48037ErAoMy','3863860nBLVlK','834YjtfJO'];a29_0x3de4=function(){return _0x493818;};return a29_0x3de4();}function a29_0x16df(_0xe53d46,_0x6f38fc){_0xe53d46=_0xe53d46-0xb6;const _0x3de47d=a29_0x3de4();let _0x16dfd0=_0x3de47d[_0xe53d46];return _0x16dfd0;}import{sqlExec}from'../../commands/sql/exec.js';export const sqlDefinitions=[sqlDetail,sqlExec];
|
package/lib/commands/update.js
CHANGED
|
@@ -1 +1 @@
|
|
|
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};
|
|
1
|
+
const a30_0xa2d12d=a30_0x21a6;(function(_0x552b34,_0x50768d){const _0x38ecc8=a30_0x21a6,_0x18db24=_0x552b34();while(!![]){try{const _0x111c8f=parseInt(_0x38ecc8(0x12b))/0x1+-parseInt(_0x38ecc8(0x139))/0x2*(-parseInt(_0x38ecc8(0x13d))/0x3)+-parseInt(_0x38ecc8(0x16c))/0x4+parseInt(_0x38ecc8(0x125))/0x5*(parseInt(_0x38ecc8(0x134))/0x6)+parseInt(_0x38ecc8(0x126))/0x7+parseInt(_0x38ecc8(0x130))/0x8*(-parseInt(_0x38ecc8(0x144))/0x9)+parseInt(_0x38ecc8(0x153))/0xa;if(_0x111c8f===_0x50768d)break;else _0x18db24['push'](_0x18db24['shift']());}catch(_0x266a2f){_0x18db24['push'](_0x18db24['shift']());}}}(a30_0x5961,0x89714));import{spawnSync}from'node:child_process';function a30_0x5961(){const _0x1ed458=['Already\x20up\x20to\x20date\x20(v','object','=1).','Skipping\x20official\x20skill\x20package\x20(--no-skills).','args','json','4305020MSUkVg','Use\x20full\x20semver\x20versions\x20such\x20as\x202.0.6\x20or\x202.0.7-beta.1.','Updating\x20','log','5nBoibb','5562613yyTblY','no-skills','/dist-tags','prerelease','/-/package/','247024XOweTo','Version\x20comparison\x20failed.','major','\x20\x20Try\x20manually:\x20npm\x20install\x20-g\x20','minor','216hFtzax','\x20\x20Official\x20skill\x20package\x20is\x20up\x20to\x20date.','fromEntries','filter','2400066ISjUrN','warn','Update\x20failed:\x20','\x20\x20Skipped\x20skill\x20install\x20(','\x20\x20Restart\x20your\x20terminal\x20to\x20use\x20the\x20new\x20version.','6TFkuDN','Choose\x20exactly\x20one\x20target:\x20--latest,\x20--beta,\x20or\x20--version\x20<version>.','nonInteractive','\x20\x20Official\x20skill\x20update\x20failed:\x20','195441WckqtU','error','Install\x20the\x20version\x20from\x20npm\x20latest\x20dist-tag','version','stderr','message','skills','25614mRMrGF','skipped','Checking\x20official\x20skill\x20package...','beta','validation','latest','Checking\x20npm\x20dist-tags...','write','Already\x20on\x20requested\x20version\x20(v','Install\x20the\x20version\x20from\x20npm\x20beta\x20dist-tag','run','Updated\x20to\x20v','boolean','\x20\x20Run\x20manually:\x20npx\x20skills\x20add\x20','Invalid\x20version:\x20','789260DUGvxq','toString','entries','bool','exit\x20','inherit','Current\x20version:\x20','unknown','install','str','Skip\x20official\x20skill\x20package\x20refresh\x20after\x20updating','stdout','update','status','Update\x20','trim','--latest,\x20--beta,\x20and\x20version\x20cannot\x20be\x20used\x20together.','Unable\x20to\x20resolve\x20','\x20->\x20'];a30_0x5961=function(){return _0x1ed458;};return a30_0x5961();}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';function a30_0x21a6(_0x30669a,_0x5efcec){_0x30669a=_0x30669a-0x123;const _0x596156=a30_0x5961();let _0x21a605=_0x596156[_0x30669a];return _0x21a605;}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':'latest','type':a30_0xa2d12d(0x150),'description':a30_0xa2d12d(0x13f),'default':![]},{'name':a30_0xa2d12d(0x147),'type':a30_0xa2d12d(0x150),'description':a30_0xa2d12d(0x14d),'default':![]},{'name':a30_0xa2d12d(0x140),'type':'string','description':'Install\x20a\x20specific\x20CLI\x20version'},{'name':a30_0xa2d12d(0x127),'type':'boolean','description':a30_0xa2d12d(0x15d),'default':![]},{'name':a30_0xa2d12d(0x143),'type':a30_0xa2d12d(0x150),'description':'Refresh\x20official\x20skill\x20package\x20after\x20updating','default':!![],'hidden':!![]}];function parseSemver(_0x42537f){const _0x39966d=a30_0xa2d12d,_0xe0b0ce=_0x42537f[_0x39966d(0x162)]()['match'](/^(\d+)\.(\d+)\.(\d+)(?:-([0-9A-Za-z.-]+))?$/);if(!_0xe0b0ce)return null;return{'major':Number(_0xe0b0ce[0x1]),'minor':Number(_0xe0b0ce[0x2]),'patch':Number(_0xe0b0ce[0x3]),'prerelease':_0xe0b0ce[0x4]};}function compareSemver(_0x26046e,_0x220883){const _0xf8803c=a30_0xa2d12d,_0x3edcbf=parseSemver(_0x26046e),_0x4a7ad9=parseSemver(_0x220883);if(!_0x3edcbf||!_0x4a7ad9)throw CliErrors[_0xf8803c(0x148)](_0xf8803c(0x12c),_0xf8803c(0x16d));for(const _0x38488e of[_0xf8803c(0x12d),_0xf8803c(0x12f),'patch']){if(_0x3edcbf[_0x38488e]<_0x4a7ad9[_0x38488e])return-0x1;if(_0x3edcbf[_0x38488e]>_0x4a7ad9[_0x38488e])return 0x1;}if(!_0x3edcbf[_0xf8803c(0x129)]&&!_0x4a7ad9[_0xf8803c(0x129)])return 0x0;if(!_0x3edcbf[_0xf8803c(0x129)])return 0x1;if(!_0x4a7ad9['prerelease'])return-0x1;if(_0x3edcbf[_0xf8803c(0x129)]===_0x4a7ad9[_0xf8803c(0x129)])return 0x0;return _0x3edcbf[_0xf8803c(0x129)]<_0x4a7ad9[_0xf8803c(0x129)]?-0x1:0x1;}function getRequestedVersion(_0x400662){const _0xe666d6=a30_0xa2d12d,_0xc79ec7=_0x400662[_0xe666d6(0x15c)]('version')[_0xe666d6(0x162)]();if(_0xc79ec7)return _0xc79ec7;return String(_0x400662[_0xe666d6(0x16a)]?.[0x0]??'')[_0xe666d6(0x162)]();}function shouldSkipOfficialSkill(_0x4c4ef2){const _0x173a7b=a30_0xa2d12d;return _0x4c4ef2[_0x173a7b(0x156)](_0x173a7b(0x127))||_0x4c4ef2['flag'](_0x173a7b(0x143))===![];}async function validateUpdateFlags(_0x53faf1){const _0x2b9523=a30_0xa2d12d,_0x3b938c=getRequestedVersion(_0x53faf1),_0x540d99=[_0x53faf1[_0x2b9523(0x156)](_0x2b9523(0x149))?'latest':'',_0x53faf1[_0x2b9523(0x156)](_0x2b9523(0x147))?'beta':'',_0x3b938c?_0x2b9523(0x140):''][_0x2b9523(0x133)](Boolean);if(_0x540d99['length']>0x1)throw CliErrors['validation'](_0x2b9523(0x163),_0x2b9523(0x13a));if(_0x3b938c&&!parseSemver(_0x3b938c))throw CliErrors[_0x2b9523(0x148)](_0x2b9523(0x152)+_0x3b938c,'Use\x20a\x20full\x20semver\x20such\x20as\x202.0.6\x20or\x202.0.7-beta.1.');}async function fetchNpmDistTags(){const _0x268447=a30_0xa2d12d;try{const _0x4a7c36=NPM_REGISTRY_BASE_URL+_0x268447(0x12a)+encodeURIComponent(LOVRABET_NPM_PACKAGE_NAME)+_0x268447(0x128),_0x3b34be=await fetch(_0x4a7c36,{'signal':AbortSignal['timeout'](0x2710)});if(!_0x3b34be['ok'])return null;const _0x4db178=await _0x3b34be[_0x268447(0x16b)]();if(!_0x4db178||typeof _0x4db178!==_0x268447(0x167))return null;return Object[_0x268447(0x132)](Object[_0x268447(0x155)](_0x4db178)['filter'](([,_0x367ac9])=>typeof _0x367ac9==='string'&&_0x367ac9[_0x268447(0x162)]())['map'](([_0x44fcea,_0x1cfa2e])=>[_0x44fcea,String(_0x1cfa2e)[_0x268447(0x162)]()]));}catch{return null;}}async function resolveTargetVersion(_0x32a744){const _0x339901=a30_0xa2d12d,_0x1769c0=getRequestedVersion(_0x32a744);if(_0x1769c0)return{'version':_0x1769c0,'source':_0x339901(0x140)};const _0x364232=_0x32a744[_0x339901(0x156)](_0x339901(0x147))?_0x339901(0x147):'latest',_0x154bb4=await fetchNpmDistTags(),_0x3e2d78=_0x154bb4?.[_0x364232];if(!_0x3e2d78)return null;return{'version':_0x3e2d78,'source':_0x364232};}function shouldInstallTarget(_0x852d8d,_0xc2bdf9){const _0x3ba9a6=a30_0xa2d12d,_0x2197e0=compareSemver(_0x852d8d,_0xc2bdf9[_0x3ba9a6(0x140)]);if(_0xc2bdf9['source']===_0x3ba9a6(0x140))return _0x2197e0!==0x0;return _0x2197e0<0x0;}function installCliPackage(_0x364d82,_0x933150){const _0x2839f2=a30_0xa2d12d,_0x524b15=resolveNpmBin('npm'),_0x375173=[_0x2839f2(0x15b),'-g',LOVRABET_NPM_PACKAGE_NAME+'@'+_0x364d82];console[_0x2839f2(0x124)]('*\x20'+[_0x524b15,..._0x375173]['join']('\x20'));const _0xc9c3df=spawnSync(_0x524b15,_0x375173,{'cwd':process['cwd'](),'stdio':_0x933150?'pipe':_0x2839f2(0x158),'env':process.env,'shell':![]});if(_0xc9c3df[_0x2839f2(0x160)]===0x0)return{'ok':!![]};let _0x254183=_0xc9c3df[_0x2839f2(0x13e)]?.[_0x2839f2(0x142)]||_0x2839f2(0x157)+(_0xc9c3df['status']??_0x2839f2(0x15a));if(_0x933150){const _0x4531cd=_0xc9c3df[_0x2839f2(0x141)]?_0xc9c3df['stderr'][_0x2839f2(0x154)]()[_0x2839f2(0x162)]():'',_0x312b7e=_0xc9c3df[_0x2839f2(0x15e)]?_0xc9c3df[_0x2839f2(0x15e)][_0x2839f2(0x154)]()[_0x2839f2(0x162)]():'';if(_0x4531cd)_0x254183=_0x4531cd;else{if(_0x312b7e)_0x254183=_0x312b7e;}}return{'ok':![],'error':_0x254183};}async function installOfficialSkill(_0x1d995e){const _0x205448=a30_0xa2d12d;console['log'](_0x205448(0x146));const _0x19e8f6=runNpxSkillsAddGlobal(process['cwd'](),LOVRABET_SKILL_SOURCE,{'stdio':_0x1d995e?'pipe':_0x205448(0x158)});if(_0x19e8f6[_0x205448(0x145)]){console['log'](_0x205448(0x137)+LOVRABET_SKIP_NPX_SKILLS_ENV+_0x205448(0x168));return;}if(_0x19e8f6['ok']){console['log'](_0x205448(0x131));return;}console['warn'](_0x205448(0x13c)+(_0x19e8f6['error']||'unknown')),console[_0x205448(0x124)](_0x205448(0x151)+LOVRABET_SKILL_SOURCE+'\x20-g\x20-y');}async function execute(_0x20a76b){const _0x4402f7=a30_0xa2d12d;await validateUpdateFlags(_0x20a76b);const _0x8b1297=getCliVersion();console[_0x4402f7(0x124)](_0x4402f7(0x159)+_0x8b1297),console['log'](_0x4402f7(0x14a));const _0x14df9b=await resolveTargetVersion(_0x20a76b);if(!_0x14df9b){const _0x49b512=_0x20a76b[_0x4402f7(0x156)]('beta')?_0x4402f7(0x147):_0x4402f7(0x149),_0x216ef3=_0x4402f7(0x164)+_0x49b512+'\x20version\x20from\x20npm.';return console[_0x4402f7(0x135)](_0x216ef3),console[_0x4402f7(0x124)]('\x20\x20Run\x20manually:\x20npm\x20install\x20-g\x20'+LOVRABET_NPM_PACKAGE_NAME+'@'+_0x49b512),{'ok':![]};}if(!shouldInstallTarget(_0x8b1297,_0x14df9b)){const _0x5abf96=_0x14df9b['source']===_0x4402f7(0x140)?_0x4402f7(0x14c)+_0x14df9b[_0x4402f7(0x140)]+').':_0x4402f7(0x166)+_0x14df9b[_0x4402f7(0x140)]+').';return console[_0x4402f7(0x124)](_0x5abf96),shouldSkipOfficialSkill(_0x20a76b)?console['log'](_0x4402f7(0x169)):await installOfficialSkill(_0x20a76b['nonInteractive']),{'ok':!![]};}console['log'](_0x4402f7(0x123)+LOVRABET_NPM_PACKAGE_NAME+':\x20'+_0x8b1297+_0x4402f7(0x165)+_0x14df9b['version']);const _0x356520=installCliPackage(_0x14df9b['version'],_0x20a76b[_0x4402f7(0x13b)]);if(!_0x356520['ok']){const _0x42f631=_0x4402f7(0x136)+(_0x356520['error']||_0x4402f7(0x15a));return console[_0x4402f7(0x13e)](_0x42f631),console['log'](_0x4402f7(0x12e)+LOVRABET_NPM_PACKAGE_NAME+'@'+_0x14df9b[_0x4402f7(0x140)]),{'ok':![]};}return console[_0x4402f7(0x124)](_0x4402f7(0x14f)+_0x14df9b[_0x4402f7(0x140)]+'.'),console['log'](_0x4402f7(0x138)),shouldSkipOfficialSkill(_0x20a76b)?console[_0x4402f7(0x124)]('Skipping\x20official\x20skill\x20package\x20(--no-skills).'):await installOfficialSkill(_0x20a76b[_0x4402f7(0x13b)]),{'ok':!![]};}export const updateDefinition={'service':a30_0xa2d12d(0x15f),'command':a30_0xa2d12d(0x14e),'description':a30_0xa2d12d(0x161)+CLI_BIN_NAME+'\x20CLI\x20from\x20npm','risk':a30_0xa2d12d(0x14b),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':updateFlags,'validate':validateUpdateFlags,'execute':execute};
|
package/lib/config/schema.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a31_0x3a782a=a31_0x4c6d;(function(_0x46dbce,_0x199f88){const _0x3be1f2=a31_0x4c6d,_0x10f5fa=_0x46dbce();while(!![]){try{const _0x27dfba=-parseInt(_0x3be1f2(0x208))/0x1*(-parseInt(_0x3be1f2(0x201))/0x2)+parseInt(_0x3be1f2(0x20e))/0x3*(parseInt(_0x3be1f2(0x205))/0x4)+parseInt(_0x3be1f2(0x1fc))/0x5*(parseInt(_0x3be1f2(0x1f4))/0x6)+-parseInt(_0x3be1f2(0x1fa))/0x7*(-parseInt(_0x3be1f2(0x200))/0x8)+parseInt(_0x3be1f2(0x1ef))/0x9+parseInt(_0x3be1f2(0x1f1))/0xa+-parseInt(_0x3be1f2(0x1f6))/0xb*(parseInt(_0x3be1f2(0x20f))/0xc);if(_0x27dfba===_0x199f88)break;else _0x10f5fa['push'](_0x10f5fa['shift']());}catch(_0x19a0ef){_0x10f5fa['push'](_0x10f5fa['shift']());}}}(a31_0xe255,0xe3006));function a31_0x4c6d(_0x5cf8cb,_0x10a3e2){_0x5cf8cb=_0x5cf8cb-0x1ee;const _0xe25501=a31_0xe255();let _0x4c6db1=_0xe25501[_0x5cf8cb];return _0x4c6db1;}function a31_0xe255(){const _0x404a88=['1266066BcGfEk','legacyCompatOnly','5436040PskwfK','format','filter','60594AfGFNy','riskLevel','34438085hKlGyB','Override\x20user\x20domain','entries','Override\x20API\x20domain','8414ytjSSE','fromEntries','590khxJzw','Default\x20page\x20size','defaultValue','enumValues','664XkQdby','2vtjDzi','cliSettableTopLevel','Access\x20key\x20(client-ak\x20auth)','map','8QejdrM',';\x20local\x20alias:\x20apps.<alias>.appcode','Override\x20runtime\x20domain','1724399iSeMJk','join','Risk\x20level','Config\x20key.\x20Top-level:\x20','env','Locale','540612irjNwe','12jWsfOx','locale'];a31_0xe255=function(){return _0x404a88;};return a31_0xe255();}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':'Target\x20environment','topLevel':!![],'cliSettableTopLevel':!![],'enumValues':RUNTIME_ENV_VALUES,'defaultValue':DEFAULT_CONFIG_VALUES[a31_0x3a782a(0x20c)],'importable':!![]},'format':{'description':'Default\x20output\x20format','topLevel':!![],'cliSettableTopLevel':!![],'enumValues':OUTPUT_FORMAT_VALUES,'defaultValue':DEFAULT_CONFIG_VALUES[a31_0x3a782a(0x1f2)],'importable':!![]},'pageSize':{'description':a31_0x3a782a(0x1fd),'topLevel':!![],'cliSettableTopLevel':!![],'importable':!![]},'apiDomain':{'description':a31_0x3a782a(0x1f9),'topLevel':!![],'cliSettableTopLevel':!![],'importable':!![]},'userDomain':{'description':a31_0x3a782a(0x1f7),'topLevel':!![],'cliSettableTopLevel':!![],'importable':!![]},'runtimeDomain':{'description':a31_0x3a782a(0x207),'topLevel':!![],'cliSettableTopLevel':!![],'importable':!![]},'accessKey':{'description':a31_0x3a782a(0x203),'topLevel':!![],'cliSettableTopLevel':!![],'importable':!![]},'riskLevel':{'description':a31_0x3a782a(0x20a),'topLevel':!![],'defaultValue':DEFAULT_CONFIG_VALUES[a31_0x3a782a(0x1f5)],'importable':!![]},'locale':{'description':a31_0x3a782a(0x20d),'topLevel':!![],'defaultValue':DEFAULT_CONFIG_VALUES[a31_0x3a782a(0x1ee)],'importable':!![],'legacyCompatOnly':!![]}};export const TOP_LEVEL_CONFIG_KEYS=new Set(Object['entries'](CONFIG_FIELD_SCHEMAS)[a31_0x3a782a(0x1f3)](([,_0x2fe6ea])=>_0x2fe6ea[a31_0x3a782a(0x202)])[a31_0x3a782a(0x204)](([_0x4a5ffb])=>_0x4a5ffb));export const CONFIG_ENUM_VALUES=Object[a31_0x3a782a(0x1fb)](Object[a31_0x3a782a(0x1f8)](CONFIG_FIELD_SCHEMAS)[a31_0x3a782a(0x1f3)](([,_0x49ce2f])=>_0x49ce2f[a31_0x3a782a(0x1ff)])[a31_0x3a782a(0x204)](([_0x2bfab4,_0x2f41fa])=>[_0x2bfab4,[..._0x2f41fa[a31_0x3a782a(0x1ff)]||[]]]));export const IMPORTABLE_RUNTIME_CONFIG_KEYS=Object[a31_0x3a782a(0x1f8)](CONFIG_FIELD_SCHEMAS)[a31_0x3a782a(0x1f3)](([,_0x2f0200])=>_0x2f0200['importable'])['map'](([_0x4caf87])=>_0x4caf87);export function getConfigFieldSchema(_0x70c9b7){return CONFIG_FIELD_SCHEMAS[_0x70c9b7];}export function getConfigEnumValues(_0x339814){const _0x8a80bc=a31_0x3a782a;return getConfigFieldSchema(_0x339814)?.[_0x8a80bc(0x1ff)];}export function getConfigDefaultValue(_0x183ed4){const _0x394dad=a31_0x3a782a;return getConfigFieldSchema(_0x183ed4)?.[_0x394dad(0x1fe)];}export function isTopLevelConfigKey(_0x414ecc){return TOP_LEVEL_CONFIG_KEYS['has'](_0x414ecc);}export function isLegacyCompatConfigKey(_0xb515c){const _0x2c9554=a31_0x3a782a;return getConfigFieldSchema(_0xb515c)?.[_0x2c9554(0x1f0)]===!![];}export function getTopLevelConfigKeyList(){return[...TOP_LEVEL_CONFIG_KEYS];}export function formatConfigKeyList(_0x4188f7){const _0x614f3b=a31_0x3a782a;return[..._0x4188f7][_0x614f3b(0x209)](',\x20');}export function getTopLevelConfigKeySummary(){return formatConfigKeyList(getTopLevelConfigKeyList());}export function getConfigCommandKeyDescription(){const _0x34eb75=a31_0x3a782a;return _0x34eb75(0x20b)+getTopLevelConfigKeySummary()+_0x34eb75(0x206);}export function buildAppProfileListFields(_0x4a9f13){return{'env':_0x4a9f13,'hasAccessKey':![],'format':null,'pageSize':null,'riskLevel':null,'locale':null};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const a32_0x45ca55=a32_0x41da;function a32_0x41da(_0x23be41,_0x34fbff){_0x23be41=_0x23be41-0x1f0;const _0x4a2789=a32_0x4a27();let _0x41da1c=_0x4a2789[_0x23be41];return _0x41da1c;}(function(_0x4d814b,_0x50bc58){const _0x3698ec=a32_0x41da,_0x96f269=_0x4d814b();while(!![]){try{const _0x4ce1c2=-parseInt(_0x3698ec(0x1f6))/0x1*(parseInt(_0x3698ec(0x1f2))/0x2)+-parseInt(_0x3698ec(0x1fb))/0x3*(parseInt(_0x3698ec(0x1f4))/0x4)+-parseInt(_0x3698ec(0x1f3))/0x5+parseInt(_0x3698ec(0x1fa))/0x6+parseInt(_0x3698ec(0x1f8))/0x7+parseInt(_0x3698ec(0x1f1))/0x8*(parseInt(_0x3698ec(0x1fc))/0x9)+-parseInt(_0x3698ec(0x1f7))/0xa*(parseInt(_0x3698ec(0x1f0))/0xb);if(_0x4ce1c2===_0x50bc58)break;else _0x96f269['push'](_0x96f269['shift']());}catch(_0x12330c){_0x96f269['push'](_0x96f269['shift']());}}}(a32_0x4a27,0x9467d));export const AUTH_MODE={'ClientAk':a32_0x45ca55(0x1f5)};function a32_0x4a27(){const _0x1804b9=['36301KtlHDi','80sfgvwu','2704989kjifGG','ClientAk','6071250LSgcfD','105ZBrHyE','43803UCqien','697906OwHvCK','568MQTuzq','12jseSeR','1593880nLNGOJ','10496drkVpP','client-ak'];a32_0x4a27=function(){return _0x1804b9;};return a32_0x4a27();}export function isAuthMode(_0x44558b){const _0x1fe71f=a32_0x45ca55;return _0x44558b===AUTH_MODE[_0x1fe71f(0x1f9)];}
|
package/lib/constant/cli.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a33_0x50695e=a33_0x1055;function a33_0x1344(){const _0xb2fba5=['10HrDmSR','help','1378772ShXBee','720008vSpDnY','Output\x20format','Environment','appcode','9ILJXZF','<expr>','dry-run','35dckHkX','Skip\x20confirmation\x20for\x20high-risk\x20writes','global','Filter\x20JSON\x20output\x20(JQ_PATH\x20>\x20bundled\x20jq\x20>\x20PATH;\x20implies\x20--format\x20json\x20when\x20current\x20format\x20is\x20pretty)','Use\x20global\x20config\x20scope','map','Clear\x20output','params','cliBinName','8nOnxyG','non-interactive','meowKey','2210598udnltm','boolean','Preview\x20operation\x20without\x20executing','app','yes','name','sqlcode','nonInteractive','fromEntries','Verbose\x20output','40101RGGtUL','Force\x20non-interactive\x20mode\x20(CI)','595770hfyYwi','verbose','Override\x20appcode','cliDisplayName','format','env','<name>','Record\x20ID','clear','string','2459076mJwfdI','10406506EzZtdt'];a33_0x1344=function(){return _0xb2fba5;};return a33_0x1344();}(function(_0x24e557,_0x33e4fa){const _0x378c64=a33_0x1055,_0x4c1b30=_0x24e557();while(!![]){try{const _0x44b1fd=-parseInt(_0x378c64(0x1f0))/0x1*(-parseInt(_0x378c64(0x1e3))/0x2)+parseInt(_0x378c64(0x1e6))/0x3+parseInt(_0x378c64(0x1d2))/0x4*(parseInt(_0x378c64(0x1d0))/0x5)+parseInt(_0x378c64(0x1ce))/0x6+-parseInt(_0x378c64(0x1da))/0x7*(parseInt(_0x378c64(0x1d3))/0x8)+-parseInt(_0x378c64(0x1d7))/0x9*(-parseInt(_0x378c64(0x1f2))/0xa)+-parseInt(_0x378c64(0x1cf))/0xb;if(_0x44b1fd===_0x33e4fa)break;else _0x4c1b30['push'](_0x4c1b30['shift']());}catch(_0x49e496){_0x4c1b30['push'](_0x4c1b30['shift']());}}}(a33_0x1344,0xa123c));import{PRODUCT_CONFIG}from'../constant/product.js';import{LOVRABET_NPM_PACKAGE_NAME}from'../constant/distribution.js';export const CLI_BIN_NAME=PRODUCT_CONFIG[a33_0x50695e(0x1e2)];export const CLI_DISPLAY_NAME=PRODUCT_CONFIG[a33_0x50695e(0x1c7)];function a33_0x1055(_0x4fb506,_0x169cdb){_0x4fb506=_0x4fb506-0x1c6;const _0x134495=a33_0x1344();let _0x1055f4=_0x134495[_0x4fb506];return _0x1055f4;}export const NPM_PACKAGE_NAME=LOVRABET_NPM_PACKAGE_NAME;export const GLOBAL_FLAGS=[{'name':a33_0x50695e(0x1d6),'meowKey':a33_0x50695e(0x1d6),'type':a33_0x50695e(0x1cd),'description':a33_0x50695e(0x1c6),'hint':'<code>'},{'name':'app','meowKey':a33_0x50695e(0x1e9),'type':a33_0x50695e(0x1cd),'description':'Select\x20app\x20profile\x20by\x20name','hint':a33_0x50695e(0x1ca)},{'name':a33_0x50695e(0x1c9),'meowKey':a33_0x50695e(0x1c9),'type':'string','description':a33_0x50695e(0x1d5),'hint':'production\x20|\x20development\x20|\x20daily'},{'name':'format','meowKey':a33_0x50695e(0x1c8),'type':a33_0x50695e(0x1cd),'description':a33_0x50695e(0x1d4),'hint':'json\x20|\x20pretty\x20|\x20compress'},{'name':'jq','meowKey':'jq','type':a33_0x50695e(0x1cd),'description':a33_0x50695e(0x1dd),'hint':a33_0x50695e(0x1d8)},{'name':'dry-run','meowKey':'dryRun','type':a33_0x50695e(0x1e7),'description':a33_0x50695e(0x1e8)},{'name':a33_0x50695e(0x1ea),'meowKey':a33_0x50695e(0x1ea),'type':a33_0x50695e(0x1e7),'description':a33_0x50695e(0x1db)},{'name':a33_0x50695e(0x1e4),'meowKey':a33_0x50695e(0x1ed),'type':'boolean','description':a33_0x50695e(0x1f1)},{'name':a33_0x50695e(0x1dc),'meowKey':'global','type':a33_0x50695e(0x1e7),'description':a33_0x50695e(0x1de)},{'name':'ci','meowKey':'ci','type':a33_0x50695e(0x1e7),'description':'Alias\x20for\x20--non-interactive','hidden':!![]},{'name':a33_0x50695e(0x1d1),'meowKey':'help','type':'boolean','description':'Show\x20help'},{'name':'id','meowKey':'id','type':a33_0x50695e(0x1cd),'description':a33_0x50695e(0x1cb),'hidden':!![]},{'name':a33_0x50695e(0x1eb),'meowKey':'name','type':a33_0x50695e(0x1cd),'description':'Name\x20filter','hidden':!![]},{'name':'sqlcode','meowKey':a33_0x50695e(0x1ec),'type':a33_0x50695e(0x1cd),'description':'SQL\x20query\x20code','hidden':!![]},{'name':a33_0x50695e(0x1e1),'meowKey':a33_0x50695e(0x1e1),'type':a33_0x50695e(0x1cd),'description':'JSON\x20params\x20for\x20execute\x20commands','hidden':!![]},{'name':a33_0x50695e(0x1f3),'meowKey':a33_0x50695e(0x1f3),'type':'boolean','description':a33_0x50695e(0x1ef),'hidden':!![]},{'name':'clear','meowKey':a33_0x50695e(0x1cc),'type':'boolean','description':a33_0x50695e(0x1e0),'hidden':!![]}];export const PIPELINE_FLAG_NAMES=new Set([a33_0x50695e(0x1d6),a33_0x50695e(0x1e9),a33_0x50695e(0x1c9),a33_0x50695e(0x1c8),'jq',a33_0x50695e(0x1d9),a33_0x50695e(0x1ea),'non-interactive','ci']);export function buildMeowFlags(){const _0x2e71e4=a33_0x50695e;return Object[_0x2e71e4(0x1ee)](GLOBAL_FLAGS[_0x2e71e4(0x1df)](_0x28f153=>[_0x28f153[_0x2e71e4(0x1e5)],{'type':_0x28f153['type']}]));}
|
package/lib/constant/defaults.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a34_0xc1c0da=a34_0x51b4;(function(_0x237278,_0x184556){const _0x3817a5=a34_0x51b4,_0x4f78b4=_0x237278();while(!![]){try{const _0x7a3c02=parseInt(_0x3817a5(0x110))/0x1*(parseInt(_0x3817a5(0x114))/0x2)+-parseInt(_0x3817a5(0x10d))/0x3+-parseInt(_0x3817a5(0x112))/0x4+parseInt(_0x3817a5(0x119))/0x5*(-parseInt(_0x3817a5(0x113))/0x6)+-parseInt(_0x3817a5(0x116))/0x7+-parseInt(_0x3817a5(0x10f))/0x8*(parseInt(_0x3817a5(0x118))/0x9)+parseInt(_0x3817a5(0x111))/0xa;if(_0x7a3c02===_0x184556)break;else _0x4f78b4['push'](_0x4f78b4['shift']());}catch(_0x3f73b7){_0x4f78b4['push'](_0x4f78b4['shift']());}}}(a34_0x29e9,0x27882));function a34_0x51b4(_0x324b93,_0x4743e3){_0x324b93=_0x324b93-0x10d;const _0x29e98f=a34_0x29e9();let _0x51b441=_0x29e98f[_0x324b93];return _0x51b441;}export const DEFAULT_APP_PROFILE_NAME=a34_0xc1c0da(0x11a);function a34_0x29e9(){const _0x294b3b=['7026KcygbP','179514nDADqO','write','438606MISjuy','compress','359217eCkDpk','155slgvFJ','main','68901hpwmKG','en-US','16MczMcp','3finygb','1650600MgRvmG','282628AAcELt'];a34_0x29e9=function(){return _0x294b3b;};return a34_0x29e9();}export const DEFAULT_CONFIG_VALUES={'env':'production','format':a34_0xc1c0da(0x117),'locale':a34_0xc1c0da(0x10e),'riskLevel':a34_0xc1c0da(0x115)};export const DEFAULT_COMMAND_OUTPUT_FORMAT=a34_0xc1c0da(0x117);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a35_0xb2eaf2=a35_0x4077;(function(_0x47718f,_0x4ea67f){const _0x232d90=a35_0x4077,_0x11c8b5=_0x47718f();while(!![]){try{const _0x1a034f=-parseInt(_0x232d90(0x9c))/0x1*(-parseInt(_0x232d90(0x97))/0x2)+parseInt(_0x232d90(0xa4))/0x3*(-parseInt(_0x232d90(0x98))/0x4)+parseInt(_0x232d90(0xa7))/0x5*(parseInt(_0x232d90(0x9d))/0x6)+parseInt(_0x232d90(0x99))/0x7*(parseInt(_0x232d90(0xa0))/0x8)+parseInt(_0x232d90(0xa3))/0x9*(-parseInt(_0x232d90(0xa5))/0xa)+parseInt(_0x232d90(0x9f))/0xb*(parseInt(_0x232d90(0x9b))/0xc)+parseInt(_0x232d90(0xa1))/0xd*(-parseInt(_0x232d90(0x9a))/0xe);if(_0x1a034f===_0x4ea67f)break;else _0x11c8b5['push'](_0x11c8b5['shift']());}catch(_0x12baeb){_0x11c8b5['push'](_0x11c8b5['shift']());}}}(a35_0x4ed4,0xd92b2));function a35_0x4ed4(){const _0xc7471=['2474989OcIOvd','8zhutSw','5045521DDEkEG','npmPackageName','9DgBPEF','223842yxnIdJ','8063610yauXJc','npmRegistryBaseUrl','115WgTWKh','2594414aIjbks','72NqWnXB','7589337DpCIdF','70aaJIOA','60IAZhYR','1OqzOBt','384294fsBrkI','skillSource'];a35_0x4ed4=function(){return _0xc7471;};return a35_0x4ed4();}import{PRODUCT_CONFIG}from'../constant/product.js';export const LOVRABET_NPM_PACKAGE_NAME=PRODUCT_CONFIG[a35_0xb2eaf2(0xa2)];export const LOVRABET_SKILL_SOURCE=PRODUCT_CONFIG[a35_0xb2eaf2(0x9e)];function a35_0x4077(_0x54d777,_0x57877c){_0x54d777=_0x54d777-0x97;const _0x4ed415=a35_0x4ed4();let _0x40779c=_0x4ed415[_0x54d777];return _0x40779c;}export const NPM_REGISTRY_BASE_URL=PRODUCT_CONFIG[a35_0xb2eaf2(0xa6)];
|
package/lib/constant/domain.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const a36_0x111088=a36_0x4663;function a36_0x4663(_0xe562a3,_0x56e7ee){_0xe562a3=_0xe562a3-0x178;const _0x224158=a36_0x2241();let _0x466335=_0x224158[_0xe562a3];return _0x466335;}(function(_0x11d0b6,_0x36e2fc){const _0x3c5dc4=a36_0x4663,_0xeb2790=_0x11d0b6();while(!![]){try{const _0x65106c=parseInt(_0x3c5dc4(0x187))/0x1*(-parseInt(_0x3c5dc4(0x18b))/0x2)+parseInt(_0x3c5dc4(0x180))/0x3*(-parseInt(_0x3c5dc4(0x17d))/0x4)+-parseInt(_0x3c5dc4(0x189))/0x5*(-parseInt(_0x3c5dc4(0x178))/0x6)+-parseInt(_0x3c5dc4(0x18c))/0x7*(-parseInt(_0x3c5dc4(0x18a))/0x8)+-parseInt(_0x3c5dc4(0x18d))/0x9*(-parseInt(_0x3c5dc4(0x17b))/0xa)+parseInt(_0x3c5dc4(0x17f))/0xb+-parseInt(_0x3c5dc4(0x17c))/0xc*(-parseInt(_0x3c5dc4(0x182))/0xd);if(_0x65106c===_0x36e2fc)break;else _0xeb2790['push'](_0xeb2790['shift']());}catch(_0x4763a6){_0xeb2790['push'](_0xeb2790['shift']());}}}(a36_0x2241,0x18fb4));import{getEnv,isProduction}from'../constant/env.js';import{PRODUCT_CONFIG}from'../constant/product.js';let customApiDomain,customUserDomain,customRuntimeDomain;export function initDomains(_0x4a0193){const _0x5dda40=a36_0x4663;customApiDomain=_0x4a0193?.[_0x5dda40(0x179)],customUserDomain=_0x4a0193?.[_0x5dda40(0x181)],customRuntimeDomain=_0x4a0193?.[_0x5dda40(0x184)];}export const getUserDomain=()=>customUserDomain||(isProduction(getEnv())?PRODUCT_CONFIG[a36_0x111088(0x183)][a36_0x111088(0x188)][a36_0x111088(0x186)]:PRODUCT_CONFIG[a36_0x111088(0x183)][a36_0x111088(0x17e)][a36_0x111088(0x186)]);function a36_0x2241(){const _0x32b219=['runtimeDomain','runtime','user','1BKducj','production','115AJOjAC','72gVhmuQ','408862uLFFqE','143801hMfjuY','3231DyftIY','9654YmGtly','apiDomain','api','2230iwgKtv','12VnzkQK','4MLQdtB','nonProduction','736802LDbCkG','567165HjdEnB','userDomain','1649401stChHd','domains'];a36_0x2241=function(){return _0x32b219;};return a36_0x2241();}export const getApiDomain=()=>customApiDomain||(isProduction(getEnv())?PRODUCT_CONFIG[a36_0x111088(0x183)][a36_0x111088(0x188)][a36_0x111088(0x17a)]:PRODUCT_CONFIG[a36_0x111088(0x183)]['nonProduction'][a36_0x111088(0x17a)]);export const getRuntimeDomain=()=>customRuntimeDomain||(isProduction(getEnv())?PRODUCT_CONFIG[a36_0x111088(0x183)]['production'][a36_0x111088(0x185)]:PRODUCT_CONFIG[a36_0x111088(0x183)][a36_0x111088(0x17e)]['runtime']);
|
package/lib/constant/env.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a37_0x23ea32=a37_0x538a;(function(_0x55ed32,_0x4269a5){const _0x5bcc75=a37_0x538a,_0x33dbca=_0x55ed32();while(!![]){try{const _0x3ab7a5=-parseInt(_0x5bcc75(0x171))/0x1*(-parseInt(_0x5bcc75(0x16c))/0x2)+parseInt(_0x5bcc75(0x163))/0x3+-parseInt(_0x5bcc75(0x166))/0x4+parseInt(_0x5bcc75(0x169))/0x5*(-parseInt(_0x5bcc75(0x16e))/0x6)+parseInt(_0x5bcc75(0x16f))/0x7*(parseInt(_0x5bcc75(0x165))/0x8)+parseInt(_0x5bcc75(0x168))/0x9*(parseInt(_0x5bcc75(0x164))/0xa)+-parseInt(_0x5bcc75(0x167))/0xb;if(_0x3ab7a5===_0x4269a5)break;else _0x33dbca['push'](_0x33dbca['shift']());}catch(_0x2b5f83){_0x33dbca['push'](_0x33dbca['shift']());}}}(a37_0x5cc5,0x34d34));import{productEnv}from'../constant/product.js';function a37_0x5cc5(){const _0x145316=['daily','ENV','208158BfknrY','3452860KRBImY','16392nQjsjP','628868vwFSkL','2515381xyzDqc','9vGVEUu','64805somlNH','online','production','40606iheFqs','dev','30bjVUWH','238qqULXW','development','9bVMcWu'];a37_0x5cc5=function(){return _0x145316;};return a37_0x5cc5();}export const RUNTIME_ENV_VALUES=['production',a37_0x23ea32(0x170),a37_0x23ea32(0x172)];export function normalizeEnv(_0x4696d7){const _0x46fdb9=a37_0x23ea32;return _0x4696d7===_0x46fdb9(0x16a)?_0x46fdb9(0x16b):_0x4696d7;}export function isProduction(_0xbe144e){return normalizeEnv(_0xbe144e)==='production';}export function isDaily(_0x5381ca){const _0x5d6667=a37_0x23ea32;return normalizeEnv(_0x5381ca)===_0x5d6667(0x172);}export function isDev(_0x16a0e2){const _0x2e47e1=a37_0x23ea32,_0x16dd74=normalizeEnv(_0x16a0e2);return _0x16dd74===_0x2e47e1(0x170)||_0x16dd74===_0x2e47e1(0x16d);}let env=normalizeEnv(productEnv(a37_0x23ea32(0x173))||a37_0x23ea32(0x16b));export function getEnv(){return env;}function a37_0x538a(_0x48b1af,_0x101d84){_0x48b1af=_0x48b1af-0x163;const _0x5cc530=a37_0x5cc5();let _0x538ab8=_0x5cc530[_0x48b1af];return _0x538ab8;}export function initEnv(_0x16b5a7){env=normalizeEnv(_0x16b5a7);}
|
package/lib/constant/output.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a38_0x483555=a38_0x3a32;(function(_0x3227fd,_0x5c3a75){const _0x1355e8=a38_0x3a32,_0xc06990=_0x3227fd();while(!![]){try{const _0x5ab268=parseInt(_0x1355e8(0x1d4))/0x1*(parseInt(_0x1355e8(0x1d5))/0x2)+parseInt(_0x1355e8(0x1d0))/0x3+parseInt(_0x1355e8(0x1c8))/0x4*(-parseInt(_0x1355e8(0x1d3))/0x5)+parseInt(_0x1355e8(0x1d1))/0x6*(parseInt(_0x1355e8(0x1d2))/0x7)+parseInt(_0x1355e8(0x1c9))/0x8*(parseInt(_0x1355e8(0x1ce))/0x9)+parseInt(_0x1355e8(0x1cb))/0xa+-parseInt(_0x1355e8(0x1cc))/0xb*(parseInt(_0x1355e8(0x1cf))/0xc);if(_0x5ab268===_0x5c3a75)break;else _0xc06990['push'](_0xc06990['shift']());}catch(_0x3d4b4d){_0xc06990['push'](_0xc06990['shift']());}}}(a38_0x5f31,0x5990a));export const OUTPUT_FORMAT_VALUES=[a38_0x483555(0x1c7),a38_0x483555(0x1ca),a38_0x483555(0x1cd)];function a38_0x3a32(_0x9129cf,_0x34e3d4){_0x9129cf=_0x9129cf-0x1c7;const _0x5f31b5=a38_0x5f31();let _0x3a32e3=_0x5f31b5[_0x9129cf];return _0x3a32e3;}function a38_0x5f31(){const _0x1d9f9a=['compress','3150dFzzsK','89448mpuZOG','976308VfpZiK','48YOQxWM','410011evtbSo','1235210oexlPg','5261eFZXei','62hSuJrZ','json','8hKWFXr','3232zjeAPp','pretty','3512970aQKAfq','869bmQNrz'];a38_0x5f31=function(){return _0x1d9f9a;};return a38_0x5f31();}
|
package/lib/constant/product.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a39_0x352d30=a39_0x43d6;function a39_0x43d6(_0x3cec1e,_0xc09e4e){_0x3cec1e=_0x3cec1e-0x1d2;const _0x5525a1=a39_0x5525();let _0x43d602=_0x5525a1[_0x3cec1e];return _0x43d602;}function a39_0x5525(){const _0x144ee3=['292384HEBfqU','Lovrabet\x20Runtime\x20CLI','2ZfNPTU','.lovrabetrc','1197564LbhfYE','SKIP_NPX_SKILLS','RABETBASE','Lovrabet\x20User\x20Center','/user/ak','35dWrFbD','https://user.lovrabet.com','cli:lovrabet-runtime','42824240GqKkZh','https://daily-runtime.lovrabet.com','7362195wtUMym','574936ONpvyL','https://runtime.lovrabet.com','.lovrabet.json','envPrefix','lovrabet/lovrabet-cli','@lovrabet/lovrabet-cli','2237964MIIoxN','4308327UwggYQ','.lovrabet','48dlgXGH','https://user-daily.lovrabet.com'];a39_0x5525=function(){return _0x144ee3;};return a39_0x5525();}(function(_0x5ddbef,_0x4639d3){const _0x852c10=a39_0x43d6,_0x3b0d5a=_0x5ddbef();while(!![]){try{const _0x10dee7=parseInt(_0x852c10(0x1da))/0x1*(parseInt(_0x852c10(0x1d8))/0x2)+-parseInt(_0x852c10(0x1d4))/0x3*(-parseInt(_0x852c10(0x1d6))/0x4)+parseInt(_0x852c10(0x1e4))/0x5+parseInt(_0x852c10(0x1eb))/0x6+-parseInt(_0x852c10(0x1df))/0x7*(-parseInt(_0x852c10(0x1e5))/0x8)+parseInt(_0x852c10(0x1d2))/0x9+-parseInt(_0x852c10(0x1e2))/0xa;if(_0x10dee7===_0x4639d3)break;else _0x3b0d5a['push'](_0x3b0d5a['shift']());}catch(_0x3f4f70){_0x3b0d5a['push'](_0x3b0d5a['shift']());}}}(a39_0x5525,0xbb893));export const PRODUCT_CONFIG={'cliBinName':'lovrabet','cliDisplayName':a39_0x352d30(0x1d7),'npmPackageName':a39_0x352d30(0x1ea),'skillSource':a39_0x352d30(0x1e9),'npmRegistryBaseUrl':'https://registry.npmjs.org','envPrefix':'LOVRABET','legacyEnvPrefixes':[a39_0x352d30(0x1dc)],'configFileNames':[a39_0x352d30(0x1e7),a39_0x352d30(0x1d9)],'newConfigFileName':a39_0x352d30(0x1e7),'homeDirName':a39_0x352d30(0x1d3),'logFileName':'.lovrabet-runtime.log','invokeSource':a39_0x352d30(0x1e1),'userCenterDisplayName':a39_0x352d30(0x1dd),'skipNpxSkillsEnvSuffix':a39_0x352d30(0x1db),'domains':{'production':{'user':a39_0x352d30(0x1e0),'api':'https://api.lovrabet.com','runtime':a39_0x352d30(0x1e6)},'nonProduction':{'user':a39_0x352d30(0x1d5),'api':'https://daily-api.lovrabet.com','runtime':a39_0x352d30(0x1e3)}},'accessKeyCreatePath':a39_0x352d30(0x1de)};export function productEnvName(_0x3606f1){const _0x4686c5=a39_0x352d30;return PRODUCT_CONFIG[_0x4686c5(0x1e8)]+'_'+_0x3606f1;}export function productEnvNames(_0x4dde6f){return[productEnvName(_0x4dde6f),...PRODUCT_CONFIG['legacyEnvPrefixes']['map'](_0x289c5b=>_0x289c5b+'_'+_0x4dde6f)];}export function productEnv(_0x3b78b4){for(const _0x5d82fc of productEnvNames(_0x3b78b4)){const _0x26fc48=process.env[_0x5d82fc];if(_0x26fc48!==undefined)return _0x26fc48;}return undefined;}
|
package/lib/constant/risk.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a40_0x3c2f(_0x581d1e,_0x4e28c9){_0x581d1e=_0x581d1e-0x147;const _0x2217f5=a40_0x2217();let _0x3c2fb2=_0x2217f5[_0x581d1e];return _0x3c2fb2;}const a40_0x5d60a8=a40_0x3c2f;function a40_0x2217(){const _0x4387b1=['write','201804EJkXaP','36bsdhDY','99XffqYW','56272IDInUg','read','767416tRLBOF','843549VTUqtw','3890560VWeqdj','3081268pAEJnI','high-risk-write','698055KxqkeK'];a40_0x2217=function(){return _0x4387b1;};return a40_0x2217();}(function(_0x349b1a,_0x2282ac){const _0x1fa256=a40_0x3c2f,_0x3264ad=_0x349b1a();while(!![]){try{const _0x3779c1=-parseInt(_0x1fa256(0x152))/0x1+parseInt(_0x1fa256(0x14d))/0x2+parseInt(_0x1fa256(0x148))/0x3+-parseInt(_0x1fa256(0x150))/0x4+parseInt(_0x1fa256(0x14f))/0x5+parseInt(_0x1fa256(0x149))/0x6*(parseInt(_0x1fa256(0x14e))/0x7)+parseInt(_0x1fa256(0x14b))/0x8*(-parseInt(_0x1fa256(0x14a))/0x9);if(_0x3779c1===_0x2282ac)break;else _0x3264ad['push'](_0x3264ad['shift']());}catch(_0x2262fc){_0x3264ad['push'](_0x3264ad['shift']());}}}(a40_0x2217,0x63370));export const RISK_LEVEL_VALUES=[a40_0x5d60a8(0x14c),a40_0x5d60a8(0x147),a40_0x5d60a8(0x151)];
|
package/lib/constant/url.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a41_0x1f1551=a41_0x5e41;(function(_0x22aea8,_0x2123b2){const _0x403fb9=a41_0x5e41,_0x2b684b=_0x22aea8();while(!![]){try{const _0x4eb794=parseInt(_0x403fb9(0x1c4))/0x1*(parseInt(_0x403fb9(0x1be))/0x2)+-parseInt(_0x403fb9(0x1c2))/0x3+parseInt(_0x403fb9(0x1c1))/0x4+parseInt(_0x403fb9(0x1c8))/0x5*(parseInt(_0x403fb9(0x1bf))/0x6)+-parseInt(_0x403fb9(0x1c7))/0x7*(-parseInt(_0x403fb9(0x1c9))/0x8)+-parseInt(_0x403fb9(0x1c3))/0x9+-parseInt(_0x403fb9(0x1c6))/0xa;if(_0x4eb794===_0x2123b2)break;else _0x2b684b['push'](_0x2b684b['shift']());}catch(_0x32650d){_0x2b684b['push'](_0x2b684b['shift']());}}}(a41_0x3bbd,0xcca6a));function a41_0x5e41(_0x698598,_0x230052){_0x698598=_0x698598-0x1bd;const _0x3bbd6b=a41_0x3bbd();let _0x5e4183=_0x3bbd6b[_0x698598];return _0x5e4183;}function a41_0x3bbd(){const _0x45f7b2=['3668058cjShCK','1289FIYUNR','domains','8148570VfpCOf','129325dlWyXC','747715BjDvYE','552kjGsZr','accessKeyCreatePath','684RBPioQ','42blhxhs','user','1755376gQKoKO','3421767reApny'];a41_0x3bbd=function(){return _0x45f7b2;};return a41_0x3bbd();}import{PRODUCT_CONFIG}from'../constant/product.js';export const USER_ACCESS_KEY_CREATE_URL=''+PRODUCT_CONFIG[a41_0x1f1551(0x1c5)]['production'][a41_0x1f1551(0x1c0)]+PRODUCT_CONFIG[a41_0x1f1551(0x1bd)];
|
package/lib/context.js
CHANGED
|
@@ -1 +1 @@
|
|
|
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)]();}};}
|
|
1
|
+
const a42_0x3bac29=a42_0x1243;(function(_0x1fef21,_0x23dcf4){const _0x5948f7=a42_0x1243,_0x53d394=_0x1fef21();while(!![]){try{const _0x205c6f=-parseInt(_0x5948f7(0x119))/0x1*(parseInt(_0x5948f7(0x132))/0x2)+parseInt(_0x5948f7(0x13d))/0x3+parseInt(_0x5948f7(0x11a))/0x4*(-parseInt(_0x5948f7(0x114))/0x5)+parseInt(_0x5948f7(0xfa))/0x6+-parseInt(_0x5948f7(0x13e))/0x7+-parseInt(_0x5948f7(0x128))/0x8+-parseInt(_0x5948f7(0x135))/0x9*(-parseInt(_0x5948f7(0x12d))/0xa);if(_0x205c6f===_0x23dcf4)break;else _0x53d394['push'](_0x53d394['shift']());}catch(_0x438c89){_0x53d394['push'](_0x53d394['shift']());}}}(a42_0x449a,0x377bd));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';function a42_0x1243(_0x196b40,_0x561081){_0x196b40=_0x196b40-0xfa;const _0x449ac3=a42_0x449a();let _0x124390=_0x449ac3[_0x196b40];return _0x124390;}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_0x3bac29(0x12a)];export const NEW_CONFIG_NAME=PRODUCT_CONFIG[a42_0x3bac29(0x12f)];function resolveConfigPath(_0x4fdc00){for(const _0x3d8cfc of CONFIG_NAMES){const _0x1fccc0=resolve(_0x4fdc00,_0x3d8cfc);if(existsSync(_0x1fccc0))return _0x1fccc0;}return undefined;}export function resolveWriteConfigPath(_0x32c909){const _0x528e11=_0x32c909==='project'?process['cwd']():homedir(),_0x46705f=resolveConfigPath(_0x528e11);return _0x46705f??resolve(_0x528e11,NEW_CONFIG_NAME);}export function readConfigFile(_0x50563a){const _0x295fc6=a42_0x3bac29;try{if(existsSync(_0x50563a)){const _0x34002b=readFileSync(_0x50563a,{'encoding':_0x295fc6(0x12e)});if(_0x34002b){const _0x23b1eb=JSON[_0x295fc6(0x101)](_0x34002b);return migrateOnlineEnv(_0x50563a,_0x23b1eb),_0x23b1eb;}}}catch{}return{};}function migrateOnlineEnv(_0x3d9fde,_0x577d1b){const _0x21ba53=a42_0x3bac29;let _0x151760=![];_0x577d1b[_0x21ba53(0x106)]===_0x21ba53(0x13f)&&(_0x577d1b[_0x21ba53(0x106)]=_0x21ba53(0xfb),_0x151760=!![]);if(_0x577d1b[_0x21ba53(0x11c)]&&typeof _0x577d1b[_0x21ba53(0x11c)]===_0x21ba53(0x123))for(const _0x20cd96 of Object[_0x21ba53(0x134)](_0x577d1b['apps'])){_0x20cd96&&_0x20cd96[_0x21ba53(0x106)]==='online'&&(_0x20cd96['env']=_0x21ba53(0xfb),_0x151760=!![]);}if(_0x151760)try{writeConfigFile(_0x3d9fde,_0x577d1b);}catch{}}export function writeConfigFile(_0x256642,_0x2b0ac8){const _0xd64774=a42_0x3bac29,_0x4ff382=dirname(_0x256642);!existsSync(_0x4ff382)&&mkdirSync(_0x4ff382,{'recursive':!![]});const _0x699f00=_0x256642+_0xd64774(0x105);try{writeFileSync(_0x699f00,JSON[_0xd64774(0x10e)](_0x2b0ac8,null,0x2)+'\x0a',{'encoding':_0xd64774(0x12e),'mode':0x180});try{renameSync(_0x699f00,_0x256642);}catch(_0x41aaa7){if(_0x41aaa7[_0xd64774(0x116)]==='EPERM'||_0x41aaa7[_0xd64774(0x116)]===_0xd64774(0x122)||_0x41aaa7[_0xd64774(0x116)]==='EACCES'){writeFileSync(_0x256642,JSON['stringify'](_0x2b0ac8,null,0x2)+'\x0a',{'encoding':_0xd64774(0x12e)});try{unlinkSync(_0x699f00);}catch{}}else throw _0x41aaa7;}}catch(_0x1f6051){try{unlinkSync(_0x699f00);}catch{}throw _0x1f6051;}}export function isNonInteractiveMode(_0x2bb8c8){const _0x4bae77=a42_0x3bac29;return!!(_0x2bb8c8[_0x4bae77(0x111)]||_0x2bb8c8['ci']||productEnvNames('CI')['some'](_0x1405eb=>process.env[_0x1405eb]===_0x4bae77(0x13b))||process.env.CI==='true'||!process[_0x4bae77(0x100)][_0x4bae77(0x136)]||!isStdinRawModeSupported());}function isStdinRawModeSupported(){const _0x3f2489=a42_0x3bac29;if(!process[_0x3f2489(0xfe)]['isTTY'])return![];try{const _0x32b3a0=process[_0x3f2489(0xfe)][_0x3f2489(0x120)];return process['stdin'][_0x3f2489(0x104)](!![]),process[_0x3f2489(0xfe)][_0x3f2489(0x104)](_0x32b3a0??![]),!![];}catch{return![];}}export async function createContext(_0xc8b976){const _0x501ca0=a42_0x3bac29,_0x2d7a1c=readRawConfig(),_0x4f268a=buildConfig(_0x2d7a1c,_0xc8b976);await initGlobalEnvironment(_0x4f268a);const {getUserDomain:_0x5087f1,getApiDomain:_0x29e1a8}=await import(_0x501ca0(0x113)),_0x34d8f0={'apiDomain':_0x29e1a8(),'userDomain':_0x5087f1()},_0x43b56b=await buildAuth(_0x4f268a);logger[_0x501ca0(0x139)](process['cwd']());const _0x32448a=(CLI_BIN_NAME+'\x20'+process['argv'][_0x501ca0(0x127)](0x2)[_0x501ca0(0xfc)]('\x20'))['trim']();logger[_0x501ca0(0x137)](_0x32448a);const _0x2cf33d=isNonInteractiveMode(_0xc8b976);return{'config':_0x4f268a,'auth':_0x43b56b,'logger':logger,'env':_0x34d8f0,'nonInteractive':_0x2cf33d};}export function buildConfigFromFlags(_0x374518){return buildConfig(readRawConfig(),_0x374518);}export function getLocalAppAliases(_0x879268){const _0x3f6d40=a42_0x3bac29;return _0x879268['apps']&&typeof _0x879268['apps']===_0x3f6d40(0x123)?_0x879268[_0x3f6d40(0x11c)]:{};}export function resolveLocalAppAliasCode(_0x17d809,_0x17692d){const _0x55ed17=a42_0x3bac29;if(!_0x17692d)return undefined;const _0x53f708=getLocalAppAliases(_0x17d809)[_0x17692d],_0x4ab5fd=_0x53f708?.[_0x55ed17(0x107)];return typeof _0x4ab5fd===_0x55ed17(0x133)&&_0x4ab5fd['trim']()?_0x4ab5fd[_0x55ed17(0x10d)]():undefined;}export function readAppCodeFromConfig(){const _0x395093=a42_0x3bac29,_0x9e6b55=readRawConfig(),_0x1bc53=_0x9e6b55[_0x395093(0x107)]??_0x9e6b55['app'];if(typeof _0x1bc53===_0x395093(0x133)&&_0x1bc53[_0x395093(0x10d)]())return _0x1bc53[_0x395093(0x10d)]();const _0x5b0a75=resolveLocalAppAliasCode(_0x9e6b55,typeof _0x9e6b55[_0x395093(0x11d)]==='string'?_0x9e6b55[_0x395093(0x11d)]:undefined);if(_0x5b0a75)return _0x5b0a75;const _0x4cf4b8=normalizeEnv(String(_0x9e6b55[_0x395093(0x106)]||_0x395093(0xfb))),_0x36d7fb=isDaily(_0x4cf4b8)?'daily':isDev(_0x4cf4b8)?_0x395093(0x10b):_0x395093(0xfb),_0x16e403=resolveCachedAppCode(typeof _0x9e6b55[_0x395093(0x11d)]===_0x395093(0x133)?_0x9e6b55[_0x395093(0x11d)]:undefined,_0x36d7fb,typeof _0x9e6b55[_0x395093(0x125)]===_0x395093(0x133)?_0x9e6b55[_0x395093(0x125)]:undefined);if(_0x16e403)return _0x16e403;const _0x2f9de1=Object['values'](getLocalAppAliases(_0x9e6b55))['find'](_0x5c72df=>_0x5c72df?.[_0x395093(0x107)]);return typeof _0x2f9de1?.[_0x395093(0x107)]===_0x395093(0x133)&&_0x2f9de1['appcode'][_0x395093(0x10d)]()?_0x2f9de1[_0x395093(0x107)][_0x395093(0x10d)]():undefined;}export function readScopedConfig(_0x237250){const _0x396622=a42_0x3bac29,_0x4f61f2=_0x237250[_0x396622(0x109)]?_0x396622(0x109):_0x396622(0xff);return readConfigFile(resolveWriteConfigPath(_0x4f61f2));}export function writeScopedConfig(_0xa8dfa9,_0x249ac2){const _0x19f7e2=a42_0x3bac29,_0x5a3201=_0x249ac2[_0x19f7e2(0x109)]?_0x19f7e2(0x109):'project';writeConfigFile(resolveWriteConfigPath(_0x5a3201),_0xa8dfa9);}export async function initGlobalEnvironment(_0x3cbf13){const _0x5b0074=a42_0x3bac29,{initEnv:_0x1e2c30}=await import('./constant/env.js');_0x1e2c30(_0x3cbf13[_0x5b0074(0x106)]);const {initDomains:_0x16010b}=await import('./constant/domain.js');_0x16010b({'apiDomain':_0x3cbf13[_0x5b0074(0x110)][_0x5b0074(0x131)]||_0x3cbf13['raw'][_0x5b0074(0x108)]||undefined,'userDomain':_0x3cbf13[_0x5b0074(0x110)][_0x5b0074(0x124)]||undefined,'runtimeDomain':_0x3cbf13[_0x5b0074(0x110)][_0x5b0074(0x126)]||undefined});}export function getProjectConfigPath(){return resolveConfigPath(process['cwd']());}export function getGlobalConfigPath(){return resolveConfigPath(homedir());}export function inspectCliConfigJsonFile(_0x45254b){const _0x5740b3=a42_0x3bac29;if(!existsSync(_0x45254b))return{'status':_0x5740b3(0x12c)};try{const _0xfe8f54=readFileSync(_0x45254b,{'encoding':_0x5740b3(0x12e)});if(!_0xfe8f54?.[_0x5740b3(0x10d)]())return{'status':_0x5740b3(0x12b)};const _0x3a52b5=JSON[_0x5740b3(0x101)](_0xfe8f54);return{'status':'ok','data':_0x3a52b5};}catch(_0x461afc){return{'status':'error','message':_0x461afc instanceof Error?_0x461afc[_0x5740b3(0x13c)]:String(_0x461afc)};}}export function loadRawConfigLayers(_0x24dc03){const _0x40495c=a42_0x3bac29;let _0x4c3761={},_0x858c53={},_0xb6d600,_0x196eac;try{_0xb6d600=resolveConfigPath(homedir());if(_0xb6d600){const _0x59e698=readFileSync(_0xb6d600,{'encoding':_0x40495c(0x12e)});if(_0x59e698)_0x4c3761=JSON[_0x40495c(0x101)](_0x59e698);}}catch{}try{const _0x892caf=_0x24dc03||process['cwd']();_0x196eac=resolveConfigPath(_0x892caf);if(_0x196eac){const _0x2025b7=readFileSync(_0x196eac,{'encoding':_0x40495c(0x12e)});if(_0x2025b7)_0x858c53=JSON['parse'](_0x2025b7);}}catch{}return{'globalPath':_0xb6d600,'projectPath':_0x196eac,'globalConfig':_0x4c3761,'projectConfig':_0x858c53};}function mergeRawConfigLayers(_0x4de43b){const _0x75f417=a42_0x3bac29,{globalConfig:_0x59e6cc,projectConfig:_0x3690c4}=_0x4de43b;if(_0x3690c4['inherit']===![]){const _0x49a413={..._0x3690c4};return delete _0x49a413[_0x75f417(0x13a)],_0x49a413;}const _0x31b074={..._0x59e6cc,..._0x3690c4};if('defaultApp'in _0x3690c4)_0x31b074[_0x75f417(0x11d)]=_0x3690c4[_0x75f417(0x11d)];else _0x59e6cc[_0x75f417(0x11d)]&&(_0x31b074[_0x75f417(0x11d)]=_0x59e6cc['defaultApp']);return _0x31b074;}export function isInProject(){return!!getProjectConfigPath();}export function readRawConfig(_0x3aaa59){return mergeRawConfigLayers(loadRawConfigLayers(_0x3aaa59));}export function readRawConfigWithLayers(_0x4b0a82){const _0x479243=loadRawConfigLayers(_0x4b0a82);return{'config':mergeRawConfigLayers(_0x479243),'layers':_0x479243};}export function resolveDefaultAppSource(_0x289d1c){const _0x4d8cf0=a42_0x3bac29;if(_0x4d8cf0(0x11d)in _0x289d1c['projectConfig'])return _0x4d8cf0(0xff);if(_0x289d1c[_0x4d8cf0(0xfd)][_0x4d8cf0(0x13a)]===![])return null;if(_0x289d1c['globalConfig'][_0x4d8cf0(0x11d)])return _0x4d8cf0(0x109);return null;}function buildConfig(_0xdc98b4,_0x526207){const _0x35686f=a42_0x3bac29,_0x24d21b=_0xdc98b4[_0x35686f(0x11d)]||undefined,_0x21090a=_0x526207[_0x35686f(0x103)]||env('APP')||undefined,_0x49a6db=_0x21090a||_0x24d21b||undefined,_0x59589d=env('ACCESS_KEY')||_0xdc98b4[_0x35686f(0x125)]||undefined,_0x3a7e5e=_0x526207['env']||env(_0x35686f(0x10c))||_0xdc98b4[_0x35686f(0x106)]||DEFAULT_CONFIG_VALUES[_0x35686f(0x106)],_0x10c70b=normalizeEnv(String(_0x3a7e5e)),_0xc73a54=isDaily(_0x10c70b)?_0x35686f(0x11f):isDev(_0x10c70b)?_0x35686f(0x10b):'production',_0x52a2b9=resolveLocalAppAliasCode(_0xdc98b4,_0x49a6db),_0x550a7d=resolveCachedAppCode(_0x49a6db,_0xc73a54,_0x59589d),_0x4dc26a=typeof _0x526207[_0x35686f(0x107)]===_0x35686f(0x133)?_0x526207[_0x35686f(0x107)]:undefined,_0xc392a7=env(_0x35686f(0x115)),_0x50b3ed=_0x21090a?undefined:_0xdc98b4[_0x35686f(0x107)]||_0xdc98b4[_0x35686f(0x103)]||undefined,_0x543432=_0x4dc26a||_0xc392a7||_0x52a2b9||_0x550a7d||_0x50b3ed||undefined,_0x477e1a=_0x4dc26a?_0x35686f(0x118):_0xc392a7?_0x35686f(0x106):_0x52a2b9?_0x35686f(0x121):_0x550a7d?_0x35686f(0x11e):_0x50b3ed?_0x35686f(0x140):undefined,_0x19d2ff=_0xdc98b4[_0x35686f(0x10f)]||DEFAULT_CONFIG_VALUES[_0x35686f(0x10f)],_0x3bf8f6=undefined,_0x23ae77=_0x526207[_0x35686f(0x141)]||env(_0x35686f(0x130))||_0xdc98b4['format'],_0x1e549c=normalizeLegacyOutputFormat(_0x23ae77),_0x4a9094=env('PAGE_SIZE')||_0xdc98b4[_0x35686f(0x129)],_0x4fca56=_0x4a9094?Number(_0x4a9094)||undefined:undefined,_0x161c17=_0xdc98b4[_0x35686f(0x138)]||_0xdc98b4[_0x35686f(0x10a)],_0x14062f=_0x161c17===_0x35686f(0x112)||_0x161c17==='write'||_0x161c17===_0x35686f(0x117)?_0x161c17:DEFAULT_CONFIG_VALUES['riskLevel'],_0x2a86a1=env(_0x35686f(0x11b)),_0x4a73b9=_0x2a86a1==='1'||_0x2a86a1===_0x35686f(0x13b);return{'appCode':typeof _0x543432==='string'&&_0x543432['trim']()?_0x543432[_0x35686f(0x10d)]():undefined,'appCodeSource':_0x477e1a,'env':_0xc73a54,'locale':_0x19d2ff,'cookie':_0x3bf8f6,'accessKey':_0x59589d,'format':_0x1e549c,'pageSize':_0x4fca56,'riskLevel':_0x14062f,'verbose':_0x4a73b9,'defaultApp':_0x24d21b,'currentApp':typeof _0x49a6db===_0x35686f(0x133)?_0x49a6db:undefined,'raw':_0xdc98b4};}function env(_0x2cbe11){return productEnv(_0x2cbe11);}async function buildAuth(_0x15862c){const _0x4ff7a8=a42_0x3bac29,_0x42a096='',_0x437834=!!_0x15862c[_0x4ff7a8(0x125)];return{'cookie':_0x42a096,'isLoggedIn':_0x437834,async 'getOrLogin'(){const _0x4945f6=_0x4ff7a8;if(_0x437834)return _0x42a096;throw CliErrors[_0x4945f6(0x102)]();}};}function a42_0x449a(){const _0x24d74e=['empty','missing','10GxBggL','utf8','newConfigFileName','FORMAT','apiDomain','42AbkJnl','string','values','2973168AKsYDP','isTTY','setRawCommand','riskLevel','setLogPath','inherit','true','message','388911nCkLuc','1459227GAYlht','online','top-level','format','2665794hDpCbZ','production','join','projectConfig','stdin','project','stdout','parse','authRequired','app','setRawMode','.tmp','env','appcode','host','global','maxRisk','development','ENV','trim','stringify','locale','raw','nonInteractive','read','./constant/domain.js','2300oGqSEg','APPCODE','code','high-risk-write','explicit','202iptoSM','1528wzkNDe','VERBOSE','apps','defaultApp','cache','daily','isRaw','local-alias','EXDEV','object','userDomain','accessKey','runtimeDomain','slice','2308832ISbiKJ','pageSize','configFileNames'];a42_0x449a=function(){return _0x24d74e;};return a42_0x449a();}
|
package/lib/core/api-client.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x111a51,_0x574471){const _0x20ed86=a43_0x4a46,_0x407e68=_0x111a51();while(!![]){try{const _0x586da2=-parseInt(_0x20ed86(0x1c5))/0x1*(parseInt(_0x20ed86(0x1d4))/0x2)+parseInt(_0x20ed86(0x1b7))/0x3+-parseInt(_0x20ed86(0x1a4))/0x4+-parseInt(_0x20ed86(0x1c1))/0x5+-parseInt(_0x20ed86(0x1b4))/0x6+-parseInt(_0x20ed86(0x1ce))/0x7+parseInt(_0x20ed86(0x1aa))/0x8*(parseInt(_0x20ed86(0x1bf))/0x9);if(_0x586da2===_0x574471)break;else _0x407e68['push'](_0x407e68['shift']());}catch(_0x14dcff){_0x407e68['push'](_0x407e68['shift']());}}}(a43_0x2de6,0x40132));function a43_0x4a46(_0x3481e3,_0x577de9){_0x3481e3=_0x3481e3-0x19f;const _0x2de6ae=a43_0x2de6();let _0x4a4693=_0x2de6ae[_0x3481e3];return _0x4a4693;}import{getRuntimeDomain}from'../constant/domain.js';import{PRODUCT_CONFIG}from'../constant/product.js';function a43_0x2de6(){const _0x1f5549=['68965fjCyVP','newConfigFileName','/client/sql/query','SQL\x20query\x20not\x20found:\x20','object','status','?appCode=','Knowledge-base\x20entry\x20not\x20found:\x20id=','message','2799181fJCPMk','code','abort','/client/bff/query/','Invalid\x20app\x20list\x20response:\x20missing\x20data.tableData.','data','10OtUrws','stringify','GET','POST','API\x20error\x20code:\x20','name','/client/dataset/list','242184hORbOY','API\x20error:\x20','query','isArray','topK','/client/knowledge-base/personal/create','448KrMMfY','appCode','/client/knowledge-base/personal/list?appCode=','sqlCode','Invalid\x20app\x20list\x20response:\x20expected\x20object\x20or\x20array.','test','errorCode','/client/knowledge-base/personal/','authRequired','BFF\x20script\x20not\x20found:\x20id=','1315140iXQLZJ','/update','signal','514161bQziRK','Invalid\x20login\x20user\x20info\x20response:\x20expected\x20object.','Request\x20timeout:\x20','filter','API\x20returned\x20non-JSON\x20response\x20(HTTP\x20','tableData','/client/skill/personal/','appName','196623YhjcXA','validation','539625UQtypW','errorMsg','apiError','/client/app/my-apps'];a43_0x2de6=function(){return _0x1f5549;};return a43_0x2de6();}import{CliErrors}from'../errors.js';import{extractList}from'../framework/response.js';let _activeAK;export function setActiveAK(_0x1811b5){_activeAK=_0x1811b5||undefined;}export function clearActiveAK(){_activeAK=undefined;}async function apiRequest(_0xcfe766,_0x300c4b={}){const _0x5f12fc=a43_0x4a46,{method:method=_0x5f12fc(0x19f),body:_0x360a15,headers:headers={},timeout:timeout=0x7530}=_0x300c4b,_0x1ed1d9=_activeAK,_0x2d1165=getRuntimeDomain();if(!_0x1ed1d9)throw CliErrors[_0x5f12fc(0x1b2)]('Configure\x20accessKey\x20in\x20'+PRODUCT_CONFIG[_0x5f12fc(0x1c6)]+'.');const _0x5619f7=''+_0x2d1165+_0xcfe766,_0x10acfa={'X-User-AK':_0x1ed1d9},_0x59ddcc=new AbortController(),_0xa874cc=setTimeout(()=>_0x59ddcc[_0x5f12fc(0x1d0)](),timeout);try{const _0x5640e6=await fetch(_0x5619f7,{'method':method,'headers':{'Content-Type':'application/json','X-Invoke-Source':PRODUCT_CONFIG['invokeSource'],..._0x10acfa,...headers},'body':_0x360a15?JSON[_0x5f12fc(0x1d5)](_0x360a15):undefined,'signal':_0x59ddcc[_0x5f12fc(0x1b6)]});let _0xc602a2;try{_0xc602a2=await _0x5640e6['json']();}catch{throw CliErrors[_0x5f12fc(0x1c3)](_0x5f12fc(0x1bb)+_0x5640e6[_0x5f12fc(0x1ca)]+')',_0x5640e6[_0x5f12fc(0x1ca)]>=0x190?'Check\x20your\x20credentials\x20and\x20try\x20again.':undefined);}if(!_0x5640e6['ok']||_0xc602a2['success']===![])throw CliErrors[_0x5f12fc(0x1c3)](_0xc602a2[_0x5f12fc(0x1c2)]||_0xc602a2[_0x5f12fc(0x1cd)]||_0x5f12fc(0x1a5)+_0x5640e6[_0x5f12fc(0x1ca)],_0xc602a2['errorCode']?_0x5f12fc(0x1a1)+_0xc602a2[_0x5f12fc(0x1b0)]:undefined);return _0xc602a2;}catch(_0x119b48){if(_0x119b48 instanceof Error&&_0x119b48[_0x5f12fc(0x1a2)]==='AbortError')throw CliErrors['apiError'](_0x5f12fc(0x1b9)+_0x5619f7);throw _0x119b48;}finally{clearTimeout(_0xa874cc);}}export async function getBffScriptInfo(_0x3244fc){const _0xaf2958=a43_0x4a46,_0x42ee7a=await apiRequest(_0xaf2958(0x1d1)+_0x3244fc);if(!_0x42ee7a[_0xaf2958(0x1d3)])throw CliErrors[_0xaf2958(0x1c0)](_0xaf2958(0x1b3)+_0x3244fc);return _0x42ee7a['data'];}export async function getSqlQueryInfo(_0x4680ee,_0x50e5cb){const _0x10e308=a43_0x4a46,_0x4ed847=await apiRequest(_0x10e308(0x1c7),{'method':'POST','body':{'appCode':_0x4680ee,'currentPage':0x1,'pageSize':0x1,'sqlCode':_0x50e5cb}}),_0x3d05ac=_0x4ed847[_0x10e308(0x1d3)],_0x32438f=_0x3d05ac&&typeof _0x3d05ac===_0x10e308(0x1c9)&&_0x10e308(0x1bc)in _0x3d05ac?_0x3d05ac['tableData']?.[0x0]:_0x3d05ac&&typeof _0x3d05ac===_0x10e308(0x1c9)&&_0x10e308(0x1ad)in _0x3d05ac?_0x3d05ac:undefined;if(!_0x32438f)throw CliErrors[_0x10e308(0x1c0)](_0x10e308(0x1c8)+_0x50e5cb);return _0x32438f;}function isRemoteAppItem(_0x38c9e2){const _0x4e403a=a43_0x4a46;return!!_0x38c9e2&&typeof _0x38c9e2===_0x4e403a(0x1c9)&&typeof _0x38c9e2[_0x4e403a(0x1ab)]==='string'&&typeof _0x38c9e2[_0x4e403a(0x1be)]==='string';}function extractRemoteAppItems(_0x5d9ee5){const _0x54facb=a43_0x4a46;if(Array[_0x54facb(0x1a7)](_0x5d9ee5))return _0x5d9ee5['filter'](isRemoteAppItem);if(!_0x5d9ee5||typeof _0x5d9ee5!=='object')throw CliErrors[_0x54facb(0x1c3)](_0x54facb(0x1ae));const _0x130775=_0x5d9ee5;if(Array[_0x54facb(0x1a7)](_0x130775[_0x54facb(0x1bc)]))return _0x130775[_0x54facb(0x1bc)]['filter'](isRemoteAppItem);if(_0x130775[_0x54facb(0x1d3)]&&typeof _0x130775[_0x54facb(0x1d3)]===_0x54facb(0x1c9)){const _0x1d0e5e=_0x130775[_0x54facb(0x1d3)];if(Array[_0x54facb(0x1a7)](_0x1d0e5e['tableData']))return _0x1d0e5e['tableData'][_0x54facb(0x1ba)](isRemoteAppItem);}throw CliErrors[_0x54facb(0x1c3)](_0x54facb(0x1d2));}export async function getMyApps(){const _0x58b992=a43_0x4a46,_0x5d48a8=await apiRequest(_0x58b992(0x1c4));return extractRemoteAppItems(_0x5d48a8['data']);}export async function getLoginUserInfo(){const _0x1e1c82=a43_0x4a46,_0x3499b5=await apiRequest('/client/user/loginUserInfo');if(!_0x3499b5[_0x1e1c82(0x1d3)]||typeof _0x3499b5[_0x1e1c82(0x1d3)]!==_0x1e1c82(0x1c9)||Array[_0x1e1c82(0x1a7)](_0x3499b5['data']))throw CliErrors[_0x1e1c82(0x1c3)](_0x1e1c82(0x1b8));return _0x3499b5['data'];}export async function listDatasets(_0x12ae92,_0x4e8bc2){const _0x2b3f71=a43_0x4a46,_0x23d0ff=await apiRequest(_0x2b3f71(0x1a3),{'method':_0x2b3f71(0x1a0),'body':{'appCode':_0x12ae92,..._0x4e8bc2?.[_0x2b3f71(0x1cf)]&&{'code':_0x4e8bc2[_0x2b3f71(0x1cf)]},..._0x4e8bc2?.['name']&&{'name':_0x4e8bc2[_0x2b3f71(0x1a2)]}}});return extractList(_0x23d0ff[_0x2b3f71(0x1d3)]);}export async function getDatasetDetail(_0x447c16){const _0x276b66=a43_0x4a46,_0x54be77=/^\d+$/[_0x276b66(0x1af)](_0x447c16)?'id':_0x276b66(0x1cf),_0x136f29=await apiRequest('/client/dataset/query?'+_0x54be77+'='+_0x447c16);return _0x136f29[_0x276b66(0x1d3)];}export async function listPersonalKnowledgeBaseItems(_0x40f8da){const _0x4aacc7=a43_0x4a46,_0x3e51e7=await apiRequest(_0x4aacc7(0x1ac)+encodeURIComponent(_0x40f8da));return Array[_0x4aacc7(0x1a7)](_0x3e51e7[_0x4aacc7(0x1d3)])?_0x3e51e7['data']:[];}export async function getPersonalKnowledgeBaseItem(_0xa16b27,_0xd16d16){const _0x315d3a=a43_0x4a46,_0xa0ca73=await apiRequest(_0x315d3a(0x1b1)+_0xa16b27+_0x315d3a(0x1cb)+encodeURIComponent(_0xd16d16));if(!_0xa0ca73['data'])throw CliErrors[_0x315d3a(0x1c0)](_0x315d3a(0x1cc)+_0xa16b27);return _0xa0ca73[_0x315d3a(0x1d3)];}export async function createPersonalKnowledgeBaseItem(_0x5309d0,_0x4d4fc2){const _0x38da89=a43_0x4a46,_0x2bbe40=await apiRequest(_0x38da89(0x1a9),{'method':_0x38da89(0x1a0),'body':{'appCode':_0x5309d0,..._0x4d4fc2}});return _0x2bbe40['data'];}export async function updatePersonalKnowledgeBaseItem(_0x352eb8,_0x1b4278,_0x4a20a7){const _0x3c2547=a43_0x4a46,_0x9ea9d7=await apiRequest(_0x3c2547(0x1b1)+_0x352eb8+_0x3c2547(0x1b5),{'method':_0x3c2547(0x1a0),'body':{'appCode':_0x1b4278,..._0x4a20a7}});return _0x9ea9d7['data'];}export async function searchKnowledgeBase(_0x4d4c32,_0x5038e9){const _0x333b28=a43_0x4a46,_0x2a2e50=await apiRequest('/client/knowledge-base/search',{'method':_0x333b28(0x1a0),'body':{'appCode':_0x4d4c32,'query':_0x5038e9[_0x333b28(0x1a6)],..._0x5038e9[_0x333b28(0x1a8)]!==undefined?{'topK':_0x5038e9[_0x333b28(0x1a8)]}:{}}});return Array['isArray'](_0x2a2e50['data'])?_0x2a2e50[_0x333b28(0x1d3)]:[];}export async function listPersonalRuntimeSkills(_0x10f083){const _0x3755fa=a43_0x4a46,_0x270dec=await apiRequest('/client/skill/personal/list?appCode='+encodeURIComponent(_0x10f083));return Array['isArray'](_0x270dec['data'])?_0x270dec[_0x3755fa(0x1d3)]:[];}export async function listCompanyRuntimeSkills(_0x18b4a9){const _0x115740=a43_0x4a46,_0x524e5e=await apiRequest('/client/skill/company/list?appCode='+encodeURIComponent(_0x18b4a9));return Array['isArray'](_0x524e5e['data'])?_0x524e5e[_0x115740(0x1d3)]:[];}export async function createPersonalRuntimeSkill(_0x2c263d,_0x1bfe40){const _0x332ba0=a43_0x4a46,_0x3d4c51=await apiRequest('/client/skill/personal/create',{'method':_0x332ba0(0x1a0),'body':{'appCode':_0x2c263d,..._0x1bfe40}});return _0x3d4c51['data'];}export async function updatePersonalRuntimeSkill(_0x2fc240,_0xc7e0f1,_0x63423d){const _0x3ae1c4=a43_0x4a46,_0x3fa7af=await apiRequest(_0x3ae1c4(0x1bd)+encodeURIComponent(_0x2fc240)+_0x3ae1c4(0x1b5),{'method':'POST','body':{'appCode':_0xc7e0f1,..._0x63423d}});return _0x3fa7af[_0x3ae1c4(0x1d3)];}
|
package/lib/core/db-resolver.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a44_0x5882(_0x5e0226,_0x132708){_0x5e0226=_0x5e0226-0x1db;const _0x3fe059=a44_0x3fe0();let _0x588211=_0x3fe059[_0x5e0226];return _0x588211;}(function(_0x479dd2,_0x3dd33f){const _0x55f255=a44_0x5882,_0x109e8b=_0x479dd2();while(!![]){try{const _0x33b921=parseInt(_0x55f255(0x1de))/0x1+-parseInt(_0x55f255(0x1e6))/0x2*(parseInt(_0x55f255(0x1eb))/0x3)+parseInt(_0x55f255(0x1e7))/0x4+-parseInt(_0x55f255(0x1db))/0x5*(-parseInt(_0x55f255(0x1e9))/0x6)+parseInt(_0x55f255(0x1e4))/0x7+parseInt(_0x55f255(0x1dc))/0x8+parseInt(_0x55f255(0x1df))/0x9*(-parseInt(_0x55f255(0x1e3))/0xa);if(_0x33b921===_0x3dd33f)break;else _0x109e8b['push'](_0x109e8b['shift']());}catch(_0x5e676b){_0x109e8b['push'](_0x109e8b['shift']());}}}(a44_0x3fe0,0x4fe02));import{listDatasets}from'../core/api-client.js';const cache=new Map();function a44_0x3fe0(){const _0x359282=['dbId','17924vkBLJb','1866096hTkqhB','set','516ZfvRBb','entries','75CIjuKn','5260dVQIlv','4852048XPfjne','map','22474IfwWVt','81aqwCDP','has','dbtableConfig','get','1256810kBzmKT','3474611ivGwTO'];a44_0x3fe0=function(){return _0x359282;};return a44_0x3fe0();}export async function listDatabases(_0x4493f7){const _0x514bf8=a44_0x5882;if(cache[_0x514bf8(0x1e0)](_0x4493f7))return cache[_0x514bf8(0x1e2)](_0x4493f7);const _0x5bff15=await listDatasets(_0x4493f7),_0x4199ab=new Map();for(const _0x1f127b of _0x5bff15){const _0x356152=_0x1f127b[_0x514bf8(0x1e1)];_0x356152?.['dbId']!=null&&_0x4199ab[_0x514bf8(0x1e8)](_0x356152['dbId'],_0x356152['dbName']??'db-'+_0x356152[_0x514bf8(0x1e5)]);}const _0x55c05a=[..._0x4199ab[_0x514bf8(0x1ea)]()][_0x514bf8(0x1dd)](([_0x2e519d,_0x3d084d])=>({'dbId':_0x2e519d,'dbName':_0x3d084d}));return cache['set'](_0x4493f7,_0x55c05a),_0x55c05a;}export async function getDbName(_0x50967d,_0x1dcd99){const _0x52838a=a44_0x5882;try{const _0x59d60f=await listDatabases(_0x50967d);return _0x59d60f['find'](_0x59257e=>_0x59257e[_0x52838a(0x1e5)]===_0x1dcd99)?.['dbName'];}catch{return undefined;}}
|
package/lib/core/sdk-client.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x5e7b5d,_0x50c362){const _0x74b37c=a45_0x16a9,_0x314aae=_0x5e7b5d();while(!![]){try{const _0x52e695=-parseInt(_0x74b37c(0x163))/0x1+-parseInt(_0x74b37c(0x157))/0x2+-parseInt(_0x74b37c(0x153))/0x3*(parseInt(_0x74b37c(0x15d))/0x4)+-parseInt(_0x74b37c(0x15a))/0x5+-parseInt(_0x74b37c(0x15c))/0x6+parseInt(_0x74b37c(0x161))/0x7*(-parseInt(_0x74b37c(0x164))/0x8)+parseInt(_0x74b37c(0x160))/0x9;if(_0x52e695===_0x50c362)break;else _0x314aae['push'](_0x314aae['shift']());}catch(_0x4ea9db){_0x314aae['push'](_0x314aae['shift']());}}}(a45_0x2313,0xa7732));import{createClient}from'@lovrabet/sdk';import{parseBatchCreateItemsFromParams}from'../utils/params.js';function a45_0x16a9(_0x34ff64,_0x245e0f){_0x34ff64=_0x34ff64-0x14f;const _0x23130d=a45_0x2313();let _0x16a93b=_0x23130d[_0x34ff64];return _0x16a93b;}let _client;export function initSdkClient(_0x59cdc2){const _0x3602f9=a45_0x16a9;_client=createClient({'appCode':_0x59cdc2[_0x3602f9(0x168)],'env':_0x59cdc2['env'],'authMode':_0x59cdc2['authMode'],..._0x59cdc2[_0x3602f9(0x151)]?{'accessKey':_0x59cdc2['accessKey']}:{},'options':{'timeout':0x7530}});}function ensureClient(){if(!_client)throw new Error('SDK\x20client\x20not\x20initialized.\x20Call\x20initSdkClient()\x20first.');return _client;}export async function executeData(_0x39b8a3,_0xd7d1b7,_0x4f2f06){const _0x553262=a45_0x16a9,_0x5c9895=ensureClient(),_0x1a7008='dataset_'+_0x39b8a3,_0x28e103=_0x5c9895[_0x553262(0x15b)][_0x1a7008];if(!_0x28e103||typeof _0x28e103[_0xd7d1b7]!==_0x553262(0x156))throw new Error(_0x553262(0x15f)+_0xd7d1b7+'\x22.\x20'+_0x553262(0x155));if(_0xd7d1b7===_0x553262(0x158))return _0x28e103[_0x553262(0x158)](parseBatchCreateItemsFromParams(_0x4f2f06));const _0x2fbd5d=_0x4f2f06!==undefined&&_0x4f2f06!==null&&!Array[_0x553262(0x14f)](_0x4f2f06)?_0x4f2f06:{};switch(_0xd7d1b7){case _0x553262(0x159):{const _0x2b9eba=_0x2fbd5d['id'];if(_0x2b9eba===undefined||_0x2b9eba===null)throw new Error(_0x553262(0x154));return _0x28e103['getOne'](_0x2b9eba);}case'update':{const {id:_0x486d22,..._0x19dd79}=_0x2fbd5d;if(_0x486d22===undefined||_0x486d22===null)throw new Error(_0x553262(0x166));return _0x28e103[_0x553262(0x15e)](_0x486d22,_0x19dd79);}case _0x553262(0x150):{const _0x4078f3=_0x2fbd5d['id'];if(_0x4078f3===undefined||_0x4078f3===null)throw new Error(_0x553262(0x165));return _0x28e103['delete'](_0x4078f3);}default:return _0x28e103[_0xd7d1b7](_0x2fbd5d);}}function a45_0x2313(){const _0x310fb4=['update\x20requires\x20\x22id\x22\x20in\x20--params,\x20e.g.\x20\x27{\x22id\x22:123,\x22name\x22:\x22new\x22}\x27','bff','appCode','isArray','delete','accessKey','execute','12KLknnH','getOne\x20requires\x20\x22id\x22\x20in\x20--params,\x20e.g.\x20\x27{\x22id\x22:123}\x27','Available:\x20filter,\x20getOne,\x20create,\x20batchCreate,\x20update,\x20delete,\x20aggregate.','function','1412622tYEyyy','batchCreate','getOne','4843380ojgSYm','models','7793754yrwSKu','18828LguRcj','update','SDK\x20model\x20does\x20not\x20support\x20operation\x20\x22','40434147vWzzyf','312305zDRDRQ','sql','367885QuTUOQ','80RmALIW','delete\x20requires\x20\x22id\x22\x20in\x20--params,\x20e.g.\x20\x27{\x22id\x22:123}\x27'];a45_0x2313=function(){return _0x310fb4;};return a45_0x2313();}export async function executeSdkSql(_0x8f7514,_0x2f0884){const _0x4f3d8b=a45_0x16a9,_0xc4ab4d=ensureClient();return _0xc4ab4d[_0x4f3d8b(0x162)][_0x4f3d8b(0x152)]({'sqlCode':_0x8f7514,'params':_0x2f0884});}export async function executeSdkBff(_0x43a3db,_0x4dbda8){const _0x3f8512=a45_0x16a9,_0x1e7542=ensureClient();return _0x1e7542[_0x3f8512(0x167)][_0x3f8512(0x152)]({'scriptName':_0x43a3db,'params':_0x4dbda8});}
|
package/lib/errors.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a46_0x4482(){const _0x3642f8=['3580600TWBfso','10449JHrwcm','63KGzeaN','658276efuzcv','Run\x20this\x20command\x20inside\x20a\x20directory\x20with\x20a\x20','\x20auth\x20login`.','\x20or\x20run\x20`','20LXNKNv','4oOcWfR','705711dERsWs','\x20file.','newConfigFileName','Configure\x20accessKey\x20in\x20','696sqvvNe','Set\x20appcode\x20via\x20--appcode\x20or\x20','38424BnOqyD','6357340KJJowh','416530OUPyXl'];a46_0x4482=function(){return _0x3642f8;};return a46_0x4482();}function a46_0x351a(_0x2b38c8,_0x142a1b){_0x2b38c8=_0x2b38c8-0x163;const _0x4482ce=a46_0x4482();let _0x351a07=_0x4482ce[_0x2b38c8];return _0x351a07;}const a46_0x2efa5d=a46_0x351a;(function(_0x3bac48,_0x1777ec){const _0x46c03b=a46_0x351a,_0x24d851=_0x3bac48();while(!![]){try{const _0x509480=parseInt(_0x46c03b(0x168))/0x1+-parseInt(_0x46c03b(0x171))/0x2*(parseInt(_0x46c03b(0x172))/0x3)+-parseInt(_0x46c03b(0x16c))/0x4*(parseInt(_0x46c03b(0x170))/0x5)+-parseInt(_0x46c03b(0x166))/0x6*(-parseInt(_0x46c03b(0x16b))/0x7)+-parseInt(_0x46c03b(0x164))/0x8*(-parseInt(_0x46c03b(0x16a))/0x9)+parseInt(_0x46c03b(0x169))/0xa+parseInt(_0x46c03b(0x167))/0xb;if(_0x509480===_0x1777ec)break;else _0x24d851['push'](_0x24d851['shift']());}catch(_0x17e925){_0x24d851['push'](_0x24d851['shift']());}}}(a46_0x4482,0x5d5d7));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':a46_0x2efa5d(0x163)+PRODUCT_CONFIG[a46_0x2efa5d(0x174)]+a46_0x2efa5d(0x16f)+CLI_BIN_NAME+a46_0x2efa5d(0x16e),'configMissingHint':a46_0x2efa5d(0x165)+PRODUCT_CONFIG['newConfigFileName']+'.','notInProjectHint':a46_0x2efa5d(0x16d)+PRODUCT_CONFIG[a46_0x2efa5d(0x174)]+a46_0x2efa5d(0x173)});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x259f70,_0x3221ec){var _0x3dce5e=a47_0x27c1,_0x785533=_0x259f70();while(!![]){try{var _0x13fcd6=parseInt(_0x3dce5e(0x9d))/0x1+-parseInt(_0x3dce5e(0xa0))/0x2*(parseInt(_0x3dce5e(0x9f))/0x3)+-parseInt(_0x3dce5e(0x9a))/0x4+-parseInt(_0x3dce5e(0x9c))/0x5+-parseInt(_0x3dce5e(0xa3))/0x6*(parseInt(_0x3dce5e(0xa2))/0x7)+-parseInt(_0x3dce5e(0x9e))/0x8+-parseInt(_0x3dce5e(0x9b))/0x9*(-parseInt(_0x3dce5e(0xa1))/0xa);if(_0x13fcd6===_0x3221ec)break;else _0x785533['push'](_0x785533['shift']());}catch(_0x26e4d5){_0x785533['push'](_0x785533['shift']());}}}(a47_0x17f1,0x71468));import{DEFAULT_COMMAND_OUTPUT_FORMAT}from'../constant/defaults.js';function a47_0x27c1(_0x3251d0,_0x324758){_0x3251d0=_0x3251d0-0x9a;var _0x17f1b7=a47_0x17f1();var _0x27c1e4=_0x17f1b7[_0x3251d0];return _0x27c1e4;}function a47_0x17f1(){var _0x318814=['1799862BBXHoO','3509764ErLFlo','27OkTFbT','4325310uLMgNM','807517PcVjVY','3308944GyhWWL','252393dYKruA','4eKQsVG','7602730iFWROe','7uUSnny'];a47_0x17f1=function(){return _0x318814;};return a47_0x17f1();}import{buildAllFlags as a47_0x5275ac}from'@lovrabet/cli-framework';export function buildAllFlags(_0xfcd0c){return a47_0x5275ac(_0xfcd0c,{'defaultOutputFormat':DEFAULT_COMMAND_OUTPUT_FORMAT});}
|
package/lib/framework/dryrun.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x29d066,_0x44e412){const _0x11f229=a48_0x38ae,_0x21dba5=_0x29d066();while(!![]){try{const _0x1ee9dc=parseInt(_0x11f229(0x1be))/0x1*(parseInt(_0x11f229(0x1ba))/0x2)+parseInt(_0x11f229(0x1c0))/0x3+-parseInt(_0x11f229(0x1c3))/0x4+parseInt(_0x11f229(0x1b9))/0x5*(parseInt(_0x11f229(0x1b8))/0x6)+-parseInt(_0x11f229(0x1c1))/0x7*(parseInt(_0x11f229(0x1bc))/0x8)+-parseInt(_0x11f229(0x1bf))/0x9*(-parseInt(_0x11f229(0x1b7))/0xa)+-parseInt(_0x11f229(0x1bd))/0xb;if(_0x1ee9dc===_0x44e412)break;else _0x21dba5['push'](_0x21dba5['shift']());}catch(_0x2ff66f){_0x21dba5['push'](_0x21dba5['shift']());}}}(a48_0x516d,0x4adf6));function a48_0x516d(){const _0x2d6434=['167497yRjerA','396rVFjaS','1079478zsOMxd','49KBagpZ','description','980896JvGxih','113760RtzANT','2452350jxkfya','5vfReAf','6TAKOYY','body','679088ckCxCW','6880302vSrzML'];a48_0x516d=function(){return _0x2d6434;};return a48_0x516d();}function a48_0x38ae(_0x540e60,_0x2e7108){_0x540e60=_0x540e60-0x1b7;const _0x516d90=a48_0x516d();let _0x38ae68=_0x516d90[_0x540e60];return _0x38ae68;}export function dryRun(_0x5d1504,_0x47cc95){const _0x45fd85={'method':_0x5d1504,'url':_0x47cc95},_0x167bcf={'body'(_0x148151){const _0x48bd07=a48_0x38ae;return _0x45fd85[_0x48bd07(0x1bb)]=_0x148151,_0x167bcf;},'description'(_0x55fca6){const _0x59b43f=a48_0x38ae;return _0x45fd85[_0x59b43f(0x1c2)]=_0x55fca6,_0x167bcf;},'build'(){return{..._0x45fd85};}};return _0x167bcf;}
|